diff --git a/pcsx2/VU0micro.cpp b/pcsx2/VU0micro.cpp index 651ed8102d..3be6664d0b 100644 --- a/pcsx2/VU0micro.cpp +++ b/pcsx2/VU0micro.cpp @@ -42,6 +42,8 @@ void __fastcall vu0ExecMicro(u32 addr) { vu0Finish(); } + // Need to copy the clip flag back to the interpreter in case COP2 has edited it + VU0.clipflag = VU0.VI[REG_CLIP_FLAG].UL; VU0.VI[REG_VPU_STAT].UL &= ~0xFF; VU0.VI[REG_VPU_STAT].UL |= 0x01; VU0.cycle = cpuRegs.cycle; diff --git a/pcsx2/x86/microVU_Alloc.inl b/pcsx2/x86/microVU_Alloc.inl index 2c8a9d799d..fa65645b61 100644 --- a/pcsx2/x86/microVU_Alloc.inl +++ b/pcsx2/x86/microVU_Alloc.inl @@ -109,6 +109,14 @@ __fi void mVUallocCFLAGb(mV, const x32& reg, int fInstance) { if (fInstance < 4) xMOV(ptr32[&mVU.clipFlag[fInstance]], reg); // microVU else xMOV(ptr32[&mVU.regs().VI[REG_CLIP_FLAG].UL], reg); // macroVU + + // On COP2 modifying the CLIP flag we need to update the microVU version for when it's restored on new program + if (fInstance == 0xff) + { + xMOVDZX(xmmT1, reg); + xSHUF.PS(xmmT1, xmmT1, 0); + xMOVAPS(ptr128[&mVU.regs().micro_clipflags], xmmT1); + } } //------------------------------------------------------------------