From 54dfee24ed1a6fa5b0f9ac27b92708e85d071be0 Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Wed, 4 Oct 2023 14:39:06 -0400 Subject: [PATCH 1/5] Minor cleanups to third and fourth IDE controller --- src/disk/hdc_ide.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/disk/hdc_ide.c b/src/disk/hdc_ide.c index 0d169e8850..e84a975ae9 100644 --- a/src/disk/hdc_ide.c +++ b/src/disk/hdc_ide.c @@ -2979,7 +2979,7 @@ ide_ter_init(const device_t *info) if (irq == -1) isapnp_add_card(ide_ter_pnp_rom, sizeof(ide_ter_pnp_rom), ide_pnp_config_changed, NULL, NULL, NULL, (void *) 2); } else { - ide_board_init(2, irq, 0x168, 0x36e, 0); + ide_board_init(2, irq, HDC_TERTIARY_BASE, HDC_TERTIARY_SIDE, 0); } return (ide_boards[2]); @@ -3010,7 +3010,7 @@ ide_qua_init(const device_t *info) if (irq == -1) isapnp_add_card(ide_qua_pnp_rom, sizeof(ide_qua_pnp_rom), ide_pnp_config_changed, NULL, NULL, NULL, (void *) 3); } else { - ide_board_init(3, irq, 0x1e8, 0x3ee, 0); + ide_board_init(3, irq, HDC_QUATERNARY_BASE, HDC_QUATERNARY_SIDE, 0); } return (ide_boards[3]); @@ -3239,7 +3239,7 @@ static const device_config_t ide_ter_config[] = { .description = "IRQ", .type = CONFIG_SELECTION, .default_string = "", - .default_int = 10, + .default_int = HDC_TERTIARY_IRQ, .file_filter = "", .spinner = { 0 }, .selection = { @@ -3265,7 +3265,7 @@ static const device_config_t ide_qua_config[] = { .description = "IRQ", .type = CONFIG_SELECTION, .default_string = "", - .default_int = 11, + .default_int = HDC_QUATERNARY_IRQ, .file_filter = "", .spinner = { 0 }, .selection = { From a5a2bb12b879529f71929715719affb403d112b2 Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Wed, 4 Oct 2023 14:39:46 -0400 Subject: [PATCH 2/5] Swap addresses and IRQ's according to Linux Documentation --- src/disk/hdc_ide.c | 20 ++++++++++---------- src/include/86box/hdc_ide.h | 12 ++++++------ 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/disk/hdc_ide.c b/src/disk/hdc_ide.c index e84a975ae9..61b8728e1e 100644 --- a/src/disk/hdc_ide.c +++ b/src/disk/hdc_ide.c @@ -140,13 +140,13 @@ static uint8_t ide_ter_pnp_rom[] = { 0x15, 0x09, 0xf8, 0x00, 0x01, 0x00, /* logical device BOX0001 */ 0x1c, 0x41, 0xd0, 0x06, 0x00, /* compatible device PNP0600 */ 0x31, 0x00, /* start dependent functions, preferred */ - 0x22, 0x00, 0x04, /* IRQ 10 */ - 0x47, 0x01, 0x68, 0x01, 0x68, 0x01, 0x01, 0x08, /* I/O 0x168, decodes 16-bit, 1-byte alignment, 8 addresses */ - 0x47, 0x01, 0x6e, 0x03, 0x6e, 0x03, 0x01, 0x01, /* I/O 0x36E, decodes 16-bit, 1-byte alignment, 1 address */ + 0x22, 0x00, 0x08, /* IRQ 11 */ + 0x47, 0x01, 0xe8, 0x01, 0xe8, 0x01, 0x01, 0x08, /* I/O 0x168, decodes 16-bit, 1-byte alignment, 8 addresses */ + 0x47, 0x01, 0xee, 0x03, 0xee, 0x03, 0x01, 0x01, /* I/O 0x36E, decodes 16-bit, 1-byte alignment, 1 address */ 0x30, /* start dependent functions, acceptable */ 0x22, 0xb8, 0x1e, /* IRQ 3/4/5/7/9/10/11/12 */ - 0x47, 0x01, 0x68, 0x01, 0x68, 0x01, 0x01, 0x08, /* I/O 0x168, decodes 16-bit, 1-byte alignment, 8 addresses */ - 0x47, 0x01, 0x6e, 0x03, 0x6e, 0x03, 0x01, 0x01, /* I/O 0x36E, decodes 16-bit, 1-byte alignment, 1 address */ + 0x47, 0x01, 0xe8, 0x01, 0xe8, 0x01, 0x01, 0x08, /* I/O 0x168, decodes 16-bit, 1-byte alignment, 8 addresses */ + 0x47, 0x01, 0xee, 0x03, 0xee, 0x03, 0x01, 0x01, /* I/O 0x36E, decodes 16-bit, 1-byte alignment, 1 address */ 0x30, /* start dependent functions, acceptable */ 0x22, 0xb8, 0x1e, /* IRQ 3/4/5/7/9/10/11/12 */ 0x47, 0x01, 0x00, 0x01, 0xf8, 0xff, 0x08, 0x08, /* I/O 0x100-0xFFF8, decodes 16-bit, 8-byte alignment, 8 addresses */ @@ -163,13 +163,13 @@ static uint8_t ide_qua_pnp_rom[] = { 0x15, 0x09, 0xf8, 0x00, 0x01, 0x00, /* logical device BOX0001 */ 0x1c, 0x41, 0xd0, 0x06, 0x00, /* compatible device PNP0600 */ 0x31, 0x00, /* start dependent functions, preferred */ - 0x22, 0x00, 0x08, /* IRQ 11 */ - 0x47, 0x01, 0xe8, 0x01, 0xe8, 0x01, 0x01, 0x08, /* I/O 0x1E8, decodes 16-bit, 1-byte alignment, 8 addresses */ - 0x47, 0x01, 0xee, 0x03, 0xee, 0x03, 0x01, 0x01, /* I/O 0x3EE, decodes 16-bit, 1-byte alignment, 1 address */ + 0x22, 0x00, 0x04, /* IRQ 10 */ + 0x47, 0x01, 0x68, 0x01, 0x68, 0x01, 0x01, 0x08, /* I/O 0x1E8, decodes 16-bit, 1-byte alignment, 8 addresses */ + 0x47, 0x01, 0x6e, 0x03, 0x6e, 0x03, 0x01, 0x01, /* I/O 0x3EE, decodes 16-bit, 1-byte alignment, 1 address */ 0x30, /* start dependent functions, acceptable */ 0x22, 0xb8, 0x1e, /* IRQ 3/4/5/7/9/10/11/12 */ - 0x47, 0x01, 0xe8, 0x01, 0xe8, 0x01, 0x01, 0x08, /* I/O 0x1E8, decodes 16-bit, 1-byte alignment, 8 addresses */ - 0x47, 0x01, 0xee, 0x03, 0xee, 0x03, 0x01, 0x01, /* I/O 0x3EE, decodes 16-bit, 1-byte alignment, 1 address */ + 0x47, 0x01, 0x68, 0x01, 0x68, 0x01, 0x01, 0x08, /* I/O 0x1E8, decodes 16-bit, 1-byte alignment, 8 addresses */ + 0x47, 0x01, 0x6e, 0x03, 0x6e, 0x03, 0x01, 0x01, /* I/O 0x3EE, decodes 16-bit, 1-byte alignment, 1 address */ 0x30, /* start dependent functions, acceptable */ 0x22, 0xb8, 0x1e, /* IRQ 3/4/5/7/9/10/11/12 */ 0x47, 0x01, 0x00, 0x01, 0xf8, 0xff, 0x08, 0x08, /* I/O 0x100-0xFFF8, decodes 16-bit, 8-byte alignment, 8 addresses */ diff --git a/src/include/86box/hdc_ide.h b/src/include/86box/hdc_ide.h index 8bac5cf8b2..7ecb188e6c 100644 --- a/src/include/86box/hdc_ide.h +++ b/src/include/86box/hdc_ide.h @@ -28,12 +28,12 @@ #define HDC_SECONDARY_BASE 0x0170 #define HDC_SECONDARY_SIDE 0x0376 #define HDC_SECONDARY_IRQ 15 -#define HDC_TERTIARY_BASE 0x0168 -#define HDC_TERTIARY_SIDE 0x036E -#define HDC_TERTIARY_IRQ 10 -#define HDC_QUATERNARY_BASE 0x01E8 -#define HDC_QUATERNARY_SIDE 0x03EE -#define HDC_QUATERNARY_IRQ 11 +#define HDC_TERTIARY_BASE 0x01E8 +#define HDC_TERTIARY_SIDE 0x03EE +#define HDC_TERTIARY_IRQ 11 +#define HDC_QUATERNARY_BASE 0x0168 +#define HDC_QUATERNARY_SIDE 0x036E +#define HDC_QUATERNARY_IRQ 10 enum { IDE_NONE = 0, From 1212ee24922996bdaf5ecd91b794c798e5ba0742 Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Wed, 4 Oct 2023 15:00:47 -0400 Subject: [PATCH 3/5] Fix some typos in the win ui --- src/win/win_new_floppy.c | 2 +- src/win/win_settings.c | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/win/win_new_floppy.c b/src/win/win_new_floppy.c index 495abfb274..d0a245a456 100644 --- a/src/win/win_new_floppy.c +++ b/src/win/win_new_floppy.c @@ -739,7 +739,7 @@ NewFloppyDialogProcedure(HWND hdlg, UINT message, WPARAM wParam, UNUSED(LPARAM l new_floppy_msgbox_header(hdlg, MBX_ERROR, (wchar_t *) IDS_4108, (wchar_t *) IDS_4115); return TRUE; } - /*FALLTHROUGH*/ + fallthrough; case IDCANCEL: EndDialog(hdlg, 0); plat_pause(0); diff --git a/src/win/win_settings.c b/src/win/win_settings.c index b36a8a90b5..adeefd8b49 100644 --- a/src/win/win_settings.c +++ b/src/win/win_settings.c @@ -4396,7 +4396,7 @@ win_settings_mo_drives_init_columns(HWND hdlg) static void win_settings_zip_drives_resize_columns(HWND hdlg) { - int width[C_COLUMNS_MO_DRIVES] = { + int width[C_COLUMNS_ZIP_DRIVES] = { C_COLUMNS_ZIP_DRIVES_BUS, C_COLUMNS_ZIP_DRIVES_TYPE }; @@ -4713,12 +4713,12 @@ cdrom_recalc_location_controls(HWND hdlg, int assign_id) settings_show_window(hdlg, IDC_COMBO_CD_SPEED, bus != CDROM_BUS_DISABLED); settings_show_window(hdlg, IDT_CD_SPEED, bus != CDROM_BUS_DISABLED); #if 0 - settings_show_window(hdlg, IDC_CHECKEARLY, bus != CDROM_BUS_DISABLED); + settings_show_window(hdlg, IDC_COMBO_CD_TYPE, bus != CDROM_BUS_DISABLED); #endif if (bus != CDROM_BUS_DISABLED) { settings_set_cur_sel(hdlg, IDC_COMBO_CD_SPEED, temp_cdrom[lv2_current_sel].speed - 1); #if 0 - settings_set_check(hdlg, IDC_CHECKEARLY, temp_cdrom[lv2_current_sel].early); + settings_set_check(hdlg, IDC_COMBO_CD_TYPE, temp_cdrom[lv2_current_sel].early); #endif } @@ -4924,7 +4924,7 @@ static void mo_track(uint8_t id) { if (temp_mo_drives[id].bus_type == MO_BUS_ATAPI) - ide_tracking |= (1 << (temp_zip_drives[id].ide_channel << 3)); + ide_tracking |= (1 << (temp_mo_drives[id].ide_channel << 3)); else if (temp_mo_drives[id].bus_type == MO_BUS_SCSI) scsi_tracking[temp_mo_drives[id].scsi_device_id >> 3] |= (1 << (temp_mo_drives[id].scsi_device_id & 0x07)); } @@ -4933,7 +4933,7 @@ static void mo_untrack(uint8_t id) { if (temp_mo_drives[id].bus_type == MO_BUS_ATAPI) - ide_tracking &= ~(1 << (temp_zip_drives[id].ide_channel << 3)); + ide_tracking &= ~(1 << (temp_mo_drives[id].ide_channel << 3)); else if (temp_mo_drives[id].bus_type == MO_BUS_SCSI) scsi_tracking[temp_mo_drives[id].scsi_device_id >> 3] &= ~(1 << (temp_mo_drives[id].scsi_device_id & 0x07)); } @@ -5110,8 +5110,8 @@ win_settings_floppy_and_cdrom_drives_proc(HWND hdlg, UINT message, WPARAM wParam break; #if 0 - case IDC_CHECKEARLY: - temp_cdrom[lv2_current_sel].early = settings_get_check(hdlg, IDC_CHECKEARLY); + case IDC_COMBO_CD_TYPE:: + temp_cdrom[lv2_current_sel].early = settings_get_check(hdlg, IDC_COMBO_CD_TYPE:); win_settings_cdrom_drives_update_item(hdlg, lv2_current_sel); break; #endif From 1c25963a8c4ccac2659080e1992ebed743700281 Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Wed, 4 Oct 2023 15:10:57 -0400 Subject: [PATCH 4/5] Links shouldn't be bare in markdown --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 20671420e3..971f3c6427 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ Donations --------- We do not charge you for the emulator but donations are still welcome: -https://paypal.me/86Box. +. You can also support the project on Patreon: -https://www.patreon.com/86box. +. From 697213b99e8acc1563004a1b7f2790682e24e2a7 Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Wed, 4 Oct 2023 16:03:52 -0400 Subject: [PATCH 5/5] Remove unneeded/duplicate check re softfloat --- src/config.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/config.c b/src/config.c index f0b48dc1a1..957489a18d 100644 --- a/src/config.c +++ b/src/config.c @@ -511,7 +511,6 @@ load_machine(void) cpu_use_dynarec = !!ini_section_get_int(cat, "cpu_use_dynarec", 0); fpu_softfloat = !!ini_section_get_int(cat, "fpu_softfloat", 0); if ((fpu_type != FPU_NONE) && machine_has_flags(machine, MACHINE_SOFTFLOAT_ONLY)) - if (machine_has_flags(machine, MACHINE_SOFTFLOAT_ONLY)) fpu_softfloat = 1; p = ini_section_get_string(cat, "time_sync", NULL);