mirror of https://github.com/PCSX2/pcsx2.git
Added Nneeve's fix for some issues in VU pipeline. SPS in Arc The Lad will be fixed.
Added a temporary gamefix option for God of War, which has been broken since r659. Anyway I'll fix this problem in a proper way. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@667 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
223156a29a
commit
6a3bf0c644
|
@ -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_FPUCOMPAREHACK (Config.GameFixes & 0x4) // Special Fix for Digimon Rumble Arena 2, fixes spinning/hanging on intro-menu.
|
||||
#define CHECK_VUCLIPFLAGHACK (Config.GameFixes & 0x2) // Special Fix for God of War, fixes SPS.
|
||||
//------------ 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
|
||||
|
|
|
@ -2224,7 +2224,7 @@ void _vuRegs##OP(VURegs * VU, _VURegsNum *VUregsn) { \
|
|||
VUregsn->cycles = 0; \
|
||||
}
|
||||
|
||||
#define VUREGS_PFS(OP, _cycles) \
|
||||
#define VUREGS_PFS_xyzw(OP, _cycles) \
|
||||
void _vuRegs##OP(VURegs * VU, _VURegsNum *VUregsn) { \
|
||||
VUregsn->pipe = VUPIPE_EFU; \
|
||||
VUregsn->VFwrite = 0; \
|
||||
|
@ -2236,6 +2236,18 @@ void _vuRegs##OP(VURegs * VU, _VURegsNum *VUregsn) { \
|
|||
VUregsn->cycles = _cycles; \
|
||||
}
|
||||
|
||||
#define VUREGS_PFS_fsf(OP, _cycles) \
|
||||
void _vuRegs##OP(VURegs * VU, _VURegsNum *VUregsn) { \
|
||||
VUregsn->pipe = VUPIPE_EFU; \
|
||||
VUregsn->VFwrite = 0; \
|
||||
VUregsn->VFread0 = _Fs_; \
|
||||
VUregsn->VFr0xyzw= 1 << (3-_Fsf_); \
|
||||
VUregsn->VFread1 = 0; \
|
||||
VUregsn->VIwrite = 1 << REG_P; \
|
||||
VUregsn->VIread = GET_VF0_FLAG(_Fs_); \
|
||||
VUregsn->cycles = _cycles; \
|
||||
}
|
||||
|
||||
|
||||
|
||||
VUREGS_FTFS(ABS);
|
||||
|
@ -2891,19 +2903,19 @@ void _vuRegsWAITP(VURegs * VU, _VURegsNum *VUregsn) {
|
|||
VUregsn->VIread = 0;
|
||||
}
|
||||
|
||||
VUREGS_PFS(ESADD, 10);
|
||||
VUREGS_PFS(ERSADD, 17);
|
||||
VUREGS_PFS(ELENG, 17);
|
||||
VUREGS_PFS(ERLENG, 23);
|
||||
VUREGS_PFS(EATANxy, 53);
|
||||
VUREGS_PFS(EATANxz, 53);
|
||||
VUREGS_PFS(ESUM, 11);
|
||||
VUREGS_PFS(ERCPR, 11);
|
||||
VUREGS_PFS(ESQRT, 11);
|
||||
VUREGS_PFS(ERSQRT, 17);
|
||||
VUREGS_PFS(ESIN, 28);
|
||||
VUREGS_PFS(EATAN, 53);
|
||||
VUREGS_PFS(EEXP, 43);
|
||||
VUREGS_PFS_xyzw(ESADD, 10);
|
||||
VUREGS_PFS_xyzw(ERSADD, 17);
|
||||
VUREGS_PFS_xyzw(ELENG, 17);
|
||||
VUREGS_PFS_xyzw(ERLENG, 23);
|
||||
VUREGS_PFS_xyzw(EATANxy, 53);
|
||||
VUREGS_PFS_xyzw(EATANxz, 53);
|
||||
VUREGS_PFS_xyzw(ESUM, 11);
|
||||
VUREGS_PFS_fsf(ERCPR, 11);
|
||||
VUREGS_PFS_fsf(ESQRT, 11);
|
||||
VUREGS_PFS_fsf(ERSQRT, 17);
|
||||
VUREGS_PFS_fsf(ESIN, 28);
|
||||
VUREGS_PFS_fsf(EATAN, 53);
|
||||
VUREGS_PFS_fsf(EEXP, 43);
|
||||
|
||||
void _vuRegsXITOP(VURegs * VU, _VURegsNum *VUregsn) {
|
||||
VUregsn->pipe = VUPIPE_IALU;
|
||||
|
|
|
@ -539,6 +539,7 @@ BOOL APIENTRY GameFixes(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
|||
case WM_INITDIALOG:
|
||||
if(Config.GameFixes & 0x1) CheckDlgButton(hDlg, IDC_GAMEFIX2, TRUE);//Tri-Ace fix
|
||||
if(Config.GameFixes & 0x4) CheckDlgButton(hDlg, IDC_GAMEFIX3, TRUE);//Digimon FPU compare fix
|
||||
if(Config.GameFixes & 0x2) CheckDlgButton(hDlg, IDC_GAMEFIX4, TRUE);//GoW fix
|
||||
return TRUE;
|
||||
|
||||
case WM_COMMAND:
|
||||
|
@ -547,6 +548,7 @@ BOOL APIENTRY GameFixes(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
|||
uint newfixes = 0;
|
||||
newfixes |= IsDlgButtonChecked(hDlg, IDC_GAMEFIX2) ? 0x1 : 0;
|
||||
newfixes |= IsDlgButtonChecked(hDlg, IDC_GAMEFIX3) ? 0x4 : 0;
|
||||
newfixes |= IsDlgButtonChecked(hDlg, IDC_GAMEFIX4) ? 0x2 : 0;
|
||||
|
||||
EndDialog(hDlg, TRUE);
|
||||
|
||||
|
|
|
@ -84,9 +84,11 @@ BEGIN
|
|||
CTEXT "Some games need special settings.\nConfigure them here.",IDC_STATIC,7,7,264,17
|
||||
GROUPBOX "PCSX2 Gamefixes",IDC_STATIC,7,31,264,89
|
||||
CONTROL "FPU Compare Hack - Special fix for Digimon Rumble Arena 2.",IDC_GAMEFIX3,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,51,249,10
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,47,249,10
|
||||
CONTROL "VU Add / Sub Hack - Special fix for Tri-Ace games!",IDC_GAMEFIX2,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,65,252,10
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,61,252,10
|
||||
CONTROL "VU Clip Hack - Special fix for God of War",IDC_GAMEFIX4,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,75,144,10
|
||||
END
|
||||
|
||||
|
||||
|
|
|
@ -405,12 +405,12 @@ void _recvuFlushEFU(VURegs * VU) {
|
|||
}
|
||||
|
||||
void _recvuTestFDIVStalls(VURegs * VU, _VURegsNum *VUregsn) {
|
||||
// _vuTestFMACStalls(VURegs * VU, _VURegsNum *VUregsn);
|
||||
_recvuTestFMACStalls(VU,VUregsn, false);
|
||||
_recvuFlushFDIV(VU);
|
||||
}
|
||||
|
||||
void _recvuTestEFUStalls(VURegs * VU, _VURegsNum *VUregsn) {
|
||||
// _vuTestFMACStalls(VURegs * VU, _VURegsNum *VUregsn);
|
||||
_recvuTestFMACStalls(VU,VUregsn, false);
|
||||
_recvuFlushEFU(VU);
|
||||
}
|
||||
|
||||
|
|
|
@ -3009,7 +3009,7 @@ void VuInstruction::Recompile(list<VuInstruction>::iterator& itinst, u32 vuxyz)
|
|||
if( type & INST_CLIP_WRITE ) {
|
||||
if( nParentPc < s_pCurBlock->startpc || nParentPc >= (int)pc ) {
|
||||
|
||||
if( pparentinst != NULL ) {
|
||||
if( !CHECK_VUCLIPFLAGHACK && pparentinst != NULL ) {
|
||||
|
||||
if( pparentinst->pClipWrite == 0 ) {
|
||||
pparentinst->pClipWrite = (uptr)SuperVUStaticAlloc(4);
|
||||
|
|
Loading…
Reference in New Issue