Fixed a small bug in FCOR under the VUrecs, also put a hack in there for ICO to cure the SPS, this can be selected in the gamefixes dialog.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@537 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
refraction 2009-02-19 22:17:58 +00:00
parent 68aaf91b5d
commit 23336fe987
5 changed files with 19 additions and 8 deletions

View File

@ -90,6 +90,7 @@ extern SessionOverrideFlags g_Session;
//------------ SPECIAL GAME FIXES!!! ---------------
#define CHECK_VUADDSUBHACK (Config.GameFixes & 0x1) // Special Fix for Tri-ace games, they use an encryption algorithm that requires VU addi opcode to be bit-accurate.
#define CHECK_FPUCLAMPHACK (Config.GameFixes & 0x4) // Special Fix for Tekken 5, different clamping for FPU (sets NaN to zero; doesn't clamp infinities)
#define CHECK_FCORHACK (Config.GameFixes & 0x8) // Special Fix for ICO, cures SPS due to some misscalculation of the clip flag.
//------------ Advanced Options!!! ---------------
#define CHECK_VU_OVERFLOW (Config.vuOptions & 0x1)
#define CHECK_VU_EXTRA_OVERFLOW (Config.vuOptions & 0x2) // If enabled, Operands are clamped before being used in the VU recs

View File

@ -529,6 +529,7 @@ BOOL APIENTRY GameFixes(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
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);
if(Config.GameFixes & 0x8) CheckDlgButton(hDlg, IDC_GAMEFIX7, TRUE);
return TRUE;
case WM_COMMAND:
@ -538,6 +539,7 @@ BOOL APIENTRY GameFixes(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
newfixes |= IsDlgButtonChecked(hDlg, IDC_GAMEFIX1) ? 0x1 : 0;
newfixes |= IsDlgButtonChecked(hDlg, IDC_GAMEFIX2) ? 0x2 : 0;
newfixes |= IsDlgButtonChecked(hDlg, IDC_GAMEFIX3) ? 0x4 : 0;
newfixes |= IsDlgButtonChecked(hDlg, IDC_GAMEFIX7) ? 0x8 : 0;
EndDialog(hDlg, TRUE);

View File

@ -74,19 +74,20 @@ LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
// Dialog
//
IDD_GAMEFIXES DIALOGEX 0, 0, 278, 119
IDD_GAMEFIXES DIALOGEX 0, 0, 278, 127
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Game Special Fixes"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "OK",IDOK,85,85,50,14
PUSHBUTTON "Cancel",IDCANCEL,139,85,50,14
DEFPUSHBUTTON "OK",IDOK,85,99,50,14
PUSHBUTTON "Cancel",IDCANCEL,139,99,50,14
CTEXT "Some games need special settings.\nConfigure them here.",IDC_STATIC,7,7,264,17
GROUPBOX "PCSX2 Gamefixes",IDC_STATIC,7,31,264,77
GROUPBOX "PCSX2 Gamefixes",IDC_STATIC,7,31,264,89
CONTROL "FPU Clamp Hack - Special fix for Tekken 5.",IDC_GAMEFIX3,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,51,249,10
CONTROL "VU Add / Sub Hack - Special fix for Tri-Ace games!",IDC_GAMEFIX1,
CONTROL "VU Add / Sub Hack - Special fix for Tri-Ace games!",IDC_GAMEFIX2,
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,65,252,10
CONTROL "VU FCOR Hack - Fixes ICO SPS",IDC_GAMEFIX7,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,79,252,10
END
@ -104,7 +105,7 @@ BEGIN
RIGHTMARGIN, 271
VERTGUIDE, 12
TOPMARGIN, 7
BOTTOMMARGIN, 112
BOTTOMMARGIN, 120
END
END
#endif // APSTUDIO_INVOKED

View File

@ -574,6 +574,8 @@
#define IDC_GAMEFIX5 1304
#define IDC_GAMEFIX1 1304
#define IDC_EE_ROUNDMODE0 1305
#define IDC_FCOR 1305
#define IDC_GAMEFIX7 1305
#define IDC_EE_ROUNDMODE1 1306
#define IDC_EE_ROUNDMODE2 1307
#define IDC_EE_ROUNDMODE3 1308
@ -602,12 +604,12 @@
#define IDC_EE_CLAMPMODE1 1320
#define IDC_MCD_BROWSE1 1320
#define IDC_EE_CLAMPMODE2 1321
#define IDC_INTCSTATHACK 1326
#define IDC_MCD_BROWSE2 1321
#define IDC_MCD_FILE1 1322
#define IDC_MCD_FILE2 1323
#define IDC_MCD_LABEL1 1324
#define IDC_MCD_LABEL2 1325
#define IDC_INTCSTATHACK 1326
#define IDC_CPULOG 1500
#define IDC_MEMLOG 1501
#define IDC_HWLOG 1502

View File

@ -1459,10 +1459,15 @@ void recVUMI_FCOR( VURegs *VU, int info )
MOV32MtoR( EAX, VU_VI_ADDR(REG_CLIP_FLAG, 1) );
XOR32RtoR( ftreg, ftreg );
OR32ItoR( EAX, VU->code );
NOT32R( EAX );
AND32ItoR( EAX, 0xffffff );
CMP32ItoR( EAX, 0xffffff );
SETZ8R(ftreg);
if(CHECK_FCORHACK) //ICO Misscalculated CLIP flag (bits missing id guess)
SETNZ8R(ftreg);
else
SETZ8R(ftreg);
}
//------------------------------------------------------------------