Instructables

USB SNES Controller

Picture of USB SNES Controller
First instructable. Let me know what it needs and fixes.

I did not make the circuit or program. I am just making a guide that shows step by step assembly of how to make the USB SNES controller. The original page is here:
www.raphnet.net/electronique/snes_nes_usb/index_en.php

This guide will convert a regular snes controller into a usb gamepad. It is tested working on XP, Vista, 7, and PS3. It should work on mac and linux but I have not tested them. The device is recognized as a standard HID device.

-You do not need to program anything for this guide. The program is already compiled and ready to be flashed to your chip.
-You do need basic soldering skills.
-Basic schematic reading skills helps, but I will try to explain every step.

 
Remove these adsRemove these ads by Signing Up

Step 1: Parts Needed

pcb.jpg
breadboard.jpg
crystal.jpg
Parts List:
----------------------------------------
-Atmega8 DIP microcontroller
-AVR programmer (usb, parallell or serial. I use usb.)
-12MHz Crystal osscilator
-[2] 3.6 volt zener diode
-1.5K Resistor (anywhere from 1.3K to 1.7K should work)
-[2] 68ohm resistor (anywhere from 60 to 75 should work)
-USB male cable
-SNES controller (first party works better. wires colors match guide.)
-Small wire.
-PCB - www.radioshack.com/product/index.jsp - $2
-Breadboard. This makes it much easier to test before putting into a controller.
             www.radioshack.com/product/index.jsp - $9

Tools:
-----------------------------------------
-Wire Stripper
-Wire Cutter
-Soldering Iron
-Solder
-Needle nose pliers (makes it alot easier to place and move wires on breadboard)
-Dremmel or cutting tool. (chip will not fit into unmodified controller.

Step 2: Prepare Wires

-Take a usb cable and cut off the non male end. You only need the cable and male usb.
-Strip the USB cable and all 4 connections inside. (some usb cables have 5 wires. This guide does not need the 5th wire, so it can be cut off.

-Open the SNES controller. Cut the connection wires close to the board, but leave enough wire so they can be solderd to a pcb. Better to leave too much wire and cut it off if you don't need it.


XOMR11 months ago
Here's where I run into a dead end. Only thing that Windows detects in its Devices is a "Prolific USB-to-Serial Comm Port." Any tips on where to start trouble shooting?
timeblade0 (author)  XOMR11 months ago
Prolific USB-to-Serial Comm Port is the usb micro controller programmer, not the controller.

Basic overview of steps:
1. Program microchip with programmer on computer.
2. assemble circuit with programmed microchip on breadboard,
the usb microcontroller can be disconnected and is no longer needed.
3. plug cutoff usb wire into breadboard as illustrated in Step 4.

There should be a driver for Human Interface Device if all is well.
If not, the zenor diodes might be backwards.
Also check that all pins are in the right locations.
Did the programmer program say chip flashed successfully?
Speaking of programs, would it work if I used AVRdude to program the ATmega8? Also, I tried to create a sketch of a NES controller with the USB conversion circuit built in (picture below). Would it work?
NES-USB-controller.png
timeblade0 (author)  GenesisMaster7 months ago
AVRdude should work. I've had friends use that with no problems.

The NES circuit might work.
The way this adapter works:
Press button on controller.
Command is sent to that controller's microcontroller.
That microcontroller sends out the commands to the console.
This is where the adapter intercepts it and converts it.
If your NES circuitboard still have the NES microcontroller, it should work.
If not, you will need to modify the code a lot.
XOMR timeblade010 months ago
Went through the circuit again. Then went through it again with a different USB cable and that did the trick. Now to perf board!
timeblade0 (author)  XOMR10 months ago
Glad it's working so far.
The usb part with the zenor diodes is a little tricky on perf board.
Take it slow and do each connection one at a time.
Gompka1 year ago
Thanks for the reply, i will give it a shot and report back.
Gompka1 year ago
Any idea if the atmega328P will work with a 12mhz crystal? I have one laying around vs having to buy an atmega 8. I know the operating frequency will have an affect on the timings, but if i clock down the 328P i'm thinking it should work.

Thanks,
timeblade0 (author)  Gompka1 year ago
The 328P can use a 12mhz crystal. The timing should not be a problem if configured right.
I don't know if the same code will work.
I think code from Atmega88, 168, and 328 is directly compatible.
I think from an Atmega8 to an Atmega38 would require you to modify the source code.
I don't understand the code enough to change it.

Source Code:
http://www.raphnet.net/electronique/snes_nes_usb/index_en.php#6
Baniski3 years ago
I bought the usb programmer, and made the connections, I downloaded the. .. .hex but what program I use to upload the .hex file to the ATMEGA8?

thanks
The programmer should have a driver disk. The suitable software for programming must be inside that disk.

However I used ISPprog v1.6.7 from :
http://www.zhifengsoft.com

It seems the latest version is 1.72 :
http://www.zhifengsoft.com/files/progisp172.rar
timeblade0 (author)  krauser351 year ago
I used ISPprog 1.6.7 as well.
webfp462 years ago
Can you also post the C source code. I actually want to know what I am programming. Or is there some way to backcompile the .hex file?

Thanks
timeblade0 (author)  webfp461 year ago
Source code can be found below. This is what I based this instructable on.
http://www.raphnet.net/electronique/snes_nes_usb/index_en.php
Can I use an arduino to program the controller. I know you can use it as isp.
timeblade0 (author)  evan.stoddard1 year ago
I have heard of doing that, but have not done it. You should be able to use the Arduino as an ISP to download this code. I don't see any reason why it wouldn't work.
you should consider making an instructable for the ATtiny45 version, i can sorta figure out whats going on from andreq's files but i'm not very experienced.
blackowaya3 years ago
Long time passed, but I'm here to show how i made my adaptor.

I used an ATTINY25. All componentes are inside the DB25 shell. After a lot of optimization (and reseach X_x), i managed how to implement  a calibration routine for the internal oscilator.

Here is the firmware's url.
http://www.4shared.com/file/C3m1jXsi/SNES25v2.html

Thank you Andreq, your information was a huge help.

Adapt01.JPGAdapt02.JPG
ummmm can you just make me one? i hate electronics and working with robotics, its too confusing, i could provide a controller and money!
Its OK with me but I know that shipping cost will kill you!
I is really simple and a good experience, you can do it, trust and believe in yourself! This is the cheapest way. I strongly recommend you to do it by yourself then share your experience with us.
There are two other ways :
1. You can ask someone whose job is electronic at your local place, do it for you.
2. Another way is buying one of these from amazon :
a. NES Retro Classic Controller USB
http://www.amazon.com/Retro-Classic-Controller-Nintendo-Entertainment-System/dp/B00281PFQI
b. NES Controller to Pc USB Adapter
http://www.amazon.com/NES-Controller-USB-Adapter-Smart-Pad/dp/B000YDOK2W
c. Retrolink Nintendo NES USB Adapter for PC
http://www.amazon.com/Retrolink-Nintendo-NES-USB-Adapter-Mac/dp/B000PDOTXG

Good Luck!
andreq4 years ago
I did the same thing some times ago, but I used an ATtiny45 (DIP).

The schematic and source code can be found here :
hobbyelektronik.org/w/index.php


I did some modification to the source code to include automatic internal OSC calibration. I'll try to find it somewhere on my hard drive.

If my memory is good, it might even fit inside an ATtine25 (that's what I had around...)

Anyway, great job, but you should show us how the finished PCB looked like and use less "marketing" pictures :)

andreq andreq4 years ago
Here is the full sources.

Include schematic, code and compiled HEX.

www.filemonster.net/en/file/15003/Snes-Attiny-zip.html

It should fit inside an ATtiny25, it compile to 1984 bytes (kinda... funny)

Hi!

I'm afraid the link to the firmware made by andreq is dead.

I'm trying to make this adaptor, using an ATTINY25, i tried to add internal OSCCAL and optimize the code from hobbyelektronik but my firmware compile to 2138 bytes (it's too fat).

If someone have the source code of the firmware of andreq, please post it. Thank you in advance.
Lucky enought, I found it inside an old backup folder :

http://www.2shared.com/file/1I9Vq85d/Snes-Attiny.html

You might have to look at the code. I've seen I commented out the autocalibration part (to save space). Also, I changed the usb vendor name to Andre in the usb-config. You could just change that to anything small (<=5 letters) if you care. Make sure to set the lenght accordingly.

You might need to play with the OSCALL value which is read from eeprom 0x00. It should be between 125 and 128.

Have fun! There's nothing like the real feeling of a Snes game-pad when playing classic games.
WOW, thanks a lot andreq ¡n_n¡.

I'll be testing it tonight. Yeah, nothing better to use the original SNES pads to play classic games. I'm a SNES fan and i think is the best pad in terms of weight, confort, response and button layout. I'll be posting photos when finish the project.
I'll try to find that file on my computer again and upload it somwhere else. If your in a hurry, the easiest part to "cut" is the USB device name. It take lots of space.
timeblade0 (author)  andreq4 years ago
I posted 2 pictures of my actual circuit.

Using an ATtiny25 would be a lot easier than the Atmega8 I used. Atmega8 = 28 pins, ATtiny25 = 8 pins, much easier to cram in the case. I will try the one you posted on my next attempt at SNES USB.
This is the main reason why I used the ATtiny... you also have less component!

The only problem I had was with the USB data voltage.

I tryed the zener diode method without success.

On the V-USB website (the actual USB "firmware" that is used by this code) you can see other method.

For my circuit I used a 3mm red led on the 5v line... it reduced the voltage close to the 3.6v required by the data line. I also removed the zener.

I think 2 "normal" (not led...) diode on the 5v is also possible.
krauser353 years ago
Works great, thanks!
Back View revD-2.PNG1.JPG3.JPG2.JPG
krauser353 years ago
What about C1? Did you forget it?
C1: 10uf capacitor. Install it near the ATmega8

http://www.upload-jpg.com/images.php/2e254839/01.PNG

Or it is just an unnecessary component, just like J1, J2, D1, R4?. But it doesn't seem to be unnecessary like these ones. Please explain about it. Thanks


ertxz183 years ago
Could you please include maybe some links or information as to how you acquired all the parts needed :D THANKS!
timeblade0 (author)  ertxz183 years ago
Atmega 8 can be found on ebay by searching "Atmega8 pu"
AVR programmer can be found on ebay. search "usbasp"
12Mhz crystal - sparkfun.com
3.6V zener diode. ebay. search "3.6V zener diode"
Resistors from sparkfun, radioshack,or ebay.
USB male from sparkfun, radioshack, ebay, or thrift stores. Any device with a usb male can work.
SNES controller - sparkfun, ebay, thrift stores, old game stores.
Wire - sparkfun, radioshack. Look for a jumper wire kit such as:
http://www.sparkfun.com/commerce/product_info.php?products_id=124
PCB and breadboards can be found at sparkfun, radioshack,or ebay.

Let me know if you have trouble locating the parts.
LordGormyr4 years ago
was wondering can this be done with a gamecube controller
timeblade0 (author)  LordGormyr4 years ago
Yes it can. This can be done with: NES, SNES, N64, GCN, Genesis, and Atari. I have done NES, SNES, and N64 successfully. http://www.raphnet.net/electronique/electronique_en.php ^ has the circuit design. It does not cover putting it into the controller. I might make a guide on that sometime.
Do you know whether it's possible to have more than 2 ports on the GCN/N64 to USB adapter? Like, wire 4 controller ports to the one board?
timeblade0 (author)  Pie Ninja4 years ago
Possible yes. Easy no. I don't know exactly how. 2 ideas: 1: make a 4 port usb hub and attach 4 n64/gc to usb circuits to it. I have seen guides to make usb hubs with micro controllers on the web. 2: the program is open source. recode it to have 4 controllers in and 1 usb out. This method is probly very hard. The site has a guide for how to do it with an SNES/NES 4 port. Might be similar for N64/GC.
technoguy944 years ago
So its used as an actual USB game controller, instead of just another emulated keyboard?
timeblade0 (author)  technoguy944 years ago
Yes, this uses a standard HID controller driver. Windows, mac, Linux, and PS3 all have built in support for this driver.

I did not write the code to handle the driver. This instructable is my attempt in using someone else's circuit inside an actual controller.

I do not like the keyboard emulation controllers.You can only press 2 or 3 buttons at a time, and sometimes it does not respond correctly.
XGundam054 years ago
This circuit will work in Linux. I modded a PC a while back to be a dedicated SNES emulator with 4 controller ports. Runs 8.04? Ubuntu using Flux Box.