From c89bc248c34dc7b3c6f7214655661fddc0d17a5e Mon Sep 17 00:00:00 2001 From: Sour Date: Sat, 19 Oct 2019 21:26:52 -0400 Subject: [PATCH] PPU: Fixed recent regression with the "cycle" calculation --- Core/Ppu.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/Ppu.cpp b/Core/Ppu.cpp index 57ee004..a8efc27 100644 --- a/Core/Ppu.cpp +++ b/Core/Ppu.cpp @@ -106,9 +106,9 @@ uint16_t Ppu::GetCycle() if(hClock <= 1292) { return hClock >> 2; } else if(hClock <= 1310) { - return (hClock >> 2) + 1; + return (hClock - 2) >> 2; } else { - return (hClock >> 2) + 2; + return (hClock - 4) >> 2; } }