CD drive commands: Difference between revisions
Line 153: | Line 153: | ||
|- | |- | ||
!Value | !Value | ||
|?||'''5'''||colspan=6|MSF of track start (see note above)|| | |?||'''5'''||colspan=6|MSF of track start (see note above)||Lower digit of track #||Checksum | ||
|} | |} | ||
Latest revision as of 23:13, 20 April 2019
These command formats probably also apply to other CD-ROM drives of the era, like the Sega CD's one.
All nibble values are in hex.
Command 0: STATUS
No parameters. No operation. May be used to just read the status.
Send:
Nibble | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
---|---|---|---|---|---|---|---|---|---|---|
Value | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | Checksum (A) |
Command 1: STOP ALL
No parameters. Stops disk, laser, and sets drive in data mode.
Send:
Nibble | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
---|---|---|---|---|---|---|---|---|---|---|
Value | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | Checksum (9) |
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:
Nibble | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
---|---|---|---|---|---|---|---|---|---|---|
Value | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | Checksum (8) |
Get:
Nibble | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
---|---|---|---|---|---|---|---|---|---|---|
Value | ? | 0 | Current absolute MSF position | 0 | Checksum |
Sub-command 1: GET TRACK POSITION
MSF in status will be the current position from the beginning of the track (relative).
Send:
Nibble | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
---|---|---|---|---|---|---|---|---|---|---|
Value | 2 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | Checksum (7) |
Get:
Nibble | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
---|---|---|---|---|---|---|---|---|---|---|
Value | ? | 1 | MSF position in current track | 0 | Checksum |
Sub-command 2: GET TRACK NUMBER
Minutes in status will be the current track.
Send:
Nibble | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
---|---|---|---|---|---|---|---|---|---|---|
Value | 2 | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | Checksum (6) |
Get:
Nibble | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
---|---|---|---|---|---|---|---|---|---|---|
Value | ? | 2 | Current track number | 0 | 0 | 0 | 0 | 0 | Checksum |
Sub-command 3: GET CD LENGTH
MSF in status will be the total CD length.
Send:
Nibble | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
---|---|---|---|---|---|---|---|---|---|---|
Value | 2 | 0 | 0 | 3 | 0 | 0 | 0 | 0 | 0 | Checksum (5) |
Get:
Nibble | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
---|---|---|---|---|---|---|---|---|---|---|
Value | ? | 2 | CD length in MSF | 0 | Checksum |
Sub-command 4: GET FIRST AND LAST TRACKS
Minutes in status will be the first track (normally 1), seconds will be the last.
Send:
Nibble | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
---|---|---|---|---|---|---|---|---|---|---|
Value | 2 | 0 | 0 | 4 | 0 | 0 | 0 | 0 | 0 | Checksum (4) |
Get:
Nibble | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
---|---|---|---|---|---|---|---|---|---|---|
Value | ? | 4 | First track number | Last track number | 0 | 0 | 0 | Checksum |
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:
Nibble | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
---|---|---|---|---|---|---|---|---|---|---|
Value | 2 | 0 | 0 | 5 | Desired track number | 0 | 0 | 0 | Checksum |
Get:
Nibble | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
---|---|---|---|---|---|---|---|---|---|---|
Value | ? | 5 | MSF of track start (see note above) | Lower digit of track # | Checksum |
Sub-command 6: GET ERROR
Unused ? Returns the last error code.
Command 3: PLAY
Starts playing from specified MSF.
Send:
Nibble | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
---|---|---|---|---|---|---|---|---|---|---|
Value | 3 | 0 | Start MSF | 0 | Checksum |
Command 4: SEEK
Moves pickup to specified MSF.
Send:
Nibble | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
---|---|---|---|---|---|---|---|---|---|---|
Value | 4 | 0 | Seek MSF | 0 | Checksum |
Command 6: PAUSE
Pauses CDDA playback (disk keeps spinning).
Send:
Nibble | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
---|---|---|---|---|---|---|---|---|---|---|
Value | 6 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | Checksum (4) |
Command 7: RESUME
Resumes CDDA playback after pause.
Send:
Nibble | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
---|---|---|---|---|---|---|---|---|---|---|
Value | 7 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | Checksum (3) |
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. "Access to the top of the specified tracK obtained the BCD code on the second byte."
Command 12: CLOSE
Closes the tray on the front-loading NeoGeo CD.
Send:
Nibble | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
---|---|---|---|---|---|---|---|---|---|---|
Value | 12 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | Checksum (E) |
Command 13: OPEN
Opens the tray.
Send:
Nibble | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
---|---|---|---|---|---|---|---|---|---|---|
Value | 13 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | Checksum (D) |