GBA BIOS: Fix reloading video registers after reset (fixes #1808)

This commit is contained in:
Vicki Pfau 2020-06-24 18:09:07 -07:00
parent aab6231b68
commit f6782850bd
2 changed files with 6 additions and 0 deletions

View File

@ -3,6 +3,7 @@ Emulation fixes:
- GB Memory: Fix OAM DMA from top 8 kB
- GB MBC: Fix MBC1 RAM enable bit selection
- GB MBC: Fix MBC2 bit selection
- GBA BIOS: Fix reloading video registers after reset (fixes mgba.io/i/1808)
Other fixes:
- All: Correct format strings for some numbers on Windows (fixes mgba.io/i/1794)
- GB Core: Fix extracting SRAM when none is present

View File

@ -179,6 +179,11 @@ static void _RegisterRamReset(struct GBA* gba) {
}
if (registers & 0x9C) {
gba->video.renderer->reset(gba->video.renderer);
gba->video.renderer->writeVideoRegister(gba->video.renderer, REG_DISPCNT, gba->memory.io[REG_DISPCNT >> 1]);
int i;
for (i = REG_BG0CNT; i < REG_SOUND1CNT_LO; i += 2) {
gba->video.renderer->writeVideoRegister(gba->video.renderer, i, gba->memory.io[i >> 1]);
}
}
}