From c5c93ab90b92bb21971a79be29c2a5d205c807d0 Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Mon, 20 Oct 2025 23:43:58 -0400 Subject: [PATCH 01/27] Fix duplicate messages warning for QT builds --- src/qt/languages/86box.pot | 3 --- src/qt/languages/cs-CZ.po | 3 --- src/qt/languages/de-DE.po | 3 --- src/qt/languages/es-ES.po | 3 --- src/qt/languages/fi-FI.po | 3 --- src/qt/languages/fr-FR.po | 3 --- src/qt/languages/hr-HR.po | 3 --- src/qt/languages/it-IT.po | 3 --- src/qt/languages/ja-JP.po | 3 --- src/qt/languages/ko-KR.po | 3 --- src/qt/languages/nb-NO.po | 3 --- src/qt/languages/nl-NL.po | 3 --- src/qt/languages/pl-PL.po | 3 --- src/qt/languages/pt-BR.po | 3 --- src/qt/languages/pt-PT.po | 3 --- src/qt/languages/ru-RU.po | 3 --- src/qt/languages/sk-SK.po | 3 --- src/qt/languages/sl-SI.po | 3 --- src/qt/languages/sv-SE.po | 3 --- src/qt/languages/tr-TR.po | 3 --- src/qt/languages/uk-UA.po | 3 --- src/qt/languages/vi-VN.po | 3 --- src/qt/languages/zh-CN.po | 3 --- src/qt/languages/zh-TW.po | 3 --- 24 files changed, 72 deletions(-) diff --git a/src/qt/languages/86box.pot b/src/qt/languages/86box.pot index fd935ffc5..42aab9108 100644 --- a/src/qt/languages/86box.pot +++ b/src/qt/languages/86box.pot @@ -3063,9 +3063,6 @@ msgstr "" msgid "Color scheme" msgstr "" -msgid "System" -msgstr "" - msgid "Light" msgstr "" diff --git a/src/qt/languages/cs-CZ.po b/src/qt/languages/cs-CZ.po index 1aa30bdeb..6f210c9d8 100644 --- a/src/qt/languages/cs-CZ.po +++ b/src/qt/languages/cs-CZ.po @@ -3063,9 +3063,6 @@ msgstr "Režim roztažení vstupu OpenGL" msgid "Color scheme" msgstr "Barevné schéma" -msgid "System" -msgstr "" - msgid "Light" msgstr "Světlé" diff --git a/src/qt/languages/de-DE.po b/src/qt/languages/de-DE.po index ed479ab13..8ecd7a003 100644 --- a/src/qt/languages/de-DE.po +++ b/src/qt/languages/de-DE.po @@ -3063,9 +3063,6 @@ msgstr "Eingabestreckungsmodus von OpenGL" msgid "Color scheme" msgstr "Farbschema" -msgid "System" -msgstr "" - msgid "Light" msgstr "Licht" diff --git a/src/qt/languages/es-ES.po b/src/qt/languages/es-ES.po index bcf5a0026..4d00016b2 100644 --- a/src/qt/languages/es-ES.po +++ b/src/qt/languages/es-ES.po @@ -3063,9 +3063,6 @@ msgstr "Modo de estiramiento de entrada de OpenGL" msgid "Color scheme" msgstr "Esquema de colores" -msgid "System" -msgstr "" - msgid "Light" msgstr "Luz" diff --git a/src/qt/languages/fi-FI.po b/src/qt/languages/fi-FI.po index 96b1c03aa..e36559c19 100644 --- a/src/qt/languages/fi-FI.po +++ b/src/qt/languages/fi-FI.po @@ -3063,9 +3063,6 @@ msgstr "OpenGL-syötteen venytystila" msgid "Color scheme" msgstr "Väriteema" -msgid "System" -msgstr "" - msgid "Light" msgstr "Vaalea" diff --git a/src/qt/languages/fr-FR.po b/src/qt/languages/fr-FR.po index 928666268..3c5905f46 100644 --- a/src/qt/languages/fr-FR.po +++ b/src/qt/languages/fr-FR.po @@ -3063,9 +3063,6 @@ msgstr "Mode d'étirement des données d'entrée d'OpenGL" msgid "Color scheme" msgstr "Palette de couleurs" -msgid "System" -msgstr "" - msgid "Light" msgstr "Lumière" diff --git a/src/qt/languages/hr-HR.po b/src/qt/languages/hr-HR.po index b0f5a352e..5d03a6773 100644 --- a/src/qt/languages/hr-HR.po +++ b/src/qt/languages/hr-HR.po @@ -3063,9 +3063,6 @@ msgstr "Način rastezanja ulaza u OpenGL-u" msgid "Color scheme" msgstr "Shema boja" -msgid "System" -msgstr "" - msgid "Light" msgstr "Svjetlo" diff --git a/src/qt/languages/it-IT.po b/src/qt/languages/it-IT.po index 7e08cf1c5..b0ef54fdf 100644 --- a/src/qt/languages/it-IT.po +++ b/src/qt/languages/it-IT.po @@ -3063,9 +3063,6 @@ msgstr "Modalità adattamento ingresso OpenGL" msgid "Color scheme" msgstr "Modalità colori" -msgid "System" -msgstr "" - msgid "Light" msgstr "Chiara" diff --git a/src/qt/languages/ja-JP.po b/src/qt/languages/ja-JP.po index 7cb67e505..2953997df 100644 --- a/src/qt/languages/ja-JP.po +++ b/src/qt/languages/ja-JP.po @@ -3063,9 +3063,6 @@ msgstr "OpenGLの入力ストレッチモード" msgid "Color scheme" msgstr "配色" -msgid "System" -msgstr "" - msgid "Light" msgstr "光" diff --git a/src/qt/languages/ko-KR.po b/src/qt/languages/ko-KR.po index dea008ad8..49e407568 100644 --- a/src/qt/languages/ko-KR.po +++ b/src/qt/languages/ko-KR.po @@ -3063,9 +3063,6 @@ msgstr "OpenGL 입력 스트레치 모드" msgid "Color scheme" msgstr "색상 구성" -msgid "System" -msgstr "" - msgid "Light" msgstr "빛" diff --git a/src/qt/languages/nb-NO.po b/src/qt/languages/nb-NO.po index db70b8842..69591c4c1 100644 --- a/src/qt/languages/nb-NO.po +++ b/src/qt/languages/nb-NO.po @@ -3063,9 +3063,6 @@ msgstr "Inngangsstrekkmodus for OpenGL" msgid "Color scheme" msgstr "Fargevalg" -msgid "System" -msgstr "" - msgid "Light" msgstr "Lys" diff --git a/src/qt/languages/nl-NL.po b/src/qt/languages/nl-NL.po index deb53176c..cce10e564 100644 --- a/src/qt/languages/nl-NL.po +++ b/src/qt/languages/nl-NL.po @@ -3063,9 +3063,6 @@ msgstr "Input stretch-modus van OpenGL" msgid "Color scheme" msgstr "Kleurenschema" -msgid "System" -msgstr "" - msgid "Light" msgstr "Licht" diff --git a/src/qt/languages/pl-PL.po b/src/qt/languages/pl-PL.po index 643957399..9b4e20136 100644 --- a/src/qt/languages/pl-PL.po +++ b/src/qt/languages/pl-PL.po @@ -3063,9 +3063,6 @@ msgstr "Tryb rozciągania wejściowego OpenGL" msgid "Color scheme" msgstr "Schemat kolorów" -msgid "System" -msgstr "" - msgid "Light" msgstr "Światło" diff --git a/src/qt/languages/pt-BR.po b/src/qt/languages/pt-BR.po index 0f9b81277..31b401fa8 100644 --- a/src/qt/languages/pt-BR.po +++ b/src/qt/languages/pt-BR.po @@ -3063,9 +3063,6 @@ msgstr "Modo de expansão de entrada do OpenGL" msgid "Color scheme" msgstr "Esquema de cores" -msgid "System" -msgstr "" - msgid "Light" msgstr "Claro" diff --git a/src/qt/languages/pt-PT.po b/src/qt/languages/pt-PT.po index 9cc796af4..75aa4498e 100644 --- a/src/qt/languages/pt-PT.po +++ b/src/qt/languages/pt-PT.po @@ -3063,9 +3063,6 @@ msgstr "Modo de expansão de entrada do OpenGL" msgid "Color scheme" msgstr "Esquema de cores" -msgid "System" -msgstr "" - msgid "Light" msgstr "Claro" diff --git a/src/qt/languages/ru-RU.po b/src/qt/languages/ru-RU.po index cd0c70e51..24f49da45 100644 --- a/src/qt/languages/ru-RU.po +++ b/src/qt/languages/ru-RU.po @@ -3063,9 +3063,6 @@ msgstr "Режим растяжения ввода OpenGL" msgid "Color scheme" msgstr "Цветовая схема" -msgid "System" -msgstr "" - msgid "Light" msgstr "Светлая" diff --git a/src/qt/languages/sk-SK.po b/src/qt/languages/sk-SK.po index c0230ea6d..7363fd459 100644 --- a/src/qt/languages/sk-SK.po +++ b/src/qt/languages/sk-SK.po @@ -3063,9 +3063,6 @@ msgstr "Režim rozťahovania vstupu OpenGL" msgid "Color scheme" msgstr "Farebná schéma" -msgid "System" -msgstr "" - msgid "Light" msgstr "Svetlo" diff --git a/src/qt/languages/sl-SI.po b/src/qt/languages/sl-SI.po index 81026fe06..3567aaa1a 100644 --- a/src/qt/languages/sl-SI.po +++ b/src/qt/languages/sl-SI.po @@ -3063,9 +3063,6 @@ msgstr "Način raztezanja vhoda OpenGL" msgid "Color scheme" msgstr "Barvna shema" -msgid "System" -msgstr "" - msgid "Light" msgstr "Svetloba" diff --git a/src/qt/languages/sv-SE.po b/src/qt/languages/sv-SE.po index a04c58265..a65ded997 100644 --- a/src/qt/languages/sv-SE.po +++ b/src/qt/languages/sv-SE.po @@ -3063,9 +3063,6 @@ msgstr "Inmatningssträckningsläge för OpenGL" msgid "Color scheme" msgstr "Färgschema" -msgid "System" -msgstr "" - msgid "Light" msgstr "Ljus" diff --git a/src/qt/languages/tr-TR.po b/src/qt/languages/tr-TR.po index 43f52d394..759a8a4a2 100644 --- a/src/qt/languages/tr-TR.po +++ b/src/qt/languages/tr-TR.po @@ -3063,9 +3063,6 @@ msgstr "OpenGL'nin giriş germe modu" msgid "Color scheme" msgstr "Renk şeması" -msgid "System" -msgstr "" - msgid "Light" msgstr "Işık" diff --git a/src/qt/languages/uk-UA.po b/src/qt/languages/uk-UA.po index 473030341..0bca925fb 100644 --- a/src/qt/languages/uk-UA.po +++ b/src/qt/languages/uk-UA.po @@ -3063,9 +3063,6 @@ msgstr "Режим розтягування вхідних даних OpenGL" msgid "Color scheme" msgstr "Колірна гамма" -msgid "System" -msgstr "" - msgid "Light" msgstr "Світло" diff --git a/src/qt/languages/vi-VN.po b/src/qt/languages/vi-VN.po index 41f6d056e..e178a256c 100644 --- a/src/qt/languages/vi-VN.po +++ b/src/qt/languages/vi-VN.po @@ -3063,9 +3063,6 @@ msgstr "Chế độ kéo giãn đầu vào của OpenGL" msgid "Color scheme" msgstr "Bảng màu" -msgid "System" -msgstr "" - msgid "Light" msgstr "Ánh sáng" diff --git a/src/qt/languages/zh-CN.po b/src/qt/languages/zh-CN.po index 0014af5cd..f973a9512 100644 --- a/src/qt/languages/zh-CN.po +++ b/src/qt/languages/zh-CN.po @@ -3063,9 +3063,6 @@ msgstr "OpenGL的输入拉伸模式" msgid "Color scheme" msgstr "配色方案" -msgid "System" -msgstr "" - msgid "Light" msgstr "亮色" diff --git a/src/qt/languages/zh-TW.po b/src/qt/languages/zh-TW.po index 94b0c2918..675c3f517 100644 --- a/src/qt/languages/zh-TW.po +++ b/src/qt/languages/zh-TW.po @@ -3063,9 +3063,6 @@ msgstr "OpenGL 的輸入拉伸模式" msgid "Color scheme" msgstr "配色方案" -msgid "System" -msgstr "" - msgid "Light" msgstr "亮色" From cff55b210ce90bb800cdcfcf7b23e61c74fe3875 Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Mon, 20 Oct 2025 23:46:23 -0400 Subject: [PATCH 02/27] Fix more compile warnings --- src/machine/m_at_socket7_3v.c | 4 ++-- src/utils/crc32.c | 4 +++- src/video/vid_ddc_edid_custom.c | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/machine/m_at_socket7_3v.c b/src/machine/m_at_socket7_3v.c index 69d37229f..264a220fc 100644 --- a/src/machine/m_at_socket7_3v.c +++ b/src/machine/m_at_socket7_3v.c @@ -280,8 +280,8 @@ machine_at_vectra500mt_init(const machine_t *model) if (bios_only || !ret) return ret; - machine_at_common_init_ex(model, 2); - + machine_at_common_init_ex(model, 2); + pci_init(PCI_CONFIG_TYPE_1); pci_register_slot(0x00, PCI_CARD_NORTHBRIDGE, 0, 0, 0, 0); pci_register_slot(0x0F, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); diff --git a/src/utils/crc32.c b/src/utils/crc32.c index 6993654ae..a8d5dde26 100644 --- a/src/utils/crc32.c +++ b/src/utils/crc32.c @@ -22,7 +22,9 @@ #include #include -#define __USE_LARGEFILE64 +#ifndef __USE_LARGEFILE64 +#define __USE_LARGEFILE64 1 +#endif #include #if (defined(__HAIKU__) || defined(__unix__) || defined(__APPLE__)) && !defined(__linux__) diff --git a/src/video/vid_ddc_edid_custom.c b/src/video/vid_ddc_edid_custom.c index 4442fac10..ae427d7de 100644 --- a/src/video/vid_ddc_edid_custom.c +++ b/src/video/vid_ddc_edid_custom.c @@ -64,7 +64,7 @@ ddc_load_edid(char *path, uint8_t *buf, size_t size) // Check the beginning of the file for the EDID header. uint64_t header; - fread(&header, sizeof(header), 1, fp); + (void) !fread(&header, sizeof(header), 1, fp); if (header == EDID_HEADER) { // Binary format. Read as is From 24d524fa31f73a41f2c5ba23e8226cd420134790 Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Sun, 12 Oct 2025 23:25:50 -0400 Subject: [PATCH 03/27] Correct formatting in machine_table.c --- src/machine/machine_table.c | 424 ++++++++++++++++++------------------ 1 file changed, 212 insertions(+), 212 deletions(-) diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index 47fb21303..efb1a31ed 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -12432,47 +12432,47 @@ const machine_t machines[] = { .net_device = NULL }, { - .name = "[i430FX] IBM PC 3x0 (type 65x6) (Morrison64)", - .internal_name = "pc330_65x6", - .type = MACHINE_TYPE_SOCKET5, - .chipset = MACHINE_CHIPSET_INTEL_430FX, - .init = machine_at_pc330_65x6_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i430FX] IBM PC 3x0 (type 65x6) (Morrison64)", + .internal_name = "pc330_65x6", + .type = MACHINE_TYPE_SOCKET5, + .chipset = MACHINE_CHIPSET_INTEL_430FX, + .init = machine_at_pc330_65x6_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET5_7, - .block = CPU_BLOCK(CPU_K5, CPU_5K86, CPU_Cx6x86), - .min_bus = 50000000, - .max_bus = 66666667, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK(CPU_K5, CPU_5K86, CPU_Cx6x86), + .min_bus = 50000000, + .max_bus = 66666667, .min_voltage = 3380, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 2.0 + .min_multi = 1.5, + .max_multi = 2.0 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_VIDEO | MACHINE_APM, - .ram = { - .min = 8192, - .max = 131072, + .flags = MACHINE_IDE_DUAL | MACHINE_VIDEO | MACHINE_APM, + .ram = { + .min = 8192, + .max = 131072, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .nvrmask = 255, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, .default_jumpered_ecp_dma = 3, - .kbc_device = NULL, - .kbc_params = 0x00000000, - .kbc_p1 = 0x000044f0, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = &s3_phoenix_trio64_onboard_pci_device, - .snd_device = NULL, - .net_device = NULL + .kbc_device = NULL, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000044f0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = &s3_phoenix_trio64_onboard_pci_device, + .snd_device = NULL, + .net_device = NULL }, /* According to tests from real hardware: This has AMI MegaKey KBC firmware on the PC87306 Super I/O chip, command 0xA1 returns '5'. @@ -13040,27 +13040,27 @@ const machine_t machines[] = { .max_multi = 2.0 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_VIDEO, - .ram = { + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_VIDEO, + .ram = { .min = 4096, .max = 131072, .step = 4096 }, - .nvrmask = 127, - .jumpered_ecp_dma = MACHINE_DMA_USE_CONFIG, + .nvrmask = 127, + .jumpered_ecp_dma = MACHINE_DMA_USE_CONFIG, .default_jumpered_ecp_dma = -1, - .kbc_device = &kbc_at_device, - .kbc_params = KBC_VEN_PHOENIX | 0x00021400, /* Guess */ - .kbc_p1 = 0x00000cf0, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = &gd5434_onboard_pci_device, - .snd_device = NULL, - .net_device = NULL + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_PHOENIX | 0x00021400, /* Guess */ + .kbc_p1 = 0x00000cf0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = &gd5434_onboard_pci_device, + .snd_device = NULL, + .net_device = NULL }, /* Has a VIA KBC chip */ { @@ -13084,27 +13084,27 @@ const machine_t machines[] = { .max_multi = 2.0 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM, - .ram = { + .flags = MACHINE_IDE_DUAL | MACHINE_APM, + .ram = { .min = 4096, .max = 262144, .step = 4096 }, - .nvrmask = 127, - .jumpered_ecp_dma = MACHINE_DMA_1 | MACHINE_DMA_3, + .nvrmask = 127, + .jumpered_ecp_dma = MACHINE_DMA_1 | MACHINE_DMA_3, .default_jumpered_ecp_dma = 1, - .kbc_device = &kbc_at_device, - .kbc_params = KBC_VEN_VIA | 0x00424600, /* Guess */ - .kbc_p1 = 0x00000cf0, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_VIA | 0x00424600, /* Guess */ + .kbc_p1 = 0x00000cf0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL }, /* KBC firmware is unknown. No commands outside of the base PS/2 */ /* KBC command set are used. */ @@ -13129,27 +13129,27 @@ const machine_t machines[] = { .max_multi = 2.0 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM, - .ram = { + .flags = MACHINE_IDE_DUAL | MACHINE_APM, + .ram = { .min = 4096, .max = 131072, .step = 4096 }, - .nvrmask = 127, - .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, + .nvrmask = 127, + .jumpered_ecp_dma = MACHINE_DMA_DISABLED | MACHINE_DMA_1 | MACHINE_DMA_3, .default_jumpered_ecp_dma = 4, - .kbc_device = &kbc_at_device, - .kbc_params = KBC_VEN_PHOENIX | 0x00021400, /* Guess */ - .kbc_p1 = 0x00000cf0, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = NULL, - .net_device = NULL + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_PHOENIX | 0x00021400, /* Guess */ + .kbc_p1 = 0x00000cf0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL }, /* This has Phoenix KBC firmware. */ { @@ -13173,27 +13173,27 @@ const machine_t machines[] = { .max_multi = 2.0 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_VIDEO, - .ram = { + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_VIDEO, + .ram = { .min = 8192, .max = 139264, .step = 4096 }, - .nvrmask = 127, - .jumpered_ecp_dma = MACHINE_DMA_1 | MACHINE_DMA_3, + .nvrmask = 127, + .jumpered_ecp_dma = MACHINE_DMA_1 | MACHINE_DMA_3, .default_jumpered_ecp_dma = 3, - .kbc_device = &kbc_at_device, - .kbc_params = KBC_VEN_PHOENIX | 0x00012900, /* Guess */ - .kbc_p1 = 0x00000cf0, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = &gd5430_onboard_pci_device, - .snd_device = NULL, - .net_device = NULL + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_PHOENIX | 0x00012900, /* Guess */ + .kbc_p1 = 0x00000cf0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = &gd5430_onboard_pci_device, + .snd_device = NULL, + .net_device = NULL }, /* VLSI Wildcat */ @@ -13219,27 +13219,27 @@ const machine_t machines[] = { .max_multi = 2.0 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_VIDEO, - .ram = { + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_VIDEO, + .ram = { .min = 4096, .max = 196608, .step = 4096 }, - .nvrmask = 127, - .jumpered_ecp_dma = MACHINE_DMA_3, + .nvrmask = 127, + .jumpered_ecp_dma = MACHINE_DMA_3, .default_jumpered_ecp_dma = 3, - .kbc_device = &kbc_at_device, - .kbc_params = KBC_VEN_PHOENIX | 0x00012900, /* Guess */ - .kbc_p1 = 0x00000cf0, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = &s3_phoenix_trio64_onboard_pci_device, - .snd_device = NULL, - .net_device = NULL + .kbc_device = &kbc_at_device, + .kbc_params = KBC_VEN_PHOENIX | 0x00012900, /* Guess */ + .kbc_p1 = 0x00000cf0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = &s3_phoenix_trio64_onboard_pci_device, + .snd_device = NULL, + .net_device = NULL }, /* Socket 7 (Single Voltage) machines */ @@ -13334,90 +13334,90 @@ const machine_t machines[] = { .net_device = NULL }, { - .name = "[i430FX] HP Vectra VE 5/XXX Series 2", - .internal_name = "hpvectravexxx", - .type = MACHINE_TYPE_SOCKET7_3V, - .chipset = MACHINE_CHIPSET_INTEL_430FX, - .init = machine_at_hpvectravexxx_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i430FX] HP Vectra VE 5/XXX Series 2", + .internal_name = "hpvectravexxx", + .type = MACHINE_TYPE_SOCKET7_3V, + .chipset = MACHINE_CHIPSET_INTEL_430FX, + .init = machine_at_hpvectravexxx_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET5_7, - .block = CPU_BLOCK_NONE, - .min_bus = 50000000, - .max_bus = 66666667, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 50000000, + .max_bus = 66666667, .min_voltage = 3380, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.0 + .min_multi = 1.5, + .max_multi = 3.0 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_VIDEO | MACHINE_APM, - .ram = { - .min = 8192, - .max = 131072, + .flags = MACHINE_IDE_DUAL | MACHINE_VIDEO | MACHINE_APM, + .ram = { + .min = 8192, + .max = 131072, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .nvrmask = 255, + .jumpered_ecp_dma = 0, .default_jumpered_ecp_dma = -1, - .kbc_device = NULL, - .kbc_params = 0x00000000, - .kbc_p1 = 0x00000cf0, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = &hpvectravexxx_device, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = &gd5436_onboard_pci_device, - .snd_device = NULL, - .net_device = NULL + .kbc_device = NULL, + .kbc_params = 0x00000000, + .kbc_p1 = 0x00000cf0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = &hpvectravexxx_device, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = &gd5436_onboard_pci_device, + .snd_device = NULL, + .net_device = NULL }, { - .name = "[i430FX] HP Vectra 500 Series xxx/MT", - .internal_name = "vectra500mt", - .type = MACHINE_TYPE_SOCKET7_3V, - .chipset = MACHINE_CHIPSET_INTEL_430FX, - .init = machine_at_vectra500mt_init, - .p1_handler = machine_generic_p1_handler, - .gpio_handler = NULL, - .available_flag = MACHINE_AVAILABLE, + .name = "[i430FX] HP Vectra 500 Series xxx/MT", + .internal_name = "vectra500mt", + .type = MACHINE_TYPE_SOCKET7_3V, + .chipset = MACHINE_CHIPSET_INTEL_430FX, + .init = machine_at_vectra500mt_init, + .p1_handler = machine_generic_p1_handler, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET5_7, - .block = CPU_BLOCK_NONE, - .min_bus = 50000000, - .max_bus = 66666667, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 50000000, + .max_bus = 66666667, .min_voltage = 3380, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.0 + .min_multi = 1.5, + .max_multi = 3.0 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_VIDEO | MACHINE_APM, - .ram = { - .min = 8192, - .max = 131072, + .flags = MACHINE_IDE_DUAL | MACHINE_VIDEO | MACHINE_APM, + .ram = { + .min = 8192, + .max = 131072, .step = 8192 }, - .nvrmask = 511, - .jumpered_ecp_dma = 0, + .nvrmask = 511, + .jumpered_ecp_dma = 0, .default_jumpered_ecp_dma = -1, - .kbc_device = NULL, - .kbc_params = 0x00000000, - .kbc_p1 = 0x000044f0, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = NULL, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = &s3_phoenix_trio64_onboard_pci_device, - .snd_device = NULL, - .net_device = NULL + .kbc_device = NULL, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000044f0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = &s3_phoenix_trio64_onboard_pci_device, + .snd_device = NULL, + .net_device = NULL }, /* Has a SM(S)C FDC37C932 Super I/O chip with on-chip KBC with AMI MegaKey (revision '5') KBC firmware. */ @@ -15778,48 +15778,48 @@ const machine_t machines[] = { }, /* This has the Phoenix MultiKey KBC firmware on the NSC Super I/O chip. */ { - .name = "[i430TX] Intel AN430TX (Anchorage)", - .internal_name = "an430tx", - .type = MACHINE_TYPE_SOCKET7, - .chipset = MACHINE_CHIPSET_INTEL_430TX, - .init = machine_at_an430tx_init, - .p1_handler = machine_generic_p1_handler, + .name = "[i430TX] Intel AN430TX (Anchorage)", + .internal_name = "an430tx", + .type = MACHINE_TYPE_SOCKET7, + .chipset = MACHINE_CHIPSET_INTEL_430TX, + .init = machine_at_an430tx_init, + .p1_handler = machine_generic_p1_handler, .gpio_handler = machine_ap440fx_vs440fx_gpio_handler, - .available_flag = MACHINE_AVAILABLE, + .available_flag = MACHINE_AVAILABLE, .gpio_acpi_handler = NULL, - .cpu = { - .package = CPU_PKG_SOCKET5_7, - .block = CPU_BLOCK(CPU_K5, CPU_5K86, CPU_K6, CPU_K6_2, CPU_K6_2C, CPU_K6_3, CPU_K6_2P, - CPU_K6_3P, CPU_Cx6x86, CPU_Cx6x86MX, CPU_Cx6x86L), - .min_bus = 60000000, - .max_bus = 66666667, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK(CPU_K5, CPU_5K86, CPU_K6, CPU_K6_2, CPU_K6_2C, CPU_K6_3, CPU_K6_2P, + CPU_K6_3P, CPU_Cx6x86, CPU_Cx6x86MX, CPU_Cx6x86L), + .min_bus = 60000000, + .max_bus = 66666667, .min_voltage = 2800, .max_voltage = 3520, - .min_multi = 1.5, - .max_multi = 3.5 + .min_multi = 1.5, + .max_multi = 3.5 }, .bus_flags = MACHINE_PS2_PCI, - .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_SOUND | MACHINE_GAMEPORT, /* Machine has internal video: ATI Mach64GT-B 3D Rage II */ - .ram = { - .min = 8192, - .max = 262144, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_SOUND | MACHINE_GAMEPORT, /* Machine has internal video: ATI Mach64GT-B 3D Rage II */ + .ram = { + .min = 8192, + .max = 262144, .step = 8192 }, - .nvrmask = 255, - .jumpered_ecp_dma = 0, + .nvrmask = 255, + .jumpered_ecp_dma = 0, .default_jumpered_ecp_dma = -1, - .kbc_device = NULL, - .kbc_params = 0x00000000, - .kbc_p1 = 0x000044f0, - .gpio = 0xffffffff, - .gpio_acpi = 0xffffffff, - .device = &an430tx_device, - .kbd_device = NULL, - .fdc_device = NULL, - .sio_device = NULL, - .vid_device = NULL, - .snd_device = &ymf715_onboard_device, - .net_device = NULL + .kbc_device = NULL, + .kbc_params = 0x00000000, + .kbc_p1 = 0x000044f0, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = &an430tx_device, + .kbd_device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = &ymf715_onboard_device, + .net_device = NULL }, /* This has the Winbond W83977 Super I/O Chip with AMIKey-2 KBC firmware, which is type 'H'. */ { From 63c01b6b9f3179f027594cabe4f85e84ff2c3e78 Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Tue, 21 Oct 2025 01:07:47 -0400 Subject: [PATCH 04/27] Remove ACPI flag from the Abit AH4T --- src/machine/machine_table.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index efb1a31ed..da791a850 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -8831,7 +8831,7 @@ const machine_t machines[] = { .max_multi = 0 }, .bus_flags = MACHINE_VLB, - .flags = MACHINE_APM | MACHINE_ACPI, + .flags = MACHINE_APM, .ram = { .min = 1024, .max = 131072, From 003eef6aeb0c84a4d87f1a943865b74bbc5fc889 Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Tue, 21 Oct 2025 01:44:28 -0400 Subject: [PATCH 05/27] Fix several joystick Button names --- src/game/joystick_ch_flightstick_pro.c | 12 ++++++------ src/game/joystick_standard.c | 4 ++-- src/game/joystick_tm_fcs.c | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/game/joystick_ch_flightstick_pro.c b/src/game/joystick_ch_flightstick_pro.c index 0c318555a..5c35b85a8 100644 --- a/src/game/joystick_ch_flightstick_pro.c +++ b/src/game/joystick_ch_flightstick_pro.c @@ -239,7 +239,7 @@ const joystick_t joystick_ch_flightstick = { .pov_count = 0, .max_joysticks = 1, .axis_names = { "X axis (Roll)", "Y axis (Pitch)", "Throttle" }, - .button_names = { "Button 1", "Button 2" }, + .button_names = { "Trigger", "Button 2" }, .pov_names = { NULL } }; @@ -257,7 +257,7 @@ const joystick_t joystick_ch_flightstick_ch_pedals = { .pov_count = 0, .max_joysticks = 1, .axis_names = { "X axis (Roll)", "Y axis (Pitch)", "Throttle", "Rudder (Yaw)" }, - .button_names = { "Button 1", "Button 2" }, + .button_names = { "Trigger", "Button 2" }, .pov_names = { NULL } }; @@ -275,7 +275,7 @@ const joystick_t joystick_ch_flightstick_ch_pedals_pro = { .pov_count = 0, .max_joysticks = 1, .axis_names = { "X axis (Roll)", "Y axis (Pitch)", "Right Pedal", "Left Pedal" }, - .button_names = { "Button 1", "Button 2" }, + .button_names = { "Trigger", "Button 2" }, .pov_names = { NULL } }; @@ -293,7 +293,7 @@ const joystick_t joystick_ch_flightstick_pro = { .pov_count = 1, .max_joysticks = 1, .axis_names = { "X axis (Roll)", "Y axis (Pitch)", "Throttle" }, - .button_names = { "Button 1", "Button 2", "Button 3", "Button 4" }, + .button_names = { "Trigger", "Button 2", "Button 3", "Button 4" }, .pov_names = { "POV" } }; @@ -311,7 +311,7 @@ const joystick_t joystick_ch_flightstick_pro_ch_pedals = { .pov_count = 1, .max_joysticks = 1, .axis_names = { "X axis (Roll)", "Y axis (Pitch)", "Throttle", "Rudder (Yaw)" }, - .button_names = { "Button 1", "Button 2", "Button 3", "Button 4" }, + .button_names = { "Trigger", "Button 2", "Button 3", "Button 4" }, .pov_names = { "POV" } }; @@ -329,7 +329,7 @@ const joystick_t joystick_ch_flightstick_pro_ch_pedals_pro = { .pov_count = 1, .max_joysticks = 1, .axis_names = { "X axis (Roll)", "Y axis (Pitch)", "Right Pedal", "Left Pedal" }, - .button_names = { "Button 1", "Button 2", "Button 3", "Button 4" }, + .button_names = { "Trigger", "Button 2", "Button 3", "Button 4" }, .pov_names = { "POV" } }; diff --git a/src/game/joystick_standard.c b/src/game/joystick_standard.c index 8bb47937f..0876a21a2 100644 --- a/src/game/joystick_standard.c +++ b/src/game/joystick_standard.c @@ -765,7 +765,7 @@ const joystick_t joystick_3button_yoke_throttle = { .pov_count = 0, .max_joysticks = 1, .axis_names = { "Roll axis", "Pitch axis", "Throttle axis" }, - .button_names = { "Button 1", "Button 2", "Button 3" }, + .button_names = { "Trigger", "Button 2", "Button 3" }, .pov_names = { NULL } }; @@ -783,7 +783,7 @@ const joystick_t joystick_4button_yoke_throttle = { .pov_count = 0, .max_joysticks = 1, .axis_names = { "Roll axis", "Pitch axis", "Throttle axis" }, - .button_names = { "Button 1", "Button 2", "Button 3", "Button 4" }, + .button_names = { "Trigger", "Button 2", "Button 3", "Button 4" }, .pov_names = { NULL } }; diff --git a/src/game/joystick_tm_fcs.c b/src/game/joystick_tm_fcs.c index c8368612d..93f54db36 100644 --- a/src/game/joystick_tm_fcs.c +++ b/src/game/joystick_tm_fcs.c @@ -167,7 +167,7 @@ const joystick_t joystick_tm_fcs = { .pov_count = 1, .max_joysticks = 1, .axis_names = { "X axis", "Y axis" }, - .button_names = { "Button 1", "Button 2", "Button 3", "Button 4" }, + .button_names = { "Trigger", "Button 2", "Button 3", "Button 4" }, .pov_names = { "POV" } }; @@ -185,6 +185,6 @@ const joystick_t joystick_tm_fcs_rcs = { .pov_count = 1, .max_joysticks = 1, .axis_names = { "X axis", "Y axis", "Rudder" }, - .button_names = { "Button 1", "Button 2", "Button 3", "Button 4" }, + .button_names = { "Trigger", "Button 2", "Button 3", "Button 4" }, .pov_names = { "POV" } }; From 6a20196bc363e398ea195786bebeb94c7cb98d96 Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Tue, 21 Oct 2025 01:44:51 -0400 Subject: [PATCH 06/27] Fix incorrect joystick button counts --- src/game/joystick_standard.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/game/joystick_standard.c b/src/game/joystick_standard.c index 0876a21a2..59b3460a2 100644 --- a/src/game/joystick_standard.c +++ b/src/game/joystick_standard.c @@ -544,7 +544,7 @@ const joystick_t joystick_4axis_2button = { .read_axis = joystick_standard_read_axis_4axis, .a0_over = joystick_standard_a0_over, .axis_count = 4, - .button_count = 3, + .button_count = 2, .pov_count = 0, .max_joysticks = 1, .axis_names = { "X axis", "Y axis", "Z axis", "zX axis" }, @@ -797,7 +797,7 @@ const joystick_t joystick_steering_wheel_2_button = { .read_axis = joystick_standard_read_axis_3axis, .a0_over = joystick_standard_a0_over, .axis_count = 3, - .button_count = 4, + .button_count = 2, .pov_count = 0, .max_joysticks = 1, .axis_names = { "Steering axis", "Accelerator axis", "Brake axis" }, @@ -815,7 +815,7 @@ const joystick_t joystick_steering_wheel_3_button = { .read_axis = joystick_standard_read_axis_3axis, .a0_over = joystick_standard_a0_over, .axis_count = 3, - .button_count = 4, + .button_count = 3, .pov_count = 0, .max_joysticks = 1, .axis_names = { "Steering axis", "Accelerator axis", "Brake axis" }, From 5b0267e4d3738ece390f664cc0cac9ebe31939fe Mon Sep 17 00:00:00 2001 From: MaxwellS04 Date: Tue, 21 Oct 2025 16:28:37 +0700 Subject: [PATCH 07/27] Added the 1999 v4.51PG BIOS to P5VX-B --- src/include/86box/machine.h | 3 ++ src/machine/m_at_socket7.c | 65 ++++++++++++++++++++++++++++++++++--- src/machine/machine_table.c | 2 +- 3 files changed, 64 insertions(+), 6 deletions(-) diff --git a/src/include/86box/machine.h b/src/include/86box/machine.h index 061c6473f..8cc928f91 100644 --- a/src/include/86box/machine.h +++ b/src/include/86box/machine.h @@ -1062,6 +1062,9 @@ extern int machine_at_8500tvxa_init(const machine_t *); extern int machine_at_presario2240_init(const machine_t *); extern int machine_at_presario4500_init(const machine_t *); extern int machine_at_dellhannibalp_init(const machine_t *); +#ifdef EMU_DEVICE_H +extern const device_t p5vxb_device; +#endif extern int machine_at_p5vxb_init(const machine_t *); extern int machine_at_p55va_init(const machine_t *); extern int machine_at_gw2kte_init(const machine_t *); diff --git a/src/machine/m_at_socket7.c b/src/machine/m_at_socket7.c index 7916db2d4..15e0316f2 100644 --- a/src/machine/m_at_socket7.c +++ b/src/machine/m_at_socket7.c @@ -813,17 +813,72 @@ machine_at_dellhannibalp_init(const machine_t *model) return ret; } +static const device_config_t p5vxb_config[] = { + // clang-format off + { + .name = "bios", + .description = "BIOS Version", + .type = CONFIG_BIOS, + .default_string = "p5vxb", + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { + { + .name = "Award Modular BIOS v4.50PG - Revision 1.0", + .internal_name = "p5vxb", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 131072, + .files = { "roms/machines/p5vxb/P5VXB10.BIN", "" } + }, + { + .name = "Award Modular BIOS v4.51PG - Revision 1.5c", + .internal_name = "p5vxb_451pg", + .bios_type = BIOS_NORMAL, + .files_no = 1, + .local = 0, + .size = 131072, + .files = { "roms/machines/p5vxb/P5VXB15C.BIN", "" } + }, + { .files_no = 0 } + } + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +const device_t p5vxb_device = { + .name = "ECS P5VX-B", + .internal_name = "p5vxb_device", + .flags = 0, + .local = 0, + .init = NULL, + .close = NULL, + .reset = NULL, + .available = NULL, + .speed_changed = NULL, + .force_redraw = NULL, + .config = p5vxb_config +}; + int machine_at_p5vxb_init(const machine_t *model) { - int ret; + int ret = 0; + const char *fn; - ret = bios_load_linear("roms/machines/p5vxb/P5VXB10.BIN", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) + /* No ROMs available */ + if (!device_available(model->device)) return ret; + device_context(model->device); + fn = device_get_bios_file(machine_get_device(machine), device_get_config_bios("bios"), 0); + ret = bios_load_linear(fn, 0x000e0000, 131072, 0); + device_context_restore(); + machine_at_common_init(model); pci_init(PCI_CONFIG_TYPE_1); diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index 47fb21303..244bf83df 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -15218,7 +15218,7 @@ const machine_t machines[] = { .kbc_p1 = 0x00000cf0, .gpio = 0xffffffff, .gpio_acpi = 0xffffffff, - .device = NULL, + .device = &p5vxb_device, .kbd_device = NULL, .fdc_device = NULL, .sio_device = NULL, From 7f9720d746bb2d8ad32bf23938f58280d1d6bcf9 Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Mon, 20 Oct 2025 05:28:42 +0500 Subject: [PATCH 08/27] Qt: Move the CPU frame size option next to time sync --- src/qt/qt_settingsmachine.ui | 209 ++++++++++++++++++----------------- 1 file changed, 110 insertions(+), 99 deletions(-) diff --git a/src/qt/qt_settingsmachine.ui b/src/qt/qt_settingsmachine.ui index 34f0b6160..e14e113f8 100644 --- a/src/qt/qt_settingsmachine.ui +++ b/src/qt/qt_settingsmachine.ui @@ -106,7 +106,7 @@ Frequency: - Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignVCenter + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter @@ -312,7 +312,7 @@ - Qt::Orientation::Horizontal + Qt::Horizontal @@ -325,92 +325,116 @@ - - - - - - 0 - 0 - - - - CPU frame size - - - Qt::AlignmentFlag::AlignLeading|Qt::AlignmentFlag::AlignLeft|Qt::AlignmentFlag::AlignTop - - - - - - Larger frames (less smooth) - - - - - - - Smaller frames (smoother) - - - - - + + + + + + + + 0 + 0 + + + + Time synchronization + + + + + + Disabled + + + + + + + Enabled (local time) + + + + + + + Enabled (UTC) + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 20 + 40 + + + + + - - + + + + + + + 0 + 0 + + + + CPU frame size + + + + + + Larger frames (less smooth) + + + + + + + Smaller frames (smoother) + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 20 + 40 + + + + + + + + - Qt::Orientation::Horizontal - - - - 40 - 20 - - - - - - - - - 0 - 0 - - - - Time synchronization - - - - - - Disabled - - - - - - - Enabled (local time) - - - - - - - Enabled (UTC) - - - - - - - - - - Qt::Orientation::Horizontal + Qt::Horizontal @@ -422,19 +446,6 @@ - - - - Qt::Orientation::Vertical - - - - 20 - 40 - - - - From 591517d85caa79c3545e50ce3a3b15f4aef71dca Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Tue, 21 Oct 2025 16:28:01 +0500 Subject: [PATCH 09/27] Qt: Clean up the .ui files for v5.2 - properly order the elements in QGridLayouts - add non-generic names to text labels and some layouts - fix enums for Qt 5 Designer compatibility - fix tab order on some settings dialog pages --- src/qt/qt_cgasettingsdialog.ui | 162 ++++++++-------- src/qt/qt_harddiskdialog.ui | 18 +- src/qt/qt_joystickconfiguration.ui | 2 +- src/qt/qt_mainwindow.ui | 18 +- src/qt/qt_newfloppydialog.ui | 4 +- src/qt/qt_progsettings.ui | 211 ++++++++++---------- src/qt/qt_settingsdisplay.cpp | 12 +- src/qt/qt_settingsdisplay.ui | 239 ++++++++++++----------- src/qt/qt_settingsmachine.ui | 298 ++++++++++++++--------------- src/qt/qt_vmmanager_preferences.ui | 10 +- 10 files changed, 504 insertions(+), 470 deletions(-) diff --git a/src/qt/qt_cgasettingsdialog.ui b/src/qt/qt_cgasettingsdialog.ui index 7367b2099..dc5acb0fc 100644 --- a/src/qt/qt_cgasettingsdialog.ui +++ b/src/qt/qt_cgasettingsdialog.ui @@ -15,84 +15,15 @@ - QLayout::SizeConstraint::SetFixedSize + QLayout::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 - - - @@ -102,31 +33,100 @@ 360 - Qt::Orientation::Horizontal - - - - - - - Sharpness + Qt::Horizontal - + Saturation + + + + 360 + + + 100 + + + Qt::Horizontal + + + - + Brightness + + + + -100 + + + 100 + + + Qt::Horizontal + + + + + + + Contrast + + + + + + + 360 + + + 100 + + + Qt::Horizontal + + + + + + + Sharpness + + + + + + + -50 + + + 50 + + + Qt::Horizontal + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Ok|QDialogButtonBox::Reset + + + diff --git a/src/qt/qt_harddiskdialog.ui b/src/qt/qt_harddiskdialog.ui index e2dea0220..6de39375f 100644 --- a/src/qt/qt_harddiskdialog.ui +++ b/src/qt/qt_harddiskdialog.ui @@ -33,7 +33,7 @@ - + File name: @@ -43,7 +43,7 @@ - + Cylinders: @@ -66,7 +66,7 @@ - + Heads: @@ -92,7 +92,7 @@ - + Sectors: @@ -118,7 +118,7 @@ - + Size (MB): @@ -141,7 +141,7 @@ - + Type: @@ -155,7 +155,7 @@ - + Bus: @@ -169,7 +169,7 @@ - + Channel: @@ -183,7 +183,7 @@ - + Model: diff --git a/src/qt/qt_joystickconfiguration.ui b/src/qt/qt_joystickconfiguration.ui index 139b99ca5..f5f2773b3 100644 --- a/src/qt/qt_joystickconfiguration.ui +++ b/src/qt/qt_joystickconfiguration.ui @@ -32,7 +32,7 @@ - + Device diff --git a/src/qt/qt_mainwindow.ui b/src/qt/qt_mainwindow.ui index 38aba061f..45c4f70ae 100644 --- a/src/qt/qt_mainwindow.ui +++ b/src/qt/qt_mainwindow.ui @@ -260,7 +260,7 @@ - Qt::ContextMenuPolicy::PreventContextMenu + Qt::PreventContextMenu toolBar @@ -272,7 +272,7 @@ false - Qt::ToolBarArea::TopToolBarArea + Qt::TopToolBarArea @@ -281,7 +281,7 @@ - Qt::ToolButtonStyle::ToolButtonIconOnly + Qt::ToolButtonIconOnly false @@ -396,7 +396,7 @@ E&xit - QAction::MenuRole::QuitRole + QAction::QuitRole @@ -408,7 +408,7 @@ &Settings... - QAction::MenuRole::NoRole + QAction::NoRole false @@ -710,7 +710,7 @@ false - QAction::MenuRole::AboutQtRole + QAction::AboutQtRole @@ -718,7 +718,7 @@ &About 86Box... - QAction::MenuRole::AboutRole + QAction::AboutRole @@ -771,7 +771,7 @@ &Preferences... - QAction::MenuRole::PreferencesRole + QAction::PreferencesRole @@ -844,7 +844,7 @@ Renderer &options... - QAction::MenuRole::NoRole + QAction::NoRole diff --git a/src/qt/qt_newfloppydialog.ui b/src/qt/qt_newfloppydialog.ui index c0437d810..98bfd8be4 100644 --- a/src/qt/qt_newfloppydialog.ui +++ b/src/qt/qt_newfloppydialog.ui @@ -27,7 +27,7 @@ - + File name: @@ -44,7 +44,7 @@ - + Disk size: diff --git a/src/qt/qt_progsettings.ui b/src/qt/qt_progsettings.ui index ca33726b1..6d5f80830 100644 --- a/src/qt/qt_progsettings.ui +++ b/src/qt/qt_progsettings.ui @@ -27,49 +27,15 @@ - QLayout::SizeConstraint::SetFixedSize + QLayout::SetFixedSize - + Language: - - - - Qt::Orientation::Horizontal - - - - 40 - 20 - - - - - - - - Inhibit multimedia keys - - - - - - - Mouse sensitivity: - - - - - - - Default - - - @@ -82,10 +48,30 @@ - - + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + - Ask for confirmation before saving settings + Default + + + + + + + Mouse sensitivity: @@ -107,31 +93,14 @@ 100 - Qt::Orientation::Horizontal - - - - - - - <html><head/><body><p>When selecting media images (CD-ROM, floppy, etc.) the open dialog will start in the same directory as the 86Box configuration file. This setting will likely only make a difference on macOS.</p></body></html> - - - Select media images from program working directory - - - - - - - Default + Qt::Horizontal - Qt::Orientation::Horizontal + Qt::Horizontal @@ -141,58 +110,106 @@ - + + + + Default + + + + + + + <html><head/><body><p>When selecting media images (CD-ROM, floppy, etc.) the open dialog will start in the same directory as the 86Box configuration file. This setting will likely only make a difference on macOS.</p></body></html> + + + Select media images from program working directory + + + + + + + Inhibit multimedia keys + + + + + + + Ask for confirmation before saving settings + + + + Ask for confirmation before quitting - - - - Qt::Orientation::Horizontal - - - QDialogButtonBox::StandardButton::Cancel|QDialogButtonBox::StandardButton::Ok - - - - + Ask for confirmation before hard resetting - - - - Color scheme + + + + + + Color scheme + + + + + + System + + + + + + + Light + + + + + + + Dark + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - System - - - - - - - Light - - - - - - - Dark - - - - diff --git a/src/qt/qt_settingsdisplay.cpp b/src/qt/qt_settingsdisplay.cpp index 8e3a72589..89a2530be 100644 --- a/src/qt/qt_settingsdisplay.cpp +++ b/src/qt/qt_settingsdisplay.cpp @@ -46,7 +46,7 @@ SettingsDisplay::SettingsDisplay(QWidget *parent) for (uint8_t i = 0; i < GFXCARD_MAX; i ++) videoCard[i] = gfxcard[i]; - ui->lineEdit->setFilter(tr("EDID") % util::DlgFilter({ "bin", "dat", "edid", "txt" }) % tr("All files") % util::DlgFilter({ "*" }, true)); + ui->lineEditCustomEDID->setFilter(tr("EDID") % util::DlgFilter({ "bin", "dat", "edid", "txt" }) % tr("All files") % util::DlgFilter({ "*" }, true)); onCurrentMachineChanged(machine); } @@ -77,7 +77,7 @@ SettingsDisplay::save() da2_standalone_enabled = ui->checkBoxDa2->isChecked() ? 1 : 0; monitor_edid = ui->radioButtonCustom->isChecked() ? 1 : 0; - strncpy(monitor_edid_path, ui->lineEdit->fileName().toUtf8().data(), sizeof(monitor_edid_path) - 1); + strncpy(monitor_edid_path, ui->lineEditCustomEDID->fileName().toUtf8().data(), sizeof(monitor_edid_path) - 1); } void @@ -135,8 +135,8 @@ SettingsDisplay::onCurrentMachineChanged(int machineId) ui->radioButtonDefault->setChecked(monitor_edid == 0); ui->radioButtonCustom->setChecked(monitor_edid == 1); - ui->lineEdit->setFileName(monitor_edid_path); - ui->lineEdit->setEnabled(monitor_edid == 1); + ui->lineEditCustomEDID->setFileName(monitor_edid_path); + ui->lineEditCustomEDID->setEnabled(monitor_edid == 1); } void @@ -326,7 +326,7 @@ void SettingsDisplay::on_radioButtonDefault_clicked() { ui->radioButtonDefault->setChecked(true); ui->radioButtonCustom->setChecked(false); - ui->lineEdit->setEnabled(false); + ui->lineEditCustomEDID->setEnabled(false); } @@ -334,7 +334,7 @@ void SettingsDisplay::on_radioButtonCustom_clicked() { ui->radioButtonDefault->setChecked(false); ui->radioButtonCustom->setChecked(true); - ui->lineEdit->setEnabled(true); + ui->lineEditCustomEDID->setEnabled(true); } void SettingsDisplay::on_pushButtonExportDefault_clicked() diff --git a/src/qt/qt_settingsdisplay.ui b/src/qt/qt_settingsdisplay.ui index 6e4c14152..5ab71f4c0 100644 --- a/src/qt/qt_settingsdisplay.ui +++ b/src/qt/qt_settingsdisplay.ui @@ -26,27 +26,45 @@ 0 - - + + + + + 0 + 0 + + - Voodoo 1 or 2 Graphics + Video: - - + + + + + 0 + 0 + + + + 30 + + + + + + + + 0 + 0 + + Configure - - - - IBM 8514/A Graphics - - - @@ -60,6 +78,47 @@ + + + + + 0 + 0 + + + + 30 + + + + + + + Configure + + + + + + + Voodoo 1 or 2 Graphics + + + + + + + Configure + + + + + + + IBM 8514/A Graphics + + + @@ -67,6 +126,13 @@ + + + + XGA Graphics + + + @@ -74,8 +140,22 @@ + + + + IBM PS/55 Display Adapter Graphics + + + + + + + Configure + + + - + 0 @@ -85,9 +165,9 @@ Monitor EDID - + - + @@ -111,9 +191,9 @@ - + - QLayout::SizeConstraint::SetNoConstraint + QLayout::SetNoConstraint @@ -123,7 +203,7 @@ - + 0 @@ -137,99 +217,6 @@ - - - - - 0 - 0 - - - - 30 - - - - - - - Qt::Orientation::Vertical - - - - 20 - 40 - - - - - - - - Configure - - - - - - - - 0 - 0 - - - - Configure - - - - - - - - 0 - 0 - - - - Video: - - - - - - - Configure - - - - - - - - 0 - 0 - - - - 30 - - - - - - - XGA Graphics - - - - - - - IBM PS/55 Display Adapter Graphics - - - @@ -240,6 +227,19 @@ + + + + Qt::Vertical + + + + 20 + 40 + + + + @@ -250,6 +250,23 @@ 1 + + comboBoxVideo + pushButtonConfigureVideo + comboBoxVideoSecondary + pushButtonConfigureVideoSecondary + checkBoxVoodoo + pushButtonConfigureVoodoo + checkBox8514 + pushButtonConfigure8514 + checkBoxXga + pushButtonConfigureXga + checkBoxDa2 + pushButtonConfigureDa2 + radioButtonDefault + pushButtonExportDefault + radioButtonCustom + diff --git a/src/qt/qt_settingsmachine.ui b/src/qt/qt_settingsmachine.ui index e14e113f8..fdfda37b6 100644 --- a/src/qt/qt_settingsmachine.ui +++ b/src/qt/qt_settingsmachine.ui @@ -41,144 +41,18 @@ 0 - - + + - Machine: + Search: - - - - CPU type: - - - - - - - - 0 - 0 - - - - - - - - Memory: - - - - - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - 30 - - - - - - - Frequency: - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - - - - - - 0 - 0 - - - - 30 - - - - - - - - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - 30 - - - - - - - PIT mode: - - - - - - - - 0 - 0 - - - - 30 - - - - - + + - + Machine type: @@ -191,17 +65,10 @@ - - - - 30 - - - - - + + - Wait states: + Machine: @@ -243,22 +110,155 @@ + + + + CPU type: + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + 30 + + + + + + + Frequency: + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + + + + + + 0 + 0 + + + + 30 + + + + + + - + FPU: - - - - Search: + + + + 30 - - + + + + Wait states: + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + 30 + + + + + + + PIT mode: + + + + + + + + 0 + 0 + + + + 30 + + + + + + + + + + Memory: + + + + + + + + 0 + 0 + + + diff --git a/src/qt/qt_vmmanager_preferences.ui b/src/qt/qt_vmmanager_preferences.ui index 7f7b94fa4..7206b79bf 100644 --- a/src/qt/qt_vmmanager_preferences.ui +++ b/src/qt/qt_vmmanager_preferences.ui @@ -15,10 +15,10 @@ - QLayout::SizeConstraint::SetFixedSize + QLayout::SetFixedSize - + System Directory: @@ -146,7 +146,7 @@ - Qt::Orientation::Vertical + Qt::Vertical @@ -159,10 +159,10 @@ - Qt::Orientation::Horizontal + Qt::Horizontal - QDialogButtonBox::StandardButton::Cancel|QDialogButtonBox::StandardButton::Ok + QDialogButtonBox::Cancel|QDialogButtonBox::Ok From ad64553992233d4c31133423fc53dad6e96b8ab8 Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Tue, 21 Oct 2025 16:14:21 +0500 Subject: [PATCH 10/27] Properly fix the workaround for OpenGL 3.0-3.1 It was incorrectly comparing the OpenGL version and the GLSL version, plus the pointer arithmetic broke with debug builds Also rename the misleadingly-named array and fix logging --- src/qt/qt_openglrenderer.cpp | 19 +++++++++---------- src/qt/qt_openglrenderer.hpp | 2 +- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/qt/qt_openglrenderer.cpp b/src/qt/qt_openglrenderer.cpp index c8c2e2fc6..9b1233f7d 100644 --- a/src/qt/qt_openglrenderer.cpp +++ b/src/qt/qt_openglrenderer.cpp @@ -42,6 +42,8 @@ extern MainWindow* main_window; #include #include +#include +#define HAVE_STDARG_H #include "qt_openglrenderer.hpp" #include "qt_openglshadermanagerdialog.hpp" @@ -152,7 +154,7 @@ ogl3_log(const char *fmt, ...) if (ogl3_do_log) { va_start(ap, fmt); - ogl3_log_ex(fmt, ap); + pclog_ex(fmt, ap); va_end(ap); } } @@ -219,10 +221,7 @@ OpenGLRenderer::compile_shader(GLenum shader_type, const char *prepend, const ch snprintf(version, 49, "%s\n", versionRegex.match(progSource).captured(1).toLatin1().data()); progSource.remove(versionRegex); } else { - version_loc = ((char *) this->glslVersion.toLatin1().data()) + 9; - char glsl_ver[4] = { 0 }; - memcpy(glsl_ver, version_loc, 3); - int ver = atoi((char *) glsl_ver); + int ver = gl_version[0] * 100 + gl_version[1] * 10; if (ver == 300) ver = 130; else if (ver == 310) @@ -875,11 +874,11 @@ OpenGLRenderer::initialize() glw.initializeOpenGLFunctions(); ogl3_log("OpenGL information: [%s] %s (%s)\n", glw.glGetString(GL_VENDOR), glw.glGetString(GL_RENDERER), glw.glGetString(GL_VERSION)); - glsl_version[0] = glsl_version[1] = -1; - glw.glGetIntegerv(GL_MAJOR_VERSION, &glsl_version[0]); - glw.glGetIntegerv(GL_MINOR_VERSION, &glsl_version[1]); - if (glsl_version[0] < 3) { - throw opengl_init_error(tr("OpenGL version 3.0 or greater is required. Current GLSL version is %1.%2").arg(glsl_version[0]).arg(glsl_version[1])); + gl_version[0] = gl_version[1] = -1; + glw.glGetIntegerv(GL_MAJOR_VERSION, &gl_version[0]); + glw.glGetIntegerv(GL_MINOR_VERSION, &gl_version[1]); + if (gl_version[0] < 3) { + throw opengl_init_error(tr("OpenGL version 3.0 or greater is required. Current GLSL version is %1.%2").arg(gl_version[0]).arg(gl_version[1])); } ogl3_log("Using OpenGL %s\n", glw.glGetString(GL_VERSION)); ogl3_log("Using Shading Language %s\n", glw.glGetString(GL_SHADING_LANGUAGE_VERSION)); diff --git a/src/qt/qt_openglrenderer.hpp b/src/qt/qt_openglrenderer.hpp index c2dc32917..22a8a17d3 100644 --- a/src/qt/qt_openglrenderer.hpp +++ b/src/qt/qt_openglrenderer.hpp @@ -102,7 +102,7 @@ private: void *unpackBuffer = nullptr; - int glsl_version[2] = { 0, 0 }; + int gl_version[2] = { 0, 0 }; void initialize(); void initializeExtensions(); From da70e8ab502481ca170ea63f109f9199be1b2b39 Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Tue, 21 Oct 2025 16:15:21 +0500 Subject: [PATCH 11/27] Qt: Change the file picker button label to "Browse..." --- src/qt/languages/86box.pot | 3 --- src/qt/languages/cs-CZ.po | 5 +---- src/qt/languages/de-DE.po | 3 --- src/qt/languages/es-ES.po | 3 --- src/qt/languages/fi-FI.po | 3 --- src/qt/languages/fr-FR.po | 3 --- src/qt/languages/hr-HR.po | 5 +---- src/qt/languages/it-IT.po | 3 --- src/qt/languages/ja-JP.po | 5 +---- src/qt/languages/ko-KR.po | 3 --- src/qt/languages/nb-NO.po | 3 --- src/qt/languages/nl-NL.po | 3 --- src/qt/languages/pl-PL.po | 3 --- src/qt/languages/pt-BR.po | 3 --- src/qt/languages/pt-PT.po | 3 --- src/qt/languages/ru-RU.po | 3 --- src/qt/languages/sk-SK.po | 3 --- src/qt/languages/sl-SI.po | 3 --- src/qt/languages/sv-SE.po | 3 --- src/qt/languages/tr-TR.po | 3 --- src/qt/languages/uk-UA.po | 5 +---- src/qt/languages/vi-VN.po | 3 --- src/qt/languages/zh-CN.po | 3 --- src/qt/languages/zh-TW.po | 3 --- src/qt/qt_filefield.ui | 2 +- 25 files changed, 5 insertions(+), 77 deletions(-) diff --git a/src/qt/languages/86box.pot b/src/qt/languages/86box.pot index 9b6ce9399..54b87c64d 100644 --- a/src/qt/languages/86box.pot +++ b/src/qt/languages/86box.pot @@ -603,9 +603,6 @@ msgstr "" msgid "ID:" msgstr "" -msgid "&Specify..." -msgstr "" - msgid "Sectors:" msgstr "" diff --git a/src/qt/languages/cs-CZ.po b/src/qt/languages/cs-CZ.po index 03103a3e3..67cc395e6 100644 --- a/src/qt/languages/cs-CZ.po +++ b/src/qt/languages/cs-CZ.po @@ -603,9 +603,6 @@ msgstr "Kanál:" msgid "ID:" msgstr "ID:" -msgid "&Specify..." -msgstr "&Zadat..." - msgid "Sectors:" msgstr "Sektory:" @@ -1714,7 +1711,7 @@ msgid "Remove" msgstr "Odstranit" msgid "Browse..." -msgstr "Browse..." +msgstr "Procházet..." msgid "Couldn't create OpenGL context." msgstr "Nepodařilo se vytvořit kontext OpenGL." diff --git a/src/qt/languages/de-DE.po b/src/qt/languages/de-DE.po index bdcddfe8d..151c1971c 100644 --- a/src/qt/languages/de-DE.po +++ b/src/qt/languages/de-DE.po @@ -603,9 +603,6 @@ msgstr "Kanal:" msgid "ID:" msgstr "ID:" -msgid "&Specify..." -msgstr "&Festlegen..." - msgid "Sectors:" msgstr "Sektoren:" diff --git a/src/qt/languages/es-ES.po b/src/qt/languages/es-ES.po index 2bf3f5181..099d7fb2e 100644 --- a/src/qt/languages/es-ES.po +++ b/src/qt/languages/es-ES.po @@ -603,9 +603,6 @@ msgstr "Canal:" msgid "ID:" msgstr "ID:" -msgid "&Specify..." -msgstr "E&specificar..." - msgid "Sectors:" msgstr "Sectores:" diff --git a/src/qt/languages/fi-FI.po b/src/qt/languages/fi-FI.po index 24102f071..010af305b 100644 --- a/src/qt/languages/fi-FI.po +++ b/src/qt/languages/fi-FI.po @@ -603,9 +603,6 @@ msgstr "Kanava:" msgid "ID:" msgstr "ID:" -msgid "&Specify..." -msgstr "&Määritä..." - msgid "Sectors:" msgstr "Sektorit:" diff --git a/src/qt/languages/fr-FR.po b/src/qt/languages/fr-FR.po index c98280f3b..a518bbebf 100644 --- a/src/qt/languages/fr-FR.po +++ b/src/qt/languages/fr-FR.po @@ -603,9 +603,6 @@ msgstr "Canal:" msgid "ID:" msgstr "ID:" -msgid "&Specify..." -msgstr "&Spécifier..." - msgid "Sectors:" msgstr "Secteurs:" diff --git a/src/qt/languages/hr-HR.po b/src/qt/languages/hr-HR.po index 0ea717dce..86dd3b73a 100644 --- a/src/qt/languages/hr-HR.po +++ b/src/qt/languages/hr-HR.po @@ -603,9 +603,6 @@ msgstr "Kanal:" msgid "ID:" msgstr "ID:" -msgid "&Specify..." -msgstr "&Odredi..." - msgid "Sectors:" msgstr "Sektori:" @@ -1714,7 +1711,7 @@ msgid "Remove" msgstr "Ukloni" msgid "Browse..." -msgstr "Pregledajte..." +msgstr "Pretraži..." msgid "Couldn't create OpenGL context." msgstr "Nije moguće stvoriti kontekst OpenGL." diff --git a/src/qt/languages/it-IT.po b/src/qt/languages/it-IT.po index a399c59e6..765bdd5d3 100644 --- a/src/qt/languages/it-IT.po +++ b/src/qt/languages/it-IT.po @@ -603,9 +603,6 @@ msgstr "Canale:" msgid "ID:" msgstr "ID:" -msgid "&Specify..." -msgstr "&Specifica..." - msgid "Sectors:" msgstr "Settori:" diff --git a/src/qt/languages/ja-JP.po b/src/qt/languages/ja-JP.po index 5c6aa485c..5d725bb34 100644 --- a/src/qt/languages/ja-JP.po +++ b/src/qt/languages/ja-JP.po @@ -603,9 +603,6 @@ msgstr "チャンネル:" msgid "ID:" msgstr "ID:" -msgid "&Specify..." -msgstr "参照(&S)..." - msgid "Sectors:" msgstr "セクター:" @@ -1714,7 +1711,7 @@ msgid "Remove" msgstr "削除" msgid "Browse..." -msgstr "ブラウズ..." +msgstr "参照..." msgid "Couldn't create OpenGL context." msgstr "OpenGLコンテキストを作成できませんでした。" diff --git a/src/qt/languages/ko-KR.po b/src/qt/languages/ko-KR.po index 4474138b2..b7d1669a9 100644 --- a/src/qt/languages/ko-KR.po +++ b/src/qt/languages/ko-KR.po @@ -603,9 +603,6 @@ msgstr "채널:" msgid "ID:" msgstr "ID:" -msgid "&Specify..." -msgstr "열기(&S)..." - msgid "Sectors:" msgstr "섹터:" diff --git a/src/qt/languages/nb-NO.po b/src/qt/languages/nb-NO.po index 06b7a4f25..2524d991f 100644 --- a/src/qt/languages/nb-NO.po +++ b/src/qt/languages/nb-NO.po @@ -603,9 +603,6 @@ msgstr "Kanal:" msgid "ID:" msgstr "ID:" -msgid "&Specify..." -msgstr "&Angi..." - msgid "Sectors:" msgstr "Sektorer:" diff --git a/src/qt/languages/nl-NL.po b/src/qt/languages/nl-NL.po index ee57f32a1..9f9c73a10 100644 --- a/src/qt/languages/nl-NL.po +++ b/src/qt/languages/nl-NL.po @@ -603,9 +603,6 @@ msgstr "Kanaal:" msgid "ID:" msgstr "ID:" -msgid "&Specify..." -msgstr "&Specificeer..." - msgid "Sectors:" msgstr "Sectoren:" diff --git a/src/qt/languages/pl-PL.po b/src/qt/languages/pl-PL.po index 4398dcafb..838434b55 100644 --- a/src/qt/languages/pl-PL.po +++ b/src/qt/languages/pl-PL.po @@ -603,9 +603,6 @@ msgstr "Kanał:" msgid "ID:" msgstr "ID:" -msgid "&Specify..." -msgstr "&Określ..." - msgid "Sectors:" msgstr "Sektory:" diff --git a/src/qt/languages/pt-BR.po b/src/qt/languages/pt-BR.po index 010005780..e3bad48e4 100644 --- a/src/qt/languages/pt-BR.po +++ b/src/qt/languages/pt-BR.po @@ -603,9 +603,6 @@ msgstr "Canal:" msgid "ID:" msgstr "ID:" -msgid "&Specify..." -msgstr "&Especificar..." - msgid "Sectors:" msgstr "Setores:" diff --git a/src/qt/languages/pt-PT.po b/src/qt/languages/pt-PT.po index a33ba0119..af9500c16 100644 --- a/src/qt/languages/pt-PT.po +++ b/src/qt/languages/pt-PT.po @@ -603,9 +603,6 @@ msgstr "Canal:" msgid "ID:" msgstr "ID:" -msgid "&Specify..." -msgstr "&Especificar..." - msgid "Sectors:" msgstr "Sectores:" diff --git a/src/qt/languages/ru-RU.po b/src/qt/languages/ru-RU.po index 2d71499dc..4f60516e3 100644 --- a/src/qt/languages/ru-RU.po +++ b/src/qt/languages/ru-RU.po @@ -603,9 +603,6 @@ msgstr "Канал:" msgid "ID:" msgstr "ID:" -msgid "&Specify..." -msgstr "&Указать..." - msgid "Sectors:" msgstr "Секторы:" diff --git a/src/qt/languages/sk-SK.po b/src/qt/languages/sk-SK.po index 436c8c674..c25253d8c 100644 --- a/src/qt/languages/sk-SK.po +++ b/src/qt/languages/sk-SK.po @@ -603,9 +603,6 @@ msgstr "Kanál:" msgid "ID:" msgstr "ID:" -msgid "&Specify..." -msgstr "&Zadať..." - msgid "Sectors:" msgstr "Sektory:" diff --git a/src/qt/languages/sl-SI.po b/src/qt/languages/sl-SI.po index 8ef710a15..12660fce7 100644 --- a/src/qt/languages/sl-SI.po +++ b/src/qt/languages/sl-SI.po @@ -603,9 +603,6 @@ msgstr "Kanal:" msgid "ID:" msgstr "ID:" -msgid "&Specify..." -msgstr "&Določi..." - msgid "Sectors:" msgstr "Sektorji:" diff --git a/src/qt/languages/sv-SE.po b/src/qt/languages/sv-SE.po index 6f014e2dd..46b1c6e43 100644 --- a/src/qt/languages/sv-SE.po +++ b/src/qt/languages/sv-SE.po @@ -603,9 +603,6 @@ msgstr "Kanal:" msgid "ID:" msgstr "ID:" -msgid "&Specify..." -msgstr "&Specificera..." - msgid "Sectors:" msgstr "Sektorer:" diff --git a/src/qt/languages/tr-TR.po b/src/qt/languages/tr-TR.po index 073572e1b..c9d980bc9 100644 --- a/src/qt/languages/tr-TR.po +++ b/src/qt/languages/tr-TR.po @@ -603,9 +603,6 @@ msgstr "Kanal:" msgid "ID:" msgstr "ID:" -msgid "&Specify..." -msgstr "&Belirle..." - msgid "Sectors:" msgstr "Sektörler:" diff --git a/src/qt/languages/uk-UA.po b/src/qt/languages/uk-UA.po index 8228b7ae4..00fb49fe8 100644 --- a/src/qt/languages/uk-UA.po +++ b/src/qt/languages/uk-UA.po @@ -603,9 +603,6 @@ msgstr "Канал:" msgid "ID:" msgstr "ID:" -msgid "&Specify..." -msgstr "&Вказати..." - msgid "Sectors:" msgstr "Сектора:" @@ -1714,7 +1711,7 @@ msgid "Remove" msgstr "Видалити" msgid "Browse..." -msgstr "Переглянути..." +msgstr "Огляд..." msgid "Couldn't create OpenGL context." msgstr "Не вдалося створити контекст OpenGL." diff --git a/src/qt/languages/vi-VN.po b/src/qt/languages/vi-VN.po index 24decb522..471f8e9a3 100644 --- a/src/qt/languages/vi-VN.po +++ b/src/qt/languages/vi-VN.po @@ -603,9 +603,6 @@ msgstr "Kênh:" msgid "ID:" msgstr "ID:" -msgid "&Specify..." -msgstr "Chỉ &rõ..." - msgid "Sectors:" msgstr "Sector:" diff --git a/src/qt/languages/zh-CN.po b/src/qt/languages/zh-CN.po index 48ffc0dc9..bd11441c5 100644 --- a/src/qt/languages/zh-CN.po +++ b/src/qt/languages/zh-CN.po @@ -603,9 +603,6 @@ msgstr "通道:" msgid "ID:" msgstr "ID:" -msgid "&Specify..." -msgstr "指定(&S)..." - msgid "Sectors:" msgstr "扇区(S):" diff --git a/src/qt/languages/zh-TW.po b/src/qt/languages/zh-TW.po index 1732cb914..7544557c6 100644 --- a/src/qt/languages/zh-TW.po +++ b/src/qt/languages/zh-TW.po @@ -603,9 +603,6 @@ msgstr "通道:" msgid "ID:" msgstr "ID:" -msgid "&Specify..." -msgstr "指定(&S)..." - msgid "Sectors:" msgstr "磁區(S):" diff --git a/src/qt/qt_filefield.ui b/src/qt/qt_filefield.ui index 3a1e3e753..91000af50 100644 --- a/src/qt/qt_filefield.ui +++ b/src/qt/qt_filefield.ui @@ -51,7 +51,7 @@ - &Specify... + Browse... From adc5680073720511c2e129c2c338b17152397836 Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Tue, 21 Oct 2025 21:07:59 +0500 Subject: [PATCH 12/27] es-ES.po: Fix a duplicate message warning --- src/qt/languages/es-ES.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qt/languages/es-ES.po b/src/qt/languages/es-ES.po index d1953bcf8..64bb8b526 100644 --- a/src/qt/languages/es-ES.po +++ b/src/qt/languages/es-ES.po @@ -891,7 +891,7 @@ msgstr "Mando de 4 ejes, 4 botones" msgid "2-button gamepad(s)" msgstr "Mando(s) de juegos de 2 botones" -msgid "4-button gamepad" +msgid "3-button gamepad" msgstr "Mando de juegos de 3 botones" msgid "4-button gamepad" From 7f9f2db2fdf61f56eaea1d0f410964426a650ed3 Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Tue, 21 Oct 2025 12:53:52 -0400 Subject: [PATCH 13/27] Throttle fixes --- src/game/joystick_standard.c | 43 +++++++++++++++++++++++++++--------- 1 file changed, 32 insertions(+), 11 deletions(-) diff --git a/src/game/joystick_standard.c b/src/game/joystick_standard.c index 59b3460a2..c0497b05a 100644 --- a/src/game/joystick_standard.c +++ b/src/game/joystick_standard.c @@ -267,9 +267,30 @@ joystick_standard_read_axis_3axis(UNUSED(void *priv), int axis) return joystick_state[gp][0].axis[0]; case 1: return joystick_state[gp][0].axis[1]; - case 2: + case 2: // Rudder Axis return joystick_state[gp][0].axis[2]; - case 3: + case 3: // Throttle Axis + default: + return 0; + } +} + +static int +joystick_standard_read_axis_3axis_throttle(UNUSED(void *priv), int axis) +{ + uint8_t gp = 0; + + if (!JOYSTICK_PRESENT(gp, 0)) + return AXIS_NOT_PRESENT; + + switch (axis) { + case 0: + return joystick_state[gp][0].axis[0]; + case 1: + return joystick_state[gp][0].axis[1]; + case 3: // Throttle Axis + return joystick_state[gp][0].axis[2]; + case 2: // Rudder Axis default: return 0; } @@ -288,10 +309,10 @@ joystick_standard_read_axis_4axis(UNUSED(void *priv), int axis) return joystick_state[gp][0].axis[0]; case 1: return joystick_state[gp][0].axis[1]; - case 2: - return joystick_state[gp][0].axis[2]; - case 3: + case 2: // Rudder Axis return joystick_state[gp][0].axis[3]; + case 3: // Throttle Axis + return joystick_state[gp][0].axis[2]; default: return 0; } @@ -487,7 +508,7 @@ const joystick_t joystick_3axis_2button = { .close = joystick_standard_close, .read = joystick_standard_read, .write = joystick_standard_write, - .read_axis = joystick_standard_read_axis_3axis, + .read_axis = joystick_standard_read_axis_3axis_throttle, .a0_over = joystick_standard_a0_over, .axis_count = 3, .button_count = 2, @@ -505,7 +526,7 @@ const joystick_t joystick_3axis_3button = { .close = joystick_standard_close, .read = joystick_standard_read_3button, .write = joystick_standard_write, - .read_axis = joystick_standard_read_axis_3axis, + .read_axis = joystick_standard_read_axis_3axis_throttle, .a0_over = joystick_standard_a0_over, .axis_count = 3, .button_count = 3, @@ -523,7 +544,7 @@ const joystick_t joystick_3axis_4button = { .close = joystick_standard_close, .read = joystick_standard_read_4button, .write = joystick_standard_write, - .read_axis = joystick_standard_read_axis_3axis, + .read_axis = joystick_standard_read_axis_3axis_throttle, .a0_over = joystick_standard_a0_over, .axis_count = 3, .button_count = 4, @@ -740,7 +761,7 @@ const joystick_t joystick_2button_yoke_throttle = { .close = joystick_standard_close, .read = joystick_standard_read, .write = joystick_standard_write, - .read_axis = joystick_standard_read_axis_3axis, + .read_axis = joystick_standard_read_axis_3axis_throttle, .a0_over = joystick_standard_a0_over, .axis_count = 3, .button_count = 2, @@ -758,7 +779,7 @@ const joystick_t joystick_3button_yoke_throttle = { .close = joystick_standard_close, .read = joystick_standard_read_3button, .write = joystick_standard_write, - .read_axis = joystick_standard_read_axis_3axis, + .read_axis = joystick_standard_read_axis_3axis_throttle, .a0_over = joystick_standard_a0_over, .axis_count = 3, .button_count = 3, @@ -776,7 +797,7 @@ const joystick_t joystick_4button_yoke_throttle = { .close = joystick_standard_close, .read = joystick_standard_read_4button, .write = joystick_standard_write, - .read_axis = joystick_standard_read_axis_3axis, + .read_axis = joystick_standard_read_axis_3axis_throttle, .a0_over = joystick_standard_a0_over, .axis_count = 3, .button_count = 4, From 6339f65087412b84ae69156036233cfcc6c486cb Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Tue, 21 Oct 2025 14:04:17 -0400 Subject: [PATCH 14/27] Swap axis names on CH products things with pedals --- src/game/joystick_ch_flightstick_pro.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/game/joystick_ch_flightstick_pro.c b/src/game/joystick_ch_flightstick_pro.c index 5c35b85a8..4d8a4cf29 100644 --- a/src/game/joystick_ch_flightstick_pro.c +++ b/src/game/joystick_ch_flightstick_pro.c @@ -256,7 +256,7 @@ const joystick_t joystick_ch_flightstick_ch_pedals = { .button_count = 2, .pov_count = 0, .max_joysticks = 1, - .axis_names = { "X axis (Roll)", "Y axis (Pitch)", "Throttle", "Rudder (Yaw)" }, + .axis_names = { "X axis (Roll)", "Y axis (Pitch)", "Rudder (Yaw)", "Throttle" }, .button_names = { "Trigger", "Button 2" }, .pov_names = { NULL } }; @@ -274,7 +274,7 @@ const joystick_t joystick_ch_flightstick_ch_pedals_pro = { .button_count = 2, .pov_count = 0, .max_joysticks = 1, - .axis_names = { "X axis (Roll)", "Y axis (Pitch)", "Right Pedal", "Left Pedal" }, + .axis_names = { "X axis (Roll)", "Y axis (Pitch)", "Left Pedal", "Right Pedal" }, .button_names = { "Trigger", "Button 2" }, .pov_names = { NULL } }; @@ -310,7 +310,7 @@ const joystick_t joystick_ch_flightstick_pro_ch_pedals = { .button_count = 4, .pov_count = 1, .max_joysticks = 1, - .axis_names = { "X axis (Roll)", "Y axis (Pitch)", "Throttle", "Rudder (Yaw)" }, + .axis_names = { "X axis (Roll)", "Y axis (Pitch)", "Rudder (Yaw)", "Throttle" }, .button_names = { "Trigger", "Button 2", "Button 3", "Button 4" }, .pov_names = { "POV" } }; @@ -328,7 +328,7 @@ const joystick_t joystick_ch_flightstick_pro_ch_pedals_pro = { .button_count = 4, .pov_count = 1, .max_joysticks = 1, - .axis_names = { "X axis (Roll)", "Y axis (Pitch)", "Right Pedal", "Left Pedal" }, + .axis_names = { "X axis (Roll)", "Y axis (Pitch)", "Left Pedal", "Right Pedal" }, .button_names = { "Trigger", "Button 2", "Button 3", "Button 4" }, .pov_names = { "POV" } }; @@ -364,7 +364,7 @@ const joystick_t joystick_ch_virtual_pilot_ch_pedals = { .button_count = 2, .pov_count = 0, .max_joysticks = 1, - .axis_names = { "X axis (Roll)", "Y axis (Pitch)", "Throttle", "Rudder (Yaw)" }, + .axis_names = { "X axis (Roll)", "Y axis (Pitch)", "Rudder (Yaw)", "Throttle" }, .button_names = { "Button 1", "Button 2" }, .pov_names = { NULL } }; @@ -382,7 +382,7 @@ const joystick_t joystick_ch_virtual_pilot_ch_pedals_pro = { .button_count = 2, .pov_count = 0, .max_joysticks = 1, - .axis_names = { "X axis (Roll)", "Y axis (Pitch)", "Right Pedal", "Left Pedal" }, + .axis_names = { "X axis (Roll)", "Y axis (Pitch)", "Left Pedal", "Right Pedal" }, .button_names = { "Button 1", "Button 2" }, .pov_names = { NULL } }; @@ -418,7 +418,7 @@ const joystick_t joystick_ch_virtual_pilot_pro_ch_pedals = { .button_count = 6, .pov_count = 2, .max_joysticks = 1, - .axis_names = { "X axis (Roll)", "Y axis (Pitch)", "Throttle", "Rudder (Yaw)" }, + .axis_names = { "X axis (Roll)", "Y axis (Pitch)", "Rudder (Yaw)", "Throttle" }, .button_names = { "Button 1", "Button 2", "Button 3", "Button 4", "Button 5", "Button 6" }, .pov_names = { "Right POV", "Left POV" } }; @@ -436,7 +436,7 @@ const joystick_t joystick_ch_virtual_pilot_pro_ch_pedals_pro = { .button_count = 6, .pov_count = 2, .max_joysticks = 1, - .axis_names = { "X axis (Roll)", "Y axis (Pitch)", "Right Pedal", "Left Pedal" }, + .axis_names = { "X axis (Roll)", "Y axis (Pitch)", "Left Pedal", "Right Pedal" }, .button_names = { "Button 1", "Button 2", "Button 3", "Button 4", "Button 5", "Button 6" }, .pov_names = { "Right POV", "Left POV" } }; From b36381e76cce06d82aee3a23401b4b62d3b454ea Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Tue, 21 Oct 2025 16:46:09 -0400 Subject: [PATCH 15/27] Share Joystick code --- src/game/joystick_ch_flightstick_pro.c | 217 ++++++++----------------- src/game/joystick_standard.c | 38 +++-- src/game/joystick_tm_fcs.c | 68 ++------ src/include/86box/joystick.h | 27 +++ 4 files changed, 133 insertions(+), 217 deletions(-) create mode 100644 src/include/86box/joystick.h diff --git a/src/game/joystick_ch_flightstick_pro.c b/src/game/joystick_ch_flightstick_pro.c index 4d8a4cf29..cefb86e73 100644 --- a/src/game/joystick_ch_flightstick_pro.c +++ b/src/game/joystick_ch_flightstick_pro.c @@ -44,34 +44,7 @@ #include <86box/timer.h> #include <86box/gameport.h> #include <86box/plat_unused.h> - -static void * -ch_flightstick_pro_init(void) -{ - return NULL; -} - -static void -ch_flightstick_pro_close(UNUSED(void *priv)) -{ - // -} - -static uint8_t -ch_flightstick_read(UNUSED(void *priv)) -{ - uint8_t ret = 0xf0; - uint8_t gp = 0; - - if (JOYSTICK_PRESENT(gp, 0)) { - if (joystick_state[gp][0].button[0]) - ret &= ~0x10; - if (joystick_state[gp][0].button[1]) - ret &= ~0x20; - } - - return ret; -} +#include <86box/joystick.h> static uint8_t ch_flightstick_pro_read(UNUSED(void *priv)) @@ -169,71 +142,15 @@ ch_virtual_pilot_pro_read(UNUSED(void *priv)) return ret; } -static void -ch_flightstick_pro_write(UNUSED(void *priv)) -{ - // -} - -static int -ch_flightstick_pro_read_axis(UNUSED(void *priv), int axis) -{ - uint8_t gp = 0; - - if (!JOYSTICK_PRESENT(gp, 0)) - return AXIS_NOT_PRESENT; - - switch (axis) { - case 0: - return joystick_state[gp][0].axis[0]; - case 1: - return joystick_state[gp][0].axis[1]; - case 2: - return 0; - case 3: - return joystick_state[gp][0].axis[2]; - default: - return 0; - } -} - -static int -ch_flightstick_pro_ch_pedals_read_axis(UNUSED(void *priv), int axis) -{ - uint8_t gp = 0; - - if (!JOYSTICK_PRESENT(gp, 0)) - return AXIS_NOT_PRESENT; - - switch (axis) { - case 0: - return joystick_state[gp][0].axis[0]; - case 1: - return joystick_state[gp][0].axis[1]; - case 2: - return joystick_state[gp][0].axis[3]; - case 3: - return joystick_state[gp][0].axis[2]; - default: - return 0; - } -} - -static void -ch_flightstick_pro_a0_over(UNUSED(void *priv)) -{ - // -} - const joystick_t joystick_ch_flightstick = { .name = "CH Flightstick", .internal_name = "ch_flightstick", - .init = ch_flightstick_pro_init, - .close = ch_flightstick_pro_close, - .read = ch_flightstick_read, - .write = ch_flightstick_pro_write, - .read_axis = ch_flightstick_pro_read_axis, - .a0_over = ch_flightstick_pro_a0_over, + .init = joystick_standard_init, + .close = joystick_standard_close, + .read = joystick_standard_read_2button, + .write = joystick_standard_write, + .read_axis = joystick_standard_read_axis_3axis_throttle, + .a0_over = joystick_standard_a0_over, .axis_count = 3, .button_count = 2, .pov_count = 0, @@ -246,12 +163,12 @@ const joystick_t joystick_ch_flightstick = { const joystick_t joystick_ch_flightstick_ch_pedals = { .name = "CH Flightstick + CH Pedals", .internal_name = "ch_flightstick_ch_pedals", - .init = ch_flightstick_pro_init, - .close = ch_flightstick_pro_close, - .read = ch_flightstick_read, - .write = ch_flightstick_pro_write, - .read_axis = ch_flightstick_pro_ch_pedals_read_axis, - .a0_over = ch_flightstick_pro_a0_over, + .init = joystick_standard_init, + .close = joystick_standard_close, + .read = joystick_standard_read_2button, + .write = joystick_standard_write, + .read_axis = joystick_standard_read_axis_4axis, + .a0_over = joystick_standard_a0_over, .axis_count = 4, .button_count = 2, .pov_count = 0, @@ -264,12 +181,12 @@ const joystick_t joystick_ch_flightstick_ch_pedals = { const joystick_t joystick_ch_flightstick_ch_pedals_pro = { .name = "CH Flightstick + CH Pedals Pro", .internal_name = "ch_flightstick_ch_pedals_pro", - .init = ch_flightstick_pro_init, - .close = ch_flightstick_pro_close, - .read = ch_flightstick_read, - .write = ch_flightstick_pro_write, - .read_axis = ch_flightstick_pro_ch_pedals_read_axis, - .a0_over = ch_flightstick_pro_a0_over, + .init = joystick_standard_init, + .close = joystick_standard_close, + .read = joystick_standard_read_2button, + .write = joystick_standard_write, + .read_axis = joystick_standard_read_axis_4axis, + .a0_over = joystick_standard_a0_over, .axis_count = 4, .button_count = 2, .pov_count = 0, @@ -282,12 +199,12 @@ const joystick_t joystick_ch_flightstick_ch_pedals_pro = { const joystick_t joystick_ch_flightstick_pro = { .name = "CH Flightstick Pro", .internal_name = "ch_flightstick_pro", - .init = ch_flightstick_pro_init, - .close = ch_flightstick_pro_close, + .init = joystick_standard_init, + .close = joystick_standard_close, .read = ch_flightstick_pro_read, - .write = ch_flightstick_pro_write, - .read_axis = ch_flightstick_pro_read_axis, - .a0_over = ch_flightstick_pro_a0_over, + .write = joystick_standard_write, + .read_axis = joystick_standard_read_axis_3axis_throttle, + .a0_over = joystick_standard_a0_over, .axis_count = 3, .button_count = 4, .pov_count = 1, @@ -300,12 +217,12 @@ const joystick_t joystick_ch_flightstick_pro = { const joystick_t joystick_ch_flightstick_pro_ch_pedals = { .name = "CH Flightstick Pro + CH Pedals", .internal_name = "ch_flightstick_pro_ch_pedals", - .init = ch_flightstick_pro_init, - .close = ch_flightstick_pro_close, + .init = joystick_standard_init, + .close = joystick_standard_close, .read = ch_flightstick_pro_read, - .write = ch_flightstick_pro_write, - .read_axis = ch_flightstick_pro_ch_pedals_read_axis, - .a0_over = ch_flightstick_pro_a0_over, + .write = joystick_standard_write, + .read_axis = joystick_standard_read_axis_4axis, + .a0_over = joystick_standard_a0_over, .axis_count = 4, .button_count = 4, .pov_count = 1, @@ -318,12 +235,12 @@ const joystick_t joystick_ch_flightstick_pro_ch_pedals = { const joystick_t joystick_ch_flightstick_pro_ch_pedals_pro = { .name = "CH Flightstick Pro + CH Pedals Pro", .internal_name = "ch_flightstick_pro_ch_pedals_pro", - .init = ch_flightstick_pro_init, - .close = ch_flightstick_pro_close, + .init = joystick_standard_init, + .close = joystick_standard_close, .read = ch_flightstick_pro_read, - .write = ch_flightstick_pro_write, - .read_axis = ch_flightstick_pro_ch_pedals_read_axis, - .a0_over = ch_flightstick_pro_a0_over, + .write = joystick_standard_write, + .read_axis = joystick_standard_read_axis_4axis, + .a0_over = joystick_standard_a0_over, .axis_count = 4, .button_count = 4, .pov_count = 1, @@ -336,12 +253,12 @@ const joystick_t joystick_ch_flightstick_pro_ch_pedals_pro = { const joystick_t joystick_ch_virtual_pilot = { .name = "CH Virtual Pilot", .internal_name = "ch_virtual_pilot", - .init = ch_flightstick_pro_init, - .close = ch_flightstick_pro_close, - .read = ch_flightstick_read, - .write = ch_flightstick_pro_write, - .read_axis = ch_flightstick_pro_read_axis, - .a0_over = ch_flightstick_pro_a0_over, + .init = joystick_standard_init, + .close = joystick_standard_close, + .read = joystick_standard_read_2button, + .write = joystick_standard_write, + .read_axis = joystick_standard_read_axis_3axis_throttle, + .a0_over = joystick_standard_a0_over, .axis_count = 3, .button_count = 2, .pov_count = 0, @@ -354,12 +271,12 @@ const joystick_t joystick_ch_virtual_pilot = { const joystick_t joystick_ch_virtual_pilot_ch_pedals = { .name = "CH Virtual Pilot + CH Pedals", .internal_name = "ch_virtual_pilot_ch_pedals", - .init = ch_flightstick_pro_init, - .close = ch_flightstick_pro_close, - .read = ch_flightstick_read, - .write = ch_flightstick_pro_write, - .read_axis = ch_flightstick_pro_ch_pedals_read_axis, - .a0_over = ch_flightstick_pro_a0_over, + .init = joystick_standard_init, + .close = joystick_standard_close, + .read = joystick_standard_read_2button, + .write = joystick_standard_write, + .read_axis = joystick_standard_read_axis_4axis, + .a0_over = joystick_standard_a0_over, .axis_count = 4, .button_count = 2, .pov_count = 0, @@ -372,12 +289,12 @@ const joystick_t joystick_ch_virtual_pilot_ch_pedals = { const joystick_t joystick_ch_virtual_pilot_ch_pedals_pro = { .name = "CH Virtual Pilot + CH Pedals Pro", .internal_name = "ch_virtual_pilot_ch_pedals_pro", - .init = ch_flightstick_pro_init, - .close = ch_flightstick_pro_close, - .read = ch_flightstick_read, - .write = ch_flightstick_pro_write, - .read_axis = ch_flightstick_pro_ch_pedals_read_axis, - .a0_over = ch_flightstick_pro_a0_over, + .init = joystick_standard_init, + .close = joystick_standard_close, + .read = joystick_standard_read_2button, + .write = joystick_standard_write, + .read_axis = joystick_standard_read_axis_4axis, + .a0_over = joystick_standard_a0_over, .axis_count = 4, .button_count = 2, .pov_count = 0, @@ -390,12 +307,12 @@ const joystick_t joystick_ch_virtual_pilot_ch_pedals_pro = { const joystick_t joystick_ch_virtual_pilot_pro = { .name = "CH Virtual Pilot Pro", .internal_name = "ch_virtual_pilot_pro", - .init = ch_flightstick_pro_init, - .close = ch_flightstick_pro_close, + .init = joystick_standard_init, + .close = joystick_standard_close, .read = ch_virtual_pilot_pro_read, - .write = ch_flightstick_pro_write, - .read_axis = ch_flightstick_pro_read_axis, - .a0_over = ch_flightstick_pro_a0_over, + .write = joystick_standard_write, + .read_axis = joystick_standard_read_axis_3axis_throttle, + .a0_over = joystick_standard_a0_over, .axis_count = 3, .button_count = 6, .pov_count = 2, @@ -408,12 +325,12 @@ const joystick_t joystick_ch_virtual_pilot_pro = { const joystick_t joystick_ch_virtual_pilot_pro_ch_pedals = { .name = "CH Virtual Pilot Pro + CH Pedals", .internal_name = "ch_virtual_pilot_pro_ch_pedals", - .init = ch_flightstick_pro_init, - .close = ch_flightstick_pro_close, + .init = joystick_standard_init, + .close = joystick_standard_close, .read = ch_virtual_pilot_pro_read, - .write = ch_flightstick_pro_write, - .read_axis = ch_flightstick_pro_ch_pedals_read_axis, - .a0_over = ch_flightstick_pro_a0_over, + .write = joystick_standard_write, + .read_axis = joystick_standard_read_axis_4axis, + .a0_over = joystick_standard_a0_over, .axis_count = 4, .button_count = 6, .pov_count = 2, @@ -426,12 +343,12 @@ const joystick_t joystick_ch_virtual_pilot_pro_ch_pedals = { const joystick_t joystick_ch_virtual_pilot_pro_ch_pedals_pro = { .name = "CH Virtual Pilot Pro + CH Pedals Pro", .internal_name = "ch_virtual_pilot_pro_ch_pedals_pro", - .init = ch_flightstick_pro_init, - .close = ch_flightstick_pro_close, + .init = joystick_standard_init, + .close = joystick_standard_close, .read = ch_virtual_pilot_pro_read, - .write = ch_flightstick_pro_write, - .read_axis = ch_flightstick_pro_ch_pedals_read_axis, - .a0_over = ch_flightstick_pro_a0_over, + .write = joystick_standard_write, + .read_axis = joystick_standard_read_axis_4axis, + .a0_over = joystick_standard_a0_over, .axis_count = 4, .button_count = 6, .pov_count = 2, diff --git a/src/game/joystick_standard.c b/src/game/joystick_standard.c index c0497b05a..a9e3da402 100644 --- a/src/game/joystick_standard.c +++ b/src/game/joystick_standard.c @@ -45,13 +45,13 @@ #include <86box/gameport.h> #include <86box/plat_unused.h> -static void * +void * joystick_standard_init(void) { return NULL; } -static void +void joystick_standard_close(UNUSED(void *priv)) { // @@ -101,6 +101,22 @@ joystick_standard_read(UNUSED(void *priv)) return ret; } +uint8_t +joystick_standard_read_2button(UNUSED(void *priv)) +{ + uint8_t gp = 0; + uint8_t ret = 0xf0; + + if (JOYSTICK_PRESENT(gp, 0)) { + if (joystick_state[gp][0].button[0]) + ret &= ~0x10; + if (joystick_state[gp][0].button[1]) + ret &= ~0x20; + } + + return ret; +} + static uint8_t joystick_standard_read_3button(UNUSED(void *priv)) { @@ -119,7 +135,7 @@ joystick_standard_read_3button(UNUSED(void *priv)) return ret; } -static uint8_t +uint8_t joystick_standard_read_4button(UNUSED(void *priv)) { uint8_t gp = 0; @@ -139,7 +155,7 @@ joystick_standard_read_4button(UNUSED(void *priv)) return ret; } -static void +void joystick_standard_write(UNUSED(void *priv)) { // @@ -275,7 +291,7 @@ joystick_standard_read_axis_3axis(UNUSED(void *priv), int axis) } } -static int +int joystick_standard_read_axis_3axis_throttle(UNUSED(void *priv), int axis) { uint8_t gp = 0; @@ -296,7 +312,7 @@ joystick_standard_read_axis_3axis_throttle(UNUSED(void *priv), int axis) } } -static int +int joystick_standard_read_axis_4axis(UNUSED(void *priv), int axis) { uint8_t gp = 0; @@ -369,7 +385,7 @@ joystick_standard_read_axis_8button(UNUSED(void *priv), int axis) } } -static void +void joystick_standard_a0_over(UNUSED(void *priv)) { // @@ -506,7 +522,7 @@ const joystick_t joystick_3axis_2button = { .internal_name = "3axis_2button", .init = joystick_standard_init, .close = joystick_standard_close, - .read = joystick_standard_read, + .read = joystick_standard_read_2button, .write = joystick_standard_write, .read_axis = joystick_standard_read_axis_3axis_throttle, .a0_over = joystick_standard_a0_over, @@ -560,7 +576,7 @@ const joystick_t joystick_4axis_2button = { .internal_name = "4axis_2button", .init = joystick_standard_init, .close = joystick_standard_close, - .read = joystick_standard_read, + .read = joystick_standard_read_2button, .write = joystick_standard_write, .read_axis = joystick_standard_read_axis_4axis, .a0_over = joystick_standard_a0_over, @@ -759,7 +775,7 @@ const joystick_t joystick_2button_yoke_throttle = { .internal_name = "2button_yoke_throttle", .init = joystick_standard_init, .close = joystick_standard_close, - .read = joystick_standard_read, + .read = joystick_standard_read_2button, .write = joystick_standard_write, .read_axis = joystick_standard_read_axis_3axis_throttle, .a0_over = joystick_standard_a0_over, @@ -813,7 +829,7 @@ const joystick_t joystick_steering_wheel_2_button = { .internal_name = "steering_wheel_2_button", .init = joystick_standard_init, .close = joystick_standard_close, - .read = joystick_standard_read, + .read = joystick_standard_read_2button, .write = joystick_standard_write, .read_axis = joystick_standard_read_axis_3axis, .a0_over = joystick_standard_a0_over, diff --git a/src/game/joystick_tm_fcs.c b/src/game/joystick_tm_fcs.c index 93f54db36..1f420ef0c 100644 --- a/src/game/joystick_tm_fcs.c +++ b/src/game/joystick_tm_fcs.c @@ -44,44 +44,7 @@ #include <86box/timer.h> #include <86box/gameport.h> #include <86box/plat_unused.h> - -static void * -tm_fcs_init(void) -{ - return NULL; -} - -static void -tm_fcs_close(UNUSED(void *priv)) -{ - // -} - -static uint8_t -tm_fcs_read(UNUSED(void *priv)) -{ - uint8_t gp = 0; - uint8_t ret = 0xf0; - - if (JOYSTICK_PRESENT(gp, 0)) { - if (joystick_state[gp][0].button[0]) - ret &= ~0x10; - if (joystick_state[gp][0].button[1]) - ret &= ~0x20; - if (joystick_state[gp][0].button[2]) - ret &= ~0x40; - if (joystick_state[gp][0].button[3]) - ret &= ~0x80; - } - - return ret; -} - -static void -tm_fcs_write(UNUSED(void *priv)) -{ - // -} +#include <86box/joystick.h> static int tm_fcs_read_axis(UNUSED(void *priv), int axis) @@ -96,8 +59,6 @@ tm_fcs_read_axis(UNUSED(void *priv), int axis) return joystick_state[gp][0].axis[0]; case 1: return joystick_state[gp][0].axis[1]; - case 2: - return 0; case 3: if (joystick_state[gp][0].pov[0] == -1) return 32767; @@ -110,6 +71,7 @@ tm_fcs_read_axis(UNUSED(void *priv), int axis) if (joystick_state[gp][0].pov[0] >= 225 && joystick_state[gp][0].pov[0] < 315) return 16384; return 0; + case 2: default: return 0; } @@ -147,21 +109,15 @@ tm_fcs_rcs_read_axis(UNUSED(void *priv), int axis) } } -static void -tm_fcs_a0_over(UNUSED(void *priv)) -{ - // -} - const joystick_t joystick_tm_fcs = { .name = "Thrustmaster Flight Control System", .internal_name = "thrustmaster_fcs", - .init = tm_fcs_init, - .close = tm_fcs_close, - .read = tm_fcs_read, - .write = tm_fcs_write, + .init = joystick_standard_init, + .close = joystick_standard_close, + .read = joystick_standard_read_4button, + .write = joystick_standard_write, .read_axis = tm_fcs_read_axis, - .a0_over = tm_fcs_a0_over, + .a0_over = joystick_standard_a0_over, .axis_count = 2, .button_count = 4, .pov_count = 1, @@ -174,12 +130,12 @@ const joystick_t joystick_tm_fcs = { const joystick_t joystick_tm_fcs_rcs = { .name = "Thrustmaster FCS + Rudder Control System", .internal_name = "thrustmaster_fcs_rcs", - .init = tm_fcs_init, - .close = tm_fcs_close, - .read = tm_fcs_read, - .write = tm_fcs_write, + .init = joystick_standard_init, + .close = joystick_standard_close, + .read = joystick_standard_read_4button, + .write = joystick_standard_write, .read_axis = tm_fcs_rcs_read_axis, - .a0_over = tm_fcs_a0_over, + .a0_over = joystick_standard_a0_over, .axis_count = 3, .button_count = 4, .pov_count = 1, diff --git a/src/include/86box/joystick.h b/src/include/86box/joystick.h new file mode 100644 index 000000000..c8cbf32d1 --- /dev/null +++ b/src/include/86box/joystick.h @@ -0,0 +1,27 @@ +/* + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. + * + * This file is part of the 86Box distribution. + * + * Definitions for the analog joystick handlers. + * + * Authors: Jasmine Iwanek, + * + * Copyright 2025 Jasmine Iwanek. + */ +#ifndef EMU_JOYSTICK_H +#define EMU_JOYSTICK_H + +void *joystick_standard_init(void); +void joystick_standard_close(UNUSED(void *priv)); +uint8_t joystick_standard_read_2button(UNUSED(void *priv)); +uint8_t joystick_standard_read_4button(UNUSED(void *priv)); +void joystick_standard_write(UNUSED(void *priv)); +int joystick_standard_read_axis_3axis_throttle(UNUSED(void *priv), int axis); +int joystick_standard_read_axis_4axis(UNUSED(void *priv), int axis); +void joystick_standard_a0_over(UNUSED(void *priv)); + +#endif /*EMU_JOYSTICK_H*/ From 43db1f3dfe8008ea330a34282980de55af69aa3a Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Tue, 21 Oct 2025 18:01:07 -0400 Subject: [PATCH 16/27] Fix typo in gameport.h --- src/include/86box/gameport.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/include/86box/gameport.h b/src/include/86box/gameport.h index 878472a55..a1bec69fb 100644 --- a/src/include/86box/gameport.h +++ b/src/include/86box/gameport.h @@ -183,7 +183,7 @@ extern const joystick_t joystick_2axis_4button; extern const joystick_t joystick_2axis_6button; extern const joystick_t joystick_2axis_8button; -// 2 axis Generic Joysticks +// 3 axis Generic Joysticks extern const joystick_t joystick_3axis_2button; extern const joystick_t joystick_3axis_3button; extern const joystick_t joystick_3axis_4button; From 9c20533d829eb81b7dc09f28cf7d6e394ec6b658 Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Tue, 21 Oct 2025 20:24:03 -0400 Subject: [PATCH 17/27] Correct Throttle and Rudder order on ch pedals --- src/game/joystick_ch_flightstick_pro.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/game/joystick_ch_flightstick_pro.c b/src/game/joystick_ch_flightstick_pro.c index cefb86e73..dc82feb8b 100644 --- a/src/game/joystick_ch_flightstick_pro.c +++ b/src/game/joystick_ch_flightstick_pro.c @@ -173,7 +173,7 @@ const joystick_t joystick_ch_flightstick_ch_pedals = { .button_count = 2, .pov_count = 0, .max_joysticks = 1, - .axis_names = { "X axis (Roll)", "Y axis (Pitch)", "Rudder (Yaw)", "Throttle" }, + .axis_names = { "X axis (Roll)", "Y axis (Pitch)", "Throttle", "Rudder (Yaw)" }, .button_names = { "Trigger", "Button 2" }, .pov_names = { NULL } }; @@ -227,7 +227,7 @@ const joystick_t joystick_ch_flightstick_pro_ch_pedals = { .button_count = 4, .pov_count = 1, .max_joysticks = 1, - .axis_names = { "X axis (Roll)", "Y axis (Pitch)", "Rudder (Yaw)", "Throttle" }, + .axis_names = { "X axis (Roll)", "Y axis (Pitch)", "Throttle", "Rudder (Yaw)" }, .button_names = { "Trigger", "Button 2", "Button 3", "Button 4" }, .pov_names = { "POV" } }; @@ -281,7 +281,7 @@ const joystick_t joystick_ch_virtual_pilot_ch_pedals = { .button_count = 2, .pov_count = 0, .max_joysticks = 1, - .axis_names = { "X axis (Roll)", "Y axis (Pitch)", "Rudder (Yaw)", "Throttle" }, + .axis_names = { "X axis (Roll)", "Y axis (Pitch)", "Throttle", "Rudder (Yaw)" }, .button_names = { "Button 1", "Button 2" }, .pov_names = { NULL } }; @@ -335,7 +335,7 @@ const joystick_t joystick_ch_virtual_pilot_pro_ch_pedals = { .button_count = 6, .pov_count = 2, .max_joysticks = 1, - .axis_names = { "X axis (Roll)", "Y axis (Pitch)", "Rudder (Yaw)", "Throttle" }, + .axis_names = { "X axis (Roll)", "Y axis (Pitch)", "Throttle", "Rudder (Yaw)" }, .button_names = { "Button 1", "Button 2", "Button 3", "Button 4", "Button 5", "Button 6" }, .pov_names = { "Right POV", "Left POV" } }; From 52e22e90fcd631a9bf8e3b9733e72277a48bf73d Mon Sep 17 00:00:00 2001 From: win2kgamer <47463859+win2kgamer@users.noreply.github.com> Date: Tue, 21 Oct 2025 20:29:46 -0500 Subject: [PATCH 18/27] AD1848: I12 bit 4 is read-only, fixes CODEC detection in OS/2 driver --- src/sound/snd_ad1848.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sound/snd_ad1848.c b/src/sound/snd_ad1848.c index 6c32b1892..62c3e35e9 100644 --- a/src/sound/snd_ad1848.c +++ b/src/sound/snd_ad1848.c @@ -344,7 +344,7 @@ ad1848_write(uint16_t addr, uint8_t val, void *priv) case 12: if (ad1848->type >= AD1848_TYPE_CS4248) { - ad1848->regs[12] = 0x80 | (val & 0x70) | (ad1848->regs[12] & 0x0f); + ad1848->regs[12] = 0x80 | (val & 0x60) | (ad1848->regs[12] & 0x0f); if ((ad1848->type >= AD1848_TYPE_CS4231) && (ad1848->type < AD1848_TYPE_CS4235)) { if (val & 0x40) ad1848->fmt_mask |= 0x80; From ceeb2d057dcaf49c24edfe4fbf6bd87424a11dc0 Mon Sep 17 00:00:00 2001 From: win2kgamer <47463859+win2kgamer@users.noreply.github.com> Date: Tue, 21 Oct 2025 20:32:13 -0500 Subject: [PATCH 19/27] AD1848: I18/I19 directly control FM volume on CS4232/4236 non-B --- src/sound/snd_ad1848.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/sound/snd_ad1848.c b/src/sound/snd_ad1848.c index 62c3e35e9..ebfa9423b 100644 --- a/src/sound/snd_ad1848.c +++ b/src/sound/snd_ad1848.c @@ -425,6 +425,19 @@ ad1848_write(uint16_t addr, uint8_t val, void *priv) ad1848->fm_vol_r = (int) ad1848_vols_5bits_aux_gain[val & 0x1f]; } } + if ((ad1848->type >= AD1848_TYPE_CS4232) && (ad1848->type <= AD1848_TYPE_CS4236)) { + if (ad1848->index == 18) { + if (val & 0x80) + ad1848->fm_vol_l = 0; + else + ad1848->fm_vol_l = (int) ad1848_vols_5bits_aux_gain[val & 0x1f]; + } else { + if (val & 0x80) + ad1848->fm_vol_r = 0; + else + ad1848->fm_vol_r = (int) ad1848_vols_5bits_aux_gain[val & 0x1f]; + } + } break; case 20 ... 21: From 71fe92daed87ba1f6ead953d2f50c8c1f94ea8e3 Mon Sep 17 00:00:00 2001 From: win2kgamer <47463859+win2kgamer@users.noreply.github.com> Date: Tue, 21 Oct 2025 20:34:09 -0500 Subject: [PATCH 20/27] AD1848: I23 bits 7-1 are read-only on CS4232/4236 non-B, fixes CS4236 non-B detection on Windows 2000 --- src/sound/snd_ad1848.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sound/snd_ad1848.c b/src/sound/snd_ad1848.c index ebfa9423b..c25890c50 100644 --- a/src/sound/snd_ad1848.c +++ b/src/sound/snd_ad1848.c @@ -521,6 +521,8 @@ readonly_x: } if (ad1848->type == AD1848_TYPE_CS4231) /* I23 is reserved and read-only on CS4231 non-A */ goto readonly_i; + if ((ad1848->type >= AD1848_TYPE_CS4232) || (ad1848->type <= AD1848_TYPE_CS4236)) /* I23 bits 7-1 are read-only on CS4231A/4232/4236 non-B, Win2k relies on this for detection */ + val = (val & 0x01); break; case 24: From 755e25285b55f781757010e4e59e632dd0e6116c Mon Sep 17 00:00:00 2001 From: win2kgamer <47463859+win2kgamer@users.noreply.github.com> Date: Tue, 21 Oct 2025 20:38:21 -0500 Subject: [PATCH 21/27] CS423x: Always enable OPL3 on CS4232/4236 during context switch as they lack X registers --- src/sound/snd_cs423x.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/sound/snd_cs423x.c b/src/sound/snd_cs423x.c index 15ad71782..6c0d9e80b 100644 --- a/src/sound/snd_cs423x.c +++ b/src/sound/snd_cs423x.c @@ -568,7 +568,11 @@ cs423x_ctxswitch_write(uint16_t addr, UNUSED(uint8_t val), void *priv) { cs423x_t *dev = (cs423x_t *) priv; uint8_t ctx = (dev->regs[7] & 0x80); - uint8_t enable_opl = (dev->ad1848.xregs[4] & 0x10) && !(dev->indirect_regs[2] & 0x85); + uint8_t enable_opl = (dev->ad1848.xregs[4] & 0x10) && !(dev->indirect_regs[2] & 0x85); /* CS4236B+ */ + + /* CS4232/4236 (non-B) doesn't have an IFM bit, always enable the OPL on these chips */ + if (dev->type <= CRYSTAL_CS4236) + enable_opl = 1; /* Check if a context switch (WSS=1 <-> SBPro=0) occurred through the address being written. */ if ((dev->regs[7] & 0x80) ? ((addr & 0xfff0) == dev->sb_base) : ((addr & 0xfffc) == dev->wss_base)) { From 429aa7260c507f14c138e3dc841e5e420e19ad2c Mon Sep 17 00:00:00 2001 From: win2kgamer <47463859+win2kgamer@users.noreply.github.com> Date: Tue, 21 Oct 2025 20:40:18 -0500 Subject: [PATCH 22/27] CS423x: Add SBPro OPL3 music handler during SBPro init, fixes OPL3 in SBPro context --- src/sound/snd_cs423x.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sound/snd_cs423x.c b/src/sound/snd_cs423x.c index 6c0d9e80b..78b628b3b 100644 --- a/src/sound/snd_cs423x.c +++ b/src/sound/snd_cs423x.c @@ -1009,6 +1009,7 @@ cs423x_init(const device_t *info) /* Initialize SBPro codec. The WSS codec is initialized later by cs423x_reset */ dev->sb = device_add_inst(&sb_pro_compat_device, 1); sound_set_cd_audio_filter(sbpro_filter_cd_audio, dev->sb); /* CD audio filter for the default context */ + music_add_handler(sb_get_music_buffer_sbpro, dev->sb); /* Init the SBPro OPL3 since sb_pro_compat_init does not */ /* Initialize RAM, registers and WSS codec. */ cs423x_reset(dev); From cee8fa0ae40287561be6dda9677aeeb76be1af1e Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Mon, 22 Sep 2025 00:22:32 -0400 Subject: [PATCH 23/27] Allow PCjr FDC to be disabled --- src/include/86box/m_pcjr.h | 3 +++ src/machine/m_pcjr.c | 10 +++++++++- src/machine/machine_table.c | 4 ++-- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/include/86box/m_pcjr.h b/src/include/86box/m_pcjr.h index 6fb0ee2ed..9b4a7cbaf 100644 --- a/src/include/86box/m_pcjr.h +++ b/src/include/86box/m_pcjr.h @@ -66,6 +66,9 @@ typedef struct pcjr_s { int serial_pos; uint8_t pa; uint8_t pb; + + uint8_t option_fdc; + pc_timer_t send_delay_timer; } pcjr_t; diff --git a/src/machine/m_pcjr.c b/src/machine/m_pcjr.c index 519933b23..c1b7aba9b 100644 --- a/src/machine/m_pcjr.c +++ b/src/machine/m_pcjr.c @@ -41,6 +41,7 @@ #include <86box/rom.h> #include <86box/fdd.h> #include <86box/fdc.h> +#include <86box/fdc_ext.h> #include <86box/sound.h> #include <86box/snd_speaker.h> #include <86box/snd_sn76489.h> @@ -653,6 +654,8 @@ kbd_read(uint16_t port, void *priv) case 0x62: ret = (pcjr->latched ? 1 : 0); ret |= 0x02; /* Modem card not installed */ + if (!pcjr->option_fdc) + ret |= 0x04; /* Diskette card not installed */ if (mem_size < 128) ret |= 0x08; /* 64k expansion card not installed */ if ((pcjr->pb & 0x08) || (cassette == NULL)) @@ -846,6 +849,8 @@ machine_pcjr_init(UNUSED(const machine_t *model)) pcjr = calloc(1, sizeof(pcjr_t)); + pcjr->option_fdc = 0; + is_pcjr = 1; pic_init_pcjr(); @@ -877,7 +882,10 @@ machine_pcjr_init(UNUSED(const machine_t *model)) nmi_mask = 0x80; - device_add(&fdc_pcjr_device); + if (fdc_current[0] == FDC_INTERNAL) { + device_add(&fdc_pcjr_device); + pcjr->option_fdc = 1; + } device_add(&ns8250_pcjr_device); /* So that serial_standalone_init() won't do anything. */ diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index 6bb120b03..8816ce42c 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -300,7 +300,7 @@ const machine_t machines[] = { .max_multi = 0 }, .bus_flags = MACHINE_PCJR, - .flags = MACHINE_VIDEO_FIXED | MACHINE_KEYBOARD | MACHINE_CARTRIDGE, + .flags = MACHINE_VIDEO_FIXED | MACHINE_KEYBOARD | MACHINE_CARTRIDGE | MACHINE_FDC, .ram = { .min = 64, .max = 640, @@ -316,7 +316,7 @@ const machine_t machines[] = { .gpio_acpi = 0xffffffff, .device = NULL, .kbd_device = NULL, - .fdc_device = NULL, + .fdc_device = &fdc_pcjr_device, .sio_device = NULL, .vid_device = &pcjr_device, .snd_device = NULL, From e78d078d627be55fc4941cf7a74fb3e3bd65b620 Mon Sep 17 00:00:00 2001 From: OBattler Date: Wed, 22 Oct 2025 04:59:02 +0200 Subject: [PATCH 24/27] Temporarily disable the touch events commit. --- src/qt/qt_renderercommon.cpp | 2 ++ src/qt/qt_rendererstack.cpp | 50 ++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) diff --git a/src/qt/qt_renderercommon.cpp b/src/qt/qt_renderercommon.cpp index d34cad15b..25d3a5c28 100644 --- a/src/qt/qt_renderercommon.cpp +++ b/src/qt/qt_renderercommon.cpp @@ -220,10 +220,12 @@ RendererCommon::eventDelegate(QEvent *event, bool &result) case QEvent::MouseButtonPress: case QEvent::MouseMove: case QEvent::MouseButtonRelease: +#ifdef TOUCH_PR case QEvent::TouchBegin: case QEvent::TouchEnd: case QEvent::TouchCancel: case QEvent::TouchUpdate: +#endif case QEvent::Wheel: case QEvent::Enter: case QEvent::Leave: diff --git a/src/qt/qt_rendererstack.cpp b/src/qt/qt_rendererstack.cpp index ad8172d11..b95fe3b73 100644 --- a/src/qt/qt_rendererstack.cpp +++ b/src/qt/qt_rendererstack.cpp @@ -35,7 +35,9 @@ #include #include +#ifdef TOUCH_PR #include +#endif #include #include @@ -91,7 +93,9 @@ RendererStack::RendererStack(QWidget *parent, int monitor_index) , ui(new Ui::RendererStack) { boxLayout->setContentsMargins(0, 0, 0, 0); +#ifdef TOUCH_PR setAttribute(Qt::WA_AcceptTouchEvents, true); +#endif #ifdef Q_OS_WINDOWS setAttribute(Qt::WA_NativeWindow, true); (void)winId(); @@ -520,12 +524,22 @@ RendererStack::event(QEvent* event) if (m_monitor_index >= 1) { if (mouse_input_mode >= 1) { +#ifdef TOUCH_PR #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) mouse_x_abs = (mouse_event->position().x()) / (double)width(); mouse_y_abs = (mouse_event->position().y()) / (double)height(); #else mouse_x_abs = (mouse_event->localPos().x()) / (double)width(); mouse_y_abs = (mouse_event->localPos().y()) / (double)height(); +#endif +#else +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + mouse_x_abs = (mouse_event->position().x()) / (long double)width(); + mouse_y_abs = (mouse_event->position().y()) / (long double)height(); +#else + mouse_x_abs = (mouse_event->localPos().x()) / (long double)width(); + mouse_y_abs = (mouse_event->localPos().y()) / (long double)height(); +#endif #endif if (!mouse_tablet_in_proximity) mouse_tablet_in_proximity = mousedata.mouse_tablet_in_proximity; @@ -544,6 +558,7 @@ RendererStack::event(QEvent* event) return QWidget::event(event); } +#ifdef TOUCH_PR #ifdef Q_OS_WINDOWS if (mouse_input_mode == 0) { #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) @@ -574,6 +589,39 @@ RendererStack::event(QEvent* event) #else mouse_x_abs = (mouse_event->localPos().x()) / (double)width(); mouse_y_abs = (mouse_event->localPos().y()) / (double)height(); +#endif +#else +#ifdef Q_OS_WINDOWS + if (mouse_input_mode == 0) { +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + mouse_x_abs = (mouse_event->position().x()) / (long double)width(); + mouse_y_abs = (mouse_event->position().y()) / (long double)height(); +#else + mouse_x_abs = (mouse_event->localPos().x()) / (long double)width(); + mouse_y_abs = (mouse_event->localPos().y()) / (long double)height(); +#endif + mouse_x_abs -= rendererWindow->destinationF.left(); + mouse_y_abs -= rendererWindow->destinationF.top(); + + if (mouse_x_abs < 0) mouse_x_abs = 0; + if (mouse_y_abs < 0) mouse_y_abs = 0; + + mouse_x_abs /= rendererWindow->destinationF.width(); + mouse_y_abs /= rendererWindow->destinationF.height(); + + if (mouse_x_abs > 1) mouse_x_abs = 1; + if (mouse_y_abs > 1) mouse_y_abs = 1; + return QWidget::event(event); + } +#endif + +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + mouse_x_abs = (mouse_event->position().x()) / (long double)width(); + mouse_y_abs = (mouse_event->position().y()) / (long double)height(); +#else + mouse_x_abs = (mouse_event->localPos().x()) / (long double)width(); + mouse_y_abs = (mouse_event->localPos().y()) / (long double)height(); +#endif #endif mouse_x_abs -= rendererWindow->destinationF.left(); mouse_y_abs -= rendererWindow->destinationF.top(); @@ -587,6 +635,7 @@ RendererStack::event(QEvent* event) if (mouse_x_abs > 1) mouse_x_abs = 1; if (mouse_y_abs > 1) mouse_y_abs = 1; mouse_tablet_in_proximity = mousedata.mouse_tablet_in_proximity; +#ifdef TOUCH_PR } else switch (event->type()) { case QEvent::TouchBegin: case QEvent::TouchUpdate: @@ -685,6 +734,7 @@ RendererStack::event(QEvent* event) default: return QWidget::event(event); +#endif } return QWidget::event(event); From 27ac9cf6e6ee577213b35b55d331a0d0ec450de0 Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Tue, 21 Oct 2025 22:07:41 -0400 Subject: [PATCH 25/27] Support for PCjr keyboard IR reciever option Currently disabled as it Error B's --- src/include/86box/m_pcjr.h | 1 + src/machine/m_pcjr.c | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/src/include/86box/m_pcjr.h b/src/include/86box/m_pcjr.h index 9b4a7cbaf..f957252a6 100644 --- a/src/include/86box/m_pcjr.h +++ b/src/include/86box/m_pcjr.h @@ -68,6 +68,7 @@ typedef struct pcjr_s { uint8_t pb; uint8_t option_fdc; + uint8_t option_ir; pc_timer_t send_delay_timer; diff --git a/src/machine/m_pcjr.c b/src/machine/m_pcjr.c index c1b7aba9b..1b9e8a8f4 100644 --- a/src/machine/m_pcjr.c +++ b/src/machine/m_pcjr.c @@ -667,6 +667,8 @@ kbd_read(uint16_t port, void *priv) ret |= (pcjr->data ? 0x40 : 0); if (pcjr->data) ret |= 0x40; + if (pcjr->option_ir) + ret |= 0x80; /* Keyboard cable not connected */ break; case 0xa0: @@ -816,6 +818,19 @@ static const device_config_t pcjr_config[] = { .selection = { { 0 } }, .bios = { { 0 } } }, +#if 0 + { + .name = "ir_reciever", + .description = "Enable IR Reciever", + .type = CONFIG_BINARY, + .default_string = NULL, + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { { 0 } } + }, +#endif { .name = "", .description = "", .type = CONFIG_END } // clang-format on }; @@ -850,6 +865,11 @@ machine_pcjr_init(UNUSED(const machine_t *model)) pcjr = calloc(1, sizeof(pcjr_t)); pcjr->option_fdc = 0; +#if 0 + pcjr->option_ir = device_get_config_int("ir_reciever"); +#else + pcjr->option_ir = 0; +#endif is_pcjr = 1; From 57704c962443a0b0d53232543cbc73b3eaa5e7e8 Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Tue, 21 Oct 2025 23:10:52 -0400 Subject: [PATCH 26/27] Support for Serial card in PCjr modem slot --- src/device/serial.c | 33 ++++++++++++++++++++++++++------- src/include/86box/m_pcjr.h | 1 + src/include/86box/serial.h | 20 +++++++++++--------- src/machine/m_pcjr.c | 33 ++++++++++++++++++++++++++++----- 4 files changed, 66 insertions(+), 21 deletions(-) diff --git a/src/device/serial.c b/src/device/serial.c index 63f20cbee..38220485f 100644 --- a/src/device/serial.c +++ b/src/device/serial.c @@ -141,7 +141,7 @@ serial_update_ints(serial_t *dev) } } - serial_do_irq(dev, !(dev->iir & 0x01) && ((dev->mctrl & 8) || (dev->type == SERIAL_8250_PCJR))); + serial_do_irq(dev, !(dev->iir & 0x01) && ((dev->mctrl & 8) || ((dev->type == SERIAL_8250_PCJR_3F8) || (dev->type == SERIAL_8250_PCJR_2F8)))); } static void @@ -971,15 +971,20 @@ serial_init(const device_t *info) serial_setup(dev, COM4_ADDR, COM4_IRQ); else if (next_inst == 2) serial_setup(dev, COM3_ADDR, COM3_IRQ); - else if ((next_inst == 1) || (info->local == SERIAL_8250_PCJR)) + else if ((next_inst == 1) || (info->local == SERIAL_8250_PCJR_2F8)) serial_setup(dev, COM2_ADDR, COM2_IRQ); + // TODO +#if 0 + else if ((next_inst == 1) || (info->local == SERIAL_8250_PCJR_3F8)) + serial_setup(dev, COM1_ADDR, COM1_IRQ); +#endif else if (next_inst == 0) serial_setup(dev, COM1_ADDR, COM1_IRQ); /* Default to 1200,N,7. */ dev->dlab = 96; dev->fcr = 0x06; - if (info->local == SERIAL_8250_PCJR) + if ((info->local == SERIAL_8250_PCJR_3F8) || (info->local == SERIAL_8250_PCJR_2F8)) dev->clock_src = 1789500.0; else dev->clock_src = 1843200.0; @@ -1039,11 +1044,25 @@ const device_t ns8250_device = { .config = NULL }; -const device_t ns8250_pcjr_device = { - .name = "National Semiconductor 8250(-compatible) UART for PCjr", - .internal_name = "ns8250_pcjr", +const device_t ns8250_pcjr_3f8_device = { + .name = "National Semiconductor 8250(-compatible) UART for PCjr (0x3f8)", + .internal_name = "ns8250_pcjr_3f8", .flags = 0, - .local = SERIAL_8250_PCJR, + .local = SERIAL_8250_PCJR_3F8, + .init = serial_init, + .close = serial_close, + .reset = serial_reset, + .available = NULL, + .speed_changed = serial_speed_changed, + .force_redraw = NULL, + .config = NULL +}; + +const device_t ns8250_pcjr_2f8_device = { + .name = "National Semiconductor 8250(-compatible) UART for PCjr (0x2f8)", + .internal_name = "ns8250_pcjr_2f8", + .flags = 0, + .local = SERIAL_8250_PCJR_2F8, .init = serial_init, .close = serial_close, .reset = serial_reset, diff --git a/src/include/86box/m_pcjr.h b/src/include/86box/m_pcjr.h index f957252a6..f1a31954d 100644 --- a/src/include/86box/m_pcjr.h +++ b/src/include/86box/m_pcjr.h @@ -67,6 +67,7 @@ typedef struct pcjr_s { uint8_t pa; uint8_t pb; + uint8_t option_modem; uint8_t option_fdc; uint8_t option_ir; diff --git a/src/include/86box/serial.h b/src/include/86box/serial.h index 5231c491a..816672825 100644 --- a/src/include/86box/serial.h +++ b/src/include/86box/serial.h @@ -20,14 +20,15 @@ #ifndef EMU_SERIAL_H #define EMU_SERIAL_H -#define SERIAL_8250 0 -#define SERIAL_8250_PCJR 1 -#define SERIAL_16450 2 -#define SERIAL_16550 3 -#define SERIAL_16650 4 -#define SERIAL_16750 5 -#define SERIAL_16850 6 -#define SERIAL_16950 7 +#define SERIAL_8250 0 +#define SERIAL_8250_PCJR_3F8 1 +#define SERIAL_8250_PCJR_2F8 2 +#define SERIAL_16450 3 +#define SERIAL_16550 4 +#define SERIAL_16650 5 +#define SERIAL_16750 6 +#define SERIAL_16850 7 +#define SERIAL_16950 8 #define SERIAL_FIFO_SIZE 16 @@ -151,7 +152,8 @@ extern int serial_get_ri(serial_t *dev); extern uint8_t serial_get_shadow(serial_t *dev); extern const device_t ns8250_device; -extern const device_t ns8250_pcjr_device; +extern const device_t ns8250_pcjr_3f8_device; +extern const device_t ns8250_pcjr_2f8_device; extern const device_t ns16450_device; extern const device_t ns16550_device; extern const device_t ns16650_device; diff --git a/src/machine/m_pcjr.c b/src/machine/m_pcjr.c index 1b9e8a8f4..047c0201d 100644 --- a/src/machine/m_pcjr.c +++ b/src/machine/m_pcjr.c @@ -653,7 +653,8 @@ kbd_read(uint16_t port, void *priv) case 0x62: ret = (pcjr->latched ? 1 : 0); - ret |= 0x02; /* Modem card not installed */ + if (!pcjr->option_modem) + ret |= 0x02; /* Modem card not installed */ if (!pcjr->option_fdc) ret |= 0x04; /* Diskette card not installed */ if (mem_size < 128) @@ -819,6 +820,17 @@ static const device_config_t pcjr_config[] = { .bios = { { 0 } } }, #if 0 + { + .name = "modem_slot", + .description = "Enable Serial Port in Modem Slot", + .type = CONFIG_BINARY, + .default_string = NULL, + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { { 0 } } + }, { .name = "ir_reciever", .description = "Enable IR Reciever", @@ -864,11 +876,16 @@ machine_pcjr_init(UNUSED(const machine_t *model)) pcjr = calloc(1, sizeof(pcjr_t)); - pcjr->option_fdc = 0; #if 0 - pcjr->option_ir = device_get_config_int("ir_reciever"); + pcjr->option_modem = device_get_config_int("modem_slot"); #else - pcjr->option_ir = 0; + pcjr->option_modem = 0; +#endif + pcjr->option_fdc = 0; +#if 0 + pcjr->option_ir = device_get_config_int("ir_reciever"); +#else + pcjr->option_ir = 0; #endif is_pcjr = 1; @@ -907,7 +924,13 @@ machine_pcjr_init(UNUSED(const machine_t *model)) pcjr->option_fdc = 1; } - device_add(&ns8250_pcjr_device); + if (!pcjr->option_modem) + device_add(&ns8250_pcjr_2f8_device); + else { + device_add(&ns8250_pcjr_3f8_device); + device_add(&ns8250_pcjr_2f8_device); + } + /* So that serial_standalone_init() won't do anything. */ serial_set_next_inst(SERIAL_MAX - 1); From 5a24fda546fe6da9e3ef5b902fd29ebfce202b16 Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Tue, 21 Oct 2025 23:29:45 -0400 Subject: [PATCH 27/27] Minor cleanups in m_pcjr.c --- src/machine/m_pcjr.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/machine/m_pcjr.c b/src/machine/m_pcjr.c index 047c0201d..77a0ee392 100644 --- a/src/machine/m_pcjr.c +++ b/src/machine/m_pcjr.c @@ -907,9 +907,13 @@ machine_pcjr_init(UNUSED(const machine_t *model)) keyboard_scan = 1; key_queue_start = key_queue_end = 0; io_sethandler(0x0060, 4, - kbd_read, NULL, NULL, kbd_write, NULL, NULL, pcjr); + kbd_read, NULL, NULL, + kbd_write, NULL, NULL, + pcjr); io_sethandler(0x00a0, 8, - kbd_read, NULL, NULL, kbd_write, NULL, NULL, pcjr); + kbd_read, NULL, NULL, + kbd_write, NULL, NULL, + pcjr); timer_add(&pcjr->send_delay_timer, kbd_poll, pcjr, 1); keyboard_set_table(scancode_pcjr); keyboard_send = kbd_adddata_ex;