From 666becd27afda4d280ea80bffe9e50f79deaa7b8 Mon Sep 17 00:00:00 2001 From: Ompronce <88358700+Ompronce@users.noreply.github.com> Date: Mon, 25 Oct 2021 16:18:24 -0400 Subject: [PATCH 1/3] Prevent the selection of certain sound cards on machines without ISA or ISA16 --- src/win/win_settings.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/win/win_settings.c b/src/win/win_settings.c index 4b538f31b..9d729342c 100644 --- a/src/win/win_settings.c +++ b/src/win/win_settings.c @@ -1380,13 +1380,15 @@ win_settings_sound_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam) settings_set_check(hdlg, IDC_CHECK_MPU401, temp_mpu401); settings_enable_window(hdlg, IDC_CHECK_MPU401, mpu401_standalone_allow()); settings_enable_window(hdlg, IDC_CONFIGURE_MPU401, mpu401_standalone_allow() && temp_mpu401); + settings_enable_window(hdlg, IDC_CHECK_CMS, (machines[temp_machine].flags & MACHINE_BUS_ISA)); settings_set_check(hdlg, IDC_CHECK_CMS, temp_GAMEBLASTER); - settings_enable_window(hdlg, IDC_CONFIGURE_CMS, temp_GAMEBLASTER); + settings_enable_window(hdlg, IDC_CONFIGURE_CMS, (machines[temp_machine].flags & MACHINE_BUS_ISA) && temp_GAMEBLASTER); + settings_enable_window(hdlg, IDC_CHECK_GUS, (machines[temp_machine].flags & MACHINE_BUS_ISA16)); settings_set_check(hdlg, IDC_CHECK_GUS, temp_GUS); - settings_enable_window(hdlg, IDC_CONFIGURE_GUS, temp_GUS); + settings_enable_window(hdlg, IDC_CONFIGURE_GUS, (machines[temp_machine].flags & MACHINE_BUS_ISA16) && temp_GUS); + settings_enable_window(hdlg, IDC_CHECK_SSI, (machines[temp_machine].flags & MACHINE_BUS_ISA)); settings_set_check(hdlg, IDC_CHECK_SSI, temp_SSI2001); - settings_enable_window(hdlg, IDC_CONFIGURE_SSI, temp_SSI2001); - settings_set_check(hdlg, IDC_CHECK_FLOAT, temp_float); + settings_enable_window(hdlg, IDC_CONFIGURE_SSI, (machines[temp_machine].flags & MACHINE_BUS_ISA) && temp_SSI2001); free(lptsTemp); From ce4814c2a0111807787bb119a72dcedafc3311c0 Mon Sep 17 00:00:00 2001 From: Ompronce <88358700+Ompronce@users.noreply.github.com> Date: Mon, 25 Oct 2021 16:19:31 -0400 Subject: [PATCH 2/3] Prevent the selection of certain sound cards on machines without ISA or ISA16 --- src/sound/snd_cms.c | 2 +- src/sound/snd_gus.c | 2 +- src/sound/snd_ssi2001.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sound/snd_cms.c b/src/sound/snd_cms.c index 631e00c6a..15a065776 100644 --- a/src/sound/snd_cms.c +++ b/src/sound/snd_cms.c @@ -207,7 +207,7 @@ static const device_config_t cms_config[] = const device_t cms_device = { "Creative Music System / Game Blaster", - 0, 0, + DEVICE_ISA, 0, cms_init, cms_close, NULL, { NULL }, NULL, NULL, cms_config diff --git a/src/sound/snd_gus.c b/src/sound/snd_gus.c index fe94ebf2f..003b93b58 100644 --- a/src/sound/snd_gus.c +++ b/src/sound/snd_gus.c @@ -1315,7 +1315,7 @@ static const device_config_t gus_config[] = { const device_t gus_device = { "Gravis UltraSound", - DEVICE_ISA, + DEVICE_ISA | DEVICE_AT, 0, gus_init, gus_close, NULL, { NULL }, diff --git a/src/sound/snd_ssi2001.c b/src/sound/snd_ssi2001.c index 55740fac9..400700131 100644 --- a/src/sound/snd_ssi2001.c +++ b/src/sound/snd_ssi2001.c @@ -118,7 +118,7 @@ static const device_config_t ssi2001_config[] = const device_t ssi2001_device = { "Innovation SSI-2001", - 0, 0, + DEVICE_ISA, 0, ssi2001_init, ssi2001_close, NULL, { NULL }, NULL, NULL, ssi2001_config From 6b9802f0d9a0a9e83138251b379bd201e19fe1b1 Mon Sep 17 00:00:00 2001 From: Ompronce <88358700+Ompronce@users.noreply.github.com> Date: Mon, 25 Oct 2021 16:26:26 -0400 Subject: [PATCH 3/3] Corrected accidental removal of "IDC_CHECK_FLOAT" --- src/win/win_settings.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/win/win_settings.c b/src/win/win_settings.c index 9d729342c..668487d00 100644 --- a/src/win/win_settings.c +++ b/src/win/win_settings.c @@ -1389,6 +1389,7 @@ win_settings_sound_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam) settings_enable_window(hdlg, IDC_CHECK_SSI, (machines[temp_machine].flags & MACHINE_BUS_ISA)); settings_set_check(hdlg, IDC_CHECK_SSI, temp_SSI2001); settings_enable_window(hdlg, IDC_CONFIGURE_SSI, (machines[temp_machine].flags & MACHINE_BUS_ISA) && temp_SSI2001); + settings_set_check(hdlg, IDC_CHECK_FLOAT, temp_float); free(lptsTemp);