diff options
author | Autechre | 2020-08-04 17:40:48 +0200 |
---|---|---|
committer | GitHub | 2020-08-04 17:40:48 +0200 |
commit | 31afa58d0576516307bb1f634bd23595d676f2f3 (patch) | |
tree | e8dd93683e1b0be27d7c58aae5864d34b3530fa5 | |
parent | 996dfb25c3a7ef8a485c3ce394a532cb0ee2e5c2 (diff) | |
parent | a34093eb63d1645fd2de9b412efe2587df9fdb3f (diff) | |
download | pcsx_rearmed-31afa58d0576516307bb1f634bd23595d676f2f3.tar.gz pcsx_rearmed-31afa58d0576516307bb1f634bd23595d676f2f3.tar.bz2 pcsx_rearmed-31afa58d0576516307bb1f634bd23595d676f2f3.zip |
Merge pull request #442 from negativeExponent/libretro
sync to latest upstream
-rw-r--r-- | libpcsxcore/cdrom.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libpcsxcore/cdrom.c b/libpcsxcore/cdrom.c index a417a52..43d25d3 100644 --- a/libpcsxcore/cdrom.c +++ b/libpcsxcore/cdrom.c @@ -539,6 +539,7 @@ void cdrInterrupt() { int start_rotating = 0; int error = 0; int delay; + unsigned int seekTime = 0; // Reschedule IRQ if (cdr.Stat) { @@ -910,6 +911,8 @@ void cdrInterrupt() { case CdlReadN: case CdlReadS: if (cdr.SetlocPending) { + seekTime = abs(msf2sec(cdr.SetSectorPlay) - msf2sec(cdr.SetSector)) * (cdReadTime / 200); + if(seekTime > 1000000) seekTime = 1000000; memcpy(cdr.SetSectorPlay, cdr.SetSector, 4); cdr.SetlocPending = 0; } @@ -949,7 +952,7 @@ void cdrInterrupt() { // - fix cutscene speech (startup) // ??? - use more accurate seek time later - CDREAD_INT((cdr.Mode & 0x80) ? (cdReadTime / 2) : cdReadTime * 1); + CDREAD_INT(((cdr.Mode & 0x80) ? (cdReadTime / 2) : cdReadTime * 1) + seekTime); } else { cdr.StatP |= STATUS_READ; cdr.StatP &= ~STATUS_SEEK; |