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