From da1d190cce92e4cda3e9e6d7ded108923d27aba4 Mon Sep 17 00:00:00 2001 From: alyosha-tas Date: Wed, 9 May 2018 22:18:10 -0400 Subject: [PATCH] GBHawk: When windowing is active, start mode 3 earlier then usual (for pokemon yellow sync) --- .../Consoles/Nintendo/GBHawk/GBC_PPU.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBC_PPU.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBC_PPU.cs index 8447de3f2a..a3ea968b3e 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBC_PPU.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBC_PPU.cs @@ -825,6 +825,17 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk { read_case = 8; hbl_countdown = 5; + if (window_started) + { + hbl_countdown -= 2; + } + } + if (pixel_counter == 158 && window_started) + { + STAT &= 0xFC; + STAT |= 0x00; + + if (STAT.Bit(3)) { HBL_INT = true; } } } else if ((render_counter >= render_offset) && (pixel_counter < 0))