From 2fff98423beb9619bff643cac7f70297409db38d Mon Sep 17 00:00:00 2001 From: OBattler Date: Tue, 5 Mar 2024 20:36:33 +0100 Subject: [PATCH 01/33] Added the Everex Maxi Magic EV-165A, closes #2956. --- src/device/isamem.c | 123 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 123 insertions(+) diff --git a/src/device/isamem.c b/src/device/isamem.c index 5b880d6eb44..8eb4b55f6f2 100644 --- a/src/device/isamem.c +++ b/src/device/isamem.c @@ -97,6 +97,7 @@ #define ISAMEM_RAMPAGEXT_CARD 11 #define ISAMEM_ABOVEBOARD_CARD 12 #define ISAMEM_BRAT_CARD 13 +#define ISAMEM_EV165A_CARD 14 #define ISAMEM_DEBUG 0 @@ -452,6 +453,18 @@ isamem_init(const device_t *info) dev->frame_addr = 0xE0000; break; + case ISAMEM_EV165A_CARD: /* Everex Maxi Magic EV-165A */ + dev->base_addr = device_get_config_hex16("base"); + dev->total_size = device_get_config_int("size"); + dev->start_addr = device_get_config_int("start"); + tot = device_get_config_int("length"); + if (!!device_get_config_int("speed")) + dev->flags |= FLAG_FAST; + if (!!device_get_config_int("ems")) + dev->flags |= FLAG_EMS; + dev->frame_addr = 0xE0000; + break; + case ISAMEM_RAMPAGEXT_CARD: /* AST RAMpage/XT */ case ISAMEM_ABOVEBOARD_CARD: /* Intel AboveBoard */ case ISAMEM_BRAT_CARD: /* BocaRAM/AT */ @@ -1238,6 +1251,115 @@ static const device_t ev159_device = { .config = ev159_config }; +static const device_config_t ev165a_config[] = { + // clang-format off + { + .name = "size", + .description = "Memory Size", + .type = CONFIG_SPINNER, + .default_string = "", + .default_int = 512, + .file_filter = "", + .spinner = { + .min = 0, + .max = 2048, + .step = 512 + }, + .selection = { { 0 } } + }, + { + .name = "start", + .description = "Start Address", + .type = CONFIG_SPINNER, + .default_string = "", + .default_int = 0, + .file_filter = "", + .spinner = { + .min = 0, + .max = 896, + .step = 128 + }, + .selection = { { 0 } } + }, + { + .name = "length", + .description = "Contiguous Size", + .type = CONFIG_SPINNER, + .default_string = "", + .default_int = 0, + .file_filter = "", + .spinner = { + .min = 0, + .max = 16384, + .step = 128 + }, + .selection = { { 0 } } + }, + { + .name = "speed", + .description = "Transfer Speed", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "Standard (150ns)", .value = 0 }, + { .description = "High-Speed (120ns)", .value = 1 }, + { .description = "" } + } + }, + { + .name = "ems", + .description = "EMS mode", + .type = CONFIG_SELECTION, + .default_string = "", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "Disabled", .value = 0 }, + { .description = "Enabled", .value = 1 }, + { .description = "" } + }, + }, + { + .name = "base", + .description = "Address", + .type = CONFIG_HEX16, + .default_string = "", + .default_int = 0x0258, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "208H", .value = 0x0208 }, + { .description = "218H", .value = 0x0218 }, + { .description = "258H", .value = 0x0258 }, + { .description = "268H", .value = 0x0268 }, + { .description = "2A8H", .value = 0x02A8 }, + { .description = "2B8H", .value = 0x02B8 }, + { .description = "2E8H", .value = 0x02E8 }, + { .description = "" } + }, + }, + { .name = "", .description = "", .type = CONFIG_END } + // clang-format on +}; + +static const device_t ev165a_device = { + .name = "Everex Magi Magic EV-165A", + .internal_name = "ev159", + .flags = DEVICE_ISA, + .local = ISAMEM_EV165A_CARD, + .init = isamem_init, + .close = isamem_close, + .reset = NULL, + { .available = NULL }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = ev165a_config +}; + #if defined(DEV_BRANCH) && defined(USE_ISAMEM_BRAT) static const device_config_t brat_config[] = { // clang-format off @@ -1560,6 +1682,7 @@ static const struct { { &a6pak_device }, { &ems5150_device }, { &ev159_device }, + { &ev165a_device }, #if defined(DEV_BRANCH) && defined(USE_ISAMEM_BRAT) { &brat_device }, #endif From 1bfe1bbf7a5dbcc3434ef3b6343139c23f1d101b Mon Sep 17 00:00:00 2001 From: OBattler Date: Wed, 6 Mar 2024 01:27:25 +0100 Subject: [PATCH 02/33] Removed the speed setting from the Everex 165A. --- src/device/isamem.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/device/isamem.c b/src/device/isamem.c index 8eb4b55f6f2..1237a9891a3 100644 --- a/src/device/isamem.c +++ b/src/device/isamem.c @@ -458,8 +458,6 @@ isamem_init(const device_t *info) dev->total_size = device_get_config_int("size"); dev->start_addr = device_get_config_int("start"); tot = device_get_config_int("length"); - if (!!device_get_config_int("speed")) - dev->flags |= FLAG_FAST; if (!!device_get_config_int("ems")) dev->flags |= FLAG_EMS; dev->frame_addr = 0xE0000; @@ -1295,20 +1293,6 @@ static const device_config_t ev165a_config[] = { }, .selection = { { 0 } } }, - { - .name = "speed", - .description = "Transfer Speed", - .type = CONFIG_SELECTION, - .default_string = "", - .default_int = 0, - .file_filter = "", - .spinner = { 0 }, - .selection = { - { .description = "Standard (150ns)", .value = 0 }, - { .description = "High-Speed (120ns)", .value = 1 }, - { .description = "" } - } - }, { .name = "ems", .description = "EMS mode", From 5d486f5faa2f6ab17df6c49271b2ef391fb4f563 Mon Sep 17 00:00:00 2001 From: OBattler Date: Wed, 6 Mar 2024 06:46:53 +0100 Subject: [PATCH 03/33] EV-165A: Fix internal name. --- src/device/isamem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/device/isamem.c b/src/device/isamem.c index 1237a9891a3..70f51ce8d47 100644 --- a/src/device/isamem.c +++ b/src/device/isamem.c @@ -1332,7 +1332,7 @@ static const device_config_t ev165a_config[] = { static const device_t ev165a_device = { .name = "Everex Magi Magic EV-165A", - .internal_name = "ev159", + .internal_name = "ev165a", .flags = DEVICE_ISA, .local = ISAMEM_EV165A_CARD, .init = isamem_init, From 6d1c91c8cefc9a7e85f75f1616ab35e8c5548d20 Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Wed, 6 Mar 2024 15:10:51 +0600 Subject: [PATCH 04/33] Add Vision Systems LBA Enhancer --- src/86box.c | 4 + src/config.c | 7 ++ src/disk/CMakeLists.txt | 2 +- src/disk/lba_enhancer.c | 97 ++++++++++++++++++++++++ src/include/86box/86box.h | 1 + src/include/86box/hdc.h | 3 + src/qt/qt_settingsstoragecontrollers.cpp | 16 ++++ src/qt/qt_settingsstoragecontrollers.hpp | 4 + src/qt/qt_settingsstoragecontrollers.ui | 85 +++++++++++++++------ 9 files changed, 194 insertions(+), 25 deletions(-) create mode 100644 src/disk/lba_enhancer.c diff --git a/src/86box.c b/src/86box.c index 8218c208cf3..ca0f8b0ff4b 100644 --- a/src/86box.c +++ b/src/86box.c @@ -181,6 +181,7 @@ int gfxcard[2] = { 0, 0 }; /* (C) graphic int show_second_monitors = 1; /* (C) show non-primary monitors */ int sound_is_float = 1; /* (C) sound uses FP values */ int voodoo_enabled = 0; /* (C) video option */ +int lba_enhancer_enabled = 0; /* (C) enable Vision Systems LBA Enhancer */ int ibm8514_standalone_enabled = 0; /* (C) video option */ int xga_standalone_enabled = 0; /* (C) video option */ uint32_t mem_size = 0; /* (C) memory size (Installed on @@ -1226,6 +1227,9 @@ pc_reset_hard_init(void) device_add(&postcard_device); if (unittester_enabled) device_add(&unittester_device); + + if (lba_enhancer_enabled) + device_add(&lba_enhancer_device); if (IS_ARCH(machine, MACHINE_BUS_PCI)) { pci_register_cards(); diff --git a/src/config.c b/src/config.c index 3e4fd72221f..9ca14828929 100644 --- a/src/config.c +++ b/src/config.c @@ -876,6 +876,8 @@ load_storage_controllers(void) path_normalize(cart_fns[c]); } } + + lba_enhancer_enabled = !!ini_section_get_int(cat, "lba_enhancer_enabled", 0); } /* Load "Hard Disks" section. */ @@ -2341,6 +2343,11 @@ save_storage_controllers(void) else ini_section_set_string(cat, temp, cart_fns[c]); } + + if (lba_enhancer_enabled == 0) + ini_section_delete_var(cat, "lba_enhancer_enabled"); + else + ini_section_set_int(cat, "lba_enhancer_enabled", 1); } /* Save "Other Peripherals" section. */ diff --git a/src/disk/CMakeLists.txt b/src/disk/CMakeLists.txt index 310354ccf28..87b9593fae8 100644 --- a/src/disk/CMakeLists.txt +++ b/src/disk/CMakeLists.txt @@ -16,7 +16,7 @@ add_library(hdd OBJECT hdd.c hdd_image.c hdd_table.c hdc.c hdc_st506_xt.c hdc_st506_at.c hdc_xta.c hdc_esdi_at.c hdc_esdi_mca.c hdc_xtide.c hdc_ide.c hdc_ide_ali5213.c hdc_ide_opti611.c hdc_ide_cmd640.c hdc_ide_cmd646.c - hdc_ide_sff8038i.c hdc_ide_um8673f.c hdc_ide_w83769f.c) + hdc_ide_sff8038i.c hdc_ide_um8673f.c hdc_ide_w83769f.c lba_enhancer.c) add_library(zip OBJECT zip.c) diff --git a/src/disk/lba_enhancer.c b/src/disk/lba_enhancer.c new file mode 100644 index 00000000000..07b958b2ed4 --- /dev/null +++ b/src/disk/lba_enhancer.c @@ -0,0 +1,97 @@ +/* + * 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. + * + * Vision Systems LBA Enhancer emulation. + * + * + * + * Authors: Cacodemon345 + * + * Copyright 2024 Cacodemon345 + */ + +#include +#include +#include +#include +#include +#define HAVE_STDARG_H +#include <86box/86box.h> +#include <86box/io.h> +#include <86box/device.h> +#include <86box/mem.h> +#include <86box/rom.h> +#include <86box/plat_unused.h> + +typedef struct lba_enhancer_t +{ + rom_t rom; +} lba_enhancer_t; + +#define BIOS_LBA_ENHANCER "roms/hdd/misc/lbaenhancer.bin" + +void* lba_enhancer_init(const device_t* info) +{ + lba_enhancer_t* lba_enhancer = (lba_enhancer_t*)calloc(1, sizeof(lba_enhancer_t)); + + rom_init(&lba_enhancer->rom, BIOS_LBA_ENHANCER, device_get_config_hex20("bios_addr"), 0x4000, 0x3fff, 0, MEM_MAPPING_EXTERNAL); + return lba_enhancer; +} + +void lba_enhancer_close(void* priv) +{ + lba_enhancer_t* lba_enhancer = (lba_enhancer_t*)priv; + + free(lba_enhancer->rom.rom); + free(priv); + return; +} + +static int +lba_enhancer_available(void) +{ + return rom_present(BIOS_LBA_ENHANCER); +} + +// clang-format off +static const device_config_t lba_enhancer_config[] = { + { + .name = "bios_addr", + .description = "BIOS Address", + .type = CONFIG_HEX20, + .default_string = "", + .default_int = 0xc8000, + .file_filter = "", + .spinner = { 0 }, + .selection = { + { .description = "C800H", .value = 0xc8000 }, + { .description = "CC00H", .value = 0xcc000 }, + { .description = "D000H", .value = 0xd0000 }, + { .description = "D400H", .value = 0xd4000 }, + { .description = "D800H", .value = 0xd8000 }, + { .description = "DC00H", .value = 0xdc000 }, + { .description = "" } + }, + }, + { .name = "", .description = "", .type = CONFIG_END } +}; +// clang-format on + +const device_t lba_enhancer_device = { + .name = "Vision Systems LBA Enhancer", + .internal_name = "lba_enhancer", + .flags = DEVICE_AT, + .local = 0, + .init = lba_enhancer_init, + .close = lba_enhancer_close, + .reset = NULL, + { .available = lba_enhancer_available }, + .speed_changed = NULL, + .force_redraw = NULL, + .config = lba_enhancer_config +}; diff --git a/src/include/86box/86box.h b/src/include/86box/86box.h index 20f3fffccba..d44e3b00764 100644 --- a/src/include/86box/86box.h +++ b/src/include/86box/86box.h @@ -140,6 +140,7 @@ extern int fpu_type; /* (C) fpu type */ extern int fpu_softfloat; /* (C) fpu uses softfloat */ extern int time_sync; /* (C) enable time sync */ extern int hdd_format_type; /* (C) hard disk file format */ +extern int lba_enhancer_enabled; /* (C) enable Vision Systems LBA Enhancer */ extern int confirm_reset; /* (C) enable reset confirmation */ extern int confirm_exit; /* (C) enable exit confirmation */ extern int confirm_save; /* (C) enable save confirmation */ diff --git a/src/include/86box/hdc.h b/src/include/86box/hdc.h index 4f65399bb45..38c0a6e9a4b 100644 --- a/src/include/86box/hdc.h +++ b/src/include/86box/hdc.h @@ -103,6 +103,9 @@ extern const device_t xtide_at_device; /* xtide_at */ extern const device_t xtide_acculogic_device; /* xtide_ps2 */ extern const device_t xtide_at_ps2_device; /* xtide_at_ps2 */ +/* Miscellaneous */ +extern const device_t lba_enhancer_device; + extern void hdc_init(void); extern void hdc_reset(void); diff --git a/src/qt/qt_settingsstoragecontrollers.cpp b/src/qt/qt_settingsstoragecontrollers.cpp index 30949de3ad1..0f19d46fcb6 100644 --- a/src/qt/qt_settingsstoragecontrollers.cpp +++ b/src/qt/qt_settingsstoragecontrollers.cpp @@ -62,6 +62,7 @@ SettingsStorageControllers::save() ide_ter_enabled = ui->checkBoxTertiaryIDE->isChecked() ? 1 : 0; ide_qua_enabled = ui->checkBoxQuaternaryIDE->isChecked() ? 1 : 0; cassette_enable = ui->checkBoxCassette->isChecked() ? 1 : 0; + lba_enhancer_enabled = ui->checkBoxLbaEnhancer->isChecked() ? 1 : 0; } void @@ -204,6 +205,9 @@ SettingsStorageControllers::onCurrentMachineChanged(int machineId) ui->checkBoxCassette->setChecked(false); ui->checkBoxCassette->setEnabled(false); } + + ui->checkBoxLbaEnhancer->setChecked(lba_enhancer_enabled > 0 && device_available(&lba_enhancer_device)); + ui->pushButtonConfigureLbaEnhancer->setEnabled(ui->checkBoxLbaEnhancer->isChecked()); } void @@ -333,3 +337,15 @@ SettingsStorageControllers::on_pushButtonSCSI4_clicked() { DeviceConfig::ConfigureDevice(scsi_card_getdevice(ui->comboBoxSCSI4->currentData().toInt()), 4, qobject_cast(Settings::settings)); } + +void SettingsStorageControllers::on_checkBoxLbaEnhancer_stateChanged(int arg1) +{ + ui->pushButtonConfigureLbaEnhancer->setEnabled(arg1 != 0); +} + + +void SettingsStorageControllers::on_pushButtonConfigureLbaEnhancer_clicked() +{ + DeviceConfig::ConfigureDevice(&lba_enhancer_device); +} + diff --git a/src/qt/qt_settingsstoragecontrollers.hpp b/src/qt/qt_settingsstoragecontrollers.hpp index 5641889e402..c50a9457417 100644 --- a/src/qt/qt_settingsstoragecontrollers.hpp +++ b/src/qt/qt_settingsstoragecontrollers.hpp @@ -39,6 +39,10 @@ private slots: void on_comboBoxHD_currentIndexChanged(int index); void on_comboBoxCDInterface_currentIndexChanged(int index); + void on_checkBoxLbaEnhancer_stateChanged(int arg1); + + void on_pushButtonConfigureLbaEnhancer_clicked(); + private: Ui::SettingsStorageControllers *ui; int machineId = 0; diff --git a/src/qt/qt_settingsstoragecontrollers.ui b/src/qt/qt_settingsstoragecontrollers.ui index d67127e2d4a..16d6e2494a4 100644 --- a/src/qt/qt_settingsstoragecontrollers.ui +++ b/src/qt/qt_settingsstoragecontrollers.ui @@ -51,45 +51,45 @@ - - CD-ROM Controller: - false + + CD-ROM Controller: + - - 30 - false + + 30 + - - Configure - false + + Configure + - - 30 - 0 0 + + 30 + @@ -171,15 +171,15 @@ - - 30 - 0 0 + + 30 + @@ -191,41 +191,41 @@ - - 30 - 0 0 + + 30 + - - 30 - 0 0 + + 30 + - - 30 - 0 0 + + 30 + @@ -266,6 +266,43 @@ + + + + 0 + + + 0 + + + + + Vision Systems LBA Enhancer + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Configure + + + + + From 7c241ec64adb10fb346bed58fd6b33648c90ddef Mon Sep 17 00:00:00 2001 From: OBattler Date: Wed, 6 Mar 2024 22:49:58 +0100 Subject: [PATCH 05/33] Hyundai SUPER-16T: Increase maximum CPU speed to 8 MHz. --- 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 da3dc01e451..d620357d63b 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -807,7 +807,7 @@ const machine_t machines[] = { .package = CPU_PKG_8088, .block = CPU_BLOCK_NONE, .min_bus = 4772728, - .max_bus = 7159092, + .max_bus = 8000000, .min_voltage = 0, .max_voltage = 0, .min_multi = 0, From 3e6b4aa9e198dbca29fa5437a66e97e4fc0258e2 Mon Sep 17 00:00:00 2001 From: OBattler Date: Wed, 6 Mar 2024 22:51:24 +0100 Subject: [PATCH 06/33] S3 Trio64V+ VLB: Limit to a maximum of 2 MB video memory. --- src/video/vid_s3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video/vid_s3.c b/src/video/vid_s3.c index fe06f05f588..a971c2f650a 100644 --- a/src/video/vid_s3.c +++ b/src/video/vid_s3.c @@ -11093,7 +11093,7 @@ const device_t s3_stb_powergraph_64_video_vlb_device = { { .available = s3_stb_powergraph_64_video_available }, .speed_changed = s3_speed_changed, .force_redraw = s3_force_redraw, - .config = s3_standard_config + .config = s3_phoenix_trio32_config }; const device_t s3_phoenix_trio64vplus_onboard_pci_device = { From 2e10c5a870b6c3221b40c7b43d20aecffde128bf Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Thu, 7 Mar 2024 18:20:55 +0500 Subject: [PATCH 07/33] CMake: Move DirectInput backend option to Win32 UI --- CMakeLists.txt | 1 - src/qt/CMakeLists.txt | 8 +------- src/win/CMakeLists.txt | 1 + 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cacf1aaa496..ae39fbccfdf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -131,7 +131,6 @@ option(RTMIDI "RtMidi" option(FLUIDSYNTH "FluidSynth" ON) option(MUNT "MUNT" ON) option(VNC "VNC renderer" OFF) -option(DINPUT "DirectInput" OFF) option(CPPTHREADS "C++11 threads" ON) option(NEW_DYNAREC "Use the PCem v15 (\"new\") dynamic recompiler" OFF) option(MINITRACE "Enable Chrome tracing using the modified minitrace library" OFF) diff --git a/src/qt/CMakeLists.txt b/src/qt/CMakeLists.txt index 4f073cf4a46..23c5964b314 100644 --- a/src/qt/CMakeLists.txt +++ b/src/qt/CMakeLists.txt @@ -190,13 +190,7 @@ endif() if(WIN32) enable_language(RC) target_sources(86Box PUBLIC ../win/86Box-qt.rc) - target_sources(plat PRIVATE win_dynld.c) - if(DINPUT) - target_sources(plat PRIVATE win_joystick.cpp) - target_link_libraries(86Box dinput8) - else() - target_sources(plat PRIVATE win_joystick_rawinput.c) - endif() + target_sources(plat PRIVATE win_dynld.c win_joystick_rawinput.c) target_link_libraries(86Box hid) # CMake 3.22 messed this up for clang/clang++ diff --git a/src/win/CMakeLists.txt b/src/win/CMakeLists.txt index 604ba9bb028..dc8c53e45cb 100644 --- a/src/win/CMakeLists.txt +++ b/src/win/CMakeLists.txt @@ -51,6 +51,7 @@ if(NOT MINGW) target_sources(plat PRIVATE win_opendir.c) endif() +option(DINPUT "Use DirectInput joystick backend instead of raw input" OFF) if(DINPUT) target_sources(plat PRIVATE win_joystick.cpp) target_link_libraries(86Box dinput8) From 1019953ba5907255d3b314d99602c15d4410a430 Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Thu, 7 Mar 2024 23:10:38 +0500 Subject: [PATCH 08/33] Add an option to build with SDL joystick backend on Windows --- src/qt/CMakeLists.txt | 12 +++- src/qt/{sdl_joystick.cpp => sdl_joystick.c} | 62 ++++++++++++++++----- 2 files changed, 57 insertions(+), 17 deletions(-) rename src/qt/{sdl_joystick.cpp => sdl_joystick.c} (76%) diff --git a/src/qt/CMakeLists.txt b/src/qt/CMakeLists.txt index 23c5964b314..5dc6f8a0714 100644 --- a/src/qt/CMakeLists.txt +++ b/src/qt/CMakeLists.txt @@ -190,8 +190,7 @@ endif() if(WIN32) enable_language(RC) target_sources(86Box PUBLIC ../win/86Box-qt.rc) - target_sources(plat PRIVATE win_dynld.c win_joystick_rawinput.c) - target_link_libraries(86Box hid) + target_sources(plat PRIVATE win_dynld.c) # CMake 3.22 messed this up for clang/clang++ # See https://gitlab.kitware.com/cmake/cmake/-/issues/22611 @@ -206,8 +205,15 @@ if(WIN32) if (MINGW) add_compile_definitions(NTDDI_VERSION=0x06010000) endif() + + option(SDL_JOYSTICK "Use SDL2 joystick backend instead of raw input" OFF) +endif() + +if(WIN32 AND NOT SDL_JOYSTICK) + target_sources(plat PRIVATE win_joystick_rawinput.c) + target_link_libraries(86Box hid) else() - target_sources(plat PRIVATE sdl_joystick.cpp) + target_sources(plat PRIVATE sdl_joystick.c) endif() if(WIN32 AND NOT MINGW) diff --git a/src/qt/sdl_joystick.cpp b/src/qt/sdl_joystick.c similarity index 76% rename from src/qt/sdl_joystick.cpp rename to src/qt/sdl_joystick.c index 4437bb69695..d5661287298 100644 --- a/src/qt/sdl_joystick.cpp +++ b/src/qt/sdl_joystick.c @@ -1,28 +1,53 @@ -// Lifted from wx-sdl2-joystick.c in PCem - +/* + * 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. + * + * SDL2 joystick interface. + * + * + * + * Authors: Sarah Walker, + * Joakim L. Gilje + * + * Copyright 2017-2021 Sarah Walker + * Copyright 2021 Joakim L. Gilje + */ #include -#include - -extern "C" { +#include +#include +#include +#include +#include +#define _USE_MATH_DEFINES +#include +/* This #undef is needed because a SDL include header redefines HAVE_STDARG_H. */ +#undef HAVE_STDARG_H +#define HAVE_STDARG_H +#include <86box/86box.h> #include <86box/device.h> #include <86box/gameport.h> +#include <86box/plat_unused.h> int joysticks_present; joystick_t joystick_state[MAX_JOYSTICKS]; plat_joystick_t plat_joystick_state[MAX_PLAT_JOYSTICKS]; static SDL_Joystick *sdl_joy[MAX_PLAT_JOYSTICKS]; -} - -#include #ifndef M_PI # define M_PI 3.14159265358979323846 #endif void -joystick_init() +joystick_init(void) { + /* This is needed for SDL's Windows raw input backend to work properly without SDL video. */ + SDL_SetHint(SDL_HINT_JOYSTICK_THREAD, "1"); + if (SDL_InitSubSystem(SDL_INIT_JOYSTICK) != 0) { return; } @@ -36,9 +61,9 @@ joystick_init() int d; strncpy(plat_joystick_state[c].name, SDL_JoystickNameForIndex(c), 64); - plat_joystick_state[c].nr_axes = std::min(SDL_JoystickNumAxes(sdl_joy[c]), MAX_JOY_AXES); - plat_joystick_state[c].nr_buttons = std::min(SDL_JoystickNumButtons(sdl_joy[c]), MAX_JOY_BUTTONS); - plat_joystick_state[c].nr_povs = std::min(SDL_JoystickNumHats(sdl_joy[c]), MAX_JOY_POVS); + plat_joystick_state[c].nr_axes = MIN(SDL_JoystickNumAxes(sdl_joy[c]), MAX_JOY_AXES); + plat_joystick_state[c].nr_buttons = MIN(SDL_JoystickNumButtons(sdl_joy[c]), MAX_JOY_BUTTONS); + plat_joystick_state[c].nr_povs = MIN(SDL_JoystickNumHats(sdl_joy[c]), MAX_JOY_POVS); for (d = 0; d < plat_joystick_state[c].nr_axes; d++) { snprintf(plat_joystick_state[c].axis[d].name, sizeof(plat_joystick_state[c].axis[d].name), "Axis %i", d); @@ -57,7 +82,7 @@ joystick_init() } void -joystick_close() +joystick_close(void) { int c; @@ -103,8 +128,9 @@ joystick_get_axis(int joystick_nr, int mapping) } else return plat_joystick_state[joystick_nr].a[plat_joystick_state[joystick_nr].axis[mapping].id]; } + void -joystick_process() +joystick_process(void) { int c; int d; @@ -160,3 +186,11 @@ joystick_process() } } } + +#ifdef _WIN32 +void +win_joystick_handle(UNUSED(void *raw)) +{ + /* Nothing to be done here, atleast currently */ +} +#endif From a45d26807001c208b0d44c01867645a3ce5a4dda Mon Sep 17 00:00:00 2001 From: OBattler Date: Fri, 8 Mar 2024 22:36:48 +0100 Subject: [PATCH 09/33] LBA Enhancer: Coding style. --- src/disk/lba_enhancer.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/disk/lba_enhancer.c b/src/disk/lba_enhancer.c index 07b958b2ed4..f0ce6b700ab 100644 --- a/src/disk/lba_enhancer.c +++ b/src/disk/lba_enhancer.c @@ -30,25 +30,29 @@ typedef struct lba_enhancer_t { - rom_t rom; + rom_t rom; } lba_enhancer_t; #define BIOS_LBA_ENHANCER "roms/hdd/misc/lbaenhancer.bin" -void* lba_enhancer_init(const device_t* info) +void * +lba_enhancer_init(const device_t *info) { - lba_enhancer_t* lba_enhancer = (lba_enhancer_t*)calloc(1, sizeof(lba_enhancer_t)); + lba_enhancer_t *lba_enhancer = (lba_enhancer_t *) calloc(1, sizeof(lba_enhancer_t)); + + rom_init(&lba_enhancer->rom, BIOS_LBA_ENHANCER, + device_get_config_hex20("bios_addr"), 0x4000, 0x3fff, 0, MEM_MAPPING_EXTERNAL); - rom_init(&lba_enhancer->rom, BIOS_LBA_ENHANCER, device_get_config_hex20("bios_addr"), 0x4000, 0x3fff, 0, MEM_MAPPING_EXTERNAL); return lba_enhancer; } -void lba_enhancer_close(void* priv) +void +lba_enhancer_close(void* priv) { - lba_enhancer_t* lba_enhancer = (lba_enhancer_t*)priv; + lba_enhancer_t *lba_enhancer = (lba_enhancer_t *) priv; - free(lba_enhancer->rom.rom); free(priv); + return; } From 01d066ce4c48173e03009d5f917495993240d2b6 Mon Sep 17 00:00:00 2001 From: OBattler Date: Fri, 8 Mar 2024 22:37:18 +0100 Subject: [PATCH 10/33] MiniVHD: Some initialization sanitizations. --- src/disk/hdd_image.c | 4 +- src/disk/minivhd/create.c | 2 +- src/disk/minivhd/manage.c | 39 ++++------ src/disk/minivhd/minivhd_io.c | 133 ++++++++++++++++---------------- src/disk/minivhd/minivhd_util.c | 4 +- 5 files changed, 85 insertions(+), 97 deletions(-) diff --git a/src/disk/hdd_image.c b/src/disk/hdd_image.c index df473d7d929..db56d5b786f 100644 --- a/src/disk/hdd_image.c +++ b/src/disk/hdd_image.c @@ -327,7 +327,7 @@ hdd_image_load(int id) hdd_images[id].type = HDD_IMAGE_HDX; } else if (is_vhd[0]) { fclose(hdd_images[id].file); - MVHDGeom geometry; + MVHDGeom geometry = { 0 }; geometry.cyl = hdd[id].tracks; geometry.heads = hdd[id].hpc; geometry.spt = hdd[id].spt; @@ -335,7 +335,7 @@ hdd_image_load(int id) hdd_images[id].last_sector = (full_size >> 9LL) - 1; if (hdd[id].vhd_blocksize || hdd[id].vhd_parent[0]) { - MVHDCreationOptions options; + MVHDCreationOptions options = { 0 }; retry_vhd: options.block_size_in_sectors = hdd[id].vhd_blocksize; options.path = fn; diff --git a/src/disk/minivhd/create.c b/src/disk/minivhd/create.c index d06382ef958..1fcfc86829a 100644 --- a/src/disk/minivhd/create.c +++ b/src/disk/minivhd/create.c @@ -315,7 +315,7 @@ create_sparse_diff(const char* path, const char* par_path, uint64_t size_in_byte { uint8_t footer_buff[MVHD_FOOTER_SIZE] = {0}; uint8_t sparse_buff[MVHD_SPARSE_SIZE] = {0}; - uint8_t bat_sect[MVHD_SECTOR_SIZE]; + uint8_t bat_sect[MVHD_SECTOR_SIZE] = {0}; MVHDGeom par_geom = {0}; memset(bat_sect, 0xffffffff, sizeof bat_sect); MVHDMeta* vhdm = NULL; diff --git a/src/disk/minivhd/manage.c b/src/disk/minivhd/manage.c index 7ac3989e69a..fdf3d8e79db 100644 --- a/src/disk/minivhd/manage.c +++ b/src/disk/minivhd/manage.c @@ -92,7 +92,7 @@ read_footer(MVHDMeta* vhdm) static void read_sparse_header(MVHDMeta* vhdm) { - uint8_t buffer[MVHD_SPARSE_SIZE]; + uint8_t buffer[MVHD_SPARSE_SIZE] = { 0 }; mvhd_fseeko64(vhdm->f, vhdm->footer.data_offset, SEEK_SET); (void) !fread(buffer, sizeof buffer, 1, vhdm->f); @@ -438,17 +438,15 @@ mvhd_version_id(void) MVHDAPI int mvhd_file_is_vhd(FILE* f) { - uint8_t con_str[8]; + uint8_t con_str[8] = { 0 }; - if (f == NULL) { + if (f == NULL) return 0; - } mvhd_fseeko64(f, -MVHD_FOOTER_SIZE, SEEK_END); (void) !fread(con_str, sizeof con_str, 1, f); - if (mvhd_is_conectix_str(con_str)) { + if (mvhd_is_conectix_str(con_str)) return 1; - } return 0; } @@ -457,13 +455,12 @@ mvhd_file_is_vhd(FILE* f) MVHDAPI MVHDGeom mvhd_calculate_geometry(uint64_t size) { - MVHDGeom chs; + MVHDGeom chs = { 0 }; uint32_t ts = (uint32_t)(size / MVHD_SECTOR_SIZE); uint32_t spt, heads, cyl, cth; - if (ts > 65535 * 16 * 255) { + if (ts > 65535 * 16 * 255) ts = 65535 * 16 * 255; - } if (ts >= 65535 * 16 * 63) { spt = 255; @@ -473,9 +470,8 @@ mvhd_calculate_geometry(uint64_t size) spt = 17; cth = ts / spt; heads = (cth + 1023) / 1024; - if (heads < 4) { + if (heads < 4) heads = 4; - } if (cth >= (heads * 1024) || heads > 16) { spt = 31; heads = 16; @@ -500,7 +496,7 @@ mvhd_calculate_geometry(uint64_t size) MVHDAPI MVHDMeta* mvhd_open(const char* path, int readonly, int* err) { - MVHDError open_err; + MVHDError open_err = { 0 }; MVHDMeta *vhdm = calloc(sizeof *vhdm, 1); if (vhdm == NULL) { @@ -516,11 +512,10 @@ mvhd_open(const char* path, int readonly, int* err) //This is safe, as we've just checked for potential overflow above strcpy(vhdm->filename, path); - if (readonly) { + if (readonly) vhdm->f = mvhd_fopen((const char*)vhdm->filename, "rb", err); - } else { + else vhdm->f = mvhd_fopen((const char*)vhdm->filename, "rb+", err); - } if (vhdm->f == NULL) { /* note, mvhd_fopen sets err for us */ goto cleanup_vhdm; @@ -567,14 +562,12 @@ mvhd_open(const char* path, int readonly, int* err) vhdm->format_buffer.sector_count = 64; if (vhdm->footer.disk_type == MVHD_TYPE_DIFF) { char* par_path = get_diff_parent_path(vhdm, err); - if (par_path == NULL) { + if (par_path == NULL) goto cleanup_format_buff; - } uint32_t par_mod_ts = mvhd_file_mod_timestamp(par_path, err); - if (*err != 0) { + if (*err != 0) goto cleanup_format_buff; - } if (vhdm->sparse.par_timestamp != par_mod_ts) { /* The last-modified timestamp is to fragile to make this a fatal error. @@ -582,9 +575,8 @@ mvhd_open(const char* path, int readonly, int* err) *err = MVHD_ERR_TIMESTAMP; } vhdm->parent = mvhd_open(par_path, true, err); - if (vhdm->parent == NULL) { + if (vhdm->parent == NULL) goto cleanup_format_buff; - } if (memcmp(vhdm->sparse.par_uuid, vhdm->parent->footer.uuid, sizeof vhdm->sparse.par_uuid) != 0) { *err = MVHD_ERR_INVALID_PAR_UUID; @@ -629,9 +621,8 @@ mvhd_close(MVHDMeta* vhdm) if (vhdm == NULL) return; - if (vhdm->parent != NULL) { + if (vhdm->parent != NULL) mvhd_close(vhdm->parent); - } fclose(vhdm->f); @@ -655,7 +646,7 @@ mvhd_close(MVHDMeta* vhdm) MVHDAPI int mvhd_diff_update_par_timestamp(MVHDMeta* vhdm, int* err) { - uint8_t sparse_buff[1024]; + uint8_t sparse_buff[1024] = { 0 }; if (vhdm == NULL || err == NULL) { *err = MVHD_ERR_INVALID_PARAMS; diff --git a/src/disk/minivhd/minivhd_io.c b/src/disk/minivhd/minivhd_io.c index ff86a8337f5..2912cf5b2e7 100644 --- a/src/disk/minivhd/minivhd_io.c +++ b/src/disk/minivhd/minivhd_io.c @@ -46,7 +46,6 @@ #include "minivhd.h" #include "internal.h" - /* * The following bit array macros adapted from: * @@ -56,7 +55,6 @@ #define VHD_CLEARBIT(A,k) ( A[(k>>3)] &= ~(0x80 >> (k&7)) ) #define VHD_TESTBIT(A,k) ( A[(k>>3)] & (0x80 >> (k&7)) ) - /** * \brief Check that we will not be overflowing buffers * @@ -68,29 +66,26 @@ * \param [out] trunc_sectors The number of sectors truncated if transfer_sectors < num_sectors */ static inline void -check_sectors(uint32_t offset, int num_sectors, uint32_t total_sectors, int* transfer_sect, int* trunc_sect) +check_sectors(uint32_t offset, int num_sectors, uint32_t total_sectors, int *transfer_sect, int *trunc_sect) { *transfer_sect = num_sectors; *trunc_sect = 0; - if ((total_sectors - offset) < (uint32_t)*transfer_sect) { + if ((total_sectors - offset) < ((uint32_t) *transfer_sect)) { *transfer_sect = total_sectors - offset; *trunc_sect = num_sectors - *transfer_sect; } } - void -mvhd_write_empty_sectors(FILE* f, int sector_count) +mvhd_write_empty_sectors(FILE *f, int sector_count) { uint8_t zero_bytes[MVHD_SECTOR_SIZE] = {0}; - for (int i = 0; i < sector_count; i++) { + for (int i = 0; i < sector_count; i++) fwrite(zero_bytes, sizeof zero_bytes, 1, f); - } } - /** * \brief Read the sector bitmap for a block. * @@ -101,19 +96,17 @@ mvhd_write_empty_sectors(FILE* f, int sector_count) * \param [in] blk The block for which to read the sector bitmap from */ static void -read_sect_bitmap(MVHDMeta* vhdm, int blk) +read_sect_bitmap(MVHDMeta *vhdm, int blk) { if (vhdm->block_offset[blk] != MVHD_SPARSE_BLK) { mvhd_fseeko64(vhdm->f, (uint64_t)vhdm->block_offset[blk] * MVHD_SECTOR_SIZE, SEEK_SET); (void) !fread(vhdm->bitmap.curr_bitmap, vhdm->bitmap.sector_count * MVHD_SECTOR_SIZE, 1, vhdm->f); - } else { + } else memset(vhdm->bitmap.curr_bitmap, 0, vhdm->bitmap.sector_count * MVHD_SECTOR_SIZE); - } vhdm->bitmap.curr_block = blk; } - /** * \brief Write the current sector bitmap in memory to file * @@ -129,7 +122,6 @@ write_curr_sect_bitmap(MVHDMeta* vhdm) } } - /** * \brief Write block offset from memory into file * @@ -137,7 +129,7 @@ write_curr_sect_bitmap(MVHDMeta* vhdm) * \param [in] blk The block for which to write the offset for */ static void -write_bat_entry(MVHDMeta* vhdm, int blk) +write_bat_entry(MVHDMeta *vhdm, int blk) { uint64_t table_offset = vhdm->sparse.bat_offset + ((uint64_t)blk * sizeof *vhdm->block_offset); uint32_t offset = mvhd_to_be32(vhdm->block_offset[blk]); @@ -146,7 +138,6 @@ write_bat_entry(MVHDMeta* vhdm, int blk) fwrite(&offset, sizeof offset, 1, vhdm->f); } - /** * \brief Create an empty block in a sparse or differencing VHD image * @@ -162,9 +153,9 @@ write_bat_entry(MVHDMeta* vhdm, int blk) * \param [in] blk The block number to create */ static void -create_block(MVHDMeta* vhdm, int blk) +create_block(MVHDMeta *vhdm, int blk) { - uint8_t footer[MVHD_FOOTER_SIZE]; + uint8_t footer[MVHD_FOOTER_SIZE] = { 0 }; /* Seek to where the footer SHOULD be */ mvhd_fseeko64(vhdm->f, -MVHD_FOOTER_SIZE, SEEK_END); @@ -179,13 +170,12 @@ create_block(MVHDMeta* vhdm, int blk) } int64_t abs_offset = mvhd_ftello64(vhdm->f); - if (abs_offset % MVHD_SECTOR_SIZE != 0) { + if ((abs_offset % MVHD_SECTOR_SIZE) != 0) { /* Yikes! We're supposed to be on a sector boundary. Add some padding */ - int64_t padding_amount = (int64_t)MVHD_SECTOR_SIZE - (abs_offset % MVHD_SECTOR_SIZE); + int64_t padding_amount = ((int64_t) MVHD_SECTOR_SIZE) - (abs_offset % MVHD_SECTOR_SIZE); uint8_t zero_byte = 0; - for (int i = 0; i < padding_amount; i++) { + for (int i = 0; i < padding_amount; i++) fwrite(&zero_byte, sizeof zero_byte, 1, vhdm->f); - } abs_offset += padding_amount; } @@ -204,37 +194,39 @@ create_block(MVHDMeta* vhdm, int blk) write_bat_entry(vhdm, blk); } - int -mvhd_fixed_read(MVHDMeta* vhdm, uint32_t offset, int num_sectors, void* out_buff) { - int64_t addr; - int transfer_sectors, truncated_sectors; +mvhd_fixed_read(MVHDMeta *vhdm, uint32_t offset, int num_sectors, void *out_buff) { + int64_t addr = 0ULL; + int transfer_sectors = 0; + int truncated_sectors = 0; uint32_t total_sectors = (uint32_t)(vhdm->footer.curr_sz / MVHD_SECTOR_SIZE); check_sectors(offset, num_sectors, total_sectors, &transfer_sectors, &truncated_sectors); - addr = (int64_t)offset * MVHD_SECTOR_SIZE; + addr = ((int64_t) offset) * MVHD_SECTOR_SIZE; mvhd_fseeko64(vhdm->f, addr, SEEK_SET); - (void) !fread(out_buff, transfer_sectors*MVHD_SECTOR_SIZE, 1, vhdm->f); + (void) !fread(out_buff, transfer_sectors * MVHD_SECTOR_SIZE, 1, vhdm->f); return truncated_sectors; } - int -mvhd_sparse_read(MVHDMeta* vhdm, uint32_t offset, int num_sectors, void* out_buff) +mvhd_sparse_read(MVHDMeta *vhdm, uint32_t offset, int num_sectors, void *out_buff) { - int transfer_sectors, truncated_sectors; + int transfer_sectors = 0; + int truncated_sectors; uint32_t total_sectors = (uint32_t)(vhdm->footer.curr_sz / MVHD_SECTOR_SIZE); check_sectors(offset, num_sectors, total_sectors, &transfer_sectors, &truncated_sectors); uint8_t* buff = (uint8_t*)out_buff; - int64_t addr; - uint32_t s, ls; - int blk, prev_blk, sib; + int64_t addr = 0ULL; + uint32_t s = 0; + uint32_t ls = 0; + int blk = 0; + int prev_blk = -1; + int sib = 0; ls = offset + transfer_sectors; - prev_blk = -1; for (s = offset; s < ls; s++) { blk = s / vhdm->sect_per_block; @@ -245,14 +237,15 @@ mvhd_sparse_read(MVHDMeta* vhdm, uint32_t offset, int num_sectors, void* out_buf read_sect_bitmap(vhdm, blk); mvhd_fseeko64(vhdm->f, (uint64_t)sib * MVHD_SECTOR_SIZE, SEEK_CUR); } else { - addr = ((int64_t)vhdm->block_offset[blk] + vhdm->bitmap.sector_count + sib) * MVHD_SECTOR_SIZE; + addr = (((int64_t) vhdm->block_offset[blk]) + vhdm->bitmap.sector_count + sib) * + MVHD_SECTOR_SIZE; mvhd_fseeko64(vhdm->f, addr, SEEK_SET); } } - if (VHD_TESTBIT(vhdm->bitmap.curr_bitmap, sib)) { + if (VHD_TESTBIT(vhdm->bitmap.curr_bitmap, sib)) (void) !fread(buff, MVHD_SECTOR_SIZE, 1, vhdm->f); - } else { + else { memset(buff, 0, MVHD_SECTOR_SIZE); mvhd_fseeko64(vhdm->f, MVHD_SECTOR_SIZE, SEEK_CUR); } @@ -262,19 +255,21 @@ mvhd_sparse_read(MVHDMeta* vhdm, uint32_t offset, int num_sectors, void* out_buf return truncated_sectors; } - int -mvhd_diff_read(MVHDMeta* vhdm, uint32_t offset, int num_sectors, void* out_buff) +mvhd_diff_read(MVHDMeta *vhdm, uint32_t offset, int num_sectors, void *out_buff) { - int transfer_sectors, truncated_sectors; + int transfer_sectors = 0; + int truncated_sectors = 0; uint32_t total_sectors = (uint32_t)(vhdm->footer.curr_sz / MVHD_SECTOR_SIZE); check_sectors(offset, num_sectors, total_sectors, &transfer_sectors, &truncated_sectors); - uint8_t* buff = (uint8_t*)out_buff; - MVHDMeta* curr_vhdm = vhdm; - uint32_t s, ls; - int blk, sib; + uint8_t *buff = (uint8_t*)out_buff; + MVHDMeta *curr_vhdm = vhdm; + uint32_t s = 0; + uint32_t ls = 0; + int blk = 0; + int sib = 0; ls = offset + transfer_sectors; for (s = offset; s < ls; s++) { @@ -291,11 +286,11 @@ mvhd_diff_read(MVHDMeta* vhdm, uint32_t offset, int num_sectors, void* out_buff) /* We handle actual sector reading using the fixed or sparse functions, as a differencing VHD is also a sparse VHD */ - if (curr_vhdm->footer.disk_type == MVHD_TYPE_DIFF || curr_vhdm->footer.disk_type == MVHD_TYPE_DYNAMIC) { + if ((curr_vhdm->footer.disk_type == MVHD_TYPE_DIFF) || + (curr_vhdm->footer.disk_type == MVHD_TYPE_DYNAMIC)) mvhd_sparse_read(curr_vhdm, s, 1, buff); - } else { + else mvhd_fixed_read(curr_vhdm, s, 1, buff); - } curr_vhdm = vhdm; buff += MVHD_SECTOR_SIZE; @@ -304,38 +299,40 @@ mvhd_diff_read(MVHDMeta* vhdm, uint32_t offset, int num_sectors, void* out_buff) return truncated_sectors; } - int -mvhd_fixed_write(MVHDMeta* vhdm, uint32_t offset, int num_sectors, void* in_buff) +mvhd_fixed_write(MVHDMeta *vhdm, uint32_t offset, int num_sectors, void *in_buff) { - int64_t addr; - int transfer_sectors, truncated_sectors; + int64_t addr = 0ULL; + int transfer_sectors = 0; + int truncated_sectors = 0; uint32_t total_sectors = (uint32_t)(vhdm->footer.curr_sz / MVHD_SECTOR_SIZE); check_sectors(offset, num_sectors, total_sectors, &transfer_sectors, &truncated_sectors); addr = (int64_t)offset * MVHD_SECTOR_SIZE; mvhd_fseeko64(vhdm->f, addr, SEEK_SET); - fwrite(in_buff, transfer_sectors*MVHD_SECTOR_SIZE, 1, vhdm->f); + fwrite(in_buff, transfer_sectors * MVHD_SECTOR_SIZE, 1, vhdm->f); return truncated_sectors; } - int -mvhd_sparse_diff_write(MVHDMeta* vhdm, uint32_t offset, int num_sectors, void* in_buff) +mvhd_sparse_diff_write(MVHDMeta *vhdm, uint32_t offset, int num_sectors, void *in_buff) { - int transfer_sectors, truncated_sectors; + int transfer_sectors = 0; + int truncated_sectors = 0; uint32_t total_sectors = (uint32_t)(vhdm->footer.curr_sz / MVHD_SECTOR_SIZE); check_sectors(offset, num_sectors, total_sectors, &transfer_sectors, &truncated_sectors); - uint8_t* buff = (uint8_t*)in_buff; - int64_t addr; - uint32_t s, ls; - int blk, prev_blk, sib; + uint8_t* buff = (uint8_t *) in_buff; + int64_t addr = 0ULL; + uint32_t s = 0; + uint32_t ls = 0; + int blk = 0; + int prev_blk = -1; + int sib = 0; ls = offset + transfer_sectors; - prev_blk = -1; for (s = offset; s < ls; s++) { blk = s / vhdm->sect_per_block; @@ -357,7 +354,8 @@ mvhd_sparse_diff_write(MVHDMeta* vhdm, uint32_t offset, int num_sectors, void* i read_sect_bitmap(vhdm, blk); mvhd_fseeko64(vhdm->f, (uint64_t)sib * MVHD_SECTOR_SIZE, SEEK_CUR); } else { - addr = ((int64_t)vhdm->block_offset[blk] + vhdm->bitmap.sector_count + sib) * MVHD_SECTOR_SIZE; + addr = (((int64_t) vhdm->block_offset[blk]) + vhdm->bitmap.sector_count + sib) * + MVHD_SECTOR_SIZE; mvhd_fseeko64(vhdm->f, addr, SEEK_SET); } prev_blk = blk; @@ -374,14 +372,13 @@ mvhd_sparse_diff_write(MVHDMeta* vhdm, uint32_t offset, int num_sectors, void* i return truncated_sectors; } - int -mvhd_noop_write(MVHDMeta* vhdm, uint32_t offset, int num_sectors, void* in_buff) +mvhd_noop_write(MVHDMeta *vhdm, uint32_t offset, int num_sectors, void *in_buff) { - (void)vhdm; - (void)offset; - (void)num_sectors; - (void)in_buff; + (void) vhdm; + (void) offset; + (void) num_sectors; + (void) in_buff; return 0; } diff --git a/src/disk/minivhd/minivhd_util.c b/src/disk/minivhd/minivhd_util.c index dd3244322c1..4901e584160 100644 --- a/src/disk/minivhd/minivhd_util.c +++ b/src/disk/minivhd/minivhd_util.c @@ -462,7 +462,7 @@ mvhd_file_mod_timestamp(const char* path, int *err) { *err = 0; #ifdef _WIN32 - struct _stat file_stat; + struct _stat file_stat = { 0 }; size_t path_len = strlen(path); mvhd_utf16 new_path[260] = {0}; int new_path_len = (sizeof new_path) - 2; @@ -485,7 +485,7 @@ mvhd_file_mod_timestamp(const char* path, int *err) return 0; } #else - struct stat file_stat; + struct stat file_stat = { 0 }; int stat_res = stat(path, &file_stat); if (stat_res != 0) { From 50d7340d01d664df8a38706e1f654eb35ed24f3a Mon Sep 17 00:00:00 2001 From: OBattler Date: Fri, 8 Mar 2024 23:11:35 +0100 Subject: [PATCH 11/33] Added the 1.02 German and 1.03 English versions of the AHA-1542CP BIOS. --- src/scsi/scsi_aha154x.c | 62 +++++++++++++++++++++++++++++++++-------- 1 file changed, 50 insertions(+), 12 deletions(-) diff --git a/src/scsi/scsi_aha154x.c b/src/scsi/scsi_aha154x.c index 05b8b272640..8ff0aaa3211 100644 --- a/src/scsi/scsi_aha154x.c +++ b/src/scsi/scsi_aha154x.c @@ -70,6 +70,9 @@ uint16_t aha_ports[] = { static uint8_t *aha1542cp_pnp_rom = NULL; +// static char *aha1542cp_rev = "F001"; +static char aha1542cp_rev[16] = { 0 }; + #pragma pack(push, 1) typedef struct aha_setup_t { uint8_t CustomerSignature[20]; @@ -851,6 +854,9 @@ aha_setmcode(x54x_t *dev) return; } + fseek(fp, 0x3136, SEEK_SET); + (void) !fread(dev->fw_rev, 4, 1, fp); + /* Allocate the buffer and then read the real PnP ROM into it. */ if (aha1542cp_pnp_rom != NULL) { free(aha1542cp_pnp_rom); @@ -892,7 +898,7 @@ aha_initnvr(x54x_t *dev) EE2_EXT1G | EE2_RMVOK); /* Imm return on seek */ dev->nvr[3] = SPEED_50; /* speed 5.0 MB/s */ dev->nvr[6] = (EE6_TERM | /* host term enable */ - EE6_RSTBUS); /* reset SCSI bus on boot*/ + EE6_RSTBUS); /* reset SCSI bus on boot */ } /* Initialize the board's EEPROM (NVR.) */ @@ -942,6 +948,7 @@ static void * aha_init(const device_t *info) { x54x_t *dev; + const char *bios_rev = NULL; /* Call common initializer. */ dev = x54x_init(info); @@ -987,7 +994,8 @@ aha_init(const device_t *info) strcpy(dev->name, "AHA-154xA"); dev->fw_rev = "A003"; /* The 3.07 microcode says A006. */ dev->bios_path = "roms/scsi/adaptec/aha1540a307.bin"; /*Only for port 0x330*/ - /* This is configurable from the configuration for the 154xB, the rest of the controllers read it from the EEPROM. */ + /* This is configurable from the configuration for the 154xB, the rest of the controllers read + it from the EEPROM. */ dev->HostID = device_get_config_int("hostid"); dev->rom_shram = 0x3F80; /* shadow RAM address base */ dev->rom_shramsz = 128; /* size of shadow RAM */ @@ -1009,7 +1017,8 @@ aha_init(const device_t *info) break; } dev->fw_rev = "A005"; /* The 3.2 microcode says A012. */ - /* This is configurable from the configuration for the 154xB, the rest of the controllers read it from the EEPROM. */ + /* This is configurable from the configuration for the 154xB, the rest of the controllers read + it from the EEPROM. */ dev->HostID = device_get_config_int("hostid"); dev->rom_shram = 0x3F80; /* shadow RAM address base */ dev->rom_shramsz = 128; /* size of shadow RAM */ @@ -1053,10 +1062,11 @@ aha_init(const device_t *info) case AHA_154xCP: strcpy(dev->name, "AHA-154xCP"); - dev->bios_path = "roms/scsi/adaptec/aha1542cp102.bin"; - dev->mcode_path = "roms/scsi/adaptec/908301-00_f_mcode_17c9.u12"; + bios_rev = (char *) device_get_config_bios("bios_rev"); + dev->bios_path = (char *) device_get_bios_file(info, bios_rev, 0); + dev->mcode_path = (char *) device_get_bios_file(info, bios_rev, 1); dev->nvr_path = "aha1542cp.nvr"; - dev->fw_rev = "F001"; + dev->fw_rev = aha1542cp_rev; dev->rom_shram = 0x3F80; /* shadow RAM address base */ dev->rom_shramsz = 128; /* size of shadow RAM */ dev->rom_ioaddr = 0x3F7E; /* [2:0] idx into addr table */ @@ -1069,11 +1079,14 @@ aha_init(const device_t *info) dev->ven_get_dma = aha_get_dma; /* function to return DMA channel from EEPROM */ dev->ha_bps = 10000000.0; /* fast SCSI */ dev->pnp_len = 0x00be; /* length of the PnP ROM */ - dev->pnp_offset = 0x533d; /* offset of the PnP ROM in the microcode ROM */ - dev->cmd_33_len = 0x06dc; /* length of the SCSISelect code expansion routine returned by - SCSI controller command 0x33 */ - dev->cmd_33_offset = 0x7000; /* offset of the SCSISelect code expansion routine in the - microcode ROM */ + if (!strcmp(bios_rev, "v1_02_en")) + dev->pnp_offset = 0x533d; /* offset of the PnP ROM in the microcode ROM */ + else + dev->pnp_offset = 0x5345; /* offset of the PnP ROM in the microcode ROM */ + dev->cmd_33_len = 0x06dc; /* length of the SCSISelect code expansion routine + returned by SCSI controller command 0x33 */ + dev->cmd_33_offset = 0x7000; /* offset of the SCSISelect code expansion routine + in the microcode ROM */ aha_setmcode(dev); if (aha1542cp_pnp_rom) isapnp_add_card(aha1542cp_pnp_rom, dev->pnp_len + 7, aha_pnp_config_changed, NULL, NULL, NULL, dev); @@ -1384,6 +1397,31 @@ static const device_config_t aha_154xcf_config[] = { }, { .name = "", .description = "", .type = CONFIG_END } }; + +static const device_config_t aha_154xcp_config[] = { + { + .name = "bios_rev", + .description = "BIOS Revision", + .type = CONFIG_BIOS, + .default_string = "v1_02_en", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, /*W1*/ + .bios = { + { .name = "Version 1.02 (English)", .internal_name = "v1_02_en", .bios_type = BIOS_NORMAL, + .files_no = 2, .local = 0, .size = 32768, .files = { "roms/scsi/adaptec/aha1542cp102.bin", + "roms/scsi/adaptec/908301-00_f_mcode_17c9.u12", "" } }, + { .name = "Version 1.02 (German)", .internal_name = "v1_02_de", .bios_type = BIOS_NORMAL, + .files_no = 2, .local = 0, .size = 32768, .files = { "roms/scsi/adaptec/buff_1-0_bios.bin", + "roms/scsi/adaptec/buff_1-0_mcode.bin", "" } }, + { .name = "Version 1.03 (English)", .internal_name = "v1_03_en", .bios_type = BIOS_NORMAL, + .files_no = 2, .local = 0, .size = 32768, .files = { "roms/scsi/adaptec/aha1542cp103.bin", + "roms/scsi/adaptec/908301-00_g_mcode_144c.u12.bin", "" } }, + { .files_no = 0 } + }, + }, + { .name = "", .description = "", .type = CONFIG_END } +}; // clang-format on const device_t aha154xa_device = { @@ -1453,7 +1491,7 @@ const device_t aha154xcp_device = { { .available = NULL }, .speed_changed = NULL, .force_redraw = NULL, - .config = NULL + .config = aha_154xcp_config }; const device_t aha1640_device = { From 27734a872873739113b40e4d582cece686f74686 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sat, 9 Mar 2024 00:42:13 +0100 Subject: [PATCH 12/33] AHA-1542CP: Return the correct firmware checksum. --- src/scsi/scsi_aha154x.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/scsi/scsi_aha154x.c b/src/scsi/scsi_aha154x.c index 8ff0aaa3211..2927d797c04 100644 --- a/src/scsi/scsi_aha154x.c +++ b/src/scsi/scsi_aha154x.c @@ -73,6 +73,8 @@ static uint8_t *aha1542cp_pnp_rom = NULL; // static char *aha1542cp_rev = "F001"; static char aha1542cp_rev[16] = { 0 }; +static uint16_t fw_chksum = 0x0000; + #pragma pack(push, 1) typedef struct aha_setup_t { uint8_t CustomerSignature[20]; @@ -469,8 +471,10 @@ aha_setup_data(void *priv) ReplyISI->fParityCheckingEnabled = dev->parity & 1; U32_TO_ADDR(aha_setup->BIOSMailboxAddress, dev->BIOSMailboxOutAddr); - aha_setup->uChecksum = 0xA3; - aha_setup->uUnknown = 0xC2; + // aha_setup->uChecksum = 0xA3; + // aha_setup->uUnknown = 0xC2; + aha_setup->uChecksum = fw_chksum >> 8; + aha_setup->uUnknown = fw_chksum & 0xff; } static void @@ -825,6 +829,7 @@ aha_setmcode(x54x_t *dev) { uint32_t temp; FILE *fp; + uint16_t tempb = 0x00; /* Only if this device has a BIOS ROM. */ if (dev->mcode_path == NULL) @@ -880,6 +885,14 @@ aha_setmcode(x54x_t *dev) fseek(fp, dev->cmd_33_offset, SEEK_SET); (void) !fread(dev->cmd_33_buf, dev->cmd_33_len, 1, fp); + fw_chksum = 0x0000; + + for (uint16_t i = 0; i < 32768; i++) { + (void) fseek(fp, i, SEEK_SET); + (void) !fread(&tempb, 1, 1, fp); + fw_chksum += tempb; + } + (void) fclose(fp); } @@ -988,6 +1001,8 @@ aha_init(const device_t *info) strcpy(dev->vendor, "Adaptec"); + fw_chksum = 0xa3c2; + /* Perform per-board initialization. */ switch (dev->type) { case AHA_154xA: From 10c7ee2aeff940b7b19cf5c41b9fed7bd70d7788 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sat, 9 Mar 2024 11:38:18 +0100 Subject: [PATCH 13/33] Fixed some warnings. --- src/codegen/codegen_ops_fpu.h | 3 ++- src/disk/lba_enhancer.c | 22 ++++++++++------------ 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/src/codegen/codegen_ops_fpu.h b/src/codegen/codegen_ops_fpu.h index 1021cc74260..242743dee1f 100644 --- a/src/codegen/codegen_ops_fpu.h +++ b/src/codegen/codegen_ops_fpu.h @@ -671,9 +671,10 @@ ropFCHS(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeb ropFLD##name(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block) \ { \ static double fp_imm = v; \ + static uint64_t *fptr = (uint64_t *) &fp_imm; \ \ FP_ENTER(); \ - FP_LOAD_IMM_Q(*(uint64_t *) &fp_imm); \ + FP_LOAD_IMM_Q(*fptr); \ \ return op_pc; \ } diff --git a/src/disk/lba_enhancer.c b/src/disk/lba_enhancer.c index f0ce6b700ab..35c845c16f8 100644 --- a/src/disk/lba_enhancer.c +++ b/src/disk/lba_enhancer.c @@ -35,25 +35,23 @@ typedef struct lba_enhancer_t #define BIOS_LBA_ENHANCER "roms/hdd/misc/lbaenhancer.bin" -void * -lba_enhancer_init(const device_t *info) +void +lba_enhancer_close(void* priv) { - lba_enhancer_t *lba_enhancer = (lba_enhancer_t *) calloc(1, sizeof(lba_enhancer_t)); - - rom_init(&lba_enhancer->rom, BIOS_LBA_ENHANCER, - device_get_config_hex20("bios_addr"), 0x4000, 0x3fff, 0, MEM_MAPPING_EXTERNAL); + free(priv); - return lba_enhancer; + return; } -void -lba_enhancer_close(void* priv) +void * +lba_enhancer_init(const device_t *info) { - lba_enhancer_t *lba_enhancer = (lba_enhancer_t *) priv; + lba_enhancer_t *dev = (lba_enhancer_t *) calloc(1, sizeof(lba_enhancer_t)); - free(priv); + rom_init(&dev->rom, BIOS_LBA_ENHANCER, + device_get_config_hex20("bios_addr"), 0x4000, 0x3fff, 0, MEM_MAPPING_EXTERNAL); - return; + return dev; } static int From ca2492e893423f171982e769d97f8bdf88fee34b Mon Sep 17 00:00:00 2001 From: OBattler Date: Sat, 9 Mar 2024 13:18:31 +0100 Subject: [PATCH 14/33] Added the Trident TVGA 8900 D-R. --- src/include/86box/video.h | 1 + src/video/vid_table.c | 1 + src/video/vid_tvga.c | 26 +++++++++++++++++++++++++- 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/src/include/86box/video.h b/src/include/86box/video.h index 65d96a4b683..e5649880777 100644 --- a/src/include/86box/video.h +++ b/src/include/86box/video.h @@ -550,6 +550,7 @@ extern const device_t ibm_ps1_2121_device; /* Trident TVGA 8900 */ extern const device_t tvga8900b_device; extern const device_t tvga8900d_device; +extern const device_t tvga8900dr_device; extern const device_t tvga9000b_device; extern const device_t nec_sv9000_device; diff --git a/src/video/vid_table.c b/src/video/vid_table.c index 5b9c3f8f3af..9992eff4519 100644 --- a/src/video/vid_table.c +++ b/src/video/vid_table.c @@ -144,6 +144,7 @@ video_cards[] = { { &sigma_device }, { &tvga8900b_device }, { &tvga8900d_device }, + { &tvga8900dr_device }, { &tvga9000b_device }, { &nec_sv9000_device }, { &et4000k_isa_device }, diff --git a/src/video/vid_tvga.c b/src/video/vid_tvga.c index 591851016f8..babd909beb8 100644 --- a/src/video/vid_tvga.c +++ b/src/video/vid_tvga.c @@ -37,6 +37,7 @@ #define ROM_TVGA_8900B "roms/video/tvga/tvga8900b.vbi" #define ROM_TVGA_8900CLD "roms/video/tvga/trident.bin" +#define ROM_TVGA_8900DR "roms/video/tvga/8900DR.VBI" #define ROM_TVGA_9000B "roms/video/tvga/tvga9000b.bin" #define ROM_TVGA_9000B_NEC_SV9000 "roms/video/tvga/SV9000.VBI" @@ -428,7 +429,10 @@ tvga_init(const device_t *info) bios_fn = ROM_TVGA_8900B; break; case TVGA8900CLD_ID: - bios_fn = ROM_TVGA_8900CLD; + if (info->local & 0x0100) + bios_fn = ROM_TVGA_8900DR; + else + bios_fn = ROM_TVGA_8900CLD; break; case TVGA9000B_ID: bios_fn = (info->local & 0x100) ? ROM_TVGA_9000B_NEC_SV9000 : ROM_TVGA_9000B; @@ -466,6 +470,12 @@ tvga8900d_available(void) return rom_present(ROM_TVGA_8900CLD); } +static int +tvga8900dr_available(void) +{ + return rom_present(ROM_TVGA_8900DR); +} + static int tvga9000b_available(void) { @@ -564,6 +574,20 @@ const device_t tvga8900d_device = { .config = tvga_config }; +const device_t tvga8900dr_device = { + .name = "Trident TVGA 8900D-R", + .internal_name = "tvga8900dr", + .flags = DEVICE_ISA, + .local = TVGA8900CLD_ID | 0x0100, + .init = tvga_init, + .close = tvga_close, + .reset = NULL, + { .available = tvga8900dr_available }, + .speed_changed = tvga_speed_changed, + .force_redraw = tvga_force_redraw, + .config = tvga_config +}; + const device_t tvga9000b_device = { .name = "Trident TVGA 9000B", .internal_name = "tvga9000b", From 3061e9343c768272860ad3a9810aae3dc686df60 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sat, 9 Mar 2024 13:30:13 +0100 Subject: [PATCH 15/33] Give the TVGA 8900D-R faster timings. --- src/video/vid_tvga.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/video/vid_tvga.c b/src/video/vid_tvga.c index babd909beb8..e97805beba1 100644 --- a/src/video/vid_tvga.c +++ b/src/video/vid_tvga.c @@ -418,7 +418,10 @@ tvga_init(const device_t *info) video_inform(VIDEO_FLAG_TYPE_SPECIAL, &timing_tvga9000); tvga->vram_size = 512 << 10; } else { - video_inform(VIDEO_FLAG_TYPE_SPECIAL, &timing_tvga8900); + if (info->local & 0x0100) + video_inform(VIDEO_FLAG_TYPE_SPECIAL, &timing_tvga9000); + else + video_inform(VIDEO_FLAG_TYPE_SPECIAL, &timing_tvga8900); tvga->vram_size = device_get_config_int("memory") << 10; } From cb8b6b68a749496b44fbf488cf7d4ae5ce1935cb Mon Sep 17 00:00:00 2001 From: OBattler Date: Sat, 9 Mar 2024 13:31:42 +0100 Subject: [PATCH 16/33] And made them on par with the Tseng ET4000AX, as the available data suggests. --- src/video/vid_tvga.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/video/vid_tvga.c b/src/video/vid_tvga.c index e97805beba1..cd5714d0456 100644 --- a/src/video/vid_tvga.c +++ b/src/video/vid_tvga.c @@ -60,6 +60,7 @@ typedef struct tvga_t { } tvga_t; video_timings_t timing_tvga8900 = { .type = VIDEO_ISA, .write_b = 3, .write_w = 3, .write_l = 6, .read_b = 8, .read_w = 8, .read_l = 12 }; +video_timings_t timing_tvga8900dr = { .type = VIDEO_ISA, .write_b = 3, .write_w = 3, .write_l = 6, .read_b = 5, .read_w = 5, .read_l = 10 }; video_timings_t timing_tvga9000 = { .type = VIDEO_ISA, .write_b = 7, .write_w = 7, .write_l = 12, .read_b = 7, .read_w = 7, .read_l = 12 }; static uint8_t crtc_mask[0x40] = { @@ -419,7 +420,7 @@ tvga_init(const device_t *info) tvga->vram_size = 512 << 10; } else { if (info->local & 0x0100) - video_inform(VIDEO_FLAG_TYPE_SPECIAL, &timing_tvga9000); + video_inform(VIDEO_FLAG_TYPE_SPECIAL, &timing_tvga8900dr); else video_inform(VIDEO_FLAG_TYPE_SPECIAL, &timing_tvga8900); tvga->vram_size = device_get_config_int("memory") << 10; From 567d66b788355e903fba2a3f9c780ce5da5f0e55 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sat, 9 Mar 2024 13:43:59 +0100 Subject: [PATCH 17/33] Added the IBM Aptiva CM (Japanese PC 330). --- src/include/86box/machine.h | 1 + src/machine/m_at_386dx_486.c | 44 +++++++++++++++++++++++++++--------- src/machine/machine_table.c | 40 ++++++++++++++++++++++++++++++++ 3 files changed, 74 insertions(+), 11 deletions(-) diff --git a/src/include/86box/machine.h b/src/include/86box/machine.h index e27a70d7948..7652792574a 100644 --- a/src/include/86box/machine.h +++ b/src/include/86box/machine.h @@ -521,6 +521,7 @@ extern int machine_at_403tg_d_init(const machine_t *); extern int machine_at_403tg_d_mr_init(const machine_t *); extern int machine_at_pb450_init(const machine_t *); extern int machine_at_pb450_init(const machine_t *); +extern int machine_at_aptiva_cm_init(const machine_t *); extern int machine_at_pc330_6573_init(const machine_t *); extern int machine_at_mvi486_init(const machine_t *); diff --git a/src/machine/m_at_386dx_486.c b/src/machine/m_at_386dx_486.c index 1dd63ce32a9..7d843aecea1 100644 --- a/src/machine/m_at_386dx_486.c +++ b/src/machine/m_at_386dx_486.c @@ -693,17 +693,9 @@ machine_at_pb450_init(const machine_t *model) return ret; } -int -machine_at_pc330_6573_init(const machine_t *model) /* doesn't like every CPU other than the iDX4 and the Intel OverDrive, hangs without a PS/2 mouse */ +static void +machine_at_pc330_6573_common_init(const machine_t *model) { - int ret; - - ret = bios_load_linear("roms/machines/pc330_6573/$IMAGES.USF", - 0x000e0000, 131072, 0); - - if (bios_only || !ret) - return ret; - machine_at_common_init_ex(model, 2); device_add(&ide_vlb_2ch_device); @@ -718,7 +710,7 @@ machine_at_pc330_6573_init(const machine_t *model) /* doesn't like every CPU oth pci_register_slot(0x0E, PCI_CARD_VIDEO, 13, 14, 15, 16); if (gfxcard[0] == VID_INTERNAL) - device_add(&gd5430_onboard_vlb_device); + device_add(machine_get_vid_device(machine)); device_add(&opti602_device); device_add(&opti802g_device); @@ -727,6 +719,36 @@ machine_at_pc330_6573_init(const machine_t *model) /* doesn't like every CPU oth device_add(&fdc37c665_ide_device); device_add(&ide_opti611_vlb_device); device_add(&intel_flash_bxt_device); +} + +int +machine_at_aptiva_cm_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/aptiva_cm/$IMAGES.USF", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_pc330_6573_common_init(model); + + return ret; +} + +int +machine_at_pc330_6573_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/pc330_6573/$IMAGES.USF", + 0x000e0000, 131072, 0); + + if (bios_only || !ret) + return ret; + + machine_at_pc330_6573_common_init(model); return ret; } diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index d620357d63b..1426dbcb32c 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -7185,6 +7185,46 @@ const machine_t machines[] = { .net_device = NULL }, /* Has IBM PS/2 Type 1 KBC firmware. */ + { + .name = "[OPTi 802G] IBM Aptiva CM", + .internal_name = "aptiva_cm", + .type = MACHINE_TYPE_486_S3, + .chipset = MACHINE_CHIPSET_OPTI_895_802G, + .init = machine_at_aptiva_cm_init, + .p1_handler = NULL, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET3_PC330, + .block = CPU_BLOCK_NONE, + .min_bus = 25000000, + .max_bus = 33333333, + .min_voltage = 0, + .max_voltage = 0, + .min_multi = 2.0, + .max_multi = 3.0 + }, + .bus_flags = MACHINE_PS2_PCI, + .flags = MACHINE_IDE | MACHINE_VIDEO | MACHINE_APM, + .ram = { + .min = 1024, + .max = 65536, + .step = 1024 + }, + .nvrmask = 255, + .kbc_device = NULL, + .kbc_p1 = 0xff, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = &gd5430_onboard_pci_device, + .snd_device = NULL, + .net_device = NULL + }, + /* Has IBM PS/2 Type 1 KBC firmware. */ { .name = "[OPTi 802G] IBM PC 330 (type 6573)", .internal_name = "pc330_6573", From 9006f31f45de2c40d8d73b009a23b1d73e656b32 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sat, 9 Mar 2024 14:46:33 +0100 Subject: [PATCH 18/33] Added the NEC Mate NX MA23C. --- src/include/86box/machine.h | 1 + src/machine/m_at_socket7.c | 31 ++++++++++++++++++++++++++ src/machine/machine_table.c | 43 ++++++++++++++++++++++++++++++++++++- 3 files changed, 74 insertions(+), 1 deletion(-) diff --git a/src/include/86box/machine.h b/src/include/86box/machine.h index 7652792574a..c13b423b06e 100644 --- a/src/include/86box/machine.h +++ b/src/include/86box/machine.h @@ -706,6 +706,7 @@ extern int machine_at_pb810_init(const machine_t *); extern int machine_at_mb520n_init(const machine_t *); extern int machine_at_i430vx_init(const machine_t *); +extern int machine_at_ma23c_init(const machine_t *); extern int machine_at_nupro592_init(const machine_t *); extern int machine_at_tx97_init(const machine_t *); #if defined(DEV_BRANCH) && defined(USE_AN430TX) diff --git a/src/machine/m_at_socket7.c b/src/machine/m_at_socket7.c index 9ab24b7c26c..ce21c6437a8 100644 --- a/src/machine/m_at_socket7.c +++ b/src/machine/m_at_socket7.c @@ -798,6 +798,37 @@ machine_at_i430vx_init(const machine_t *model) return ret; } +int +machine_at_ma23c_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/ma23c/BIOS.ROM", + 0x000c0000, 262144, 0); + + if (bios_only || !ret) + return ret; + + 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(0x14, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x12, PCI_CARD_NORMAL, 2, 3, 4, 1); + pci_register_slot(0x0C, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x07, PCI_CARD_SOUTHBRIDGE, 1, 2, 3, 4); + pci_register_slot(0x0B, PCI_CARD_VIDEO, 3, 4, 1, 2); + device_add(&i430tx_device); + device_add(&piix4_device); + device_add(&nec_mate_unk_device); + device_add(&keyboard_ps2_ami_pci_device); + device_add(&fdc37c67x_device); + device_add(&intel_flash_bxt_device); + spd_register(SPD_TYPE_SDRAM, 0x7, 256); + + return ret; +} + int machine_at_nupro592_init(const machine_t *model) { diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index 1426dbcb32c..810597899bf 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -11997,6 +11997,47 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, + /* Has a SM(S)C FDC37C67x Super I/O chip with on-chip KBC with Phoenix or + AMIKey-2 KBC firmware. */ + { + .name = "[i430TX] NEC Mate NX MA23C", + .internal_name = "ma23c", + .type = MACHINE_TYPE_SOCKET7, + .chipset = MACHINE_CHIPSET_INTEL_430TX, + .init = machine_at_ma23c_init, + .p1_handler = NULL, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SOCKET5_7, + .block = CPU_BLOCK_NONE, + .min_bus = 60000000, + .max_bus = 66666667, + .min_voltage = 2700, + .max_voltage = 3520, + .min_multi = 1.5, + .max_multi = 3.0 + }, + .bus_flags = MACHINE_PS2_PCI, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_USB, + .ram = { + .min = 8192, + .max = 786432, + .step = 8192 + }, + .nvrmask = 255, + .kbc_device = NULL, + .kbc_p1 = 0xff, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, /* The BIOS sends KBC command BB and expects it to output a byte, which is AMI KBC behavior. A picture shows a VIA VT82C42N KBC though, so it could be a case of that KBC with AMI firmware. */ { @@ -13683,7 +13724,7 @@ const machine_t machines[] = { .snd_device = NULL, .net_device = NULL }, - /* Has a SM(S)C FDC37M60x Super I/O chip with on-chip KBC with Phoenix or + /* Has a SM(S)C FDC37C67x Super I/O chip with on-chip KBC with Phoenix or AMIKey-2 KBC firmware. */ { .name = "[i440LX] NEC Mate NX MA30D/23D", From d4fa99648e9a0f6adbcb943a85312df4bb074cf8 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sat, 9 Mar 2024 18:56:42 +0100 Subject: [PATCH 19/33] SiS 5595 fixes, added the PC Chips M747, and corrected the name of the Aptiva. --- src/acpi.c | 3 +++ src/chipset/sis_5513_p2i.c | 32 +++++++++++++++++++++++-- src/include/86box/machine.h | 3 ++- src/machine/m_at_386dx_486.c | 4 ++-- src/machine/m_at_slot1.c | 27 +++++++++++++++++++++ src/machine/machine_table.c | 46 +++++++++++++++++++++++++++++++++--- 6 files changed, 107 insertions(+), 8 deletions(-) diff --git a/src/acpi.c b/src/acpi.c index 93cb715423b..339ea7dcfed 100644 --- a/src/acpi.c +++ b/src/acpi.c @@ -1733,6 +1733,9 @@ acpi_reg_write_sis_5595(int size, uint16_t addr, uint8_t val, void *priv) break; case 0x1c: dev->regs.gpe_pin = ((dev->regs.gpe_pin & ~(0xff << shift32)) | ((val & 0xff) << shift32)); + if (!strcmp(machine_get_internal_name(), "m747") && (val & 0x10) && + !(dev->regs.gpe_io & 0x00000010)) + resetx86(); break; case 0x1d: dev->regs.gpe_pin = ((dev->regs.gpe_pin & ~(0x0f << shift32)) | ((val & 0x0f) << shift32)); diff --git a/src/chipset/sis_5513_p2i.c b/src/chipset/sis_5513_p2i.c index df18cc4b39b..d0c423a8e89 100644 --- a/src/chipset/sis_5513_p2i.c +++ b/src/chipset/sis_5513_p2i.c @@ -86,6 +86,7 @@ typedef struct sis_5513_pci_to_isa_t { port_92_t *port_92; void *pit; nvr_t *nvr; + char *fn; ddma_t *ddma; acpi_t *acpi; void *smbus; @@ -1077,7 +1078,6 @@ sis_5513_11_pci_to_isa_reset(sis_5513_pci_to_isa_t *dev) dev->sis->ide_bits_1_3_writable = 0; dev->sis->usb_enabled = 0; - sis_5513_apc_reset(dev); sis_5513_apc_recalc(dev, 0); } @@ -1132,7 +1132,6 @@ sis_5513_b0_pci_to_isa_reset(sis_5513_pci_to_isa_t *dev) dev->sis->usb_enabled = 0; - sis_5513_apc_reset(dev); sis_5513_apc_recalc(dev, 0); if (dev->rev == 0x81) @@ -1196,6 +1195,17 @@ static void sis_5513_pci_to_isa_close(void *priv) { sis_5513_pci_to_isa_t *dev = (sis_5513_pci_to_isa_t *) priv; + FILE *fp = NULL; + + fp = nvr_fopen(dev->fn, "wb"); + + if (fp != NULL) { + (void) fwrite(dev->apc_regs, 256, 1, fp); + fclose(fp); + } + + if (dev->fn != NULL) + free(dev->fn); free(dev); } @@ -1205,6 +1215,8 @@ sis_5513_pci_to_isa_init(UNUSED(const device_t *info)) { sis_5513_pci_to_isa_t *dev = (sis_5513_pci_to_isa_t *) calloc(1, sizeof(sis_5513_pci_to_isa_t)); uint8_t pit_is_fast = (((pit_mode == -1) && is486) || (pit_mode == 1)); + FILE *fp = NULL; + int c; dev->rev = info->local; @@ -1272,6 +1284,22 @@ sis_5513_pci_to_isa_init(UNUSED(const device_t *info)) dev->sis->acpi->priv = dev->sis; acpi_set_slot(dev->sis->acpi, dev->sis->sb_pci_slot); acpi_set_nvr(dev->sis->acpi, dev->nvr); + + /* Set up the NVR file's name. */ + c = strlen(machine_get_internal_name()) + 9; + dev->fn = (char *) malloc(c + 1); + sprintf(dev->fn, "%s_apc.nvr", machine_get_internal_name()); + + fp = nvr_fopen(dev->fn, "rb"); + + memset(dev->apc_regs, 0x00, sizeof(dev->apc_regs)); + sis_5513_apc_reset(dev); + if (fp != NULL) { + if (fread(dev->apc_regs, 1, 256, fp) != 256) + fatal("sis_5513_pci_to_isa_init(): Error reading APC data\n"); + fclose(fp); + } + acpi_set_irq_mode(dev->sis->acpi, 2); break; } diff --git a/src/include/86box/machine.h b/src/include/86box/machine.h index c13b423b06e..18abf9ea92f 100644 --- a/src/include/86box/machine.h +++ b/src/include/86box/machine.h @@ -521,7 +521,7 @@ extern int machine_at_403tg_d_init(const machine_t *); extern int machine_at_403tg_d_mr_init(const machine_t *); extern int machine_at_pb450_init(const machine_t *); extern int machine_at_pb450_init(const machine_t *); -extern int machine_at_aptiva_cm_init(const machine_t *); +extern int machine_at_aptiva_510_init(const machine_t *); extern int machine_at_pc330_6573_init(const machine_t *); extern int machine_at_mvi486_init(const machine_t *); @@ -801,6 +801,7 @@ extern int machine_at_borapro_init(const machine_t *); extern int machine_at_ms6168_init(const machine_t *); extern int machine_at_p6f99_init(const machine_t *); +extern int machine_at_m747_init(const machine_t *); /* m_at_slot2.c */ extern int machine_at_6gxu_init(const machine_t *); diff --git a/src/machine/m_at_386dx_486.c b/src/machine/m_at_386dx_486.c index 7d843aecea1..4cfa7447ef9 100644 --- a/src/machine/m_at_386dx_486.c +++ b/src/machine/m_at_386dx_486.c @@ -722,11 +722,11 @@ machine_at_pc330_6573_common_init(const machine_t *model) } int -machine_at_aptiva_cm_init(const machine_t *model) +machine_at_aptiva_510_init(const machine_t *model) { int ret; - ret = bios_load_linear("roms/machines/aptiva_cm/$IMAGES.USF", + ret = bios_load_linear("roms/machines/aptiva_510/$IMAGES.USF", 0x000e0000, 131072, 0); if (bios_only || !ret) diff --git a/src/machine/m_at_slot1.c b/src/machine/m_at_slot1.c index d31d763d48b..a3c25d12b43 100644 --- a/src/machine/m_at_slot1.c +++ b/src/machine/m_at_slot1.c @@ -841,3 +841,30 @@ machine_at_p6f99_init(const machine_t *model) return ret; } +int +machine_at_m747_init(const machine_t *model) +{ + int ret; + + ret = bios_load_linear("roms/machines/m747/990521.rom", + 0x000c0000, 262144, 0); + + if (bios_only || !ret) + return ret; + + 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(0x01, PCI_CARD_SOUTHBRIDGE, 0, 0, 0, 0); + pci_register_slot(0x09, PCI_CARD_NORMAL, 1, 2, 3, 4); + pci_register_slot(0x0B, PCI_CARD_NORMAL, 4, 1, 2, 3); + pci_register_slot(0x0D, PCI_CARD_NORMAL, 3, 4, 1, 2); + pci_register_slot(0x02, PCI_CARD_AGPBRIDGE, 0, 0, 0, 0); + device_add(&sis_5600_device); + device_add(&keyboard_ps2_ami_pci_device); + device_add(&it8661f_device); + device_add(&winbond_flash_w29c020_device); + + return ret; +} diff --git a/src/machine/machine_table.c b/src/machine/machine_table.c index 810597899bf..04cc59043ba 100644 --- a/src/machine/machine_table.c +++ b/src/machine/machine_table.c @@ -7186,11 +7186,11 @@ const machine_t machines[] = { }, /* Has IBM PS/2 Type 1 KBC firmware. */ { - .name = "[OPTi 802G] IBM Aptiva CM", - .internal_name = "aptiva_cm", + .name = "[OPTi 802G] IBM Aptiva 510/710/Vision", + .internal_name = "aptiva_510", .type = MACHINE_TYPE_486_S3, .chipset = MACHINE_CHIPSET_OPTI_895_802G, - .init = machine_at_aptiva_cm_init, + .init = machine_at_aptiva_510_init, .p1_handler = NULL, .gpio_handler = NULL, .available_flag = MACHINE_AVAILABLE, @@ -14513,6 +14513,46 @@ const machine_t machines[] = { .snd_device = &es1371_onboard_device, /* ES1373 but we currently don't emulate that. */ .net_device = NULL }, + /* Has the SiS (5)600 chipset with on-chip KBC. */ + { + .name = "[SiS 5600] PC Chips M747", + .internal_name = "m747", + .type = MACHINE_TYPE_SLOT1, + .chipset = MACHINE_CHIPSET_SIS_5600, + .init = machine_at_m747_init, + .p1_handler = NULL, + .gpio_handler = NULL, + .available_flag = MACHINE_AVAILABLE, + .gpio_acpi_handler = NULL, + .cpu = { + .package = CPU_PKG_SLOT1, + .block = CPU_BLOCK_NONE, + .min_bus = 66666667, + .max_bus = 100000000, + .min_voltage = 1300, + .max_voltage = 3500, + .min_multi = 1.5, + .max_multi = 8.0 + }, + .bus_flags = MACHINE_PS2_PCI, + .flags = MACHINE_IDE_DUAL | MACHINE_APM | MACHINE_ACPI | MACHINE_GAMEPORT | MACHINE_USB, + .ram = { + .min = 8192, + .max = 1572864, + .step = 1024 + }, + .nvrmask = 255, + .kbc_device = NULL, + .kbc_p1 = 0xff, + .gpio = 0xffffffff, + .gpio_acpi = 0xffffffff, + .device = NULL, + .fdc_device = NULL, + .sio_device = NULL, + .vid_device = NULL, + .snd_device = NULL, + .net_device = NULL + }, /* Slot 1/2 machines */ /* 440GX */ From f4a7fd7190122f121ea00cfe2dbed2d04d969d41 Mon Sep 17 00:00:00 2001 From: OBattler Date: Sat, 9 Mar 2024 19:07:54 +0100 Subject: [PATCH 20/33] Added two more ET4000AX BIOS'es. --- src/video/vid_et4000.c | 82 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 71 insertions(+), 11 deletions(-) diff --git a/src/video/vid_et4000.c b/src/video/vid_et4000.c index 5fe524fd8ee..7ceacb823ff 100644 --- a/src/video/vid_et4000.c +++ b/src/video/vid_et4000.c @@ -63,7 +63,9 @@ #define ET4000_TYPE_KASAN 5 /* Kasan ET4000 */ #define BIOS_ROM_PATH "roms/video/et4000/ET4000.BIN" +#define V8_06_BIOS_ROM_PATH "roms/video/et4000/ET4000_V8_06.BIN" #define TC6058AF_BIOS_ROM_PATH "roms/video/et4000/Tseng_Labs_VGA-4000_BIOS_V1.1.bin" +#define V1_21_BIOS_ROM_PATH "roms/video/et4000/Tseng_Labs_VGA-4000_BIOS_V1.21.bin" #define KOREAN_BIOS_ROM_PATH "roms/video/et4000/tgkorvga.bin" #define KOREAN_FONT_ROM_PATH "roms/video/et4000/tg_ksc5601.rom" #define KASAN_BIOS_ROM_PATH "roms/video/et4000/et4000_kasan16.bin" @@ -783,6 +785,7 @@ et4000_mca_feedb(UNUSED(void *priv)) static void * et4000_init(const device_t *info) { + const char *bios_ver = NULL; const char *fn; et4000_t *dev; int i; @@ -803,8 +806,8 @@ et4000_init(const device_t *info) NULL, NULL); io_sethandler(0x03c0, 32, et4000_in, NULL, NULL, et4000_out, NULL, NULL, dev); - if (dev->type == ET4000_TYPE_TC6058AF) - fn = TC6058AF_BIOS_ROM_PATH; + bios_ver = (char *) device_get_config_bios("bios_ver"); + fn = (char *) device_get_bios_file(info, bios_ver, 0); break; case ET4000_TYPE_MCA: /* MCA ET4000AX */ @@ -925,12 +928,6 @@ et4000_force_redraw(void *priv) dev->svga.fullchange = changeframecount; } -static int -et4000_tc6058af_available(void) -{ - return rom_present(TC6058AF_BIOS_ROM_PATH); -} - static int et4000_available(void) { @@ -970,12 +967,75 @@ static const device_config_t et4000_tc6058af_config[] = { } } }, + { + .name = "bios_ver", + .description = "BIOS Version", + .type = CONFIG_BIOS, + .default_string = "v1_10", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, /*W1*/ + .bios = { + { .name = "Version 1.10", .internal_name = "v1_10", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 32768, .files = { TC6058AF_BIOS_ROM_PATH, "" } }, + { .name = "Version 1.21", .internal_name = "v1_21", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 32768, .files = { V1_21_BIOS_ROM_PATH, "" } }, + { .files_no = 0 } + }, + }, { .type = CONFIG_END } // clang-format on }; +static const device_config_t et4000_bios_config[] = { + // clang-format off + { + .name = "memory", + .description = "Memory size", + .type = CONFIG_SELECTION, + .default_int = 1024, + .selection = { + { + .description = "256 KB", + .value = 256 + }, + { + .description = "512 KB", + .value = 512 + }, + { + .description = "1 MB", + .value = 1024 + }, + { + .description = "" + } + } + }, + { + .name = "bios_ver", + .description = "BIOS Version", + .type = CONFIG_BIOS, + .default_string = "v8_01", + .default_int = 0, + .file_filter = "", + .spinner = { 0 }, /*W1*/ + .bios = { + { .name = "Version 8.01", .internal_name = "v8_01", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 32768, .files = { BIOS_ROM_PATH, "" } }, + { .name = "Version 8.06", .internal_name = "v8_06", .bios_type = BIOS_NORMAL, + .files_no = 1, .local = 0, .size = 32768, .files = { V8_06_BIOS_ROM_PATH, "" } }, + { .files_no = 0 } + }, + }, + { + .type = CONFIG_END + } + // clang-format on +}; + static const device_config_t et4000_config[] = { // clang-format off { @@ -1015,7 +1075,7 @@ const device_t et4000_tc6058af_isa_device = { .init = et4000_init, .close = et4000_close, .reset = NULL, - { .available = et4000_tc6058af_available }, + { .available = NULL }, .speed_changed = et4000_speed_changed, .force_redraw = et4000_force_redraw, .config = et4000_tc6058af_config @@ -1029,10 +1089,10 @@ const device_t et4000_isa_device = { .init = et4000_init, .close = et4000_close, .reset = NULL, - { .available = et4000_available }, + { .available = NULL }, .speed_changed = et4000_speed_changed, .force_redraw = et4000_force_redraw, - .config = et4000_config + .config = et4000_bios_config }; const device_t et4000_mca_device = { From e0c5eb49f1f5a186d83e5903f3f551f633aeb393 Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Sun, 10 Mar 2024 18:01:09 -0300 Subject: [PATCH 21/33] DDC: EDID data improvements, hopefully fixes 1600x1200 on older OSes --- src/qt/languages/ca-ES.po | 6 ++++++ src/qt/languages/cs-CZ.po | 6 ++++++ src/qt/languages/de-DE.po | 6 ++++++ src/qt/languages/en-GB.po | 6 ++++++ src/qt/languages/en-US.po | 6 ++++++ src/qt/languages/es-ES.po | 6 ++++++ src/qt/languages/fi-FI.po | 6 ++++++ src/qt/languages/fr-FR.po | 5 +++++ src/qt/languages/hr-HR.po | 6 ++++++ src/qt/languages/hu-HU.po | 6 ++++++ src/qt/languages/it-IT.po | 6 ++++++ src/qt/languages/ja-JP.po | 6 ++++++ src/qt/languages/ko-KR.po | 6 ++++++ src/qt/languages/pl-PL.po | 6 ++++++ src/qt/languages/pt-BR.po | 6 ++++++ src/qt/languages/pt-PT.po | 6 ++++++ src/qt/languages/ru-RU.po | 6 ++++++ src/qt/languages/sk-SK.po | 6 ++++++ src/qt/languages/sl-SI.po | 6 ++++++ src/qt/languages/tr-TR.po | 6 ++++++ src/qt/languages/uk-UA.po | 6 ++++++ src/qt/languages/zh-CN.po | 5 +++++ src/qt/languages/zh-TW.po | 6 ++++++ src/qt/qt_main.cpp | 23 +++++++++++++++++++++++ src/video/vid_ddc.c | 14 +++++++------- 25 files changed, 166 insertions(+), 7 deletions(-) diff --git a/src/qt/languages/ca-ES.po b/src/qt/languages/ca-ES.po index 483e6ee531c..cba27b8399d 100644 --- a/src/qt/languages/ca-ES.po +++ b/src/qt/languages/ca-ES.po @@ -1224,3 +1224,9 @@ msgstr "Ràpid" msgid "&Auto-pause on focus loss" msgstr "&Pausa automàtica en la pèrdua del focus" + +msgid "WinBox is no longer supported" +msgstr "WinBox is no longer supported" + +msgid "Development of the WinBox manager stopped in 2022 due to a lack of maintainers. As we direct our efforts towards making 86Box even better, we have made the decision to no longer support WinBox as a manager.\n\nNo further updates will be provided through WinBox, and you may encounter incorrect behavior should you continue using it with newer versions of 86Box. Any bug reports related to WinBox behavior will be closed as invalid.\n\nGo to 86box.net for a list of other managers you can use." +msgstr "Development of the WinBox manager stopped in 2022 due to a lack of maintainers. As we direct our efforts towards making 86Box even better, we have made the decision to no longer support WinBox as a manager.\n\nNo further updates will be provided through WinBox, and you may encounter incorrect behavior should you continue using it with newer versions of 86Box. Any bug reports related to WinBox behavior will be closed as invalid.\n\nGo to 86box.net for a list of other managers you can use." diff --git a/src/qt/languages/cs-CZ.po b/src/qt/languages/cs-CZ.po index 84c7950927e..31388ca54ca 100644 --- a/src/qt/languages/cs-CZ.po +++ b/src/qt/languages/cs-CZ.po @@ -1224,3 +1224,9 @@ msgstr "Rychlý" msgid "&Auto-pause on focus loss" msgstr "&Automatická pauza při ztrátě zaměření okna" + +msgid "WinBox is no longer supported" +msgstr "WinBox již není podporován" + +msgid "Development of the WinBox manager stopped in 2022 due to a lack of maintainers. As we direct our efforts towards making 86Box even better, we have made the decision to no longer support WinBox as a manager.\n\nNo further updates will be provided through WinBox, and you may encounter incorrect behavior should you continue using it with newer versions of 86Box. Any bug reports related to WinBox behavior will be closed as invalid.\n\nGo to 86box.net for a list of other managers you can use." +msgstr "Vývoj správce WinBox byl zastaven v roce 2022 z důvodu nedostatku správců. Vzhledem k tomu, že naše úsilí směřujeme k tomu, abychom 86Box ještě vylepšili, rozhodli jsme se WinBox jako správce již nepodporovat.\n\nProstřednictvím WinBoxu nebudou poskytovány žádné další aktualizace a pokud jej budete nadále používat s novějšími verzemi 86Boxu, můžete se setkat s nesprávným chováním. Veškerá hlášení o chybách souvisejících s chováním WinBoxu budou uzavřena jako neplatná.\n\nSeznam dalších správců, které můžete používat, najdete na webu 86box.net." diff --git a/src/qt/languages/de-DE.po b/src/qt/languages/de-DE.po index 4a4fde3c290..86289507c8a 100644 --- a/src/qt/languages/de-DE.po +++ b/src/qt/languages/de-DE.po @@ -1224,3 +1224,9 @@ msgstr "Schnell" msgid "&Auto-pause on focus loss" msgstr "&Auto-Pause bei Fokusverlust" + +msgid "WinBox is no longer supported" +msgstr "WinBox wird nicht mehr unterstützt" + +msgid "Development of the WinBox manager stopped in 2022 due to a lack of maintainers. As we direct our efforts towards making 86Box even better, we have made the decision to no longer support WinBox as a manager.\n\nNo further updates will be provided through WinBox, and you may encounter incorrect behavior should you continue using it with newer versions of 86Box. Any bug reports related to WinBox behavior will be closed as invalid.\n\nGo to 86box.net for a list of other managers you can use." +msgstr "Die Entwicklung des WinBox-Managers wurde im Jahr 2022 eingestellt, da es an Betreuern mangelte. Da wir unsere Bemühungen darauf richten, 86Box noch besser zu machen, haben wir uns entschlossen, WinBox nicht mehr als Manager zu unterstützen.\n\nEs werden keine weiteren Updates für WinBox zur Verfügung gestellt, und es kann zu fehlerhaftem Verhalten kommen, wenn Sie WinBox weiterhin mit neueren Versionen von 86Box verwenden. Alle Fehlerberichte, die sich auf das Verhalten von WinBox beziehen, werden als ungültig geschlossen.\n\nAuf 86box.net finden Sie eine Liste anderer Manager, die Sie verwenden können." diff --git a/src/qt/languages/en-GB.po b/src/qt/languages/en-GB.po index 031a365c06c..cff4be3ef53 100644 --- a/src/qt/languages/en-GB.po +++ b/src/qt/languages/en-GB.po @@ -1224,3 +1224,9 @@ msgstr "Fast" msgid "&Auto-pause on focus loss" msgstr "&Auto-pause on focus loss" + +msgid "WinBox is no longer supported" +msgstr "WinBox is no longer supported" + +msgid "Development of the WinBox manager stopped in 2022 due to a lack of maintainers. As we direct our efforts towards making 86Box even better, we have made the decision to no longer support WinBox as a manager.\n\nNo further updates will be provided through WinBox, and you may encounter incorrect behavior should you continue using it with newer versions of 86Box. Any bug reports related to WinBox behavior will be closed as invalid.\n\nGo to 86box.net for a list of other managers you can use." +msgstr "Development of the WinBox manager stopped in 2022 due to a lack of maintainers. As we direct our efforts towards making 86Box even better, we have made the decision to no longer support WinBox as a manager.\n\nNo further updates will be provided through WinBox, and you may encounter incorrect behavior should you continue using it with newer versions of 86Box. Any bug reports related to WinBox behavior will be closed as invalid.\n\nGo to 86box.net for a list of other managers you can use." diff --git a/src/qt/languages/en-US.po b/src/qt/languages/en-US.po index 06a4b60f1c8..f3bca870f60 100644 --- a/src/qt/languages/en-US.po +++ b/src/qt/languages/en-US.po @@ -1224,3 +1224,9 @@ msgstr "Fast" msgid "&Auto-pause on focus loss" msgstr "&Auto-pause on focus loss" + +msgid "WinBox is no longer supported" +msgstr "WinBox is no longer supported" + +msgid "Development of the WinBox manager stopped in 2022 due to a lack of maintainers. As we direct our efforts towards making 86Box even better, we have made the decision to no longer support WinBox as a manager.\n\nNo further updates will be provided through WinBox, and you may encounter incorrect behavior should you continue using it with newer versions of 86Box. Any bug reports related to WinBox behavior will be closed as invalid.\n\nGo to 86box.net for a list of other managers you can use." +msgstr "Development of the WinBox manager stopped in 2022 due to a lack of maintainers. As we direct our efforts towards making 86Box even better, we have made the decision to no longer support WinBox as a manager.\n\nNo further updates will be provided through WinBox, and you may encounter incorrect behavior should you continue using it with newer versions of 86Box. Any bug reports related to WinBox behavior will be closed as invalid.\n\nGo to 86box.net for a list of other managers you can use." diff --git a/src/qt/languages/es-ES.po b/src/qt/languages/es-ES.po index 60ac5fb5c91..e41a9494707 100644 --- a/src/qt/languages/es-ES.po +++ b/src/qt/languages/es-ES.po @@ -1224,3 +1224,9 @@ msgstr "Rápida" msgid "&Auto-pause on focus loss" msgstr "&Pausa automática al perder el foco" + +msgid "WinBox is no longer supported" +msgstr "WinBox ya no recibe soporte" + +msgid "Development of the WinBox manager stopped in 2022 due to a lack of maintainers. As we direct our efforts towards making 86Box even better, we have made the decision to no longer support WinBox as a manager.\n\nNo further updates will be provided through WinBox, and you may encounter incorrect behavior should you continue using it with newer versions of 86Box. Any bug reports related to WinBox behavior will be closed as invalid.\n\nGo to 86box.net for a list of other managers you can use." +msgstr "El desarrollo del gestor WinBox se detuvo en 2022 debido a la falta de mantenedores. Como dirigimos nuestros esfuerzos a hacer 86Box aún mejor, hemos tomado la decisión de dejar de dar soporte a WinBox como gestor.\n\nNo se proporcionarán más actualizaciones a través de WinBox, y puede encontrar un comportamiento incorrecto si continúa usándolo con versiones más nuevas de 86Box. Cualquier informe de error relacionado con el comportamiento de WinBox será cerrado como inválido.\n\nVaya a 86box.net para una lista de otros gestores que puede utilizar." diff --git a/src/qt/languages/fi-FI.po b/src/qt/languages/fi-FI.po index 50ebffccb68..ddf6a068327 100644 --- a/src/qt/languages/fi-FI.po +++ b/src/qt/languages/fi-FI.po @@ -1224,3 +1224,9 @@ msgstr "Nopea" msgid "&Auto-pause on focus loss" msgstr "&Automaattinen tauko tarkennuksen hävitessä" + +msgid "WinBox is no longer supported" +msgstr "WinBoxia ei enää tueta" + +msgid "Development of the WinBox manager stopped in 2022 due to a lack of maintainers. As we direct our efforts towards making 86Box even better, we have made the decision to no longer support WinBox as a manager.\n\nNo further updates will be provided through WinBox, and you may encounter incorrect behavior should you continue using it with newer versions of 86Box. Any bug reports related to WinBox behavior will be closed as invalid.\n\nGo to 86box.net for a list of other managers you can use." +msgstr "WinBox-managerin kehitys lopetettiin vuonna 2022, koska ylläpitäjiä ei ollut riittävästi. Koska suuntaamme ponnistuksemme 86Boxin parantamiseen entisestään, olemme päättäneet olla enää tukematta WinBoxia managerina.\n\nWinBoxin kautta ei enää toimiteta päivityksiä, ja saatat kohdata virheellistä käyttäytymistä, jos jatkat sen käyttöä 86Boxin uudemmissa versioissa. Kaikki WinBoxin käyttäytymiseen liittyvät vikailmoitukset suljetaan virheellisinä.\n\nSiirry osoitteeseen 86box.net saadaksesi luettelon muista käyttämistäsi hallintaohjelmista." diff --git a/src/qt/languages/fr-FR.po b/src/qt/languages/fr-FR.po index 52bccebd266..c443a881d70 100644 --- a/src/qt/languages/fr-FR.po +++ b/src/qt/languages/fr-FR.po @@ -1225,3 +1225,8 @@ msgstr "Rapide" msgid "&Auto-pause on focus loss" msgstr "&Pause automatique à perte de mise au point" +msgid "WinBox is no longer supported" +msgstr "WinBox n'est plus pris en charge" + +msgid "Development of the WinBox manager stopped in 2022 due to a lack of maintainers. As we direct our efforts towards making 86Box even better, we have made the decision to no longer support WinBox as a manager.\n\nNo further updates will be provided through WinBox, and you may encounter incorrect behavior should you continue using it with newer versions of 86Box. Any bug reports related to WinBox behavior will be closed as invalid.\n\nGo to 86box.net for a list of other managers you can use." +msgstr "Le développement du gestionnaire WinBox s'est arrêté en 2022 en raison d'un manque de mainteneurs. Comme nous concentrons nos efforts sur l'amélioration de 86Box, nous avons pris la décision de ne plus supporter WinBox en tant que gestionnaire.\n\nAucune mise à jour ne sera fournie par WinBox, et vous pourriez rencontrer des comportements incorrects si vous continuez à l'utiliser avec des versions plus récentes de 86Box. Tous les rapports de bogues relatifs au comportement de WinBox seront classés comme non valides.\n\nAllez sur 86box.net pour une liste d'autres gestionnaires que vous pouvez utiliser." diff --git a/src/qt/languages/hr-HR.po b/src/qt/languages/hr-HR.po index 19b6a6e854a..28db9e32d0b 100644 --- a/src/qt/languages/hr-HR.po +++ b/src/qt/languages/hr-HR.po @@ -1224,3 +1224,9 @@ msgstr "Brzi" msgid "&Auto-pause on focus loss" msgstr "&Automatska pauza pri gubitku fokusa" + +msgid "WinBox is no longer supported" +msgstr "WinBox is no longer supported" + +msgid "Development of the WinBox manager stopped in 2022 due to a lack of maintainers. As we direct our efforts towards making 86Box even better, we have made the decision to no longer support WinBox as a manager.\n\nNo further updates will be provided through WinBox, and you may encounter incorrect behavior should you continue using it with newer versions of 86Box. Any bug reports related to WinBox behavior will be closed as invalid.\n\nGo to 86box.net for a list of other managers you can use." +msgstr "Development of the WinBox manager stopped in 2022 due to a lack of maintainers. As we direct our efforts towards making 86Box even better, we have made the decision to no longer support WinBox as a manager.\n\nNo further updates will be provided through WinBox, and you may encounter incorrect behavior should you continue using it with newer versions of 86Box. Any bug reports related to WinBox behavior will be closed as invalid.\n\nGo to 86box.net for a list of other managers you can use." diff --git a/src/qt/languages/hu-HU.po b/src/qt/languages/hu-HU.po index 338d2ff5e1d..07770c07788 100644 --- a/src/qt/languages/hu-HU.po +++ b/src/qt/languages/hu-HU.po @@ -1224,3 +1224,9 @@ msgstr "Gyors" msgid "&Auto-pause on focus loss" msgstr "&Automatikus szünet fókuszvesztéskor" + +msgid "WinBox is no longer supported" +msgstr "A WinBox már nem támogatott" + +msgid "Development of the WinBox manager stopped in 2022 due to a lack of maintainers. As we direct our efforts towards making 86Box even better, we have made the decision to no longer support WinBox as a manager.\n\nNo further updates will be provided through WinBox, and you may encounter incorrect behavior should you continue using it with newer versions of 86Box. Any bug reports related to WinBox behavior will be closed as invalid.\n\nGo to 86box.net for a list of other managers you can use." +msgstr "A WinBox menedzser fejlesztése 2022-ben leállt karbantartók hiányában. Mivel erőfeszítéseinket a 86Box még jobbá tételére irányítjuk, úgy döntöttünk, hogy a WinBox-ot mint menedzsert nem támogatjuk tovább.\n\nA WinBoxon keresztül nem lesznek további frissítések, és hibás viselkedéssel találkozhat, ha továbbra is a 86Box újabb verzióival használja. A WinBox viselkedésével kapcsolatos hibajelentéseket érvénytelennek nyilvánítjuk.\n\nA 86box.net oldalon talál egy listát más kezelőkről, amelyeket használhat." diff --git a/src/qt/languages/it-IT.po b/src/qt/languages/it-IT.po index 20c15c6564c..39ecd7e89d1 100644 --- a/src/qt/languages/it-IT.po +++ b/src/qt/languages/it-IT.po @@ -1224,3 +1224,9 @@ msgstr "Veloce" msgid "&Auto-pause on focus loss" msgstr "&Pausa automatica alla perdita della messa a fuoco" + +msgid "WinBox is no longer supported" +msgstr "WinBox non è più supportato" + +msgid "Development of the WinBox manager stopped in 2022 due to a lack of maintainers. As we direct our efforts towards making 86Box even better, we have made the decision to no longer support WinBox as a manager.\n\nNo further updates will be provided through WinBox, and you may encounter incorrect behavior should you continue using it with newer versions of 86Box. Any bug reports related to WinBox behavior will be closed as invalid.\n\nGo to 86box.net for a list of other managers you can use." +msgstr "Lo sviluppo del gestore WinBox si è interrotto nel 2022 per mancanza di manutentori. Poiché i nostri sforzi sono rivolti a rendere 86Box ancora migliore, abbiamo deciso di non supportare più WinBox come gestore.\n\nNon saranno forniti ulteriori aggiornamenti tramite WinBox e si potrebbe riscontrare un comportamento non corretto se si continua a utilizzarlo con versioni più recenti di 86Box. Tutte le segnalazioni di bug relative al comportamento di WinBox saranno chiuse in quanto non valide.\n\nPer un elenco di altri gestori utilizzabili, visitare 86box.net." diff --git a/src/qt/languages/ja-JP.po b/src/qt/languages/ja-JP.po index ebcaf9cfb8a..5eb5d23c188 100644 --- a/src/qt/languages/ja-JP.po +++ b/src/qt/languages/ja-JP.po @@ -1224,3 +1224,9 @@ msgstr "速い" msgid "&Auto-pause on focus loss" msgstr "フォーカスが奪われると自動停止(&A)" + +msgid "WinBox is no longer supported" +msgstr "WinBoxはサポート終了" + +msgid "Development of the WinBox manager stopped in 2022 due to a lack of maintainers. As we direct our efforts towards making 86Box even better, we have made the decision to no longer support WinBox as a manager.\n\nNo further updates will be provided through WinBox, and you may encounter incorrect behavior should you continue using it with newer versions of 86Box. Any bug reports related to WinBox behavior will be closed as invalid.\n\nGo to 86box.net for a list of other managers you can use." +msgstr "WinBoxマネージャーの開発は、メンテナ不足のため2022年に停止しました。86Boxをより良いものにするため、WinBoxをマネージャーとしてサポートしないことを決定しました。\n\nWinBoxを使ったアップデートは今後提供されませんし、86Boxの新しいバージョンでWinBoxを使い続けると、正しくない動作に遭遇するかもしれません。WinBoxの動作に関連するバグレポートは無効としてクローズされます。\n\n86box.netに他のマネージャのリストがあります。" diff --git a/src/qt/languages/ko-KR.po b/src/qt/languages/ko-KR.po index 949548ed181..2eaf53b2ec9 100644 --- a/src/qt/languages/ko-KR.po +++ b/src/qt/languages/ko-KR.po @@ -1224,3 +1224,9 @@ msgstr "빠른" msgid "&Auto-pause on focus loss" msgstr "집중력 저하 시 자동 일시 중지(&A)" + +msgid "WinBox is no longer supported" +msgstr "WinBox는 더 이상 지원되지 않습니다" + +msgid "Development of the WinBox manager stopped in 2022 due to a lack of maintainers. As we direct our efforts towards making 86Box even better, we have made the decision to no longer support WinBox as a manager.\n\nNo further updates will be provided through WinBox, and you may encounter incorrect behavior should you continue using it with newer versions of 86Box. Any bug reports related to WinBox behavior will be closed as invalid.\n\nGo to 86box.net for a list of other managers you can use." +msgstr "WinBox 매니저의 개발은 유지 관리자의 부족으로 인해 2022년에 중단되었습니다. 86Box를 더욱 개선하기 위한 노력의 일환으로 WinBox 매니저를 더 이상 지원하지 않기로 결정했습니다.\n\nWinBox를 통해 더 이상의 업데이트는 제공되지 않으며, 최신 버전의 86Box를 계속 사용할 경우 잘못된 동작이 발생할 수 있습니다. WinBox 동작과 관련된 모든 버그 보고는 유효하지 않은 것으로 종료됩니다.\n\n사용할 수 있는 다른 관리자 목록을 보려면 86box.net으로 이동하세요." diff --git a/src/qt/languages/pl-PL.po b/src/qt/languages/pl-PL.po index eb7a13e4ef8..583774ab4ff 100644 --- a/src/qt/languages/pl-PL.po +++ b/src/qt/languages/pl-PL.po @@ -1224,3 +1224,9 @@ msgstr "Szybki" msgid "&Auto-pause on focus loss" msgstr "&Automatyczna pauza po utracie fokusu" + +msgid "WinBox is no longer supported" +msgstr "WinBox nie jest już wspierany" + +msgid "Development of the WinBox manager stopped in 2022 due to a lack of maintainers. As we direct our efforts towards making 86Box even better, we have made the decision to no longer support WinBox as a manager.\n\nNo further updates will be provided through WinBox, and you may encounter incorrect behavior should you continue using it with newer versions of 86Box. Any bug reports related to WinBox behavior will be closed as invalid.\n\nGo to 86box.net for a list of other managers you can use." +msgstr "Rozwój menedżera WinBox został zatrzymany w 2022 roku z powodu braku opiekunów. Ponieważ kierujemy nasze wysiłki na uczynienie 86Box jeszcze lepszym, podjęliśmy decyzję o zaprzestaniu wspierania WinBox jako menedżera.\n\nŻadne dalsze aktualizacje nie będą dostarczane za pośrednictwem WinBox i możesz napotkać nieprawidłowe zachowanie, jeśli będziesz go nadal używać z nowszymi wersjami 86Box. Wszelkie zgłoszenia błędów związane z działaniem WinBox zostaną zamknięte jako nieważne.\n\nLista innych menedżerów, z których można korzystać, znajduje się na stronie 86box.net." diff --git a/src/qt/languages/pt-BR.po b/src/qt/languages/pt-BR.po index 148ca716c27..8ee668a1d50 100644 --- a/src/qt/languages/pt-BR.po +++ b/src/qt/languages/pt-BR.po @@ -1224,3 +1224,9 @@ msgstr "Rápido" msgid "&Auto-pause on focus loss" msgstr "Pausa &automática ao perder o foco" + +msgid "WinBox is no longer supported" +msgstr "O WinBox não é mais suportado" + +msgid "Development of the WinBox manager stopped in 2022 due to a lack of maintainers. As we direct our efforts towards making 86Box even better, we have made the decision to no longer support WinBox as a manager.\n\nNo further updates will be provided through WinBox, and you may encounter incorrect behavior should you continue using it with newer versions of 86Box. Any bug reports related to WinBox behavior will be closed as invalid.\n\nGo to 86box.net for a list of other managers you can use." +msgstr "O desenvolvimento do gerenciador WinBox foi interrompido em 2022 devido à falta de mantenedores. Conforme direcionamos nossos esforços para tornar o 86Box ainda melhor, tomamos a decisão de não oferecer mais suporte ao WinBox como gerenciador.\n\nAtualizações não serão mais fornecidas através do WinBox, e você poderá encontrar comportamentos incorretos caso continue a usá-lo com versões mais recentes do 86Box. Quaisquer relatórios de bugs relacionados ao comportamento do WinBox serão fechados como inválidos.\n\nAcesse 86box.net para obter uma lista de outros gerenciadores que você pode usar." diff --git a/src/qt/languages/pt-PT.po b/src/qt/languages/pt-PT.po index e309d91bfd1..6ae146eafec 100644 --- a/src/qt/languages/pt-PT.po +++ b/src/qt/languages/pt-PT.po @@ -1224,3 +1224,9 @@ msgstr "Rápido" msgid "&Auto-pause on focus loss" msgstr "Pausa &automática na perda de focagem" + +msgid "WinBox is no longer supported" +msgstr "O WinBox não é mais suportado" + +msgid "Development of the WinBox manager stopped in 2022 due to a lack of maintainers. As we direct our efforts towards making 86Box even better, we have made the decision to no longer support WinBox as a manager.\n\nNo further updates will be provided through WinBox, and you may encounter incorrect behavior should you continue using it with newer versions of 86Box. Any bug reports related to WinBox behavior will be closed as invalid.\n\nGo to 86box.net for a list of other managers you can use." +msgstr "O desenvolvimento do gerenciador WinBox parou em 2022 devido à falta de mantenedores. Como direcionamos nossos esforços para tornar o 86Box ainda melhor, tomamos a decisão de não mais suportar o WinBox como um gerenciador.\n\nNão serão fornecidas mais actualizações através do WinBox, e poderá encontrar um comportamento incorreto se continuar a usá-lo com versões mais recentes do 86Box. Quaisquer relatórios de erros relacionados com o comportamento do WinBox serão fechados como inválidos.\n\nVá a 86box.net para uma lista de outros gestores que pode utilizar." diff --git a/src/qt/languages/ru-RU.po b/src/qt/languages/ru-RU.po index 4aa99eb873d..cbeeafdd5ce 100644 --- a/src/qt/languages/ru-RU.po +++ b/src/qt/languages/ru-RU.po @@ -1314,3 +1314,9 @@ msgstr "Быстрый" msgid "&Auto-pause on focus loss" msgstr "&Автопауза при потере фокуса" + +msgid "WinBox is no longer supported" +msgstr "WinBox больше не поддерживается" + +msgid "Development of the WinBox manager stopped in 2022 due to a lack of maintainers. As we direct our efforts towards making 86Box even better, we have made the decision to no longer support WinBox as a manager.\n\nNo further updates will be provided through WinBox, and you may encounter incorrect behavior should you continue using it with newer versions of 86Box. Any bug reports related to WinBox behavior will be closed as invalid.\n\nGo to 86box.net for a list of other managers you can use." +msgstr "Разработка менеджера WinBox прекратилась в 2022 году из-за отсутствия сопровождающих. Поскольку мы направляем наши усилия на то, чтобы сделать 86Box еще лучше, мы приняли решение больше не поддерживать WinBox в качестве менеджера.\n\nWinBox больше не будет обновляться, и вы можете столкнуться с некорректным поведением, если продолжите использовать его с новыми версиями 86Box. Любые сообщения об ошибках, связанных с поведением WinBox, будут закрыты как недействительные.\n\nПерейдите на сайт 86box.net для получения списка других менеджеров, которые вы можете использовать." diff --git a/src/qt/languages/sk-SK.po b/src/qt/languages/sk-SK.po index 376723efa94..cdcfcbfe851 100644 --- a/src/qt/languages/sk-SK.po +++ b/src/qt/languages/sk-SK.po @@ -1224,3 +1224,9 @@ msgstr "Rýchly" msgid "&Auto-pause on focus loss" msgstr "&Automatická pauza pri strate fokusu okna" + +msgid "WinBox is no longer supported" +msgstr "WinBox už nie je podporovaný" + +msgid "Development of the WinBox manager stopped in 2022 due to a lack of maintainers. As we direct our efforts towards making 86Box even better, we have made the decision to no longer support WinBox as a manager.\n\nNo further updates will be provided through WinBox, and you may encounter incorrect behavior should you continue using it with newer versions of 86Box. Any bug reports related to WinBox behavior will be closed as invalid.\n\nGo to 86box.net for a list of other managers you can use." +msgstr "Vývoj správcu WinBox sa zastavil v roku 2022 z dôvodu nedostatku správcov. Keďže naše úsilie smerujeme k ešte lepšiemu systému 86Box, rozhodli sme sa, že správca WinBox už nebude podporovaný.\n\nProstredníctvom WinBoxu nebudú poskytované žiadne ďalšie aktualizácie a v prípade, že ho budete naďalej používať s novšími verziami programu 86Box, môžete sa stretnúť s nesprávnym správaním. Všetky hlásenia o chybách týkajúce sa správania WinBoxu budú uzavreté ako neplatné.\n\nNa stránke 86box.net nájdete zoznam iných správcov, ktoré môžete používať." diff --git a/src/qt/languages/sl-SI.po b/src/qt/languages/sl-SI.po index cde1011d187..d56318aed00 100644 --- a/src/qt/languages/sl-SI.po +++ b/src/qt/languages/sl-SI.po @@ -1224,3 +1224,9 @@ msgstr "Hitri" msgid "&Auto-pause on focus loss" msgstr "&Samodejni premor ob izgubi fokusa" + +msgid "WinBox is no longer supported" +msgstr "WinBox ni več podprt" + +msgid "Development of the WinBox manager stopped in 2022 due to a lack of maintainers. As we direct our efforts towards making 86Box even better, we have made the decision to no longer support WinBox as a manager.\n\nNo further updates will be provided through WinBox, and you may encounter incorrect behavior should you continue using it with newer versions of 86Box. Any bug reports related to WinBox behavior will be closed as invalid.\n\nGo to 86box.net for a list of other managers you can use." +msgstr "Razvoj upravitelja WinBox se je leta 2022 ustavil zaradi pomanjkanja vzdrževalcev. Ker svoja prizadevanja usmerjamo v še boljše delovanje programa 86Box, smo se odločili, da programa WinBox kot upravitelja ne bomo več podpirali.\n\nWinBox ne bo več zagotavljal posodobitev, če ga boste še naprej uporabljali z novejšimi različicami programa 86Box, pa lahko naletite na nepravilno obnašanje. Vsa poročila o napakah, povezana z obnašanjem programa WinBox, bodo zaprta kot neveljavna.\n\nZa seznam drugih upraviteljev, ki jih lahko uporabite, obiščite spletno stran 86box.net." diff --git a/src/qt/languages/tr-TR.po b/src/qt/languages/tr-TR.po index 0989218e5d9..1af206659a0 100644 --- a/src/qt/languages/tr-TR.po +++ b/src/qt/languages/tr-TR.po @@ -1224,3 +1224,9 @@ msgstr "Hızlı" msgid "&Auto-pause on focus loss" msgstr "&Odak kaybında otomatik duraklatma" + +msgid "WinBox is no longer supported" +msgstr "WinBox artık desteklenmiyor" + +msgid "Development of the WinBox manager stopped in 2022 due to a lack of maintainers. As we direct our efforts towards making 86Box even better, we have made the decision to no longer support WinBox as a manager.\n\nNo further updates will be provided through WinBox, and you may encounter incorrect behavior should you continue using it with newer versions of 86Box. Any bug reports related to WinBox behavior will be closed as invalid.\n\nGo to 86box.net for a list of other managers you can use." +msgstr "WinBox yöneticisinin geliştirilmesi, bakımcı eksikliği nedeniyle 2022 yılında durduruldu. Çabalarımızı 86Box'ı daha da iyi hale getirmeye yönlendirdiğimiz için, WinBox'ı artık bir yönetici olarak desteklememe kararı aldık.\n\nWinBox aracılığıyla daha fazla güncelleme sağlanmayacak ve 86Box'ın daha yeni sürümleriyle kullanmaya devam ederseniz hatalı davranışlarla karşılaşabilirsiniz. WinBox davranışıyla ilgili tüm hata raporları geçersiz olarak kapatılacaktır.\n\nKullanabileceğiniz diğer yöneticilerin bir listesi için 86box.net adresine gidin." diff --git a/src/qt/languages/uk-UA.po b/src/qt/languages/uk-UA.po index 76796a57ae3..860116fe848 100644 --- a/src/qt/languages/uk-UA.po +++ b/src/qt/languages/uk-UA.po @@ -1224,3 +1224,9 @@ msgstr "Швидкий" msgid "&Auto-pause on focus loss" msgstr "&Автопауза при втраті фокусу" + +msgid "WinBox is no longer supported" +msgstr "WinBox більше не підтримується" + +msgid "Development of the WinBox manager stopped in 2022 due to a lack of maintainers. As we direct our efforts towards making 86Box even better, we have made the decision to no longer support WinBox as a manager.\n\nNo further updates will be provided through WinBox, and you may encounter incorrect behavior should you continue using it with newer versions of 86Box. Any bug reports related to WinBox behavior will be closed as invalid.\n\nGo to 86box.net for a list of other managers you can use." +msgstr "Розробку менеджера WinBox було припинено у 2022 році через брак супровідників. Оскільки ми спрямовуємо наші зусилля на те, щоб зробити 86Box ще кращим, ми прийняли рішення більше не підтримувати WinBox як менеджер.\n\nБільше ніяких оновлень не буде надаватися через WinBox, і ви можете зіткнутися з некоректною поведінкою, якщо продовжите використовувати його з новими версіями 86Box. Будь-які повідомлення про помилки, пов'язані з поведінкою WinBox, будуть закриті як недійсні.\n\nПерейдіть на 86box.net для отримання списку інших менеджерів, які ви можете використовувати." diff --git a/src/qt/languages/zh-CN.po b/src/qt/languages/zh-CN.po index dd819deb0b6..eade3f77e6f 100644 --- a/src/qt/languages/zh-CN.po +++ b/src/qt/languages/zh-CN.po @@ -1225,3 +1225,8 @@ msgstr "快" msgid "&Auto-pause on focus loss" msgstr "失去焦点时自动暂停(&A)" +msgid "WinBox is no longer supported" +msgstr "WinBox 不再受支持" + +msgid "Development of the WinBox manager stopped in 2022 due to a lack of maintainers. As we direct our efforts towards making 86Box even better, we have made the decision to no longer support WinBox as a manager.\n\nNo further updates will be provided through WinBox, and you may encounter incorrect behavior should you continue using it with newer versions of 86Box. Any bug reports related to WinBox behavior will be closed as invalid.\n\nGo to 86box.net for a list of other managers you can use." +msgstr "由于缺乏维护者,WinBox 管理器的开发工作于 2022 年停止。由于我们正努力将 86Box 做得更好,因此决定不再支持 WinBox 作为管理器。\n\nWinBox将不再提供更新,如果你继续在86Box的新版本中使用WinBox,可能会遇到不正确的行为。任何与 WinBox 行为相关的错误报告都将被视为无效而关闭。\n\n请访问 86box.net,查看你可以使用的其他管理器列表。" diff --git a/src/qt/languages/zh-TW.po b/src/qt/languages/zh-TW.po index aef16470437..0e61363f4e1 100644 --- a/src/qt/languages/zh-TW.po +++ b/src/qt/languages/zh-TW.po @@ -1224,3 +1224,9 @@ msgstr "快" msgid "&Auto-pause on focus loss" msgstr "失去焦點時自動暫停(&A)" + +msgid "WinBox is no longer supported" +msgstr "WinBox is no longer supported" + +msgid "Development of the WinBox manager stopped in 2022 due to a lack of maintainers. As we direct our efforts towards making 86Box even better, we have made the decision to no longer support WinBox as a manager.\n\nNo further updates will be provided through WinBox, and you may encounter incorrect behavior should you continue using it with newer versions of 86Box. Any bug reports related to WinBox behavior will be closed as invalid.\n\nGo to 86box.net for a list of other managers you can use." +msgstr "Development of the WinBox manager stopped in 2022 due to a lack of maintainers. As we direct our efforts towards making 86Box even better, we have made the decision to no longer support WinBox as a manager.\n\nNo further updates will be provided through WinBox, and you may encounter incorrect behavior should you continue using it with newer versions of 86Box. Any bug reports related to WinBox behavior will be closed as invalid.\n\nGo to 86box.net for a list of other managers you can use." diff --git a/src/qt/qt_main.cpp b/src/qt/qt_main.cpp index cafd4fd8e40..197ca980c84 100644 --- a/src/qt/qt_main.cpp +++ b/src/qt/qt_main.cpp @@ -58,6 +58,7 @@ extern "C" { # include <86box/discord.h> #endif #include <86box/gdbstub.h> +#include <86box/version.h> } #include @@ -217,6 +218,28 @@ main(int argc, char *argv[]) return 6; } +#ifdef Q_OS_WINDOWS +# if !defined(EMU_BUILD_NUM) || (EMU_BUILD_NUM != 5624) + HWND winbox = FindWindow("TWinBoxMain", NULL); + if (winbox && + FindWindowEx(winbox, NULL, "TToolBar", NULL) && + FindWindowEx(winbox, NULL, "TListBox", NULL) && + FindWindowEx(winbox, NULL, "TStatusBar", NULL) && + (winbox = FindWindowEx(winbox, NULL, "TPageControl", NULL)) && /* holds a TTabSheet even on VM pages */ + FindWindowEx(winbox, NULL, "TTabSheet", NULL)) +# endif + { + QMessageBox warningbox(QMessageBox::Icon::Warning, QObject::tr("WinBox is no longer supported"), + QObject::tr("Development of the WinBox manager stopped in 2022 due to a lack of maintainers. As we direct our efforts towards making 86Box even better, we have made the decision to no longer support WinBox as a manager.\n\nNo further updates will be provided through WinBox, and you may encounter incorrect behavior should you continue using it with newer versions of 86Box. Any bug reports related to WinBox behavior will be closed as invalid.\n\nGo to 86box.net for a list of other managers you can use."), + QMessageBox::NoButton); + warningbox.addButton(QObject::tr("Continue"), QMessageBox::AcceptRole); + warningbox.addButton(QObject::tr("Exit"), QMessageBox::RejectRole); + warningbox.exec(); + if (warningbox.result() == QDialog::Accepted) + return 0; + } +#endif + if (settings_only) { Settings settings; if (settings.exec() == QDialog::Accepted) { diff --git a/src/video/vid_ddc.c b/src/video/vid_ddc.c index 387edaeb898..c5109331954 100644 --- a/src/video/vid_ddc.c +++ b/src/video/vid_ddc.c @@ -169,7 +169,7 @@ ddc_init(void *i2c) STANDARD_TIMING(standard_timings[2], 1366, STD_ASPECT_16_9, 60); /* 1360x768 (closest to 1366x768) */ STANDARD_TIMING(standard_timings[3], 1440, STD_ASPECT_16_10, 60); /* 1440x900 */ STANDARD_TIMING(standard_timings[4], 1600, STD_ASPECT_16_9, 60); /* 1600x900 */ - STANDARD_TIMING(standard_timings[5], 1680, STD_ASPECT_16_10, 60); /* 1680x1050 */ + STANDARD_TIMING(standard_timings[5], 1600, STD_ASPECT_4_3, 60); /* 1600x1200 */ STANDARD_TIMING(standard_timings[6], 1920, STD_ASPECT_16_9, 60); /* 1920x1080 */ STANDARD_TIMING(standard_timings[7], 2048, STD_ASPECT_4_3, 60); /* 2048x1536 */ @@ -210,12 +210,12 @@ ddc_init(void *i2c) /* High refresh rate timings (VGA is limited to 85 Hz) */ edid->ext_descriptors[1].tag = 0xfa; /* standard timing identifiers */ #define ext_standard_timings0 ext_descriptors[1].ext_standard_timings.timings - STANDARD_TIMING(ext_standard_timings0[0], 640, STD_ASPECT_4_3, 90); /* 640x480 @ 90 Hz */ - STANDARD_TIMING(ext_standard_timings0[1], 640, STD_ASPECT_4_3, 120); /* 640x480 @ 120 Hz */ - STANDARD_TIMING(ext_standard_timings0[2], 800, STD_ASPECT_4_3, 90); /* 800x600 @ 90 Hz */ - STANDARD_TIMING(ext_standard_timings0[3], 800, STD_ASPECT_4_3, 120); /* 800x600 @ 120 Hz */ - STANDARD_TIMING(ext_standard_timings0[4], 1024, STD_ASPECT_4_3, 90); /* 1024x768 @ 90 Hz */ - STANDARD_TIMING(ext_standard_timings0[5], 1280, STD_ASPECT_5_4, 90); /* 1280x1024 @ 90 Hz */ + STANDARD_TIMING(ext_standard_timings0[0], 640, STD_ASPECT_4_3, 85); /* 640x480 @ 85 Hz */ + STANDARD_TIMING(ext_standard_timings0[1], 800, STD_ASPECT_4_3, 85); /* 800x600 @ 85 Hz */ + STANDARD_TIMING(ext_standard_timings0[2], 1024, STD_ASPECT_4_3, 85); /* 1024x768 @ 85 Hz */ + STANDARD_TIMING(ext_standard_timings0[3], 1280, STD_ASPECT_5_4, 85); /* 1280x1024 @ 85 Hz */ + STANDARD_TIMING(ext_standard_timings0[4], 1600, STD_ASPECT_4_3, 85); /* 1600x1200 @ 85 Hz */ + STANDARD_TIMING(ext_standard_timings0[5], 1680, STD_ASPECT_16_10, 60); /* 1680x1050 @ 60 Hz (previously in standard timings) */ edid->ext_descriptors[1].ext_standard_timings.padding = 0x0a; for (uint8_t c = 128; c < 255; c++) From a3b8e0f1b2dfaf4d9815780a1d75ff53ecb8a9c7 Mon Sep 17 00:00:00 2001 From: RichardG867 Date: Sun, 10 Mar 2024 18:17:32 -0300 Subject: [PATCH 22/33] DDC: Clarify some comments --- src/video/vid_ddc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/video/vid_ddc.c b/src/video/vid_ddc.c index c5109331954..787e7560eb8 100644 --- a/src/video/vid_ddc.c +++ b/src/video/vid_ddc.c @@ -138,12 +138,12 @@ ddc_init(void *i2c) memset(&edid->magic[1], 0xff, sizeof(edid->magic) - 2); - edid->mfg[0] = 0x09; /* manufacturer "BOX" (apparently unassigned by UEFI) */ + edid->mfg[0] = 0x09; /* manufacturer "BOX" (currently unassigned by UEFI) */ edid->mfg[1] = 0xf8; edid->mfg_week = 48; edid->mfg_year = 2020 - 1990; edid->edid_version = 0x01; - edid->edid_rev = 0x04; /* EDID 1.4, required for Xorg on Linux to use the preferred mode timing */ + edid->edid_rev = 0x04; /* EDID 1.4, required for Xorg on newer Linux to use the preferred mode timing instead of maxing out */ edid->input_params = 0x0e; /* analog input; separate sync; composite sync; sync on green */ edid->horiz_size = round(horiz_mm / 10.0); @@ -207,7 +207,7 @@ ddc_init(void *i2c) /* Detailed timing for 1366x768 */ DETAILED_TIMING(ext_detailed_timings[0], 85500, 1366, 768, 426, 30, 70, 143, 3, 3); - /* High refresh rate timings (VGA is limited to 85 Hz) */ + /* High refresh rate timings (within the standard 85 Hz VGA limit) */ edid->ext_descriptors[1].tag = 0xfa; /* standard timing identifiers */ #define ext_standard_timings0 ext_descriptors[1].ext_standard_timings.timings STANDARD_TIMING(ext_standard_timings0[0], 640, STD_ASPECT_4_3, 85); /* 640x480 @ 85 Hz */ From 45e76af96fc298e9f1695dd33d9ffb6d2d24d1ba Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Mon, 11 Mar 2024 19:25:13 +0500 Subject: [PATCH 23/33] Disable the LBA Enhancer checkbox when the ROM isn't available --- src/qt/qt_settingsstoragecontrollers.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/qt/qt_settingsstoragecontrollers.cpp b/src/qt/qt_settingsstoragecontrollers.cpp index 0f19d46fcb6..bc2be70cd56 100644 --- a/src/qt/qt_settingsstoragecontrollers.cpp +++ b/src/qt/qt_settingsstoragecontrollers.cpp @@ -206,6 +206,7 @@ SettingsStorageControllers::onCurrentMachineChanged(int machineId) ui->checkBoxCassette->setEnabled(false); } + ui->checkBoxLbaEnhancer->setEnabled(device_available(&lba_enhancer_device)); ui->checkBoxLbaEnhancer->setChecked(lba_enhancer_enabled > 0 && device_available(&lba_enhancer_device)); ui->pushButtonConfigureLbaEnhancer->setEnabled(ui->checkBoxLbaEnhancer->isChecked()); } From 8f9f5b2efbb56255ef28d256d17040403e932c44 Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Mon, 11 Mar 2024 19:25:45 +0500 Subject: [PATCH 24/33] Disable the XGA checkbox when ROMs aren't available --- src/qt/qt_settingsdisplay.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/qt/qt_settingsdisplay.cpp b/src/qt/qt_settingsdisplay.cpp index fcb70f8c51e..4d8919a7318 100644 --- a/src/qt/qt_settingsdisplay.cpp +++ b/src/qt/qt_settingsdisplay.cpp @@ -159,15 +159,16 @@ SettingsDisplay::on_comboBoxVideo_currentIndexChanged(int index) bool videoCardHas8514 = ((videoCard[0] == VID_INTERNAL) ? machine_has_flags(machineId, MACHINE_VIDEO_8514A) : (video_card_get_flags(videoCard[0]) == VIDEO_FLAG_TYPE_8514)); bool videoCardHasXga = ((videoCard[0] == VID_INTERNAL) ? machine_has_flags(machineId, MACHINE_VIDEO_XGA) : (video_card_get_flags(videoCard[0]) == VIDEO_FLAG_TYPE_XGA)); - ui->checkBox8514->setEnabled((machineHasIsa16 || machineHasMca) && !videoCardHas8514); - if (machineHasIsa16 || machineHasMca) - ui->checkBox8514->setChecked(ibm8514_standalone_enabled && !videoCardHas8514); + bool machineSupports8514 = ((machineHasIsa16 || machineHasMca) && !videoCardHas8514); + bool machineSupportsXga = (((machineHasIsa16 && device_available(&xga_isa_device)) || (machineHasMca && device_available(&xga_device))) && !videoCardHasXga); - ui->checkBoxXga->setEnabled((machineHasIsa16 || machineHasMca) && !videoCardHasXga); - if (machineHasIsa16 || machineHasMca) - ui->checkBoxXga->setChecked(xga_standalone_enabled && !videoCardHasXga); + ui->checkBox8514->setEnabled(machineSupports8514); + ui->checkBox8514->setChecked(ibm8514_standalone_enabled && machineSupports8514); - ui->pushButtonConfigureXga->setEnabled((machineHasIsa16 || machineHasMca) && ui->checkBoxXga->isChecked() && !videoCardHasXga); + ui->checkBoxXga->setEnabled(machineSupportsXga); + ui->checkBoxXga->setChecked(xga_standalone_enabled && machineSupportsXga); + + ui->pushButtonConfigureXga->setEnabled(ui->checkBoxXga->isEnabled() && ui->checkBoxXga->isChecked()); int c = 2; From 3aa81066d3c01b69bf546521d72045a1617d3543 Mon Sep 17 00:00:00 2001 From: TC1995 Date: Mon, 11 Mar 2024 21:39:16 +0100 Subject: [PATCH 25/33] Solved the IRQ mess of ESDI MCA. This should also fix the timing/fatal's on ramdisk speeds using said controller on NT and OS/2 on MCA. --- src/disk/hdc_esdi_mca.c | 95 ++++++++++++++++++++++++++++++----------- 1 file changed, 69 insertions(+), 26 deletions(-) diff --git a/src/disk/hdc_esdi_mca.c b/src/disk/hdc_esdi_mca.c index 02f054ca269..3714f93d46b 100644 --- a/src/disk/hdc_esdi_mca.c +++ b/src/disk/hdc_esdi_mca.c @@ -92,7 +92,7 @@ #define BIOS_FILE_L "roms/hdd/esdi/90x8969.bin" #define BIOS_FILE_H "roms/hdd/esdi/90x8970.bin" -#define ESDI_TIME 512.0 +#define ESDI_TIME 500.0 #define CMD_ADAPTER 0 typedef struct esdi_drive_t { @@ -113,6 +113,7 @@ typedef struct esdi_t { uint8_t basic_ctrl; uint8_t status; uint8_t irq_status; + int irq_ena_disable; int irq_in_progress; int cmd_req_in_progress; int cmd_pos; @@ -218,14 +219,26 @@ esdi_mca_log(const char *fmt, ...) static __inline void set_irq(esdi_t *dev) { + dev->irq_ena_disable = 1; + esdi_mca_log("Set IRQ 14: bit=%x, cmd=%02x.\n", dev->basic_ctrl & CTRL_IRQ_ENA, dev->command); if (dev->basic_ctrl & CTRL_IRQ_ENA) - picint(1 << 14); + picint_common(1 << ESDI_IRQCHAN, PIC_IRQ_EDGE, 1, NULL); } static __inline void -clear_irq(UNUSED(esdi_t *dev)) +clear_irq(esdi_t *dev) { - picintc(1 << 14); + dev->irq_ena_disable = 0; + esdi_mca_log("Clear IRQ 14: bit=%x, cmd=%02x.\n", dev->basic_ctrl & CTRL_IRQ_ENA, dev->command); + if (dev->basic_ctrl & CTRL_IRQ_ENA) + picint_common(1 << ESDI_IRQCHAN, PIC_IRQ_EDGE, 0, NULL); +} + +static __inline void +update_irq(esdi_t *dev) +{ + uint8_t set = (dev->basic_ctrl & CTRL_IRQ_ENA) && dev->irq_ena_disable; + picint_common(1 << ESDI_IRQCHAN, PIC_IRQ_EDGE, set, NULL); } static void @@ -235,10 +248,11 @@ esdi_mca_set_callback(esdi_t *dev, double callback) return; } - if (callback) { - timer_on_auto(&dev->timer, callback); - } else { + if (callback == 0.0) { + esdi_mca_log("Callback Stopped.\n"); timer_stop(&dev->timer); + } else { + timer_on_auto(&dev->timer, callback); } } @@ -317,9 +331,9 @@ complete_command_status(esdi_t *dev) { dev->status_len = 7; if (dev->cmd_dev == ATTN_DEVICE_0) - dev->status_data[0] = CMD_READ | STATUS_LEN(7) | STATUS_DEVICE(0); + dev->status_data[0] = dev->command | STATUS_LEN(7) | STATUS_DEVICE(0); else - dev->status_data[0] = CMD_READ | STATUS_LEN(7) | STATUS_DEVICE(1); + dev->status_data[0] = dev->command | STATUS_LEN(7) | STATUS_DEVICE(1); dev->status_data[1] = 0x0000; /*Error bits*/ dev->status_data[2] = 0x1900; /*Device status*/ dev->status_data[3] = 0; /*Number of blocks left to do*/ @@ -330,15 +344,12 @@ complete_command_status(esdi_t *dev) } #define ESDI_ADAPTER_ONLY() \ - do { \ if (dev->cmd_dev != ATTN_HOST_ADAPTER) { \ cmd_unsupported(dev); \ return; \ - } \ - } while (0) + } #define ESDI_DRIVE_ONLY() \ - do { \ if (dev->cmd_dev != ATTN_DEVICE_0 && dev->cmd_dev != ATTN_DEVICE_1) { \ cmd_unsupported(dev); \ return; \ @@ -346,8 +357,7 @@ complete_command_status(esdi_t *dev) if (dev->cmd_dev == ATTN_DEVICE_0) \ drive = &dev->drives[0]; \ else \ - drive = &dev->drives[1]; \ - } while (0) + drive = &dev->drives[1]; static void esdi_callback(void *priv) @@ -357,19 +367,19 @@ esdi_callback(void *priv) int val; double cmd_time = 0.0; - esdi_mca_set_callback(dev, 0); - /* If we are returning from a RESET, handle this first. */ if (dev->in_reset) { + esdi_mca_log("ESDI reset.\n"); dev->in_reset = 0; dev->status = STATUS_IRQ; dev->irq_status = IRQ_HOST_ADAPTER | IRQ_RESET_COMPLETE; - return; } + esdi_mca_log("Command=%02x.\n", dev->command); switch (dev->command) { case CMD_READ: + case 0x15: ESDI_DRIVE_ONLY(); if (!drive->present) { @@ -379,7 +389,8 @@ esdi_callback(void *priv) switch (dev->cmd_state) { case 0: - dev->rba = (dev->cmd_data[2] | (dev->cmd_data[3] << 16)) & 0x0fffffff; + if (dev->command == CMD_READ) + dev->rba = (dev->cmd_data[2] | (dev->cmd_data[3] << 16)) & 0x0fffffff; dev->sector_pos = 0; dev->sector_count = dev->cmd_data[1]; @@ -873,7 +884,7 @@ static uint8_t esdi_read(uint16_t port, void *priv) { esdi_t *dev = (esdi_t *) priv; - uint8_t ret = 0xff; + uint8_t ret = 0x00; switch (port & 7) { case 2: /*Basic status register*/ @@ -890,6 +901,7 @@ esdi_read(uint16_t port, void *priv) break; } + esdi_mca_log("ESDI: rr(%04x, %02x)\n", port & 7, ret); return ret; } @@ -897,6 +909,7 @@ static void esdi_write(uint16_t port, uint8_t val, void *priv) { esdi_t *dev = (esdi_t *) priv; + uint8_t old; esdi_mca_log("ESDI: wr(%04x, %02x)\n", port & 7, val); @@ -906,11 +919,14 @@ esdi_write(uint16_t port, uint8_t val, void *priv) dev->in_reset = 1; esdi_mca_set_callback(dev, ESDI_TIME * 50); dev->status = STATUS_BUSY; + } else if (!(dev->basic_ctrl & CTRL_RESET) && (val & CTRL_RESET)) { + esdi_mca_set_callback(dev, 0.0); + dev->status = STATUS_BUSY; } + old = dev->basic_ctrl; dev->basic_ctrl = val; - - if (!(dev->basic_ctrl & CTRL_IRQ_ENA)) - picintc(1 << 14); + if ((val & CTRL_IRQ_ENA) && !(old & CTRL_IRQ_ENA)) + update_irq(dev); break; case 3: /*Attention register*/ @@ -945,6 +961,7 @@ esdi_write(uint16_t port, uint8_t val, void *priv) break; case ATTN_DEVICE_0: + esdi_mca_log("ATTN Device 0.\n"); switch (val & ATTN_REQ_MASK) { case ATTN_CMD_REQ: if (dev->cmd_req_in_progress) @@ -957,6 +974,7 @@ esdi_write(uint16_t port, uint8_t val, void *priv) break; case ATTN_EOI: + esdi_mca_log("EOI.\n"); dev->irq_in_progress = 0; dev->status &= ~STATUS_IRQ; clear_irq(dev); @@ -1112,15 +1130,40 @@ esdi_mca_write(int port, uint8_t val, void *priv) break; } + if (!(dev->pos_regs[3] & 8)) { + switch (dev->pos_regs[3] & 7) { + case 2: + dev->bios = 0xc8000; + break; + case 3: + dev->bios = 0xcc000; + break; + case 4: + dev->bios = 0xd0000; + break; + case 5: + dev->bios = 0xd4000; + break; + case 6: + dev->bios = 0xd8000; + break; + case 7: + dev->bios = 0xdc000; + break; + default: + break; + } + } else + dev->bios = 0; + if (dev->pos_regs[2] & 1) { io_sethandler(ESDI_IOADDR_PRI, 8, esdi_read, esdi_readw, NULL, esdi_write, esdi_writew, NULL, dev); - if (!(dev->pos_regs[3] & 8)) { + if (dev->bios) { mem_mapping_enable(&dev->bios_rom.mapping); - mem_mapping_set_addr(&dev->bios_rom.mapping, - ((dev->pos_regs[3] & 7) * 0x4000) + 0xc0000, 0x4000); + mem_mapping_set_addr(&dev->bios_rom.mapping, dev->bios, 0x4000); } /* Say hello. */ From e1180a77df2c605b93b3f1325bba86a54850adf8 Mon Sep 17 00:00:00 2001 From: OBattler Date: Thu, 14 Mar 2024 01:06:12 +0100 Subject: [PATCH 26/33] NCR 53c8xx: Implement the readout of SODL via SBDL when STEST2 bit 7 is set, v3.04 BIOS'es now work. --- src/scsi/scsi_ncr53c8xx.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/scsi/scsi_ncr53c8xx.c b/src/scsi/scsi_ncr53c8xx.c index 42925338d95..ad1b31fe868 100644 --- a/src/scsi/scsi_ncr53c8xx.c +++ b/src/scsi/scsi_ncr53c8xx.c @@ -280,6 +280,7 @@ typedef struct ncr53c8xx_t { uint8_t swide; uint8_t gpcntl; uint8_t last_command; + uint8_t sodl; int command_complete; ncr53c8xx_request *current; @@ -1704,6 +1705,8 @@ ncr53c8xx_reg_writeb(ncr53c8xx_t *dev, uint32_t offset, uint8_t val) dev->stest3 = val; break; case 0x54: + dev->sodl = val; + break; case 0x55: break; CASE_SET_REG32(scratchb, 0x5c) @@ -1989,6 +1992,9 @@ ncr53c8xx_reg_readb(ncr53c8xx_t *dev, uint32_t offset) if ((dev->sstat1 & PHASE_MASK) == PHASE_MI) { ncr53c8xx_log("NCR 810: Read SBDL %02X\n", dev->msg[0]); return dev->msg[0]; + } else if (dev->stest2 & 0x80) { + ncr53c8xx_log("NCR 810: Read SBDL %02X\n", dev->sodl); + return dev->sodl; } ncr53c8xx_log("NCR 810: Read SBDL 00\n"); return 0; From 64f343049fc5c1ba10b8ba58b084f48e756c9bde Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Fri, 15 Mar 2024 14:01:12 +0500 Subject: [PATCH 27/33] Fix Novell NE2000's default IRQ being out of range --- src/network/net_ne2000.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/network/net_ne2000.c b/src/network/net_ne2000.c index 03327ac0c79..ee32119ba40 100644 --- a/src/network/net_ne2000.c +++ b/src/network/net_ne2000.c @@ -1329,7 +1329,7 @@ static const device_config_t ne2000_config[] = { .description = "IRQ", .type = CONFIG_SELECTION, .default_string = "", - .default_int = 10, + .default_int = 3, .file_filter = "", .spinner = { 0 }, .selection = { From 474df94008b1de603c6d8eabdaaa5dc0e8027e79 Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Fri, 15 Mar 2024 14:01:46 +0500 Subject: [PATCH 28/33] Correct a typo in the comment --- src/include/86box/net_ne2000.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/include/86box/net_ne2000.h b/src/include/86box/net_ne2000.h index fe1a71934cb..75185cf906f 100644 --- a/src/include/86box/net_ne2000.h +++ b/src/include/86box/net_ne2000.h @@ -39,7 +39,7 @@ enum { NE2K_NONE = 0, NE2K_NE1000 = 1, /* 8-bit ISA NE1000 */ - NE2K_NE1000_COMPAT = 2, /* 16-bit ISA NE2000-Compatible */ + NE2K_NE1000_COMPAT = 2, /* 8-bit ISA NE1000-Compatible */ NE2K_NE2000 = 3, /* 16-bit ISA NE2000 */ NE2K_NE2000_COMPAT = 4, /* 16-bit ISA NE2000-Compatible */ NE2K_ETHERNEXT_MC = 5, /* 16-bit MCA EtherNext/MC */ From e34a66a4f6f60398f22451f973d2530f80ac3493 Mon Sep 17 00:00:00 2001 From: cold-brewed <47337035+cold-brewed@users.noreply.github.com> Date: Fri, 15 Mar 2024 13:06:54 -0400 Subject: [PATCH 29/33] GHA: Disable win32 in CodeQL --- .github/workflows/codeql_windows_msys2.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/codeql_windows_msys2.yml b/.github/workflows/codeql_windows_msys2.yml index dc18544c704..dda14a18229 100644 --- a/.github/workflows/codeql_windows_msys2.yml +++ b/.github/workflows/codeql_windows_msys2.yml @@ -61,9 +61,6 @@ jobs: new: on slug: -NDR ui: - - name: Win32 GUI - qt: off - static: on - name: Qt GUI qt: on static: off From 5d57026af423f54c01e116187b69e3147fb29ffe Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Sat, 16 Mar 2024 04:07:27 +0500 Subject: [PATCH 30/33] Fix Ghostscript DLL filename in an error message on 64-bit Windows --- src/qt/qt_platform.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/qt/qt_platform.cpp b/src/qt/qt_platform.cpp index 46d50672ef5..385a8c56f1f 100644 --- a/src/qt/qt_platform.cpp +++ b/src/qt/qt_platform.cpp @@ -581,7 +581,11 @@ c16stombs(char dst[], const uint16_t src[], int len) #endif #ifdef _WIN32 -# define LIB_NAME_GS "gsdll32.dll" +# if defined(__x86_64) || defined(__x86_64__) || defined(__amd64) || defined(_M_X64) +# define LIB_NAME_GS "gsdll64.dll" +# else +# define LIB_NAME_GS "gsdll32.dll" +#endif # define MOUSE_CAPTURE_KEYSEQ "F8+F12" #else # define LIB_NAME_GS "libgs" From a46fb2e76b2f53ec29092c6fa52667b28cb61372 Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Sun, 17 Mar 2024 02:37:46 +0500 Subject: [PATCH 31/33] Fix up the arch check for the GS DLL filename --- src/qt/qt_platform.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qt/qt_platform.cpp b/src/qt/qt_platform.cpp index 385a8c56f1f..824f7102343 100644 --- a/src/qt/qt_platform.cpp +++ b/src/qt/qt_platform.cpp @@ -581,11 +581,11 @@ c16stombs(char dst[], const uint16_t src[], int len) #endif #ifdef _WIN32 -# if defined(__x86_64) || defined(__x86_64__) || defined(__amd64) || defined(_M_X64) +# if defined(__amd64__) || defined(_M_X64) || defined(__aarch64__) || defined(_M_ARM64) # define LIB_NAME_GS "gsdll64.dll" # else # define LIB_NAME_GS "gsdll32.dll" -#endif +# endif # define MOUSE_CAPTURE_KEYSEQ "F8+F12" #else # define LIB_NAME_GS "libgs" From d212aad3179264a61ded8c91c83fdac78457e31a Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Sun, 17 Mar 2024 02:38:57 +0500 Subject: [PATCH 32/33] Add missing period to error messages to fix their translations --- src/qt/qt_harddiskdialog.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qt/qt_harddiskdialog.cpp b/src/qt/qt_harddiskdialog.cpp index 5dab101b84d..187bf4ba258 100644 --- a/src/qt/qt_harddiskdialog.cpp +++ b/src/qt/qt_harddiskdialog.cpp @@ -567,7 +567,7 @@ HarddiskDialog::onExistingFileSelected(const QString &fileName, bool precheck) } else if (image_is_vhd(fileNameUtf8.data(), 1)) { MVHDMeta *vhd = mvhd_open(fileNameUtf8.data(), 0, &vhd_error); if (vhd == nullptr) { - QMessageBox::critical(this, tr("Unable to read file"), tr("Make sure the file exists and is readable")); + QMessageBox::critical(this, tr("Unable to read file"), tr("Make sure the file exists and is readable.")); return; } else if (vhd_error == MVHD_ERR_TIMESTAMP) { QMessageBox::StandardButton btn = QMessageBox::warning(this, tr("Parent and child disk timestamps do not match"), tr("This could mean that the parent image was modified after the differencing image was created.\n\nIt can also happen if the image files were moved or copied, or by a bug in the program that created this disk.\n\nDo you want to fix the timestamps?"), QMessageBox::Yes | QMessageBox::No); @@ -618,7 +618,7 @@ HarddiskDialog::onExistingFileSelected(const QString &fileName, bool precheck) } if ((sectors > max_sectors) || (heads > max_heads) || (cylinders > max_cylinders)) { - QMessageBox::critical(this, tr("Unable to read file"), tr("Make sure the file exists and is readable")); + QMessageBox::critical(this, tr("Unable to read file"), tr("Make sure the file exists and is readable.")); return; } From 5b96375baf9da73b83765a21489ce01285b2b3c3 Mon Sep 17 00:00:00 2001 From: Alexander Babikov Date: Sun, 17 Mar 2024 02:39:17 +0500 Subject: [PATCH 33/33] Sort the language dropdown alphabetically --- src/qt/qt_progsettings.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/qt/qt_progsettings.cpp b/src/qt/qt_progsettings.cpp index 4dda901d7be..164f69418a1 100644 --- a/src/qt/qt_progsettings.cpp +++ b/src/qt/qt_progsettings.cpp @@ -110,6 +110,7 @@ ProgSettings::ProgSettings(QWidget *parent) ui->comboBoxLanguage->setCurrentIndex(ui->comboBoxLanguage->findData(i.key())); } } + ui->comboBoxLanguage->model()->sort(Qt::AscendingOrder); mouseSensitivity = mouse_sensitivity; ui->horizontalSlider->setValue(mouseSensitivity * 100.);