From 9f1c5b45c0ad057733163e408ce0a16f14a5bb3c Mon Sep 17 00:00:00 2001 From: alyosha-tas Date: Tue, 21 Nov 2017 09:20:09 -0500 Subject: [PATCH] GBHawk: PPU fix --- .../Consoles/Nintendo/GBHawk/PPU.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/PPU.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/PPU.cs index 6a3e8652e1..10b5863fff 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/PPU.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/PPU.cs @@ -639,7 +639,15 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk pixel |= tile_data_latch[1].Bit(7 - (render_counter % 8)) ? 2 : 0; int ref_pixel = pixel; - pixel = (BGP >> (pixel * 2)) & 3; + if (LCDC.Bit(0)) + { + pixel = (BGP >> (pixel * 2)) & 3; + } + else + { + pixel = 0; + } + // now we have the BG pixel, we next need the sprite pixel if (!no_sprites)