Only one joystick of two activated

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
HeliFlyer
Newbie
Newbie
Posts: 1
Joined: Tue Oct 21, 2008 3:38 am

Only one joystick of two activated

Post by HeliFlyer »

Hi,

I am always using the newest Wine snapshot on OpenSUSE 10.3 x86_64.

My two USB-joysticks (js0, js1) - which are pedals and joystick - work without problems with all native Linux simulations like FlightGear, Torcs, etc.

It is a big pity that with Wine only the first joystick is activated, no matter which order I use, because with Wine all my old Windows simulations work without problems.

This is no new problem and I waited a long time as I was convinced that new versions of Wine would solve this, but now I think it is the time to call for help.

I made a trace with "> WINEDEBUG=+dinput wine fly2.exe 2>&1 | grep -i joy" and one can see that the second joystick is recognized but cannot be activated, this is the important part of the trace after my opinion:
trace:dinput:IDirectInputAImpl_EnumDevices - checking device 3 ('Wine Linux joystick driver')
trace:dinput:joydev_enum_deviceA Enumerating the linux Joystick device: /dev/input/js1 (Saitek Saitek X52 Flight Control System)
trace:dinput:joydev_create_deviceA 0x35ce3f8 {9e573ed9-7734-0001-8d4a-23903fb6bdf7} (nil) 0x32f0f8
trace:dinput:JoystickAImpl_GetCapabilities 0x35ce4d0->(0x32f114)
trace:dinput:JoystickAImpl_GetDeviceInfo (0x35ce4d0,0x32f37c)
trace:dinput:JoystickAImpl_Unacquire (0x35ce4d0)
trace:dinput:JoystickAImpl_Unacquire (0x35ce4d0)
trace:dinput:IDirectInputAImpl_EnumDevices - checking device 3 ('Wine Linux joystick driver')
trace:dinput:JoystickAImpl_Unacquire (0x2029b0)
trace:dinput:JoystickAImpl_Unacquire closing joystick device
I would be very thankful if someone could have a look at this problem.

Regards
Georg

This is the full trace:
georg@dhcppc2:~/.wine/drive_c/Programme/Terminal Reality/Fly! II> WINEDEBUG=+dinput wine fly2.exe 2>&1 | grep -i joy
trace:dinput:IDirectInputAImpl_EnumDevices - checking device 2 ('W
ine Linux-input joystick driver')
trace:dinput:IDirectInputAImpl_EnumDevices - checking device 3 ('W
ine Linux joystick driver')
trace:dinput:joydev_enum_deviceA Enumerating the linux Joystick devi
ce: /dev/input/js0 (HID 0583:2032)
trace:dinput:joydev_create_deviceA 0x35ce3f8 {9e573ed9-7734-0000-8d4
a-23903fb6bdf7} (nil) 0x32f0f8
trace:dinput:JoystickAImpl_GetCapabilities 0x2029b0->(0x32f114)
trace:dinput:JoystickAImpl_GetDeviceInfo (0x2029b0,0x32f37c)
trace:dinput:JoystickAImpl_SetProperty (0x2029b0,<guid-0x0005>,0x32f
0b0)
trace:dinput:JoystickAImpl_SetProperty deadzone(0) obj=0
trace:dinput:JoystickAImpl_SetProperty (0x2029b0,<guid-0x000a>,0x32f
0b0)
trace:dinput:JoystickAImpl_GetProperty (0x2029b0,<guid-0x0004>,0x32f
0c4)
trace:dinput:JoystickAImpl_GetProperty range(0, 65535) obj=0
trace:dinput:JoystickAImpl_SetProperty (0x2029b0,<guid-0x0005>,0x32f
0b0)
trace:dinput:JoystickAImpl_SetProperty deadzone(0) obj=1
trace:dinput:JoystickAImpl_SetProperty (0x2029b0,<guid-0x000a>,0x32f
0b0)
trace:dinput:JoystickAImpl_GetProperty (0x2029b0,<guid-0x0004>,0x32f
0c4)
trace:dinput:JoystickAImpl_GetProperty range(0, 65535) obj=1
trace:dinput:JoystickAImpl_SetProperty (0x2029b0,<guid-0x0005>,0x32f
0b0)
trace:dinput:JoystickAImpl_SetProperty deadzone(0) obj=2
trace:dinput:JoystickAImpl_SetProperty (0x2029b0,<guid-0x000a>,0x32f
0b0)
trace:dinput:JoystickAImpl_GetProperty (0x2029b0,<guid-0x0004>,0x32f
0c4)
trace:dinput:JoystickAImpl_GetProperty range(0, 65535) obj=2
trace:dinput:JoystickAImpl_SetProperty (0x2029b0,<guid-0x0005>,0x32f
0b0)
trace:dinput:JoystickAImpl_SetProperty deadzone(0) obj=3
trace:dinput:JoystickAImpl_SetProperty (0x2029b0,<guid-0x000a>,0x320b0)
trace:dinput:JoystickAImpl_GetProperty (0x2029b0,<guid-0x0004>,0x32f0c4)
trace:dinput:JoystickAImpl_GetProperty range(0, 65535) obj=3
trace:dinput:JoystickAImpl_Acquire (0x2029b0)
trace:dinput:IDirectInputAImpl_EnumDevices - checking device 3 ('Wine Linux joystick driver')
trace:dinput:joydev_enum_deviceA Enumerating the linux Joystick device: /dev/input/js1 (Saitek Saitek X52 Flight Control System)
trace:dinput:joydev_create_deviceA 0x35ce3f8 {9e573ed9-7734-0001-8d4a-23903fb6bdf7} (nil) 0x32f0f8
trace:dinput:JoystickAImpl_GetCapabilities 0x35ce4d0->(0x32f114)
trace:dinput:JoystickAImpl_GetDeviceInfo (0x35ce4d0,0x32f37c)
trace:dinput:JoystickAImpl_Unacquire (0x35ce4d0)
trace:dinput:JoystickAImpl_Unacquire (0x35ce4d0)
trace:dinput:IDirectInputAImpl_EnumDevices - checking device 3 ('Wine Linux joystick driver')
trace:dinput:JoystickAImpl_Unacquire (0x2029b0)
trace:dinput:JoystickAImpl_Unacquire closing joystick device
trace:dinput:JoystickAImpl_Unacquire (0x2029b0)
georg@dhcppc2:~/.wine/drive_c/Programme/Terminal Reality/Fly! II>
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: Only one joystick of two activated

Post by vitamin »

HeliFlyer wrote:My two USB-joysticks (js0, js1) - which are pedals and joystick - work without problems with all native Linux simulations like FlightGear, Torcs, etc.
Please open a bug report and attach complete output of WINEDEBUG=+dinput
Malla
Level 1
Level 1
Posts: 8
Joined: Sun Oct 26, 2008 9:35 am

Post by Malla »

Hi,

I think I've got a similar problem here. I'm trying to get Atomic Bomberman with 3 MS Sidewinder (USB-)Gamepads to run - with no success. The game works perfectly with 2 Gamepads, but it's impossible to select the third one in the game. Atomic Bomberman does support more than 2 Gamepads in Windows, I can play the game on WinXP with these 3 Gamepads.
I tested the three Gamepads on Ubuntu 8.04 (Wine 1.0.1, 1.1.7) and openSuse11 (Wine 1.0.1). It was no problem to use them with native Linux-Emulators/-games (e.g. Mupen64, "jstest"). So my conclusion is that wine is the crux of the matter.

Has anyone tested to use more than 2 Gamepads/Joysticks at once with wine?
What can I do to give you more information? I tried to start the game by using "WINEDEBUG=+dinput wine BM95.EXE 2> myfile", but it gives me a 16MiB file. :(

Moreover, "cat myfile | grep -i joystick" or "cat myfile | grep -i gamepad" doesn't give me anything.

Any ideas?

best regards
Malla
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Post by vitamin »

Malla wrote:I think I've got a similar problem here. I'm trying to get Atomic Bomberman with 3 MS Sidewinder (USB-)Gamepads to run - with no success.
Did you set correct permissions on /dev/input/event* devices?

To see what all Wine found, grep your log for "/dev/input/event" and "/dev/input/js". Former is the preferred interface. Later is legacy and might not work well with Wine.
Malla
Level 1
Level 1
Posts: 8
Joined: Sun Oct 26, 2008 9:35 am

Post by Malla »

Well, I didn't change any permissions, so /dev/inputjs2 has the same persmissions as js1 and js0. If it was a problem with permissions, the gamepads wouldn't work with native games/emulators, would they?

grep -i /dev/input on my logfile doesn't give me any output. :(

with regards
Malla
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Post by vitamin »

Malla wrote:Well, I didn't change any permissions, so /dev/inputjs2 has the same persmissions as js1 and js0.
Read again what I said. I wasn't talking about /dev/input/js* devices. You have to set correct permissions (so that your user can access read/write) to /dev/input/event* devices associated to your joysticks.
Malla
Level 1
Level 1
Posts: 8
Joined: Sun Oct 26, 2008 9:35 am

Post by Malla »

Sorry, my mistake. I've just changed the permissions from

Code: Select all

drwxr-xr-x 2 root root       120 2008-10-26 20:36 by-id
drwxr-xr-x 2 root root       260 2008-10-26 20:36 by-path
crw-rw---- 1 root root    13, 64 2008-10-26 20:36 event0
crw-rw---- 1 root root    13, 65 2008-10-26 20:36 event1
crw-rw---- 1 root root    13, 66 2008-10-26 20:36 event2
crw-rw---- 1 root root    13, 67 2008-10-26 20:36 event3
crw-rw---- 1 root root    13, 68 2008-10-26 20:36 event4
crw-rw---- 1 root root    13, 69 2008-10-26 20:36 event5
crw-rw---- 1 root root    13, 70 2008-10-26 20:36 event6
crw-rw---- 1 root root    13, 71 2008-10-26 20:36 event7
crw-rw---- 1 root root    13, 72 2008-10-26 20:36 event8
crw-rw---- 1 root root    13, 73 2008-10-26 20:36 event9
crw-rw---- 1 root plugdev 13,  0 2008-10-26 20:36 js0
crw-rw---- 1 root plugdev 13,  1 2008-10-26 20:36 js1
crw-rw---- 1 root plugdev 13,  2 2008-10-26 20:36 js2
crw-rw---- 1 root root    13, 63 2008-10-26 21:36 mice
crw-rw---- 1 root root    13, 32 2008-10-26 21:36 mouse0
crw-rw---- 1 root root    13, 33 2008-10-26 21:36 mouse1
to:

Code: Select all

drwxr-xr-x 2 root root       120 2008-10-26 20:36 by-id
drwxr-xr-x 2 root root       260 2008-10-26 20:36 by-path
crwxrwxrwx 1 root root    13, 64 2008-10-26 20:36 event0
crwxrwxrwx 1 root root    13, 65 2008-10-26 20:36 event1
crwxrwxrwx 1 root root    13, 66 2008-10-26 20:36 event2
crwxrwxrwx 1 root root    13, 67 2008-10-26 20:36 event3
crwxrwxrwx 1 root root    13, 68 2008-10-26 20:36 event4
crwxrwxrwx 1 root root    13, 69 2008-10-26 20:36 event5
crwxrwxrwx 1 root root    13, 70 2008-10-26 20:36 event6
crwxrwxrwx 1 root root    13, 71 2008-10-26 20:36 event7
crwxrwxrwx 1 root root    13, 72 2008-10-26 20:36 event8
crwxrwxrwx 1 root root    13, 73 2008-10-26 20:36 event9
crwxrwxrwx 1 root plugdev 13,  0 2008-10-26 20:36 js0
crwxrwxrwx 1 root plugdev 13,  1 2008-10-26 20:36 js1
crwxrwxrwx 1 root plugdev 13,  2 2008-10-26 20:36 js2
crw-rw---- 1 root root    13, 63 2008-10-26 21:36 mice
crw-rw---- 1 root root    13, 32 2008-10-26 21:36 mouse0
crw-rw---- 1 root root    13, 33 2008-10-26 21:36 mouse1
Is that what you meant?
It still doesn't seem to change anything.

Isn't there any other user out there who has tried to get multiple gaming devices to work?
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Post by vitamin »

Malla wrote:It still doesn't seem to change anything.
Strange... Can you post +dinput log somewhere? At least the initial part when you starting game. I'm suspecting your game might not be using dinput for joysticks...
Malla
Level 1
Level 1
Posts: 8
Joined: Sun Oct 26, 2008 9:35 am

Post by Malla »

vitamin wrote:Strange... Can you post +dinput log somewhere? At least the initial part when you starting game. I'm suspecting your game might not be using dinput for joysticks...
Ok, I've uploaded the whole (compressed) logfile. It's 70 kb only!
You'll find it here.
Last edited by Malla on Sat Nov 01, 2008 11:41 am, edited 1 time in total.
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Post by vitamin »

Malla wrote:
vitamin wrote:Strange... Can you post +dinput log somewhere? At least the initial part when you starting game. I'm suspecting your game might not be using dinput for joysticks...
Ok, I've uploaded the whole (compressed) logfile. It's 70 kb only!
You'll find it here.
Yup exactly what I thought - it's not using dinput for joystick. That means it's using winmm which currently in Wine supports only 2 joysticks. I've already sent patch for this yesterday. But you'll need to wait for next Wine version for this to work.
Malla
Level 1
Level 1
Posts: 8
Joined: Sun Oct 26, 2008 9:35 am

Post by Malla »

Great news! Have they already applied your patch in the current GIT tree? I would compile the development version from source, if the new version won't come out the next weeks. I heard that Wine 1.2 won't be released before 2009. So I hope there will be another version in the next weeks. I don't want to wait that long. ;)

Thanks for your effort!

best regards
Malla
austin987
Wine Developer
Wine Developer
Posts: 2383
Joined: Fri Feb 22, 2008 8:19 pm

Only one joystick of two activated

Post by austin987 »

On Mon, Oct 27, 2008 at 7:12 AM, Malla <[email protected]> wrote:
Great news! Have they already applied your patch in the current GIT tree? I would compile the development version from source, if the new version won't come out the next weeks. I heard that Wine 1.2 won't be released before 2009. So I hope there will be another version in the next weeks. I don't want to wait that long. ;)

Thanks for your effort!

best regards
Malla





It was committed today:
http://source.winehq.org/git/wine.git/? ... b3489971da

--
-Austin
Malla
Level 1
Level 1
Posts: 8
Joined: Sun Oct 26, 2008 9:35 am

Post by Malla »

I've just compiled Wine from source and all three Gamepads work perfectly with Atomic Bomberman!

Big thanks vitamin! :)

best regards
Malla
Locked