From 6f2b36cacb90a9cc0ec4acb1fa8c8c4c3257b9e7 Mon Sep 17 00:00:00 2001 From: Lior Halphon Date: Tue, 20 Sep 2016 22:59:25 +0300 Subject: [PATCH] The HALT bug also happens on CGBs, regardless of DMG mode. --- Core/z80_cpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Core/z80_cpu.c b/Core/z80_cpu.c index 6db9007..b664ace 100644 --- a/Core/z80_cpu.c +++ b/Core/z80_cpu.c @@ -1336,7 +1336,8 @@ void GB_cpu_run(GB_gameboy_t *gb) bool halt_bug = false; if (interrupt) { - halt_bug = gb->halted && !gb->is_cgb; /* Todo: Does this bug happen on a CGB? */ + /* Despite what some online documentations say, the HALT bug also happens on a CGB, in both CGB and DMG modes. */ + halt_bug = gb->halted; gb->halted = false; }