From 4e2b5bb3367241378a85f6123b98cbd249dac1df Mon Sep 17 00:00:00 2001 From: Lior Halphon Date: Fri, 11 Jan 2019 21:53:21 +0200 Subject: [PATCH] Fix the GB_run_frame API in SGB mode --- Core/gb.c | 2 ++ Core/z80_cpu.c | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/gb.c b/Core/gb.c index 54265e6..0d957ee 100644 --- a/Core/gb.c +++ b/Core/gb.c @@ -351,6 +351,8 @@ exit: uint8_t GB_run(GB_gameboy_t *gb) { + gb->vblank_just_occured = false; + if (gb->sgb && gb->sgb->intro_animation < 140) { /* On the SGB, the GB is halted after finishing the boot ROM. Then, after the boot animation is almost done, it's reset. diff --git a/Core/z80_cpu.c b/Core/z80_cpu.c index 4584c53..55e1335 100644 --- a/Core/z80_cpu.c +++ b/Core/z80_cpu.c @@ -1356,8 +1356,6 @@ static GB_opcode_t *opcodes[256] = { }; void GB_cpu_run(GB_gameboy_t *gb) { - gb->vblank_just_occured = false; - if (gb->hdma_on) { GB_advance_cycles(gb, 4); return;