ARM: Fix stepping when events are pending

This commit is contained in:
Vicki Pfau 2019-12-20 21:08:28 -08:00
parent 2cb5a08f4f
commit 780b4521cf
2 changed files with 4 additions and 3 deletions

View File

@ -89,6 +89,7 @@ Changes from beta 1:
Emulation fixes:
- ARM: Fix STR writeback pipeline stage
- ARM: Partially fix LDM/STM writeback with empty register list
- ARM: Fix stepping when events are pending
- GBA DMA: Fix case where DMAs could get misaligned (fixes mgba.io/i/1092)
- GBA Video: Fix OpenGL renderer 512x512 backgrounds (fixes mgba.io/i/1572)
- GBA Memory: Fix open bus from IWRAM (fixes mgba.io/i/1575)

View File

@ -276,14 +276,14 @@ static inline void ThumbStep(struct ARMCore* cpu) {
}
void ARMRun(struct ARMCore* cpu) {
while (cpu->cycles >= cpu->nextEvent) {
cpu->irqh.processEvents(cpu);
}
if (cpu->executionMode == MODE_THUMB) {
ThumbStep(cpu);
} else {
ARMStep(cpu);
}
if (cpu->cycles >= cpu->nextEvent) {
cpu->irqh.processEvents(cpu);
}
}
void ARMRunLoop(struct ARMCore* cpu) {