add 68k overclocking support

This commit is contained in:
notaz 2017-10-20 00:41:12 +03:00
parent 93f9619ed8
commit 35f2b65ef7
8 changed files with 33 additions and 2 deletions

View file

@ -652,6 +652,7 @@ int emu_read_config(const char *rom_fname, int no_defaults)
}
pemu_validate_config();
PicoIn.overclockM68k = currentConfig.overclock_68k;
// some sanity checks
#ifdef PSP

View file

@ -74,6 +74,7 @@ typedef struct _currentConfig_t {
int analog_deadzone;
int msh2_khz;
int ssh2_khz;
int overclock_68k;
} currentConfig_t;
extern currentConfig_t currentConfig, defaultConfig;

View file

@ -488,10 +488,13 @@ static int menu_loop_32x_options(int id, int keys)
// ------------ adv options menu ------------
static const char h_ovrclk[] = "Will break some games, keep at 0";
static menu_entry e_menu_adv_options[] =
{
mee_onoff ("SRAM/BRAM saves", MA_OPT_SRAM_STATES, currentConfig.EmuOpt, EOPT_EN_SRAM),
mee_onoff ("Disable sprite limit", MA_OPT2_NO_SPRITE_LIM, PicoIn.opt, POPT_DIS_SPRITE_LIM),
mee_range_h ("Overclock M68k (%)", MA_OPT2_OVERCLOCK_M68K,currentConfig.overclock_68k, 0, 1000, h_ovrclk),
mee_onoff ("Emulate Z80", MA_OPT2_ENABLE_Z80, PicoIn.opt, POPT_EN_Z80),
mee_onoff ("Emulate YM2612 (FM)", MA_OPT2_ENABLE_YM2612, PicoIn.opt, POPT_EN_FM),
mee_onoff ("Emulate SN76496 (PSG)", MA_OPT2_ENABLE_SN76496,PicoIn.opt, POPT_EN_PSG),
@ -508,7 +511,10 @@ static menu_entry e_menu_adv_options[] =
static int menu_loop_adv_options(int id, int keys)
{
static int sel = 0;
me_loop(e_menu_adv_options, &sel);
PicoIn.overclockM68k = currentConfig.overclock_68k; // int vs short
return 0;
}

View file

@ -57,6 +57,7 @@ typedef enum
MA_OPT2_DYNARECS,
MA_OPT2_NO_SPRITE_LIM,
MA_OPT2_NO_IDLE_LOOPS,
MA_OPT2_OVERCLOCK_M68K,
MA_OPT2_DONE,
MA_OPT3_SCALE, /* psp (all OPT3) */
MA_OPT3_HSCALE32,