all repos — mgba @ 346f5dc0b53afa8ea1e11d8c94a0090b5d49abc9

mGBA Game Boy Advance Emulator

GBA Serialize: Fix alignment check when loading states
Vicki Pfau vi@endrift.com
Sun, 13 Dec 2020 15:02:08 -0800
commit

346f5dc0b53afa8ea1e11d8c94a0090b5d49abc9

parent

beba0cb2c59505d0905db8b0efe4a407b54b201c

2 files changed, 2 insertions(+), 1 deletions(-)

jump to
M CHANGESCHANGES

@@ -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.csrc/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;