[Larsim] worked out the timing necessary to read button and joystick data from an N64 controller using an ATtiny85 microcontroller. The project was spawned when he found this pair of controllers in the dumpster. We often intercept great stuff bound for the landfill, especially on Hippie Christmas when all the student switch apartments at the same time.
Instead of cracking the controllers open and patching directly to the buttons, [Larsim] looked up the pinout of the connector and patched into the serial data wire. In true hacker fashion, he used two 5V linear regulators and a diode in series to step his voltage source down to close to 3.6V, as he didn’t have a variable regulator on hand. It does sound like this causes noise which can result if false readings, but that can be fixed with the next parts order.
The controller waits for a polling signal before echoing back a response in which button data is embedded. This process is extremely quick, and without a crystal on hand, the chip needs to be configured to use its internal PLL to ramp the R/C oscillator up to 16Mhz. With the chip now running fast enough, an external interrupt reads the serial response from the controller, and the code reacts based on that input.
It seems the biggest reason these N64 controllers hit the trash can is because the analog joystick wears out. If you’ve got mad skills you can replace it with a different type.
13 thoughts on “N64 Controller Input Using An ATtiny85”
“when he found this pair of controllers in the dumpster” what? lol
good job, by the way.
Stock N64 thumbsticks wear out in 1-2 months at the longest, if you use these things a lot. Some people even use them until the thumbstick just doesn’t work anymore…the xbox 360 thumbstick has the same mechanical parts as the n64 thumbstick (and those are tough), but the ones in the N64 thumbsticks are made with plastic that underestimates it to call it cheap plastic, as opposed to the identical, tough metal ones in the xbox 360. This is why a lot of n64 controllers are in the trash…or at least used to be, either due from trash sorting at the garbage disposal plant the garbage trucks go to, if it so happens to be a environmentally friendly one, or if someone goes dumpster diving, stumbles across one (or more) and decides to do something crazy with it. The second scenario actually helped birth the existence of pc adaptors for these oldschool pitchfork-heads!
I’ve been trying to do this using the ICP hardware in an ATmega (Requires less hand-coding ASM to deal with timing issues like older projects used) but put it aside when I had issues getting it to work. This seems like a cleaner implementation than the older projects, though, so I might pick up the project again and see if this gives any insights.
Umm, that picture looks photoshopped.
Probably to brighten the controllers, at least that’s what it looks like.
Shouldn’t be too much more effort to allow gamecube controller hookups as well
Nothing new: http://denki.world3.net/retro_v2.html
This exists for years!
And also see this
nice my n64 pads are borked also
I’ve got mad skillz! pick me!
Holy crap, “Hippie Christmas”. I’ve never heard that term before, and it’s awesome. Turns out I celebrate Hippie Christmas every year and never knew it! Students scrambling to vacate the dorms are so wasteful. But on the plus side, free sofa, rug, desk, bookshelves, dishes, lamps, fans, speakers, printers, tube guitar amplifier, LCD TV, and microwaves for me.
Please be kind and respectful to help make the comments section excellent. (Comment Policy)