ARM7: Fix SWI and IRQ timings
Jeffrey Pfau jeffrey@endrift.com
Sun, 05 Apr 2015 18:06:31 -0700
2 files changed,
3 insertions(+),
2 deletions(-)
M
CHANGES
→
CHANGES
@@ -9,6 +9,7 @@ - Qt: Fix Display object leak when closing a window
- Qt: Fix .deb dependencies - GBA Audio: FIFOs should not poll DMAs that are not scheduled for audio - Qt: Fix "QOpenGLContext::swapBuffers() called with non-exposed window" warning + - ARM7: Fix SWI and IRQ timings 0.2.0: (2015-04-03) Features:
M
src/arm/arm.c
→
src/arm/arm.c
@@ -164,10 +164,10 @@ cpu->gprs[ARM_LR] = cpu->gprs[ARM_PC] - instructionWidth + WORD_SIZE_ARM;
cpu->gprs[ARM_PC] = BASE_IRQ; int currentCycles = 0; ARM_WRITE_PC; - cpu->memory.setActiveRegion(cpu, cpu->gprs[ARM_PC]); _ARMSetMode(cpu, MODE_ARM); cpu->spsr = cpsr; cpu->cpsr.i = 1; + cpu->cycles += currentCycles; } void ARMRaiseSWI(struct ARMCore* cpu) {@@ -184,10 +184,10 @@ cpu->gprs[ARM_LR] = cpu->gprs[ARM_PC] - instructionWidth;
cpu->gprs[ARM_PC] = BASE_SWI; int currentCycles = 0; ARM_WRITE_PC; - cpu->memory.setActiveRegion(cpu, cpu->gprs[ARM_PC]); _ARMSetMode(cpu, MODE_ARM); cpu->spsr = cpsr; cpu->cpsr.i = 1; + cpu->cycles += currentCycles; } static inline void ARMStep(struct ARMCore* cpu) {