# Project Frankenstein: Volume XII

## BH6590KU Driver & Servo Mapping

This volume details the hardware interface between the MN103S CPU and the ROHM BH6590KU servo/signal processor in the GCC-4241N recipient. Mapping these registers is essential for implementing high-gain tracking for Xbox Game Discs (XGD), which have tighter track geometry than standard DVDs [cite: User Summary, Volume I: GDR-8050L Spec].

## 1. The BH6590KU Hardware Interface

The BH6590KU manages the laser focus, tracking, and spindle motor control. The MN103S communicates with it through a series of memory-mapped registers and a high-speed serial interface (SPI) [cite: User Summary].

### Theory: Servo Gain Redirection

The donor GDR-8050L uses the AN22107A driver. Its high-gain "tuner" routine at `0x90030687` is hardcoded for that specific chip [cite: Volume I: GDR-8050L Spec]. Since the 4241N uses the BH6590KU, we must intercept this call and redirect it to a Servo Shim in our RAM cave that translates the intent into BH6590KU register writes [cite: User Summary, Volume I: GDR-8050L Spec].

## 2. Critical Servo Registers (4241N)

The following internal register offsets within the BH6590KU logic control the physical behavior of the laser during tracking [cite: User Summary].

Parameter | Register Offset | Description
--- | --- | ---
Focus Gain | `0x0042` | Adjusts the sensitivity of the lens's vertical movement.
Tracking Gain | `0x0044` | Controls the sensitivity of horizontal track following; critical for XGD [cite: User Summary].
Focus Offset | `0x0048` | Fine-tunes the focal point for specific media layers (DL) [cite: User Summary].
Tracking Offset | `0x004A` | Corrects lateral alignment errors during high-speed seek.

## 3. The Servo Shim Logic (SRAM Cave)

This routine is injected at `0x40008600`. It mimics the behavior of the donor's `0x90030687` routine but uses native 4241N driver commands [cite: 129_perfect_trampoline_v18.py, Volume I: GDR-8050L Spec].

    ; MN103S Assembly: BH6590KU High-Gain Shim
    ; Target: RAM Cave 0x40008600
    Servo_HighGain_Shim:
        mov     0x0044, d0      ; Target: Tracking Gain Register
        mov     0x7F, d1        ; High-Gain Value (Maximum sensitivity)
        call    Native_SPI_Write; Write to BH6590KU Serial Interface

        mov     0x0042, d0      ; Target: Focus Gain Register
        mov     0x6A, d1        ; Optimized value for XGD pits
        call    Native_SPI_Write

        ret                     ; Return to main firmware loop

## 4. Implementing the Tracking Override

To enable safe tracking of original Xbox discs, we must hook the native 4241N "Dual Layer Init" routine [cite: User Summary].

Hook Point | ROM Offset | Description
--- | --- | ---
DL Servo Init | `0x38B4A` | Initializes the BH6590KU for DVD-9 media. Intercept here to apply XGD gain offsets [cite: User Summary].
Laser Power DAC | `0x3910C` | Adjusts physical laser diode output for high-speed reading.

### Why Native Calibration Matters

Xbox discs (XGD) utilize the same physical layer properties as Dual-Layer DVDs but with a tighter track pitch in the "Game Partition." By triggering the native DL Servo Init (recipient logic) rather than copying the donor's register values, we ensure the BH6590KU performs a safe physical calibration before our high-gain shim applies the final tweaks [cite: User Summary].