Prevent bank switching when reloading CPU state
Jeffrey Pfau jeffrey@endrift.com
Mon, 20 Jan 2014 23:42:07 -0800
1 files changed,
1 insertions(+),
1 deletions(-)
jump to
M
src/gba/gba-serialize.c
→
src/gba/gba-serialize.c
@@ -51,7 +51,7 @@ gba->cpu.nextEvent = state->cpu.nextEvent;
memcpy(gba->cpu.bankedRegisters, state->cpu.bankedRegisters, 6 * 7 * sizeof(int32_t)); memcpy(gba->cpu.bankedSPSRs, state->cpu.bankedSPSRs, 6 * sizeof(int32_t)); gba->cpu.executionMode = gba->cpu.cpsr.t ? MODE_THUMB : MODE_ARM; - ARMSetPrivilegeMode(&gba->cpu, gba->cpu.cpsr.priv); + gba->cpu.privilegeMode = gba->cpu.cpsr.priv; gba->cpu.memory->setActiveRegion(gba->cpu.memory, gba->cpu.gprs[ARM_PC]); GBAMemoryDeserialize(&gba->memory, state);