CDVD: Correct DMA timing if sectors are buffered.

This commit is contained in:
refractionpcsx2 2022-11-26 16:12:45 +00:00
parent 038e22e5db
commit 01179c69ec
1 changed files with 12 additions and 1 deletions

View File

@ -1383,8 +1383,19 @@ static uint cdvdStartSeek(uint newsector, CDVD_MODE_TYPE mode)
CDVDSECTORREADY_INT(seektime);
seektime += (cdvd.BlockSize / 4) * 12;
}
else
else if (!isSeeking) // Not seeking but we have buffered stuff, need to just account for DMA time (and kick the read DMA if it's not running for some reason.
{
if (!(psxRegs.interrupt & (1 << IopEvt_CdvdSectorReady)))
{
seektime += cdvd.ReadTime;
CDVDSECTORREADY_INT(seektime);
}
seektime += (cdvd.BlockSize / 4) * 12;
}
else // We're seeking, so kick off the buffering after the seek finishes.
{
CDVDSECTORREADY_INT(seektime);
}
// Clear the action on the following command, so we can rotate after seek.
if (cdvd.nCommand != N_CD_SEEK)