all repos — mgba @ c92add2a5ca5f3d152a9fdba67a8580e45c1ec82

mGBA Game Boy Advance Emulator

GBA: Fix IRQs firing after already being cleared
Jeffrey Pfau jeffrey@endrift.com
Sun, 06 Nov 2016 22:22:01 -0800
commit

c92add2a5ca5f3d152a9fdba67a8580e45c1ec82

parent

60974cf61b0da1056f19d1b2b2127017736186d8

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

jump to
M CHANGESCHANGES

@@ -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.csrc/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.csrc/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: