Post

👋 just released the first public version of libjoybus, an open implementation of the Nintendo Joybus protocol used by N64 and GameCube controllers, with initial support for Pi Pico (1 and 2) and SiLabs Gecko microcontrollers: github.com/loopj/libjoy...

github.comGitHub - loopj/libjoybus: An implementation of the Joybus protocol used by N64 and GameCube controllers, for 32-bit microcontrollersAn implementation of the Joybus protocol used by N64 and GameCube controllers, for 32-bit microcontrollers - loopj/libjoybus

This was initially extracted from the WavePhoenix project with the goal of being more broadly usable. This library supports "host mode", aka acting as an N64 or GameCube console and communicating with a controller, as well as "target mode" aka emulating a controller on the joybus.

The Pi Pico implementation is written from scratch using PIO and fits in a single state machine, so theoretically can support 8 simultaneous buses on a Pi Pico, or 12 (!) on a Pi Pico 2.

0 reposts4 likes

For the protocol nerds out there, I managed to get the target response time (time between message being received from a console, and us sending the reply) down to ~3us on the Pi Pico backend. This is *very* close to the ASIC's response time in OEM controllers.