From add1c3918894b218e79674edd145434d342ca76f Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Wed, 24 Aug 2022 04:42:25 -0400 Subject: [PATCH 1/9] Allow complete removal of FDC --- src/floppy/fdc.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/floppy/fdc.c b/src/floppy/fdc.c index 4c1170eb9..0f3cf9dbb 100644 --- a/src/floppy/fdc.c +++ b/src/floppy/fdc.c @@ -97,7 +97,6 @@ fdc_log(const char *fmt, ...) # define fdc_log(fmt, ...) #endif -#if 0 const device_t fdc_none_device = { .name = "None", .internal_name = "none", @@ -111,7 +110,6 @@ const device_t fdc_none_device = { .force_redraw = NULL, .config = NULL }; -#endif const device_t fdc_internal_device = { .name = "Internal", @@ -133,9 +131,7 @@ typedef const struct { static fdc_cards_t fdc_cards[] = { // clang-format off -#if 0 { &fdc_none_device }, -#endif { &fdc_internal_device }, { &fdc_b215_device }, { &fdc_pii151b_device }, From 07e3aba22c0520c5646cb0d39dea67914a95d625 Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Sat, 29 Jun 2024 22:16:04 -0400 Subject: [PATCH 2/9] Better support for internal floppy --- src/config.c | 21 ++++++++ src/include/86box/fdc_ext.h | 3 +- src/machine/m_xt.c | 105 +++++++++++++++++------------------- 3 files changed, 73 insertions(+), 56 deletions(-) diff --git a/src/config.c b/src/config.c index ab23ddb4f..a98111edc 100644 --- a/src/config.c +++ b/src/config.c @@ -792,10 +792,31 @@ load_storage_controllers(void) } p = ini_section_get_string(cat, "fdc", NULL); +#if 0 if (p != NULL) fdc_type = fdc_card_get_from_internal_name(p); else fdc_type = FDC_INTERNAL; +#else + if (p == NULL) { + if (machine_has_flags(machine, MACHINE_FDC)) { + p = (char *) malloc((strlen("internal") + 1) * sizeof(char)); + strcpy(p, "internal"); + } else { + p = (char *) malloc((strlen("none") + 1) * sizeof(char)); + strcpy(p, "none"); + } + free_p = 1; + } + + fdc_type = fdc_card_get_from_internal_name(p); + + if (free_p) { + free(p); + p = NULL; + free_p = 0; + } +#endif p = ini_section_get_string(cat, "hdc", NULL); if (p == NULL) { diff --git a/src/include/86box/fdc_ext.h b/src/include/86box/fdc_ext.h index 0d821ac11..2c46d0704 100644 --- a/src/include/86box/fdc_ext.h +++ b/src/include/86box/fdc_ext.h @@ -25,7 +25,8 @@ extern int fdc_type; /* Controller types. */ -#define FDC_INTERNAL 0 +#define FDC_NONE 0 +#define FDC_INTERNAL 1 extern const device_t fdc_b215_device; extern const device_t fdc_pii151b_device; diff --git a/src/machine/m_xt.c b/src/machine/m_xt.c index ded68f5dc..adca9f4de 100644 --- a/src/machine/m_xt.c +++ b/src/machine/m_xt.c @@ -23,15 +23,15 @@ extern const device_t vendex_xt_rtc_onboard_device; static void -machine_xt_common_init(const machine_t *model) +machine_xt_common_init(const machine_t *model, int fixed_floppy) { + if ((fdc_type == FDC_INTERNAL) || fixed_floppy) + device_add(&fdc_xt_device); + machine_common_init(model); pit_devs[0].set_out_func(pit_devs[0].data, 1, pit_refresh_timer_xt); - if (fdc_type == FDC_INTERNAL) - device_add(&fdc_xt_device); - nmi_init(); standalone_gameport_type = &gameport_device; } @@ -59,7 +59,7 @@ machine_pc_init(const machine_t *model) device_add(&keyboard_pc_device); - machine_xt_common_init(model); + machine_xt_common_init(model, 0); return ret; } @@ -93,19 +93,11 @@ machine_pc82_init(const machine_t *model) device_add(&keyboard_pc82_device); device_add(&ibm_5161_device); - machine_xt_common_init(model); + machine_xt_common_init(model, 0); return ret; } -static void -machine_xt_init_ex(const machine_t *model) -{ - device_add(&keyboard_xt_device); - - machine_xt_common_init(model); -} - int machine_xt_init(const machine_t *model) { @@ -127,10 +119,12 @@ machine_xt_init(const machine_t *model) if (bios_only || !ret) return ret; - machine_xt_init_ex(model); + device_add(&keyboard_xt_device); device_add(&ibm_5161_device); + machine_xt_common_init(model, 0); + return ret; } @@ -145,7 +139,9 @@ machine_genxt_init(const machine_t *model) if (bios_only || !ret) return ret; - machine_xt_init_ex(model); + device_add(&keyboard_xt_device); + + machine_xt_common_init(model, 0); return ret; } @@ -170,17 +166,17 @@ machine_xt86_init(const machine_t *model) device_add(&keyboard_xt86_device); device_add(&ibm_5161_device); - machine_xt_common_init(model); + machine_xt_common_init(model, 0); return ret; } static void -machine_xt_clone_init(const machine_t *model) +machine_xt_clone_init(const machine_t *model, int fixed_floppy) { device_add(&keyboard_xtclone_device); - machine_xt_common_init(model); + machine_xt_common_init(model, fixed_floppy); } int @@ -194,7 +190,7 @@ machine_xt_americxt_init(const machine_t *model) if (bios_only || !ret) return ret; - machine_xt_clone_init(model); + machine_xt_clone_init(model, 0); return ret; } @@ -210,7 +206,7 @@ machine_xt_amixt_init(const machine_t *model) if (bios_only || !ret) return ret; - machine_xt_clone_init(model); + machine_xt_clone_init(model, 0); return ret; } @@ -226,7 +222,7 @@ machine_xt_znic_init(const machine_t *model) if (bios_only || !ret) return ret; - machine_xt_clone_init(model); + machine_xt_clone_init(model, 0); return ret; } @@ -242,7 +238,7 @@ machine_xt_dtk_init(const machine_t *model) if (bios_only || !ret) return ret; - machine_xt_clone_init(model); + machine_xt_clone_init(model, 0); return ret; } @@ -258,7 +254,7 @@ machine_xt_jukopc_init(const machine_t *model) if (bios_only || !ret) return ret; - machine_xt_clone_init(model); + machine_xt_clone_init(model, 0); return ret; } @@ -274,7 +270,7 @@ machine_xt_openxt_init(const machine_t *model) if (bios_only || !ret) return ret; - machine_xt_clone_init(model); + machine_xt_clone_init(model, 0); return ret; } @@ -294,7 +290,7 @@ machine_xt_pcxt_init(const machine_t *model) if (bios_only || !ret) return ret; - machine_xt_clone_init(model); + machine_xt_clone_init(model, 0); return ret; } @@ -312,7 +308,7 @@ machine_xt_pxxt_init(const machine_t *model) device_add(&keyboard_xt_device); - machine_xt_common_init(model); + machine_xt_common_init(model, 0); return ret; } @@ -329,7 +325,7 @@ machine_xt_iskra3104_init(const machine_t *model) if (bios_only || !ret) return ret; - machine_xt_clone_init(model); + machine_xt_clone_init(model, 0); return ret; } @@ -363,7 +359,7 @@ machine_xt_pravetz16_imko4_init(const machine_t *model) device_add(&keyboard_pravetz_device); - machine_xt_common_init(model); + machine_xt_common_init(model, 0); return ret; } @@ -379,7 +375,10 @@ machine_xt_micoms_xl7turbo_init(const machine_t *model) if (bios_only || !ret) return ret; - machine_xt_init_ex(model); + device_add(&keyboard_xt_device); + + machine_xt_common_init(model, 0); + return ret; } @@ -394,7 +393,7 @@ machine_xt_pc4i_init(const machine_t *model) if (bios_only || !ret) return ret; - machine_xt_clone_init(model); + machine_xt_clone_init(model, 0); return ret; } @@ -412,7 +411,7 @@ machine_xt_mpc1600_init(const machine_t *model) device_add(&keyboard_pc82_device); - machine_xt_common_init(model); + machine_xt_common_init(model, 0); return ret; } @@ -435,7 +434,7 @@ machine_xt_pcspirit_init(const machine_t *model) device_add(&keyboard_pc82_device); - machine_xt_common_init(model); + machine_xt_common_init(model, 0); return ret; } @@ -453,7 +452,7 @@ machine_xt_pc700_init(const machine_t *model) device_add(&keyboard_pc_device); - machine_xt_common_init(model); + machine_xt_common_init(model, 0); return ret; } @@ -471,7 +470,7 @@ machine_xt_pc500_init(const machine_t *model) device_add(&keyboard_pc_device); - machine_xt_common_init(model); + machine_xt_common_init(model, 0); return ret; } @@ -487,18 +486,20 @@ machine_xt_vendex_init(const machine_t *model) if (bios_only || !ret) return ret; - machine_xt_clone_init(model); + /* On-board FDC cannot be disabled */ + machine_xt_clone_init(model, 1); + device_add(&vendex_xt_rtc_onboard_device); return ret; } static void -machine_xt_hyundai_common_init(const machine_t *model) +machine_xt_hyundai_common_init(const machine_t *model, int fixed_floppy) { device_add(&keyboard_xt_hyundai_device); - machine_xt_common_init(model); + machine_xt_common_init(model, fixed_floppy); } int @@ -512,10 +513,8 @@ machine_xt_super16t_init(const machine_t *model) if (bios_only || !ret) return ret; - machine_xt_hyundai_common_init(model); - /* On-board FDC cannot be disabled */ - device_add(&fdc_xt_device); + machine_xt_hyundai_common_init(model, 1); return ret; } @@ -531,10 +530,8 @@ machine_xt_super16te_init(const machine_t *model) if (bios_only || !ret) return ret; - machine_xt_hyundai_common_init(model); - /* On-board FDC cannot be disabled */ - device_add(&fdc_xt_device); + machine_xt_hyundai_common_init(model, 1); return ret; } @@ -550,10 +547,8 @@ machine_xt_top88_init(const machine_t *model) if (bios_only || !ret) return ret; - machine_xt_clone_init(model); - /* On-board FDC cannot be disabled */ - device_add(&fdc_xt_device); + machine_xt_clone_init(model, 1); return ret; } @@ -569,7 +564,7 @@ machine_xt_kaypropc_init(const machine_t *model) if (bios_only || !ret) return ret; - machine_xt_clone_init(model); + machine_xt_clone_init(model, 0); return ret; } @@ -585,10 +580,8 @@ machine_xt_sansx16_init(const machine_t *model) if (bios_only || !ret) return ret; - machine_xt_clone_init(model); - /* On-board FDC cannot be disabled */ - device_add(&fdc_xt_device); + machine_xt_clone_init(model, 1); return ret; } @@ -604,7 +597,7 @@ machine_xt_bw230_init(const machine_t *model) if (bios_only || !ret) return ret; - machine_xt_clone_init(model); + machine_xt_clone_init(model, 0); return ret; } @@ -620,7 +613,7 @@ machine_xt_v20xt_init(const machine_t *model) if (bios_only || !ret) return ret; - machine_xt_clone_init(model); + machine_xt_clone_init(model, 0); return ret; } @@ -636,7 +629,7 @@ machine_xt_pb8810_init(const machine_t *model) if (bios_only || !ret) return ret; - machine_xt_clone_init(model); + machine_xt_clone_init(model, 0); return ret; } @@ -652,7 +645,9 @@ machine_xt_glabios_init(const machine_t *model) if (bios_only || !ret) return ret; - machine_xt_init_ex(model); + device_add(&keyboard_xt_device); + + machine_xt_common_init(model, 0); return ret; } From f68f0487264f02455313613752525d37803fe4f5 Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Sun, 30 Jun 2024 20:27:17 -0400 Subject: [PATCH 3/9] Don't attempt to add dummy internal device to system --- src/floppy/fdc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/floppy/fdc.c b/src/floppy/fdc.c index 0f3cf9dbb..cd514e141 100644 --- a/src/floppy/fdc.c +++ b/src/floppy/fdc.c @@ -188,8 +188,8 @@ fdc_card_get_from_internal_name(char *s) void fdc_card_init(void) { - if ((fdc_type > 0) && fdc_cards[fdc_type].device) - device_add(fdc_cards[fdc_type].device); + if ((fdc_type > FDC_INTERNAL) && fdc_cards[fdc_type].device) + device_add_inst(fdc_cards[fdc_type].device, 0); } uint8_t From 8aba1361e6ec192017b4cd0cb09d615ffcd24de4 Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Mon, 1 Jul 2024 00:25:52 -0400 Subject: [PATCH 4/9] Commented out support for hiding internal fdc --- src/qt/qt_settingsstoragecontrollers.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/qt/qt_settingsstoragecontrollers.cpp b/src/qt/qt_settingsstoragecontrollers.cpp index 389e22852..fa02ce613 100644 --- a/src/qt/qt_settingsstoragecontrollers.cpp +++ b/src/qt/qt_settingsstoragecontrollers.cpp @@ -110,6 +110,14 @@ SettingsStorageControllers::onCurrentMachineChanged(int machineId) c = 0; selectedRow = 0; while (true) { +#if 0 + /* Skip "internal" if machine doesn't have it. */ + if ((c == 1) && (machine_has_flags(machineId, MACHINE_FDC) == 0)) { + c++; + continue; + } +#endif + QString name = DeviceConfig::DeviceName(fdc_card_getdevice(c), fdc_card_get_internal_name(c), 1); if (name.isEmpty()) { break; From 00068539e131a5f759f239472debd1b73e74e542 Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Mon, 1 Jul 2024 01:44:54 -0400 Subject: [PATCH 5/9] Add ability to select XT or AT FDC --- src/floppy/fdc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/floppy/fdc.c b/src/floppy/fdc.c index cd514e141..49171ae30 100644 --- a/src/floppy/fdc.c +++ b/src/floppy/fdc.c @@ -133,6 +133,8 @@ static fdc_cards_t fdc_cards[] = { // clang-format off { &fdc_none_device }, { &fdc_internal_device }, + { &fdc_xt_device }, + { &fdc_at_device }, { &fdc_b215_device }, { &fdc_pii151b_device }, { &fdc_pii158b_device }, From 7ce119dcbae0c0b6393c2dd59c66c7d86fcc99e5 Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Mon, 1 Jul 2024 02:01:58 -0400 Subject: [PATCH 6/9] Fix flags in fdc.h --- src/include/86box/fdc.h | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/src/include/86box/fdc.h b/src/include/86box/fdc.h index 6bb8f081e..cee1fed62 100644 --- a/src/include/86box/fdc.h +++ b/src/include/86box/fdc.h @@ -40,24 +40,23 @@ extern int fdc_type; #define FDC_QUATERNARY_IRQ 6 #define FDC_QUATERNARY_DMA 2 -#define FDC_FLAG_PCJR 0x01 /* PCjr */ -#define FDC_FLAG_DISKCHG_ACTLOW 0x02 /* Amstrad, PS/1, PS/2 ISA */ -#define FDC_FLAG_AT 0x04 /* AT+, PS/x */ -#define FDC_FLAG_PS1 0x08 /* PS/1, PS/2 ISA */ -#define FDC_FLAG_SUPERIO 0x10 /* Super I/O chips */ -#define FDC_FLAG_START_RWC_1 0x20 /* W83877F, W83977F */ -#define FDC_FLAG_MORE_TRACKS 0x40 /* W83877F, W83977F, PC87306, PC87309 */ -#define FDC_FLAG_NSC 0x80 /* PC87306, PC87309 */ -#define FDC_FLAG_TOSHIBA 0x100 /* T1000, T1200 */ -#define FDC_FLAG_AMSTRAD 0x200 /* Non-AT Amstrad machines */ -#define FDC_FLAG_UMC 0x400 /* UMC UM8398 */ -#define FDC_FLAG_ALI 0x800 /* ALi M512x / M1543C */ -#define FDC_FLAG_SEC 0x1000 /* Is Secondary */ -#define FDC_FLAG_TER 0x2000 /* Is Tertiary */ -#define FDC_FLAG_QUA 0x3000 /* Is Quaternary */ -#define FDC_FLAG_CHANNEL 0x3000 /* Channel mask */ -#define FDC_FLAG_NO_DSR_RESET 0x4000 /* Has no DSR reset */ -#define FDC_FLAG_NEC 0x8000 /* Is NEC upd765-compatible */ +#define FDC_FLAG_PCJR 0x01 /* PCjr */ +#define FDC_FLAG_DISKCHG_ACTLOW 0x02 /* Amstrad, PS/1, PS/2 ISA */ +#define FDC_FLAG_AT 0x04 /* AT+, PS/x */ +#define FDC_FLAG_PS1 0x08 /* PS/1, PS/2 ISA */ +#define FDC_FLAG_SUPERIO 0x10 /* Super I/O chips */ +#define FDC_FLAG_START_RWC_1 0x20 /* W83877F, W83977F */ +#define FDC_FLAG_MORE_TRACKS 0x40 /* W83877F, W83977F, PC87306, PC87309 */ +#define FDC_FLAG_NSC 0x80 /* PC87306, PC87309 */ +#define FDC_FLAG_TOSHIBA 0x100 /* T1000, T1200 */ +#define FDC_FLAG_AMSTRAD 0x200 /* Non-AT Amstrad machines */ +#define FDC_FLAG_UMC 0x400 /* UMC UM8398 */ +#define FDC_FLAG_ALI 0x800 /* ALi M512x / M1543C */ +#define FDC_FLAG_NO_DSR_RESET 0x1000 /* Has no DSR reset */ +#define FDC_FLAG_NEC 0x2000 /* Is NEC upd765-compatible */ +#define FDC_FLAG_SEC 0x10000 /* Is Secondary */ +#define FDC_FLAG_TER 0x20000 /* Is Tertiary */ +#define FDC_FLAG_QUA 0x40000 /* Is Quaternary */ typedef struct fdc_t { uint8_t dor; From 516dc589b7eac6b7e13aa96ef9b3c104f1c8c8f5 Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Mon, 1 Jul 2024 21:00:26 -0400 Subject: [PATCH 7/9] Handle freeing mallocs in config.c properly --- src/config.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/config.c b/src/config.c index a98111edc..3035be95f 100644 --- a/src/config.c +++ b/src/config.c @@ -433,8 +433,11 @@ load_video(void) free_p = 1; } gfxcard[0] = video_get_video_from_internal_name(p); - if (free_p) + if (free_p) { free(p); + p = NULL; + free_p = 0; + } } if (((gfxcard[0] == VID_INTERNAL) && machine_has_flags(machine, MACHINE_VIDEO_8514A)) || @@ -853,6 +856,7 @@ load_storage_controllers(void) if (free_p) { free(p); p = NULL; + free_p = 0; } ide_ter_enabled = !!ini_section_get_int(cat, "ide_ter", 0); From 215b3253a5f2ae247bbe7b3d6dbb929cf663c570 Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Mon, 8 Jul 2024 00:40:52 -0400 Subject: [PATCH 8/9] Deal with some magic numbers re hdc_current --- src/disk/hdc.c | 2 +- src/include/86box/config.h | 1 + src/machine/m_at_compaq.c | 4 ++-- src/machine/m_europc.c | 2 +- src/machine/m_ps1.c | 2 +- src/machine/m_ps2_isa.c | 2 +- src/machine/m_v86p.c | 2 +- src/machine/m_xt_t1000.c | 2 +- 8 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/disk/hdc.c b/src/disk/hdc.c index 034b8890e..bb7adcd67 100644 --- a/src/disk/hdc.c +++ b/src/disk/hdc.c @@ -132,7 +132,7 @@ hdc_reset(void) hdc_current, (machines[machine].flags & MACHINE_HDC) ? 1 : 0); /* If we have a valid controller, add its device. */ - if (hdc_current > 1) + if (hdc_current > HDC_INTERNAL) device_add(controllers[hdc_current].device); /* Now, add the tertiary and/or quaternary IDE controllers. */ diff --git a/src/include/86box/config.h b/src/include/86box/config.h index 80c987162..8ce6f4cfe 100644 --- a/src/include/86box/config.h +++ b/src/include/86box/config.h @@ -114,6 +114,7 @@ typedef struct config_t { /* Other peripherals category */ int fdc_type; /* Floppy disk controller type */ + int hdc_current; /* Hard disk controller type */ int hdc; /* Hard disk controller */ int scsi_card; /* SCSI controller */ int ide_ter_enabled; /* Tertiary IDE controller enabled */ diff --git a/src/machine/m_at_compaq.c b/src/machine/m_at_compaq.c index 7f31d4ecd..b628ea095 100644 --- a/src/machine/m_at_compaq.c +++ b/src/machine/m_at_compaq.c @@ -798,7 +798,7 @@ machine_at_compaq_init(const machine_t *model, int type) break; case COMPAQ_PORTABLEIII: - if (hdc_current == 1) + if (hdc_current == HDC_INTERNAL) device_add(&ide_isa_device); if (gfxcard[0] == VID_INTERNAL) device_add(&compaq_plasma_device); @@ -806,7 +806,7 @@ machine_at_compaq_init(const machine_t *model, int type) break; case COMPAQ_PORTABLEIII386: - if (hdc_current == 1) + if (hdc_current == HDC_INTERNAL) device_add(&ide_isa_device); if (gfxcard[0] == VID_INTERNAL) device_add(&compaq_plasma_device); diff --git a/src/machine/m_europc.c b/src/machine/m_europc.c index e541cf718..c53061c4e 100644 --- a/src/machine/m_europc.c +++ b/src/machine/m_europc.c @@ -660,7 +660,7 @@ europc_boot(UNUSED(const device_t *info)) * * We only do this if we have not configured another one. */ - if (hdc_current == 1) + if (hdc_current == HDC_INTERNAL) (void) device_add(&xta_hd20_device); return sys; diff --git a/src/machine/m_ps1.c b/src/machine/m_ps1.c index 34691773f..25d21cfb9 100644 --- a/src/machine/m_ps1.c +++ b/src/machine/m_ps1.c @@ -353,7 +353,7 @@ ps1_setup(int model) device_add(&fdc_at_ps1_device); /* Enable the builtin HDC. */ - if (hdc_current == 1) { + if (hdc_current == HDC_INTERNAL) { priv = device_add(&ps1_hdc_device); ps1_hdc_inform(priv, &ps->ps1_91); diff --git a/src/machine/m_ps2_isa.c b/src/machine/m_ps2_isa.c index fa9c5acc2..4f6d9bc2b 100644 --- a/src/machine/m_ps2_isa.c +++ b/src/machine/m_ps2_isa.c @@ -179,7 +179,7 @@ ps2_isa_setup(int model, int cpu_type) device_add(&fdc_at_ps1_device); /* Enable the builtin HDC. */ - if (hdc_current == 1) { + if (hdc_current == HDC_INTERNAL) { priv = device_add(&ps1_hdc_device); ps1_hdc_inform(priv, &ps2->ps2_91); } diff --git a/src/machine/m_v86p.c b/src/machine/m_v86p.c index 54af9b053..5d132a839 100644 --- a/src/machine/m_v86p.c +++ b/src/machine/m_v86p.c @@ -94,7 +94,7 @@ machine_v86p_init(const machine_t *model) if (gfxcard[0] == VID_INTERNAL) device_add(&f82c425_video_device); - if (hdc_current <= 1) + if (hdc_current <= HDC_INTERNAL) device_add(&st506_xt_victor_v86p_device); return ret; diff --git a/src/machine/m_xt_t1000.c b/src/machine/m_xt_t1000.c index a12fa4e96..88fc6ada2 100644 --- a/src/machine/m_xt_t1000.c +++ b/src/machine/m_xt_t1000.c @@ -969,7 +969,7 @@ machine_xt_t1200_init(const machine_t *model) if (gfxcard[0] == VID_INTERNAL) device_add(&t1200_video_device); - if (hdc_current <= 1) + if (hdc_current <= HDC_INTERNAL) device_add(&st506_xt_toshiba_t1200_device); return ret; From 84a494aa4229ec0a2276cb258898c1198a220aa6 Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Mon, 8 Jul 2024 14:29:27 -0400 Subject: [PATCH 9/9] Don't change default behavior... yet --- src/config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.c b/src/config.c index 3035be95f..bc4341b0d 100644 --- a/src/config.c +++ b/src/config.c @@ -795,7 +795,7 @@ load_storage_controllers(void) } p = ini_section_get_string(cat, "fdc", NULL); -#if 0 +#if 1 if (p != NULL) fdc_type = fdc_card_get_from_internal_name(p); else