ARM: Fix stepping when events are pending
Vicki Pfau vi@endrift.com
Fri, 20 Dec 2019 21:08:28 -0800
2 files changed,
4 insertions(+),
3 deletions(-)
M
CHANGES
→
CHANGES
@@ -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)
M
src/arm/arm.c
→
src/arm/arm.c
@@ -276,13 +276,13 @@ instruction(cpu, opcode);
} 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); } }