if (cdr.Stat)
{
int i;
- SysPrintf("CDR IRQ=%d cmd %02x stat %02x: ",
- !!(cdr.Stat & cdr.Reg2), log_cmd, cdr.Stat);
+ SysPrintf("%u cdrom: CDR IRQ=%d cmd %02x stat %02x: ",
+ psxRegs.cycle, !!(cdr.Stat & cdr.Reg2), log_cmd, cdr.Stat);
for (i = 0; i < cdr.ResultC; i++)
SysPrintf("%02x ", cdr.Result[i]);
SysPrintf("\n");
int i;
if (cdr.Stat) {
- CDR_LOG_I("cdrom: cmd %02x with irqstat %x\n", cdr.CmdInProgress, cdr.Stat);
+ CDR_LOG_I("%u cdrom: cmd %02x with irqstat %x\n",
+ psxRegs.cycle, cdr.CmdInProgress, cdr.Stat);
return;
}
if (cdr.Irq1Pending) {
}
else if (cdr.Cmd && cdr.Cmd != (Cmd & 0xff)) {
cdr.CmdInProgress = cdr.Cmd;
- CDR_LOG_I("cdrom: cmd %02x came before %02x finished\n", cdr.Cmd, Cmd);
+ CDR_LOG_I("%u cdrom: cmd %02x came before %02x finished\n",
+ psxRegs.cycle, cdr.Cmd, Cmd);
}
setIrq(Cmd);
}
#ifdef CDR_LOG_CMD_IRQ
- SysPrintf("CD1 write: %x (%s)", rt, CmdName[rt]);
+ SysPrintf("%u cdrom: CD1 write: %x (%s)", psxRegs.cycle, rt, CmdName[rt]);
if (cdr.ParamC) {
int i;
SysPrintf(" Param[%d] = {", cdr.ParamC);
CDR_INT(5000);
}
else {
- CDR_LOG_I("cdr: cmd while busy: %02x, prev %02x, busy %02x\n",
- rt, cdr.Cmd, cdr.CmdInProgress);
+ CDR_LOG_I("%u cdrom: cmd while busy: %02x, prev %02x, busy %02x\n",
+ psxRegs.cycle, rt, cdr.Cmd, cdr.CmdInProgress);
if (cdr.CmdInProgress < 0x100) // no pending 2nd response
cdr.CmdInProgress = rt;
}
case 1:
if (cdr.Stat & rt) {
#ifdef CDR_LOG_CMD_IRQ
- SysPrintf("ack %02x (w %02x)\n", cdr.Stat & rt, rt);
+ SysPrintf("%u cdrom: ack %02x (w %02x)\n",
+ psxRegs.cycle, cdr.Stat & rt, rt);
#endif
+ // note: Croc vs Discworld Noir
if (!(psxRegs.interrupt & (1 << PSXINT_CDR)) &&
(cdr.CmdInProgress || cdr.Irq1Pending))
- CDR_INT(2000); // 710+
+ CDR_INT(850); // 711-993
}
cdr.Stat &= ~rt;