SNES Pad Mini HOWTO by Mongoose
0. What is the SNES Mini HOWTO? --------------------------------------------------------- Back when I was writing some code for an animation demo I saw a need for 'quick start' instructions to setup the SNES pad in Linux. This document digests the Linux Kernel Documentation along with other sources and original information to compile a quick guide to help you get your pad up and running. Please contact me, Terry 'Mongoose' Hendrix II, to make corrections, comments, or remind me to update. mongoose(AT)icculus.org 1. Disassembly of the SNES pad. --------------------------------------------------------- WARNING: Take care when disasmebling not to hurt yourself. * Never have the direction of force towards you when using sharp objects. * Use equipment in safe manner with any safety gear you require. * Remeber if you lop off a finger, then the pad is worthless. =) 2. Taking the snes pins out of the casing. --------------------------------------------------------- Take the end of the SNES cable, aka the cable casing, that goes into the console. Look at it, and notice how the cable end is made. There are 4 tiny slots on the cable end: * 2 slots on the top * 2 on the bottom Now it's time to remove the casing without damaging it. This way you can later just slide the casing back together and use in your SNES. There are two ways to do this. One is to use 2 pairs of needle lab tweesers and simultaneously depress both slots on each side and pull on the part that goes into the console. The second, safer, method and the one I recommend is far more easy. Find 2 thin pieces of flat metal. If you choose to use two knives use dull ones. Slide one piece of metal into the top directly in the middle of the cable end. Do the same to the bottom. Now you can pull the cable end apart. Now you have the casing pulled apart, but not damaged. You can slide it back together, and it'll be fine for you snes use agian. To open the little box that's on the cable end, use your fingernail to pull up on the base where the cable enters the little box. Pop. Now pull all your pins free from the little box. Wasn't that fun! 3. Wiring the controller to the parallel port. --------------------------------------------------------- Parallel port ___________________________________________ \ 1 2 3 4 5 6 7 8 9 10 11 12 13 / \ 14 15 16 17 18 19 20 21 22 23 25 / --------------------------------------- SNES __________________ | | \ | P C L D | X X G ) |_________|________/ Power ( white ) Clock ( yellow ) Latch ( orange ) Data ( red ) X ( no pin ) Ground ( brown ) Plug the snes pins to the parallel port pins like so: 2 - CLOCK ( yellow ) 3 - LATCH ( orange ) 9 - POWER ( white ) 10 - DATA ( red ) 18 - GROUND ( brown ) Make sure the pins don't touch each other! I suggest making an adapter out of an old printer LTP cable, or buying parts from radio shack. 4. Linux joystick setup. --------------------------------------------------------- 4.0. Make the linux joystick driver modules for the SNES. Your distro may already have done this for you. If not read the end of this document. 4.1. Update your joystick device files in /dev like so: For Linux 2.2.x use the following: cd /dev rm js* mknod js0 c 15 0 mknod js1 c 15 1 mknod js2 c 15 2 mknod js3 c 15 3 For Linux 2.4.x use the following: cd /dev rm js* mkdir input mknod input/js0 c 13 0 mknod input/js1 c 13 1 mknod input/js2 c 13 2 mknod input/js3 c 13 3 ln -s input/js0 js0 ln -s input/js1 js1 ln -s input/js2 js2 ln -s input/js3 js3 4.2. To enable the pad you must use the modules: For Linux 2.2.x use the following commands: insmod joystick insmod joy-console js_console=0,1,0,0,0,0 For Linux 2.4.x use the following commands: modprobe joydev modprobe gamecon gc=0,1,0,0,0,0 4.3. If you use debian install jstest utils: apt-get install joystick 4.4. Use jstest to test your SNES pad. jstest /dev/js0 4. Instructions on how to make pretty adapter here later. --------------------------------------------------------- Everyone that's seen my adapter at UWG, stop asking how to make one. I need to make pictures of it and post some instructions, but for now it's an exercise for the reader. 5. Use of SNES pad. --------------------------------------------------------- Most all of the emulators like MAME (SDL), SNES9X, etc support this driver and pad. Now you can also write a driver wrapper, play PC games, or write driver support in an application for your SNES controller. Have fun. Joystick Driver Setup for 2.4.x from Jeff Mrochuk --------------------------------------------------------- Setup for 2.4.x Character Devices --> Joysticks --> --- Parallel port joysticks [M] Multisystem, NES, SNES, N64, PSX joysticks and gamepads You no longer need a "joystick" module. You just need parport and parport_pc for parallel support. The new modules is called "gamecon" and you have different paramaters for insmod. insmod gamecon gc=port,pad1,pad2,pad3,pad4,pad5 where padX is the pad type, snes is type 1. The port is the parallel port number. So to have 1 snes controller in your first parallel port its: insmod gamecon gc=0,1,0,0,0,0 6. Here are some helpful links. --------------------------------------------------------- * SNES Adapter with external power source HOWTO http://www.fortunecity.com/underworld/doom/727/howto_guide.html * JoyStick Driver page http://atrey.karlin.mff.cuni.cz/~vojtech/joystick/