CD drive commands: Difference between revisions

From NeoGeo Development Wiki
Jump to navigation Jump to search
(Created page with "=0: STATUS= No parameters. No-op just to read the status. =1: STOP ALL= No parameters. Stops CDDA playback, disk spin, and sets drive in data mode. =2: TOC COMMAND= CD dri...")
 
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
=0: STATUS=
These command formats probably also apply to other CD-ROM drives of the era, like the Sega CD's one.
No parameters. No-op just to read the status.


=1: STOP ALL=
All nibble values are in '''hex'''.
No parameters. Stops CDDA playback, disk spin, and sets drive in data mode.


=2: TOC COMMAND=
=Command 0: STATUS=
No parameters. No operation. May be used to just read the status.
 
Send:
{|class="wikitable"
!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:
{|class="wikitable"
!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=
[[CD drive|Nibble D]] is the sub-command code:
[[CD drive|Nibble D]] is the sub-command code:


==0: GET POSITION==
==Sub-command 0: GET POSITION==
MSF in status will be the current position from the beginning of the CD (absolute).
MSF in status will be the current position from the beginning of the CD (absolute).
==1: GET TRACK POSITION==
 
Send:
{|class="wikitable"
!Nibble
|0||1||2||3||4||5||6||7||8||9
|-
!Value
|2||0||0||'''0'''||0||0||0||0||0||Checksum (8)
|}
 
Get:
{|class="wikitable"
!Nibble
|0||1||2||3||4||5||6||7||8||9
|-
!Value
|?||'''0'''||colspan=6|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).
MSF in status will be the current position from the beginning of the track (relative).
==2: GET TRACK NUMBER==
 
Send:
{|class="wikitable"
!Nibble
|0||1||2||3||4||5||6||7||8||9
|-
!Value
|2||0||0||'''1'''||0||0||0||0||0||Checksum (7)
|}
 
Get:
{|class="wikitable"
!Nibble
|0||1||2||3||4||5||6||7||8||9
|-
!Value
|?||'''1'''||colspan=6|MSF position in current track||0||Checksum
|}
 
==Sub-command 2: GET TRACK NUMBER==
Minutes in status will be the current track.
Minutes in status will be the current track.
==3: GET CD LENGTH==
 
Send:
{|class="wikitable"
!Nibble
|0||1||2||3||4||5||6||7||8||9
|-
!Value
|2||0||0||'''2'''||0||0||0||0||0||Checksum (6)
|}
 
Get:
{|class="wikitable"
!Nibble
|0||1||2||3||4||5||6||7||8||9
|-
!Value
|?||'''2'''||colspan=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.
MSF in status will be the total CD length.
==4: GET FIRST AND LAST TRACKS==
 
Send:
{|class="wikitable"
!Nibble
|0||1||2||3||4||5||6||7||8||9
|-
!Value
|2||0||0||'''3'''||0||0||0||0||0||Checksum (5)
|}
 
Get:
{|class="wikitable"
!Nibble
|0||1||2||3||4||5||6||7||8||9
|-
!Value
|?||'''2'''||colspan=6|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.
Minutes in status will be the first track (normally 1), seconds will be the last.
==5: GET TRACK MSF==
 
Send:
{|class="wikitable"
!Nibble
|0||1||2||3||4||5||6||7||8||9
|-
!Value
|2||0||0||'''4'''||0||0||0||0||0||Checksum (4)
|}
 
Get:
{|class="wikitable"
!Nibble
|0||1||2||3||4||5||6||7||8||9
|-
!Value
|?||'''4'''||colspan=2|First track number||colspan=2|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.
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.


=3: PLAY=
Send:
* B: Minutes high digit
{|class="wikitable"
* C: Minutes low digit
!Nibble
* D: Seconds high digit
|0||1||2||3||4||5||6||7||8||9
* E: Seconds low digit
|-
* F: Frames high digit
!Value
* G: Frames low digit
|2||0||0||'''5'''||colspan=2|Desired track number||0||0||0||Checksum
|}
 
Get:
{|class="wikitable"
!Nibble
|0||1||2||3||4||5||6||7||8||9
|-
!Value
|?||'''5'''||colspan=6|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.


Starts playing audio at specified MSF.
Send:
{|class="wikitable"
!Nibble
|0||1||2||3||4||5||6||7||8||9
|-
!Value
|3||0||colspan=6|Start MSF||0||Checksum
|}


=4: SEEK=
=Command 4: SEEK=
* B: Minutes high digit
Moves pickup to specified MSF.
* C: Minutes low digit
* D: Seconds high digit
* E: Seconds low digit
* F: Frames high digit
* G: Frames low digit


Sets pickup at specified MSF.
Send:
{|class="wikitable"
!Nibble
|0||1||2||3||4||5||6||7||8||9
|-
!Value
|4||0||colspan=6|Seek MSF||0||Checksum
|}


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


=7: RESUME=
Send:
{|class="wikitable"
!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.
Resumes CDDA playback after pause.


=8: FAST-FORWARD=
Send:
Unknown.
{|class="wikitable"
!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 ?


=9: REWIND=
=Command 9: REWIND=
Unknown.
No parameters needed ?


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


=12: CLOSE=
=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.
Closes the tray on the front-loading NeoGeo CD.


=13: OPEN=
Send:
{|class="wikitable"
!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.
Opens the tray.
Send:
{|class="wikitable"
!Nibble
|0||1||2||3||4||5||6||7||8||9
|-
!Value
|13||0||0||0||0||0||0||0||0||Checksum (D)
|}


[[Category:CD systems]]
[[Category:CD systems]]

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)