diff --git a/src/config.c b/src/config.c index de726939f..25f287eef 100644 --- a/src/config.c +++ b/src/config.c @@ -473,6 +473,12 @@ load_video(void) show_second_monitors = !!ini_section_get_int(cat, "show_second_monitors", 1); video_fullscreen_scale_maximized = !!ini_section_get_int(cat, "video_fullscreen_scale_maximized", 0); + vid_cga_comp_brightness = ini_section_get_int(cat, "vid_cga_comp_brightness", 0); + vid_cga_comp_sharpness = ini_section_get_int(cat, "vid_cga_comp_sharpness", 0); + vid_cga_comp_contrast = ini_section_get_int(cat, "vid_cga_comp_contrast", 100); + vid_cga_comp_hue = ini_section_get_int(cat, "vid_cga_comp_hue", 0); + vid_cga_comp_saturation = ini_section_get_int(cat, "vid_cga_comp_saturation", 100); + // TODO for (uint8_t i = 1; i < GFXCARD_MAX; i ++) { p = ini_section_get_string(cat, "gfxcard_2", NULL); @@ -2451,6 +2457,32 @@ save_video(void) ini_section_set_string(cat, "gfxcard", video_get_internal_name(gfxcard[0])); + + if (vid_cga_comp_brightness) + ini_section_set_int(cat, "vid_cga_comp_brightness", vid_cga_comp_brightness); + else + ini_section_delete_var(cat, "vid_cga_comp_brightness"); + + if (vid_cga_comp_sharpness) + ini_section_set_int(cat, "vid_cga_comp_sharpness", vid_cga_comp_sharpness); + else + ini_section_delete_var(cat, "vid_cga_comp_sharpness"); + + if (vid_cga_comp_contrast != 100) + ini_section_set_int(cat, "vid_cga_comp_contrast", vid_cga_comp_contrast); + else + ini_section_delete_var(cat, "vid_cga_comp_contrast"); + + if (vid_cga_comp_hue) + ini_section_set_int(cat, "vid_cga_comp_hue", vid_cga_comp_hue); + else + ini_section_delete_var(cat, "vid_cga_comp_hue"); + + if (vid_cga_comp_saturation != 100) + ini_section_set_int(cat, "vid_cga_comp_saturation", vid_cga_comp_saturation); + else + ini_section_delete_var(cat, "vid_cga_comp_saturation"); + if (voodoo_enabled == 0) ini_section_delete_var(cat, "voodoo"); else diff --git a/src/include/86box/86box.h b/src/include/86box/86box.h index dd177bbe4..de66f8a0f 100644 --- a/src/include/86box/86box.h +++ b/src/include/86box/86box.h @@ -126,6 +126,11 @@ extern int scale; /* (C) screen scale factor */ extern int dpi_scale; /* (C) DPI scaling of the emulated screen */ extern int vid_api; /* (C) video renderer */ extern int vid_cga_contrast; /* (C) video */ +extern int vid_cga_comp_brightness; /* (C) CGA composite brightness */ +extern int vid_cga_comp_sharpness; /* (C) CGA composite sharpness */ +extern int vid_cga_comp_hue; /* (C) CGA composite hue */ +extern int vid_cga_comp_saturation; /* (C) CGA composite saturation */ +extern int vid_cga_comp_contrast; /* (C) CGA composite saturation */ extern int video_fullscreen; /* (C) video */ extern int video_fullscreen_scale; /* (C) video */ extern int enable_overscan; /* (C) video */ diff --git a/src/include/86box/vid_8514a.h b/src/include/86box/vid_8514a.h index e15dadfca..4c534c47b 100644 --- a/src/include/86box/vid_8514a.h +++ b/src/include/86box/vid_8514a.h @@ -278,6 +278,7 @@ typedef struct ibm8514_t { int _8514on; int _8514crt; PALETTE _8514pal; + uint8_t ven_clock; latch8514_t latch; diff --git a/src/include/86box/vid_cga_comp.h b/src/include/86box/vid_cga_comp.h index 609e6d813..94051b5e5 100644 --- a/src/include/86box/vid_cga_comp.h +++ b/src/include/86box/vid_cga_comp.h @@ -21,11 +21,13 @@ #ifndef VIDEO_CGA_COMP_H #define VIDEO_CGA_COMP_H +#include + #define Bitu unsigned int -#define bool uint8_t void update_cga16_color(uint8_t cgamode); void cga_comp_init(int revision); +void cga_comp_reload(int new_brightness, int new_saturation, int new_sharpness, int new_hue, int new_contrast); uint32_t *Composite_Process(uint8_t cgamode, uint8_t border, uint32_t blocks /*, bool doublewidth*/, uint32_t *TempLine); #endif /*VIDEO_CGA_COMP_H*/ diff --git a/src/include/86box/vid_svga.h b/src/include/86box/vid_svga.h index ea34827c3..02c2e0f17 100644 --- a/src/include/86box/vid_svga.h +++ b/src/include/86box/vid_svga.h @@ -498,9 +498,12 @@ extern const device_t bt485a_ramdac_device; extern const device_t gendac_ramdac_device; extern const device_t ibm_rgb528_ramdac_device; extern const device_t ics2494an_305_device; -extern const device_t ati18810_device; -extern const device_t ati18811_0_device; -extern const device_t ati18811_1_device; +extern const device_t ati18810_28800_device; +extern const device_t ati18811_0_28800_device; +extern const device_t ati18811_1_28800_device; +extern const device_t ati18810_mach32_device; +extern const device_t ati18811_0_mach32_device; +extern const device_t ati18811_1_mach32_device; extern const device_t ics2595_device; extern const device_t icd2061_device; extern const device_t ics9161_device; diff --git a/src/include/86box/video.h b/src/include/86box/video.h index 3bf703099..8be21b534 100644 --- a/src/include/86box/video.h +++ b/src/include/86box/video.h @@ -140,6 +140,7 @@ typedef struct monitor_t { const video_timings_t *mon_vid_timings; int mon_vid_type; atomic_bool mon_interlace; + atomic_bool mon_composite; struct blit_data_struct *mon_blit_data_ptr; } monitor_t; diff --git a/src/qt/CMakeLists.txt b/src/qt/CMakeLists.txt index 6b485b0ed..1e3a5bdd4 100644 --- a/src/qt/CMakeLists.txt +++ b/src/qt/CMakeLists.txt @@ -257,6 +257,7 @@ add_library(ui STATIC qt_iconindicators.hpp qt_iconindicators.cpp + qt_cgasettingsdialog.hpp qt_cgasettingsdialog.cpp qt_cgasettingsdialog.ui ) if(EMU_BUILD_NUM) diff --git a/src/qt/languages/86box.pot b/src/qt/languages/86box.pot index 533d5b888..01c71d8eb 100644 --- a/src/qt/languages/86box.pot +++ b/src/qt/languages/86box.pot @@ -2936,3 +2936,21 @@ msgstr "" msgid "&Update mouse every CPU frame" msgstr "" + +msgid "Hue" +msgstr "" + +msgid "Saturation" +msgstr "" + +msgid "Contrast" +msgstr "" + +msgid "Brightness" +msgstr "" + +msgid "Sharpness" +msgstr "" + +msgid "CGA composite settings..." +msgstr "" diff --git a/src/qt/languages/cs-CZ.po b/src/qt/languages/cs-CZ.po index 98308f734..918a4bea7 100644 --- a/src/qt/languages/cs-CZ.po +++ b/src/qt/languages/cs-CZ.po @@ -2936,3 +2936,21 @@ msgstr "%1 Hz" msgid "&Update mouse every CPU frame" msgstr "&Aktualizovat myš při každém rámce CPU" + +msgid "Hue" +msgstr "Hue" + +msgid "Saturation" +msgstr "Saturace" + +msgid "Contrast" +msgstr "Kontrast" + +msgid "Brightness" +msgstr "Jas" + +msgid "Sharpness" +msgstr "Ostrota" + +msgid "CGA composite settings..." +msgstr "Nastavení kompozitního režimu CGA..." diff --git a/src/qt/languages/de-DE.po b/src/qt/languages/de-DE.po index e81c25222..f2b11d0cd 100644 --- a/src/qt/languages/de-DE.po +++ b/src/qt/languages/de-DE.po @@ -2937,6 +2937,24 @@ msgstr "Das System wird nicht hinzugefügt werden." msgid "&Update mouse every CPU frame" msgstr "&Maus bei jedem CPU-Frame aktualisieren" +msgid "Hue" +msgstr "Farbton" + +msgid "Saturation" +msgstr "Sättigung" + +msgid "Contrast" +msgstr "Kontrast" + +msgid "Brightness" +msgstr "Helligkeit" + +msgid "Sharpness" +msgstr "Schärfe" + +msgid "CGA composite settings..." +msgstr "Optionen des CGA-Composite-Modus..." + #~ msgid "HD Controller:" #~ msgstr "Festplatten-Controller:" diff --git a/src/qt/languages/es-ES.po b/src/qt/languages/es-ES.po index 57c15996e..53f630d3e 100644 --- a/src/qt/languages/es-ES.po +++ b/src/qt/languages/es-ES.po @@ -2937,6 +2937,24 @@ msgstr "El sistema no será añadido." msgid "&Update mouse every CPU frame" msgstr "&Actualiza el estado del ratón en cada bloco de CPU" +msgid "Hue" +msgstr "Tono" + +msgid "Saturation" +msgstr "Saturación" + +msgid "Contrast" +msgstr "Contraste" + +msgid "Brightness" +msgstr "Brillo" + +msgid "Sharpness" +msgstr "Nitidez" + +msgid "CGA composite settings..." +msgstr "Configuración del modo compuesto CGA..." + #~ msgid "HD Controller:" #~ msgstr "Controladora HD:" diff --git a/src/qt/languages/fr-FR.po b/src/qt/languages/fr-FR.po index baad8f0aa..bda97413e 100644 --- a/src/qt/languages/fr-FR.po +++ b/src/qt/languages/fr-FR.po @@ -70,7 +70,7 @@ msgid "F&orce 4:3 display ratio" msgstr "F&orcer le ratio 4:3" msgid "&Window scale factor" -msgstr "&Echelle de facteur" +msgstr "Facteur d'&Echelle" msgid "&0.5x" msgstr "&0.5x" @@ -292,7 +292,7 @@ msgid "&75 fps" msgstr "&75 images par seconde" msgid "&VSync" -msgstr "Synchronisation &verticale" +msgstr "Synchronisation &Verticale" msgid "&Select shader..." msgstr "Sé&lectionnez le shader..." @@ -403,10 +403,10 @@ msgid "CPU frame size" msgstr "Taille du bloc de processeur" msgid "Larger frames (less smooth)" -msgstr "Blocs plus grands (moins fluid)" +msgstr "Blocs plus grands (moins fluide)" msgid "Smaller frames (smoother)" -msgstr "Blocs plus petits (plus fluid)" +msgstr "Blocs plus petits (plus fluide)" msgid "Video:" msgstr "Vidéo:" @@ -1027,7 +1027,7 @@ msgid "You are loading an unsupported configuration" msgstr "Vous chargez une configuration non prise en charge" msgid "CPU type filtering based on selected machine is disabled for this emulated machine.\n\nThis makes it possible to choose a CPU that is otherwise incompatible with the selected machine. However, you may run into incompatibilities with the machine BIOS or other software.\n\nEnabling this setting is not officially supported and any bug reports filed may be closed as invalid." -msgstr "Le filtre du type du processeur basé par rapport à la machine sélectionnée est désactivé pour cette machine émulée.\n\nCela permet de sélectionner un processeur qui est de base incompatible avec la machine sélectionné. Cependant, il pourrait y avoir des incompatibilités avec le BIOS de la machine ou autres logiciels.\n\nL'activation de cette configuration non officiellement prise en charge implique que tout rapport de bogue peut être fermé étant considéré comme invalide." +msgstr "Le filtre du type du processeur basé par rapport à la machine sélectionnée est désactivé pour cette machine émulée.\n\nCela permet de sélectionner un processeur qui est de base incompatible avec la machine sélectionnée. Cependant, il pourrait y avoir des incompatibilités avec le BIOS de la machine ou autres logiciels.\n\nL'activation de cette configuration non officiellement prise en charge implique que tout rapport de bogue peut être fermé étant considéré comme invalide." msgid "Continue" msgstr "Continuer" @@ -1075,10 +1075,10 @@ msgid "Start" msgstr "Démarrer" msgid "Not running" -msgstr "Ne fonctionne pas" +msgstr "Inactive" msgid "Running" -msgstr "Fonctionne" +msgstr "Active" msgid "Paused" msgstr "En pause" @@ -1087,10 +1087,10 @@ msgid "Waiting" msgstr "En attente" msgid "Powered Off" -msgstr "Éteint" +msgstr "Éteinte" msgid "%n running" -msgstr "%n fonctionne" +msgstr "%n démarrée" msgid "%n paused" msgstr "%n en pause" @@ -1255,7 +1255,7 @@ msgid "Create directory failed" msgstr "Échec de la création du répertoire" msgid "Unable to create the directory for the new system" -msgstr "Impossible de créer le répertoire pour le nouveau système." +msgstr "Impossible de créer le répertoire pour le nouveau système" msgid "Configuration write failed" msgstr "Échec de l'écriture de la configuration" @@ -1291,7 +1291,7 @@ msgid "Warning" msgstr "Avertissement" msgid "&Kill" -msgstr "&Résilier de force" +msgstr "Fo&rcer Extinction" msgid "Killing a virtual machine can cause data loss. Only do this if the 86Box process gets stuck.\n\nDo you really wish to kill the virtual machine \"%1\"?" msgstr "La fermeture forcée d'une machine virtuelle peut entraîner une perte de données. Ne procédez ainsi que si le processus 86Box est bloqué.\n\nVoulez-vous vraiment fermer la machine virtuelle \"%1\" ?" @@ -1810,7 +1810,7 @@ msgid "PS/55 Keyboard" msgstr "Clavier PS/55" msgid "Keys" -msgstr "Clés" +msgstr "Touches" msgid "Logitech/Microsoft Bus Mouse" msgstr "Souris bus Logitech/Microsoft" @@ -1942,7 +1942,7 @@ msgid "IBM 5161 Expansion Unit" msgstr "Unité d'extension IBM 5161" msgid "IBM Cassette Basic" -msgstr "BASIC pour cassette IBM" +msgstr "BASIC Cassette IBM" msgid "Translate 26 -> 17" msgstr "Traduire 26 -> 17" @@ -2101,7 +2101,7 @@ msgid "Phonebook File" msgstr "Fichier d'annuaire" msgid "Telnet emulation" -msgstr "Émulation de Telnet" +msgstr "Émulation Telnet" msgid "RAM Address" msgstr "Adresse RAM" @@ -2692,7 +2692,7 @@ msgid "Generic PC/AT Memory Expansion" msgstr "Extension mémoire générique PC/AT" msgid "Unable to find Dot-Matrix fonts" -msgstr "Impossible de trouver les polices matricielles." +msgstr "Impossible de trouver les polices matricielles" msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P Dot-Matrix Printer." msgstr "Les polices TrueType dans le répertoire \"roms/printer/fonts\" sont nécessaires à l'émulation de l'imprimante générique ESC/P matricielle." @@ -2773,16 +2773,16 @@ msgid "Bind" msgstr "Lier" msgid "Bind Key" -msgstr "Lier le clé" +msgstr "Lier touche" msgid "Enter key combo:" -msgstr "Entrez la combinaison de clés:" +msgstr "Entrez la combinaison de touches:" msgid "Bind conflict" msgstr "Conflit de raccourci" msgid "This key combo is already in use." -msgstr "Cette combinaison de clés est déjà utilisée." +msgstr "Cette combinaison de touches est déjà utilisée" msgid "Send Control+Alt+Del" msgstr "Envoyer Ctrl+Alt+Suppr" @@ -2935,7 +2935,25 @@ msgid "The system will not be added." msgstr "Le système ne sera pas ajouté." msgid "&Update mouse every CPU frame" -msgstr "&Mettre à jour le statut du souris en qualquier bloc de processeur" +msgstr "&Mettre à jour le statut souris à chaque frame CPU" + +msgid "Hue" +msgstr "Teinte" + +msgid "Saturation" +msgstr "Saturation" + +msgid "Contrast" +msgstr "Contraste" + +msgid "Brightness" +msgstr "Luminosité" + +msgid "Sharpness" +msgstr "Netteté" + +msgid "CGA composite settings..." +msgstr "Réglages du mode composite CGA..." #~ msgid "HD Controller:" #~ msgstr "Contrôleur HD:" diff --git a/src/qt/languages/hr-HR.po b/src/qt/languages/hr-HR.po index 01e783023..1da525f16 100644 --- a/src/qt/languages/hr-HR.po +++ b/src/qt/languages/hr-HR.po @@ -2937,6 +2937,24 @@ msgstr "Sistem neće biti dodan." msgid "&Update mouse every CPU frame" msgstr "&Ažuriraj status miša kod skavog bloka procesora" +msgid "Hue" +msgstr "Boja" + +msgid "Saturation" +msgstr "Zasićenost" + +msgid "Contrast" +msgstr "Konstrast" + +msgid "Brightness" +msgstr "Svjetlina" + +msgid "Sharpness" +msgstr "Oštrina" + +msgid "CGA composite settings..." +msgstr "Opcije kompozitnog načina CGA..." + #~ msgid "HD Controller:" #~ msgstr "Kontroler tvrdog diska:" @@ -2948,3 +2966,4 @@ msgstr "&Ažuriraj status miša kod skavog bloka procesora" #~ msgid "ZIP images" #~ msgstr "ZIP slike" + diff --git a/src/qt/languages/it-IT.po b/src/qt/languages/it-IT.po index cefd5bfb4..44ddd1b43 100644 --- a/src/qt/languages/it-IT.po +++ b/src/qt/languages/it-IT.po @@ -2937,6 +2937,24 @@ msgstr "Il sistema non verrà aggiunto." msgid "&Update mouse every CPU frame" msgstr "&Aggiorano stato mouse ad ogni blocco CPU" +msgid "Hue" +msgstr "Tinta" + +msgid "Saturation" +msgstr "Saturazione" + +msgid "Contrast" +msgstr "Contrasto" + +msgid "Brightness" +msgstr "Luminosità" + +msgid "Sharpness" +msgstr "Nitidezza" + +msgid "CGA composite settings..." +msgstr "Impostazioni del modo composito CGA..." + #~ msgid "HD Controller:" #~ msgstr "Controller HD:" diff --git a/src/qt/languages/ja-JP.po b/src/qt/languages/ja-JP.po index 7d41f3cb0..88e49412d 100644 --- a/src/qt/languages/ja-JP.po +++ b/src/qt/languages/ja-JP.po @@ -2937,6 +2937,24 @@ msgstr "システムは追加されません。" msgid "&Update mouse every CPU frame" msgstr "マウスをCPUフレームごとに更新(&U)" +msgid "Hue" +msgstr "色相" + +msgid "Saturation" +msgstr "飽和" + +msgid "Contrast" +msgstr "対比" + +msgid "Brightness" +msgstr "明るさ" + +msgid "Sharpness" +msgstr "シャープネス" + +msgid "CGA composite settings..." +msgstr "CGA複合モードの設定..." + #~ msgid "HD Controller:" #~ msgstr "HDDコントローラー:" diff --git a/src/qt/languages/ko-KR.po b/src/qt/languages/ko-KR.po index 18feabb5b..5ba3c8c67 100644 --- a/src/qt/languages/ko-KR.po +++ b/src/qt/languages/ko-KR.po @@ -2937,6 +2937,24 @@ msgstr "" msgid "&Update mouse every CPU frame" msgstr "" +msgid "Hue" +msgstr "색조" + +msgid "Saturation" +msgstr "포화도" + +msgid "Contrast" +msgstr "대조" + +msgid "Brightness" +msgstr "밝기" + +msgid "Sharpness" +msgstr "선명도" + +msgid "CGA composite settings..." +msgstr "CGA 복합 모드의 설정..." + #~ msgid "HD Controller:" #~ msgstr "HD 컨트롤러:" diff --git a/src/qt/languages/nl-NL.po b/src/qt/languages/nl-NL.po index e6fc0bda2..ce4dd388a 100644 --- a/src/qt/languages/nl-NL.po +++ b/src/qt/languages/nl-NL.po @@ -2937,6 +2937,24 @@ msgstr "Het systeem wordt niet toegevoegd." msgid "&Update mouse every CPU frame" msgstr "&Muis bijwerken bij elk CPU-frame" +msgid "Hue" +msgstr "Kleurtoon" + +msgid "Saturation" +msgstr "Verzadiging" + +msgid "Contrast" +msgstr "Contrast" + +msgid "Brightness" +msgstr "Helderheid" + +msgid "Sharpness" +msgstr "Scherpte" + +msgid "CGA composite settings..." +msgstr "Instellingen van de CGA-compositemodus..." + #~ msgid "HD Controller:" #~ msgstr "HD-controller:" diff --git a/src/qt/languages/pl-PL.po b/src/qt/languages/pl-PL.po index 711e05eaf..b1767b485 100644 --- a/src/qt/languages/pl-PL.po +++ b/src/qt/languages/pl-PL.po @@ -28,7 +28,7 @@ msgid "&Pause" msgstr "&Pauza" msgid "Pause" -msgstr "" +msgstr "Pauza" msgid "Re&sume" msgstr "&Wznów" @@ -49,7 +49,7 @@ msgid "&Resizeable window" msgstr "&Okno o zmiennym rozmiarze" msgid "R&emember size && position" -msgstr "P&amiętaj rozmiar &i pozycję" +msgstr "P&amiętaj rozmiar i pozycję" msgid "Re&nderer" msgstr "Re&nderer" @@ -193,7 +193,7 @@ msgid "&Settings..." msgstr "&Ustawienia..." msgid "Settings..." -msgstr "" +msgstr "Ustawienia..." msgid "&Update status bar icons" msgstr "&Aktualizuj ikony na pasku statusu" @@ -220,7 +220,7 @@ msgid "End trace" msgstr "Zakończ śledzenie" msgid "&Help" -msgstr "&Pomoc" +msgstr "Pomo&c" msgid "&Documentation..." msgstr "&Dokumentacja..." @@ -361,7 +361,7 @@ msgid "Configure" msgstr "Konfiguruj" msgid "CPU:" -msgstr "" +msgstr "Procesor:" msgid "CPU type:" msgstr "Rodzaj procesora:" @@ -424,25 +424,25 @@ msgid "XGA Graphics" msgstr "Grafika XGA" msgid "IBM PS/55 Display Adapter Graphics" -msgstr "" +msgstr "Karta graficzna IBM PS/55" msgid "Keyboard:" msgstr "Klawiatura:" msgid "Keyboard" -msgstr "" +msgstr "Klawiatura" msgid "Mouse:" msgstr "Mysz:" msgid "Mouse" -msgstr "" +msgstr "Mysz" msgid "Joystick:" msgstr "Joystick:" msgid "Joystick" -msgstr "" +msgstr "Joystick" msgid "Joystick 1..." msgstr "Joystick 1..." @@ -475,7 +475,7 @@ msgid "MIDI In Device:" msgstr "Urządzenie wejściowe MIDI:" msgid "MIDI Out:" -msgstr "" +msgstr "Wyjście MIDI:" msgid "Standalone MPU-401" msgstr "Samodzielne urządzenie MPU-401" @@ -517,7 +517,7 @@ msgid "LPT4 Device:" msgstr "Urządzenie LPT4:" msgid "Internal LPT ECP DMA:" -msgstr "" +msgstr "Wewnętrzne DMA LPT ECP:" msgid "Serial port 1" msgstr "Port szeregowy 1" @@ -640,10 +640,10 @@ msgid "MO drives:" msgstr "Napędy MO:" msgid "MO:" -msgstr "" +msgstr "MO:" msgid "Removable disks:" -msgstr "" +msgstr "Dyski wymienne:" msgid "Removable disk drives:" msgstr "Stacje dysków wymiennych:" @@ -742,16 +742,16 @@ msgid "Surface images" msgstr "Obrazy powierzchni" msgid "Machine \"%hs\" is not available due to missing ROMs in the roms/machines directory. Switching to an available machine." -msgstr "Maszyna \"%hs\" nie jest dostępna, ponieważ brakuje ROM-ów w katalogu roms/machines. Przełączanie na dostępną maszynę." +msgstr "Maszyna „%hs” nie jest dostępna, ponieważ brakuje ROM-ów w katalogu roms/machines. Przełączanie na dostępną maszynę." msgid "Video card \"%hs\" is not available due to missing ROMs in the roms/video directory. Switching to an available video card." -msgstr "Karta wideo \"%hs\" nie jest dostępna, ponieważ brakuje ROM-ów w katalogu roms/video. Przełączanie na dostępną kartę graficzną." +msgstr "Karta wideo „%hs” nie jest dostępna, ponieważ brakuje ROM-ów w katalogu roms/video. Przełączanie na dostępną kartę graficzną." msgid "Video card #2 \"%hs\" is not available due to missing ROMs in the roms/video directory. Disabling the second video card." -msgstr "Karta wideo 2 \"%hs\" nie jest dostępna, ponieważ brakuje ROM-ów w katalogu roms/video. Wyłączenie drugiej karty graficznej." +msgstr "Karta wideo 2 „%hs” nie jest dostępna, ponieważ brakuje ROM-ów w katalogu roms/video. Wyłączenie drugiej karty graficznej." msgid "Device \"%hs\" is not available due to missing ROMs. Ignoring the device." -msgstr "Urządzenie \"%hs\" nie jest dostępne, ponieważ brakuje ROM-ów. Ignorowanie urządzenia." +msgstr "Urządzenie „%hs” nie jest dostępne, ponieważ brakuje ROM-ów. Ignorowanie urządzenia." msgid "Machine" msgstr "Maszyna" @@ -772,13 +772,13 @@ msgid "Ports (COM & LPT)" msgstr "Porty (COM & LPT)" msgid "Ports" -msgstr "" +msgstr "Porty" msgid "Serial ports" -msgstr "" +msgstr "Porty szeregowe" msgid "Parallel ports" -msgstr "" +msgstr "Porty równoległe" msgid "Storage controllers" msgstr "Kontrolery pamięci masowej" @@ -787,13 +787,13 @@ msgid "Hard disks" msgstr "Dyski twarde" msgid "Disks:" -msgstr "" +msgstr "Dyski:" msgid "Floppy:" -msgstr "" +msgstr "Dyskietki:" msgid "Controllers:" -msgstr "" +msgstr "Kontrolery:" msgid "Floppy & CD-ROM drives" msgstr "Napędy dyskietek i CD-ROM" @@ -805,7 +805,7 @@ msgid "Other peripherals" msgstr "Inne urządzenia peryferyjne" msgid "Other devices" -msgstr "" +msgstr "Inne urządzenia" msgid "Click to capture mouse" msgstr "Kliknij, by przechwycić mysz" @@ -952,16 +952,16 @@ msgid "Internal device" msgstr "Urządzenie wewnętrzne" msgid "&File" -msgstr "" +msgstr "&Plik" msgid "&New machine..." -msgstr "" +msgstr "&Nowa maszyna..." msgid "&Check for updates..." -msgstr "" +msgstr "&Sprawdź aktualizacje..." msgid "Exit" -msgstr "Zakończ" +msgstr "Za&kończ" msgid "No ROMs found" msgstr "Nie znaleziono ROM-ów" @@ -982,7 +982,7 @@ msgid "86Box v" msgstr "86Box v" msgid "An emulator of old computers\n\nAuthors: Miran Grča (OBattler), RichardG867, Jasmine Iwanek, TC1995, coldbrewed, Teemu Korhonen (Manaatti), Joakim L. Gilje, Adrien Moulin (elyosh), Daniel Balsom (gloriouscow), Cacodemon345, Fred N. van Kempen (waltje), Tiseno100, reenigne, and others.\n\nWith previous core contributions from Sarah Walker, leilei, JohnElliott, greatpsycho, and others.\n\nReleased under the GNU General Public License version 2 or later. See LICENSE for more information." -msgstr "Emulator starych komputerów\n\nAutorzy: Miran Grča (OBattler), RichardG867, Jasmine Iwanek, TC1995, coldbrewed, Teemu Korhonen (Manaatti), Joakim L. Gilje, Adrien Moulin (elyosh), Daniel Balsom (gloriouscow), Cacodemon345, Fred N. van Kempen (waltje), Tiseno100, reenigne, i inni.\n\nZ wcześniejszym wkładem od Sarah Walker, leilei, JohnElliott, greatpsycho i innych.\n\nPrzetłumaczony przez: Fanta-Shokata, Lili1228\n\nWydany na licencji GNU General Public License w wersji 2 lub nowszej. Zobacz LICENSE aby uzyskać więcej informacji." +msgstr "Emulator starych komputerów\n\nAutorzy: Miran Grča (OBattler), RichardG867, Jasmine Iwanek, TC1995, coldbrewed, Teemu Korhonen (Manaatti), Joakim L. Gilje, Adrien Moulin (elyosh), Daniel Balsom (gloriouscow), Cacodemon345, Fred N. van Kempen (waltje), Tiseno100, reenigne, i inni.\n\nZ wcześniejszym wkładem od Sarah Walker, leilei, JohnElliott, greatpsycho i innych.\n\nPrzetłumaczony przez: Lili1228\n\nWydany na licencji GNU General Public License w wersji 2 lub nowszej. Zobacz LICENSE aby uzyskać więcej informacji." msgid "Hardware not available" msgstr "Sprzęt niedostępny" @@ -1057,7 +1057,7 @@ msgid "Pause execution" msgstr "Zatrzymaj wykonywanie" msgid "Ctrl+Alt+Del" -msgstr "" +msgstr "Ctrl+Alt+Del" msgid "Press Ctrl+Alt+Del" msgstr "Naciśnij Ctrl+Alt+Del" @@ -1069,271 +1069,271 @@ msgid "Hard reset" msgstr "Twardy reset" msgid "Force shutdown" -msgstr "" +msgstr "Wymuś zamknięcie" msgid "Start" -msgstr "" +msgstr "Uruchom" msgid "Not running" -msgstr "" +msgstr "Wyłączona" msgid "Running" -msgstr "" +msgstr "Uruchomiona" msgid "Paused" -msgstr "" +msgstr "Wstrzymana" msgid "Waiting" -msgstr "" +msgstr "Oczekiwanie" msgid "Powered Off" -msgstr "" +msgstr "Wyłączona" msgid "%n running" -msgstr "" +msgstr "%n uruchomion(a/e/ych)" msgid "%n paused" -msgstr "" +msgstr "%n wstrzyman(a/e/ych)" msgid "%n waiting" -msgstr "" +msgstr "%n oczekując(a/e/ych)" msgid "%1 total" -msgstr "" +msgstr "Łącznie %1" msgid "VMs: %1" -msgstr "" +msgstr "Maszyny wirtualne: %1" msgid "System Directory:" -msgstr "" +msgstr "Folder systemowy:" msgid "Choose directory" -msgstr "" +msgstr "Wybierz folder" msgid "Choose configuration file" -msgstr "" +msgstr "Wybierz plik konfiguracyjny" msgid "86Box configuration files (86box.cfg)" -msgstr "" +msgstr "Pliki konfiguracyjne 86Boxa (86box.cfg)" msgid "Configuration read failed" -msgstr "" +msgstr "Nieudany odczyt konfiguracji" msgid "Unable to open the selected configuration file for reading: %1" -msgstr "" +msgstr "Nie udało się otworzyć wybranego pliku konfiguracyjnego do odczytu: %1" msgid "Use regular expressions in search box" -msgstr "" +msgstr "Użyj wyrażeń regularnych w polu wyszukiwania" msgid "%1 machine(s) are currently active. Are you sure you want to exit the VM manager anyway?" -msgstr "" +msgstr "Liczba obecnie aktywnych maszyn: %1. Czy na pewno chcesz, mimo to, wyjść z menedżera maszyn wirtualnych?" msgid "Add new system wizard" -msgstr "" +msgstr "Kreator dodawania nowego systemu" msgid "Introduction" -msgstr "" +msgstr "Wstęp" msgid "This will help you add a new system to 86Box." -msgstr "" +msgstr "Ten kreator pomoże Ci dodać nowy system do 86Boxa." msgid "New configuration" -msgstr "" +msgstr "Nowa konfiguracja" msgid "Complete" -msgstr "" +msgstr "Ukończono" msgid "The wizard will now launch the configuration for the new system." -msgstr "" +msgstr "Kreator teraz uruchomi konfigurację dla nowego systemu." msgid "Use existing configuration" -msgstr "" +msgstr "Użyj istniejącej konfiguracji" msgid "Type some notes here" -msgstr "" +msgstr "Wpisz tutaj swoje notatki" msgid "Paste the contents of the existing configuration file into the box below." -msgstr "" +msgstr "Wklej zawartość istniejącego pliku konfiguracyjnego w poniższe pole." msgid "Load configuration from file" -msgstr "" +msgstr "Wczytaj konfigurację z pliku" msgid "System name" -msgstr "" +msgstr "Nazwa systemu" msgid "System name:" -msgstr "" +msgstr "Nazwa systemu:" msgid "System name cannot contain certain characters" -msgstr "" +msgstr "Nazwa systemu nie może zawierać niektórych znaków" msgid "System name already exists" -msgstr "" +msgstr "Nazwa systemu już istnieje" msgid "Please enter a directory for the system" -msgstr "" +msgstr "Wprowadź folder dla systemu" msgid "Directory does not exist" -msgstr "" +msgstr "Folder nie istnieje" msgid "A new directory for the system will be created in the selected directory above" -msgstr "" +msgstr "Zostanie utworzony nowy folder dla systemu w wybranym powyżej folderze" msgid "System location:" -msgstr "" +msgstr "Lokalizacja systemu:" msgid "System name and location" -msgstr "" +msgstr "Nazwa i lokalizacja systemu" msgid "Enter the name of the system and choose the location" -msgstr "" +msgstr "Podaj nazwę system i wybierz jego lokalizację" msgid "Enter the name of the system" -msgstr "" +msgstr "Podaj nazwę systemu" msgid "Please enter a system name" -msgstr "" +msgstr "Proszę podać nazwę systemu" msgid "Display name (optional):" -msgstr "" +msgstr "Nazwa wyświetlana (opcjonalne):" msgid "Display name:" -msgstr "" +msgstr "Nazwa wyświetlana:" msgid "Set display name" -msgstr "" +msgstr "Ustaw nazwę wyświetlaną" msgid "Enter the new display name (blank to reset)" -msgstr "" +msgstr "Podaj nową nazwę wyświetlaną (wyczyść, by zresetować)" msgid "Change &display name..." -msgstr "" +msgstr "Zmień wyświetlaną &nazwę..." msgid "Context Menu" -msgstr "" +msgstr "Menu kontekstowe" msgid "&Open folder..." -msgstr "" +msgstr "&Otwórz folder..." msgid "Open &printer tray..." -msgstr "" +msgstr "Otwórz &tackę drukarki..." msgid "Set &icon..." -msgstr "" +msgstr "&Ustaw ikonę..." msgid "Select an icon" -msgstr "" +msgstr "Wybierz ikonę" msgid "C&lone..." -msgstr "" +msgstr "&Klonuj..." msgid "Virtual machine \"%1\" (%2) will be cloned into:" -msgstr "" +msgstr "Maszyna wirtualna „%1” (%2) zostanie sklonowana jako:" msgid "Directory %1 already exists" -msgstr "" +msgstr "Folder %1 już istnieje" msgid "You cannot use the following characters in the name: %1" -msgstr "" +msgstr "Nie możesz użyć następujących znaków w nazwie: %1" msgid "Clone" -msgstr "" +msgstr "Klonuj" msgid "Failed to create directory for cloned VM" -msgstr "" +msgstr "Nie udało się stworzyć folderu dla klonowanej maszyny wirtualnej" msgid "Failed to clone VM." -msgstr "" +msgstr "Nie udało się sklonować maszyny wirtualnej." msgid "Directory in use" -msgstr "" +msgstr "Folder w użyciu" msgid "The selected directory is already in use. Please select a different directory." -msgstr "" +msgstr "Wybrany folder jest już w użyciu. Proszę wybrać inny folder." msgid "Create directory failed" -msgstr "" +msgstr "Nieudane utworzenie folderu" msgid "Unable to create the directory for the new system" -msgstr "" +msgstr "Nie udało się utworzyć folderu dla nowego systemu" msgid "Configuration write failed" -msgstr "" +msgstr "Nieudany zapis konfiguracji" msgid "Unable to open the configuration file at %1 for writing" -msgstr "" +msgstr "Nie udało się otworzyć pliku %1 do zapisu" msgid "Error adding system" -msgstr "" +msgstr "Błąd dodawania systemu" msgid "Remove directory failed" -msgstr "" +msgstr "Nieudane usunięcie folderu" msgid "Some files in the machine's directory were unable to be deleted. Please delete them manually." -msgstr "" +msgstr "Nie udało się usunąć niektórych plików w folderze maszyny wirtualnej. Proszę usunąć je ręcznie." msgid "Build" -msgstr "" +msgstr "Kompilacja" msgid "Version" -msgstr "" +msgstr "Wersja" msgid "An update to 86Box is available: %1 %2" -msgstr "" +msgstr "Dostępna jest aktualizacja 86Boxa: %1 %2" msgid "An error has occurred while checking for updates: %1" -msgstr "" +msgstr "Wystąpił błąd podczas sprawdzania aktualizacji %1" msgid "An update to 86Box is available!" -msgstr "" +msgstr "Dostępna jest aktualizacja 86Boxa!" msgid "Warning" -msgstr "" +msgstr "Ostrzeżenie" msgid "&Kill" -msgstr "" +msgstr "&Zabij" msgid "Killing a virtual machine can cause data loss. Only do this if the 86Box process gets stuck.\n\nDo you really wish to kill the virtual machine \"%1\"?" -msgstr "" +msgstr "Zabicie maszyny wirtualnej może spowodować utratę danych. Zrób to tylko, jeśli proces 86Boxa się zawiesił.\n\nCzy na pewno chcesz zabić maszynę wirtualną „%1”?" msgid "&Delete" -msgstr "" +msgstr "&Usuń" msgid "Do you really want to delete the virtual machine \"%1\" and all its files? This action cannot be undone!" -msgstr "" +msgstr "Czy na pewno chcesz usunąć maszynę wirtualną „%1” i jej wszystkie pliki? Tej operacji nie można cofnąć!" msgid "Show &config file" -msgstr "" +msgstr "&Pokaż plik konfiguracyjny" msgid "No screenshot" -msgstr "" +msgstr "Brak zrzutów ekranu" msgid "Search" -msgstr "" +msgstr "Szukanie" msgid "Searching for VMs..." -msgstr "" +msgstr "Szukanie maszyn wirtualnych..." msgid "Found %1" -msgstr "" +msgstr "Znaleziono %1" msgid "System" -msgstr "" +msgstr "System" msgid "Storage" -msgstr "" +msgstr "Pamięć" msgid "Disk %1: " -msgstr "" +msgstr "Dysk %1: " msgid "No disks" -msgstr "" +msgstr "Brak dysków" msgid "Audio" -msgstr "" +msgstr "Dźwięk" msgid "Audio:" -msgstr "" +msgstr "Dźwięk:" msgid "ACPI shutdown" msgstr "Wyłączenie ACPI" @@ -1639,10 +1639,10 @@ msgid "&MCA devices..." msgstr "Urządzenia MCA..." msgid "Show non-&primary monitors" -msgstr "Pokaż monitory inne niż podstawowe" +msgstr "Pokaż monitory &inne niż podstawowe" msgid "Open screenshots &folder..." -msgstr "Otwórz folder zrzutów ekranu..." +msgstr "Otwórz folder zrzutów &ekranu..." msgid "Appl&y fullscreen stretch mode when maximized" msgstr "Zastosowanie trybu rozciągania na pełnym ekranie w stanie zmaksymalizowanym" @@ -1675,7 +1675,7 @@ msgid "Null Driver" msgstr "Null Driver" msgid "NIC:" -msgstr "" +msgstr "NIC:" msgid "NIC %1 (%2) %3" msgstr "NIC %1 (%2) %3" @@ -1729,13 +1729,13 @@ msgid "This machine might have been moved or copied." msgstr "To urządzenie mogło zostać przeniesione lub skopiowane." msgid "In order to ensure proper networking functionality, 86Box needs to know if this machine was moved or copied.\n\nSelect \"I Copied It\" if you are not sure." -msgstr "Aby zapewnić prawidłową funkcjonalność sieci, 86Box musi wiedzieć, czy to urządzenie zostało przeniesione lub skopiowane.\n\nW przypadku braku pewności, wybrać opcję \"Zostało skopiowane\"." +msgstr "Aby zapewnić prawidłową funkcjonalność sieci, 86Box musi wiedzieć, czy to maszyna zostało przeniesiona albo skopiowana.\n\nW przypadku braku pewności, wybierz opcję „Została skopiowana”." msgid "I Moved It" -msgstr "Zostało przeniesione" +msgstr "Została przeniesiona" msgid "I Copied It" -msgstr "Zostało skopiowane" +msgstr "Została skopiowana" msgid "86Box Monitor #" msgstr "86Box Monitor " @@ -1747,7 +1747,7 @@ msgid "MiB" msgstr "MiB" msgid "GiB" -msgstr "" +msgstr "GiB" msgid "Network Card #1" msgstr "Karta sieciowa nr 1" @@ -1924,10 +1924,10 @@ msgid "IRQ" msgstr "IRQ" msgid "Serial port IRQ" -msgstr "" +msgstr "IRQ portu szeregowego" msgid "Parallel port IRQ" -msgstr "" +msgstr "IRQ portu równoległego" msgid "BIOS Revision" msgstr "Rewizja BIOS-u" @@ -2155,7 +2155,7 @@ msgid "SB Address" msgstr "Adres SB" msgid "Adlib Address" -msgstr "" +msgstr "Adres Adlib" msgid "Use EEPROM setting" msgstr "Użyj ustawień z EEPROM" @@ -2206,7 +2206,7 @@ msgid "GUS type" msgstr "Typ GUS" msgid "Enable 0x04 \"Exit 86Box\" command" -msgstr "Włącz polecenie 0x04 \"Wyjdź z 86Boxa\"" +msgstr "Włącz polecenie 0x04 „Wyjdź z 86Boxa”" msgid "Display type" msgstr "Typ ekranu" @@ -2215,7 +2215,7 @@ msgid "Composite type" msgstr "Typ kompozytowy" msgid "True color" -msgstr "" +msgstr "Prawdziwy kolor" msgid "RGB type" msgstr "Typ RGB" @@ -2560,7 +2560,7 @@ msgid "3Dfx Voodoo Graphics" msgstr "Grafika 3Dfx Voodoo" msgid "3Dfx Voodoo 2" -msgstr "" +msgstr "3Dfx Voodoo 2" msgid "Obsidian SB50 + Amethyst (2 TMUs)" msgstr "Obsidian SB50 + Amethyst (2 jednostki TMU)" @@ -2695,7 +2695,7 @@ msgid "Unable to find Dot-Matrix fonts" msgstr "Nie można znaleźć fontów igłowych" msgid "TrueType fonts in the \"roms/printer/fonts\" directory are required for the emulation of the Generic ESC/P Dot-Matrix Printer." -msgstr "Fonty TrueType w katalogu \"roms/printer/fonts\" są wymagane do emulacji generycznej drukarki igłowej ESC/P." +msgstr "Fonty TrueType w katalogu „roms/printer/fonts” są wymagane do emulacji generycznej drukarki igłowej ESC/P." msgid "Inhibit multimedia keys" msgstr "Przejmij klawisze multimedialne" @@ -2815,124 +2815,142 @@ msgid "SoundFont files" msgstr "Pliki SoundFont" msgid "Local Switch" -msgstr "" +msgstr "Switch lokalny" msgid "Remote Switch" -msgstr "" +msgstr "Switch zdalny" msgid "Switch:" -msgstr "" +msgstr "Switch:" msgid "Hub Mode" -msgstr "" +msgstr "Tryb hub" msgid "Hostname:" -msgstr "" +msgstr "Nazwa komputera:" msgid "ISA RTC" -msgstr "" +msgstr "ISA RTC" msgid "ISA RAM" -msgstr "" +msgstr "ISA RAM" msgid "ISA ROM" -msgstr "" +msgstr "ISA ROM" msgid "&Wipe NVRAM" -msgstr "" +msgstr "&Wyczyść NVRAM" msgid "This will delete all NVRAM (and related) files of the virtual machine located in the \"nvr\" subdirectory. You'll have to reconfigure the BIOS (and possibly other devices inside the VM) settings again if applicable.\n\nAre you sure you want to wipe all NVRAM contents of the virtual machine \"%1\"?" -msgstr "" +msgstr "To usunie wszystkie pliki NVRAM (i powiązane) maszyny wirtualnej, zlokalizowane w podkatalogu „nvr”. Będziesz musieć przekonfigurować BIOS (i prawdopodobnie inne urządzenia w maszynie wirtualnej), jeśli dotyczy.\n\nCzy na pewno chcesz wyczyścić całą zawartość NVRAM maszyny wirtualnej \"%1\"?" msgid "Success" -msgstr "" +msgstr "Sukces" msgid "Successfully wiped the NVRAM contents of the virtual machine \"%1\"" -msgstr "" +msgstr "Pomyślnie wyczyszczono zawartość NVRAM maszyny wirtualnej „%1”" msgid "An error occurred trying to wipe the NVRAM contents of the virtual machine \"%1\"" -msgstr "" +msgstr "Wystąpił błąd podczas próby wyczyszczenia zawartości NVRAM maszyny wirtualnej „%1”" msgid "%1 VM Manager" -msgstr "" +msgstr "Menedżer maszyn wirtualnych %1" msgid "%n disk(s)" -msgstr "" +msgstr "%n dysk(i/ów)" msgid "Unknown Status" -msgstr "" +msgstr "Status nieznany" msgid "No Machines Found!" -msgstr "" +msgstr "Nie znaleziono maszyn!" msgid "Check for updates on startup" -msgstr "" +msgstr "Sprawdzaj aktualizacje przy starcie" msgid "Unable to determine release information" -msgstr "" +msgstr "Nie udało się ustalić informacji o wydaniu" msgid "There was an error checking for updates:\n\n%1\n\nPlease try again later." -msgstr "" +msgstr "Wystąpił błąd podczas sprawdzania aktualizacji:\n\n%1\n\nSpróbuj ponownie później." msgid "Update check complete" -msgstr "" +msgstr "Sprawdzanie aktualizacji ukończone" msgid "stable" -msgstr "" +msgstr "stabilnej" msgid "beta" -msgstr "" +msgstr "beta" msgid "You are running the latest %1 version of 86Box: %2" -msgstr "" +msgstr "Używasz najnowszej wersji %1 86Boxa: %2" msgid "version" -msgstr "" +msgstr "wersja" msgid "build" -msgstr "" +msgstr "kompilacja" msgid "You are currently running version %1." -msgstr "" +msgstr "Aktualnie używasz wersji %1." msgid "Version %1 is now available." -msgstr "" +msgstr "Wersja %1 jest teraz dostępna." msgid "You are currently running build %1." -msgstr "" +msgstr "Aktualnie używasz kompilacji %1." msgid "Build %1 is now available." -msgstr "" +msgstr "Kompilacja %1 jest teraz dostępna." msgid "Would you like to visit the download page?" -msgstr "" +msgstr "Czy chcesz odwiedzić stronę pobierania?" msgid "Visit download page" -msgstr "" +msgstr "Odwiedź stronę pobierania" msgid "Update check" -msgstr "" +msgstr "Sprawdzanie aktualizacji" msgid "Checking for updates..." -msgstr "" +msgstr "Sprawdzanie aktualizacji..." msgid "86Box Update" -msgstr "" +msgstr "Aktualizacja 86Boxa" msgid "Release notes:" -msgstr "" +msgstr "Uwagi do wydania:" msgid "%1 Hz" msgstr "%1 Hz" msgid "Virtual machine crash" -msgstr "" +msgstr "Awaria maszyny wirtualnej" msgid "The virtual machine \"%1\"'s process has unexpectedly terminated with exit code %2." -msgstr "" +msgstr "Proces maszyny wirtualnej „%1” zakończył się nieoczekiwanie z kodem błędu %2." msgid "The system will not be added." -msgstr "" +msgstr "System nie będzie dodany." msgid "&Update mouse every CPU frame" -msgstr "" +msgstr "Aktualizuj &mysz z każdą ramką CPU" + +msgid "Hue" +msgstr "Barwa" + +msgid "Saturation" +msgstr "Nasycenie" + +msgid "Contrast" +msgstr "Kontrast" + +msgid "Brightness" +msgstr "Jasność" + +msgid "Sharpness" +msgstr "Ostrość" + +msgid "CGA composite settings..." +msgstr "Ustawienia trybu kompozytowego CGA..." diff --git a/src/qt/languages/pt-BR.po b/src/qt/languages/pt-BR.po index acdf9681c..3c7acfe07 100644 --- a/src/qt/languages/pt-BR.po +++ b/src/qt/languages/pt-BR.po @@ -2935,4 +2935,22 @@ msgid "The system will not be added." msgstr "O sistema não será adicionado." msgid "&Update mouse every CPU frame" -msgstr "&Atualiza o estado do mouse em cada quadro do CPU" +msgstr "At&ualiza o estado do mouse em cada quadro do CPU" + +msgid "Hue" +msgstr "Matiz" + +msgid "Saturation" +msgstr "Saturação" + +msgid "Contrast" +msgstr "Contraste" + +msgid "Brightness" +msgstr "Brilho" + +msgid "Sharpness" +msgstr "Nitidez" + +msgid "CGA composite settings..." +msgstr "Configurações do modo composto CGA..." diff --git a/src/qt/languages/pt-PT.po b/src/qt/languages/pt-PT.po index 31b729499..d435e47c1 100644 --- a/src/qt/languages/pt-PT.po +++ b/src/qt/languages/pt-PT.po @@ -2212,7 +2212,7 @@ msgid "Display type" msgstr "Tipo de ecrã" msgid "Composite type" -msgstr "Tipo composto" +msgstr "Tipo compósito" msgid "True color" msgstr "Cor verdadeira" @@ -2948,3 +2948,21 @@ msgstr "&Atualiza o estado do rato em cada bloco do CPU" #~ msgid "ZIP images" #~ msgstr "Imagens ZIP" + +msgid "Hue" +msgstr "Matiz" + +msgid "Saturation" +msgstr "Saturação" + +msgid "Contrast" +msgstr "Contraste" + +msgid "Brightness" +msgstr "Brilho" + +msgid "Sharpness" +msgstr "Nitidez" + +msgid "CGA composite settings..." +msgstr "Definições do modo compósito CGA..." diff --git a/src/qt/languages/ru-RU.po b/src/qt/languages/ru-RU.po index 2cf971456..55ccfb90c 100644 --- a/src/qt/languages/ru-RU.po +++ b/src/qt/languages/ru-RU.po @@ -2937,6 +2937,24 @@ msgstr "Система не будет добавлена." msgid "&Update mouse every CPU frame" msgstr "&Обновлять мышь при каждом кадре ЦП" +msgid "Hue" +msgstr "Тон" + +msgid "Saturation" +msgstr "Насыщенность" + +msgid "Contrast" +msgstr "Контраст" + +msgid "Brightness" +msgstr "Яркость" + +msgid "Sharpness" +msgstr "Резкость" + +msgid "CGA composite settings..." +msgstr "Настройки композитного видео CGA..." + #~ msgid "HD Controller:" #~ msgstr "Контроллер HD:" @@ -2948,3 +2966,4 @@ msgstr "&Обновлять мышь при каждом кадре ЦП" #~ msgid "ZIP images" #~ msgstr "Образы ZIP" + diff --git a/src/qt/languages/sk-SK.po b/src/qt/languages/sk-SK.po index f8f761258..806ca698f 100644 --- a/src/qt/languages/sk-SK.po +++ b/src/qt/languages/sk-SK.po @@ -2937,6 +2937,24 @@ msgstr "%1 Hz" msgid "&Update mouse every CPU frame" msgstr "&Aktualizovať myš pri každom rámci CPU" +msgid "Hue" +msgstr "Odtieň" + +msgid "Saturation" +msgstr "Saturácia" + +msgid "Contrast" +msgstr "Kontrast" + +msgid "Brightness" +msgstr "Jas" + +msgid "Sharpness" +msgstr "Ostrota" + +msgid "CGA composite settings..." +msgstr "Nastavenia kompozitného režimu CGA..." + #~ msgid "HD Controller:" #~ msgstr "Radič disku:" diff --git a/src/qt/languages/sl-SI.po b/src/qt/languages/sl-SI.po index 8dff219d9..8942593a8 100644 --- a/src/qt/languages/sl-SI.po +++ b/src/qt/languages/sl-SI.po @@ -2937,6 +2937,24 @@ msgstr "Sistem ne bo dodan." msgid "&Update mouse every CPU frame" msgstr "&Posodibi stanje miške ob vsakem bloku procesorja" +msgid "Hue" +msgstr "Hue" + +msgid "Saturation" +msgstr "Nasičenost" + +msgid "Contrast" +msgstr "Kontrast" + +msgid "Brightness" +msgstr "Svetlost" + +msgid "Sharpness" +msgstr "Ostrina" + +msgid "CGA composite settings..." +msgstr "Nastavitve kompozitnega načina CGA..." + #~ msgid "HD Controller:" #~ msgstr "Krmilnik trdega diska:" diff --git a/src/qt/languages/sv-SE.po b/src/qt/languages/sv-SE.po index cf393c058..f18516230 100644 --- a/src/qt/languages/sv-SE.po +++ b/src/qt/languages/sv-SE.po @@ -2937,6 +2937,24 @@ msgstr "" msgid "&Update mouse every CPU frame" msgstr "" +msgid "Hue" +msgstr "Färgton" + +msgid "Saturation" +msgstr "Mättnad" + +msgid "Contrast" +msgstr "Kontrast" + +msgid "Brightness" +msgstr "Ljusstyrka" + +msgid "Sharpness" +msgstr "Skärpa" + +msgid "CGA composite settings..." +msgstr "Inställningar för CGA-kompositläget..." + #~ msgid "HD Controller:" #~ msgstr "Styrenhet för hårddisk:" diff --git a/src/qt/languages/tr-TR.po b/src/qt/languages/tr-TR.po index 20dafad99..66b863b73 100644 --- a/src/qt/languages/tr-TR.po +++ b/src/qt/languages/tr-TR.po @@ -2937,6 +2937,24 @@ msgstr "" msgid "&Update mouse every CPU frame" msgstr "" +msgid "Hue" +msgstr "Renk tonu" + +msgid "Saturation" +msgstr "Doygunluk" + +msgid "Contrast" +msgstr "Kontrast" + +msgid "Brightness" +msgstr "Parlaklık" + +msgid "Sharpness" +msgstr "Keskinlik" + +msgid "CGA composite settings..." +msgstr "CGA kompozit modunun ayarları..." + #~ msgid "HD Controller:" #~ msgstr "Hard Disk Denetleyicisi:" diff --git a/src/qt/languages/uk-UA.po b/src/qt/languages/uk-UA.po index cfff6b343..89e5ab4a9 100644 --- a/src/qt/languages/uk-UA.po +++ b/src/qt/languages/uk-UA.po @@ -2937,6 +2937,24 @@ msgstr "Система не буде додана." msgid "&Update mouse every CPU frame" msgstr "&Оновлювати мишу при кожному кадрі ЦП" +msgid "Hue" +msgstr "Відтінок" + +msgid "Saturation" +msgstr "Насичення" + +msgid "Contrast" +msgstr "Контраст" + +msgid "Brightness" +msgstr "Яскравість" + +msgid "Sharpness" +msgstr "Гострота" + +msgid "CGA composite settings..." +msgstr "Налаштування композитного відео CGA..." + #~ msgid "HD Controller:" #~ msgstr "Контролер HD:" diff --git a/src/qt/languages/vi-VN.po b/src/qt/languages/vi-VN.po index 18b30f3a4..1ac6f6ac2 100644 --- a/src/qt/languages/vi-VN.po +++ b/src/qt/languages/vi-VN.po @@ -2937,6 +2937,24 @@ msgstr "Hệ thống sẽ không được thêm." msgid "&Update mouse every CPU frame" msgstr "&Cập nhật chuột mỗi cỡ khung CPU" +msgid "Hue" +msgstr "Màu sắc" + +msgid "Saturation" +msgstr "Độ bão hòa" + +msgid "Contrast" +msgstr "Sự tương phản" + +msgid "Brightness" +msgstr "Độ sáng" + +msgid "Sharpness" +msgstr "Độ sắc nét" + +msgid "CGA composite settings..." +msgstr "Cài đặt chế độ tổng hợp CGA..." + #~ msgid "HD Controller:" #~ msgstr "Bộ điều khiển ổ cứng:" diff --git a/src/qt/languages/zh-CN.po b/src/qt/languages/zh-CN.po index 59f83e7a9..19c80ef89 100644 --- a/src/qt/languages/zh-CN.po +++ b/src/qt/languages/zh-CN.po @@ -2937,6 +2937,24 @@ msgstr "" msgid "&Update mouse every CPU frame" msgstr "" +msgid "Hue" +msgstr "色调" + +msgid "Saturation" +msgstr "饱和度" + +msgid "Contrast" +msgstr "对比" + +msgid "Brightness" +msgstr "亮度" + +msgid "Sharpness" +msgstr "锐度" + +msgid "CGA composite settings..." +msgstr "CGA 复合模式的设置..." + #~ msgid "HD Controller:" #~ msgstr "硬盘控制器:" diff --git a/src/qt/languages/zh-TW.po b/src/qt/languages/zh-TW.po index 7379f8aa6..e8b5fed64 100644 --- a/src/qt/languages/zh-TW.po +++ b/src/qt/languages/zh-TW.po @@ -2937,6 +2937,24 @@ msgstr "" msgid "&Update mouse every CPU frame" msgstr "" +msgid "Hue" +msgstr "色調" + +msgid "Saturation" +msgstr "飽和度" + +msgid "Contrast" +msgstr "對比" + +msgid "Brightness" +msgstr "亮度" + +msgid "Sharpness" +msgstr "銳利度" + +msgid "CGA composite settings..." +msgstr "CGA 複合模式的設定..." + #~ msgid "HD Controller:" #~ msgstr "硬碟控制器:" diff --git a/src/qt/qt_cgasettingsdialog.cpp b/src/qt/qt_cgasettingsdialog.cpp new file mode 100644 index 000000000..ee9aa86b6 --- /dev/null +++ b/src/qt/qt_cgasettingsdialog.cpp @@ -0,0 +1,94 @@ +#include "qt_cgasettingsdialog.hpp" +#include "ui_qt_cgasettingsdialog.h" + +#include + +extern "C" +{ +#include <86box/86box.h> +#include <86box/plat.h> +#include <86box/vid_cga_comp.h> +} + +CGASettingsDialog::CGASettingsDialog(QWidget *parent) + : QDialog(parent) + , ui(new Ui::CGASettingsDialog) +{ + ui->setupUi(this); + + cga_hue = vid_cga_comp_hue; + cga_saturation = vid_cga_comp_saturation; + cga_brightness = vid_cga_comp_brightness; + cga_contrast = vid_cga_comp_contrast; + cga_sharpness = vid_cga_comp_sharpness; + + ui->horizontalSliderHue->setValue(vid_cga_comp_hue); + ui->horizontalSliderSaturation->setValue(vid_cga_comp_saturation); + ui->horizontalSliderBrightness->setValue(vid_cga_comp_brightness); + ui->horizontalSliderContrast->setValue(vid_cga_comp_contrast); + ui->horizontalSliderSharpness->setValue(vid_cga_comp_sharpness); + + connect(ui->buttonBox->button(QDialogButtonBox::Apply), &QPushButton::clicked, this, &CGASettingsDialog::applySettings); + connect(ui->buttonBox->button(QDialogButtonBox::Reset), &QPushButton::clicked, this, [this] + { + ui->horizontalSliderHue->setValue(0); + ui->horizontalSliderSaturation->setValue(100); + ui->horizontalSliderBrightness->setValue(0); + ui->horizontalSliderContrast->setValue(100); + ui->horizontalSliderSharpness->setValue(0); + }); + + connect(ui->horizontalSliderHue, &QSlider::valueChanged, this, [this] { updateDisplay(); } ); + connect(ui->horizontalSliderSaturation, &QSlider::valueChanged, this, [this] { updateDisplay(); } ); + connect(ui->horizontalSliderBrightness, &QSlider::valueChanged, this, [this] { updateDisplay(); } ); + connect(ui->horizontalSliderContrast, &QSlider::valueChanged, this, [this] { updateDisplay(); } ); + connect(ui->horizontalSliderSharpness, &QSlider::valueChanged, this, [this] { updateDisplay(); } ); +} + +CGASettingsDialog::~CGASettingsDialog() +{ + delete ui; +} + +void CGASettingsDialog::updateDisplay() +{ + auto temp_cga_comp_hue = ui->horizontalSliderHue->value(); + auto temp_cga_comp_saturation = ui->horizontalSliderSaturation->value(); + auto temp_cga_comp_brightness = ui->horizontalSliderBrightness->value(); + auto temp_cga_comp_contrast = ui->horizontalSliderContrast->value(); + auto temp_cga_comp_sharpness = ui->horizontalSliderSharpness->value(); + cga_comp_reload(temp_cga_comp_brightness, temp_cga_comp_saturation, temp_cga_comp_sharpness, temp_cga_comp_hue, temp_cga_comp_contrast); +} + +void CGASettingsDialog::applySettings() +{ + vid_cga_comp_hue = ui->horizontalSliderHue->value(); + vid_cga_comp_saturation = ui->horizontalSliderSaturation->value(); + vid_cga_comp_brightness = ui->horizontalSliderBrightness->value(); + vid_cga_comp_contrast = ui->horizontalSliderContrast->value(); + vid_cga_comp_sharpness = ui->horizontalSliderSharpness->value(); + cga_comp_reload(vid_cga_comp_brightness, vid_cga_comp_saturation, vid_cga_comp_sharpness, vid_cga_comp_hue, vid_cga_comp_contrast); + + cga_hue = vid_cga_comp_hue; + cga_saturation = vid_cga_comp_saturation; + cga_brightness = vid_cga_comp_brightness; + cga_contrast = vid_cga_comp_contrast; + cga_sharpness = vid_cga_comp_sharpness; +} + +void CGASettingsDialog::on_buttonBox_accepted() +{ + applySettings(); +} + +void CGASettingsDialog::on_buttonBox_rejected() +{ + vid_cga_comp_hue = cga_hue; + vid_cga_comp_saturation = cga_saturation; + vid_cga_comp_brightness = cga_brightness; + vid_cga_comp_contrast = cga_contrast; + vid_cga_comp_sharpness = cga_sharpness; + + cga_comp_reload(vid_cga_comp_brightness, vid_cga_comp_saturation, vid_cga_comp_sharpness, vid_cga_comp_hue, vid_cga_comp_contrast); +} + diff --git a/src/qt/qt_cgasettingsdialog.hpp b/src/qt/qt_cgasettingsdialog.hpp new file mode 100644 index 000000000..e0a4e76d1 --- /dev/null +++ b/src/qt/qt_cgasettingsdialog.hpp @@ -0,0 +1,31 @@ +#ifndef QT_CGASETTINGSDIALOG_HPP +#define QT_CGASETTINGSDIALOG_HPP + +#include + +namespace Ui { +class CGASettingsDialog; +} + +class CGASettingsDialog : public QDialog { + Q_OBJECT + +public: + explicit CGASettingsDialog(QWidget *parent = nullptr); + ~CGASettingsDialog(); + +private slots: + void on_buttonBox_accepted(); + + void on_buttonBox_rejected(); + +private: + Ui::CGASettingsDialog *ui; + + void applySettings(); + void updateDisplay(); + + int cga_hue, cga_saturation, cga_sharpness, cga_brightness, cga_contrast; +}; + +#endif // QT_CGASETTINGSDIALOG_HPP diff --git a/src/qt/qt_cgasettingsdialog.ui b/src/qt/qt_cgasettingsdialog.ui new file mode 100644 index 000000000..f077869b5 --- /dev/null +++ b/src/qt/qt_cgasettingsdialog.ui @@ -0,0 +1,167 @@ + + + CGASettingsDialog + + + + 0 + 0 + 400 + 300 + + + + CGA composite settings... + + + + QLayout::SizeConstraint::SetFixedSize + + + + + -100 + + + 100 + + + Qt::Orientation::Horizontal + + + + + + + 360 + + + 100 + + + Qt::Orientation::Horizontal + + + + + + + Hue + + + + + + + -50 + + + 50 + + + Qt::Orientation::Horizontal + + + + + + + Qt::Orientation::Horizontal + + + QDialogButtonBox::StandardButton::Apply|QDialogButtonBox::StandardButton::Cancel|QDialogButtonBox::StandardButton::Ok|QDialogButtonBox::StandardButton::Reset + + + + + + + 360 + + + 100 + + + Qt::Orientation::Horizontal + + + + + + + Contrast + + + + + + + -360 + + + 360 + + + Qt::Orientation::Horizontal + + + + + + + Sharpness + + + + + + + Saturation + + + + + + + Brightness + + + + + + + + + buttonBox + accepted() + CGASettingsDialog + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + CGASettingsDialog + reject() + + + 316 + 260 + + + 286 + 274 + + + + + diff --git a/src/qt/qt_mainwindow.cpp b/src/qt/qt_mainwindow.cpp index 37208f3da..b335b3480 100644 --- a/src/qt/qt_mainwindow.cpp +++ b/src/qt/qt_mainwindow.cpp @@ -33,6 +33,8 @@ #include "qt_rendererstack.hpp" #include "qt_renderercommon.hpp" +#include "qt_cgasettingsdialog.hpp" + extern "C" { #include <86box/86box.h> #include <86box/config.h> @@ -293,6 +295,13 @@ MainWindow::MainWindow(QWidget *parent) #else ui->menuTablet_tool->menuAction()->setVisible(false); #endif + + bool enable_comp_option = false; + for (int i = 0; i < MONITORS_NUM; i++) { + if (monitors[i].mon_composite) { enable_comp_option = true; break; } + } + + ui->actionCGA_composite_settings->setEnabled(enable_comp_option); }); connect(this, &MainWindow::showMessageForNonQtThread, this, &MainWindow::showMessage_, Qt::QueuedConnection); @@ -1497,7 +1506,7 @@ MainWindow::eventFilter(QObject *receiver, QEvent *event) if (event->type() == QEvent::WindowBlocked) { window_blocked = true; curdopause = dopause; - plat_pause(isShowMessage ? 2 : 1); + plat_pause(isNonPause ? dopause : (isShowMessage ? 2 : 1)); emit setMouseCapture(false); releaseKeyboard(); } else if (event->type() == QEvent::WindowUnblocked) { @@ -1530,6 +1539,13 @@ MainWindow::refreshMediaMenu() int int_ax_kbd = machine_has_flags(machine, MACHINE_KEYBOARD_JIS) && !machine_has_bus(machine, MACHINE_BUS_PS2_PORTS); kana_label->setVisible(ext_ax_kbd || int_ax_kbd); + + bool enable_comp_option = false; + for (int i = 0; i < MONITORS_NUM; i++) { + if (monitors[i].mon_composite) { enable_comp_option = true; break; } + } + + ui->actionCGA_composite_settings->setEnabled(enable_comp_option); } void @@ -2329,3 +2345,14 @@ void MainWindow::on_actionACPI_Shutdown_triggered() { acpi_pwrbut_pressed = 1; } + +void MainWindow::on_actionCGA_composite_settings_triggered() +{ + isNonPause = true; + CGASettingsDialog dialog; + dialog.setModal(true); + dialog.exec(); + isNonPause = false; + config_save(); +} + diff --git a/src/qt/qt_mainwindow.hpp b/src/qt/qt_mainwindow.hpp index cf303eac6..22dec71f8 100644 --- a/src/qt/qt_mainwindow.hpp +++ b/src/qt/qt_mainwindow.hpp @@ -168,6 +168,8 @@ private slots: void on_actionApply_fullscreen_stretch_mode_when_maximized_triggered(bool checked); + void on_actionCGA_composite_settings_triggered(); + private: Ui::MainWindow *ui; std::unique_ptr status; @@ -204,6 +206,7 @@ private: QIcon caps_icon_off, scroll_icon_off, num_icon_off, kana_icon_off; bool isShowMessage = false; + bool isNonPause = false; bool window_blocked = false; }; diff --git a/src/qt/qt_mainwindow.ui b/src/qt/qt_mainwindow.ui index 217635b87..f4e465ca0 100644 --- a/src/qt/qt_mainwindow.ui +++ b/src/qt/qt_mainwindow.ui @@ -54,7 +54,7 @@ 0 0 724 - 23 + 21 @@ -205,6 +205,7 @@ + @@ -232,7 +233,7 @@ - Qt::PreventContextMenu + Qt::ContextMenuPolicy::PreventContextMenu toolBar @@ -244,7 +245,7 @@ false - Qt::TopToolBarArea + Qt::ToolBarArea::TopToolBarArea @@ -253,7 +254,7 @@ - Qt::ToolButtonIconOnly + Qt::ToolButtonStyle::ToolButtonIconOnly false @@ -368,7 +369,7 @@ E&xit - QAction::QuitRole + QAction::MenuRole::QuitRole @@ -380,7 +381,7 @@ &Settings... - QAction::NoRole + QAction::MenuRole::NoRole false @@ -682,7 +683,7 @@ false - QAction::AboutQtRole + QAction::MenuRole::AboutQtRole @@ -690,7 +691,7 @@ &About 86Box... - QAction::AboutRole + QAction::MenuRole::AboutRole @@ -743,7 +744,7 @@ &Preferences... - QAction::PreferencesRole + QAction::MenuRole::PreferencesRole @@ -816,7 +817,7 @@ Renderer &options... - QAction::NoRole + QAction::MenuRole::NoRole @@ -888,6 +889,11 @@ &Pen + + + CGA composite settings... + + diff --git a/src/qt/qt_platform.cpp b/src/qt/qt_platform.cpp index 5d3b76dcb..ee2e40d1d 100644 --- a/src/qt/qt_platform.cpp +++ b/src/qt/qt_platform.cpp @@ -439,6 +439,8 @@ plat_pause(int p) } if ((!!p) == dopause) { + QTimer::singleShot(0, main_window, &MainWindow::updateUiPauseState); + #ifdef Q_OS_WINDOWS if (source_hwnd) PostMessage((HWND) (uintptr_t) source_hwnd, WM_SENDSTATUS, (WPARAM) !!p, (LPARAM) (HWND) main_window->winId()); diff --git a/src/qt/qt_vmmanager_details.cpp b/src/qt/qt_vmmanager_details.cpp index d6dd814ee..56cfa8758 100644 --- a/src/qt/qt_vmmanager_details.cpp +++ b/src/qt/qt_vmmanager_details.cpp @@ -115,9 +115,12 @@ VMManagerDetails::VMManagerDetails(QWidget *parent) : } ui->ssNavTBHolder->setStyleSheet(toolButtonStyleSheet); + pauseIcon = QIcon(":/menuicons/qt/icons/pause.ico"); + runIcon = QIcon(":/menuicons/qt/icons/run.ico"); + // Experimenting startPauseButton = new QToolButton(); - startPauseButton->setIcon(QIcon(":/menuicons/qt/icons/run.ico")); + startPauseButton->setIcon(runIcon); startPauseButton->setAutoRaise(true); startPauseButton->setEnabled(false); startPauseButton->setToolTip(tr("Start")); @@ -192,10 +195,10 @@ VMManagerDetails::updateData(VMManagerSystem *passed_sysconfig) { bool running = sysconfig->getProcessStatus() == VMManagerSystem::ProcessStatus::Running || sysconfig->getProcessStatus() == VMManagerSystem::ProcessStatus::RunningWaiting; if(running) { - startPauseButton->setIcon(QIcon(":/menuicons/qt/icons/pause.ico")); + startPauseButton->setIcon(pauseIcon); connect(startPauseButton, &QToolButton::clicked, sysconfig, &VMManagerSystem::pauseButtonPressed); } else { - startPauseButton->setIcon(QIcon(":/menuicons/qt/icons/run.ico")); + startPauseButton->setIcon(runIcon); connect(startPauseButton, &QToolButton::clicked, sysconfig, &VMManagerSystem::startButtonPressed); } startPauseButton->setEnabled(true); @@ -264,20 +267,29 @@ VMManagerDetails::updateConfig(VMManagerSystem *passed_sysconfig) { // Input inputSection->clear(); - inputSection->addSection(tr("Keyboard"), passed_sysconfig->getDisplayValue(Display::Name::Keyboard)); - inputSection->addSection(tr("Mouse"), passed_sysconfig->getDisplayValue(Display::Name::Mouse)); - inputSection->addSection(tr("Joystick"), passed_sysconfig->getDisplayValue(Display::Name::Joystick)); + inputSection->addSection("Keyboard", passed_sysconfig->getDisplayValue(Display::Name::Keyboard)); + inputSection->addSection("Mouse", passed_sysconfig->getDisplayValue(Display::Name::Mouse)); + inputSection->addSection("Joystick", passed_sysconfig->getDisplayValue(Display::Name::Joystick)); // Ports portsSection->clear(); - portsSection->addSection(tr("Serial ports"), passed_sysconfig->getDisplayValue(Display::Name::Serial)); - portsSection->addSection(tr("Parallel ports"), passed_sysconfig->getDisplayValue(Display::Name::Parallel)); + portsSection->addSection("Serial ports", passed_sysconfig->getDisplayValue(Display::Name::Serial)); + portsSection->addSection("Parallel ports", passed_sysconfig->getDisplayValue(Display::Name::Parallel)); // Other devices otherSection->clear(); - otherSection->addSection(tr("ISA RTC"), passed_sysconfig->getDisplayValue(Display::Name::IsaRtc)); - otherSection->addSection(tr("ISA RAM"), passed_sysconfig->getDisplayValue(Display::Name::IsaMem)); - otherSection->addSection(tr("ISA ROM"), passed_sysconfig->getDisplayValue(Display::Name::IsaRom)); + otherSection->addSection("ISA RTC", passed_sysconfig->getDisplayValue(Display::Name::IsaRtc)); + otherSection->addSection("ISA RAM", passed_sysconfig->getDisplayValue(Display::Name::IsaMem)); + otherSection->addSection("ISA ROM", passed_sysconfig->getDisplayValue(Display::Name::IsaRom)); + + systemSection->setSections(); + videoSection->setSections(); + storageSection->setSections(); + audioSection->setSections(); + networkSection->setSections(); + inputSection->setSections(); + portsSection->setSections(); + otherSection->setSections(); } void @@ -341,10 +353,10 @@ VMManagerDetails::updateProcessStatus() { cadButton->setEnabled(running); if(running) { if(sysconfig->getProcessStatus() == VMManagerSystem::ProcessStatus::Running) { - startPauseButton->setIcon(QIcon(":/menuicons/qt/icons/pause.ico")); + startPauseButton->setIcon(pauseIcon); startPauseButton->setToolTip(tr("Pause")); } else { - startPauseButton->setIcon(QIcon(":/menuicons/qt/icons/run.ico")); + startPauseButton->setIcon(runIcon); startPauseButton->setToolTip(tr("Continue")); } @@ -352,7 +364,7 @@ VMManagerDetails::updateProcessStatus() { disconnect(startPauseButton, &QToolButton::clicked, sysconfig, &VMManagerSystem::startButtonPressed); connect(startPauseButton, &QToolButton::clicked, sysconfig, &VMManagerSystem::pauseButtonPressed); } else { - startPauseButton->setIcon(QIcon(":/menuicons/qt/icons/run.ico")); + startPauseButton->setIcon(runIcon); disconnect(startPauseButton, &QToolButton::clicked, sysconfig, &VMManagerSystem::pauseButtonPressed); disconnect(startPauseButton, &QToolButton::clicked, sysconfig, &VMManagerSystem::startButtonPressed); connect(startPauseButton, &QToolButton::clicked, sysconfig, &VMManagerSystem::startButtonPressed); diff --git a/src/qt/qt_vmmanager_details.hpp b/src/qt/qt_vmmanager_details.hpp index 2fb1a9d57..0a6c2d35a 100644 --- a/src/qt/qt_vmmanager_details.hpp +++ b/src/qt/qt_vmmanager_details.hpp @@ -68,6 +68,9 @@ private: QToolButton *configureButton; QToolButton *cadButton; + QIcon pauseIcon; + QIcon runIcon; + void updateConfig(VMManagerSystem *passed_sysconfig); void updateScreenshots(VMManagerSystem *passed_sysconfig); static QWidget* createHorizontalLine(int leftSpacing = 25, int rightSpacing = 25); diff --git a/src/qt/qt_vmmanager_detailsection.cpp b/src/qt/qt_vmmanager_detailsection.cpp index 23c940706..043342f1e 100644 --- a/src/qt/qt_vmmanager_detailsection.cpp +++ b/src/qt/qt_vmmanager_detailsection.cpp @@ -143,7 +143,6 @@ VMManagerDetailSection::addSection(const QString &name, const QString &value, Di { const auto new_section = DetailSection { name, value}; sections.push_back(new_section); - setSections(); } void @@ -154,8 +153,50 @@ VMManagerDetailSection::setupMainLayout() mainLayout = new QVBoxLayout; } void -VMManagerDetailSection::clearContentsSetupGrid() +VMManagerDetailSection::setSections() { + int row = 0; + + for (const auto& section : sections) { + QStringList sectionsToAdd = section.value.split(sectionSeparator); + QLabel *labelKey = nullptr; + + for (const auto& line : sectionsToAdd) { + if (line.isEmpty()) { + // Don't bother adding entries if the values are blank + continue; + } + + const auto labelValue = new QLabel(); + labelValue->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Preferred); + labelValue->setTextInteractionFlags(labelValue->textInteractionFlags() | Qt::TextSelectableByMouse); + labelValue->setText(line); + frameGridLayout->addWidget(labelValue, row, 1, Qt::AlignLeft); + + if (!labelKey) { + labelKey = new QLabel(); + labelKey->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred); + labelKey->setTextInteractionFlags(labelValue->textInteractionFlags()); + labelKey->setText(QCoreApplication::translate("", QString(section.name + ":").toUtf8().data())); + frameGridLayout->addWidget(labelKey, row, 0, Qt::AlignLeft); + } + + const auto hSpacer = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum); + frameGridLayout->addItem(hSpacer, row, 2); + row++; + } + } + + collapseButton->setContent(ui->detailFrame); + if (sections.size()) + setVisible(true); +} +void +VMManagerDetailSection::clear() +{ + sections.clear(); + setVisible(false); + // Clear everything out if(frameGridLayout) { while(frameGridLayout->count()) { @@ -168,76 +209,10 @@ VMManagerDetailSection::clearContentsSetupGrid() delete frameGridLayout; frameGridLayout = new QGridLayout(); - qint32 *left = nullptr, *top = nullptr, *right = nullptr, *bottom = nullptr; - frameGridLayout->getContentsMargins(left, top, right, bottom); frameGridLayout->setContentsMargins(getMargins(MarginSection::DisplayGrid)); ui->detailFrame->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); ui->detailFrame->setLayout(frameGridLayout); } -void -VMManagerDetailSection::setSections() -{ - clearContentsSetupGrid(); - int row = 0; - - - for ( const auto& section : sections) { - // if the string contains the separator (defined elsewhere) then split and - // add each entry on a new line. Otherwise, just add the one. - QStringList sectionsToAdd; - if(section.value.contains(sectionSeparator)) { - sectionsToAdd = section.value.split(sectionSeparator); - } else { - sectionsToAdd.push_back(section.value); - } - bool keyAdded = false; - for(const auto&line : sectionsToAdd) { - if(line.isEmpty()) { - // Don't bother adding entries if the values are blank - continue; - } - const auto labelKey = new QLabel(); - labelKey->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred); - const auto labelValue = new QLabel(); - labelKey->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Preferred); - labelValue->setTextInteractionFlags(labelValue->textInteractionFlags() | Qt::TextSelectableByMouse); - labelKey->setTextInteractionFlags(labelValue->textInteractionFlags() | Qt::TextSelectableByMouse); - - // Reduce the text size for the label - // First, get the existing font - auto smaller_font = labelValue->font(); - // Get a smaller size - // Not sure if I like the smaller size, back to regular for now - // auto smaller_size = 0.85 * smaller_font.pointSize(); - const auto smaller_size = 1 * smaller_font.pointSize(); - // Set the font to the smaller size - smaller_font.setPointSizeF(smaller_size); - // Assign that new, smaller font to the label - labelKey->setFont(smaller_font); - labelValue->setFont(smaller_font); - - labelKey->setText(QCoreApplication::translate("", QString(section.name + ":").toUtf8().data())); - labelValue->setText(line); - if(!keyAdded) { - frameGridLayout->addWidget(labelKey, row, 0, Qt::AlignLeft); - keyAdded = true; - } - frameGridLayout->addWidget(labelValue, row, 1, Qt::AlignLeft); - const auto hSpacer = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum); - frameGridLayout->addItem(hSpacer, row, 2); - row++; - } - } - collapseButton->setContent(ui->detailFrame); - if (sections.size()) - setVisible(true); -} -void -VMManagerDetailSection::clear() -{ - sections.clear(); - setVisible(false); -} // QT for Linux and Windows doesn't have the same default margins as QT on MacOS. // For consistency in appearance we'll have to return the margins on a per-OS basis diff --git a/src/qt/qt_vmmanager_detailsection.hpp b/src/qt/qt_vmmanager_detailsection.hpp index 7619a476c..a7da9470e 100644 --- a/src/qt/qt_vmmanager_detailsection.hpp +++ b/src/qt/qt_vmmanager_detailsection.hpp @@ -61,8 +61,10 @@ public: ~VMManagerDetailSection() override; void addSection(const QString &name, const QString &value, VMManager::Display::Name displayField = VMManager::Display::Name::Unknown); + void setSections(); void clear(); + QLabel *tableLabel; CollapseButton *collapseButton; // QGridLayout *buttonGridLayout; QGridLayout *frameGridLayout; @@ -82,7 +84,6 @@ private: void setSectionName(const QString &name); void setupMainLayout(); void clearContentsSetupGrid(); - void setSections(); static QMargins getMargins(MarginSection section); diff --git a/src/qt/qt_vmmanager_listviewdelegate.cpp b/src/qt/qt_vmmanager_listviewdelegate.cpp index 28820a044..c5bcbbdd9 100644 --- a/src/qt/qt_vmmanager_listviewdelegate.cpp +++ b/src/qt/qt_vmmanager_listviewdelegate.cpp @@ -34,6 +34,15 @@ VMManagerListViewDelegate::VMManagerListViewDelegate(QObject *parent) : QStyledItemDelegate(parent), m_ptr(new VMManagerListViewDelegateStyle) { + default_icon = QIcon(":/settings/qt/icons/86Box-gray.ico"); + stop_icon = QApplication::style()->standardIcon(QStyle::SP_MediaStop); + running_icon = QIcon(":/menuicons/qt/icons/run.ico"); + stopped_icon = QIcon(":/menuicons/qt/icons/acpi_shutdown.ico"); + paused_icon = QIcon(":/menuicons/qt/icons/pause.ico"); + unknown_icon = QApplication::style()->standardIcon(QStyle::SP_MessageBoxQuestion); + + highlight_color = QColor("#616161"); + bg_color = QColor("#272727"); } VMManagerListViewDelegate::~VMManagerListViewDelegate() @@ -56,34 +65,33 @@ void VMManagerListViewDelegate::paint(QPainter *painter, const QStyleOptionViewI -m_ptr->margins.bottom())); // The status icon represents the current state of the vm. Initially set to a default state. - QIcon status_icon = QApplication::style()->standardIcon(QStyle::SP_MediaStop); auto process_variant = index.data(VMManagerModel::Roles::ProcessStatus); auto process_status = process_variant.value(); // The main icon, configurable. Falls back to default if it cannot be loaded. - auto customIcom = index.data(VMManagerModel::Roles::Icon).toString(); - opt.icon = QIcon(":/settings/qt/icons/86Box-gray.ico"); - if(!customIcom.isEmpty()) { - if (const auto customPixmap = QPixmap(customIcom); !customPixmap.isNull()) { + auto customIcon = index.data(VMManagerModel::Roles::Icon).toString(); + opt.icon = default_icon; + if (!customIcon.isEmpty()) { + const auto customPixmap = QPixmap(customIcon); + if (!customPixmap.isNull()) opt.icon = customPixmap; - } } - // opt.icon = QIcon(":/settings/qt/icons/86Box-gray.ico"); // Set the status icon based on the process status + QIcon status_icon; switch(process_status) { case VMManagerSystem::ProcessStatus::Running: - status_icon = QIcon(":/menuicons/qt/icons/run.ico"); + status_icon = running_icon; break; case VMManagerSystem::ProcessStatus::Stopped: - status_icon = QIcon(":/menuicons/qt/icons/acpi_shutdown.ico"); + status_icon = stopped_icon; break; case VMManagerSystem::ProcessStatus::PausedWaiting: case VMManagerSystem::ProcessStatus::RunningWaiting: case VMManagerSystem::ProcessStatus::Paused: - status_icon = QIcon(":/menuicons/qt/icons/pause.ico"); + status_icon = paused_icon; break; default: - status_icon = QApplication::style()->standardIcon(QStyle::SP_MessageBoxQuestion); + status_icon = unknown_icon; } @@ -105,13 +113,13 @@ void VMManagerListViewDelegate::paint(QPainter *painter, const QStyleOptionViewI // When selected, only draw the highlighted part until the horizontal separator int offset = 2; auto highlightRect = rect.adjusted(0, 0, 0, -offset); - painter->fillRect(highlightRect, windows_light_mode ? palette.highlight().color() : QColor("#616161")); + painter->fillRect(highlightRect, windows_light_mode ? palette.highlight().color() : highlight_color); // Then fill the remainder with the normal color auto regularRect = rect.adjusted(0, rect.height()-offset, 0, 0); - painter->fillRect(regularRect, windows_light_mode ? palette.light().color() : QColor("#272727")); + painter->fillRect(regularRect, windows_light_mode ? palette.light().color() : bg_color); } else { // Otherwise just draw the background color as usual - painter->fillRect(rect, windows_light_mode ? palette.light().color() : QColor("#272727")); + painter->fillRect(rect, windows_light_mode ? palette.light().color() : bg_color); } // Draw bottom line. Last line gets a different color diff --git a/src/qt/qt_vmmanager_listviewdelegate.hpp b/src/qt/qt_vmmanager_listviewdelegate.hpp index 84325086d..9e320653b 100644 --- a/src/qt/qt_vmmanager_listviewdelegate.hpp +++ b/src/qt/qt_vmmanager_listviewdelegate.hpp @@ -63,5 +63,15 @@ public: const QModelIndex &index) const override; private: VMManagerListViewDelegateStyle *m_ptr; + + QIcon default_icon; + QIcon stop_icon; + QIcon running_icon; + QIcon stopped_icon; + QIcon paused_icon; + QIcon unknown_icon; + + QColor bg_color; + QColor highlight_color; }; #endif // QT_VMMANAGER_LISTVIEWDELEGATE_H \ No newline at end of file diff --git a/src/video/clockgen/vid_clockgen_ics2494.c b/src/video/clockgen/vid_clockgen_ics2494.c index 350a490cc..33a74fe62 100644 --- a/src/video/clockgen/vid_clockgen_ics2494.c +++ b/src/video/clockgen/vid_clockgen_ics2494.c @@ -48,6 +48,120 @@ ics2494_log(const char *fmt, ...) # define ics2494_log(fmt, ...) #endif +/* Two consecutive byte-writes are NOT allowed. Furthermore an index + * written to 0x01CE is only usable ONCE! Note also that the setting of ATI + * extended registers (especially those with clock selection bits) should be + * bracketed by a sequencer reset. + * + * Boards prior to V5 use 4 crystals. Boards V5 and later use a clock + * generator chip. V3 and V4 boards differ when it comes to choosing clock + * frequencies. + * + * VGA Wonder V3/V4 Board Clock Frequencies + * R E G I S T E R S + * 1CE(*) 3C2 3C2 Frequency + * B2h/BEh + * Bit 6/4 Bit 3 Bit 2 (MHz) + * ------- ------- ------- ------- + * 0 0 0 50.175 + * 0 0 1 56.644 + * 0 1 0 Spare 1 + * 0 1 1 44.900 + * 1 0 0 44.900 + * 1 0 1 50.175 + * 1 1 0 Spare 2 + * 1 1 1 36.000 + * + * (*): V3 uses index B2h, bit 6; V4 uses index BEh, bit 4 + * + * V5, PLUS, XL and XL24 usually have an ATI 18810 clock generator chip, but + * some have an ATI 18811-0, and it's quite conceivable that some exist with + * ATI 18811-1's or ATI 18811-2's. Mach32 boards are known to use any one of + * these clock generators. The possibilities for Mach64 boards also include + * two different flavours of the newer 18818 chips. I have yet to figure out + * how BIOS initialization sets up the board for a particular set of + * frequencies. Mach32 and Mach64 boards also use a different dot clock + * ordering. ATI says there is no reliable way for the driver to determine + * which clock generator is on the board (their BIOS's are tailored to the + * board). + * + * VGA Wonder V5/PLUS/XL/XL24 Board Clock Frequencies + * R E G I S T E R S + * 1CE 1CE 3C2 3C2 Frequency + * B9h BEh (MHz) 18811-0 18811-1 + * Bit 1 Bit 4 Bit 3 Bit 2 18810 18812-0 18811-2 18818-? 18818-? + * ------- ------- ------- ------- ------- ------- ------- ------- ------- + * 0 0 0 0 30.240 30.240 135.000 (*3) (*3) + * 0 0 0 1 32.000 32.000 32.000 110.000 110.000 + * 0 0 1 0 37.500 110.000 110.000 126.000 126.000 + * 0 0 1 1 39.000 80.000 80.000 135.000 135.000 + * 0 1 0 0 42.954 42.954 100.000 50.350 25.175 + * 0 1 0 1 48.771 48.771 126.000 56.644 28.322 + * 0 1 1 0 (*1) 92.400 92.400 63.000 31.500 + * 0 1 1 1 36.000 36.000 36.000 72.000 36.000 + * 1 0 0 0 40.000 39.910 39.910 (*3) (*3) + * 1 0 0 1 56.644 44.900 44.900 80.000 80.000 + * 1 0 1 0 75.000 75.000 75.000 75.000 75.000 + * 1 0 1 1 65.000 65.000 65.000 65.000 65.000 + * 1 1 0 0 50.350 50.350 50.350 40.000 40.000 + * 1 1 0 1 56.640 56.640 56.640 44.900 44.900 + * 1 1 1 0 (*2) (*3) (*3) 49.500 49.500 + * 1 1 1 1 44.900 44.900 44.900 50.000 50.000 + * + * (*1) External 0 (supposedly 16.657 Mhz) + * (*2) External 1 (supposedly 28.322 MHz) + * (*3) This setting doesn't seem to generate anything + * + * Mach32 and Mach64 Board Clock Frequencies + * R E G I S T E R S + * 1CE 1CE 3C2 3C2 Frequency + * B9h BEh (MHz) 18811-0 18811-1 + * Bit 1 Bit 4 Bit 3 Bit 2 18810 18812-0 18811-2 18818-? 18818-? + * ------- ------- ------- ------- ------- ------- ------- ------- ------- + * 0 0 0 0 42.954 42.954 100.000 50.350 25.175 + * 0 0 0 1 48.771 48.771 126.000 56.644 28.322 + * 0 0 1 0 (*1) 92.400 92.400 63.000 31.500 + * 0 0 1 1 36.000 36.000 36.000 72.000 36.000 + * 0 1 0 0 30.240 30.240 135.000 (*3) (*3) + * 0 1 0 1 32.000 32.000 32.000 110.000 110.000 + * 0 1 1 0 37.500 110.000 110.000 126.000 126.000 + * 0 1 1 1 39.000 80.000 80.000 135.000 135.000 + * 1 0 0 0 50.350 50.350 50.350 40.000 40.000 + * 1 0 0 1 56.640 56.640 56.640 44.900 44.900 + * 1 0 1 0 (*2) (*3) (*3) 49.500 49.500 + * 1 0 1 1 44.900 44.900 44.900 50.000 50.000 + * 1 1 0 0 40.000 39.910 39.910 (*3) (*3) + * 1 1 0 1 56.644 44.900 44.900 80.000 80.000 + * 1 1 1 0 75.000 75.000 75.000 75.000 75.000 + * 1 1 1 1 65.000 65.000 65.000 65.000 65.000 + * + * (*1) External 0 (supposedly 16.657 Mhz) + * (*2) External 1 (supposedly 28.322 MHz) + * (*3) This setting doesn't seem to generate anything + * + * Note that, to reduce confusion, this driver masks out the different clock + * ordering. + * + * For all boards, these frequencies can be divided by 1, 2, 3 or 4. + * + * Register 1CE, index B8h + * Bit 7 Bit 6 + * ------- ------- + * 0 0 Divide by 1 + * 0 1 Divide by 2 + * 1 0 Divide by 3 + * 1 1 Divide by 4 + * + * There is some question as to whether or not bit 1 of index 0xB9 can + * be used for clock selection on a V4 board. This driver makes it + * available only if the "undocumented_clocks" option (itself + * undocumented :-)) is specified in XF86Config. + * + * Also it appears that bit 0 of index 0xB9 can also be used for clock + * selection on some boards. It is also only available under XF86Config + * option "undocumented_clocks". + */ + float ics2494_getclock(int clock, void *priv) { @@ -56,7 +170,6 @@ ics2494_getclock(int clock, void *priv) if (clock > 15) clock = 15; - ics2494_log("Clock=%d, freq=%f.\n", clock, ics2494->freq[clock]); return ics2494->freq[clock]; } @@ -67,62 +180,116 @@ ics2494_init(const device_t *info) memset(ics2494, 0, sizeof(ics2494_t)); switch (info->local) { - case 10: + case 0: /* ATI 18810 for ATI 28800 */ - ics2494->freq[0x0] = 42954000.0; - ics2494->freq[0x1] = 48771000.0; - ics2494->freq[0x2] = 0.0; - ics2494->freq[0x3] = 36000000.0; - ics2494->freq[0x4] = 50350000.0; - ics2494->freq[0x5] = 56640000.0; - ics2494->freq[0x6] = 0.0; - ics2494->freq[0x7] = 44900000.0; - ics2494->freq[0x8] = 30240000.0; - ics2494->freq[0x9] = 32000000.0; - ics2494->freq[0xa] = 37500000.0; - ics2494->freq[0xb] = 39000000.0; - ics2494->freq[0xc] = 40000000.0; - ics2494->freq[0xd] = 56644000.0; - ics2494->freq[0xe] = 75000000.0; - ics2494->freq[0xf] = 65000000.0; + ics2494->freq[0] = 30240000.0; + ics2494->freq[1] = 32000000.0; + ics2494->freq[2] = 37500000.0; + ics2494->freq[3] = 39000000.0; + ics2494->freq[4] = 42954000.0; + ics2494->freq[5] = 48771000.0; + ics2494->freq[6] = 0.0; + ics2494->freq[7] = 36000000.0; + ics2494->freq[8] = 40000000.0; + ics2494->freq[9] = 56644000.0; + ics2494->freq[10] = 75000000.0; + ics2494->freq[11] = 65000000.0; + ics2494->freq[12] = 50350000.0; + ics2494->freq[13] = 56640000.0; + ics2494->freq[14] = 0.0; + ics2494->freq[15] = 44900000.0; break; - case 110: - /* ATI 18811-0 for ATI Mach32 */ - ics2494->freq[0x0] = 42954000.0; - ics2494->freq[0x1] = 48771000.0; - ics2494->freq[0x2] = 92400000.0; - ics2494->freq[0x3] = 36000000.0; - ics2494->freq[0x4] = 50350000.0; - ics2494->freq[0x5] = 56640000.0; - ics2494->freq[0x6] = 0.0; - ics2494->freq[0x7] = 44900000.0; - ics2494->freq[0x8] = 30240000.0; - ics2494->freq[0x9] = 32000000.0; - ics2494->freq[0xa] = 110000000.0; - ics2494->freq[0xb] = 80000000.0; - ics2494->freq[0xc] = 39910000.0; - ics2494->freq[0xd] = 44900000.0; - ics2494->freq[0xe] = 75000000.0; - ics2494->freq[0xf] = 65000000.0; + case 1: + /* ATI 18811-0/ATI 18812-0 for ATI 28800 */ + ics2494->freq[0] = 42950000.0; + ics2494->freq[1] = 48770000.0; + ics2494->freq[2] = 92400000.0; + ics2494->freq[3] = 36000000.0; + ics2494->freq[4] = 50350000.0; + ics2494->freq[5] = 56640000.0; + ics2494->freq[7] = 44900000.0; + ics2494->freq[8] = 30240000.0; + ics2494->freq[9] = 32000000.0; + ics2494->freq[10] = 110000000.0; + ics2494->freq[11] = 80000000.0; + ics2494->freq[12] = 39910000.0; + ics2494->freq[13] = 44900000.0; + ics2494->freq[14] = 75000000.0; + ics2494->freq[15] = 65000000.0; break; - case 111: - /* ATI 18811-1 for ATI Mach32 MCA */ - ics2494->freq[0x0] = 100000000.0; - ics2494->freq[0x1] = 126000000.0; - ics2494->freq[0x2] = 92400000.0; - ics2494->freq[0x3] = 36000000.0; - ics2494->freq[0x4] = 50350000.0; - ics2494->freq[0x5] = 56640000.0; - ics2494->freq[0x6] = 0.0; - ics2494->freq[0x7] = 44900000.0; - ics2494->freq[0x8] = 135000000.0; - ics2494->freq[0x9] = 32000000.0; - ics2494->freq[0xa] = 110000000.0; - ics2494->freq[0xb] = 80000000.0; - ics2494->freq[0xc] = 39910000.0; - ics2494->freq[0xd] = 44900000.0; - ics2494->freq[0xe] = 75000000.0; - ics2494->freq[0xf] = 65000000.0; + case 2: + /* ATI 18811-1/ATI 18811-2 for ATI 28800 */ + ics2494->freq[0] = 100000000.0; + ics2494->freq[1] = 126000000.0; + ics2494->freq[2] = 92400000.0; + ics2494->freq[3] = 36000000.0; + ics2494->freq[4] = 50350000.0; + ics2494->freq[5] = 56640000.0; + ics2494->freq[7] = 44900000.0; + ics2494->freq[8] = 135000000.0; + ics2494->freq[9] = 32000000.0; + ics2494->freq[10] = 110000000.0; + ics2494->freq[11] = 80000000.0; + ics2494->freq[12] = 39910000.0; + ics2494->freq[13] = 44900000.0; + ics2494->freq[14] = 75000000.0; + ics2494->freq[15] = 65000000.0; + break; + case 100: + /* ATI 18810 for ATI Mach32 */ + ics2494->freq[0] = 42954000.0; + ics2494->freq[1] = 48771000.0; + ics2494->freq[2] = 0.0; + ics2494->freq[3] = 36000000.0; + ics2494->freq[4] = 30240000.0; + ics2494->freq[5] = 32000000.0; + ics2494->freq[6] = 37500000.0; + ics2494->freq[7] = 39000000.0; + ics2494->freq[8] = 50350000.0; + ics2494->freq[9] = 56640000.0; + ics2494->freq[10] = 0.0; + ics2494->freq[11] = 44900000.0; + ics2494->freq[12] = 40000000.0; + ics2494->freq[13] = 56644000.0; + ics2494->freq[14] = 75000000.0; + ics2494->freq[15] = 65000000.0; + break; + case 101: + /* ATI 18811-0/ATI 18812-0 for ATI Mach32 */ + ics2494->freq[0] = 42954000.0; + ics2494->freq[1] = 48771000.0; + ics2494->freq[2] = 92400000.0; + ics2494->freq[3] = 36000000.0; + ics2494->freq[4] = 30240000.0; + ics2494->freq[5] = 32000000.0; + ics2494->freq[6] = 110000000.0; + ics2494->freq[7] = 80000000.0; + ics2494->freq[8] = 50350000.0; + ics2494->freq[9] = 56640000.0; + ics2494->freq[10] = 0.0; + ics2494->freq[11] = 44900000.0; + ics2494->freq[12] = 39910000.0; + ics2494->freq[13] = 44900000.0; + ics2494->freq[14] = 75000000.0; + ics2494->freq[15] = 65000000.0; + break; + case 102: + /* ATI 18811-1/ATI 18811-2 for ATI Mach32 */ + ics2494->freq[0] = 100000000.0; + ics2494->freq[1] = 126000000.0; + ics2494->freq[2] = 92400000.0; + ics2494->freq[3] = 36000000.0; + ics2494->freq[4] = 50350000.0; + ics2494->freq[5] = 56640000.0; + ics2494->freq[7] = 44900000.0; + ics2494->freq[8] = 135000000.0; + ics2494->freq[9] = 32000000.0; + ics2494->freq[10] = 110000000.0; + ics2494->freq[11] = 80000000.0; + ics2494->freq[12] = 39910000.0; + ics2494->freq[13] = 44900000.0; + ics2494->freq[14] = 75000000.0; + ics2494->freq[15] = 65000000.0; break; case 305: /* ICS2494A(N)-205 for S3 86C924 */ @@ -174,11 +341,11 @@ const device_t ics2494an_305_device = { .config = NULL }; -const device_t ati18810_device = { - .name = "ATI 18810 Clock Generator", - .internal_name = "ati18810", +const device_t ati18810_28800_device = { + .name = "ATI 18810 (ATI 28800) Clock Generator", + .internal_name = "ati18810_28800", .flags = 0, - .local = 10, + .local = 0, .init = ics2494_init, .close = ics2494_close, .reset = NULL, @@ -188,11 +355,11 @@ const device_t ati18810_device = { .config = NULL }; -const device_t ati18811_0_device = { - .name = "ATI 18811-0 Clock Generator", - .internal_name = "ati18811_0", +const device_t ati18811_0_28800_device = { + .name = "ATI 18811-0 (ATI 28800) Clock Generator", + .internal_name = "ati18811_0_28800", .flags = 0, - .local = 110, + .local = 1, .init = ics2494_init, .close = ics2494_close, .reset = NULL, @@ -202,11 +369,53 @@ const device_t ati18811_0_device = { .config = NULL }; -const device_t ati18811_1_device = { - .name = "ATI 18811-1 Clock Generator", - .internal_name = "ati18811_1", +const device_t ati18811_1_28800_device = { + .name = "ATI 18811-1 (ATI 28800) Clock Generator", + .internal_name = "ati18811_1_28800", .flags = 0, - .local = 111, + .local = 2, + .init = ics2494_init, + .close = ics2494_close, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +}; + +const device_t ati18810_mach32_device = { + .name = "ATI 18810 (ATI Mach32) Clock Generator", + .internal_name = "ati18810_mach32", + .flags = 0, + .local = 100, + .init = ics2494_init, + .close = ics2494_close, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +}; + +const device_t ati18811_0_mach32_device = { + .name = "ATI 18811-0 (ATI Mach32) Clock Generator", + .internal_name = "ati18811_0_mach32", + .flags = 0, + .local = 101, + .init = ics2494_init, + .close = ics2494_close, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = NULL +}; + +const device_t ati18811_1_mach32_device = { + .name = "ATI 18811-1 (ATI Mach32) Clock Generator", + .internal_name = "ati18811_1_mach32", + .flags = 0, + .local = 102, .init = ics2494_init, .close = ics2494_close, .reset = NULL, diff --git a/src/video/vid_ati18800.c b/src/video/vid_ati18800.c index 9c87746c6..11124a35b 100644 --- a/src/video/vid_ati18800.c +++ b/src/video/vid_ati18800.c @@ -269,7 +269,7 @@ ati18800_init(const device_t *info) ati18800_in, ati18800_out, NULL, NULL); - ati18800->svga.clock_gen = device_add(&ati18810_device); + ati18800->svga.clock_gen = device_add(&ati18810_28800_device); ati18800->svga.getclock = ics2494_getclock; io_sethandler(0x01ce, 0x0002, ati18800_in, NULL, NULL, ati18800_out, NULL, NULL, ati18800); diff --git a/src/video/vid_ati28800.c b/src/video/vid_ati28800.c index 284abe78c..205d934ee 100644 --- a/src/video/vid_ati28800.c +++ b/src/video/vid_ati28800.c @@ -407,13 +407,23 @@ static void ati28800_recalctimings(svga_t *svga) { ati28800_t *ati28800 = (ati28800_t *) svga->priv; - int clock_sel; + int clock_sel = 0x00; if (ati28800->regs[0xad] & 0x08) svga->hblankstart = ((ati28800->regs[0x0d] >> 2) << 8) + svga->crtc[2]; - clock_sel = ((svga->miscout >> 2) & 3) | ((ati28800->regs[0xbe] & 0x10) >> 1) | - ((ati28800->regs[0xb9] & 2) << 1); + if (svga->miscout & 0x04) + clock_sel |= 0x01; + if (svga->miscout & 0x08) + clock_sel |= 0x02; + if (ati28800->regs[0xb9] & 0x02) + clock_sel |= 0x04; + if (ati28800->regs[0xbe] & 0x10) + clock_sel |= 0x08; + + svga->interlace = !!(ati28800->regs[0xbe] & 0x02); + if (svga->interlace) + svga->dispend >>= 1; if (ati28800->regs[0xa3] & 0x10) svga->memaddr_latch |= 0x10000; @@ -452,9 +462,25 @@ ati28800_recalctimings(svga_t *svga) } else svga->ati_4color = 0; - if (!svga->scrblank && (svga->crtc[0x17] & 0x80) && svga->attr_palette_enable) { + if (!svga->scrblank && svga->attr_palette_enable) { + svga->clock = (cpuclock * (double) (1ULL << 32)) / svga->getclock(clock_sel ^ 0x08, svga->clock_gen); + + switch ((ati28800->regs[0xb8] >> 6) & 3) { + case 0: + default: + break; + case 1: + svga->clock *= 2.0; + break; + case 2: + svga->clock *= 3.0; + break; + case 3: + svga->clock *= 4.0; + break; + } + if ((svga->gdcreg[6] & 1) || (svga->attrregs[0x10] & 1)) { - svga->clock = (cpuclock * (double) (1ULL << 32)) / svga->getclock(clock_sel, svga->clock_gen); ati28800_log("SEQREG1 bit 3=%x. gdcreg5 bits 5-6=%02x, 4bit pel=%02x, " "planar 16color=%02x, apa mode=%02x, attregs10 bit 7=%02x.\n", svga->seqregs[1] & 8, svga->gdcreg[5] & 0x60, @@ -568,7 +594,7 @@ ati28800k_init(const device_t *info) ati28800k_in, ati28800k_out, NULL, NULL); - ati28800->svga.clock_gen = device_add(&ati18810_device); + ati28800->svga.clock_gen = device_add(&ati18811_1_28800_device); ati28800->svga.getclock = ics2494_getclock; io_sethandler(0x01ce, 0x0002, ati28800k_in, NULL, NULL, ati28800k_out, NULL, NULL, ati28800); @@ -646,7 +672,7 @@ ati28800_init(const device_t *info) ati28800_in, ati28800_out, NULL, NULL); - ati28800->svga.clock_gen = device_add(&ati18810_device); + ati28800->svga.clock_gen = device_add(&ati18811_1_28800_device); ati28800->svga.getclock = ics2494_getclock; io_sethandler(0x01ce, 2, diff --git a/src/video/vid_ati_mach8.c b/src/video/vid_ati_mach8.c index c34ec5514..63b5d02ca 100644 --- a/src/video/vid_ati_mach8.c +++ b/src/video/vid_ati_mach8.c @@ -2431,6 +2431,11 @@ mach_out(uint16_t addr, uint8_t val, void *priv) svga_out(addr, val, svga); return; + case 0x3C2: + if (mach->regs[0xb8] & 0x08) + return; + break; + case 0x3C6: case 0x3C7: case 0x3C8: @@ -2465,10 +2470,56 @@ mach_out(uint16_t addr, uint8_t val, void *priv) case 0x3D5: if (svga->crtcreg & 0x20) return; - if ((svga->crtcreg < 7) && (svga->crtc[0x11] & 0x80) && !(mach->regs[0xb4] & 0x80)) + if ((svga->crtcreg < 7) && ((svga->crtc[0x11] & 0x80) || (mach->regs[0xb4] & 0x40)) && !(mach->regs[0xb4] & 0x80)) return; - if ((svga->crtcreg == 7) && (svga->crtc[0x11] & 0x80) && !(mach->regs[0xb4] & 0x80)) + if ((svga->crtcreg == 7) && ((svga->crtc[0x11] & 0x80) || (mach->regs[0xb4] & 0x40)) && !(mach->regs[0xb4] & 0x80)) val = (svga->crtc[7] & ~0x10) | (val & 0x10); + if (mach->regs[0xb8] & 0x04) { + if ((svga->crtcreg < 0x0a) && (svga->crtcreg > 0x0d)) + return; + } + if (mach->regs[0xb4] & 0x04) { + if (svga->crtcreg == 9) { + if (val & 0x8f) + return; + } + } + if (mach->regs[0xb4] & 0x08) { + if (svga->crtcreg == 6) + return; + if (svga->crtcreg == 7) { + if (val & 0xaf) + return; + } + if (svga->crtcreg == 9) { + if (val & 0x20) + return; + } + if (svga->crtcreg == 0x11) { + if (val & 0x0f) + return; + } + if ((svga->crtcreg == 0x10) || + (svga->crtcreg == 0x12) || + (svga->crtcreg == 0x15) || + (svga->crtcreg == 0x16)) + return; + } + if (mach->regs[0xb4] & 0x10) { + if ((svga->crtcreg == 0x0a) || + (svga->crtcreg == 0x0b)) + return; + } + if (mach->regs[0xb4] & 0x20) { + if (svga->crtcreg == 8) { + if (val & 0x7f) + return; + } + if (svga->crtcreg == 0x14) { + if (val & 0x1f) + return; + } + } old = svga->crtc[svga->crtcreg]; svga->crtc[svga->crtcreg] = val; @@ -2726,28 +2777,82 @@ mach_set_resolution(mach_t *mach, svga_t *svga) dev->v_syncstart = 0x0601; mach->accel.clock_sel_mode = 0; - mach_log("ATI Mode: set=%02x, dispcntl=%02x, h_total=%d, hdisp=%d, vdisp=%d, v_total=%04x, v_syncstart=%04x, hsync_start=%d, hsync_width=%d, clocksel=%02x, advancedcntl=%02x.\n", mach->shadow_set & 0x03, dev->disp_cntl, dev->h_total, dev->hdisp, dev->vdisp, dev->v_total, dev->v_syncstart, dev->hsync_start, dev->hsync_width, mach->accel.clock_sel & 0xff, dev->accel.advfunc_cntl & 0x05); if ((dev->disp_cntl_2 >> 5) == 1) { /*Enable the 8514/A subsystem and set modes according to the shadow sets if needed.*/ switch (mach->shadow_set & 0x03) { case 0x01: if (!(dev->accel.advfunc_cntl & 0x04)) { - dev->h_total = 0x64; dev->hdisp = 640; dev->vdisp = 480; - dev->v_total = 0x0419; - dev->v_syncstart = 0x03d7; - mach->accel.clock_sel_mode = 0x50; + mach_log("Mach: EEPROM 640x480: %04x.\n", mach->eeprom.data[7]); + switch (mach->eeprom.data[7] & 0xff) { + case 0x00: /*640x480 60Hz Non-interlaced*/ + default: + dev->h_total = 0x64; + dev->v_total = 0x0419; + dev->v_syncstart = 0x03d7; + mach->accel.clock_sel_mode = 0x50; + break; + case 0x01: /*640x480 72Hz Non-interlaced*/ + dev->h_total = 0x6a; + dev->v_total = 0x040c; + dev->v_syncstart = 0x03d1; + mach->accel.clock_sel_mode = 0x24; + break; + case 0x03: /*640x480 72Hz Non-interlaced Alt*/ + dev->h_total = 0x71; + dev->v_total = 0x04ca; + dev->v_syncstart = 0x0422; + mach->accel.clock_sel_mode = 0x6c; + break; + } } break; case 0x02: if (dev->accel.advfunc_cntl & 0x04) { - dev->h_total = 0x9e; dev->hdisp = 1024; dev->vdisp = 768; - dev->v_total = 0x0669; - dev->v_syncstart = 0x0601; - mach->accel.clock_sel_mode = 0x1c; + mach_log("Mach: EEPROM 1024x768: %04x.\n", mach->eeprom.data[9]); + switch (mach->eeprom.data[9] & 0xff) { + case 0x00: /*1024x768 76Hz Non-interlaced*/ + dev->h_total = 0xa3; + dev->v_total = 0x064b; + dev->v_syncstart = 0x060c; + mach->accel.clock_sel_mode = 0x2c; + break; + + case 0x01: /*1024x768 87Hz Interlaced*/ + default: + dev->h_total = 0x9e; + dev->v_total = 0x0669; + dev->v_syncstart = 0x0601; + mach->accel.clock_sel_mode = 0x1c; + break; + case 0x02: /*1024x768 60Hz Non-interlaced*/ + dev->h_total = 0xa8; + dev->v_total = 0x064a; + dev->v_syncstart = 0x0603; + mach->accel.clock_sel_mode = 0x3c; + break; + case 0x04: /*1024x768 70Hz Non-interlaced*/ + dev->h_total = 0xa6; + dev->v_total = 0x064a; + dev->v_syncstart = 0x0603; + mach->accel.clock_sel_mode = 0x38; + break; + case 0x08: /*1024x768 72Hz Non-interlaced*/ + dev->h_total = 0xa1; + dev->v_total = 0x064a; + dev->v_syncstart = 0x0603; + mach->accel.clock_sel_mode = 0x38; + break; + case 0x82: /*1024x768 66Hz Non-interlaced*/ + dev->h_total = 0xac; + dev->v_total = 0x065c; + dev->v_syncstart = 0x060b; + mach->accel.clock_sel_mode = 0x38; + break; + } } break; @@ -2758,22 +2863,76 @@ mach_set_resolution(mach_t *mach, svga_t *svga) } else if ((dev->disp_cntl_2 >> 5) == 2) { /*Reset 8514/A to defaults if needed.*/ if (dev->accel.advfunc_cntl & 0x04) { if (dev->hdisp == 640) { - dev->h_total = 0x9e; dev->hdisp = 1024; dev->vdisp = 768; - dev->v_total = 0x0669; - dev->v_syncstart = 0x0601; - mach->accel.clock_sel_mode = 0x1c; + mach_log("Mach Reset: EEPROM 1024x768: %04x.\n", mach->eeprom.data[9]); + switch (mach->eeprom.data[9] & 0xff) { + case 0x00: /*1024x768 76Hz Non-interlaced*/ + dev->h_total = 0xa3; + dev->v_total = 0x064b; + dev->v_syncstart = 0x060c; + mach->accel.clock_sel_mode = 0x2c; + break; + case 0x01: /*1024x768 87Hz Interlaced*/ + default: + dev->h_total = 0x9e; + dev->v_total = 0x0669; + dev->v_syncstart = 0x0601; + mach->accel.clock_sel_mode = 0x1c; + break; + case 0x02: /*1024x768 60Hz Non-interlaced*/ + dev->h_total = 0xa8; + dev->v_total = 0x064a; + dev->v_syncstart = 0x0603; + mach->accel.clock_sel_mode = 0x3c; + break; + case 0x04: /*1024x768 70Hz Non-interlaced*/ + dev->h_total = 0xa6; + dev->v_total = 0x064a; + dev->v_syncstart = 0x0603; + mach->accel.clock_sel_mode = 0x38; + break; + case 0x08: /*1024x768 72Hz Non-interlaced*/ + dev->h_total = 0xa1; + dev->v_total = 0x064a; + dev->v_syncstart = 0x0603; + mach->accel.clock_sel_mode = 0x38; + break; + case 0x82: /*1024x768 66Hz Non-interlaced*/ + dev->h_total = 0xac; + dev->v_total = 0x065c; + dev->v_syncstart = 0x060b; + mach->accel.clock_sel_mode = 0x38; + break; + } svga_recalctimings(svga); } } else { if (dev->hdisp == 1024) { - dev->h_total = 0x64; dev->hdisp = 640; dev->vdisp = 480; - dev->v_total = 0x0419; - dev->v_syncstart = 0x03d7; - mach->accel.clock_sel_mode = 0x50; + mach_log("Mach Reset: EEPROM 640x480: %04x.\n", mach->eeprom.data[7]); + switch (mach->eeprom.data[7] & 0xff) { + case 0x00: /*640x480 60Hz Non-interlaced*/ + default: + dev->h_total = 0x64; + dev->v_total = 0x0419; + dev->v_syncstart = 0x03d7; + mach->accel.clock_sel_mode = 0x50; + break; + case 0x01: /*640x480 72Hz Non-interlaced*/ + dev->h_total = 0x6a; + dev->v_total = 0x040c; + dev->v_syncstart = 0x03d1; + mach->accel.clock_sel_mode = 0x24; + break; + case 0x03: /*640x480 72Hz Non-interlaced Alt*/ + dev->h_total = 0x71; + dev->v_total = 0x04ca; + dev->v_syncstart = 0x0422; + mach->accel.clock_sel_mode = 0x6c; + break; + } svga_recalctimings(svga); } } @@ -2797,14 +2956,29 @@ ati8514_recalctimings(svga_t *svga) dev->accel.ge_offset = (mach->accel.ge_offset_lo | (mach->accel.ge_offset_hi << 16)) << 2; mach->accel.crt_offset = (mach->accel.crt_offset_lo | (mach->accel.crt_offset_hi << 16)) << 2; - if (mach->accel.clock_sel_mode == 0x1c) { - dev->interlace = 1; - _8514_modes = 1; - } else if (mach->accel.clock_sel_mode == 0x50) { - dev->interlace = 0; - _8514_modes = 2; + switch (mach->accel.clock_sel_mode) { + case 0x1c: + dev->interlace = 1; + _8514_modes = 1; + break; + case 0x24: + case 0x2c: + case 0x38: + case 0x3c: + case 0x50: + case 0x6c: + dev->interlace = 0; + _8514_modes = 2; + break; + default: + break; } + if (_8514_modes) + dev->ven_clock = mach->accel.clock_sel_mode & 0x7c; + else + dev->ven_clock = mach->accel.clock_sel & 0x7c; + dev->accel.ge_offset -= mach->accel.crt_offset; mach_log("HDISP=%d, VDISP=%d, shadowset=%x, 8514/A mode=%x, clocksel=%02x.\n", @@ -2826,22 +3000,14 @@ ati8514_recalctimings(svga_t *svga) else if (dev->h_disp == 640) dev->dispend = 480; - dev->h_disp_time = dev->hdisp >> 3; + dev->h_disp_time = dev->h_disp >> 3; - if (_8514_modes) { - svga->clock_8514 = (cpuclock * (double) (1ULL << 32)) / svga->getclock8514((mach->accel.clock_sel_mode >> 2) & 0x0f, svga->clock_gen8514) / 2; - if (mach->accel.clock_sel_mode & 0x40) - svga->clock_8514 *= 2; - } else { - svga->clock_8514 = (cpuclock * (double) (1ULL << 32)) / svga->getclock8514((mach->accel.clock_sel >> 2) & 0x0f, svga->clock_gen8514) / 2; - if (mach->accel.clock_sel & 0x40) - svga->clock_8514 *= 2; - } + svga->clock_8514 = (cpuclock * (double) (1ULL << 32)) / svga->getclock8514((dev->ven_clock >> 2) & 0x0f, svga->clock_gen8514) / 2.0; + if ((((dev->ven_clock >> 2) & 0x0f) == 0x09) && (dev->h_total == 0x6b)) + svga->clock_8514 /= 2.0; - if (dev->interlace) { + if (dev->interlace) dev->dispend >>= 1; - svga->clock_8514 /= 2; - } mach_log("cntl=%d, hv(%d,%d), pitch=%d, rowoffset=%d, gextconfig=%03x, shadow=%x interlace=%d.\n", dev->accel.advfunc_cntl & 0x04, dev->h_disp, dev->dispend, dev->pitch, dev->rowoffset, @@ -2864,13 +3030,24 @@ mach_recalctimings(svga_t *svga) { mach_t *mach = (mach_t *) svga->priv; ibm8514_t *dev = (ibm8514_t *) svga->dev8514; - int clock_sel; + int clock_sel = 0x00; int _8514_modes = 0; if (mach->regs[0xad] & 0x08) svga->hblankstart = ((mach->regs[0x0d] >> 2) << 8) + svga->crtc[2]; - clock_sel = ((svga->miscout >> 2) & 3) | ((mach->regs[0xbe] & 0x10) >> 1) | ((mach->regs[0xb9] & 2) << 1); + if (svga->miscout & 0x04) + clock_sel |= 0x01; + if (svga->miscout & 0x08) + clock_sel |= 0x02; + if (mach->regs[0xb9] & 0x02) + clock_sel |= 0x04; + if (mach->regs[0xbe] & 0x10) + clock_sel |= 0x08; + + svga->interlace = !!(mach->regs[0xbe] & 0x02); + if (svga->interlace) + svga->dispend >>= 1; if (ATI_MACH32) { if (mach->regs[0xad] & 0x04) @@ -2911,11 +3088,8 @@ mach_recalctimings(svga_t *svga) svga->ati_4color = 0; } - svga->interlace = !!(mach->regs[0xbe] & 0x02); - if (svga->interlace) - svga->dispend >>= 1; - mach_log("ON=%d, override=%d, gelo=%04x, gehi=%04x, crtlo=%04x, crthi=%04x, vgahdisp=%d.\n", dev->on, svga->override, mach->accel.ge_offset_lo, mach->accel.ge_offset_hi, mach->accel.crt_offset_lo, mach->accel.crt_offset_hi, svga->hdisp); + if (dev->on) { dev->memaddr_latch = 0; /*(mach->accel.crt_offset_lo | (mach->accel.crt_offset_hi << 16)) << 2;*/ dev->interlace = !!(dev->disp_cntl & 0x10); @@ -2925,14 +3099,41 @@ mach_recalctimings(svga_t *svga) dev->accel.ge_offset = (mach->accel.ge_offset_lo | (mach->accel.ge_offset_hi << 16)); mach->accel.crt_offset = (mach->accel.crt_offset_lo | (mach->accel.crt_offset_hi << 16)); - if (mach->accel.clock_sel_mode == 0x1c) { - dev->interlace = 1; - _8514_modes = 1; - } else if (mach->accel.clock_sel_mode == 0x50) { - dev->interlace = 0; - _8514_modes = 2; + switch (mach->accel.clock_sel_mode) { + case 0x1c: + dev->interlace = 1; + _8514_modes = 1; + break; + case 0x24: + case 0x2c: + case 0x38: + case 0x3c: + case 0x50: + case 0x6c: + dev->interlace = 0; + _8514_modes = 2; + break; + default: + break; } + if (_8514_modes) + dev->ven_clock = mach->accel.clock_sel_mode & 0x7c; + else + dev->ven_clock = mach->accel.clock_sel & 0x7c; + + if (ATI_MACH32) { + mach_log("Mach32: Clock=%02x, double=%02x, h_total=%02x.\n", (dev->ven_clock >> 2) & 0x0f, dev->ven_clock & 0x40, dev->h_total); + svga->clock_8514 = (cpuclock * (double) (1ULL << 32)) / svga->getclock8514((dev->ven_clock >> 2) & 0x0f, svga->clock_gen8514) / 2.0; + } else { + mach_log("Mach8: Clock=%02x, double=%02x, h_total=%02x, selmode=%02x.\n", (dev->ven_clock >> 2) & 0x0f, dev->ven_clock & 0x40, dev->h_total, mach->accel.clock_sel_mode); + svga->clock_8514 = (cpuclock * (double) (1ULL << 32)) / svga->getclock8514((dev->ven_clock >> 2) & 0x0f, svga->clock_gen8514) / 2.0; + if ((((dev->ven_clock >> 2) & 0x0f) == 0x09) && (dev->h_total == 0x6b)) + svga->clock_8514 /= 2.0; + } + if (dev->ven_clock & 0x40) + svga->clock_8514 *= 2.0; + if (dev->bpp) { dev->accel.ge_offset <<= 1; mach->accel.crt_offset <<= 1; @@ -2956,31 +3157,19 @@ mach_recalctimings(svga_t *svga) dev->h_disp = dev->hdisp; dev->dispend = dev->vdisp; if (dev->dispend == 959) { /*FIXME: vertical resolution mess on EEPROM tests on Mach8*/ - dev->dispend >>= 1; dev->dispend++; + dev->dispend >>= 1; } else if (dev->dispend == 600) dev->h_disp = 800; else if (dev->h_disp == 640) dev->dispend = 480; - dev->h_disp_time = dev->hdisp >> 3; + dev->h_disp_time = dev->h_disp >> 3; - if (_8514_modes) { - svga->clock_8514 = (cpuclock * (double) (1ULL << 32)) / svga->getclock((mach->accel.clock_sel_mode >> 2) & 0x0f, svga->clock_gen) / 2; - if (mach->accel.clock_sel_mode & 0x40) - svga->clock_8514 *= 2; - } else { - svga->clock_8514 = (cpuclock * (double) (1ULL << 32)) / svga->getclock((mach->accel.clock_sel >> 2) & 0x0f, svga->clock_gen) / 2; - if (mach->accel.clock_sel & 0x40) - svga->clock_8514 *= 2; - } + mach_log("8514/A modes=%d, clocksel=%02x, clkselmode=%02x, divide reg ibm=%02x, divide reg vga=%02x, vgainterlace=%x, interlace=%x, htotal=%02x.\n", _8514_modes, mach->accel.clock_sel & 0xfe, mach->accel.clock_sel_mode & 0xfe, mach->accel.clock_sel & 0x40, mach->regs[0xb8] & 0x40, svga->interlace, dev->interlace, dev->htotal); - mach_log("8514/A clock sel=%x, divide reg ibm=%02x, divide reg vga=%02x, vgainterlace=%x, interlace=%x.\n", clock_sel, mach->accel.clock_sel & 0x40, mach->regs[0xb8] & 0xc0, svga->interlace, dev->interlace); - - if (dev->interlace) { + if (dev->interlace) dev->dispend >>= 1; - svga->clock_8514 /= 2; - } if (ATI_MACH32) { switch ((mach->shadow_set >> 8) & 0x03) { @@ -3104,33 +3293,30 @@ mach_recalctimings(svga_t *svga) } } else { dev->mode = VGA_MODE; - if (!svga->scrblank && (svga->crtc[0x17] & 0x80) && svga->attr_palette_enable) { + if (!svga->scrblank && svga->attr_palette_enable) { mach_log("GDCREG5=%02x, ATTR10=%02x, ATI B0 bit 5=%02x, ON=%d.\n", svga->gdcreg[5] & 0x60, svga->attrregs[0x10] & 0x40, mach->regs[0xb0] & 0x20, dev->on); - svga->clock = (cpuclock * (double) (1ULL << 32)) / svga->getclock(clock_sel, svga->clock_gen); - mach_log("VGA clock sel=%x, divide reg=%02x.\n", clock_sel, mach->regs[0xb8] & 0xc0); - if (svga->interlace) - svga->clock /= 2; + if (ATI_MACH32) + svga->clock = (cpuclock * (double) (1ULL << 32)) / svga->getclock(clock_sel, svga->clock_gen); + else + svga->clock = (cpuclock * (double) (1ULL << 32)) / svga->getclock(clock_sel ^ 0x08, svga->clock_gen); - if (ATI_MACH32) { - if (mach->regs[0xb8] & 0x40) - svga->clock *= 2; - } else { - switch (mach->regs[0xb8] & 0xc0) { - case 0x40: - svga->clock *= 2; - break; - case 0x80: - svga->clock *= 3; - break; - case 0xc0: - svga->clock *= 4; - break; - - default: - break; - } + switch ((mach->regs[0xb8] >> 6) & 3) { + case 0: + default: + break; + case 1: + svga->clock *= 2.0; + break; + case 2: + svga->clock *= 3.0; + break; + case 3: + svga->clock *= 4.0; + break; } + + mach_log("VGA clock sel=%02x, divide reg=%02x, miscout bits2-3=%x, machregbe bit4=%02x, machregb9 bit1=%02x, charwidth=%d, htotal=%02x, hdisptime=%02x, seqregs1 bit 3=%02x.\n", clock_sel, (mach->regs[0xb8] >> 6) & 3, svga->miscout & 0x0c, mach->regs[0xbe] & 0x10, mach->regs[0xb9] & 0x02, svga->char_width, svga->htotal, svga->hdisp_time, svga->seqregs[1] & 8); if ((svga->gdcreg[6] & 0x01) || (svga->attrregs[0x10] & 0x01)) { if ((svga->gdcreg[5] & 0x40) || (svga->attrregs[0x10] & 0x40) || (mach->regs[0xb0] & 0x20)) { svga->map8 = svga->pallook; @@ -6376,7 +6562,7 @@ mach32_hwcursor_draw(svga_t *svga, int displine) case 8: color0 = dev->pallook[mach->cursor_col_0]; color1 = dev->pallook[mach->cursor_col_1]; - mach_log("4/8BPP: Color0=%08x, Color1=%08x.\n", color0, color1); + mach_log("4/8BPP: Color0=%08x, Color1=%08x, interlace=%x, oddeven=%d.\n", color0, color1, dev->interlace, dev->hwcursor_oddeven); break; case 15: color0 = video_15to32[((mach->ext_cur_col_0_r << 16) | (mach->ext_cur_col_0_g << 8) | mach->cursor_col_0) & 0xffff]; @@ -7196,7 +7382,7 @@ mach8_init(const device_t *info) else mach->config1 |= 0x0c; mach->config1 |= 0x0400; - svga->clock_gen = device_add(&ati18811_1_device); + svga->clock_gen = device_add(&ati18811_1_mach32_device); } else if (mach->mca_bus) { video_inform(VIDEO_FLAG_TYPE_8514, &timing_mach32_mca); if (is286 && !is386) @@ -7204,7 +7390,7 @@ mach8_init(const device_t *info) else mach->config1 |= 0x06; mach->config1 |= 0x0400; - svga->clock_gen = device_add(&ati18811_1_device); + svga->clock_gen = device_add(&ati18811_1_mach32_device); } else if (mach->pci_bus) { video_inform(VIDEO_FLAG_TYPE_8514, &timing_mach32_pci); mach->config1 |= 0x0e; @@ -7213,11 +7399,11 @@ mach8_init(const device_t *info) else mach->config1 |= 0x0400; mach->config2 |= 0x2000; - svga->clock_gen = device_add(&ati18811_1_device); + svga->clock_gen = device_add(&ati18811_1_mach32_device); } else { video_inform(VIDEO_FLAG_TYPE_8514, &timing_gfxultra_isa); mach->config1 |= 0x0400; - svga->clock_gen = device_add(&ati18811_1_device); + svga->clock_gen = device_add(&ati18811_1_mach32_device); } mem_mapping_add(&mach->mmio_linear_mapping, 0, 0, mach32_ap_readb, mach32_ap_readw, mach32_ap_readl, mach32_ap_writeb, mach32_ap_writew, mach32_ap_writel, NULL, MEM_MAPPING_EXTERNAL, mach); mem_mapping_disable(&mach->mmio_linear_mapping); @@ -7239,10 +7425,12 @@ mach8_init(const device_t *info) mach->config1 |= 0x20; mach->config2 = 0x02; - svga->clock_gen = device_add(&ati18811_0_device); + svga->clock_gen = device_add(&ati18811_1_mach32_device); } dev->bpp = 0; svga->getclock = ics2494_getclock; + svga->clock_gen8514 = svga->clock_gen; + svga->getclock8514 = svga->getclock; dev->on = 0; dev->pitch = 1024; @@ -7341,7 +7529,7 @@ ati8514_init(svga_t *svga, void *ext8514, void *dev8514) dev->accel_out_fifo = ati8514_accel_out_fifo; dev->vblank_start = ati8514_vblank_start; - svga->clock_gen8514 = device_add(&ati18811_0_device); + svga->clock_gen8514 = device_add(&ati18811_1_mach32_device); svga->getclock8514 = ics2494_getclock; } diff --git a/src/video/vid_cga.c b/src/video/vid_cga.c index 1ca742890..01870ae94 100644 --- a/src/video/vid_cga.c +++ b/src/video/vid_cga.c @@ -788,6 +788,8 @@ cga_standalone_init(UNUSED(const device_t *info)) break; } + monitors[monitor_index_global].mon_composite = !!cga->composite; + return cga; } diff --git a/src/video/vid_cga_colorplus.c b/src/video/vid_cga_colorplus.c index 84d7a2af3..15d53d543 100644 --- a/src/video/vid_cga_colorplus.c +++ b/src/video/vid_cga_colorplus.c @@ -361,6 +361,8 @@ colorplus_standalone_init(UNUSED(const device_t *info)) lpt_port_setup(colorplus->lpt, LPT_MDA_ADDR); lpt_set_3bc_used(1); + monitors[monitor_index_global].mon_composite = colorplus->cga.composite; + return colorplus; } diff --git a/src/video/vid_cga_comp.c b/src/video/vid_cga_comp.c index ca9c2c9df..a316f79fb 100644 --- a/src/video/vid_cga_comp.c +++ b/src/video/vid_cga_comp.c @@ -28,9 +28,12 @@ #include <86box/mem.h> #include <86box/vid_cga.h> #include <86box/vid_cga_comp.h> +#include <86box/thread.h> int CGA_Composite_Table[1024]; +static mutex_t* cga_comp_mutex = NULL; + static double brightness = 0; static double contrast = 100; static double saturation = 100; @@ -69,23 +72,30 @@ static double intensity[4] = { #define NEW_CGA(c, i, r, g, b) (((c) / 0.72) * 0.29 + ((i) / 0.28) * 0.32 + ((r) / 0.28) * 0.1 + ((g) / 0.28) * 0.22 + ((b) / 0.28) * 0.07) -double mode_brightness; -double mode_contrast; -double mode_hue; -double min_v; -double max_v; +volatile double mode_brightness; +volatile double mode_contrast; +volatile double mode_hue; +volatile double min_v; +volatile double max_v; -double video_ri; -double video_rq; -double video_gi; -double video_gq; -double video_bi; -double video_bq; -int video_sharpness; -int tandy_mode_control = 0; +volatile double video_ri; +volatile double video_rq; +volatile double video_gi; +volatile double video_gq; +volatile double video_bi; +volatile double video_bq; +volatile int video_sharpness; static bool new_cga = 0; +static uint8_t current_cgamode = 0; + +int vid_cga_comp_brightness = 0; +int vid_cga_comp_sharpness = 0; +int vid_cga_comp_hue = 0; +int vid_cga_comp_saturation = 100; +int vid_cga_comp_contrast = 100; + void update_cga16_color(uint8_t cgamode) { @@ -109,6 +119,14 @@ update_cga16_color(uint8_t cgamode) static const double bi = -1.1069; static const double bq = 1.7046; + if (!cga_comp_mutex) + cga_comp_mutex = thread_create_mutex(); + + if (is_cpu_thread) + thread_wait_mutex(cga_comp_mutex); + + current_cgamode = cgamode; + if (!new_cga) { min_v = chroma_multiplexer[0] + intensity[0]; max_v = chroma_multiplexer[255] + intensity[3]; @@ -170,6 +188,9 @@ update_cga16_color(uint8_t cgamode) video_bi = (int) (bi * iq_adjust_i + bq * iq_adjust_q); video_bq = (int) (-bi * iq_adjust_q + bq * iq_adjust_i); video_sharpness = (int) (sharpness * 256 / 100); + + if (is_cpu_thread) + thread_release_mutex(cga_comp_mutex); } static uint8_t @@ -369,17 +390,41 @@ DecreaseSharpness(uint8_t cgamode) update_cga16_color(cgamode); } +void +cga_comp_reload(int new_brightness, int new_saturation, int new_sharpness, int new_hue, int new_contrast) +{ + if (!cga_comp_mutex) + cga_comp_mutex = thread_create_mutex(); + + if (!is_cpu_thread) + thread_wait_mutex(cga_comp_mutex); + + brightness = new_brightness; + contrast = new_contrast; + saturation = new_saturation; + sharpness = new_sharpness; + hue_offset = new_hue; + + update_cga16_color(current_cgamode); + + if (!is_cpu_thread) + thread_release_mutex(cga_comp_mutex); +} + void cga_comp_init(int revision) { + if (!cga_comp_mutex) + cga_comp_mutex = thread_create_mutex(); + new_cga = revision; /* Making sure this gets reset after reset. */ - brightness = 0; - contrast = 100; - saturation = 100; - sharpness = 0; - hue_offset = 0; + brightness = vid_cga_comp_brightness; + contrast = vid_cga_comp_contrast; + saturation = vid_cga_comp_saturation; + sharpness = vid_cga_comp_sharpness; + hue_offset = vid_cga_comp_hue; update_cga16_color(0); } diff --git a/src/video/vid_cga_compaq.c b/src/video/vid_cga_compaq.c index 1e21d63c1..81b063248 100644 --- a/src/video/vid_cga_compaq.c +++ b/src/video/vid_cga_compaq.c @@ -457,6 +457,8 @@ compaq_cga_init(const device_t *info) dev->crtc[9] = 13; + monitors[monitor_index_global].mon_composite = !!dev->composite; + return dev; } diff --git a/src/video/vid_cga_quadcolor.c b/src/video/vid_cga_quadcolor.c index 642391679..4159dc2c1 100644 --- a/src/video/vid_cga_quadcolor.c +++ b/src/video/vid_cga_quadcolor.c @@ -838,6 +838,8 @@ quadcolor_standalone_init(UNUSED(const device_t *info)) break; } + monitors[monitor_index_global].mon_composite = !!quadcolor->composite; + return quadcolor; } diff --git a/src/video/vid_cga_v6355.c b/src/video/vid_cga_v6355.c index c95a96739..bdd4b82e6 100644 --- a/src/video/vid_cga_v6355.c +++ b/src/video/vid_cga_v6355.c @@ -1055,6 +1055,8 @@ v6355_standalone_init(const device_t *info) { break; } + monitors[monitor_index_global].mon_composite = (v6355->display_type == V6355_COMPOSITE); + return v6355; } diff --git a/src/video/vid_pcjr.c b/src/video/vid_pcjr.c index b4a2d24db..6cdc5b783 100644 --- a/src/video/vid_pcjr.c +++ b/src/video/vid_pcjr.c @@ -719,4 +719,6 @@ pcjr_vid_init(pcjr_t *pcjr) else cga_palette = (display_type << 1); cgapal_rebuild(); + + monitors[monitor_index_global].mon_composite = !!pcjr->composite; } diff --git a/src/video/vid_table.c b/src/video/vid_table.c index 6d3e70832..61cf5a04c 100644 --- a/src/video/vid_table.c +++ b/src/video/vid_table.c @@ -334,6 +334,7 @@ video_prepare(void) video_inform_monitor(VIDEO_FLAG_TYPE_SPECIAL, &timing_default, i); monitors[i].mon_interlace = 0; + monitors[i].mon_composite = 0; } } diff --git a/src/video/vid_tandy.c b/src/video/vid_tandy.c index 7d9b5af1a..53c5b0dfd 100644 --- a/src/video/vid_tandy.c +++ b/src/video/vid_tandy.c @@ -762,6 +762,8 @@ tandy_vid_init(tandy_t *dev) tandy_vid_in, NULL, NULL, tandy_vid_out, NULL, NULL, dev); dev->vid = vid; + + monitors[monitor_index_global].mon_composite = !!vid->composite; } const device_config_t vid_config[] = {