CD drive commands: Difference between revisions

From NeoGeo Development Wiki
Jump to navigation Jump to search
No edit summary
Line 132: Line 132:
|-
|-
!Value
!Value
|?||'''4'''||colspan=2|First track number||colspan=2|Last track number||0||Checksum
|?||'''4'''||colspan=2|First track number||colspan=2|Last track number||0||0||0||Checksum
|}
|}



Revision as of 01:43, 20 April 2019

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:

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 CDDA playback, disk spin, 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) ? Checksum

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:

Nibble 0 1 2 3 4 5 6 7 8 9
Value 3 0 Start MSF 0 Checksum

Command 4: SEEK

Moves pickup sled at 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.

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)