X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=libpcsxcore%2Fr3000a.c;h=ba33548dde47e681dda0a2ddd1d6a1cf4c14f8c1;hp=f92edb729fab2a180ab512de7aa6e2f28a4d083c;hb=9f8b032dc5074e29f2e93ce06651f6da3bb70a86;hpb=7de557a6f7b032bd5bb5e0e5c8a6539b856d9c20 diff --git a/libpcsxcore/r3000a.c b/libpcsxcore/r3000a.c index f92edb72..ba33548d 100644 --- a/libpcsxcore/r3000a.c +++ b/libpcsxcore/r3000a.c @@ -163,6 +163,18 @@ void psxBranchTest() { 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_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)) {