Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vif: Rename some files and get rid of some asserts so the games are playable/don't crash #12028

Merged
merged 2 commits into from
Nov 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions pcsx2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
)

Expand Down
2 changes: 1 addition & 1 deletion pcsx2/Vif_Dynarec.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -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"

Expand Down Expand Up @@ -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;
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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;
}
}
Expand Down
File renamed without changes.
12 changes: 6 additions & 6 deletions pcsx2/pcsx2.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,10 @@
<ClCompile Include="arm64\AsmHelpers.cpp">
<ExcludedFromBuild Condition="'$(Platform)'!='ARM64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="arm64\newVif_Dynarec.cpp">
<ClCompile Include="arm64\Vif_Dynarec.cpp">
<ExcludedFromBuild Condition="'$(Platform)'!='ARM64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="arm64\newVif_UnpackNEON.cpp">
<ClCompile Include="arm64\Vif_UnpackNEON.cpp">
<ExcludedFromBuild Condition="'$(Platform)'!='ARM64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="arm64\RecStubs.cpp">
Expand Down Expand Up @@ -457,10 +457,10 @@
<ClCompile Include="Vif_Codes.cpp" />
<ClCompile Include="Vif_Transfer.cpp" />
<ClCompile Include="Vif_Unpack.cpp" />
<ClCompile Include="x86\newVif_Dynarec.cpp">
<ClCompile Include="x86\Vif_Dynarec.cpp">
<ExcludedFromBuild Condition="'$(Platform)'!='x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="x86\newVif_UnpackSSE.cpp">
<ClCompile Include="x86\Vif_UnpackSSE.cpp">
<ExcludedFromBuild Condition="'$(Platform)'!='x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="SPR.cpp" />
Expand Down Expand Up @@ -579,7 +579,7 @@
<ClInclude Include="arm64\AsmHelpers.h">
<ExcludedFromBuild Condition="'$(Platform)'!='ARM64'">true</ExcludedFromBuild>
</ClInclude>
<ClInclude Include="arm64\newVif_UnpackNEON.h">
<ClInclude Include="arm64\Vif_UnpackNEON.h">
<ExcludedFromBuild Condition="'$(Platform)'!='ARM64'">true</ExcludedFromBuild>
</ClInclude>
<ClInclude Include="CDVD\BlockdumpFileReader.h" />
Expand Down Expand Up @@ -898,7 +898,7 @@
<ClInclude Include="Vif_Dma.h" />
<ClInclude Include="Vif_Unpack.h" />
<ClInclude Include="x86\newVif.h" />
<ClInclude Include="x86\newVif_UnpackSSE.h" />
<ClInclude Include="x86\Vif_UnpackSSE.h" />
<ClInclude Include="SPR.h" />
<ClInclude Include="Gif.h" />
<ClInclude Include="R5900.h" />
Expand Down
12 changes: 6 additions & 6 deletions pcsx2/pcsx2.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -521,10 +521,10 @@
<ClCompile Include="Vif_Unpack.cpp">
<Filter>System\Ps2\EmotionEngine\DMAC\Vif\Unpack</Filter>
</ClCompile>
<ClCompile Include="x86\newVif_Dynarec.cpp">
<ClCompile Include="x86\Vif_Dynarec.cpp">
<Filter>System\Ps2\EmotionEngine\DMAC\Vif\Unpack\newVif\Dynarec</Filter>
</ClCompile>
<ClCompile Include="x86\newVif_UnpackSSE.cpp">
<ClCompile Include="x86\Vif_UnpackSSE.cpp">
<Filter>System\Ps2\EmotionEngine\DMAC\Vif\Unpack\newVif\Dynarec</Filter>
</ClCompile>
<ClCompile Include="SPR.cpp">
Expand Down Expand Up @@ -1425,10 +1425,10 @@
<ClCompile Include="GS\Renderers\SW\GSSetupPrimCodeGenerator.arm64.cpp">
<Filter>System\Ps2\GS\Renderers\Software</Filter>
</ClCompile>
<ClCompile Include="arm64\newVif_Dynarec.cpp">
<ClCompile Include="arm64\Vif_Dynarec.cpp">
<Filter>System\Ps2\EmotionEngine\DMAC\Vif\Unpack\newVif\Dynarec\arm64</Filter>
</ClCompile>
<ClCompile Include="arm64\newVif_UnpackNEON.cpp">
<ClCompile Include="arm64\Vif_UnpackNEON.cpp">
<Filter>System\Ps2\EmotionEngine\DMAC\Vif\Unpack\newVif\Dynarec\arm64</Filter>
</ClCompile>
<ClCompile Include="arm64\AsmHelpers.cpp">
Expand Down Expand Up @@ -1532,7 +1532,7 @@
<ClInclude Include="x86\newVif.h">
<Filter>System\Ps2\EmotionEngine\DMAC\Vif\Unpack\newVif</Filter>
</ClInclude>
<ClInclude Include="x86\newVif_UnpackSSE.h">
<ClInclude Include="x86\Vif_UnpackSSE.h">
<Filter>System\Ps2\EmotionEngine\DMAC\Vif\Unpack\newVif\Dynarec</Filter>
</ClInclude>
<ClInclude Include="SPR.h">
Expand Down Expand Up @@ -2387,7 +2387,7 @@
<ClInclude Include="GS\GSVector4i_arm64.h">
<Filter>System\Ps2\GS</Filter>
</ClInclude>
<ClInclude Include="arm64\newVif_UnpackNEON.h">
<ClInclude Include="arm64\Vif_UnpackNEON.h">
<Filter>System\Ps2\EmotionEngine\DMAC\Vif\Unpack\newVif\Dynarec\arm64</Filter>
</ClInclude>
<ClInclude Include="arm64\AsmHelpers.h">
Expand Down
6 changes: 4 additions & 2 deletions pcsx2/x86/newVif_Dynarec.cpp → pcsx2/x86/Vif_Dynarec.cpp
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -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;
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -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"

Expand Down Expand Up @@ -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;
}
}
Expand Down
File renamed without changes.