# Background Information
## How a CD works
A CD-ROM stores data in a spiral "track" on its reflective surface. The 1s and 0s of data are represented by patterns of microscopic non-reflective lines on this spiral. As the disc spins, a laser module is precisely focused on the spiral and detects reflected light (or lack thereof) to read the data contained on the disc.
While this happens, the laser must be constantly nudged in two directions to maintain its ability to read the data:
- up and down: to maintain focus on the reflective surface, and
- radially in and out: to maintain its "tracking" on the spiral
## How a CD drive is calibrated
Both these types of movement have individual adjustments to make sure they happen reliably, even as a disc wobbles. On the PC-FX, they are primarily:
- **Focus Bias (aka Offset):** sets the ideal focus distance
- **Focus Gain:** sets how hard the laser gets nudged to maintain focus
- **Tracking Balance:** sets the ideal horizontal position relative to the spiral track
- **Tracking Gain:** sets how hard the laser gets nudged to maintain tracking
> [!NOTE] Another way of looking at it
> For those already familiar with control theory, the "Bias" and "Balance" adjustments tweak the set point, and the "Gain" adjustments are equivalent to the "P" term of a standard PID controller (the other terms are not used here).
This guide does not cover all possible adjustment types CD drives may have. Many simplifications have been made for the sake of clarity.
## Further reading
For a beginner-friendly look at how CDs work, see [Technology Connections' fantastic video series on the Compact Disc](https://www.youtube.com/watch?v=sAbhPeTp51s).
For more in-depth technical information on the workings and servicing of CD players, see [Understanding & Servicing CD Players by Ken Clements](https://archive.org/details/understandingandservicingcdplayers)
# CD Drive Adjustment Procedure
## Prerequisites
This procedure was written with the assumption you have the following:
- A \[mostly\] working PC-FX
- A clean, undamaged PC-FX game disc (see note below)
- Any oscilloscope with at least 1 standard 10x probe
- A T10 security Torx bit/driver[^1]
> [!INFO] Game selection requirements
> It is assumed your game of choice can automatically load to a menu screen which does not stream CD audio and does not have an "attract" mode. This screen should not change automatically when left idle, and the BUSY light should remain off.
>
> If your game does not automatically enter this state, you will also need to attach a controller and display to navigate to a suitable screen (such as a save selection menu).
^gameselection
In addition, probing can be made easier by assembling a CN102 breakout harness using a 10-position JST PH connector. Kits with pre-crimped wires can be found on Amazon and other sources by searching for "JST PH 10-pin kit". The relevant positions are pins 1, 2, 3, and 6.
![[Images/CN102 breakout harness.jpg]]
*A CN102 breakout harness and JST PH kit. Wires have solder added only at the tip to prevent fraying. Pin 2 (GND) has more insulation stripped away to make multi-probe attachment easier. Wires were labeled with a heatshrink label maker.*
## Step 0: Preparation
If you have not previously, gently clean the laser lens with a cotton swab and plain water.
Remove the left[^2] side panel of the PC-FX by removing two T10 security Torx[^1] screws on the underside of the console. The panel should slide down and then easily lift off.
Take a picture of the 4 white potentiometers in case you need to reset their positions for any reason.
Stand the console upright and attach the CN102 breakout harness if available.
> [!WARNING] CN102 short circuit potential!
> Regardless of if you are using a breakout harness for CN102, care should always be taken to avoid shorting its pins together or to other points within the machine.
>
> Always be careful when attaching oscilloscope probes, and unused wires from a breakout harness should be taped or clamped in such a way that there is no risk of accidental short circuits.
Insert a disc, apply power, and make sure no additional data is being read. This can often be achieved by navigating to a game menu without CD audio (BUSY light must stay off, see [[#^gameselection|Game selection requirements]]).
Connect your oscilloscope probe's ground lead to **CN102 pin 2** (GND). If you do not have a breakout harness for CN102, the metal shield may be used instead.
> [!INFO] What to do if your CD stops spinning
> If after several minutes of adjustment your CD stops spinning, it is likely entering a standby mode. Simply open the CD door and close it to start it spinning again.
## Step 1: Focus Bias
Configure your oscilloscope:
- AC coupling
- Normal trigger mode
- Vertical scale ~200mV/div
- Horizontal scale ~500ns/div
Probe **CN102 pin 1** (RFO, RF Output).
Adjust **VR102** (Focus Bias) until the eye diagram is at its largest amplitude.
![[Images/S1.0 - Eye diagram.png]]
*RF Output eye diagram. The small "whisps" seen left-of-center are expected.*
## Step 2: Tracking Balance
### Part A
Configure your oscilloscope:
- DC coupling
- Auto trigger mode
- Vertical scale ~500mV/div
- Horizontal scale ~500μs/div
(note both vertical and horizontal scaling have changed from the previous step)
Probe **CN102 pin 3** (VGND, Virtual Ground) and adjust the DC offset such that it is centered vertically on the screen. Make note of the offset voltage. If you have multiple oscilloscope channels, repeating this with a second probe to use as a reference trace may make future steps easier.
![[Images/S2.0 - VGND trace.png]]
*VGND trace with DC offset shown.*
### Part B
Configure your oscilloscope:
- Normal trigger mode
Probe **CN102 pin 6** (TE, Tracking Error) without adjusting vertical scale or position. Adjust the trigger point until you see the large periodic spikes.
![[Images/S2.1 - Tracking Error spike.png]]
*Tracking Error spike. These are due to the laser jumping back a track once per rotation.*
### Part C
> [!INFO] Heads up!
> These instructions will temporarily disable tracking, causing the drive to make unusual noises and the console to become confused. It is expected for the drive to start acting strangely once tracking is disabled for several seconds. When this happens, re-enable tracking and wait for the drive to stabilize before repeating.
Make mental note of where **VR101** (Tracking Balance) is located.
Disable tracking by turning VR103 fully clockwise, then adjust **VR101** until the trace is balanced above and below the center line.
Re-enable tracking by centering VR103.
![[Images/S2.2 - Tracking Error (correct).png]]
*VR101 set correctly, with TE centered about VGND.*
## Step 3: Tracking Gain
Adjust **VR103** (Tracking Gain) counter-clockwise until there is ringing on the right side of the trace. This is visible as high-frequency oscillation, and audible as a "squeak".
Adjust **VR103** clockwise until the ringing disappears, then roughly an additional 30 degrees.
![[Images/S3.0 - Tracking Error (ringing) .png]]
*Tracking Error ringing (self-oscillation due to gain being too high).*
![[Images/S3.1 - Tracking Error (correct).png]]
*Tracking Error with VR103 set correctly.*
## Step 4: Focus Gain
> [!INFO] Focus Gain is not a precise adjustment
> Focus Gain is an approximate adjustment and the target position is only a loose guideline. Different discs will show different average error for the same setting, and in general the precise value is not important.
>
> Do not spend significant effort trying to adjust VR104 perfectly!
Configure your oscilloscope:
- Auto trigger mode
- Vertical scale 100mV/div
Re-adjust DC offset to its previous value. If you are using a second channel, do not adjust its scale or DC offset.
Remove your probe's grabber and probe the **FE** (Focus Error) signal on the PCB. This can be accessed using the via located 5mm above VR104 (see image below).
Adjust **VR104** (Focus Gain) until **FE** averages approximately 100mV above VGND, or one division above the center line. It may be helpful to enable a cursor that shows the average voltage, if your oscilloscope supports it.
![[Images/FE signal location.jpg]]
*FE signal probe location.*
![[Images/S4.0 - Focus Error (correct).png]]
*Focus Error with VR104 set correctly.*
## Step 5: Finishing up
### Verify functionality
If you have problematic discs, you may attempt to run them and tweak **VR103** (Tracking Gain) and **VR104** (Focus Gain) slightly to see if it helps operation. Do not turn more than 45 degrees (1/8 turn) in either direction. If no significant improvement is found, revert their positions.
Try reading at least one other disc. If any disc makes a noticeable "squeaking" sound during play, adjust **VR103** (Tracking Gain) slowly clockwise until it stops, then an additional 15 degrees. If the sound does not stop, or takes significant adjustment, repeat the procedure from [[#Step 2 Tracking Balance|step 2]] using that disc.
### Troubleshoot
If you still have issues reading discs in general, verify they are free of dust, are not deeply scratched, and check that the eye diagram (see [[#Step 1 Focus Bias|Step 1]]) is creating distinct regions. A clean eye diagram points to issues elsewhere in the system.
If the eye diagram is indistinct or low in amplitude (<~500mV peak-to-peak), you might try repeating the entire procedure from [[#Step 1 Focus Bias|step 1]], or you may need to replace your laser assembly.
### Reassemble the PC-FX
Remove power from the system, remove any probes that may be present, and reattach the side panel using the two screws.
Congratulations on maintaining your vintage electronics! 🎉
# Additional Information
## CN102 Pinout
**Pin 1:** RFO - RF Output
**Pin 2:** GND - signal Ground
**Pin 3:** VGND - Virtual Ground
**Pin 4:** FE - Focus Error (attenuated)[^3]
**Pin 6:** TE - Tracking Error
**Pin 7:** TE - Tracking Error (attenuated)[^4]
**Pin 9:** sled motor output
**Pin 10:** spindle motor output
Unlisted pins do not contain useful measurements.
## Adjustment Potentiometers
**VR101:** Tracking Balance
**VR102:** Focus Bias/Offset
**VR103:** Tracking Gain
**VR104:** Focus Gain
**VR105:** Sled Gain
**VR106:** PLL Frequency
> [!INFO] Note
> VR105 and VR106 are the two blue potentiometers and should generally not be touched.
## Special Thanks to
[Regis Galland](https://github.com/rgalland) for their work [reverse engineering the PC-FX CD board](https://github.com/pcfx-devel/PC-FX_Info/blob/main/PC-FX/schematics/CD_board/Output/Schematics/0.1/CD_board.pdf)
[David Shadoff](https://github.com/dshadoff) for their work on [researching, organizing, and developing PC-FX technical documentation and tools](https://github.com/pcfx-devel)
[^1]: Later revisions of the PC-FX use cross-head screws instead.
[^2]: when looking at the front of the machine
[^3]: This signal is attenuated by VR104, it is not the raw FE signal straight from the RF amplifier (IC101) and as required in Step 4.
[^4]: This signal is attenuated by VR103, it is not the raw TE signal as seen on CN102 pin 6.