diff --git a/pcsx2/CDVD.c b/pcsx2/CDVD.c index 989e217895..67f795ed45 100644 --- a/pcsx2/CDVD.c +++ b/pcsx2/CDVD.c @@ -671,35 +671,56 @@ void cdvdReset() #endif } + void cdvdReadTimeRcnt(int mode){ // Mode 0 is DVD, Mode 1 is CD - int readspeed = 0; // 1 Sector size - int amount = 0; // Total bytes transfered at 1x speed - - //static int last_sector = 0; - //int start_sector = cdvd.Sector; - //int sector_difference = abs(start_sector - last_sector); - amount = cdvd.BlockSize; // in Bytes - - if(mode == 0) - readspeed = ((PSXCLK /1382400)/* 1 Byte Time @ x1 NOTE: was (PSXCLK /1382400)*/ * amount) / cdvd.Speed; //1350KB = dvd x 1 - else - readspeed = ((PSXCLK /153600)/* 1 Byte Time @ x1 */ * amount) / cdvd.Speed; //150KB = cd x 1 - //add cycles due to access times, based on try and error - //fixes most of Tales of the Abyss crashes and some Digital Devil Saga videos - //slightly longer loading times now (shouldnt be noticable) - /*if (sector_difference > 128 && sector_difference < 1000000){ - readspeed += (sector_difference+sector_difference) / 32; - } - else if (sector_difference >= 1000000){ - readspeed += (sector_difference+sector_difference) / 4; - }*/ + if (SLOWDVD){ + int readspeed = 0; // 1 Sector size + int amount = 0; // Total bytes transfered at 1x speed + + static int last_sector = 0; + int start_sector = cdvd.Sector; + int sector_difference = abs(start_sector - last_sector); + amount = cdvd.BlockSize; // in Bytes + + if(mode == 0) + readspeed = ((PSXCLK /1382400)/* 1 Byte Time @ x1 */ * amount) / cdvd.Speed; //1350KB = dvd x 1 + else + readspeed = ((PSXCLK /153600)/* 1 Byte Time @ x1 */ * amount) / cdvd.Speed; //150KB = cd x 1 + + //add cycles due to access times, based on try and error + //fixes most of Tales of the Abyss crashes and some Digital Devil Saga videos + //slightly longer loading times now + if (sector_difference > 128 && sector_difference < 1000000){ + readspeed += (sector_difference+sector_difference) / 32; + } + else if (sector_difference >= 1000000){ + readspeed += (sector_difference+sector_difference) / 4; + } + + //simulates spin-up time, fixes hdloader + if (cdvd.Sector == 16 /* DVD TOC */) readspeed = 30000; + cdvdReadTime = readspeed; + //SysPrintf("secdiff = %d cdvdReadTime = %d\n", sector_difference, cdvdReadTime); + last_sector = start_sector; + } + else { + int readspeed = 0; // 1 Sector size + int amount = 0; // Total bytes transfered at 1x speed + + amount = cdvd.BlockSize; // in Bytes + + if(mode == 0) + readspeed = ((PSXCLK /1382400)/* 1 Byte Time @ x1 */ * amount) / cdvd.Speed; //1350KB = dvd x 1 + else + readspeed = ((PSXCLK /153600)/* 1 Byte Time @ x1 */ * amount) / cdvd.Speed; //150KB = cd x 1 + + //simulates spin-up time, fixes hdloader + if (cdvd.Sector == 16 /* DVD TOC */) readspeed = 30000; + cdvdReadTime = readspeed; + //SysPrintf("secdiff = %d cdvdReadTime = %d\n", sector_difference, cdvdReadTime); + } - //simulates spin-up time, fixes hdloader - cdvdReadTime = readspeed; - //SysPrintf("secdiff = %d cdvdReadTime = %d\n", sector_difference, cdvdReadTime); - //SysPrintf("CDVD Cnt Time = %d\n", cdvd.nSectors); - //last_sector = start_sector; } //void cdvdReadTimeRcnt(int mode){ // Mode 0 is DVD, Mode 1 is CD diff --git a/pcsx2/Misc.h b/pcsx2/Misc.h index 1a7b380090..8a0c3dc70c 100644 --- a/pcsx2/Misc.h +++ b/pcsx2/Misc.h @@ -68,7 +68,7 @@ #define CHECK_ESCAPE_HACK (Config.Hacks & 0x400) //------------ 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 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) diff --git a/pcsx2/windows/WinMain.c b/pcsx2/windows/WinMain.c index a22403c76b..767ca83ba5 100644 --- a/pcsx2/windows/WinMain.c +++ b/pcsx2/windows/WinMain.c @@ -722,7 +722,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); + 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; @@ -731,7 +731,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; + Config.GameFixes |= IsDlgButtonChecked(hDlg, IDC_GAMEFIX1) ? 0x1 : 0; Config.GameFixes |= IsDlgButtonChecked(hDlg, IDC_GAMEFIX2) ? 0x2 : 0; Config.GameFixes |= IsDlgButtonChecked(hDlg, IDC_GAMEFIX3) ? 0x4 : 0; diff --git a/pcsx2/windows/pcsx2.rc b/pcsx2/windows/pcsx2.rc index 8c5194f100..68b82f3fbb 100644 --- a/pcsx2/windows/pcsx2.rc +++ b/pcsx2/windows/pcsx2.rc @@ -84,10 +84,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,60,252,10 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,71,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,47,253,10 + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,58,253,10 + CONTROL "Slow DVD access (fixes Tales of the Abyss)",IDC_GAMEFIX1, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,44,252,10 END