- if (psxHu32(0x1070) & psxHu32(0x1074)) {
- if ((psxRegs.CP0.n.Status & 0x401) == 0x401) {
-#ifdef PSXCPU_LOG
- PSXCPU_LOG("Interrupt: %x %x\n", psxHu32(0x1070), psxHu32(0x1074));
-#endif
-// SysPrintf("Interrupt (%x): %x %x\n", psxRegs.cycle, psxHu32(0x1070), psxHu32(0x1074));
- psxException(0x400, 0, &psxRegs.CP0);
- }
- }
+ psxRegs.CP0.n.Cause &= ~0x400;
+ if (psxHu32(0x1070) & psxHu32(0x1074))
+ psxRegs.CP0.n.Cause |= 0x400;
+ if (((psxRegs.CP0.n.Cause | 1) & psxRegs.CP0.n.SR & 0x401) == 0x401)
+ psxException(0, 0, &psxRegs.CP0);