GB: Fix reading ROM immediately after unmapping BIOS

This commit is contained in:
Vicki Pfau 2019-10-01 18:58:44 -07:00
parent c76f173880
commit 68af1131aa
2 changed files with 2 additions and 0 deletions

View File

@ -46,6 +46,7 @@ Other fixes:
- Shaders: Fix gba-color shader resolution (fixes mgba.io/i/1435)
- Qt: Fix LibraryController initialization (fixes mgba.io/i/1324)
- Switch: Fix audio when video rate desyncs (fixes mgba.io/i/1532)
- GB: Fix reading ROM immediately after unmapping BIOS
Misc:
- GBA Savedata: EEPROM performance fixes
- GBA Savedata: Automatically map 1Mbit Flash files as 1Mbit Flash

View File

@ -573,6 +573,7 @@ void GBUnmapBIOS(struct GB* gb) {
if (gb->memory.romBase < gb->memory.rom || gb->memory.romBase > &gb->memory.rom[gb->memory.romSize - 1]) {
free(gb->memory.romBase);
gb->memory.romBase = gb->memory.rom;
gb->cpu->memory.setActiveRegion(gb->cpu, gb->cpu->pc);
}
// XXX: Force AGB registers for AGB-mode
if (gb->model == GB_MODEL_AGB && gb->cpu->pc == 0x100) {