Game consoles typically support a limited number of input devices, meaning that console games are often completely optimized for the default controller supplied with that platform. Nintendo’s tendency to completely reinvent their controllers pretty much every generation can therefore become a little irritating, especially when they also enable their newer consoles to play games from their back catalog. So when [Robson Couto] found that using the Switch’s Joy-Cons was a bit awkward for playing emulated Nintendo 64 games, he decided to figure out how to connect real N64 controllers to a Nintendo Switch.
While you can buy modern N64-style controllers for the Switch, even straight from Nintendo themselves, [Robson] thought it would be way more interesting to reuse an old controller and implement the translation step from scratch. In the video (embedded below) he takes a deep dive into all the timing details of the N64 controller protocol, which is basically a 1-wire setup, and explains how to use an STM32F411 BlackPill board to read out the controller’s buttons and joystick.
Next, he explores how to map the resulting data to the USB HID protocol used by the Switch. Most of the buttons have a clear one-on-one mapping, but since the “minus”, “capture” and “home” buttons are missing on the N64 controller, he chose to map these to button combinations unlikely to be used during regular gameplay. [Robson] also ran into the common issue of the analog joystick having a poorly-defined maximum range, for which he added a rudimentary auto-calibration feature.
Finally, he designed and 3D-printed a neat enclosure for his system with an N64 controller port on one side and a USB port on the other. By 3D-printing the whole thing he also avoided having to either source the non-standard connector or permanently modify his hardware. The end result of [Robson]’s project is an unobtrusive gadget that connects classic controllers to modern hardware – but of course, the reverse process is very much possible, too. If you want, you can even play N64 games with a mouse and keyboard.
Cool hack, but this is one of the times where I would not recommend reusing an original controller. The original N64 controllers had plastic internals that would grind against the bowl, which led to sensitivity loss and eventual failure over time. The modern remakes aren’t prone to this issue.
Maybe someone should come up with a new gimbal? Maybe a hall effect version? hmm…
https://hackaday.com/2018/09/21/the-n64-controller-gets-brass-gears-through-3d-printing/
https://hackaday.com/2023/05/24/hall-sensors-offer-drop-in-replacement-for-drifting-game-console-joysticks/
Correct me if I am wrong, but wasn’t N64 already hall effect? The problem was the plastic axis wearing and no longer centering.
Also these projects do well when they can emulate 2 controllers for EG dual analog control in Goldeneye.
NVM, Guess I was thinking of Dreamcast
The only part that ever failed was the joystick. Luckily those were modular and very easy to replace. Google “n64 controller joystick replacement”, you can find originals in excellent condition or retrofits that give a GameCube style joystick instead that isn’t prone wearing down 8n the same way as the original. I recommend the GameCube style, it’s actually an improvement in usability and quality.
I think it’s cool that he’s worked it out on his own but you can buy a mayflash n64-usb adapter online for as little as $20 and the newer versions are explicitly compatible with the switch. I’m not knocking the effort, as it was undoubtedly real, but all we’ve done here is reinvent the wheel after it’s 3rd or 4th revision.
I spent a lot of time trying to hack an Atmega version of the protocol. IIRC I had Dualshock and Dualshock II controllers I wanted to use as standard USB with a PS3 or PC games that wanted specific HAT switch support. It may seem simple or off-the-shelf, but then you hit edge cases where compatibility is not guaranteed.
Thanks for sharing your opinion! I’m the creator of the video. The way I see people reinvent the wheel all the time, because they want features not available on the market, they’re learning, or just because they want to.
In this case I got to hone my skills on USB HID (even a bit of sniffing), talk to a onewire device and design in 3d for the first time.
The motivation if there, it’s good for setting up the challenge and also storytelling, but to me (and many others) the journey is really important, sometimes more than the end result.
Thanks for sharing my project!
While cool, I see no point in using an n64 controlled on the switch since nintendo’s emulation is actual steaming hot garbage.
That UART hack shows just how far microcontrollers have come. Way, way, way back I looked into doing this and the interesting hack at the time was to use an RC circuit as an integrator to convert the square wave to a sawtooth. The 0s would have a lower peak than the 1s and it was just enough to be able to determine a logic high vs a logic low.
Unfortunately, it seems this trick is lost to the sands of time as I can’t find it mentioned anywhere. If anyone else remembers this tick and has a link, I think it would be great to make sure it lives on and show how just a little bit of analog electronics can solve some challenging microcontroller problems.