Skip to content

Commit

Permalink
GBA BIOS: Fix reloading video registers after reset (fixes mgba-emu#1808
Browse files Browse the repository at this point in the history
)
  • Loading branch information
endrift authored and RetroEdit committed Aug 29, 2020
1 parent 2bb6b7d commit ae1fe1e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions src/gba/bios.c
Expand Up @@ -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]);
}
}
}

Expand Down

0 comments on commit ae1fe1e

Please sign in to comment.