diff --git a/src/arm/arm.c b/src/arm/arm.c index 37dfe726c..cb93136aa 100644 --- a/src/arm/arm.c +++ b/src/arm/arm.c @@ -234,6 +234,9 @@ void ARMRun(struct ARMCore* cpu) { } else { ARMStep(cpu); } + while (cpu->cycles >= cpu->nextEvent) { + cpu->irqh.processEvents(cpu); + } } void ARMRunLoop(struct ARMCore* cpu) { diff --git a/src/sm83/sm83.c b/src/sm83/sm83.c index 00163a20b..9f14ab341 100644 --- a/src/sm83/sm83.c +++ b/src/sm83/sm83.c @@ -181,6 +181,9 @@ void SM83Tick(struct SM83Core* cpu) { cpu->irqh.processEvents(cpu); } _SM83TickInternal(cpu); + while (cpu->cycles >= cpu->nextEvent) { + cpu->irqh.processEvents(cpu); + } } void SM83Run(struct SM83Core* cpu) {