GB Serialize: Fix loading MBC1 states that affect bank 0 (fixes #2402)

This commit is contained in:
Vicki Pfau 2022-01-22 18:11:28 -08:00
parent 6f4398a3b9
commit 1d8141e1fd
2 changed files with 2 additions and 1 deletions

View File

@ -14,6 +14,7 @@ Features:
Emulation fixes: Emulation fixes:
- ARM7: Fix unsigned multiply timing - ARM7: Fix unsigned multiply timing
- GB Memory: Add cursory cartridge open bus emulation (fixes mgba.io/i/2032) - GB Memory: Add cursory cartridge open bus emulation (fixes mgba.io/i/2032)
- GB Serialize: Fix loading MBC1 states that affect bank 0 (fixes mgba.io/i/2402)
- GB Video: Draw SGB border pieces that overlap GB graphics (fixes mgba.io/i/1339) - GB Video: Draw SGB border pieces that overlap GB graphics (fixes mgba.io/i/1339)
- GBA: Improve timing when not booting from BIOS - GBA: Improve timing when not booting from BIOS
- GBA BIOS: Work around IRQ handling hiccup in Mario & Luigi (fixes mgba.io/i/1059) - GBA BIOS: Work around IRQ handling hiccup in Mario & Luigi (fixes mgba.io/i/1059)

View File

@ -820,7 +820,7 @@ void GBMemoryDeserialize(struct GB* gb, const struct GBSerializedState* state) {
memory->mbcState.mbc1.bankHi = memory->currentBank >> memory->mbcState.mbc1.multicartStride; memory->mbcState.mbc1.bankHi = memory->currentBank >> memory->mbcState.mbc1.multicartStride;
} }
if (memory->mbcState.mbc1.mode) { if (memory->mbcState.mbc1.mode) {
GBMBCSwitchBank0(gb, memory->mbcState.mbc1.bankHi); GBMBCSwitchBank0(gb, memory->mbcState.mbc1.bankHi << memory->mbcState.mbc1.multicartStride);
} }
break; break;
case GB_MBC3_RTC: case GB_MBC3_RTC: