Previously I had hardwired a SNES controller to my Homemade Arduboy DevKit. But I also wanted to hook up an unmodified controller. Since there is more interest for it I thought I had a go at it.
I hooked up an unmodified SNES controller to a Pro Micro and wrote a sketch to read out the controller and drive the button inputs of my homemade Arduboy DevKit.
Here’s the result
Here’s the code
The sketch is pretty universal and can run on most Arduinos.
Awesome … how have you wired the SNES controller? Will this work for an original NES?
The wiring pinout is in the source. Yes it should work for NES controller if you remark a define.
I enjoy having a 6 feet cord now
Right … just had a look, excellent! Now I need to buy a NES (which hasn’t been gutted) and start again.
A little off topic, does anyone now the difference between a PAL NES Controller and an NTSC? I cannot see how the controllers make a difference however, I am guessing it is to do with the refresh rate of the screen and how they have geared the remainder of the hardware around that. Does your controller care / cater for different controller speeds?
Edit: Further reading, it appears the PAL version has a pull up resistor that the NTSC version doesn’t. Weird.
IIRC The PAL controllers have some additional pull up resistors.
PAL controllers (model NES-004E) will work universally on both the PAL and NTSC NES, but the NTSC controllers (model NES-004) only work with the NTSC NES. You can make an NTSC controller ‘PAL-compatible’ by adding the two resistors.
I think this was purely an attempt at ‘region locking’ by Nintendo, to stop controllers being cheaply imported?
I did something similar with an extra Uno, a wired PS3 controller and a USB Host Shield that I had around - here’s the sketch:
That would be right … sneaky little buggers.
OK … now I am looking to buy one of these if anyone has one they would like to sell.
A few years back Parallax were actually manufacturing these new, and you could get them at Mouser / Digikey etc, but they are discontinued now…
You could always buy an extension cable and chop it off:
or wait on international shipping:
This really is cool! Why did you not map the other buttons to new inputs?
I was just focused on Arduboy so added mirrored A, B buttons and start select for bootloader/reset combos Might add a few extra pins on a universal version with NES/SNES connectors later.
I have now received all of the bits to make a ‘native’ NES controller. I am planning on trying this over the weekend (so you can expect questions!)
coincidentally my SNES and NES connectors came. I’ll probably do some tinkering too
I think I understand the setup … NES Controller wired to Pro Micro wired to Arduboy clone. How is the Pro Micro driving the inputs to the Arduboy? Do you simply wire the pinouts from the Pro Micro (those below) to the corresponding pins on the Leonardo?
#define BUTTON_A 7
#define BUTTON_B 8
#define BUTTON_UP A0
#define BUTTON_DOWN A3
#define BUTTON_LEFT A2
#define BUTTON_RIGHT A1
The Pro Micro button drivers have the same pin wiring as Arduboy. so:
- A button: Pro Micro pin 7 to pin 7 Arduboy Clone
- B button: Pro Micro pin 8 to pin 8 Arduboy Clone
- Up button: Pro Micro pin A0 to pin A0 Arduboy Clone
- Right button: Pro Micro pin A1 to pin A3 Arduboy Clone
- Left button: Pro Micro pin A2 to pin A3 Arduboy Clone
- Down button: Pro Micro pin A3 to pin A3 Arduboy Clone
Now that I think of it I’ll do a small revision adding a reset button driver for when SELECT is pressed.
Right … That’s what I assumed but wanted to make sure.
A reset sounds good!
Decided to get rid of the jumper wire hookup now that I have the connectors and made a little NES controller shield. basicaly just a few male and female pinheaders and a NES connector on some perfboard.
Updated sketch on GitHub.
@filmote Make sure you remark/edit the SNES_CONTROLLER define on line 22 for NES controller.
I wired mine up today and it worked perfectly. I also wired an arcade joystick into the mix so you can have either.