all repos — mgba @ 18ac94be813b8155cccc0887eec5820736ee0da7

mGBA Game Boy Advance Emulator

GB Video: Fix read mode when enabling LCD
Vicki Pfau vi@endrift.com
Tue, 26 Sep 2017 16:24:58 -0700
commit

18ac94be813b8155cccc0887eec5820736ee0da7

parent

8ffc716249fc579f009fab120c013f44dfcabcfc

2 files changed, 2 insertions(+), 2 deletions(-)

jump to
M CHANGESCHANGES

@@ -29,6 +29,7 @@ - GBA: Fix keypad IRQs not firing when extra buttons are pressed

- 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
M src/gb/video.csrc/gb/video.c

@@ -344,9 +344,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);