mirror of
https://github.com/libretro/bsnes-libretro.git
synced 2024-11-26 18:40:47 +00:00
Fixed a bug that prevented STAT interrupt blocking from functioning correctly in the transition to VBlank while the OAM interrupt was disabled
This commit is contained in:
parent
7a6ae2d951
commit
339613263c
@ -1305,10 +1305,9 @@ abort_fetching_object:
|
||||
gb->io_registers[GB_IO_LY] = gb->current_line;
|
||||
gb->ly_for_comparison = -1;
|
||||
GB_SLEEP(gb, display, 26, 2);
|
||||
if (gb->current_line == LINES) {
|
||||
gb->mode_for_interrupt = 2;
|
||||
if (gb->current_line == LINES && !gb->stat_interrupt_line && (gb->io_registers[GB_IO_STAT] & 0x20)) {
|
||||
gb->io_registers[GB_IO_IF] |= 2;
|
||||
}
|
||||
GB_STAT_update(gb);
|
||||
GB_SLEEP(gb, display, 12, 2);
|
||||
gb->ly_for_comparison = gb->current_line;
|
||||
|
||||
@ -1317,8 +1316,9 @@ abort_fetching_object:
|
||||
gb->io_registers[GB_IO_STAT] &= ~3;
|
||||
gb->io_registers[GB_IO_STAT] |= 1;
|
||||
gb->io_registers[GB_IO_IF] |= 1;
|
||||
gb->mode_for_interrupt = 2;
|
||||
GB_STAT_update(gb);
|
||||
if (!gb->stat_interrupt_line && (gb->io_registers[GB_IO_STAT] & 0x20)) {
|
||||
gb->io_registers[GB_IO_IF] |= 2;
|
||||
}
|
||||
gb->mode_for_interrupt = 1;
|
||||
GB_STAT_update(gb);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user