From 60dde4dab7b27927672cf87b8f4dd12d7a39caa4 Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Sun, 6 Jul 2025 09:03:56 -0400 Subject: [PATCH] Add gameport to MCA Soundblasters --- src/sound/snd_sb.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/src/sound/snd_sb.c b/src/sound/snd_sb.c index 9fc04eefa..c60b5cfe0 100644 --- a/src/sound/snd_sb.c +++ b/src/sound/snd_sb.c @@ -2954,6 +2954,12 @@ sb_mcv_init(UNUSED(const device_t *info)) if (device_get_config_int("receive_input")) midi_in_handler(1, sb_dsp_input_msg, sb_dsp_input_sysex, &sb->dsp); + if (device_get_config_int("gameport")) { + sb->gameport = gameport_add(&gameport_device); + sb->gameport_addr = 0x200; + gameport_remap(sb->gameport, sb->gameport_addr); + } + return sb; } @@ -3123,6 +3129,12 @@ sb_pro_mcv_init(UNUSED(const device_t *info)) if (device_get_config_int("receive_input")) midi_in_handler(1, sb_dsp_input_msg, sb_dsp_input_sysex, &sb->dsp); + if (device_get_config_int("gameport")) { + sb->gameport = gameport_add(&gameport_device); + sb->gameport_addr = 0x200; + gameport_remap(sb->gameport, sb->gameport_addr); + } + return sb; } @@ -4368,6 +4380,17 @@ static const device_config_t sb_mcv_config[] = { }, .bios = { { 0 } } }, + { + .name = "gameport", + .description = "Enable Game port", + .type = CONFIG_BINARY, + .default_string = NULL, + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { { 0 } } + }, { .name = "opl", .description = "Enable OPL", @@ -4468,6 +4491,17 @@ static const device_config_t sb_pro_config[] = { }; static const device_config_t sb_pro_mcv_config[] = { + { + .name = "gameport", + .description = "Enable Game port", + .type = CONFIG_BINARY, + .default_string = NULL, + .default_int = 0, + .file_filter = NULL, + .spinner = { 0 }, + .selection = { { 0 } }, + .bios = { { 0 } } + }, { .name = "receive_input", .description = "Receive MIDI input",