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
|
||||
- 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
|
||||
|
|
|
@ -674,7 +674,7 @@ void GBARaiseIRQ(struct GBA* gba, enum GBAIRQ irq) {
|
|||
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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -541,6 +541,7 @@ void GBAIOWrite(struct GBA* gba, uint32_t address, uint16_t value) {
|
|||
GBAWriteIE(gba, value);
|
||||
break;
|
||||
case REG_IF:
|
||||
gba->springIRQ &= ~value;
|
||||
value = gba->memory.io[REG_IF >> 1] & ~value;
|
||||
break;
|
||||
case REG_IME:
|
||||
|
|
Loading…
Reference in New Issue