From 7730d4a66d14299d58f458e4f93eea764e1c3aab Mon Sep 17 00:00:00 2001 From: ramapcsx2 Date: Thu, 18 Dec 2008 03:48:25 +0000 Subject: [PATCH] Jake found the real problem with Tales of the Abyss. The cdvd seek command should take considerably longer than a normal block read. Added a fixed value for now (might include sector differences later), that gets rid of the vmhack crashes in that game. Slightly adjusted the new cycle counting to better match the ps2 speed (Still not done yet). git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@448 a6443dda-0b58-4228-96e9-037be469359c --- pcsx2/CDVD.c | 13 +++---------- pcsx2/Misc.h | 1 - pcsx2/windows/WinMain.c | 2 -- pcsx2/windows/pcsx2.rc | 14 +++++--------- pcsx2/windows/resource.h | 1 - pcsx2/x86/iR5900.h | 10 +++++----- 6 files changed, 13 insertions(+), 28 deletions(-) diff --git a/pcsx2/CDVD.c b/pcsx2/CDVD.c index a83f120b4f..16beda9e30 100644 --- a/pcsx2/CDVD.c +++ b/pcsx2/CDVD.c @@ -696,14 +696,7 @@ void cdvdReadTimeRcnt(int mode) // Mode 0 is DVD, Mode 1 is CD cdvdReadTime = 30000; //simulates spin-up time, fixes hdloader else cdvdReadTime = ( (mode ? PSX_CD_READSPEED : PSX_DVD_READSPEED) * cdvd.BlockSize ) / cdvd.Speed; - - if (CHECK_SLOWDVD) { //fixes Tales of the Abyss crashing - cdvdReadTime*=3; //Tota battles don't crash - if (cdvd.Sector > 2000000) { //Tota worldmap doesn't crash - //SysPrintf("Sector = %d \n", cdvd.Sector); - cdvdReadTime = 100000; - } - } + //SysPrintf("cdvdReadTime = %d \n", cdvdReadTime); } @@ -920,8 +913,8 @@ __forceinline void cdvdReadInterrupt() { cdvd.RErr = CDVDreadTrack(cdvd.Sector, cdvd.ReadMode); cdvd.Readed = 1; cdvd.Status = CDVD_STATUS_SEEK_COMPLETE; - - CDVDREAD_INT(cdvdReadTime); + //SysPrintf("SEEK!\n"); + CDVDREAD_INT(cdvdReadTime*32); return; } diff --git a/pcsx2/Misc.h b/pcsx2/Misc.h index 3d9ab79080..07654e3d3c 100644 --- a/pcsx2/Misc.h +++ b/pcsx2/Misc.h @@ -84,7 +84,6 @@ void CombinePaths( char* dest, const char* srcPath, const char* srcFile ); #define CHECK_FPU_EXTRA_FLAGS 0 // Always disabled now, doesn't seem to affect games positively. // (!(Config.Hacks & 0x200)) // Sets correct flags in the FPU recs #define CHECK_ESCAPE_HACK (Config.Hacks & 0x400) //------------ SPECIAL GAME FIXES!!! --------------- -#define CHECK_SLOWDVD (Config.GameFixes & 0x1) // Slow DVD access times, for games that are strict about them (Tales of the Abyss) #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_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_VUBRANCHHACK (Config.GameFixes & 0x8) // Special Fix for Magna Carta (note: Breaks Crash Bandicoot) diff --git a/pcsx2/windows/WinMain.c b/pcsx2/windows/WinMain.c index 3b58c7807f..d493dad532 100644 --- a/pcsx2/windows/WinMain.c +++ b/pcsx2/windows/WinMain.c @@ -891,7 +891,6 @@ BOOL APIENTRY GameFixes(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { case WM_INITDIALOG: SetWindowText(hDlg, _("Game Specific Fixes")); - if(Config.GameFixes & 0x1) CheckDlgButton(hDlg, IDC_GAMEFIX1, TRUE); //slow dvd 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_GAMEFIX4, TRUE); @@ -901,7 +900,6 @@ BOOL APIENTRY GameFixes(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) if (LOWORD(wParam) == IDOK) { Config.GameFixes = 0; - Config.GameFixes |= IsDlgButtonChecked(hDlg, IDC_GAMEFIX1) ? 0x1 : 0; //slow dvd Config.GameFixes |= IsDlgButtonChecked(hDlg, IDC_GAMEFIX2) ? 0x2 : 0; Config.GameFixes |= IsDlgButtonChecked(hDlg, IDC_GAMEFIX3) ? 0x4 : 0; Config.GameFixes |= IsDlgButtonChecked(hDlg, IDC_GAMEFIX4) ? 0x8 : 0; diff --git a/pcsx2/windows/pcsx2.rc b/pcsx2/windows/pcsx2.rc index 44012b4cc1..ef8a5cb6ef 100644 --- a/pcsx2/windows/pcsx2.rc +++ b/pcsx2/windows/pcsx2.rc @@ -7,8 +7,7 @@ // // Generated from the TEXTINCLUDE 2 resource. // -#include "afxresmw.h" - +#include "afxresmw.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS @@ -84,14 +83,12 @@ BEGIN PUSHBUTTON "Cancel",IDCANCEL,157,154,50,14 CTEXT "Some games need special settings.\nConfigure them here.",IDC_STATIC,7,7,297,17 CONTROL "VU Clip Hack - Special fix for God of War; Breaks Rockstar games!",IDC_GAMEFIX2, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,71,252,10 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,59,252,10 GROUPBOX "PCSX2 Gamefixes",IDC_STATIC,6,30,294,112 CONTROL "FPU Clamp Hack - Special fix for Tekken 5 and maybe other games.",IDC_GAMEFIX3, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,58,253,10 - CONTROL "Slow DVD access (fixes Tales of the Abyss) (Not needed at this time)",IDC_GAMEFIX1, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,44,252,10 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,46,253,10 CONTROL "VU Branch Hack - Special fix for Magna Carta; Breaks Crash Bandicoot!",IDC_GAMEFIX4, - "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,84,252,10 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,72,252,10 END @@ -1705,8 +1702,7 @@ END // // Generated from the TEXTINCLUDE 3 resource. // - - + ///////////////////////////////////////////////////////////////////////////// #endif // not APSTUDIO_INVOKED diff --git a/pcsx2/windows/resource.h b/pcsx2/windows/resource.h index 5ed9825c3c..f6f012bf1a 100644 --- a/pcsx2/windows/resource.h +++ b/pcsx2/windows/resource.h @@ -612,7 +612,6 @@ #define IDC_ICON2 1300 #define IDC_CHECK1 1300 #define IDC_EE_CHECK1 1300 -#define IDC_GAMEFIX1 1300 #define IDC_DENORMALS 1301 #define IDC_EE_CHECK2 1301 #define IDC_GAMEFIX2 1301 diff --git a/pcsx2/x86/iR5900.h b/pcsx2/x86/iR5900.h index 6926e9250f..931d3b6b7d 100644 --- a/pcsx2/x86/iR5900.h +++ b/pcsx2/x86/iR5900.h @@ -68,7 +68,7 @@ static const int InstCycles_Load = _ic_basemod + 7; #else -static const int InstCycles_Default = 8; +static const int InstCycles_Default = 9; static const int _ic_basemod = 8 - InstCycles_Default; // don't change me unless you're changing the fixed point accuracy of cycle counting. static const int InstCycles_Mult = _ic_basemod + 1*8; @@ -77,10 +77,10 @@ static const int InstCycles_FPU_Sqrt = _ic_basemod + 3*8; static const int InstCycles_MMI_Mult = _ic_basemod + 2*8; static const int InstCycles_MMI_Div = _ic_basemod + 22*8; -static const int InstCycles_Peephole_Store = _ic_basemod + 14; -static const int InstCycles_Peephole_Load = _ic_basemod + 2; -static const int InstCycles_Store = _ic_basemod + 14; -static const int InstCycles_Load = _ic_basemod + 2; +static const int InstCycles_Peephole_Store = _ic_basemod + 10; //_ic_basemod + 12 for snes emu +static const int InstCycles_Peephole_Load = _ic_basemod + 2; //_ic_basemod + 4 for snes emu +static const int InstCycles_Store = _ic_basemod + 10; //_ic_basemod + 12 for snes emu +static const int InstCycles_Load = _ic_basemod + 2; //_ic_basemod + 4 for snes emu #endif