mirror of https://github.com/mgba-emu/mgba.git
GB Video: Changing LYC while LCDC off doesn't affect STAT (fixes #1224)
This commit is contained in:
parent
741ac61baa
commit
38bad71e11
1
CHANGES
1
CHANGES
|
@ -138,6 +138,7 @@ Bugfixes:
|
||||||
- Core: Remember to deinit proxy ring FIFO
|
- Core: Remember to deinit proxy ring FIFO
|
||||||
- GBA Savedata: Fix EEPROM writing codepath when savetype is not EEPROM
|
- GBA Savedata: Fix EEPROM writing codepath when savetype is not EEPROM
|
||||||
- Core: Reroot timing list when (de)scheduling
|
- Core: Reroot timing list when (de)scheduling
|
||||||
|
- GB Video: Changing LYC while LCDC off doesn't affect STAT (fixes mgba.io/i/1224)
|
||||||
Misc:
|
Misc:
|
||||||
- mGUI: Add SGB border configuration option
|
- mGUI: Add SGB border configuration option
|
||||||
- mGUI: Add support for different settings types
|
- mGUI: Add support for different settings types
|
||||||
|
|
|
@ -449,10 +449,12 @@ void GBVideoWriteSTAT(struct GBVideo* video, GBRegisterSTAT value) {
|
||||||
|
|
||||||
void GBVideoWriteLYC(struct GBVideo* video, uint8_t value) {
|
void GBVideoWriteLYC(struct GBVideo* video, uint8_t value) {
|
||||||
GBRegisterSTAT oldStat = video->stat;
|
GBRegisterSTAT oldStat = video->stat;
|
||||||
video->stat = GBRegisterSTATSetLYC(video->stat, value == video->ly);
|
if (GBRegisterLCDCIsEnable(video->p->memory.io[REG_LCDC])) {
|
||||||
if (!_statIRQAsserted(video, oldStat) && _statIRQAsserted(video, video->stat)) {
|
video->stat = GBRegisterSTATSetLYC(video->stat, value == video->ly);
|
||||||
video->p->memory.io[REG_IF] |= (1 << GB_IRQ_LCDSTAT);
|
if (!_statIRQAsserted(video, oldStat) && _statIRQAsserted(video, video->stat)) {
|
||||||
GBUpdateIRQs(video->p);
|
video->p->memory.io[REG_IF] |= (1 << GB_IRQ_LCDSTAT);
|
||||||
|
GBUpdateIRQs(video->p);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
video->p->memory.io[REG_STAT] = video->stat;
|
video->p->memory.io[REG_STAT] = video->stat;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue