all repos — mgba @ 97479c4d00779f8f28fee7f5370ec2a466ffeb1f

mGBA Game Boy Advance Emulator

ARM7: Fix SWI and IRQ timings
Jeffrey Pfau jeffrey@endrift.com
Sun, 05 Apr 2015 18:06:31 -0700
commit

97479c4d00779f8f28fee7f5370ec2a466ffeb1f

parent

609a9c5aa0c52de980bb55c09fd24eb85fb064e5

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

jump to
M CHANGESCHANGES

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