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 354213515a
commit bbf5a61933
2 changed files with 6 additions and 0 deletions

View File

@ -14,6 +14,7 @@ Emulation fixes:
- GBA: Fix timing advancing too quickly in rare cases
- GBA BIOS: Implement dummy sound driver calls
- GBA BIOS: Improve HLE BIOS timing
- GBA BIOS: Fix reloading video registers after reset (fixes mgba.io/i/1808)
- GBA DMA: Linger last DMA on bus (fixes mgba.io/i/301 and mgba.io/i/1320)
- GBA Memory: Improve gamepak prefetch timing
- GBA SIO: Fix copying Normal mode transfer values

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]);
}
}
}