Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Hello Ubuntu community,

I am trying to play snes9x-gtk with two players using PS3 Dualshock. My problem is the input configuration for player 2. It will not register my button presses for js1. js0 works fine. Jtest for joystick calibrating shows both controllers working.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

1) Was my joypad actually being heard by the operating system?

In the terminal:

cat /dev/input/js0

shows some funky output, and responds to my button pressed. The first plugged in dualshock was being heard. Now:

cat /dev/input/js1

shows the same thing, and also responds to button presses. (Hold down a button and see the pattern onscreen in terminal respond...)

2) Now start snes9x-gtk program, go to options and then to preferences, does clicking on text field for snes buttons work?

For joypad 1, the program responds to controller input for js0, and binds the correct input to the correct snes button.

For joypad 2 (dropdown, and select 2), there is no response for the most part. Here is where I got lucky, I randomly clicked on the text field for snes button 'right', and pressing the right d-pad input on js1 registered "Joystick 2 Button 5", I switched to joypad 1, and found "Joystick 1 Button 5". So it worked, and was the correct button! Problem though, no other controller buttons were being heard. So I

gedit ~/.snes9x/snes9x.xml

and found under joypad 0, all the bindings numbers for js0.

Under joypad 1 (which is js1, but joypad 2 in the program.)(Programming languages starts lists at 0 not 1) I found:

<binding name="Right" binding="570425349"/>

every other button had bindings of 0, so they were not being set. I looked back at joypad 0, and found the equivalent binding for js0 was

<binding name="Right" binding="553648133"/>

so this doesn't immediatly help unleass you have all the bindings for js0, which since input for joypad 1 in preferences did hear all the button presses, I had all the bindings. Using a little bit of logic and math, I looked at the binding for left under joypad 0 and got:

<binding name="Left" binding="553648135"/>

so the left binding input was 2 more than the right binding. So under joypad 1 (js1)

this: <binding name="Left" binding="0"/>

became this: <binding name="Left" binding="570425351"/>

and I saved the xml file, and reopened snes9x-gtk, lo and behold under joypad 2, it showed for the button left "Joystick 2 Button 7", which 7 is 2 more than button 5! I was able to edit the rest of the buttons I needed under js1. Hopefully I explained it well enough, not sure if the bindings are universal for all dualshocks.

3) Did the games finally work? Yes, I tested super mario world for 2 player, and luigi responded to the second Dualshock I had plugged in.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.