mirror of https://github.com/PCSX2/pcsx2.git
Added a Tales of the Abyss gamefix "Slow DVD access", which fixes most of the game hangs. Note that the game still hangs from time to time, but its better now :)
Also fixed the hdloader hang when reading the DVD "TOC". Games can now be installed on HDD. git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@114 a6443dda-0b58-4228-96e9-037be469359c
This commit is contained in:
parent
e27fa9651c
commit
666dd22262
73
pcsx2/CDVD.c
73
pcsx2/CDVD.c
|
@ -671,35 +671,56 @@ void cdvdReset()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void cdvdReadTimeRcnt(int mode){ // Mode 0 is DVD, Mode 1 is CD
|
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
|
if (SLOWDVD){
|
||||||
//fixes most of Tales of the Abyss crashes and some Digital Devil Saga videos
|
int readspeed = 0; // 1 Sector size
|
||||||
//slightly longer loading times now (shouldnt be noticable)
|
int amount = 0; // Total bytes transfered at 1x speed
|
||||||
/*if (sector_difference > 128 && sector_difference < 1000000){
|
|
||||||
readspeed += (sector_difference+sector_difference) / 32;
|
static int last_sector = 0;
|
||||||
}
|
int start_sector = cdvd.Sector;
|
||||||
else if (sector_difference >= 1000000){
|
int sector_difference = abs(start_sector - last_sector);
|
||||||
readspeed += (sector_difference+sector_difference) / 4;
|
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
|
//void cdvdReadTimeRcnt(int mode){ // Mode 0 is DVD, Mode 1 is CD
|
||||||
|
|
|
@ -68,7 +68,7 @@
|
||||||
#define CHECK_ESCAPE_HACK (Config.Hacks & 0x400)
|
#define CHECK_ESCAPE_HACK (Config.Hacks & 0x400)
|
||||||
|
|
||||||
//------------ SPECIAL GAME FIXES!!! ---------------
|
//------------ 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_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_VUCLIPHACK (Config.GameFixes & 0x2) // Special Fix for GoW, updates the clipflag differently in recVUMI_CLIP() (note: turning this hack on, breaks Rockstar games)
|
||||||
|
|
||||||
|
|
|
@ -722,7 +722,7 @@ BOOL APIENTRY GameFixes(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
case WM_INITDIALOG:
|
case WM_INITDIALOG:
|
||||||
SetWindowText(hDlg, _("Game Specific Fixes"));
|
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 & 0x2) CheckDlgButton(hDlg, IDC_GAMEFIX2, TRUE);
|
||||||
if(Config.GameFixes & 0x4) CheckDlgButton(hDlg, IDC_GAMEFIX3, TRUE);
|
if(Config.GameFixes & 0x4) CheckDlgButton(hDlg, IDC_GAMEFIX3, TRUE);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@ -731,7 +731,7 @@ BOOL APIENTRY GameFixes(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
if (LOWORD(wParam) == IDOK)
|
if (LOWORD(wParam) == IDOK)
|
||||||
{
|
{
|
||||||
Config.GameFixes = 0;
|
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_GAMEFIX2) ? 0x2 : 0;
|
||||||
Config.GameFixes |= IsDlgButtonChecked(hDlg, IDC_GAMEFIX3) ? 0x4 : 0;
|
Config.GameFixes |= IsDlgButtonChecked(hDlg, IDC_GAMEFIX3) ? 0x4 : 0;
|
||||||
|
|
||||||
|
|
|
@ -84,10 +84,12 @@ BEGIN
|
||||||
PUSHBUTTON "Cancel",IDCANCEL,157,154,50,14
|
PUSHBUTTON "Cancel",IDCANCEL,157,154,50,14
|
||||||
CTEXT "Some games need special settings.\nConfigure them here.",IDC_STATIC,7,7,297,17
|
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,
|
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
|
GROUPBOX "PCSX2 Gamefixes",IDC_STATIC,6,30,294,112
|
||||||
CONTROL "FPU Clamp Hack - Special fix for Tekken 5 and maybe other games.",IDC_GAMEFIX3,
|
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
|
END
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue