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 745b1c76b5
commit 2d2aaaf3a0
2 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,6 @@
0.9.4: (Future)
Emulation fixes:
- GB Serialize: Fix loading MBC1 states that affect bank 0 (fixes mgba.io/i/2402)
- GBA I/O: Disable open bus behavior on invalid register 06A
- GBA Video: Ignore horizontally off-screen sprite timing (fixes mgba.io/i/2391)
Other fixes:

View File

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