X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=libpcsxcore%2Fr3000a.c;h=98aff3a385af2efd974c128cb31514571780899b;hp=ba33548dde47e681dda0a2ddd1d6a1cf4c14f8c1;hb=c24732c066beea96215e4c232af6debf1deb5f69;hpb=9f8b032dc5074e29f2e93ce06651f6da3bb70a86 diff --git a/libpcsxcore/r3000a.c b/libpcsxcore/r3000a.c index ba33548d..98aff3a3 100644 --- a/libpcsxcore/r3000a.c +++ b/libpcsxcore/r3000a.c @@ -48,8 +48,6 @@ int psxInit() { } void psxReset() { - psxCpu->Reset(); - psxMemReset(); memset(&psxRegs, 0, sizeof(psxRegs)); @@ -59,6 +57,8 @@ void psxReset() { psxRegs.CP0.r[12] = 0x10900000; // COP0 enabled | BEV = 1 | TS = 1 psxRegs.CP0.r[15] = 0x00000002; // PRevID = Revision ID, same as R3000A + psxCpu->Reset(); + psxHwReset(); psxBiosInit(); @@ -169,6 +169,12 @@ void psxBranchTest() { 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);