From f4a364c3dbed9130402868321f561446986d8ac0 Mon Sep 17 00:00:00 2001 From: Lior Halphon Date: Tue, 21 Feb 2017 21:31:52 +0200 Subject: [PATCH] =?UTF-8?q?It=20seems=20like=20STAT=E2=80=99s=20LYC=20flag?= =?UTF-8?q?=20should=20be=20on=20while=20the=20screen=20is=20off.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Core/display.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Core/display.c b/Core/display.c index 76819da6..992ccdf7 100755 --- a/Core/display.c +++ b/Core/display.c @@ -318,9 +318,10 @@ static void update_display_state(GB_gameboy_t *gb, uint8_t cycles) /* LCD is disabled, do nothing */ /* When the LCD is off, LY is 0 and STAT mode is 0. - Todo: how is the LY=LYC flag handled? */ + Todo: Verify the LY=LYC flag should be on. */ gb->io_registers[GB_IO_LY] = 0; - gb->io_registers[GB_IO_STAT] &= ~7; + gb->io_registers[GB_IO_STAT] &= ~3; + gb->io_registers[GB_IO_STAT] |= 4; /* Keep sending vblanks to user even if the screen is off */ gb->display_cycles += cycles;