mirror of https://github.com/mgba-emu/mgba.git
GBA: Fix IRQs firing after already being cleared
This commit is contained in:
parent
60974cf61b
commit
c92add2a5c
1
CHANGES
1
CHANGES
|
@ -28,6 +28,7 @@ Bugfixes:
|
||||||
- Qt: Only reset window dimensions when first shown
|
- Qt: Only reset window dimensions when first shown
|
||||||
- GB Memory: Fix starting HDMAs during mode 0
|
- GB Memory: Fix starting HDMAs during mode 0
|
||||||
- Qt: Fix Qt Multimedia audio driver on big endian
|
- Qt: Fix Qt Multimedia audio driver on big endian
|
||||||
|
- GBA: Fix IRQs firing after already being cleared
|
||||||
Misc:
|
Misc:
|
||||||
- SDL: Remove scancode key input
|
- SDL: Remove scancode key input
|
||||||
- GBA Video: Clean up unused timers
|
- GBA Video: Clean up unused timers
|
||||||
|
|
|
@ -674,7 +674,7 @@ void GBARaiseIRQ(struct GBA* gba, enum GBAIRQ irq) {
|
||||||
void GBATestIRQ(struct ARMCore* cpu) {
|
void GBATestIRQ(struct ARMCore* cpu) {
|
||||||
struct GBA* gba = (struct GBA*) cpu->master;
|
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]) {
|
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;
|
gba->cpu->nextEvent = gba->cpu->cycles;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -541,6 +541,7 @@ void GBAIOWrite(struct GBA* gba, uint32_t address, uint16_t value) {
|
||||||
GBAWriteIE(gba, value);
|
GBAWriteIE(gba, value);
|
||||||
break;
|
break;
|
||||||
case REG_IF:
|
case REG_IF:
|
||||||
|
gba->springIRQ &= ~value;
|
||||||
value = gba->memory.io[REG_IF >> 1] & ~value;
|
value = gba->memory.io[REG_IF >> 1] & ~value;
|
||||||
break;
|
break;
|
||||||
case REG_IME:
|
case REG_IME:
|
||||||
|
|
Loading…
Reference in New Issue