diff --git a/CHANGES b/CHANGES index 1122b4a6a..f4b19be89 100644 --- a/CHANGES +++ b/CHANGES @@ -9,6 +9,7 @@ Bugfixes: - 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: diff --git a/src/arm/arm.c b/src/arm/arm.c index 05cb65eef..b75274aa3 100644 --- a/src/arm/arm.c +++ b/src/arm/arm.c @@ -164,10 +164,10 @@ void ARMRaiseIRQ(struct ARMCore* cpu) { 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 @@ void ARMRaiseSWI(struct ARMCore* cpu) { 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) {