EE: Correct update of EE cycles on low cycle counts when overclocking

This commit is contained in:
refractionpcsx2 2024-05-05 16:52:44 +01:00
parent e53abb1989
commit 052951fbb0
2 changed files with 3 additions and 5 deletions

View File

@ -140,9 +140,6 @@ void recMFC0()
xMOV(ptr32[&cpuRegs.cycle], ecx); // update cycles
xMOV(eax, ecx);
xSUB(eax, ptr[&cpuRegs.lastCOP0Cycle]);
u8* skipInc = JNZ8(0);
xINC(eax);
x86SetJ8(skipInc);
xADD(ptr[&cpuRegs.CP0.n.Count], eax);
xMOV(ptr[&cpuRegs.lastCOP0Cycle], ecx);

View File

@ -1335,9 +1335,10 @@ u32 scaleblockcycles_clear()
DevCon.WriteLn(L"Unscaled overall: %d, scaled overall: %d, relative EE clock speed: %d %%",
unscaled_overall, scaled_overall, static_cast<int>(100 * ratio));
#endif
s8 cyclerate = EmuConfig.Speedhacks.EECycleRate;
const s8 cyclerate = EmuConfig.Speedhacks.EECycleRate;
const bool lowcycles = (s_nBlockCycles <= 40);
if (cyclerate > 1)
if (!lowcycles && cyclerate > 1)
{
s_nBlockCycles &= (0x1 << (cyclerate + 2)) - 1;
}