currentConfig.gamma = atoi(val);
return 1;
+ case MA_OPT2_MAX_FRAMESKIP:
+ currentConfig.max_skip = atoi(val);
+ return 1;
+
/* PSP */
case MA_OPT3_SCALE:
if (strcasecmp(var, "Scale factor") != 0) return 0;
defaultConfig.turbo_rate = 15;\r
defaultConfig.msh2_khz = PICO_MSH2_HZ / 1000;\r
defaultConfig.ssh2_khz = PICO_SSH2_HZ / 1000;\r
+ defaultConfig.max_skip = 4;\r
\r
// platform specific overrides\r
pemu_prep_defconfig();\r
else if (diff < -target_frametime_x3)\r
{\r
/* no time left for this frame - skip */\r
- /* limit auto frameskip to 8 */\r
- if (frames_done / 8 <= frames_shown)\r
+ /* limit auto frameskip to max_skip */\r
+ if (fskip_cnt < currentConfig.max_skip) {\r
+ fskip_cnt++;\r
skip = 1;\r
- }\r
+ }\r
+ else {\r
+ fskip_cnt = 0;\r
+ }\r
+ } else\r
+ fskip_cnt = 0;\r
\r
// don't go in debt too much\r
while (diff < -target_frametime_x3 * 3) {\r
int msh2_khz;
int ssh2_khz;
int overclock_68k;
+ int max_skip;
} currentConfig_t;
extern currentConfig_t currentConfig, defaultConfig;
mee_onoff ("Disable frame limiter", MA_OPT2_NO_FRAME_LIMIT,currentConfig.EmuOpt, EOPT_NO_FRMLIMIT),
mee_onoff ("Enable dynarecs", MA_OPT2_DYNARECS, PicoIn.opt, POPT_EN_DRC),
mee_onoff ("Status line in main menu", MA_OPT2_STATUS_LINE, currentConfig.EmuOpt, EOPT_SHOW_RTC),
+ mee_range ("Max auto frameskip", MA_OPT2_MAX_FRAMESKIP, currentConfig.max_skip, 1, 10),
mee_onoff ("PWM IRQ optimization", MA_OPT2_PWM_IRQ_OPT, PicoIn.opt, POPT_PWM_IRQ_OPT),
MENU_OPTIONS_ADV
mee_end,
MA_OPT2_NO_SPRITE_LIM,
MA_OPT2_NO_IDLE_LOOPS,
MA_OPT2_OVERCLOCK_M68K,
+ MA_OPT2_MAX_FRAMESKIP,
MA_OPT2_PWM_IRQ_OPT,
MA_OPT2_DONE,
MA_OPT3_SCALE, /* psp (all OPT3) */