mirror of https://github.com/PCSX2/pcsx2.git
Finally found some decent values for cdvd timing, toa and dds work better
git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@34 a6443dda-0b58-4228-96e9-037be469359c
This commit is contained in:
parent
4360018451
commit
164bdf7724
26
pcsx2/CDVD.c
26
pcsx2/CDVD.c
|
@ -675,24 +675,32 @@ 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);
|
||||
|
||||
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
|
||||
readspeed = ((PSXCLK /1082400)/* 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;
|
||||
}
|
||||
|
||||
cdvdReadTime = readspeed; //+sector_difference/14;
|
||||
//if (sector_difference > 500000){SysPrintf("making longer\n");cdvdReadTime*=6;}
|
||||
|
||||
//simulates spin-up time, fixes hdloader
|
||||
if (cdvd.Sector < 17) cdvdReadTime=60000;
|
||||
else cdvdReadTime = readspeed;
|
||||
//SysPrintf("secdiff = %d cdvdReadTime = %d\n", sector_difference, cdvdReadTime);
|
||||
//SysPrintf("CDVD Cnt Time = %d\n", cdvd.nSectors);
|
||||
//last_sector = start_sector;
|
||||
last_sector = start_sector;
|
||||
}
|
||||
|
||||
//void cdvdReadTimeRcnt(int mode){ // Mode 0 is DVD, Mode 1 is CD
|
||||
|
|
Loading…
Reference in New Issue