mirror of https://github.com/mgba-emu/mgba.git
GB Video: Fix read mode when enabling LCD
This commit is contained in:
parent
a949fdfced
commit
431ee76c1a
1
CHANGES
1
CHANGES
|
@ -45,6 +45,7 @@ Bugfixes:
|
|||
- 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)
|
||||
|
|
|
@ -418,9 +418,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);
|
||||
|
|
Loading…
Reference in New Issue