From 227928e8ca8fe15761fa67d28e0018c47673b0dd Mon Sep 17 00:00:00 2001 From: Rekai Musuka Date: Tue, 21 Sep 2021 12:09:35 -0300 Subject: [PATCH] Revert "fix(ppu): explicity choose to use sign extension" This reverts commit 1001b0b124eae6bfe13f9199637dc8ae52c93f47. --- src/ppu.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ppu.rs b/src/ppu.rs index fec2bdf..1f166e6 100644 --- a/src/ppu.rs +++ b/src/ppu.rs @@ -325,7 +325,7 @@ impl Ppu { if self.ctrl.window_enabled() && !self.window_stat.should_draw() && self.window_stat.coincidence() - && self.x_pos as i8 as i16 >= self.pos.window_x as i8 as i16 - 7 + && self.x_pos as i16 >= self.pos.window_x as i16 - 7 { self.window_stat.set_should_draw(true); self.fetch.back.reset(); @@ -700,7 +700,7 @@ impl PixelFetcher { let id = self.back.tile.id.expect("Tile Number is present"); let tile_data_addr = match control.tile_data_addr() { - TileDataAddress::X8800 => 0x9000u16.wrapping_add(((id as i8 as i16) * 16) as u16), + TileDataAddress::X8800 => 0x9000u16.wrapping_add(((id as i8) as i16 * 16) as u16), TileDataAddress::X8000 => 0x8000 + (id as u16 * 16), };