A hardware adapter enabling a USB keyboard and an NES Controller to be used on an original Nintendo Entertainment System console. Built around the Raspberry Pi Pico 2 (RP2350).
| NES Controller Pin | Pico 2 Connection |
|---|---|
| Ground (GND) | GND |
| Clock (CLK) | GPIO 2 (Input) |
| Latch | GPIO 3 (Input) |
| Data | GPIO 4 (Output) |
| Power (+5V) | VBUS |
The Pico 2's GPIO pins are 5V-tolerant, so no level shifter is required. The NES console provides enough current to power both the Pico 2 and a standard USB keyboard.
| NES Button | Key |
|---|---|
| Up | W |
| Down | S |
| Left | A |
| Right | D |
| A | Numpad . |
| B | Numpad 0 |
| Start | Numpad 5 |
| Select | Numpad 4 |
A pre-built firmware file (picofirmware.uf2) is included in this repository.
- Hold down the BOOTSEL button on the Raspberry Pi Pico 2, then plug it into your computer via USB. It will appear as a removable drive.
- Copy
picofirmware.uf2to the drive. - The drive will automatically disconnect and the Pico 2 will reboot into the adapter firmware.
- Install Git and Visual Studio Code.
- Install the Raspberry Pi Pico extension from the VS Code Extensions marketplace. It will handle all SDK and toolchain dependencies automatically.
- Clone this repository and open the
firmware/folder in VS Code. - Open the Raspberry Pi Pico extension in the sidebar and select Compile Project.
- Once compilation finishes, connect the Pico 2 in BOOTSEL mode (hold BOOTSEL button, plug in via USB).
- Copy
build/picofirmware.uf2to theRP2350drive. The drive will disconnect automatically.
Key bindings are defined in firmware/keybinds.h using HID_KEY_* constants. Edit the values to remap any button, then rebuild and reflash using the steps above.
#define KEY_NES_A HID_KEY_KEYPAD_DECIMAL
#define KEY_NES_B HID_KEY_KEYPAD_0
#define KEY_NES_START HID_KEY_KEYPAD_5
#define KEY_NES_SELECT HID_KEY_KEYPAD_4
#define KEY_NES_UP HID_KEY_W
#define KEY_NES_DOWN HID_KEY_S
#define KEY_NES_LEFT HID_KEY_A
#define KEY_NES_RIGHT HID_KEY_DA full list of valid HID_KEY_* constants can be found in the TinyUSB HID keycodes header.

