Fixed a bug introduced by the last STAT fix. This restores GBVideoPlayer support.

This commit is contained in:
Lior Halphon 2016-06-10 17:29:49 +03:00
parent 759b497c07
commit ee7e58e44b
1 changed files with 4 additions and 1 deletions

View File

@ -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.