From ee7e58e44b4ec2e880c0aff8db804ceeacd6c3f0 Mon Sep 17 00:00:00 2001 From: Lior Halphon Date: Fri, 10 Jun 2016 17:29:49 +0300 Subject: [PATCH] Fixed a bug introduced by the last STAT fix. This restores GBVideoPlayer support. --- Core/display.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Core/display.c b/Core/display.c index 2d4879b..5bae908 100644 --- a/Core/display.c +++ b/Core/display.c @@ -288,7 +288,10 @@ void display_run(GB_gameboy_t *gb) gb->io_registers[GB_IO_STAT] &= ~4; if (gb->io_registers[GB_IO_LY] == gb->io_registers[GB_IO_LYC]) { gb->io_registers[GB_IO_STAT] |= 4; - gb->stat_interrupt_line = true; + if (gb->io_registers[GB_IO_STAT] & 0x40) { + /* User requests LYC interrupt. */ + gb->stat_interrupt_line = true; + } } /* Todo: This behavior is seen in BGB and it fixes some ROMs with delicate timing, such as Hitman's 8bit.