CDR_LOG("ReadTrack *** %02x:%02x:%02x\n", tmp[0], tmp[1], tmp[2]);
- cdr.RErr = CDR_readTrack(tmp);
+ cdr.NoErr = CDR_readTrack(tmp);
memcpy(cdr.Prev, tmp, 3);
if (CheckSBI(time))
cdr.Seeked = SEEK_DONE;
if (cdr.Irq == 0) {
cdr.Stat = Complete;
- cdr.RErr = 1;
setIrq();
}
do_CdlPlay:
case CdlPlay:
StopCdda();
- /* It would set it to SEEK_DONE*/
- cdr.Seeked = SEEK_PENDING;
+ if (cdr.Seeked == SEEK_PENDING) {
+ // XXX: wrong, should seek instead..
+ cdr.Seeked = SEEK_DONE;
+ }
cdr.FastBackward = 0;
cdr.FastForward = 0;
case CdlForward:
// TODO: error 80 if stopped
cdr.Stat = Complete;
- cdr.RErr = 1;
// GameShark CD Player: Calls 2x + Play 2x
cdr.FastForward = 1;
cdr.FastBackward = 0;
case CdlStandby + 0x100:
cdr.Stat = Complete;
- cdr.RErr = 1;
break;
case CdlStop:
cdr.StatP &= ~STATUS_ROTATING;
cdr.Result[0] = cdr.StatP;
cdr.Stat = Complete;
- cdr.RErr = 1;
break;
case CdlPause:
cdr.StatP &= ~STATUS_READ;
cdr.Result[0] = cdr.StatP;
cdr.Stat = Complete;
- cdr.RErr = 1;
break;
case CdlReset:
case CdlReset + 0x100:
cdr.Stat = Complete;
- cdr.RErr = 1;
break;
case CdlMute:
case CdlReadT + 0x100:
cdr.Stat = Complete;
- cdr.RErr = 1;
break;
case CdlGetTN:
/* This adds the string "PCSX" in Playstation bios boot screen */
memcpy((char *)&cdr.Result[4], "PCSX", 4);
cdr.Stat = Complete;
- cdr.RErr = 1;
break;
case CdlInit:
case CdlReadToc + 0x100:
cdr.Stat = Complete;
- cdr.RErr = 1;
no_busy_error = 1;
break;
buf = CDR_getBuffer();
if (buf == NULL)
- cdr.RErr = 0;
+ cdr.NoErr = 0;
- if (cdr.RErr == 0) {
+ if (cdr.NoErr == 0) {
CDR_LOG_I("cdrReadInterrupt() Log: err\n");
memset(cdr.Transfer, 0, DATA_SIZE);
cdr.Stat = DiskError;