all repos — mgba @ 4085b9cdc5cce9397c349573bd6fcf53a3bae8ec

mGBA Game Boy Advance Emulator

GBA: Only unhalt CPU if an IRQ actually fires
Jeffrey Pfau jeffrey@endrift.com
Thu, 08 Dec 2016 20:44:29 -0800
commit

4085b9cdc5cce9397c349573bd6fcf53a3bae8ec

parent

8aeafeb762457933797162fb41a538a728efa18a

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

jump to
M CHANGESCHANGES

@@ -33,6 +33,7 @@ - All: Fix fullscreen config option being ignored

- GBA BIOS: Implement BitUnPack - GBA: Add savegame override for Crash Bandicoot 2 - ARM7: PSR mode bits should not get sign extended + - GBA: Only unhalt CPU if an IRQ actually fires Misc: - SDL: Remove scancode key input - GBA Video: Clean up unused timers
M src/arm/arm.csrc/arm/arm.c

@@ -147,6 +147,7 @@ cpu->irqh.reset(cpu);

} void ARMRaiseIRQ(struct ARMCore* cpu) { + cpu->halted = 0; if (cpu->cpsr.i) { return; }
M src/gba/gba.csrc/gba/gba.c

@@ -664,7 +664,6 @@ }

void GBARaiseIRQ(struct GBA* gba, enum GBAIRQ irq) { gba->memory.io[REG_IF >> 1] |= 1 << irq; - gba->cpu->halted = 0; if (gba->memory.io[REG_IME >> 1] && (gba->memory.io[REG_IE >> 1] & 1 << irq)) { ARMRaiseIRQ(gba->cpu);