mirror of https://github.com/PCSX2/pcsx2.git
FPU: Remove FPU Compare Hack
FULL clamping mode fix games where hack was used, so is no longer required. This commit remove hack, adjust GameDB according to that change, and rename fpuFloat4 function to fpuFloat3. Last change is because fpuFloat3 was just wrapper for fpuFloat4 with added check for compare hack. Additionally fpuFloat2 was only function that called fpuFloat4 directly, so that one call was changed to fpuFloat3 to respect previous changes.
This commit is contained in:
parent
2e0baa7162
commit
0ad5680597
|
@ -11043,8 +11043,8 @@ SLES-52631:
|
|||
name: "Digimon Rumble Arena 2"
|
||||
region: "PAL-M5"
|
||||
compat: 5
|
||||
gameFixes:
|
||||
- FpuCompareHack
|
||||
clampModes:
|
||||
eeClampMode: 3
|
||||
SLES-52636:
|
||||
name: "Colin McRae Rally 2005"
|
||||
region: "PAL-M5"
|
||||
|
@ -16965,13 +16965,13 @@ SLES-55493:
|
|||
SLES-55494:
|
||||
name: "X-Men Origins - Wolverine"
|
||||
region: "PAL-E-F"
|
||||
gameFixes:
|
||||
- FpuCompareHack # Flickering objects, sound loop.
|
||||
clampModes:
|
||||
eeClampMode: 3 # Flickering objects, sound loop.
|
||||
SLES-55495:
|
||||
name: "X-Men Origins - Wolverine"
|
||||
region: "PAL-M3"
|
||||
gameFixes:
|
||||
- FpuCompareHack # Flickering objects, sound loop.
|
||||
clampModes:
|
||||
eeClampMode: 3 # Flickering objects, sound loop.
|
||||
SLES-55496:
|
||||
name: "Secret Agent Clank"
|
||||
region: "PAL-Unk"
|
||||
|
@ -17825,8 +17825,8 @@ SLKA-25254:
|
|||
name: "Digimon Rumble Arena 2"
|
||||
region: "NTSC-K"
|
||||
compat: 5
|
||||
gameFixes:
|
||||
- FpuCompareHack
|
||||
clampModes:
|
||||
eeClampMode: 3
|
||||
SLKA-25255:
|
||||
name: "Mobile Suit Gundam - Seed - Never Ending Tomorrow"
|
||||
region: "NTSC-K"
|
||||
|
@ -35630,8 +35630,8 @@ SLUS-21067:
|
|||
name: "Digimon Rumble Arena 2"
|
||||
region: "NTSC-U"
|
||||
compat: 5
|
||||
gameFixes:
|
||||
- FpuCompareHack
|
||||
clampModes:
|
||||
eeClampMode: 3
|
||||
SLUS-21068:
|
||||
name: "Vietcong - Purple Haze"
|
||||
region: "NTSC-U"
|
||||
|
@ -39011,8 +39011,8 @@ SLUS-21880:
|
|||
name: "X-Men Origins - Wolverine"
|
||||
region: "NTSC-U"
|
||||
compat: 5
|
||||
gameFixes:
|
||||
- FpuCompareHack # Flickering objects, sound loop.
|
||||
clampModes:
|
||||
eeClampMode: 3 # Flickering objects, sound loop.
|
||||
SLUS-21881:
|
||||
name: "Transformers: Revenge of the Fallen"
|
||||
region: "NTSC-U"
|
||||
|
|
Binary file not shown.
|
@ -41,7 +41,6 @@ enum GamefixId
|
|||
GamefixId_FIRST = 0,
|
||||
|
||||
Fix_VuAddSub = GamefixId_FIRST,
|
||||
Fix_FpuCompare,
|
||||
Fix_FpuMultiply,
|
||||
Fix_FpuNegDiv,
|
||||
Fix_XGKick,
|
||||
|
@ -358,7 +357,6 @@ struct Pcsx2Config
|
|||
BITFIELD32()
|
||||
bool
|
||||
VuAddSubHack : 1, // Tri-ace games, they use an encryption algorithm that requires VU ADDI opcode to be bit-accurate.
|
||||
FpuCompareHack : 1, // Digimon Rumble Arena 2, fixes spinning/hanging on intro-menu.
|
||||
FpuMulHack : 1, // Tales of Destiny hangs.
|
||||
FpuNegDivHack : 1, // Gundam games messed up camera-view.
|
||||
XgKickHack : 1, // Erementar Gerad, adds more delay to VU XGkick instructions. Corrects the color of some graphics, but breaks Tri-ace games and others.
|
||||
|
@ -552,7 +550,6 @@ TraceLogFilters& SetTraceConfig();
|
|||
|
||||
//------------ SPECIAL GAME FIXES!!! ---------------
|
||||
#define CHECK_VUADDSUBHACK (EmuConfig.Gamefixes.VuAddSubHack) // Special Fix for Tri-ace games, they use an encryption algorithm that requires VU addi opcode to be bit-accurate.
|
||||
#define CHECK_FPUCOMPAREHACK (EmuConfig.Gamefixes.FpuCompareHack) // Special Fix for Digimon Rumble Arena 2, fixes spinning/hanging on intro-menu.
|
||||
#define CHECK_FPUMULHACK (EmuConfig.Gamefixes.FpuMulHack) // Special Fix for Tales of Destiny hangs.
|
||||
#define CHECK_FPUNEGDIVHACK (EmuConfig.Gamefixes.FpuNegDivHack) // Special Fix for Gundam games messed up camera-view.
|
||||
#define CHECK_XGKICKHACK (EmuConfig.Gamefixes.XgKickHack) // Special Fix for Erementar Gerad, adds more delay to VU XGkick instructions. Corrects the color of some graphics.
|
||||
|
|
|
@ -25,7 +25,6 @@ SERIAL-12345: # !required! Serial number for the game, this is how games are loo
|
|||
# If you'd like to temporarily disable it, either comment out the line, or remove it!
|
||||
gameFixes:
|
||||
- VuAddSubHack
|
||||
- FpuCompareHack
|
||||
- FpuMulHack
|
||||
- FpuNegDivHack
|
||||
- XGKickHack
|
||||
|
@ -113,9 +112,6 @@ These values are case-sensitive so take care. If you incorrectly specify a Game
|
|||
- `VuAddSubHack`
|
||||
- Tri-ace games, they use an encryption algorithm that requires VU ADDI opcode to be bit-accurate.
|
||||
|
||||
- `FpuCompareHack`
|
||||
- Digimon Rumble Arena 2, fixes spinning/hanging on intro-menu.
|
||||
|
||||
- `FpuMulHack`
|
||||
- Tales of Destiny hangs.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
### Retrieve the latest git tag
|
||||
### - Assumes atleast git 2.18
|
||||
|
|
|
@ -279,7 +279,6 @@ int Pcsx2Config::GSOptions::GetVsync() const
|
|||
const wxChar *const tbl_GamefixNames[] =
|
||||
{
|
||||
L"VuAddSub",
|
||||
L"FpuCompare",
|
||||
L"FpuMul",
|
||||
L"FpuNegDiv",
|
||||
L"XGKick",
|
||||
|
@ -342,7 +341,6 @@ void Pcsx2Config::GamefixOptions::Set( GamefixId id, bool enabled )
|
|||
switch(id)
|
||||
{
|
||||
case Fix_VuAddSub: VuAddSubHack = enabled; break;
|
||||
case Fix_FpuCompare: FpuCompareHack = enabled; break;
|
||||
case Fix_FpuMultiply: FpuMulHack = enabled; break;
|
||||
case Fix_FpuNegDiv: FpuNegDivHack = enabled; break;
|
||||
case Fix_XGKick: XgKickHack = enabled; break;
|
||||
|
@ -368,7 +366,6 @@ bool Pcsx2Config::GamefixOptions::Get( GamefixId id ) const
|
|||
switch(id)
|
||||
{
|
||||
case Fix_VuAddSub: return VuAddSubHack;
|
||||
case Fix_FpuCompare: return FpuCompareHack;
|
||||
case Fix_FpuMultiply: return FpuMulHack;
|
||||
case Fix_FpuNegDiv: return FpuNegDivHack;
|
||||
case Fix_XGKick: return XgKickHack;
|
||||
|
@ -394,7 +391,6 @@ void Pcsx2Config::GamefixOptions::LoadSave( IniInterface& ini )
|
|||
ScopedIniGroup path( ini, L"Gamefixes" );
|
||||
|
||||
IniBitBool( VuAddSubHack );
|
||||
IniBitBool( FpuCompareHack );
|
||||
IniBitBool( FpuMulHack );
|
||||
IniBitBool( FpuNegDivHack );
|
||||
IniBitBool( XgKickHack );
|
||||
|
|
|
@ -40,10 +40,6 @@ Panels::GameFixesPanel::GameFixesPanel( wxWindow* parent )
|
|||
_("VU Add Hack - Fixes Tri-Ace games boot crash."),
|
||||
_("Games that need this hack to boot:\n * Star Ocean 3\n * Radiata Stories\n * Valkyrie Profile 2")
|
||||
},
|
||||
{
|
||||
_("FPU Compare Hack - For Digimon Rumble Arena 2."),
|
||||
wxEmptyString
|
||||
},
|
||||
{
|
||||
_("FPU Multiply Hack - For Tales of Destiny."),
|
||||
wxEmptyString
|
||||
|
|
|
@ -307,7 +307,7 @@ REC_FPUFUNC(RSQRT_S);
|
|||
//------------------------------------------------------------------
|
||||
|
||||
static __aligned16 u64 FPU_FLOAT_TEMP[2];
|
||||
__fi void fpuFloat4(int regd) { // +NaN -> +fMax, -NaN -> -fMax, +Inf -> +fMax, -Inf -> -fMax
|
||||
__fi void fpuFloat3(int regd) { // +NaN -> +fMax, -NaN -> -fMax, +Inf -> +fMax, -Inf -> -fMax
|
||||
int t1reg = _allocTempXMMreg(XMMT_FPS, -1);
|
||||
if (t1reg >= 0) {
|
||||
xMOVSS(xRegisterSSE(t1reg), xRegisterSSE(regd));
|
||||
|
@ -339,24 +339,10 @@ __fi void fpuFloat(int regd) { // +/-NaN -> +fMax, +Inf -> +fMax, -Inf -> -fMax
|
|||
|
||||
__fi void fpuFloat2(int regd) { // +NaN -> +fMax, -NaN -> -fMax, +Inf -> +fMax, -Inf -> -fMax
|
||||
if (CHECK_FPU_OVERFLOW) {
|
||||
fpuFloat4(regd);
|
||||
fpuFloat3(regd);
|
||||
}
|
||||
}
|
||||
|
||||
__fi void fpuFloat3(int regd) {
|
||||
// This clamp function is used in the recC_xx opcodes
|
||||
// Rule of Rose needs clamping or else it crashes (minss or maxss both fix the crash)
|
||||
// Tekken 5 has disappearing characters unless preserving NaN sign (fpuFloat4() preserves NaN sign).
|
||||
// Digimon Rumble Arena 2 needs MAXSS clamping (if you only use minss, it spins on the intro-menus;
|
||||
// it also doesn't like preserving NaN sign with fpuFloat4, so the only way to make Digimon work
|
||||
// is by calling MAXSS first)
|
||||
if (CHECK_FPUCOMPAREHACK) {
|
||||
//xMIN.SS(xRegisterSSE(regd), ptr[&g_maxvals[0]]);
|
||||
xMAX.SS(xRegisterSSE(regd), ptr[&g_minvals[0]]);
|
||||
}
|
||||
else fpuFloat4(regd);
|
||||
}
|
||||
|
||||
void ClampValues(int regd) {
|
||||
fpuFloat(regd);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue