add hidden LagReduction option
This commit is contained in:
parent
948f7154fc
commit
31d5f080dc
|
@ -494,11 +494,12 @@ armcpu_flagIrq( armcpu_t *armcpu) {
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool fixCycleCount = false;
|
||||||
|
|
||||||
template<int PROCNUM>
|
template<int PROCNUM>
|
||||||
u32 armcpu_exec()
|
u32 armcpu_exec()
|
||||||
{
|
{
|
||||||
u32 c = 1;
|
u32 c = fixCycleCount ? 0 : 1;
|
||||||
|
|
||||||
//this assert is annoying. but sometimes it is handy.
|
//this assert is annoying. but sometimes it is handy.
|
||||||
//assert(ARMPROC.instruct_adr!=0x00000000);
|
//assert(ARMPROC.instruct_adr!=0x00000000);
|
||||||
|
@ -512,7 +513,7 @@ u32 armcpu_exec()
|
||||||
armcpu_irqException( &ARMPROC);
|
armcpu_irqException( &ARMPROC);
|
||||||
}
|
}
|
||||||
|
|
||||||
c = armcpu_prefetch(&ARMPROC);
|
c += armcpu_prefetch(&ARMPROC);
|
||||||
|
|
||||||
if ( ARMPROC.stalled) {
|
if ( ARMPROC.stalled) {
|
||||||
return c;
|
return c;
|
||||||
|
@ -534,6 +535,8 @@ u32 armcpu_exec()
|
||||||
else
|
else
|
||||||
c += arm_instructions_set_1[INSTRUCTION_INDEX(ARMPROC.instruction)]();
|
c += arm_instructions_set_1[INSTRUCTION_INDEX(ARMPROC.instruction)]();
|
||||||
}
|
}
|
||||||
|
else if (fixCycleCount)
|
||||||
|
c++;
|
||||||
#ifdef GDB_STUB
|
#ifdef GDB_STUB
|
||||||
if ( ARMPROC.post_ex_fn != NULL) {
|
if ( ARMPROC.post_ex_fn != NULL) {
|
||||||
/* call the external post execute function */
|
/* call the external post execute function */
|
||||||
|
|
|
@ -1508,6 +1508,9 @@ int _main()
|
||||||
GetPrivateProfileString("Watches", str, "", &rw_recent_files[i][0], 1024, IniName);
|
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
|
//i think we should override the ini file with anything from the commandline
|
||||||
CommandLine cmdline;
|
CommandLine cmdline;
|
||||||
cmdline.loadCommonOptions();
|
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);
|
WritePrivateProfileString("Watches", str, &rw_recent_files[i][0], IniName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern bool fixCycleCount;
|
||||||
|
WritePrivateProfileInt("Timings", "LagReduction", fixCycleCount, IniName);
|
||||||
|
|
||||||
ExitRunLoop();
|
ExitRunLoop();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue