X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=libpcsxcore%2Fr3000a.c;h=1143b8100a44e66ebd9ffdade3fb7c6e64361725;hp=27c247bd3f3aa015833d5ac7905ab3aa274878e0;hb=97a238a64737245ec8977d0242059e90e0ac01fb;hpb=d28b54b1d1d161b3f3acc3299c43106a022451e6 diff --git a/libpcsxcore/r3000a.c b/libpcsxcore/r3000a.c index 27c247bd..1143b810 100644 --- a/libpcsxcore/r3000a.c +++ b/libpcsxcore/r3000a.c @@ -151,6 +151,36 @@ 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 (psxRegs.interrupt & (1 << PSXINT_GPUOTCDMA)) { // gpu otc + if ((psxRegs.cycle - psxRegs.intCycle[PSXINT_GPUOTCDMA].sCycle) >= psxRegs.intCycle[PSXINT_GPUOTCDMA].cycle) { + psxRegs.interrupt &= ~(1 << PSXINT_GPUOTCDMA); + gpuotcInterrupt(); + } + } + if (psxRegs.interrupt & (1 << PSXINT_CDRDMA)) { // cdrom + if ((psxRegs.cycle - psxRegs.intCycle[PSXINT_CDRDMA].sCycle) >= psxRegs.intCycle[PSXINT_CDRDMA].cycle) { + psxRegs.interrupt &= ~(1 << PSXINT_CDRDMA); + cdrDmaInterrupt(); + } + } + if (psxRegs.interrupt & (1 << PSXINT_CDRPLAY)) { // cdr play timing + if ((psxRegs.cycle - psxRegs.intCycle[PSXINT_CDRPLAY].sCycle) >= psxRegs.intCycle[PSXINT_CDRPLAY].cycle) { + psxRegs.interrupt &= ~(1 << PSXINT_CDRPLAY); + cdrPlayInterrupt(); + } + } + if (psxRegs.interrupt & (1 << PSXINT_CDRLID)) { // cdr lid states + if ((psxRegs.cycle - psxRegs.intCycle[PSXINT_CDRLID].sCycle) >= psxRegs.intCycle[PSXINT_CDRLID].cycle) { + psxRegs.interrupt &= ~(1 << PSXINT_CDRLID); + cdrLidSeekInterrupt(); + } + } } if (psxHu32(0x1070) & psxHu32(0x1074)) {