From 2e68fe044ea09b8928615e1432f654ff3f2520dc Mon Sep 17 00:00:00 2001 From: Ompronce <88358700+Ompronce@users.noreply.github.com> Date: Sun, 29 Aug 2021 00:01:20 -0400 Subject: [PATCH 1/7] Add files via upload --- src/include/86box/resource.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/include/86box/resource.h b/src/include/86box/resource.h index 7d2233ea6..7168ce5ba 100644 --- a/src/include/86box/resource.h +++ b/src/include/86box/resource.h @@ -164,6 +164,7 @@ #define IDC_CONFIGURE_GUS 1049 #define IDC_COMBO_MIDI_IN 1050 #define IDC_CONFIGURE_CMS 1051 +#define IDC_CONFIGURE_SSI 1052 #define IDC_COMBO_NET_TYPE 1060 /* network config */ #define IDC_COMBO_PCAP 1061 From b9342ec1ea88c9946172b7718b486ab9c14740c5 Mon Sep 17 00:00:00 2001 From: Ompronce <88358700+Ompronce@users.noreply.github.com> Date: Sun, 29 Aug 2021 00:02:50 -0400 Subject: [PATCH 2/7] Add files via upload --- src/sound/snd_ssi2001.c | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/src/sound/snd_ssi2001.c b/src/sound/snd_ssi2001.c index ad65a9010..bd4e70ea9 100644 --- a/src/sound/snd_ssi2001.c +++ b/src/sound/snd_ssi2001.c @@ -65,7 +65,8 @@ void *ssi2001_init(const device_t *info) ssi2001->psid = sid_init(); sid_reset(ssi2001->psid); - io_sethandler(0x0280, 0x0020, ssi2001_read, NULL, NULL, ssi2001_write, NULL, NULL, ssi2001); + uint16_t addr = device_get_config_hex16("base"); + io_sethandler(addr, 0x0020, ssi2001_read, NULL, NULL, ssi2001_write, NULL, NULL, ssi2001); sound_add_handler(ssi2001_get_buffer, ssi2001); return ssi2001; } @@ -79,11 +80,38 @@ void ssi2001_close(void *p) free(ssi2001); } +static const device_config_t ssi2001_config[] = +{ + { + "base", "Address", CONFIG_HEX16, "", 0x280, "", { 0 }, + { + { + "0x280", 0x280 + }, + { + "0x2A0", 0x2A0 + }, + { + "0x2C0", 0x2C0 + }, + { + "0x2E0", 0x2E0 + }, + { + "" + } + } + }, + { + "", "", -1 + } +}; + const device_t ssi2001_device = { "Innovation SSI-2001", 0, 0, ssi2001_init, ssi2001_close, NULL, { NULL }, NULL, NULL, - NULL + ssi2001_config }; From 4cbba570a9898a918db8db35932387df5b915e4c Mon Sep 17 00:00:00 2001 From: Ompronce <88358700+Ompronce@users.noreply.github.com> Date: Sun, 29 Aug 2021 00:03:33 -0400 Subject: [PATCH 3/7] Add files via upload --- src/win/86Box.rc | 1 + src/win/win_settings.c | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/src/win/86Box.rc b/src/win/86Box.rc index 78b37c697..d6e98e6ee 100644 --- a/src/win/86Box.rc +++ b/src/win/86Box.rc @@ -519,6 +519,7 @@ BEGIN CONTROL "Innovation SSI-2001",IDC_CHECK_SSI,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,7,84,95,10 + PUSHBUTTON "Configure",IDC_CONFIGURE_SSI,214,82,46,12 CONTROL "CMS / Game Blaster",IDC_CHECK_CMS,"Button", BS_AUTOCHECKBOX | WS_TABSTOP,7,102,95,10 diff --git a/src/win/win_settings.c b/src/win/win_settings.c index 4a7dbc0bb..7e90ef1ba 100644 --- a/src/win/win_settings.c +++ b/src/win/win_settings.c @@ -1380,6 +1380,7 @@ win_settings_sound_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam) settings_set_check(hdlg, IDC_CHECK_GUS, temp_GUS); settings_enable_window(hdlg, IDC_CONFIGURE_GUS, temp_GUS); 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); free(lptsTemp); @@ -1456,6 +1457,16 @@ win_settings_sound_proc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam) case IDC_CONFIGURE_GUS: temp_deviceconfig |= deviceconfig_open(hdlg, (void *)&gus_device); break; + + case IDC_CHECK_SSI: + temp_SSI2001 = settings_get_check(hdlg, IDC_CHECK_SSI); + + settings_enable_window(hdlg, IDC_CONFIGURE_SSI, temp_SSI2001); + break; + + case IDC_CONFIGURE_SSI: + temp_deviceconfig |= deviceconfig_open(hdlg, &ssi2001_device); + break; } return FALSE; From 5b880cd8046a7ae9b3c30263eca79a48cc1fc6f4 Mon Sep 17 00:00:00 2001 From: Ompronce <88358700+Ompronce@users.noreply.github.com> Date: Sun, 29 Aug 2021 01:38:45 -0400 Subject: [PATCH 4/7] Added correct IRQs for Roland MPU-IPC-T card and corrected typo --- src/sound/snd_mpu401.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/sound/snd_mpu401.c b/src/sound/snd_mpu401.c index b407ceea9..0f6e420b7 100644 --- a/src/sound/snd_mpu401.c +++ b/src/sound/snd_mpu401.c @@ -1674,7 +1674,7 @@ mpu401_init(mpu_t *mpu, uint16_t addr, int irq, int mode, int receive_input) mpu->mode = M_UART; mpu->addr = addr; - /* Expalantion: + /* Explanation: MPU-401 starting in intelligent mode = Full MPU-401 intelligent mode capability; MPU-401 starting in UART mode = Reduced MPU-401 intelligent mode capability seen on the Sound Blaster 16/AWE32, only supporting commands 3F (set UART mode) and FF (reset). */ @@ -1817,10 +1817,10 @@ static const device_config_t mpu401_standalone_config[] = } }, { - "irq", "MPU-401 IRQ", CONFIG_SELECTION, "", 9, "", { 0 }, + "irq", "MPU-401 IRQ", CONFIG_SELECTION, "", 2, "", { 0 }, { { - "IRQ 9", 9 + "IRQ 2", 2 }, { "IRQ 3", 3 @@ -1834,9 +1834,6 @@ static const device_config_t mpu401_standalone_config[] = { "IRQ 7", 7 }, - { - "IRQ 10", 10 - }, { "" } From 0468164c2bb493345604036cfb441acb0c953418 Mon Sep 17 00:00:00 2001 From: Ompronce <88358700+Ompronce@users.noreply.github.com> Date: Sun, 29 Aug 2021 02:04:22 -0400 Subject: [PATCH 5/7] Add files via upload --- src/sound/snd_mpu401.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/sound/snd_mpu401.c b/src/sound/snd_mpu401.c index 0f6e420b7..571ee8085 100644 --- a/src/sound/snd_mpu401.c +++ b/src/sound/snd_mpu401.c @@ -1808,6 +1808,9 @@ static const device_config_t mpu401_standalone_config[] = { "0x300", 0x300 }, + { + "0x320", 0x320 + }, { "0x330", 0x330 }, @@ -1831,6 +1834,9 @@ static const device_config_t mpu401_standalone_config[] = { "IRQ 5", 5 }, + { + "IRQ 6", 6 + }, { "IRQ 7", 7 }, From 5272ddda562a68ba9205fbcb213571ea9c0927d5 Mon Sep 17 00:00:00 2001 From: Ompronce <88358700+Ompronce@users.noreply.github.com> Date: Sun, 29 Aug 2021 05:51:47 -0400 Subject: [PATCH 6/7] Restored previous MPU-401 code --- src/sound/snd_mpu401.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/sound/snd_mpu401.c b/src/sound/snd_mpu401.c index 571ee8085..b407ceea9 100644 --- a/src/sound/snd_mpu401.c +++ b/src/sound/snd_mpu401.c @@ -1674,7 +1674,7 @@ mpu401_init(mpu_t *mpu, uint16_t addr, int irq, int mode, int receive_input) mpu->mode = M_UART; mpu->addr = addr; - /* Explanation: + /* Expalantion: MPU-401 starting in intelligent mode = Full MPU-401 intelligent mode capability; MPU-401 starting in UART mode = Reduced MPU-401 intelligent mode capability seen on the Sound Blaster 16/AWE32, only supporting commands 3F (set UART mode) and FF (reset). */ @@ -1808,9 +1808,6 @@ static const device_config_t mpu401_standalone_config[] = { "0x300", 0x300 }, - { - "0x320", 0x320 - }, { "0x330", 0x330 }, @@ -1820,10 +1817,10 @@ static const device_config_t mpu401_standalone_config[] = } }, { - "irq", "MPU-401 IRQ", CONFIG_SELECTION, "", 2, "", { 0 }, + "irq", "MPU-401 IRQ", CONFIG_SELECTION, "", 9, "", { 0 }, { { - "IRQ 2", 2 + "IRQ 9", 9 }, { "IRQ 3", 3 @@ -1835,10 +1832,10 @@ static const device_config_t mpu401_standalone_config[] = "IRQ 5", 5 }, { - "IRQ 6", 6 + "IRQ 7", 7 }, { - "IRQ 7", 7 + "IRQ 10", 10 }, { "" From e8908ee1b40ecbcb62303492e05263f28c22ed5e Mon Sep 17 00:00:00 2001 From: Ompronce <88358700+Ompronce@users.noreply.github.com> Date: Sat, 18 Sep 2021 22:01:13 -0400 Subject: [PATCH 7/7] Add files via upload --- src/sound/snd_audiopci.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/sound/snd_audiopci.c b/src/sound/snd_audiopci.c index a24978750..f9ecb7d1f 100644 --- a/src/sound/snd_audiopci.c +++ b/src/sound/snd_audiopci.c @@ -802,7 +802,6 @@ es1371_outb(uint16_t port, uint8_t val, void *p) Addressable as byte, word, longword */ case 0x18: dev->legacy_ctrl |= LEGACY_INT; - // nmi = 0; break; case 0x1a: old_legacy_ctrl = dev->legacy_ctrl; @@ -879,7 +878,6 @@ es1371_outw(uint16_t port, uint16_t val, void *p) Addressable as byte, word, longword */ case 0x18: dev->legacy_ctrl |= LEGACY_INT; - // nmi = 0; break; case 0x1a: old_legacy_ctrl = dev->legacy_ctrl; @@ -1032,7 +1030,6 @@ es1371_outl(uint16_t port, uint32_t val, void *p) old_legacy_ctrl = dev->legacy_ctrl; dev->legacy_ctrl = (dev->legacy_ctrl & 0x0000ffff) | (val & 0xffff0000); dev->legacy_ctrl |= LEGACY_INT; - // nmi = 0; es1371_update_irqs(dev); update_legacy(dev, old_legacy_ctrl); break; @@ -1239,17 +1236,17 @@ update_legacy(es1371_t *dev, uint32_t old_legacy_ctrl) if (old_legacy_ctrl & LEGACY_CAPTURE_CODEC) { switch ((old_legacy_ctrl >> LEGACY_CODEC_ADDR_SHIFT) & 3) { case 0: - io_removehandler(0x5300, 0x0080, + io_removehandler(0x0530, 0x0008, capture_read_codec, NULL, NULL, capture_write_codec, NULL, NULL, dev); break; case 2: - io_removehandler(0xe800, 0x0080, + io_removehandler(0x0e80, 0x0008, capture_read_codec, NULL, NULL, capture_write_codec,NULL,NULL, dev); break; case 3: - io_removehandler(0xf400, 0x0080, + io_removehandler(0x0f40, 0x0008, capture_read_codec, NULL, NULL, capture_write_codec, NULL, NULL, dev); break; @@ -1326,17 +1323,17 @@ update_legacy(es1371_t *dev, uint32_t old_legacy_ctrl) if (dev->legacy_ctrl & LEGACY_CAPTURE_CODEC) { switch ((dev->legacy_ctrl >> LEGACY_CODEC_ADDR_SHIFT) & 3) { case 0: - io_sethandler(0x5300, 0x0080, + io_sethandler(0x0530, 0x0008, capture_read_codec, NULL, NULL, capture_write_codec, NULL, NULL, dev); break; case 2: - io_sethandler(0xe800, 0x0080, + io_sethandler(0x0e80, 0x0008, capture_read_codec, NULL, NULL, capture_write_codec, NULL, NULL, dev); break; case 3: - io_sethandler(0xf400, 0x0080, + io_sethandler(0x0f40, 0x0008, capture_read_codec, NULL, NULL, capture_write_codec, NULL, NULL, dev); break;