Ensure that any cycles spent when entering IRQ/NMI in dynarec are accounted

for in the TSC, and by extension the timer system. Fixes slowdown and
stuttering music in Museum Madness.
This commit is contained in:
SarahW 2020-11-19 22:09:41 +00:00
commit 8053c8a523

View file

@ -591,8 +591,6 @@ void exec386_dynarec(int cycs)
exec_interpreter();
else
exec_recompiler();
cycdiff=oldcyc-cycles;
tsc += cycdiff;
if (cpu_state.abrt)
{
@ -643,6 +641,9 @@ void exec386_dynarec(int cycs)
// pclog("IRQ %02X %04X:%04X %04X:%04X\n", temp, SS, SP, CS, pc);
}
}
cycdiff=oldcyc-cycles;
tsc += cycdiff;
}
if (TIMER_VAL_LESS_THAN_VAL(timer_target, (uint32_t)tsc))