From 2cf85b0add7e87bbea9caccd8b8c10b9bfa7a4a5 Mon Sep 17 00:00:00 2001 From: Rekai Musuka Date: Wed, 5 May 2021 00:01:19 -0500 Subject: [PATCH] fix(ppu): fix off by one error when grabbing sprite address --- src/ppu.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ppu.rs b/src/ppu.rs index 6f9e662..c0b4657 100644 --- a/src/ppu.rs +++ b/src/ppu.rs @@ -727,7 +727,7 @@ impl PixelFetcher { let scroll_y = pos.scroll_y; let offset = 2 * if attr.flags.y_flip() { - obj_size - (line_y + scroll_y) % 8 + (obj_size - 1) - (line_y + scroll_y) % 8 } else { (line_y + scroll_y) % 8 };