From 4b0dc9c0df6ec0105f750f606701aeb50956b9c3 Mon Sep 17 00:00:00 2001 From: refractionpcsx2 Date: Mon, 26 Oct 2020 01:47:13 +0000 Subject: [PATCH] microVU: properly normalise Status flags when exiting a VU program Fixes shadows in Ratchet Gladiator --- pcsx2/x86/microVU_Branch.inl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pcsx2/x86/microVU_Branch.inl b/pcsx2/x86/microVU_Branch.inl index c79c10cd3d..f6258d1cae 100644 --- a/pcsx2/x86/microVU_Branch.inl +++ b/pcsx2/x86/microVU_Branch.inl @@ -71,7 +71,8 @@ void mVUDTendProgram(mV, microFlagCycles* mFC, int isEbit) { } // Save MAC, Status and CLIP Flag Instances - xMOV(ptr32[&mVU.regs().VI[REG_STATUS_FLAG].UL], getFlagReg(fStatus)); + mVUallocSFLAGc(gprT1, gprT2, fStatus); + xMOV(ptr32[&mVU.regs().VI[REG_STATUS_FLAG].UL], gprT1); mVUallocMFLAGa(mVU, gprT1, fMac); mVUallocCFLAGa(mVU, gprT2, fClip); xMOV(ptr32[&mVU.regs().VI[REG_MAC_FLAG].UL], gprT1); @@ -170,7 +171,8 @@ void mVUendProgram(mV, microFlagCycles* mFC, int isEbit) { } // Save MAC, Status and CLIP Flag Instances - xMOV(ptr32[&mVU.regs().VI[REG_STATUS_FLAG].UL], getFlagReg(fStatus)); + mVUallocSFLAGc(gprT1, gprT2, fStatus); + xMOV(ptr32[&mVU.regs().VI[REG_STATUS_FLAG].UL], gprT1); mVUallocMFLAGa(mVU, gprT1, fMac); mVUallocCFLAGa(mVU, gprT2, fClip); xMOV(ptr32[&mVU.regs().VI[REG_MAC_FLAG].UL], gprT1);