Gamepad missing buttons

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
agusmba
Level 2
Level 2
Posts: 29
Joined: Wed Mar 26, 2008 6:13 pm

Gamepad missing buttons

Post by agusmba »

I am trying to use a Guillemot gamepad with PES6 but the buttons are not recognized.

In kubuntu system settings I can see my pad, callibrate the joysticks and see the buttons are recognized, but not inside wine (only the joysticks are recognized).

I have tried different combinations for the DirectInput entry in the registry but either I have not stumbled upon the correct one or there is another issue preventing the working of the buttons.

Any advice on how to proceed?

Thanks!!
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: Gamepad missing buttons

Post by vitamin »

agusmba wrote:I am trying to use a Guillemot gamepad with PES6 but the buttons are not recognized.

In kubuntu system settings I can see my pad, callibrate the joysticks and see the buttons are recognized, but not inside wine (only the joysticks are recognized).

I have tried different combinations for the DirectInput entry in the registry but either I have not stumbled upon the correct one or there is another issue preventing the working of the buttons.

Any advice on how to proceed?

Thanks!!
What are you testing this with? Are you using linux_joystick driver or evdev? (do you have access to /dev/input/event? device for joystick?)
agusmba
Level 2
Level 2
Posts: 29
Joined: Wed Mar 26, 2008 6:13 pm

Post by agusmba »

What are you testing this with? Are you using linux_joystick driver or evdev? (do you have access to /dev/input/event? device for joystick?)
I'm using a vanilla Kubuntu 8.04 (beta), clean installation, installed the fglrx drivers to get HW accel, and got the latest packages from wine for ubuntu 7.10 (0.9.48?).

I don't know which driver I'm using for the gamepad (should I lsmod? I'm kind of a newbie when it comes to debugging these problems).

In kubuntu's systemsettings I can go to joystick/keyboard and my gamepad is detected, I can callibrate it correctly and the buttons seem to work.

When I use ProEvolutionSoccer 6's settings to configure keyboard/gamepads, I can use the pad and the joysticks but the buttons don't get recognized.

I used the registry DirectInput method to get PES6 (in wine) to recognize the pad by using "X,Y,Z,Rx,POV1". I also tried other combinations but I was blindly doing it and I didn't improve anything. Still the buttons are not recognized.

How could I check if I have access to /dev/input/event? (remember part of the gamepad works, I can play using the gamepad's joystick and using the keyboard instead of the gamepad's buttons but it's pretty awkward)

Thanks!!
Last edited by agusmba on Thu Mar 27, 2008 11:32 am, edited 1 time in total.
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Post by vitamin »

agusmba wrote:How could I check if I have access to /dev/input/event?
ls -la /dev/input/event?
agusmba
Level 2
Level 2
Posts: 29
Joined: Wed Mar 26, 2008 6:13 pm

Post by agusmba »

vitamin wrote:
agusmba wrote:How could I check if I have access to /dev/input/event?
ls -la /dev/input/event?
Ok, will do that as soon as I get home. Could it be that this prevents the buttons from working in wine but not the joysticks in the same gamepad?

I did try something like "cat /dev/js0" (or something like that) and I could see some garbage whenever I used any button from the gamepad.
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Post by vitamin »

agusmba wrote:I did try something like "cat /dev/js0" (or something like that) and I could see some garbage whenever I used any button from the gamepad.
That would be the wrong device to use. It does not support axes configuration.
agusmba
Level 2
Level 2
Posts: 29
Joined: Wed Mar 26, 2008 6:13 pm

Post by agusmba »

vitamin wrote:
agusmba wrote:I did try something like "cat /dev/js0" (or something like that) and I could see some garbage whenever I used any button from the gamepad.
That would be the wrong device to use. It does not support axes configuration.
Mmmm axes == buttons?
is it easy to switch devices?

I also did use the WINDEBUG thing and grep the js0 from wine log to get the name of the gamepad and it looked correct.
agusmba
Level 2
Level 2
Posts: 29
Joined: Wed Mar 26, 2008 6:13 pm

Post by agusmba »

vitamin wrote:
agusmba wrote:How could I check if I have access to /dev/input/event?
ls -la /dev/input/event?

Code: Select all

ls -la /dev/input/event
ls: cannot access /dev/input/event: No such file or directory
but...

Code: Select all

ls -la /dev/input
total 0
drwxr-xr-x  4 root root       360 2008-03-27 19:53 .
drwxr-xr-x 15 root root     14240 2008-03-27 19:53 ..
drwxr-xr-x  2 root root       180 2008-03-27 19:53 by-id
drwxr-xr-x  2 root root       220 2008-03-27 19:53 by-path
crw-rw----  1 root root    13, 64 2008-03-27 19:53 event0
crw-rw----  1 root root    13, 65 2008-03-27 19:53 event1
crw-rw----  1 root root    13, 66 2008-03-27 19:53 event2
crw-rw----  1 root root    13, 67 2008-03-27 19:53 event3
crw-rw----  1 root root    13, 68 2008-03-27 19:53 event4
crw-rw----  1 root root    13, 69 2008-03-27 19:53 event5
crw-rw----  1 root root    13, 70 2008-03-27 19:53 event6
crw-rw----  1 root root    13, 71 2008-03-27 19:53 event7
crw-rw----  1 root root    13, 72 2008-03-27 19:53 event8
crw-rw----  1 root plugdev 13,  0 2008-03-27 19:53 js0
crw-rw----  1 root root    13, 63 2008-03-27 19:52 mice
crw-rw----  1 root root    13, 32 2008-03-27 19:52 mouse0
crw-rw----  1 root root    13, 33 2008-03-27 19:53 mouse1
crw-rw----  1 root root    13, 34 2008-03-27 19:53 mouse2
Is this ok?
agusmba
Level 2
Level 2
Posts: 29
Joined: Wed Mar 26, 2008 6:13 pm

Post by agusmba »

More info,

In SystemSettings -> Keyboard/mouse/joystick
==============

Code: Select all

Guillemot Corporation DA Leader (/dev/input/js0)

Buttons:
1-13
State PRESSED

Axes:
1(x)   \_ Left joystick
2(y)   /
3   \_ Right joystick
4   /
5
6
And in KInfoCenter (USB Devices)
=========================

Code: Select all

DA Leader

Manufacturer: Guillemot Corporation

Class 0 ((Defined at Interface level))
Subclass 0
Protocol 0
USB Version 1.00

Vendor ID 0x6f8 (Guillemot Corp.)
Product ID 0xa300 (Dual Analog Leader GamePad)
Revision 0.00

Speed 1.5 Mbit/s
Channels 0
Max. Packet Size 8
Also:
~$ lsmod | grep joy
joydev 13120 0

I don't know how to see if I'm using linux_joystick or evdev, will google it...
agusmba
Level 2
Level 2
Posts: 29
Joined: Wed Mar 26, 2008 6:13 pm

Re: Gamepad missing buttons

Post by agusmba »

vitamin wrote: ... Are you using linux_joystick driver or evdev? ...
I have xserver-xorg-input-evdev installed
and
xserver-xorg-input-joystick NOT installed

I hope I'm not putting too much info on this thread. :D
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Post by vitamin »

agusmba wrote:drwxr-xr-x 4 root root 360 2008-03-27 19:53 .
drwxr-xr-x 15 root root 14240 2008-03-27 19:53 ..
drwxr-xr-x 2 root root 180 2008-03-27 19:53 by-id
drwxr-xr-x 2 root root 220 2008-03-27 19:53 by-path
crw-rw---- 1 root root 13, 64 2008-03-27 19:53 event0
crw-rw---- 1 root root 13, 65 2008-03-27 19:53 event1
crw-rw---- 1 root root 13, 66 2008-03-27 19:53 event2
crw-rw---- 1 root root 13, 67 2008-03-27 19:53 event3
crw-rw---- 1 root root 13, 68 2008-03-27 19:53 event4
crw-rw---- 1 root root 13, 69 2008-03-27 19:53 event5
crw-rw---- 1 root root 13, 70 2008-03-27 19:53 event6
crw-rw---- 1 root root 13, 71 2008-03-27 19:53 event7
crw-rw---- 1 root root 13, 72 2008-03-27 19:53 event8
Find which one is your joystick (look through output from 'lshal') and 'chmod a+rw' it.
agusmba
Level 2
Level 2
Posts: 29
Joined: Wed Mar 26, 2008 6:13 pm

Post by agusmba »

vitamin wrote: Find which one is your joystick (look through output from 'lshal') and 'chmod a+rw' it.
Ok, I'll do that this afternoon (local timezone ;-))

So even though it looked like the gamepad was at /dev/input/js0
it's possible that it's also at one of the eventX? Or maybe one is for the analog joysticks and the other for the buttons?

Thanks! I'll get back to you with the results for the tests after the 'lshal' and 'chmod...'.
agusmba
Level 2
Level 2
Posts: 29
Joined: Wed Mar 26, 2008 6:13 pm

Post by agusmba »

@vitamin: Thanks for your patience, and sorry for the late reply.

Using lshal I saw that my gamepad was at /dev/input/event1
so I chmoded it to 777.

After that I removed the registry setting for DirectInput so I didn't mess with what wine could do automagically.

I executed the PES6 settings with wine and now when I pushed any of the previously non-working buttons I get in stdout:

Code: Select all

fixme:dinput:joy_polldev joystick cannot handle type 4 event (code 4)
fixme:dinput:joy_polldev joystick cannot handle type 4 event (code 4)
A bit of an improvement but still the buttons don't work. I don't know if putting a smart string in the DirectInput registry would help...

Thanks!
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Post by vitamin »

agusmba wrote:@vitamin: Thanks for your patience, and sorry for the late reply.

Using lshal I saw that my gamepad was at /dev/input/event1
so I chmoded it to 777.

After that I removed the registry setting for DirectInput so I didn't mess with what wine could do automagically.

I executed the PES6 settings with wine and now when I pushed any of the previously non-working buttons I get in stdout:

Code: Select all

fixme:dinput:joy_polldev joystick cannot handle type 4 event (code 4)
fixme:dinput:joy_polldev joystick cannot handle type 4 event (code 4)
A bit of an improvement but still the buttons don't work. I don't know if putting a smart string in the DirectInput registry would help...

Thanks!
Looks like you are still using the old driver. Please remove the /dev/js0 and /dev/input/js0 and try again.
agusmba
Level 2
Level 2
Posts: 29
Joined: Wed Mar 26, 2008 6:13 pm

Post by agusmba »

vitamin wrote:
agusmba wrote:...

Code: Select all

fixme:dinput:joy_polldev joystick cannot handle type 4 event (code 4)
fixme:dinput:joy_polldev joystick cannot handle type 4 event (code 4)
A bit of an improvement but still the buttons don't work. I don't know if putting a smart string in the DirectInput registry would help...

Thanks!
Looks like you are still using the old driver. Please remove the /dev/js0 and /dev/input/js0 and try again.
Can I safely remove it? I'm afraid of breaking something else outside wine since /dev/input/js0 is the device I saw in the OS systemsettings (KDE).

Does it matter that the gamepad is usb?

Thanks!
agusmba
Level 2
Level 2
Posts: 29
Joined: Wed Mar 26, 2008 6:13 pm

Post by agusmba »

Ok, I removed /dev/input/js0
Now when I launch de configuration program for PES (wine settings.exe) I don't see my gamepad (joystick) anymore, so I have nothing to test :?

Any idea how should I recover my lost gamepad (hopefully the right way)?

Thanks!

BTW there was no /dev/js0 to remove.
agusmba
Level 2
Level 2
Posts: 29
Joined: Wed Mar 26, 2008 6:13 pm

Post by agusmba »

Mmm, turns out that today my gamepad was at /dev/input/event8 instead of event1 as yesterday!

I chmodded event8 and now wine "sees" again my gamepad. However when I push the buttons I get the

Code: Select all

 fixme:dinput:joy_polldev joystick cannot handle type 4 event (code 4)
again...
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Post by vitamin »

agusmba wrote:Mmm, turns out that today my gamepad was at /dev/input/event8 instead of event1 as yesterday!

I chmodded event8 and now wine "sees" again my gamepad. However when I push the buttons I get the

Code: Select all

 fixme:dinput:joy_polldev joystick cannot handle type 4 event (code 4)
again...
Remove those files again. But do not unplug your joystick! BTW that's how you restore those files - by unplugging and plugging it back in.

If it won't work for you then your joystick is misreported by the driver. The event 4 is the SY_MSC which shouldn't be sent for the joystick.
agusmba
Level 2
Level 2
Posts: 29
Joined: Wed Mar 26, 2008 6:13 pm

Post by agusmba »

vitamin wrote: Remove those files again. But do not unplug your joystick! BTW that's how you restore those files - by unplugging and plugging it back in.

If it won't work for you then your joystick is misreported by the driver. The event 4 is the SY_MSC which shouldn't be sent for the joystick.
I didn't unplug the joystick before. Will repeat again just in case (after rebooting the pc):

Code: Select all

~$ sudo rm /dev/input/js0
~$ sudo chmod 666 /dev/input/event4 

~$ lsmod | grep joy
joydev                 13120  0
~$ lsmod | grep evdev
evdev                  13056 4

~/.wine/drive_c/Archivos de programa/KONAMI/Pro Evolution Soccer 6$ wine settings.exe
...
fixme:dinput:joy_polldev joystick cannot handle type 4 event (code 4)
fixme:dinput:joy_polldev joystick cannot handle type 4 event (code 4)

there was no /dev/js0

Still the buttons aren't recognized, and the joysticks are not recognized properly.
I'll try now to guess a DirectInput string for the registry see if there's any luck...

Thanks for all the help!
agusmba
Level 2
Level 2
Posts: 29
Joined: Wed Mar 26, 2008 6:13 pm

Post by agusmba »

Some more info,
I launched the wine app with WINEDEBUG=+dinput

And saw

Code: Select all

trace:dinput:IDirectInputWImpl_EnumDevices   - checking device 2 ('Wine Linux-input joystick driver')
trace:dinput:find_joydevs Found a joystick on /dev/input/event4: Guillemot Corporation DA Leader ({9e573eda-7734-11d2-8d4a-23903fb6bdf7})
trace:dinput:find_joydevs  ... with axis 0: cur=103, min=0, max=255, fuzz=0, flat=15
trace:dinput:find_joydevs  ... with axis 1: cur=133, min=0, max=255, fuzz=0, flat=15
trace:dinput:find_joydevs  ... with axis 5: cur=120, min=0, max=255, fuzz=0, flat=15
trace:dinput:find_joydevs  ... with axis 6: cur=135, min=0, max=255, fuzz=0, flat=15
trace:dinput:find_joydevs  ... with axis 16: cur=0, min=-1, max=1, fuzz=0, flat=0
trace:dinput:find_joydevs  ... with axis 17: cur=0, min=-1, max=1, fuzz=0, flat=0
trace:dinput:IDirectInputWImpl_EnumDevices   - checking device 3 ('Wine Linux joystick driver')
trace:dinput:IDirectInputWImpl_EnumDevices (this=0x135728,0x0004 'DIDEVTYPE_JOYSTICK',0x40bec0,0x590f80,0001)

Not sure if it's exactly the same model as my old gamepad: Gullemot Dual Analog
agusmba
Level 2
Level 2
Posts: 29
Joined: Wed Mar 26, 2008 6:13 pm

Post by agusmba »

more info from WINEDEBUG:

Code: Select all

trace:dinput:_dump_OBJECTINSTANCEW     - enumerating : {a36d02e0-c9f3-11cf-bfc7-444553540000} ('GUID_XAxis'), -  0 - 0x00000002 - L"Axis 0"
trace:dinput:IDirectInputDevice2WImpl_GetObjectInfo (0x1383c8) 2(0x00000102) -> 0x33e010
trace:dinput:_dump_OBJECTINSTANCEW     - enumerating : {a36d02e1-c9f3-11cf-bfc7-444553540000} ('GUID_YAxis'), -  4 - 0x00000102 - L"Axis 1"
trace:dinput:IDirectInputDevice2WImpl_GetObjectInfo (0x1383c8) 2(0x00000202) -> 0x33e010
trace:dinput:_dump_OBJECTINSTANCEW     - enumerating : {a36d02e3-c9f3-11cf-bfc7-444553540000} ('GUID_RzAxis'), - 20 - 0x00000202 - L"Axis 2"
trace:dinput:IDirectInputDevice2WImpl_GetObjectInfo (0x1383c8) 2(0x00000302) -> 0x33e010
trace:dinput:_dump_OBJECTINSTANCEW     - enumerating : {a36d02e4-c9f3-11cf-bfc7-444553540000} ('GUID_Slider'), - 24 - 0x00000302 - L"Axis 3"
trace:dinput:IDirectInputDevice2WImpl_GetObjectInfo (0x1383c8) 2(0x00000010) -> 0x33e010
trace:dinput:_dump_OBJECTINSTANCEW     - enumerating : {a36d02f2-c9f3-11cf-bfc7-444553540000} ('GUID_POV'), - 32 - 0x00000010 - L"POV 0"
trace:dinput:IDirectInputDevice2WImpl_GetObjectInfo (0x1383c8) 2(0x00000004) -> 0x33e010
trace:dinput:_dump_OBJECTINSTANCEW     - enumerating : {00000000-0000-0000-0000-000000000000} ('Unknown GUID'), - 48 - 0x00000004 - L"Button 0"
trace:dinput:IDirectInputDevice2WImpl_GetObjectInfo (0x1383c8) 2(0x00000104) -> 0x33e010
trace:dinput:_dump_OBJECTINSTANCEW     - enumerating : {00000000-0000-0000-0000-000000000000} ('Unknown GUID'), - 49 - 0x00000104 - L"Button 1"
trace:dinput:IDirectInputDevice2WImpl_GetObjectInfo (0x1383c8) 2(0x00000204) -> 0x33e010
trace:dinput:_dump_OBJECTINSTANCEW     - enumerating : {00000000-0000-0000-0000-000000000000} ('Unknown GUID'), - 50 - 0x00000204 - L"Button 2"
trace:dinput:IDirectInputDevice2WImpl_GetObjectInfo (0x1383c8) 2(0x00000304) -> 0x33e010
trace:dinput:_dump_OBJECTINSTANCEW     - enumerating : {00000000-0000-0000-0000-000000000000} ('Unknown GUID'), - 51 - 0x00000304 - L"Button 3"
trace:dinput:IDirectInputDevice2WImpl_GetObjectInfo (0x1383c8) 2(0x00000404) -> 0x33e010
trace:dinput:_dump_OBJECTINSTANCEW     - enumerating : {00000000-0000-0000-0000-000000000000} ('Unknown GUID'), - 52 - 0x00000404 - L"Button 4"
trace:dinput:IDirectInputDevice2WImpl_GetObjectInfo (0x1383c8) 2(0x00000504) -> 0x33e010
trace:dinput:_dump_OBJECTINSTANCEW     - enumerating : {00000000-0000-0000-0000-000000000000} ('Unknown GUID'), - 53 - 0x00000504 - L"Button 5"
...
I see something about Buttons there...
agusmba
Level 2
Level 2
Posts: 29
Joined: Wed Mar 26, 2008 6:13 pm

Post by agusmba »

Today I tested again with a different usb gamepad (branded rainbow but recognized as generic usb gamepad/joystick).

Tried to get it working out of the box and then following vitamin's recommendations but...

I got the same results, the buttons (triangle, square, circle, x) are not recognized and I get the same errors as with my old guillemot :-(
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Post by vitamin »

agusmba wrote:Today I tested again with a different usb gamepad (branded rainbow but recognized as generic usb gamepad/joystick).

Tried to get it working out of the box and then following vitamin's recommendations but...

I got the same results, the buttons (triangle, square, circle, x) are not recognized and I get the same errors as with my old guillemot :-(
So what the 'jstest /dev/input/js0' does? Does it work?
agusmba
Level 2
Level 2
Posts: 29
Joined: Wed Mar 26, 2008 6:13 pm

Post by agusmba »

vitamin wrote:
agusmba wrote:Today I tested again with a different usb gamepad (branded rainbow but recognized as generic usb gamepad/joystick).

Tried to get it working out of the box and then following vitamin's recommendations but...

I got the same results, the buttons (triangle, square, circle, x) are not recognized and I get the same errors as with my old guillemot :-(
So what the 'jstest /dev/input/js0' does? Does it work?
Mmm, I don't know, I'll test it tonight.
However with kcontrol (from systemsettings in kde) I could see the gamepad fine and all the buttons were recognized correctly.
agusmba
Level 2
Level 2
Posts: 29
Joined: Wed Mar 26, 2008 6:13 pm

Post by agusmba »

I didn't have the joystick package installed, I apt-get'ted it and run the jstest.
All two joysticks and 12 buttons in the gamepad were recognized correctly and when I pushed them I got the right feedback on the console.

However PES on wine still doesn't see the buttons...
Locked