 |
ToToTEK.COM Help & Support Forum
|
| View previous topic :: View next topic |
| Author |
Message |
Videogamer555
Joined: 01 May 2009 Posts: 102
|
Posted: Fri Mar 26, 2010 1:33 am Post subject: How to connect the SNES controller to a computer serial port |
|
|
First you need a power supply that can deliver 5 volts DC. Then you need a serial cable. I used a 9-pin cable because there's less wires to sort through, but it should also work on a 25-pin cable. Some serial cables have less than 9 wires even though the end has 9 pins on the connector. Just make sure that if you use my driver (which you can download here) the cable you use has access to these signal lines:
Ready To Send (output from the computer)
Data Terminal Ready (output from the computer)
Carrier Detect (input to the computer)
And make sure COM1 is available on your computer, as my driver only works on COM1. Also power must applied to the power pins before running the driver software (+5V to SNES controller pin 1, and Ground or 0V or Common or whatever you call it to pin 7 of the SNES controller). If not, the driver software won't run (yes it detects if the device is active) and will simply close itself uppon being run. Then you'll have to turn the power on and start it again. It runs in the background, and won't appear anywhere. To tell if it's running, open notepad and push some SNES buttons, if it's running, it should print various letters (it works by mapping SNES buttons to keyboard keys). If it's running and you try to start it again, it'll give an error about the COM port being already open and will refuse to start a second instance of the program. To turn off the SNES controller driver, hold down these 6 buttons on the SNES controller simultaneously (A, B, X, Y, Start, Select), or turn off the power supply providing the 5 volts to the SNES controller. And before again using the actual keyboard keys that map to the SNES controller assignments, you must turn off the SNES controller driver.
Here's what each SNES controller button maps to on the keyboard.
SNES X = Keyboard A
SNES Y = Keyboard Z
SNES A = Keyboard S
SNES B = Keyboard X
SNES L = Keyboard D
SNES R = Keyboard C
SNES Select = Keyboard Space
SNES Start = Keyboard Enter
SNES Left = Keyboard Left Arrow Key
SNES Right = Keyboard Right Arrow Key
SNES Up = Keyboard Up Arrow Key
SNES Down = Keyboard Down Arrow Key
Here's the technical info on setting it up, including an ascii drawing of the SNES controller connector for reference.
| Code: | This driver only works on COM1. If you already have a device on your serial port designated COM1,
disconnect it, as this driver NOT work an ony port other than COM1. I may change this on
later versions.
TECHNICAL INFO NEEDED FOR SETUP:
SNES Controller Pinout
/-----------------|
| O O O | O O O O |
\-----------------|
7 6 5 4 3 2 1
What to connect each game controller pin to.
Each serial cable signal line is identified as either an output line (output) or an input line (input).
1 goes to +5VDC on lab bench power supply
2 goes to serial cable Ready To Send (output) line
3 goes to serial cable Data Terminal Ready (output) line
4 goes to serial cable Carrier Detect (input) line
5 not connected
6 not connected
7 goes to Ground on lab bench power supply and Data Ground on serial cable
The remaining output and output lines on the serial cable are unused. These are:
Data In (input)
Ring Indicator (input)
Data Set Ready (input)
Clear To Send (input)
Data Out (output)
The use of each pin by the SNES Controller.
1 power (expects +5VDC)
2 each pulse to this pin sends the state of each button in sequence to pin 4
3 each pulse to this pin loads the state of all buttons into the internal register to ready it for output
4 outputs the button state for each of the buttons in sequence
5 unused
6 unused
7 ground
By the way, it uses a negative logic system (0V on pin = true) instead of the more typical positive
logic system (5V on pin = true). This is the case for the SNES controller's two inputs and its output. |
You can download this text as a text file here. Make sure when viewing it in a text editor such as notepad that you use a monospace font, or else the ascii drawing of the SNES controller connector won't look right.
And here are some pictures of my setup (click on each thumbnail for an enlarged image).
Power supply with red wire hooked to green +5V connector and black wire hooked to black Ground (or COM as my power supply calls it) connector.
Computer with serial cable attached.
Serial cable with other end cut off and alligator clip wires attached.
SNES controller connector with alligator-clip wires going to serial cable and spring-hook wires going to power supply (notice the orange insulated wires I have plugged into SNES controller's connector for me to clip onto).
SNES controller being used to play Megaman X on the emulator SNES9x (one hand holding the controller, the other not seen because it's holding the camera).
You can download the Visual Basic 6 source code for the driver here. |
|
| Back to top |
|
 |
Farid
Joined: 26 Oct 2010 Posts: 3
|
Posted: Tue Oct 26, 2010 5:43 pm Post subject: |
|
|
Can I use this method to use with Nestopia (a nes emulator)?
Is there any other way to supply the power (5V) from the computer itself (for example from usb)?
Thanks. |
|
| Back to top |
|
 |
madman
Joined: 07 Jul 2006 Posts: 598
|
Posted: Tue Oct 26, 2010 10:29 pm Post subject: |
|
|
| Just buy a SNES to USB adapter and save yourself the trouble of building some half assed adapter that requires an external PSU. |
|
| Back to top |
|
 |
Farid
Joined: 26 Oct 2010 Posts: 3
|
Posted: Wed Oct 27, 2010 5:49 pm Post subject: |
|
|
Please someone check these pictures and tell me if anything is wrong :
Is everything okay?
BTW I am sure I cannot find any kind of adapter here, so I don't have any other choice. Please help me to assemble this thing. |
|
| Back to top |
|
 |
Farid
Joined: 26 Oct 2010 Posts: 3
|
Posted: Sat Oct 30, 2010 10:43 am Post subject: |
|
|
I couldn't get it work. Just nothing happens. Help me, plz!
 |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|