GBA Serialize: Fix alignment check when loading states
Vicki Pfau vi@endrift.com
Sun, 13 Dec 2020 15:02:08 -0800
2 files changed,
2 insertions(+),
1 deletions(-)
M
CHANGES
→
CHANGES
@@ -44,6 +44,7 @@ - GBA Memory: Stall on VRAM access in mode 2 (fixes mgba.io/i/190)
- GBA Memory: Improve robustness of Matrix memory support - GBA Memory: Mark Famicom Mini games 22 through 28 as non-mirroring - GBA Memory: Return correct byte for odd ROM open bus addresses + - GBA Serialize: Fix alignment check when loading states - GBA SIO: Fix copying Normal mode transfer values - GBA SIO: Fix Normal mode being totally broken (fixes mgba.io/i/1800) - GBA SIO: Fix deseralizing SIO registers
M
src/gba/serialize.c
→
src/gba/serialize.c
@@ -154,7 +154,7 @@ }
LOAD_32(gba->cpu->bankedSPSRs[i], i * sizeof(gba->cpu->bankedSPSRs[0]), state->cpu.bankedSPSRs); } gba->cpu->privilegeMode = gba->cpu->cpsr.priv; - uint32_t pcMask = (gba->cpu->executionMode == MODE_THUMB ? WORD_SIZE_THUMB : WORD_SIZE_ARM) - 1; + uint32_t pcMask = (gba->cpu->cpsr.t ? WORD_SIZE_THUMB : WORD_SIZE_ARM) - 1; if (gba->cpu->gprs[ARM_PC] & pcMask) { mLOG(GBA_STATE, WARN, "Savestate has unaligned PC and is probably corrupted"); gba->cpu->gprs[ARM_PC] &= ~pcMask;