// Resets all PS2 cpu execution caches, which does not affect that actual PS2 state/condition. // This can be called at any time outside the context of a Cpu->Execute() block without // bad things happening (recompilers will slow down for a brief moment since rec code blocks // are dumped). // Use this method to reset the recs when important global pointers like the MTGS are re-assigned. void SysClearExecutionCache() { GetCpuProviders().ApplyConfig(); Cpu->Reset(); psxCpu->Reset(); // mVU's VU0 needs to be properly initialized for macro mode even if it's not used for micro mode! if (CHECK_EEREC) ((BaseVUmicroCPU*)GetCpuProviders().CpuProviders->microVU0)->Reset(); CpuVU0->Reset(); CpuVU1->Reset(); if (newVifDynaRec) { dVifReset(0); dVifReset(1); } }
void resetNewVif(int idx) { // Safety Reset : Reassign all VIF structure info, just in case the VU1 pointers have // changed for some reason. nVif[idx].idx = idx; nVif[idx].bSize = 0; memzero(nVif[idx].buffer); if (newVifDynaRec) dVifReset(idx); }