From 6791d8474194c3734620e872df75206b9c2c3c39 Mon Sep 17 00:00:00 2001 From: kub Date: Tue, 26 Oct 2021 23:36:38 +0200 Subject: [PATCH] libretro, add FM unit setting --- platform/libretro/libretro.c | 12 +++++++++++- platform/libretro/libretro_core_options.h | 13 ++++++------- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/platform/libretro/libretro.c b/platform/libretro/libretro.c index 4a12c686..cd2e91c2 100644 --- a/platform/libretro/libretro.c +++ b/platform/libretro/libretro.c @@ -1474,6 +1474,15 @@ static void update_variables(bool first_run) PicoIn.hwSelect = PHWS_SMS; } + var.value = NULL; + var.key = "picodrive_smsfm"; + if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value) { + if (strcmp(var.value, "on") == 0) + PicoIn.opt |= POPT_EN_YM2413; + else + PicoIn.opt &= ~POPT_EN_YM2413; + } + OldPicoRegionOverride = PicoIn.regionOverride; var.value = NULL; var.key = "picodrive_region"; @@ -1819,9 +1828,10 @@ void retro_init(void) #endif PicoIn.opt = POPT_EN_STEREO|POPT_EN_FM - | POPT_EN_PSG|POPT_EN_Z80|POPT_EN_YM2413|POPT_EN_GG_LCD + | POPT_EN_PSG|POPT_EN_Z80|POPT_EN_GG_LCD | POPT_EN_MCD_PCM|POPT_EN_MCD_CDDA|POPT_EN_MCD_GFX | POPT_EN_32X|POPT_EN_PWM +//|POPT_DIS_IDLE_DET | POPT_ACC_SPRITES|POPT_DIS_32C_BORDER; #ifdef __arm__ #ifdef _3DS diff --git a/platform/libretro/libretro_core_options.h b/platform/libretro/libretro_core_options.h index 5d6911e2..be23cd78 100644 --- a/platform/libretro/libretro_core_options.h +++ b/platform/libretro/libretro_core_options.h @@ -85,16 +85,15 @@ struct retro_core_option_definition option_defs_us[] = { "disabled" }, { - "picodrive_smstype", - "Master System type", - "Choose which type of system the core should emulate for Master system", + "picodrive_smsfm", + "Master System FM sound unit", + "Enable the FM Sound Unit emulation. Some MS games produce much better sound, but non-Japanese titles might possibly not run.", { - { "Auto", NULL }, - { "Game Gear", NULL }, - { "Master System", NULL }, + { "off", NULL }, + { "on", NULL }, { NULL, NULL }, }, - "disabled" + "off" }, { "picodrive_region", -- 2.39.2