add hidden LagReduction option

This commit is contained in:
gocha 2009-09-06 00:16:20 +00:00
parent 948f7154fc
commit 31d5f080dc
2 changed files with 29 additions and 20 deletions

View File

@ -494,11 +494,12 @@ armcpu_flagIrq( armcpu_t *armcpu) {
return TRUE;
}
bool fixCycleCount = false;
template<int PROCNUM>
u32 armcpu_exec()
{
u32 c = 1;
u32 c = fixCycleCount ? 0 : 1;
//this assert is annoying. but sometimes it is handy.
//assert(ARMPROC.instruct_adr!=0x00000000);
@ -512,7 +513,7 @@ u32 armcpu_exec()
armcpu_irqException( &ARMPROC);
}
c = armcpu_prefetch(&ARMPROC);
c += armcpu_prefetch(&ARMPROC);
if ( ARMPROC.stalled) {
return c;
@ -534,6 +535,8 @@ u32 armcpu_exec()
else
c += arm_instructions_set_1[INSTRUCTION_INDEX(ARMPROC.instruction)]();
}
else if (fixCycleCount)
c++;
#ifdef GDB_STUB
if ( ARMPROC.post_ex_fn != NULL) {
/* call the external post execute function */

View File

@ -1508,6 +1508,9 @@ int _main()
GetPrivateProfileString("Watches", str, "", &rw_recent_files[i][0], 1024, IniName);
}
extern bool fixCycleCount;
fixCycleCount = GetPrivateProfileInt("Timings", "LagReduction", 0, IniName) != 0;
//i think we should override the ini file with anything from the commandline
CommandLine cmdline;
cmdline.loadCommonOptions();
@ -2685,6 +2688,9 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
WritePrivateProfileString("Watches", str, &rw_recent_files[i][0], IniName);
}
extern bool fixCycleCount;
WritePrivateProfileInt("Timings", "LagReduction", fixCycleCount, IniName);
ExitRunLoop();
}
else