#ifdef CDR_LOG
CDR_LOG("cdrWrite0() Log: CD0 write: %x\n", rt);
#endif
- cdr.Ctrl = rt | (cdr.Ctrl & ~0x3);
+ cdr.Ctrl = (rt & 3) | (cdr.Ctrl & ~3);
if (rt == 0) {
cdr.ParamP = 0;
}
#endif
- if (cdr.Ctrl & 0x1) return;
+ if (cdr.Ctrl & 0x3) return;
switch (cdr.Cmd) {
case CdlSync:
cdr.Reg2 = rt;
break;
}
- } else if (!(cdr.Ctrl & 0x1) && cdr.ParamP < 8) {
+ } else if (!(cdr.Ctrl & 0x3) && cdr.ParamP < 8) {
cdr.Param[cdr.ParamP++] = rt;
cdr.ParamC++;
}
}
- if (rt == 0x07 && cdr.Ctrl & 0x1) {
+ if (rt == 0x07 && (cdr.Ctrl & 3) == 1) {
cdr.Stat = 0;
if (cdr.Irq == 0xff) {
return;
}
- if (rt == 0x80 && !(cdr.Ctrl & 0x1) && cdr.Readed == 0) {
+ if (rt == 0x80 && !(cdr.Ctrl & 0x3) && cdr.Readed == 0) {
cdr.Readed = 1;
cdr.pTransfer = cdr.Transfer;