Skip to content

Commit

Permalink
EE: Correct update of EE cycles on low cycle counts when overclocking
Browse files Browse the repository at this point in the history
  • Loading branch information
refractionpcsx2 committed May 10, 2024
1 parent e53abb1 commit 052951f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 0 additions & 3 deletions pcsx2/x86/iCOP0.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
5 changes: 3 additions & 2 deletions pcsx2/x86/ix86-32/iR5900.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 052951f

Please sign in to comment.