CD drive control

Communication between the CD Drive (CDD) and the CD Controller (CDC) is done via a special 4-bit protocol handled by the system ROM.

The chip provides the I/Os through registers, , and.




 * The CDD regularly (~64Hz not 75) sends a low pulse on its /IRQ output to initiate a data exchange.
 * HOCK goes low, indicating that the CDC aknowledges the request. The 4-bit bus direction is set to CDD -> CDC.
 * CDCK goes low, indicating that the CDD is starting to send its status data (A).
 * HOCK goes high and the CDC reads the status data (A).
 * CDCK returns high.
 * HOCK returns low.
 * CDCK goes low again, the B word is ready.
 * The cycle continues on for 10 words...

(The delay here is not necessary, it is seen on the NeoGeo CD because of the system ROM preparing stuff).


 * HOCK goes low and the 4-bit bus direction is reversed (CDC -> CDD). The first command word is set (K).
 * CDCK goes low, indicating that the CDD has read the data (A).
 * HOCK returns high.
 * CDCK returns high.
 * HOCK goes low again, the B word is ready.
 * The cycle continues on for 10 words...

=Status data (green)=


 * A: Status
 * 0=Stop mode
 * 1=Playing data or music
 * 2=Seeking
 * 4=Paused
 * 5=Tray opened
 * 6=Comm. checksum error
 * 7=Command error
 * 8=Function error (mech/laser ?)
 * 9=Reading TOC
 * 10=Sled moving
 * 11=Couldn't focus, no disk
 * 12=Sled at edge, end of disk
 * 14=Tray moving
 * 15=In test mode
 * B: Status
 * C: Minutes high digit
 * D: Minutes low digit
 * E: Seconds high digit
 * F: Seconds low digit
 * G: Frames high digit
 * H: Frames low digit
 * I: Extension
 * J: Checksum (see below)

=Command data (red)=


 * K: Command
 * L~S: Depends on command (see below)
 * T: Checksum (see below)

=Checksum=

The checksum digit is the sum of all 9 previous digits, + 5, XOR 15, AND 15: ((sum + 5) ^ 0xF) & 0xF.

=Commands=

See CD drive commands.