mirror of https://github.com/mgba-emu/mgba.git
GBA: Fix IRQs firing after already being cleared
This commit is contained in:
parent
f48bdb6a13
commit
507fe1aad3
1
CHANGES
1
CHANGES
|
@ -18,6 +18,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:
|
||||
- PSP2: Improved controller rumble
|
||||
- GB, GBA: Prevent loading null ROMs
|
||||
|
|
|
@ -666,7 +666,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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -536,6 +536,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