Fix stat_lyc_onoff

This commit is contained in:
Lior Halphon 2018-03-18 20:08:45 +02:00
parent 8b4714d8e2
commit 80b1275e07

View File

@ -311,11 +311,9 @@ static void update_display_state(GB_gameboy_t *gb, uint8_t cycles)
if (!(gb->io_registers[GB_IO_LCDC] & 0x80)) {
/* LCD is disabled, state is constant */
/* When the LCD is off, LY is 0 and STAT mode is 0.
Todo: Verify the LY=LYC flag should be on. */
/* When the LCD is off, LY is 0 and STAT mode is 0. */
gb->io_registers[GB_IO_LY] = 0;
gb->io_registers[GB_IO_STAT] &= ~3;
gb->io_registers[GB_IO_STAT] |= 4;
gb->effective_scx = gb->io_registers[GB_IO_SCX];
if (gb->hdma_on_hblank) {
gb->hdma_on_hblank = false;