diff --git a/CHANGES b/CHANGES index becdd5edd..8147d2c1f 100644 --- a/CHANGES +++ b/CHANGES @@ -29,6 +29,7 @@ Bugfixes: - GBA Video: Fix broken sprite blending hack (fixes mgba.io/i/532) - GBA I/O: Fix reading from a few invalid I/O registers (fixes mgba.io/i/876) - GBA Savedata: Fix size of SRAM saves (fixes mgba.io/i/883) + - GB Video: Fix read mode when enabling LCD Misc: - Qt: Don't rebuild library view if style hasn't changed - SDL: Fix 2.0.5 build on macOS under some circumstances diff --git a/src/gb/video.c b/src/gb/video.c index dd0f5c2a3..ea879d5c8 100644 --- a/src/gb/video.c +++ b/src/gb/video.c @@ -344,9 +344,8 @@ void GBVideoWriteLCDC(struct GBVideo* video, GBRegisterLCDC value) { video->ly = 0; video->p->memory.io[REG_LY] = 0; - // TODO: Does this read as 0 for 4 T-cycles? GBRegisterSTAT oldStat = video->stat; - video->stat = GBRegisterSTATSetMode(video->stat, 2); + video->stat = GBRegisterSTATSetMode(video->stat, 0); video->stat = GBRegisterSTATSetLYC(video->stat, video->ly == video->p->memory.io[REG_LYC]); if (!_statIRQAsserted(video, oldStat) && _statIRQAsserted(video, video->stat)) { video->p->memory.io[REG_IF] |= (1 << GB_IRQ_LCDSTAT);