update mdec code to pcsxr-svn Nov 26
[pcsx_rearmed.git] / libpcsxcore / r3000a.c
index 27c247b..148bc26 100644 (file)
@@ -151,6 +151,12 @@ void psxBranchTest() {
                                spuInterrupt();
                        }
                }
+               if (psxRegs.interrupt & (1 << PSXINT_MDECINDMA)) { // mdec in
+                       if ((psxRegs.cycle - psxRegs.intCycle[PSXINT_MDECINDMA].sCycle) >= psxRegs.intCycle[PSXINT_MDECINDMA].cycle) {
+                               psxRegs.interrupt &= ~(1 << PSXINT_MDECINDMA);
+                               mdec0Interrupt();
+                       }
+               }
        }
 
        if (psxHu32(0x1070) & psxHu32(0x1074)) {