mirror of https://github.com/mgba-emu/mgba.git
GBA I/O: Fix IRQ register write checks (fixes #1335)
This commit is contained in:
parent
f9ff88302f
commit
f9b12a8612
|
@ -548,16 +548,16 @@ void GBAIOWrite(struct GBA* gba, uint32_t address, uint16_t value) {
|
|||
break;
|
||||
case REG_IE:
|
||||
gba->memory.io[REG_IE >> 1] = value;
|
||||
GBATestIRQ(gba->cpu, 1);
|
||||
GBATestIRQ(gba, 1);
|
||||
return;
|
||||
case REG_IF:
|
||||
value = gba->memory.io[REG_IF >> 1] & ~value;
|
||||
gba->memory.io[REG_IF >> 1] = value;
|
||||
GBATestIRQ(gba->cpu, 1);
|
||||
GBATestIRQ(gba, 1);
|
||||
return;
|
||||
case REG_IME:
|
||||
gba->memory.io[REG_IME >> 1] = value;
|
||||
GBATestIRQ(gba->cpu, 1);
|
||||
GBATestIRQ(gba, 1);
|
||||
return;
|
||||
case REG_MAX:
|
||||
// Some bad interrupt libraries will write to this
|
||||
|
|
Loading…
Reference in New Issue