From 9417996e7a65816eb815a3d9e962ad0dafcd94db Mon Sep 17 00:00:00 2001 From: lightningterror <18107717+lightningterror@users.noreply.github.com> Date: Fri, 22 Nov 2024 21:04:58 +0100 Subject: [PATCH 1/2] Vif: Rename/remove new prefix from files. --- pcsx2/CMakeLists.txt | 10 +++++----- pcsx2/Vif_Dynarec.h | 2 +- pcsx2/arm64/{newVif_Dynarec.cpp => Vif_Dynarec.cpp} | 2 +- .../{newVif_UnpackNEON.cpp => Vif_UnpackNEON.cpp} | 2 +- .../arm64/{newVif_UnpackNEON.h => Vif_UnpackNEON.h} | 0 pcsx2/pcsx2.vcxproj | 12 ++++++------ pcsx2/pcsx2.vcxproj.filters | 12 ++++++------ pcsx2/x86/{newVif_Dynarec.cpp => Vif_Dynarec.cpp} | 2 +- .../x86/{newVif_UnpackSSE.cpp => Vif_UnpackSSE.cpp} | 2 +- pcsx2/x86/{newVif_UnpackSSE.h => Vif_UnpackSSE.h} | 0 10 files changed, 22 insertions(+), 22 deletions(-) rename pcsx2/arm64/{newVif_Dynarec.cpp => Vif_Dynarec.cpp} (99%) rename pcsx2/arm64/{newVif_UnpackNEON.cpp => Vif_UnpackNEON.cpp} (99%) rename pcsx2/arm64/{newVif_UnpackNEON.h => Vif_UnpackNEON.h} (100%) rename pcsx2/x86/{newVif_Dynarec.cpp => Vif_Dynarec.cpp} (99%) rename pcsx2/x86/{newVif_UnpackSSE.cpp => Vif_UnpackSSE.cpp} (99%) rename pcsx2/x86/{newVif_UnpackSSE.h => Vif_UnpackSSE.h} (100%) diff --git a/pcsx2/CMakeLists.txt b/pcsx2/CMakeLists.txt index d2f6be2f3a7e7..d99c68fb27ef5 100644 --- a/pcsx2/CMakeLists.txt +++ b/pcsx2/CMakeLists.txt @@ -990,8 +990,8 @@ set(pcsx2x86Sources x86/ix86-32/iR5900Shift.cpp x86/ix86-32/iR5900Templates.cpp x86/ix86-32/recVTLB.cpp - x86/newVif_Dynarec.cpp - x86/newVif_UnpackSSE.cpp + x86/Vif_Dynarec.cpp + x86/Vif_UnpackSSE.cpp ) # x86 headers @@ -1031,15 +1031,15 @@ set(pcsx2x86Headers x86/microVU_Tables.inl x86/microVU_Upper.inl x86/newVif.h - x86/newVif_UnpackSSE.h + x86/Vif_UnpackSSE.h x86/R5900_Profiler.h ) # ARM64 set(pcsx2arm64Sources arm64/AsmHelpers.cpp - arm64/newVif_Dynarec.cpp - arm64/newVif_UnpackNEON.cpp + arm64/Vif_Dynarec.cpp + arm64/Vif_UnpackNEON.cpp arm64/RecStubs.cpp ) diff --git a/pcsx2/Vif_Dynarec.h b/pcsx2/Vif_Dynarec.h index a18c7070b3505..33e4fb4f2700a 100644 --- a/pcsx2/Vif_Dynarec.h +++ b/pcsx2/Vif_Dynarec.h @@ -43,4 +43,4 @@ alignas(16) extern nVifStruct nVif[2]; alignas(16) extern nVifCall nVifUpk[(2 * 2 * 16) * 4]; // ([USN][Masking][Unpack Type]) [curCycle] alignas(16) extern u32 nVifMask[3][4][4]; // [MaskNumber][CycleNumber][Vector] -static constexpr bool newVifDynaRec = 1; // Use code in newVif_Dynarec.inl +static constexpr bool newVifDynaRec = 1; // Use code in Vif_Dynarec.inl diff --git a/pcsx2/arm64/newVif_Dynarec.cpp b/pcsx2/arm64/Vif_Dynarec.cpp similarity index 99% rename from pcsx2/arm64/newVif_Dynarec.cpp rename to pcsx2/arm64/Vif_Dynarec.cpp index eb68520da4e7f..ef620bd1d2e19 100644 --- a/pcsx2/arm64/newVif_Dynarec.cpp +++ b/pcsx2/arm64/Vif_Dynarec.cpp @@ -1,7 +1,7 @@ // SPDX-FileCopyrightText: 2002-2024 PCSX2 Dev Team // SPDX-License-Identifier: GPL-3.0 -#include "arm64/newVif_UnpackNEON.h" +#include "arm64/Vif_UnpackNEON.h" #include "arm64/AsmHelpers.h" #include "MTVU.h" diff --git a/pcsx2/arm64/newVif_UnpackNEON.cpp b/pcsx2/arm64/Vif_UnpackNEON.cpp similarity index 99% rename from pcsx2/arm64/newVif_UnpackNEON.cpp rename to pcsx2/arm64/Vif_UnpackNEON.cpp index 9b84df6c30c9c..f4ca4465fbfb6 100644 --- a/pcsx2/arm64/newVif_UnpackNEON.cpp +++ b/pcsx2/arm64/Vif_UnpackNEON.cpp @@ -1,7 +1,7 @@ // SPDX-FileCopyrightText: 2002-2024 PCSX2 Dev Team // SPDX-License-Identifier: GPL-3.0 -#include "newVif_UnpackNEON.h" +#include "Vif_UnpackNEON.h" #include "common/Perf.h" namespace a64 = vixl::aarch64; diff --git a/pcsx2/arm64/newVif_UnpackNEON.h b/pcsx2/arm64/Vif_UnpackNEON.h similarity index 100% rename from pcsx2/arm64/newVif_UnpackNEON.h rename to pcsx2/arm64/Vif_UnpackNEON.h diff --git a/pcsx2/pcsx2.vcxproj b/pcsx2/pcsx2.vcxproj index c7f68793cf98d..1d2efe083b393 100644 --- a/pcsx2/pcsx2.vcxproj +++ b/pcsx2/pcsx2.vcxproj @@ -117,10 +117,10 @@ true - + true - + true @@ -457,10 +457,10 @@ - + true - + true @@ -579,7 +579,7 @@ true - + true @@ -898,7 +898,7 @@ - + diff --git a/pcsx2/pcsx2.vcxproj.filters b/pcsx2/pcsx2.vcxproj.filters index 51782a5fcf9d6..e72297d4b7e04 100644 --- a/pcsx2/pcsx2.vcxproj.filters +++ b/pcsx2/pcsx2.vcxproj.filters @@ -521,10 +521,10 @@ System\Ps2\EmotionEngine\DMAC\Vif\Unpack - + System\Ps2\EmotionEngine\DMAC\Vif\Unpack\newVif\Dynarec - + System\Ps2\EmotionEngine\DMAC\Vif\Unpack\newVif\Dynarec @@ -1425,10 +1425,10 @@ System\Ps2\GS\Renderers\Software - + System\Ps2\EmotionEngine\DMAC\Vif\Unpack\newVif\Dynarec\arm64 - + System\Ps2\EmotionEngine\DMAC\Vif\Unpack\newVif\Dynarec\arm64 @@ -1532,7 +1532,7 @@ System\Ps2\EmotionEngine\DMAC\Vif\Unpack\newVif - + System\Ps2\EmotionEngine\DMAC\Vif\Unpack\newVif\Dynarec @@ -2387,7 +2387,7 @@ System\Ps2\GS - + System\Ps2\EmotionEngine\DMAC\Vif\Unpack\newVif\Dynarec\arm64 diff --git a/pcsx2/x86/newVif_Dynarec.cpp b/pcsx2/x86/Vif_Dynarec.cpp similarity index 99% rename from pcsx2/x86/newVif_Dynarec.cpp rename to pcsx2/x86/Vif_Dynarec.cpp index ed8e548538912..e1ecc729dc9ef 100644 --- a/pcsx2/x86/newVif_Dynarec.cpp +++ b/pcsx2/x86/Vif_Dynarec.cpp @@ -1,7 +1,7 @@ // SPDX-FileCopyrightText: 2002-2024 PCSX2 Dev Team // SPDX-License-Identifier: GPL-3.0+ -#include "newVif_UnpackSSE.h" +#include "Vif_UnpackSSE.h" #include "MTVU.h" #include "common/Perf.h" #include "common/StringUtil.h" diff --git a/pcsx2/x86/newVif_UnpackSSE.cpp b/pcsx2/x86/Vif_UnpackSSE.cpp similarity index 99% rename from pcsx2/x86/newVif_UnpackSSE.cpp rename to pcsx2/x86/Vif_UnpackSSE.cpp index 68b52ce997da7..f5fab2ec831e7 100644 --- a/pcsx2/x86/newVif_UnpackSSE.cpp +++ b/pcsx2/x86/Vif_UnpackSSE.cpp @@ -1,7 +1,7 @@ // SPDX-FileCopyrightText: 2002-2024 PCSX2 Dev Team // SPDX-License-Identifier: GPL-3.0+ -#include "newVif_UnpackSSE.h" +#include "Vif_UnpackSSE.h" #include "common/Perf.h" #include "fmt/core.h" diff --git a/pcsx2/x86/newVif_UnpackSSE.h b/pcsx2/x86/Vif_UnpackSSE.h similarity index 100% rename from pcsx2/x86/newVif_UnpackSSE.h rename to pcsx2/x86/Vif_UnpackSSE.h From 58c84ef68fc8275de4c88c039a8d7f3d2871966a Mon Sep 17 00:00:00 2001 From: lightningterror <18107717+lightningterror@users.noreply.github.com> Date: Fri, 22 Nov 2024 23:40:05 +0100 Subject: [PATCH 2/2] Vif: Replace some asserts with logs. The conditions need hardware testing. Use logs instead so the games don't crash and are still playable. --- pcsx2/arm64/Vif_Dynarec.cpp | 4 +++- pcsx2/arm64/Vif_UnpackNEON.cpp | 4 +++- pcsx2/x86/Vif_Dynarec.cpp | 4 +++- pcsx2/x86/Vif_UnpackSSE.cpp | 4 +++- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/pcsx2/arm64/Vif_Dynarec.cpp b/pcsx2/arm64/Vif_Dynarec.cpp index ef620bd1d2e19..5328b3adc7e33 100644 --- a/pcsx2/arm64/Vif_Dynarec.cpp +++ b/pcsx2/arm64/Vif_Dynarec.cpp @@ -367,7 +367,9 @@ void VifUnpackNEON_Dynarec::ModUnpack(int upknum, bool PostOp) case 3: case 7: case 11: - pxFailRel(fmt::format("Vpu/Vif - Invalid Unpack! [{}]", upknum).c_str()); + // TODO: Needs hardware testing. + // Dynasty Warriors 5: Empire - Player 2 chose a character menu. + Console.Warning("Vpu/Vif: Invalid Unpack %d", upknum); break; } } diff --git a/pcsx2/arm64/Vif_UnpackNEON.cpp b/pcsx2/arm64/Vif_UnpackNEON.cpp index f4ca4465fbfb6..25af5561dcdc7 100644 --- a/pcsx2/arm64/Vif_UnpackNEON.cpp +++ b/pcsx2/arm64/Vif_UnpackNEON.cpp @@ -345,7 +345,9 @@ void VifUnpackNEON_Base::xUnpack(int upknum) const case 3: case 7: case 11: - pxFailRel(fmt::format("Vpu/Vif - Invalid Unpack! [{}]", upknum).c_str()); + // TODO: Needs hardware testing. + // Dynasty Warriors 5: Empire - Player 2 chose a character menu. + Console.Warning("Vpu/Vif: Invalid Unpack %d", upknum); break; } } diff --git a/pcsx2/x86/Vif_Dynarec.cpp b/pcsx2/x86/Vif_Dynarec.cpp index e1ecc729dc9ef..2226e58dcba96 100644 --- a/pcsx2/x86/Vif_Dynarec.cpp +++ b/pcsx2/x86/Vif_Dynarec.cpp @@ -213,7 +213,9 @@ void VifUnpackSSE_Dynarec::ModUnpack(int upknum, bool PostOp) case 3: case 7: case 11: - pxFailRel(fmt::format("Vpu/Vif - Invalid Unpack! [{}]", upknum).c_str()); + // TODO: Needs hardware testing. + // Dynasty Warriors 5: Empire - Player 2 chose a character menu. + Console.Warning("Vpu/Vif: Invalid Unpack %d", upknum); break; } } diff --git a/pcsx2/x86/Vif_UnpackSSE.cpp b/pcsx2/x86/Vif_UnpackSSE.cpp index f5fab2ec831e7..a59e02dbc4003 100644 --- a/pcsx2/x86/Vif_UnpackSSE.cpp +++ b/pcsx2/x86/Vif_UnpackSSE.cpp @@ -308,7 +308,9 @@ void VifUnpackSSE_Base::xUnpack(int upknum) const case 3: case 7: case 11: - pxFailRel(fmt::format("Vpu/Vif - Invalid Unpack! [{}]", upknum).c_str()); + // TODO: Needs hardware testing. + // Dynasty Warriors 5: Empire - Player 2 chose a character menu. + Console.Warning("Vpu/Vif: Invalid Unpack %d", upknum); break; } }