mirror of https://github.com/PCSX2/pcsx2.git
CDVD: Time reads by sectors per second instead of bytes
This commit is contained in:
parent
8cad96499d
commit
6bed14cb26
|
@ -689,11 +689,13 @@ static uint cdvdBlockReadTime(CDVD_MODE_TYPE mode)
|
|||
|
||||
const float sectorSpeed = (((float)(cdvd.SeekToSector - offset) / numSectors) * 0.60f) + 0.40f;
|
||||
|
||||
return ((PSXCLK * cdvd.BlockSize) / ((float)(((mode == MODE_CDROM) ? PSX_CD_READSPEED : PSX_DVD_READSPEED) * cdvd.Speed) * sectorSpeed));
|
||||
return (PSXCLK / ((((mode == MODE_CDROM) ? CD_SECTORS_PERSECOND : DVD_SECTORS_PERSECOND) * cdvd.Speed) * sectorSpeed));
|
||||
//return ((PSXCLK * cdvd.BlockSize) / ((float)(((mode == MODE_CDROM) ? PSX_CD_READSPEED : PSX_DVD_READSPEED) * cdvd.Speed) * sectorSpeed));
|
||||
}
|
||||
|
||||
// CLV Read Speed is constant
|
||||
return ((PSXCLK * cdvd.BlockSize) / (float)(((mode == MODE_CDROM) ? PSX_CD_READSPEED : PSX_DVD_READSPEED) * cdvd.Speed));
|
||||
//return ((PSXCLK * cdvd.BlockSize) / (float)(((mode == MODE_CDROM) ? PSX_CD_READSPEED : PSX_DVD_READSPEED) * cdvd.Speed));
|
||||
return (PSXCLK / (((mode == MODE_CDROM) ? CD_SECTORS_PERSECOND : DVD_SECTORS_PERSECOND) * cdvd.Speed));
|
||||
}
|
||||
|
||||
void cdvdReset()
|
||||
|
|
|
@ -132,6 +132,9 @@ static const uint tbl_ContigiousSeekDelta[3] =
|
|||
static const uint PSX_CD_READSPEED = 153600; // Bytes per second, rough values from outer CD (CAV).
|
||||
static const uint PSX_DVD_READSPEED = 1382400; // Bytes per second, rough values from outer DVD (CAV).
|
||||
|
||||
static const uint CD_SECTORS_PERSECOND = 75;
|
||||
static const uint DVD_SECTORS_PERSECOND = 675;
|
||||
|
||||
// Legacy Note: FullSeek timing causes many games to load very slow, but it likely not the real problem.
|
||||
// Games breaking with it set to PSXCLK*40 : "wrath unleashed" and "Shijou Saikyou no Deshi Kenichi".
|
||||
|
||||
|
|
Loading…
Reference in New Issue