Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

 
Thread Tools Display Modes
Old April 26th, 2005   #1
NTolerance
Quad Shot of Ubuntu
 
NTolerance's Avatar
 
Join Date: Apr 2005
Beans: 420
Ubuntu 9.04 Jaunty Jackalope
HOWTO: Set up a parallel port SNES pad

This guide is for the few of us who like to play SNES games with a real SNES controller. If you're one of these people, you've followed the various online guides available and have wired up an SNES pad with a parallel port adapter. There are guides available that explain how to set up one of these pads with older Linux kernels, but some stuff was changed in the 2.6.10 kernel that made previous procedures quit working. I have done some experimenting and have found a way to make them work with the 2.6.10 kernel that is used by Ubuntu Hoary.

First, open up your favorite text editor and paste this to create a shell script that will enable our pad:

Code:
#!/bin/sh
modprobe -r lp
modprobe gamecon map=0,1,0,0,0,0
modprobe gamecon gc=0,1
Save it as a filename of your choice. I will use the name "snespad".

We need make our shell script executable:

Code:
chmod +x snespad
Copy this shell script to your /bin directory:

Code:
sudo cp snespad /bin
You will now be able to run this script and enable your SNES pad. It should be recognized in your window manager's GUI config util, if it has one. I'm running KDE and I can see the controller inputs in the Control Center. It should also now work in ZSNES. Please note that this script will unload the "lp" module, which I think has something to do with printer support. I don't use a parallel port printer, but if you do, you may need to run

Code:
sudo modprobe lp
to re-enable printer support.

If you'd like to have your system execute the script on startup to have your pad always ready to go, copy the script to your /etc/init.d directory:

Code:
sudo cp /bin/snespad /etc/init.d/snespad
Make a link to the runlevel 2 startup (Ubuntu default):

Code:
sudo ln -s /etc/init.d/snespad /etc/rc2.d/S99snespad
Now your SNES pad should work all the time without the need to manually run the script.

Last edited by NTolerance; May 11th, 2005 at 11:13 PM..
NTolerance is offline   Reply With Quote
Old July 19th, 2006   #2
Devarien
First Cup of Ubuntu
 
Join Date: Jul 2006
Location: Boston, MA
Beans: 4
Ubuntu 6.06
Send a message via AIM to Devarien
Re: HOWTO: Set up a parallel port SNES pad

I followed your instructions, but whenever I run ZSNES after initializing the pads, my kernel panics. This also happens when I run jstest from the Debian joystick package. Both ZSNES and SNES9x run fine when the joystick is not initialized. Any suggestions?

-Devarien
Devarien is offline   Reply With Quote
Old August 5th, 2006   #3
arus
First Cup of Ubuntu
 
Join Date: Aug 2006
Beans: 2
Re: HOWTO: Set up a parallel port SNES pad

Hi!

I'm having the same problem...
Is there any solution????

Bye
arus is offline   Reply With Quote
Old August 17th, 2006   #4
NTolerance
Quad Shot of Ubuntu
 
NTolerance's Avatar
 
Join Date: Apr 2005
Beans: 420
Ubuntu 9.04 Jaunty Jackalope
Re: HOWTO: Set up a parallel port SNES pad

Holy crap, I didn't think anyone used my guide. Apparently something has changed in the newer kernels that breaks this. I suspect it's one of these two commands that is the culprit:

Code:
modprobe gamecon map=0,1,0,0,0,0
modprobe gamecon gc=0,1
Unfortunately, since I wrote this guide I have sold my old PC that had a parallel port, so I can't test any fixes for you guys. I did find some more detailed info about this here:

http://www.tolaris.com/snes-to-parallel/

Apparently the whole script process that I described above isn't actually necessary to make the SNES pad persistant after a reboot, so forget all that. This line in /etc/modules would take care of that:

Code:
modprobe gamecon gc=0,1
Again, what probably needs to be tweaked is this:

Code:
modprobe gamecon map=0,1,0,0,0,0
modprobe gamecon gc=0,1
Here's an explanation of that from the above link:

Quote:
This will disable lp printing to the parallel port, then load the gamecon joystick driver and tell it to create joystick devices for all five controllers. To use fewer controllers, replace the five 1's with 0's according to the controller wiring order for the "Linux" pinout above.
NTolerance is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:08 AM.


vBulletin ©2000 - 2009, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. lingonberry