mirror of https://github.com/PCSX2/pcsx2.git
added a Tekken 5 fix to the gamefixes dialog thanks to rama finding the problem. i also tweaked the GT4 gamefix a bit.
note: i haven't tested the Tekken 5 fix. plz comment if it doesn't work. git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@96 a6443dda-0b58-4228-96e9-037be469359c
This commit is contained in:
parent
2d805b4987
commit
67ff6f6147
|
@ -68,9 +68,9 @@
|
|||
|
||||
//------------ SPECIAL GAME FIXES!!! ---------------
|
||||
#define CHECK_FPUCLAMPHACK (Config.GameFixes & 0x1) // Special Fix for GT4, different clamping for FPU (Note: sets negative infinity to positive fMax when clamping, which the real ps2 doesn't do)
|
||||
#define CHECK_FPUCLAMPHACK2 (Config.GameFixes & 0x4) // Special Fix for Tekken 5, different clamping for FPU (sets infinities to zero)
|
||||
#define CHECK_VUCLIPHACK (Config.GameFixes & 0x2) // Special Fix for GoW, updates the clipflag differently in recVUMI_CLIP() (note: turning this hack on, breaks Rockstar games)
|
||||
|
||||
|
||||
#define CHECK_FRAMELIMIT (Config.Options&PCSX2_FRAMELIMIT_MASK)
|
||||
|
||||
//#ifdef PCSX2_DEVBUILD
|
||||
|
|
|
@ -724,6 +724,7 @@ BOOL APIENTRY GameFixes(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
|||
SetWindowText(hDlg, _("Game Specific Fixes"));
|
||||
if(Config.GameFixes & 0x1) CheckDlgButton(hDlg, IDC_GAMEFIX1, TRUE);
|
||||
if(Config.GameFixes & 0x2) CheckDlgButton(hDlg, IDC_GAMEFIX2, TRUE);
|
||||
if(Config.GameFixes & 0x4) CheckDlgButton(hDlg, IDC_GAMEFIX3, TRUE);
|
||||
return TRUE;
|
||||
|
||||
case WM_COMMAND:
|
||||
|
@ -732,6 +733,7 @@ BOOL APIENTRY GameFixes(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
|||
Config.GameFixes = 0;
|
||||
Config.GameFixes |= IsDlgButtonChecked(hDlg, IDC_GAMEFIX1) ? 0x1 : 0;
|
||||
Config.GameFixes |= IsDlgButtonChecked(hDlg, IDC_GAMEFIX2) ? 0x2 : 0;
|
||||
Config.GameFixes |= IsDlgButtonChecked(hDlg, IDC_GAMEFIX3) ? 0x4 : 0;
|
||||
|
||||
SaveConfig();
|
||||
|
||||
|
|
|
@ -83,9 +83,11 @@ BEGIN
|
|||
DEFPUSHBUTTON "OK",IDOK,99,132,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,153,132,50,14
|
||||
CTEXT "Some games need special settings.\nConfigure them here.",IDC_STATIC,7,7,277,17
|
||||
CONTROL "FPU Clamp Hack - Special fix for Gran Turismo 4 and possibly other games.",IDC_GAMEFIX1,
|
||||
CONTROL "FPU Clamp Hack - Special fix for Gran Turismo 4 and maybe other games.",IDC_GAMEFIX1,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,34,277,12
|
||||
CONTROL "VU Clip Hack - Special fix for God of War; Breaks Rockstar games!",IDC_GAMEFIX2,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,64,277,12
|
||||
CONTROL "FPU Clamp Hack 2 - Special fix for Tekken 5 and maybe other games.",IDC_GAMEFIX3,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,49,277,12
|
||||
END
|
||||
|
||||
|
|
|
@ -618,10 +618,10 @@
|
|||
#define IDC_VUCLIPHACK 1302
|
||||
#define IDC_VU_CHECK1 1302
|
||||
#define IDC_VU_FLAGS 1302
|
||||
#define IDC_GAMEFIX3 1302
|
||||
#define IDC_FRAMELIMIT_OPTIONS 1303
|
||||
#define IDC_FPUCLAMPHACK 1303
|
||||
#define IDC_VU_CHECK2 1303
|
||||
#define IDC_VU_FLAGS2 1303
|
||||
#define IDC_FPU_FLAGS 1303
|
||||
#define IDC_ROUNDMODE 1304
|
||||
#define IDC_EE_ROUNDMODE0 1305
|
||||
|
|
|
@ -762,30 +762,36 @@ FPURECOMPILE_CONSTCODE(C_LE, XMMINFO_READS|XMMINFO_READT);
|
|||
|
||||
// Doesnt seem to like negatives - Ruins katamari graphics
|
||||
// I REPEAT THE SIGN BIT (THATS 0x80000000) MUST *NOT* BE SET, jeez.
|
||||
static PCSX2_ALIGNED16(u32 s_overflowmask[]) = {0x7f7fffff, 0x7f7fffff, 0x7f7fffff, 0x7f7fffff};
|
||||
static PCSX2_ALIGNED16(u32 s_overflowmask[]) = {0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff};
|
||||
static u32 s_signbit = 0x80000000;
|
||||
extern int g_VuNanHandling;
|
||||
|
||||
void ClampValues(regd) {
|
||||
void fpuFloat(regd) {
|
||||
if (CHECK_FPU_OVERFLOW) {
|
||||
SSE_MAXSS_M32_to_XMM(regd, (uptr)&g_minvals[0]);
|
||||
SSE_MINSS_M32_to_XMM(regd, (uptr)&g_maxvals[0]);
|
||||
}
|
||||
/*
|
||||
int t5reg = _allocTempXMMreg(XMMT_FPS, -1);
|
||||
}
|
||||
|
||||
SSE_XORPS_XMM_to_XMM(t5reg, t5reg);
|
||||
SSE_CMPORDSS_XMM_to_XMM(t5reg, regd);
|
||||
void ClampValues(regd) {
|
||||
|
||||
if (CHECK_FPUCLAMPHACK2) {
|
||||
int t5reg = _allocTempXMMreg(XMMT_FPS, -1);
|
||||
|
||||
if( g_VuNanHandling )
|
||||
SSE_ORPS_M128_to_XMM(t5reg, (uptr)s_overflowmask);
|
||||
SSE_XORPS_XMM_to_XMM(t5reg, t5reg);
|
||||
SSE_CMPORDSS_XMM_to_XMM(t5reg, regd);
|
||||
|
||||
SSE_ANDPS_XMM_to_XMM(regd, t5reg);
|
||||
SSE_MAXSS_M32_to_XMM(regd, (uptr)&g_minvals[0]);
|
||||
SSE_MINSS_M32_to_XMM(regd, (uptr)&g_maxvals[0]);
|
||||
//if( g_VuNanHandling )
|
||||
//SSE_ORPS_M128_to_XMM(t5reg, (uptr)s_overflowmask);
|
||||
|
||||
SSE_ANDPS_XMM_to_XMM(regd, t5reg);
|
||||
//SSE_MAXSS_M32_to_XMM(regd, (uptr)&g_minvals[0]);
|
||||
//SSE_MINSS_M32_to_XMM(regd, (uptr)&g_maxvals[0]);
|
||||
|
||||
_freeXMMreg(t5reg);
|
||||
}
|
||||
else fpuFloat(regd);
|
||||
|
||||
_freeXMMreg(t5reg);
|
||||
*/
|
||||
}
|
||||
|
||||
void ClampValues2(regd) {
|
||||
|
@ -800,18 +806,12 @@ void ClampValues2(regd) {
|
|||
|
||||
SSE_ANDPS_XMM_to_XMM(regd, t5reg);
|
||||
|
||||
// not necessary since above ORPS handles that (i think) Lets enable it for now ;)
|
||||
SSE_MAXSS_M32_to_XMM(regd, (uptr)&g_minvals[0]);
|
||||
//SSE_MAXSS_M32_to_XMM(regd, (uptr)&g_minvals[0]);
|
||||
SSE_MINSS_M32_to_XMM(regd, (uptr)&g_maxvals[0]);
|
||||
|
||||
_freeXMMreg(t5reg);
|
||||
}
|
||||
else {
|
||||
if (CHECK_FPU_OVERFLOW) {
|
||||
SSE_MAXSS_M32_to_XMM(regd, (uptr)&g_minvals[0]);
|
||||
SSE_MINSS_M32_to_XMM(regd, (uptr)&g_maxvals[0]);
|
||||
}
|
||||
}
|
||||
else fpuFloat(regd);
|
||||
}
|
||||
|
||||
static void (*recComOpXMM_to_XMM[] )(x86SSERegType, x86SSERegType) = {
|
||||
|
@ -1089,7 +1089,7 @@ void recRSQRThelper1(int regd, int t0reg)
|
|||
|
||||
if (CHECK_FPU_EXTRA_OVERFLOW) {
|
||||
SSE_MINSS_M32_to_XMM(t0reg, (uptr)&g_maxvals[0]); // Only need to do positive clamp, since t0reg is positive
|
||||
ClampValues(regd);
|
||||
fpuFloat(regd);
|
||||
}
|
||||
|
||||
SSE_SQRTSS_XMM_to_XMM(t0reg, t0reg);
|
||||
|
@ -1108,7 +1108,7 @@ void recRSQRThelper2(int regd, int t0reg)
|
|||
SSE_ANDPS_M128_to_XMM(t0reg, (uptr)&s_pos[0]); // Make t0reg Positive
|
||||
if (CHECK_FPU_EXTRA_OVERFLOW) {
|
||||
SSE_MINSS_M32_to_XMM(t0reg, (uptr)&g_maxvals[0]); // Only need to do positive clamp, since t0reg is positive
|
||||
ClampValues(regd);
|
||||
fpuFloat(regd);
|
||||
}
|
||||
SSE_SQRTSS_XMM_to_XMM(t0reg, t0reg);
|
||||
SSE_DIVSS_XMM_to_XMM(regd, t0reg);
|
||||
|
|
Loading…
Reference in New Issue