From 7ab8987a2be60ec0868810b978fc6ecaf0c2c790 Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Sun, 6 Jul 2025 01:50:29 -0400 Subject: [PATCH] Allow AWE32 (Non-PNP) gameport to be disabled --- src/sound/snd_sb.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/sound/snd_sb.c b/src/sound/snd_sb.c index 345b6346b..d75ee5766 100644 --- a/src/sound/snd_sb.c +++ b/src/sound/snd_sb.c @@ -3640,9 +3640,11 @@ sb_awe32_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); - sb->gameport = gameport_add(&gameport_device); - sb->gameport_addr = 0x200; - gameport_remap(sb->gameport, sb->gameport_addr); + 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; } @@ -4923,6 +4925,17 @@ static const device_config_t sb_awe32_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",