From 87892e72d6afec5b3443d9d682c004a3de67b5a1 Mon Sep 17 00:00:00 2001 From: Jasmine Iwanek Date: Sun, 6 Jul 2025 02:42:10 -0400 Subject: [PATCH] Allow ES688/1688 (Non-PNP) gameport to be disabled --- src/sound/snd_sb.c | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/src/sound/snd_sb.c b/src/sound/snd_sb.c index d75ee5766..e612250b7 100644 --- a/src/sound/snd_sb.c +++ b/src/sound/snd_sb.c @@ -3906,9 +3906,11 @@ ess_x688_init(UNUSED(const device_t *info)) sb_dsp_set_mpu(&ess->dsp, ess->mpu); } - ess->gameport = gameport_add(&gameport_pnp_device); - ess->gameport_addr = 0x200; - gameport_remap(ess->gameport, ess->gameport_addr); + if (device_get_config_int("gameport")) { + ess->gameport = gameport_add(&gameport_device); + ess->gameport_addr = 0x200; + gameport_remap(ess->gameport, ess->gameport_addr); + } if (ide_base > 0x0000) { device_add(&ide_qua_pnp_device); @@ -5265,6 +5267,17 @@ static const device_config_t ess_688_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 = "ide_ctrl", .description = "IDE Controller", @@ -5348,6 +5361,17 @@ static const device_config_t ess_1688_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 = "ide_ctrl", .description = "IDE Controller",