Build a USB-to-NES Controller Adapter
⚠️ Coming Soon — USB2NES firmware is currently in development and has not been released yet. This guide is published early so you can gather parts and prepare. We'll update it when the firmware is available for download.
What Is This?
USB2NES lets you use any modern USB controller (Xbox, PlayStation, Switch, 8BitDo, etc.) on a real Nintendo Entertainment System. Plug your favorite USB controller into the adapter, plug the adapter into an NES controller port, and play.
Why would you want this?
- Use a modern controller on your NES — better D-pad, more comfortable grip
- 2 button mapping profiles — Default and Turbo layouts
- Analog stick to D-pad — left stick is automatically converted to digital D-pad input
- Every extra button maps to A or B — shoulders, triggers, and extra face buttons all map to NES A/B for maximum comfort
- Copilot mode — merge multiple USB controllers into one NES input
The NES has just 4 buttons (A, B, Start, Select) plus a D-pad — the simplest controller of the retro era. The adapter intelligently maps all your modern controller buttons to these inputs.
Parts List
| Part | Price | Where to Buy |
|---|---|---|
| Adafruit KB2040 | $8.95 | Adafruit |
| USB-A female breakout board | $2.50 | Adafruit |
| NES controller extension cable | $5–8 | Amazon / AliExpress |
| 22–26 AWG wire | $3–5 | Any electronics supplier |
| Soldering iron + solder | $15–30 | If you don't have one |
| USB-C data cable | ~$5 | For flashing firmware |
Total: ~$25–35 (less if you already have a soldering iron and wire).
Step 1: Prepare the NES Cable
Cut one end off an NES controller extension cable. You'll solder the loose wires to your KB2040.
NES Controller Port Pinout
Looking at the controller plug (7-pin):
┌──┬──┬──┬──┬──┬──┬──┐
│ 1│ 2│ 3│ 4│ 5│ 6│ 7│
└──┴──┴──┴──┴──┴──┴──┘
| Pin | Signal | Description |
|---|---|---|
| 1 | GND | Ground |
| 2 | Clock | Clock signal from console |
| 3 | Latch | Latch signal from console |
| 4 | Data | Serial data to console (active low) |
| 5 | N/C | Not connected |
| 6 | N/C | Not connected |
| 7 | VCC (+5V) | Power from console |
Strip about 5mm of insulation from each wire. Use a multimeter in continuity mode to identify which wire is which — NES cables aren't always color-coded consistently.
NES vs SNES: The NES and SNES use the same serial protocol — NES sends 8 bits (8 buttons), SNES sends 16 bits (12 buttons + 4 unused). The pinout is similar but not identical.
Step 2: Wire the NES Connection
KB2040 → NES Controller Port
| KB2040 Pin | NES Cable Pin | Signal | Notes |
|---|---|---|---|
| GPIO 7 | Pin 4 | DATA | Serial data out to console (PIO-driven) |
| GPIO 9 | Pin 3 | LATCH | Latch input from console |
| GPIO 10 | Pin 2 | CLOCK | Clock input from console |
| GPIO 6 | Pin 7 | 3.3V Detect | Console power detection |
| RAW/5V | Pin 7 | 5V Power | Powers the adapter from the NES |
| GND | Pin 1 | Ground | Common ground |
Important: LATCH and CLOCK must be on consecutive GPIO pins (GPIO 9 and GPIO 10) for the PIO state machine to work correctly.
Auto-bootloader: When the adapter is powered from USB (not from the NES), GPIO 6 won't detect console power, and the firmware automatically enters bootloader mode for easy flashing.
NES Protocol Overview
The NES uses an 8-bit active-low shift register protocol:
- Console raises LATCH for ~12µs to capture button states
- Console sends 8 CLOCK pulses
- On each clock edge, the adapter shifts out the next data bit
- Bit order: A, B, Select, Start, Up, Down, Left, Right
- Active LOW: 0 = pressed, 1 = released
Step 3: Wire the USB Host Port
Connect a USB-A breakout board to the KB2040 for controller input.
USB-A Connector Pinout
┌───────────────────┐
│ 1 2 3 4 │
└───────────────────┘
VBUS D- D+ GND
(5V)
KB2040 → USB-A Host
| KB2040 Pin | USB-A Pin | Signal | Wire Color (typical) |
|---|---|---|---|
| GPIO 16 | Pin 3 | D+ | Green |
| GPIO 17 | Pin 2 | D- | White |
| RAW/5V | Pin 1 | VBUS (5V) | Red |
| GND | Pin 4 | Ground | Black |
Wiring Tips
- ⚠️ D+ and D- are the #1 mistake — if your USB controller isn't detected, these are almost certainly swapped
- Keep USB wires under 15cm (6 inches)
- No USB hubs — PIO-USB only supports direct controller connections
Step 4: Flash the Firmware
⚠️ Firmware not yet released. USB2NES is in active development. Check github.com/joypad-ai/joypad-os/releases for availability.
Download the UF2
When available, download the right file for your board from the releases page:
| Board | Firmware File |
|---|---|
| KB2040 | joypad_*_usb2nes_kb2040.uf2 |
Enter Bootloader Mode
Option A (automatic): If the adapter isn't plugged into an NES, just connect it to your computer via USB-C — it enters bootloader mode automatically.
Option B (manual):
- Disconnect the board
- Hold BOOT on the KB2040
- While holding, plug the USB-C cable into your computer
- Release BOOT
RPI-RP2drive appears
Flash
- Drag and drop the
.uf2file onto theRPI-RP2drive - Drive auto-ejects — firmware is flashed
- Done!
Step 5: Test It
Basic Test (Without NES)
- Plug the adapter into your PC via USB-C
- Plug a USB controller into the USB-A port
- Open config.joypad.ai in Chrome
- You should see the controller in the input monitor
- Press buttons and verify they register
On the NES
- Power off the NES
- Plug the adapter into a controller port (the NES cable end)
- Plug a USB controller into the adapter's USB-A port
- Power on the NES
- Navigate menus and test in a game
LED Status
- 🔴 Red breathing = no controller connected (NES theme color)
- 🔴 Solid red = controller connected (Player 1)
- 🔵 Blue = Player 2 connected
Button Mapping Profiles
USB2NES has 2 built-in button mapping profiles:
How to Switch Profiles
- Hold Select for 2 seconds
- Press D-Pad Up/Down to cycle profiles
- LED flashes to confirm
- Profile saves to flash — persists across power cycles
Default Profile
Every extra button maps to A or B for maximum comfort — use whatever feels natural.
| Your Controller | NES Button |
|---|---|
| Cross / B | B |
| Circle / A | A |
| Square / X | B |
| Triangle / Y | A |
| L1 / LB | B |
| R1 / RB | A |
| L2 / LT | B |
| R2 / RT | A |
| Select / Back | Select |
| Start | Start |
| Left Stick | D-pad |
Turbo Profile
Same face button mapping, but all shoulder/trigger buttons map to A/B for rapid-fire two-finger alternation technique.
| Your Controller | NES Button |
|---|---|
| Cross / B | B |
| Circle / A | A |
| Square / X | B |
| Triangle / Y | A |
| L1 / LB | B (turbo) |
| R1 / RB | A (turbo) |
| L2 / LT | B (turbo) |
| R2 / RT | A (turbo) |
| Select | Disabled (profile switch) |
| Start | Start |
Turbo tip: Alternate between L1 and R1 (or any two shoulder/trigger buttons) to mash A rapidly — great for track & field games!
Troubleshooting
NES Doesn't Detect the Adapter
- Check your NES cable wiring — especially DATA on GPIO 7, LATCH on GPIO 9, CLOCK on GPIO 10
- Make sure 5V and GND are connected from the NES controller port
- Verify the 3.3V detect connection on GPIO 6
- Try a different controller port on the NES
USB Controller Not Detected
- D+ and D- swapped is the #1 cause — verify GPIO 16 → D+ (green) and GPIO 17 → D- (white)
- Make sure VBUS is providing 5V to the USB-A connector
- Try a different controller
Buttons Feel Wrong
- You might be on the wrong profile — Hold Select + D-Pad to cycle through Default and Turbo
- Remember: Cross→B and Circle→A follows NES positional layout
Adapter Goes Into Bootloader When Plugged Into NES
- Check the GPIO 6 → VCC connection — this pin detects console power
- Without this connection, the firmware thinks it's USB-only and enters bootloader mode
What's Next?
- USB2SNES Guide — Same concept for the Super Nintendo (12 buttons instead of 4)
- USB2GC Guide — Use your USB controller on a GameCube
- USB2USB Guide — Simpler build for USB-to-USB
- Controller Archive — Full compatibility list
- Community Discord — Share your build, get help
Estimated build time: 45–90 minutes (includes soldering). Difficulty: Medium.