GBA: Fix IRQs firing after already being cleared
Jeffrey Pfau jeffrey@endrift.com
Sun, 06 Nov 2016 22:22:01 -0800
3 files changed,
3 insertions(+),
1 deletions(-)
M
CHANGES
→
CHANGES
@@ -28,6 +28,7 @@ - GBA Memory: Improve initial skipped BIOS state
- Qt: Only reset window dimensions when first shown - GB Memory: Fix starting HDMAs during mode 0 - Qt: Fix Qt Multimedia audio driver on big endian + - GBA: Fix IRQs firing after already being cleared Misc: - SDL: Remove scancode key input - GBA Video: Clean up unused timers
M
src/gba/gba.c
→
src/gba/gba.c
@@ -674,7 +674,7 @@
void GBATestIRQ(struct ARMCore* cpu) { struct GBA* gba = (struct GBA*) cpu->master; if (gba->memory.io[REG_IME >> 1] && gba->memory.io[REG_IE >> 1] & gba->memory.io[REG_IF >> 1]) { - gba->springIRQ = 1; + gba->springIRQ = gba->memory.io[REG_IE >> 1] & gba->memory.io[REG_IF >> 1]; gba->cpu->nextEvent = gba->cpu->cycles; } }
M
src/gba/io.c
→
src/gba/io.c
@@ -541,6 +541,7 @@ case REG_IE:
GBAWriteIE(gba, value); break; case REG_IF: + gba->springIRQ &= ~value; value = gba->memory.io[REG_IF >> 1] & ~value; break; case REG_IME: