xmame  

Re: Joystick Help!

theGREENzebra
Thu, 14 Dec 2000 03:48:31 -0800

> I'm trying to configure a Joystick for use in X-Mame but I have not sucess
> on it, if any one can point me to a HowTo or FAQ or any other documentation
> on how to setup a Joystick as XInput device I'll apreciate.

Nazghul, what kind of joystick are you trying to use, and on what kind of
system (OS, architecture..)? 

The easiest way (IMHO) to get joystick support working in xmame on an x86
linux system (just a shot in the dark if this is your system, but it might
help) in fairly simplistic terms (forgive me if I oversimplify):

1. Compile kernel modules for your joystick. This may require recompiling of
the kernel, and depending on the kind of pad or gamestick (or, more
specifically, how often you switch what kind of pad or stick you're using),
you may want to just compile joystick support right into the kernel. It's
possible your distribution has a few precompiled joystick drivers that you
can try and use without recompiling anything.

2. If you make modules and don't compile the joystick driver right into your
kernel, use your init scripts to load your joystick modules, or just make
sure the modules are loaded before you start playing. On my system I added
the following lines to rc.local, although they could just be entered at a
command-line:

insmod /lib/modules/2.2.17/misc/joystick.o
insmod /lib/modules/2.2.17/misc/joy-sidewinder.o

Since sidewinders are popular gamesticks/pads (for once Microsoft got
something right), I will warn about one thing: If you have multiple pads
(you can chain at least 4 off the joystick port) the sidewinder driver is
broken and you'll need to patch it. Otherwise your games will segfault and
worse, the stick/pad won't work. Keep in mind that if you only have one pad,
you're fine.

3. Edit the makefile and uncomment JOY_I386=1 , as well as any other
modifications you need to make for your PC. Since JOY_X11 is rumored to be
broken, I've never used it. You don't really need X to see your joystick for
it to work in most games. Now [re]compile xmame.

4. When starting xmame, add the commandline option of:    -jt 4
to your string of options in your frontend, mame script, or whatever you
happen to use. you needn't specify a joystick to xmame, because it reads the
settings straight from the kernel driver and uses those.

5. Play game. Play another. And another...

6. If you're nitpicky, unload the module afterwards (reverse-order) using
rmmod. Example:

rmmod joy-sidewinder
rmmod joystick

OR, if you want to switch joysticks to, say, a wingman warrior:

rmmod joy-sidewinder
insmod /lib/modules/2.2.17/misc/joy-warrior.o

......and then play some more......

Let me know if you need further assistance.

Hope I've helped!
Brendan

-- 
*  [EMAIL PROTECTED]  *  http://switch.orotech.net  *  ICQ# 1107012  *  IRC: P2E  *  
AIM: theGREENzebra
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCM/CS/IT/MU d? s: a20 C++++ UL++++ P+ L+++>++++ E---- W++ N+ o K- w---$ O- M(+) V-- 
PS+ PE Y+ PGP- t+++ 5 X+ R+ tv b+ DI+++ UF*++ D+ G+++ e h++ r y+
------END GEEK CODE BLOCK------
---------------------------------------------------------------------------
Send administrative requests to [EMAIL PROTECTED]