X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=libpcsxcore%2Fr3000a.c;h=111810704d9a9197f831da4cca155cdb7d52d8ff;hb=eca6163f53a2df69d0c42caaa45b2e4432c47a1c;hp=f5996acf7723134617de5d8dec025eb98ee0f48e;hpb=48e74ef5e10804f8809fae397be4234e8bf613a7;p=pcsx_rearmed.git diff --git a/libpcsxcore/r3000a.c b/libpcsxcore/r3000a.c index f5996acf..11181070 100644 --- a/libpcsxcore/r3000a.c +++ b/libpcsxcore/r3000a.c @@ -30,9 +30,9 @@ R3000Acpu *psxCpu = NULL; psxRegisters psxRegs; int psxInit() { - SysPrintf(_("Running PCSX Version %s (%s).\n"), PACKAGE_VERSION, __DATE__); + SysPrintf(_("Running PCSX Version %s (%s).\n"), PCSX_VERSION, __DATE__); -#ifdef PSXREC +#if defined(NEW_DYNAREC) || defined(LIGHTREC) if (Config.Cpu == CPU_INTERPRETER) { psxCpu = &psxInt; } else psxCpu = &psxRec; @@ -50,7 +50,7 @@ int psxInit() { void psxReset() { psxMemReset(); - memset(&psxRegs, 0, sizeof(psxRegs)); + memset(&psxRegs, 0x00, sizeof(psxRegs)); psxRegs.pc = 0xbfc00000; // Start in bootstrap @@ -185,6 +185,12 @@ void psxBranchTest() { cdrLidSeekInterrupt(); } } + if (psxRegs.interrupt & (1 << PSXINT_SPU_UPDATE)) { // scheduled spu update + if ((psxRegs.cycle - psxRegs.intCycle[PSXINT_SPU_UPDATE].sCycle) >= psxRegs.intCycle[PSXINT_SPU_UPDATE].cycle) { + psxRegs.interrupt &= ~(1 << PSXINT_SPU_UPDATE); + spuUpdate(); + } + } } if (psxHu32(0x1070) & psxHu32(0x1074)) {