GB Video: Fix read mode when enabling LCD
Vicki Pfau vi@endrift.com
Tue, 26 Sep 2017 16:24:58 -0700
2 files changed,
2 insertions(+),
2 deletions(-)
M
CHANGES
→
CHANGES
@@ -45,6 +45,7 @@ - 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: Revamp IRQ handling based on new information + - GB Video: Fix read mode when enabling LCD Misc: - GBA Timer: Use global cycles for timers - GBA: Extend oddly-sized ROMs to full address space (fixes mgba.io/i/722)
M
src/gb/video.c
→
src/gb/video.c
@@ -418,9 +418,8 @@ mTimingSchedule(&video->p->timing, &video->modeEvent, next << video->p->doubleSpeed);
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);