u16 CmdInProgress;
u8 Irq1Pending;
u8 unused5;
- u32 LastReadCycles;
+ u32 LastReadSeekCycles;
u8 unused7;
cdr.ReportDelay--;
}
-// LastReadCycles
static int cdrSeekTime(unsigned char *target)
{
int diff = msf2sec(cdr.SetSectorPlay) - msf2sec(target);
- int pausePenalty, seekTime = abs(diff) * (cdReadTime / 2000);
+ int seekTime = abs(diff) * (cdReadTime / 2000);
seekTime = MAX_VALUE(seekTime, 20000);
// need this stupidly long penalty or else Spyro2 intro desyncs
- pausePenalty = (s32)(psxRegs.cycle - cdr.LastReadCycles) > cdReadTime * 8 ? cdReadTime * 25 : 0;
- seekTime += pausePenalty;
+ if ((s32)(psxRegs.cycle - cdr.LastReadSeekCycles) > cdReadTime * 8)
+ seekTime += cdReadTime * 25;
seekTime = MIN_VALUE(seekTime, PSXCLK * 2 / 3);
CDR_LOG("seek: %.2f %.2f\n", (float)seekTime / PSXCLK, (float)seekTime / cdReadTime);
void cdrPlayReadInterrupt(void)
{
- cdr.LastReadCycles = psxRegs.cycle;
+ cdr.LastReadSeekCycles = psxRegs.cycle;
if (cdr.Reading) {
cdrReadInterrupt();
memcpy(cdr.LocL, buf, 8);
UpdateSubq(cdr.SetSectorPlay);
cdr.TrackChanged = FALSE;
+ cdr.LastReadSeekCycles = psxRegs.cycle;
break;
case CdlTest: