An ISP dongle is a very common piece of equipment on a maker’s bench. However, its potential as a hackable device is generally overlooked. The USBASP has an ATmeg8L at its heart and [Robson] decided that this humble USB device could be used as an interface between his PC and a SNES Joypad.
A SNES controller required three pins to communicate with a host: clock, data and latch. In his hack, [Robson] connects the controller to the ISP interface using a small DIY adaptor and programs the AVR using the V-USB library. V-USB is a software USB library for small microcontrollers and comes in pretty handy in this instance.
[Robson] does a pretty good job of documenting the entire process of creating the interface which includes the USB HID code as well as the SNES joypad serial protocol. His hack works on both Windows and Linux alike and the code is available on GitHub for download.
Simple implementation like this project are a great starting point for anyone looking to dip their toes in the DIY USB device pool. Veterans may find a complete DIY joystick more up their alley and will be inspired by some plastic techniques as well.
A good use for the hardware.
Too bad the firmware fix for the actual USBASP never got finalized.
Protip: NES and SNES controllers both function the same way. The only difference is the SNES has two shift registers as opposed to 1. All you’d have to do is change the for loop from 16 to 8!
Neat. Going SNES Pad -> modern stuff is fairly trivial. The protocol is simple, you can the run the chips inside the pad at 3.3v and they seem to behave themselves, negating the need for level shifters. They mention about using it with a Raspberry Pi, well you can do that without any extra hardware, just wire them straight into the GPIO. There’s even example code in WiringPi for NES controllers which works fine with SNES controllers with a little modification for the extra bits.
I actually went the other way with my project, Raspberry Pi outputting commands via the controller port into a real SNES. You can read the write up I did on my github here:
https://github.com/SonnyJim/snesbot
Oh dang, dude! That is something I’ve been looking into but never built something for. Good to know I’m not the only one that wants to see those insane speedruns on the real deal.
While we’re talking about USBASP, some time ago I’ve made a mod to make it double as an UART interface: https://github.com/akrasuski1/usbasp-uart
Very good hack, probably a digispark board (Attiny based) like this
http://s.click.aliexpress.com/e/ZJyn2je
Is small enough to fit inside controller case,
Nice! USBASP clones are cheap an easy to find.
I did similar with a digispark and even added programmable autofire which can be implemented on this project as well.
https://hackaday.io/project/9770-digisnes