From 155cf385bda43668ab3ebd7abf07940ed6047eef Mon Sep 17 00:00:00 2001 From: refractionpcsx2 Date: Fri, 18 Dec 2020 20:55:02 +0000 Subject: [PATCH] microVU: Flush running VU1 program when toggling MTVU on --- pcsx2/x86/microVU.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pcsx2/x86/microVU.cpp b/pcsx2/x86/microVU.cpp index bc1ff0b8b9..e2d9cee3e8 100644 --- a/pcsx2/x86/microVU.cpp +++ b/pcsx2/x86/microVU.cpp @@ -73,7 +73,15 @@ void mVUinit(microVU& mVU, uint vuIndex) { // Resets Rec Data void mVUreset(microVU& mVU, bool resetReserve) { - + if (THREAD_VU1) + { + // If MTVU is toggled on during gameplay we need to flush the running VU1 program, else it gets in a mess + if (VU0.VI[REG_VPU_STAT].UL & 0x100) + { + CpuVU1->Execute(vu1RunCycles); + } + VU0.VI[REG_VPU_STAT].UL &= ~0x100; + } // Restore reserve to uncommitted state if (resetReserve) mVU.cache_reserve->Reset();