Skip to content

N64 to Dreamcast Bridge (KB2040)

Use an N64 controller on a Sega Dreamcast via Adafruit KB2040.

Parts Needed

  • Adafruit KB2040 (~$10)
  • N64 controller extension cable (cut to expose wires)
  • Dreamcast controller cable or connector (from extension cable or breakout)
  • Hookup wire (22-26 AWG), soldering iron

Wiring

N64 Controller (Input)

KB2040 GPIO N64 Signal Notes
GPIO 29 Data Bidirectional joybus data line (KB2040 pin A3)
3V3 3.3V Power to controller
GND GND Ground

The N64 controller uses a single-wire joybus protocol (same family as GameCube but different command set). GPIO 29 is used because it is on the analog-capable A3 pin of the KB2040.

Dreamcast Maple Bus (Output)

KB2040 GPIO DC Pin Signal Notes
GPIO 2 Pin 1 Data line A Maple bus SDCKA
GPIO 3 Pin 5 Data line B Maple bus SDCKB (must be GPIO 2 + 1)
5V Pin 3 +5V Power from Dreamcast
GND Pin 4 GND Ground

The Dreamcast maple bus requires two consecutive GPIO pins for the differential data lines.

Dreamcast Connector Pinout

  Looking at controller plug end:

    1 2 3 4 5
     -------
    |       |
    +---+---+

  1 = SDCKA (Data A)
  2 = Sense (3.3V, active when console detects controller)
  3 = +5V
  4 = GND
  5 = SDCKB (Data B)

Build and Flash

# Build
make n642dc_kb2040

# Flash: hold BOOTSEL while connecting USB, or double-tap reset
make flash-n642dc_kb2040

Output file: releases/joypad_<commit>_n642dc_ada_kb2040.uf2

Testing

  1. Connect the N64 controller to the KB2040 via the extension cable
  2. Connect the Dreamcast cable to a Dreamcast console
  3. Power on the Dreamcast -- the controller should be detected
  4. Press buttons on the N64 controller and verify input on the Dreamcast
  5. Verify analog stick movement maps correctly

Button Mapping

N64 Button Dreamcast Button
A A
B B
Z L Trigger
L --
R R Trigger
C-buttons Right analog stick directions
D-pad D-pad
Start Start
Analog stick Left analog stick

Notes

  • The KB2040 runs at 130 MHz for joybus timing on both the N64 input and Dreamcast output
  • This is a native-to-native bridge -- no USB involved in the data path
  • See N64 input docs and Dreamcast output docs for protocol details