Home Page

Gamepad not working in Linux MAME

Posted By: crunchy

Gamepad not working in Linux MAME - 08/29/15 01:34 PM

I've successfully built MAME 0.165 from source and everything runs fine apart from the gamepad. Joystick is enable in mame.ini and I've tried running with "mame -joystick -noreadconfig -rompath $HOME/rom".

If I run mame with -verbose it appears to find the joystick ok:
Code:
Joystick: Start initialization
Input: Adding Joy #0: Saitek PLC Cyborg Force Rumble Pad
Joystick: Saitek PLC Cyborg Force Rumble Pad
Joystick:   ...  4 axes, 12 buttons 1 hats 0 balls
Joystick:   ...  Physical id 0 mapped to logical id 1
Joystick: End initialization


I can't use the gamepad to control the menus or games and if I try and set a key in the menu it doesn't accept any input or button.

Output from "ls -l /dev/input/js0":
Code:
crw-rw-r--+ 1 root input 13, 0 Aug 29 13:58 /dev/input/js0


My user is a member of the input group and I even tried running mame as root and the gamepad still doesn't work.

Any help would be appreciated!
Posted By: The Flying Ape

Re: Gamepad not working in Linux MAME - 09/04/15 12:20 PM

It's not a permissions issue, you do not need to be a member of the input group. How does `jstest /dev/input/js0` output look?

Not familiar with that pad variety, but is it using the kernel's xpad module or the xboxdrv service or something else entirely?

I recall if it's a Playstation compatible pad, you might want to try enabling the "sixaxis" option in mame.
Posted By: R. Belmont

Re: Gamepad not working in Linux MAME - 09/04/15 12:25 PM

Does the joypad work in other software? It strongly appears that the kernel is detecting it but not reading it for some reason.
Posted By: Cyberzinho Punk

Re: Gamepad not working in Linux MAME - 09/07/15 05:14 PM

crunchy, try to put a file named 99-joystick.rules into /etc/udev/rules.d directory.

In this file, put this line:

Code:
KERNEL=="event*", ATTRS{idVendor}=="xxxx", ATTRS{idProduct}=="yyyy", MODE:="0644"


Where:

xxxx=the ID Vendor likes appear in the lsusb command output
yyyy=the ID Product likes appear in the lsusb command output

E.g., in my case:

Code:
bash-4.3$ lsusb
Bus 007 Device 002: ID 0079:0006 DragonRise Inc. Generic USB Joystick


"0079" is the ID Vendor and "0006" is the ID Product.

I hope this may help you. wink
Posted By: eddiewould

Re: Gamepad not working in Linux MAME - 01/02/16 08:52 AM

I'm having the exact same issue:

- MAME 0.16
- Ubuntu Server 15.10 running on an Intel NUC (NUC5CPYH)
- 2x Logitech, Inc. Precision Gamepad (046d:c21a)

MAME identifies the gamepads on startup:

Quote:
Joystick: Start initialization
Input: Adding Joy #0: Logitech Logitech(R) Precision(TM) Gamepad
Joystick: Logitech Logitech(R) Precision(TM) Gamepad
Joystick: ... 2 axes, 10 buttons 0 hats 0 balls
Joystick: ... Physical id 0 mapped to logical id 1
Input: Adding Joy #1: Logitech Logitech(R) Precision(TM) Gamepad
Joystick: Logitech Logitech(R) Precision(TM) Gamepad
Joystick: ... 2 axes, 10 buttons 0 hats 0 balls
Joystick: ... Physical id 1 mapped to logical id 2
Joystick: End initialization


but refuses to do anything when I try and map buttons in the GUI.

The gamepads work fine in ZSNES, as well as jstest / sdl-jstest.

Any thoughts on what I can try? Pulling my hair out on this one.


Cheers,
Eddie
Posted By: R. Belmont

Re: Gamepad not working in Linux MAME - 01/02/16 12:25 PM

Did anyone reporting these problems build MAME yourself? Because I need at least one person having this problem who can rebuild with some different options to see what happens.
Posted By: manifolded

Re: Gamepad not working in Linux MAME - 02/09/16 09:39 AM

I had the same issue as @eddiewould with a bluetooth sfc30 gamepad. I noticed that /dev/input/jsX devices are universally readable but /dev/input/eventX are not, only by group input. So I added my user to the input group and re-logged in, and that fixed it in mame.
Posted By: R. Belmont

Re: Gamepad not working in Linux MAME - 02/09/16 01:12 PM

Ahh, interesting. That's a useful thing to know, thanks!
© 2020 Forums