N64 Output Interface¶
Emulates an N64 controller connected to an N64 console via the single-wire joybus protocol. Includes rumble pak emulation so games detect a rumble pak and forward vibration to the connected Bluetooth controller.
Protocol¶
- Wire protocol: Single-wire bidirectional joybus at 250kHz
- PIO program:
joybus.pio(fromlib/joybus-pio) - Clock: Standard clock speed (no overclock needed, unlike GameCube)
- Data pin: GPIO 7 (default), GPIO 2 (Pico W builds)
- Core: Runs on Core 1, entirely from RAM (
__not_in_flash_func)
On Pico 2 W (RP2350), Core 1's joybus handler must be fully RAM-resident to avoid flash contention with CYW43 Bluetooth bonding storage on Core 0.
N64 Controller Port Pinout¶
Looking at the front of the console's controller port:
| Pin | Signal | Description |
|---|---|---|
| 1 | GND | Ground |
| 2 | Data | Bidirectional data line |
| 3 | 3.3V | Power |
| 4 | N/C | Not connected |
| 5 | N/C | Not connected |
| 6 | GND | Ground |
Cold Boot Detection¶
The adapter detects N64 console power-on and responds to the PIF's initial controller probe. Works whether the adapter powers on with the console or is already running.
Player Support¶
- Max players: 1 per adapter (no multitap support)
Button Mapping¶
Uses N64_BUTTON_* aliases defined in n64_buttons.h:
| JP_BUTTON_* | N64 Button | Notes |
|---|---|---|
JP_BUTTON_B1 |
A | Primary action |
JP_BUTTON_B3 |
B | Secondary action |
JP_BUTTON_B2 |
C-Down | C-button |
JP_BUTTON_B4 |
C-Left | C-button |
JP_BUTTON_L1 |
L | Left shoulder |
JP_BUTTON_R1 |
R | Right shoulder |
JP_BUTTON_L2 |
Z | Z trigger (under controller) |
JP_BUTTON_R2 |
C-Up | C-button |
JP_BUTTON_R3 |
C-Right | C-button |
JP_BUTTON_S2 |
Start | Start button |
JP_BUTTON_DU/DD/DL/DR |
D-pad | Direct mapping |
Right stick is converted to C-buttons using a threshold.
Analog Mapping¶
| Input | N64 Output | Notes |
|---|---|---|
| Left stick X/Y | Control Stick | Y-axis inverted (HID 0=up to N64 convention) |
The N64 analog stick reports signed values (-80 to +80 range). The adapter scales from HID 0-255 range.
Feedback¶
Rumble Pak¶
The adapter identifies itself as having a rumble pak inserted. Games that check for controller accessories detect it. When a game activates rumble, the vibration is forwarded to the Bluetooth controller:
- Left (heavy) motor: ~50% intensity when N64 rumble is active
- Right (light) motor: Gentle vibration
Profiles¶
Profiles are defined at the app level (e.g., src/apps/bt2n64/profiles.h):
- Default: Standard N64 mapping with right stick as C-buttons
- FPS: Optimized for GoldenEye, Perfect Dark
- Mario: Optimized for Super Mario 64 and platformers
Apps Using This Output¶
| App | Description |
|---|---|
bt2n64 |
Bluetooth controllers to N64 (Pico W / Pico 2 W) |
lodgenet2n64 |
LodgeNet hotel controllers to N64 (Pico) |