mirror of https://github.com/mgba-emu/mgba.git
ARM7: Fix SWI and IRQ timings
This commit is contained in:
parent
609a9c5aa0
commit
97479c4d00
1
CHANGES
1
CHANGES
|
@ -9,6 +9,7 @@ Bugfixes:
|
||||||
- Qt: Fix .deb dependencies
|
- Qt: Fix .deb dependencies
|
||||||
- GBA Audio: FIFOs should not poll DMAs that are not scheduled for audio
|
- GBA Audio: FIFOs should not poll DMAs that are not scheduled for audio
|
||||||
- Qt: Fix "QOpenGLContext::swapBuffers() called with non-exposed window" warning
|
- Qt: Fix "QOpenGLContext::swapBuffers() called with non-exposed window" warning
|
||||||
|
- ARM7: Fix SWI and IRQ timings
|
||||||
|
|
||||||
0.2.0: (2015-04-03)
|
0.2.0: (2015-04-03)
|
||||||
Features:
|
Features:
|
||||||
|
|
|
@ -164,10 +164,10 @@ void ARMRaiseIRQ(struct ARMCore* cpu) {
|
||||||
cpu->gprs[ARM_PC] = BASE_IRQ;
|
cpu->gprs[ARM_PC] = BASE_IRQ;
|
||||||
int currentCycles = 0;
|
int currentCycles = 0;
|
||||||
ARM_WRITE_PC;
|
ARM_WRITE_PC;
|
||||||
cpu->memory.setActiveRegion(cpu, cpu->gprs[ARM_PC]);
|
|
||||||
_ARMSetMode(cpu, MODE_ARM);
|
_ARMSetMode(cpu, MODE_ARM);
|
||||||
cpu->spsr = cpsr;
|
cpu->spsr = cpsr;
|
||||||
cpu->cpsr.i = 1;
|
cpu->cpsr.i = 1;
|
||||||
|
cpu->cycles += currentCycles;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ARMRaiseSWI(struct ARMCore* cpu) {
|
void ARMRaiseSWI(struct ARMCore* cpu) {
|
||||||
|
@ -184,10 +184,10 @@ void ARMRaiseSWI(struct ARMCore* cpu) {
|
||||||
cpu->gprs[ARM_PC] = BASE_SWI;
|
cpu->gprs[ARM_PC] = BASE_SWI;
|
||||||
int currentCycles = 0;
|
int currentCycles = 0;
|
||||||
ARM_WRITE_PC;
|
ARM_WRITE_PC;
|
||||||
cpu->memory.setActiveRegion(cpu, cpu->gprs[ARM_PC]);
|
|
||||||
_ARMSetMode(cpu, MODE_ARM);
|
_ARMSetMode(cpu, MODE_ARM);
|
||||||
cpu->spsr = cpsr;
|
cpu->spsr = cpsr;
|
||||||
cpu->cpsr.i = 1;
|
cpu->cpsr.i = 1;
|
||||||
|
cpu->cycles += currentCycles;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void ARMStep(struct ARMCore* cpu) {
|
static inline void ARMStep(struct ARMCore* cpu) {
|
||||||
|
|
Loading…
Reference in New Issue