CD drive commands

These command formats probably also apply to many CD drives of the era, like the Sega CD's one.

All nibble values are in hex.

=Command 0: STATUS= No parameters. No-op just to read the status.

Send:

=Command 1: STOP ALL= No parameters. Stops CDDA playback, disk spin, and sets drive in data mode.

Send:

=Command 2: TOC COMMAND= Nibble D is the sub-command code:

Sub-command 0: GET POSITION
MSF in status will be the current position from the beginning of the CD (absolute).

Send:

Get:

Sub-command 1: GET TRACK POSITION
MSF in status will be the current position from the beginning of the track (relative).

Send:

Get:

Sub-command 2: GET TRACK NUMBER
Minutes in status will be the current track.

Send:

Get:

Sub-command 3: GET CD LENGTH
MSF in status will be the total CD length.

Send:

Get:

Sub-command 4: GET FIRST AND LAST TRACKS
Minutes in status will be the first track (normally 1), seconds will be the last.

Send:

Get:

Sub-command 5: GET TRACK MSF
MSF in status will be the start of the desired track (nibbles E and F). If the track is a data track, the frames upper digit's 4th bit will be 1.

Send:

Get:

Sub-command 6: GET TRACK TYPE
Unused ? Sets a flag similar to the one set by sub-command 5.

=Command 3: PLAY=

Starts playing audio at specified MSF.

Send:

=Command 4: SEEK= Moves pickup sled at specified MSF.

Send:

=Command 6: PAUSE= Pauses CDDA playback (disk keeps spinning).

Send:

=Command 7: RESUME= Resumes CDDA playback after pause.

Send:

=Command 8: FAST-FORWARD= No parameters needed ?

=Command 9: REWIND= No parameters needed ?

=Command 10: INIT= Seeks to CD lead-in ?

=Command 11: Unknown=

Used but unknown behavior.

=Command 12: CLOSE= Closes the tray on the front-loading NeoGeo CD.

Send:

=Command 13: OPEN= Opens the tray.

Send: