From 482d226cd687202c7c9b4526ae8e9620a47244de Mon Sep 17 00:00:00 2001 From: Rekai Musuka Date: Thu, 10 Jun 2021 00:35:15 -0500 Subject: [PATCH] fix(ppu): properly implement $8800 addressing mode --- src/ppu.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ppu.rs b/src/ppu.rs index 55d9378..f570689 100644 --- a/src/ppu.rs +++ b/src/ppu.rs @@ -696,7 +696,7 @@ impl PixelFetcher { let id = self.back.tile.id.expect("Tile Number unexpectedly missing"); let tile_data_addr = match control.tile_data_addr() { - TileDataAddress::X8800 => 0x9000u16.wrapping_add((id as u16) * 16), + TileDataAddress::X8800 => 0x9000u16.wrapping_add(((id as i8) as i16 * 16) as u16), TileDataAddress::X8000 => 0x8000 + (id as u16 * 16), };