From 0431e1931d74125c299e5ce8f6656a4824a941b7 Mon Sep 17 00:00:00 2001 From: Sour Date: Sun, 24 Feb 2019 10:02:22 -0500 Subject: [PATCH] PPU: Fixed sprite display when vertical mirroring is enabled --- Core/Ppu.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/Ppu.cpp b/Core/Ppu.cpp index 54f1379..4ef1620 100644 --- a/Core/Ppu.cpp +++ b/Core/Ppu.cpp @@ -160,8 +160,8 @@ void Ppu::EvaluateNextLineSprites() uint8_t yOffset; int rowOffset; if(info.VerticalMirror) { - yOffset = (height - (_scanline + 1 - y)) & 0x07; - rowOffset = (height - (_scanline + 1 - y)) >> 3; + yOffset = (height - 1 - (_scanline + 1 - y)) & 0x07; + rowOffset = (height - 1 - (_scanline + 1 - y)) >> 3; } else { yOffset = (_scanline + 1 - y) & 0x07; rowOffset = (_scanline + 1 - y) >> 3;