From 1b8cd7c055d74ee2a1cc0dddf9b4205f59bfb939 Mon Sep 17 00:00:00 2001 From: ramapcsx2 Date: Tue, 16 Dec 2008 16:32:15 +0000 Subject: [PATCH] Enabled the slow dvd gamefix again. It makes Tales of the Abyss crash way less (no crashes encountered with it yet). We plan to fix this properly soon, once the real issue is found :) git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@443 a6443dda-0b58-4228-96e9-037be469359c --- pcsx2/CDVD.c | 21 ++++++++------------- pcsx2/Misc.h | 2 +- pcsx2/windows/WinMain.c | 4 ++-- pcsx2/windows/pcsx2.rc | 2 +- 4 files changed, 12 insertions(+), 17 deletions(-) diff --git a/pcsx2/CDVD.c b/pcsx2/CDVD.c index f402d9c0d7..a83f120b4f 100644 --- a/pcsx2/CDVD.c +++ b/pcsx2/CDVD.c @@ -697,6 +697,13 @@ void cdvdReadTimeRcnt(int mode) // Mode 0 is DVD, Mode 1 is CD 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); } @@ -774,8 +781,7 @@ void cdvdReadTimeRcnt(int mode) // Mode 0 is DVD, Mode 1 is CD // //calculate seek delay // cdvdReadTime += sector_difference / 14; // -// SysPrintf("CDVD Cnt Time = %d \n", cdvdReadTime); -// SysPrintf("CDVD Debug: Sector difference: %d\n", sector_difference); +// SysPrintf("CDVD Cnt Time = %d Sector difference: %d \n", cdvdReadTime, sector_difference); // last_sector = start_sector; //} @@ -1243,16 +1249,6 @@ void cdvdWrite04(u8 rt) { // NCOMMAND if (cdvd.Param[8] == 0) cdvd.RetryCnt = 0x100; else cdvd.RetryCnt = cdvd.Param[8]; cdvd.SpindlCtrl = cdvd.Param[9]; - //if (CHECK_SLOWDVD) { - // switch (cdvd.Param[9]) { - // case 0x01: cdvd.Speed = 1; break; // CD - // case 0x02: cdvd.Speed = 2; break; // CD - // case 0x03: cdvd.Speed = 4; break; // CD - // case 0x04: cdvd.Speed = 12; break; // CD - // default: cdvd.Speed = 24; break; // CD - // } - //} - //else cdvd.Speed = 24; // Fast cd reads; better performance cdvd.Speed = 24; switch (cdvd.Param[10]) { case 2: cdvd.ReadMode = CDVD_MODE_2340; cdvd.BlockSize = 2340; break; @@ -1305,7 +1301,6 @@ void cdvdWrite04(u8 rt) { // NCOMMAND if (cdvd.Param[8] == 0) cdvd.RetryCnt = 0x100; else cdvd.RetryCnt = cdvd.Param[8]; cdvd.SpindlCtrl = cdvd.Param[9]; - //cdvd.Speed = CHECK_SLOWDVD ? 1 : 4; //Some games need to read slower cdvd.Speed = 4; cdvd.ReadMode = CDVD_MODE_2048; cdvd.BlockSize = 2064; // Why oh why was it 2064 cdvdReadTimeRcnt(0); diff --git a/pcsx2/Misc.h b/pcsx2/Misc.h index 8136882a6b..3d9ab79080 100644 --- a/pcsx2/Misc.h +++ b/pcsx2/Misc.h @@ -84,7 +84,7 @@ 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_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 5ba354ba92..3b58c7807f 100644 --- a/pcsx2/windows/WinMain.c +++ b/pcsx2/windows/WinMain.c @@ -891,7 +891,7 @@ 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 & 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 +901,7 @@ 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_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 32e328cca5..303a27e3b9 100644 --- a/pcsx2/windows/pcsx2.rc +++ b/pcsx2/windows/pcsx2.rc @@ -89,7 +89,7 @@ BEGIN 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_DISABLED | WS_TABSTOP,12,44,252,10 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,44,252,10 CONTROL "VU Branch Hack - Special fix for Magna Carta; Breaks Crash Bandicoot!",IDC_GAMEFIX4, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,84,252,10 END