diff --git a/bin/GameIndex.yaml b/bin/GameIndex.yaml index 366b5d8a3f..1364b94a33 100644 --- a/bin/GameIndex.yaml +++ b/bin/GameIndex.yaml @@ -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" diff --git a/bin/docs/GameIndex.pdf b/bin/docs/GameIndex.pdf index 9cfd5e04ee..6827a10e7a 100644 Binary files a/bin/docs/GameIndex.pdf and b/bin/docs/GameIndex.pdf differ diff --git a/pcsx2/Config.h b/pcsx2/Config.h index 582471556c..e00e2c23d1 100644 --- a/pcsx2/Config.h +++ b/pcsx2/Config.h @@ -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. diff --git a/pcsx2/Docs/GameIndex.md b/pcsx2/Docs/GameIndex.md index 5b6e83d597..79113c8cb9 100644 --- a/pcsx2/Docs/GameIndex.md +++ b/pcsx2/Docs/GameIndex.md @@ -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. @@ -193,4 +189,4 @@ The patch that corresponds to the running game's CRC will take precedence over t Patches should be defined as multi-line string blocks, where each line would correspond with a line in a conventional `*.pnach` file -For more information on how to write a patch, see the following [forum post](https://forums.pcsx2.net/Thread-How-PNACH-files-work-2-0) \ No newline at end of file +For more information on how to write a patch, see the following [forum post](https://forums.pcsx2.net/Thread-How-PNACH-files-work-2-0) diff --git a/pcsx2/Docs/gen-docs.sh b/pcsx2/Docs/gen-docs.sh index 2dc18d7b95..533b0efa40 100755 --- a/pcsx2/Docs/gen-docs.sh +++ b/pcsx2/Docs/gen-docs.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh ### Retrieve the latest git tag ### - Assumes atleast git 2.18 diff --git a/pcsx2/Pcsx2Config.cpp b/pcsx2/Pcsx2Config.cpp index 5a079c1c69..55c2880fad 100644 --- a/pcsx2/Pcsx2Config.cpp +++ b/pcsx2/Pcsx2Config.cpp @@ -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 ); diff --git a/pcsx2/gui/Panels/GameFixesPanel.cpp b/pcsx2/gui/Panels/GameFixesPanel.cpp index 54028d5d43..00eae4e797 100644 --- a/pcsx2/gui/Panels/GameFixesPanel.cpp +++ b/pcsx2/gui/Panels/GameFixesPanel.cpp @@ -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 diff --git a/pcsx2/x86/iFPU.cpp b/pcsx2/x86/iFPU.cpp index 643488137f..3a0f867f85 100644 --- a/pcsx2/x86/iFPU.cpp +++ b/pcsx2/x86/iFPU.cpp @@ -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); }