sms, add system select option

This commit is contained in:
kub 2021-10-19 22:45:32 +02:00
parent cc1547e8cd
commit 280bfc3ca7
9 changed files with 97 additions and 28 deletions

View file

@ -597,6 +597,7 @@ void emu_prep_defconfig(void)
defaultConfig.s_PsndRate = 44100;
defaultConfig.s_PicoRegion = 0; // auto
defaultConfig.s_PicoAutoRgnOrder = 0x184; // US, EU, JP
defaultConfig.s_hwSelect = PHWS_AUTO;
defaultConfig.s_PicoCDBuffers = 0;
defaultConfig.s_PicoSndFilterAlpha = 0x10000 * 60 / 100;
defaultConfig.confirm_save = EOPT_CONFIRM_SAVE;
@ -622,6 +623,7 @@ void emu_set_defconfig(void)
PicoIn.sndRate = currentConfig.s_PsndRate;
PicoIn.regionOverride = currentConfig.s_PicoRegion;
PicoIn.autoRgnOrder = currentConfig.s_PicoAutoRgnOrder;
PicoIn.hwSelect = currentConfig.s_hwSelect;
PicoIn.sndFilterAlpha = currentConfig.s_PicoSndFilterAlpha;
}

View file

@ -72,6 +72,7 @@ typedef struct _currentConfig_t {
int s_PsndRate;
int s_PicoRegion;
int s_PicoAutoRgnOrder;
int s_hwSelect;
int s_PicoCDBuffers;
int s_PicoSndFilterAlpha;
int Frameskip;

View file

@ -523,6 +523,29 @@ static int menu_loop_32x_options(int id, int keys)
#endif
// ------------ SMS options menu ------------
#ifndef NO_SMS
static const char *sms_hardwares[] = { "auto", "Game Gear", "Master System", NULL };
static menu_entry e_menu_sms_options[] =
{
mee_enum ("System", MA_SMSOPT_HARDWARE, currentConfig.s_hwSelect, sms_hardwares ),
};
static int menu_loop_sms_options(int id, int keys)
{
static int sel = 0;
me_loop(e_menu_sms_options, &sel);
PicoIn.hwSelect = currentConfig.s_hwSelect;
return 0;
}
#endif
// ------------ adv options menu ------------
static const char h_ovrclk[] = "Will break some games, keep at 0";
@ -828,6 +851,9 @@ static menu_entry e_menu_options[] =
mee_handler ("[Sega/Mega CD options]", menu_loop_cd_options),
#ifndef NO_32X
mee_handler ("[32X options]", menu_loop_32x_options),
#endif
#ifndef NO_SMS
mee_handler ("[SMS options]", menu_loop_sms_options),
#endif
mee_handler ("[Advanced options]", menu_loop_adv_options),
mee_cust_nosave("Save global config", MA_OPT_SAVECFG, mh_saveloadcfg, mgn_saveloadcfg),
@ -1290,6 +1316,9 @@ static menu_entry *e_menu_table[] =
e_menu_cd_options,
#ifndef NO_32X
e_menu_32x_options,
#endif
#ifndef NO_SMS
e_menu_sms_options,
#endif
e_menu_keyconfig,
e_menu_hidden,

View file

@ -87,6 +87,7 @@ typedef enum
MA_32XOPT_PWM,
MA_32XOPT_MSH2_CYCLES,
MA_32XOPT_SSH2_CYCLES,
MA_SMSOPT_HARDWARE,
MA_CTRL_PLAYER1,
MA_CTRL_PLAYER2,
MA_CTRL_EMU,