all repos — mgba @ 3c100a5e310f6031fb156cd8d9da262d6d1da663

mGBA Game Boy Advance Emulator

Prevent bank switching when reloading CPU state
Jeffrey Pfau jeffrey@endrift.com
Mon, 20 Jan 2014 23:42:07 -0800
commit

3c100a5e310f6031fb156cd8d9da262d6d1da663

parent

98c8b42b0f2aa63f61dfb27d2a68bc437028b280

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

jump to
M src/gba/gba-serialize.csrc/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);