+static boolean canDoTurbo(void)
+{
+ u32 c = psxRegs.cycle;
+ return Config.TurboCD && !cdr.RetryDetected && !cdr.AdpcmActive
+ //&& c - psxRegs.intCycle[PSXINT_SPUDMA].sCycle > (u32)cdReadTime * 2
+ && c - psxRegs.intCycle[PSXINT_MDECOUTDMA].sCycle > (u32)cdReadTime * 16;
+}
+
static int cdrSeekTime(unsigned char *target)
{
int diff = msf2sec(cdr.SetSectorPlay) - msf2sec(target);
static int cdrSeekTime(unsigned char *target)
{
int diff = msf2sec(cdr.SetSectorPlay) - msf2sec(target);
void cdrPlayReadInterrupt(void)
{
int hit = CDR_prefetch(cdr.SetSectorPlay[0], cdr.SetSectorPlay[1], cdr.SetSectorPlay[2]);
void cdrPlayReadInterrupt(void)
{
int hit = CDR_prefetch(cdr.SetSectorPlay[0], cdr.SetSectorPlay[1], cdr.SetSectorPlay[2]);
memcpy(cdr.SetSectorPlay, cdr.SetSector, 4);
cdr.DriveState = DRIVESTATE_SEEK;
CDR_prefetch(cdr.SetSectorPlay[0], cdr.SetSectorPlay[1],
memcpy(cdr.SetSectorPlay, cdr.SetSector, 4);
cdr.DriveState = DRIVESTATE_SEEK;
CDR_prefetch(cdr.SetSectorPlay[0], cdr.SetSectorPlay[1],
CDRPLAYREAD_INT(cycles, 1);
SetPlaySeekRead(cdr.StatP, STATUS_SEEK);
CDRPLAYREAD_INT(cycles, 1);
SetPlaySeekRead(cdr.StatP, STATUS_SEEK);
cdr.Ctrl |= 0x40; // data fifo not empty
// What means the 0x10 and the 0x08 bits? I only saw it used by the bios
cdr.Ctrl |= 0x40; // data fifo not empty
// What means the 0x10 and the 0x08 bits? I only saw it used by the bios