CD drive: Difference between revisions
(CDD protocol infos) |
m (→Communication) |
||
Line 125: | Line 125: | ||
==Communication== | ==Communication== | ||
{{Chipname|NEO-MGA}} takes care of the I/Os through registers {{Reg|REG_CDDCTRL}}, {{Reg|REG_CDDINPUT}}, {{Reg|REG_CDDOUTPUT}}. | CDD (CD Drive) to CDC (CD Controller, motherboard) communication uses an uncommon scheme, and is handled by the [[system ROM]]. {{Chipname|NEO-MGA}} takes care of the I/Os through registers {{Reg|REG_CDDCTRL}}, {{Reg|REG_CDDINPUT}}, {{Reg|REG_CDDOUTPUT}}. | ||
[[File:Cdunit4bit.png]] | [[File:Cdunit4bit.png]] | ||
* The CDD regularly sends a low pulse on its /IRQ output to initiate a data exchange. | * The CDD regularly (~64Hz) 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 CDD to CDC. | * HOCK goes low, indicating that the CDC aknowledges the request. The 4-bit bus direction is set to CDD to CDC. | ||
* CDCK goes low, indicating that the CDD is starting to send its status data (green A). Diagram fix: A should be ready on CDCK low. | * CDCK goes low, indicating that the CDD is starting to send its status data (green A). Diagram fix: A should be ready on CDCK low. | ||
* HOCK goes high and the CDC reads the status data (A). | * HOCK goes high and the CDC reads the status data (A). | ||
* CDCK | * CDCK returns high. | ||
* HOCK | * HOCK returns high. | ||
* CDCK goes low, the B word is ready. | * CDCK goes low, the B word is ready. | ||
* The cycle continues on for 10 words. | * The cycle continues on for 10 words. |
Revision as of 19:29, 2 June 2016
Or "CD drive". The part that fails before everything else in CD systems. Also see optical pickups.
The NeoGeo CD top-loading model drive was made by Sony. The CDZ one was made by Sharp ?
It is made of:
- A 4-bit maskROM MCU (Sony CXP5084), taking care of sequencing and communication (command execution and status report).
- A DSP (Sony CXD2500) to process analog data from the pickup.
- A servo controler (Sony CXA1372) to drive the pickup coils for tracking and focus.
- A spindle and sled motor driver (Rohm BA6396).
Connections
Some say the protocol was standard for the time, but clear information is hard to find. This was guessed from the system ROM disassembly and a logic analyzer.
Connector pinout, directions are from CDD (CD Drive) to CDC (CD Controller):
Pin # | Name | Type | Direction | Description |
1 | CDCK | Clock | Output | Tells the CDC when to change HOCK |
2 | ? | ? | ? | High ? |
3 | /IRQ | Signal | Output | Asks the CDC for a data exchange (low pulse at ~64Hz) |
4 | ? | ? | ? | High ? |
5 | HOCK | Clock | Input | Tells the CDD data is ready on D0~3 |
6 | D0~3 | Data | Both | 4-bit data bus |
7 | ||||
8 | ||||
9 | ||||
10 | ? | ? | ? | ? |
11 | BCLK? | Clock | Output | I2S bit clock, should be 44100 * 32 = 1.4112MHz |
12 | SDATA | Data | Output | I2S data |
13 | LRCK | Signal | Output | I2S word clock, should be 44100Hz. Audio L/R switch for the DAC. |
14 | MUTE? | Signal | Input | Put low to gate SDATA ? |
15 | GND | Power | - | Ground |
16 | 5V | Power | - | +5V for logic |
17 | 9V | Power | - | +9V for motors and coils |
18 | GND | Power | - | Ground |
Some signal has to be "D/M", an output which indicates if SDATA is audio or data. There's a /RESET somewhere also.
Communication
CDD (CD Drive) to CDC (CD Controller, motherboard) communication uses an uncommon scheme, and is handled by the system ROM. NEO-MGA takes care of the I/Os through registers REG_CDDCTRL, REG_CDDINPUT, REG_CDDOUTPUT.
- The CDD regularly (~64Hz) 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 to CDC.
- CDCK goes low, indicating that the CDD is starting to send its status data (green A). Diagram fix: A should be ready on CDCK low.
- HOCK goes high and the CDC reads the status data (A).
- CDCK returns high.
- HOCK returns high.
- CDCK goes low, the B word is ready.
- The cycle continues on for 10 words.
(The delay here is not necessary, but it can be seen on the NeoGeo CD and is caused by the system ROM program preparing stuff).
- HOCK goes low and the 4-bit bus direction is inverted (CDC to CDD). The command data is set (red A).
- CDCK goes low, indicating that the CDD has read the data (A).
- HOCK returns high.
- CDCK returns high.
- HOCK goes low, the B word is ready.
- The cycle continues on for 10 words.
Status data (green)
- A: Status
- 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)
- A: Command
- B~H: Depends on command
- I: Checksum (see below)
Checksum
The checksum digit is the sum of all 9 previous digits, + 5, XOR 15, modulo 15: ((sum + 5) ^ 0xF) & 0xF.
Commands
0: STATUS
No parameters.
1: STOP ALL
No parameters. Stops CDDA playback, disk spin, and sets drive in data mode.
2: TOC COMMAND
D: Command code:
0: GET POSITION
MSF in status will be the current position from the beginning of the CD (absolute).
1: GET TRACK POSITION
MSF in status will be the current position from the beginning of the track (relative).
2: GET TRACK NUMBER
Minutes in status will be the current track.
3: GET CD LENGTH
MSF in status will be the total CD length.
4: GET FIRST AND LAST TRACKS
Minutes in status will be the first track (normally 1), seconds will be the last.
5: GET TRACK NUMBER
MSF in status will be the start of the desired track. If the track is a data track, the frames high digit's fourth bit will be 1 (OR 8).
3: PLAY
- B: Minutes high digit
- C: Minutes low digit
- D: Seconds high digit
- E: Seconds low digit
- F: Frames high digit
- G: Frames low digit
Starts playing audio.
4: SEEK
- B: Minutes high digit
- C: Minutes low digit
- D: Seconds high digit
- E: Seconds low digit
- F: Frames high digit
- G: Frames low digit
Sets pickup at desired position.
6: PAUSE
Pauses CDDA playback (disk keeps spinning).
7: RESUME
Resumes CDDA playback.
8: FAST-FORWARD
Unknown.
9: REWIND
Unknown.
10: INIT
Sets pickup at lead-in ?
12: CLOSE
Closes the tray on the front-loading NeoGeo CD.
13: OPEN
Opens the tray.
Adjustments
To do !