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 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 }; 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;