LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Games (https://www.linuxquestions.org/questions/linux-games-33/)
-   -   Joystick fails in MAME, shouldn't be too hard... (https://www.linuxquestions.org/questions/linux-games-33/joystick-fails-in-mame-shouldnt-be-too-hard-331052/)

cfalcon 06-06-2005 10:11 PM

Solved- Joystick fails in MAME
 
I grabbed a Joystick (gamepad, really) today, because MAME with the keyboard isn't as nice as I'd like. Cheap USB thing from Saitek, a P220 pad.

So, I figured I'd plug it in. Ha! Funny. Ok, so first I cat /dev/js0, and it gives some garbage characters. It gives more garbage characters when I press or release buttons. dmesg gives me good data on it, and jscal (not jscalibrator, as I originally thought for some reason) worked dandy.

So, the joystick is good, and Linux recognizes it.

---

Next step was trying to get it to work in MAME. I have the source tree for mame, and I use make to build it. Here I have two questions:

(1)- In the installation procedures, I'm told to run xlistdev. This predictably prints out two components, the keyboard and the mouse, and their names as they appear in /etc/X11/xorg.conf .

But no Joystick. It seems implied by the Makefile and whatnot that I need to have a joystick input device (by default, it wants one named "Joystick", which is fine with me).

How would I create this? I've tried a bunch of variants (more importantly, I've been hammering Google but can't come up with the right search terms or something). This is the latest. Would I add something like this?

Section "InputDevice"
Identifier "Joystick"
Driver "linuxjs"
Option "Device" "/dev/js0"
EndSection

What does my entry need to look for, assuming that X11_JOYTYPE (from the Makefile) needs to point to a valid thing?


(2)- Now, it's possible that I don't *REALLY* need a "Joystick" device at all. Many people seem instead to specify things at the command line, or so sayeth Google. Could I:
xmame.x11 -jt 1 -jdev /dev/js0 sonicwi

Or rather should I be able to, because when I do this it tells me that
Error: joytype 1 is not available

So then edit the Makefile, find an option for JOY_STANDARD, and turn that on. Then I run make (it talks about compiling in support for the joystick and doesn't take very long at all) and make install. Do I need to do something else? Because I still get the same
Error: joytype 1 is not available

Error, which to my mind, I should no longer get (I would expect an error about not having a valid input device in X11 or something).


I'm probably making a newbie mistake or something.


Any advice folks? If you have a joystick, what the heck does your xorg.conf say?






Thanks a lot in advance,


^cfalcon

cfalcon 06-07-2005 12:44 AM

Solved
 
I did a make clean, then a make, then a make install (the make clean was the new part).

That shouldn't have done a damn thing, but this time it had joystick support.


No X11 objects were needed at all, and some of the changelogs came up in a Google search. The quote was something like, Removed X11 Joystick support because it never worked anyway.

So, there's that.



That was from Nov 04, which is few enough months away that the baggage could still be in the help files and the Makefile.


All times are GMT -5. The time now is 08:51 PM.