How to make joystick completely worked

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
uranus0206
Level 2
Level 2
Posts: 14
Joined: Mon Jun 15, 2009 7:41 am

How to make joystick completely worked

Post by uranus0206 »

Hi all! I have a gamepad named Logitech Dual Action

It worked perfect in Ubuntu9.04. And worked in wine FIFA soccer game.

But it has a little problem that I can't use reghit analog in the game.

It means i can't make some special move in game.

I follew the instruction:

+-DirectInput
| |
| +->MouseWarpOverride
| | [Override default mouse pointer warping behavior:
| | enable: (default) warp pointer when mouse exclusively acquired
| | disable: never warp the mouse pointer
| | force: always warp the pointer]
| |
| +->*<joystick name> = <axes mapping>
| [Linux only (js* devices). This maps axes of joystick "joystick name". The "axes mapping" is
| comma-separated list of "axis type"s - one for each joystick axis (hat-pov uses 2 axes).
| "axis type" is one of: X, Y, Z, Rx, Ry, Rz, Slider1, Slider2, POV1, POV2, POV3, POV4.
| To find the joystick name run
| 'WINEDEBUG=+dinput wine program.exe 2>&1 | grep joydev_enum_device'
| Example: "Logitech Logitech Dual Action"="X,Y,Rz,Slider1,POV1". (two "Logitech"s not a typo)]

maybe i misunderstood that

I created a subfolder named DirectInput under

[HKEY_CURRENT_USER]\Software\Wine\

And then i created a string value named Logitech Logitech Dual Action

and the value is X,Y,Rz,Slider1,POV1

after that i still can't use right analog in game, am i wrong?
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Re: How to make joystick completely worked

Post by vitamin »

uranus0206 wrote:and the value is X,Y,Rz,Slider1,POV1
after that i still can't use right analog in game, am i wrong?
First only one driver supports axes remapping. Two - the mapping might not be what the game wants.
uranus0206
Level 2
Level 2
Posts: 14
Joined: Mon Jun 15, 2009 7:41 am

Post by uranus0206 »

Is wine using ubuntu's driver? I have Calibrated joystick in ubuntu.

then what i can do to remaping to make right analog stick work in game?
uranus0206
Level 2
Level 2
Posts: 14
Joined: Mon Jun 15, 2009 7:41 am

Post by uranus0206 »

well, i have do some test.

i use joystick test software like xpadder, and i got the right analog stick info

thus i changed the axismapping value to "X,Y,Z,Rz,POV1"

and then i use joytester, another windows software, then the result worked!!!

but i still can't play game with my right analog stick......is the problem of the

FIFA game?
jorl17
Level 5
Level 5
Posts: 365
Joined: Mon Jul 28, 2008 6:44 pm

Post by jorl17 »

uranus0206 wrote:well, i have do some test.

i use joystick test software like xpadder, and i got the right analog stick info

thus i changed the axismapping value to "X,Y,Z,Rz,POV1"

and then i use joytester, another windows software, then the result worked!!!

but i still can't play game with my right analog stick......is the problem of the

FIFA game?
Probably it is in the way it expect things to be. I used to have the exact same problem with FIFA08. And in FIFA09 the joystick was blown, so I use the mouse.

But you said that you got it to detect the axis in a windows app via wine? And did it detect the exact same axis as if it was being run on windows?

Jorl17
uranus0206
Level 2
Level 2
Posts: 14
Joined: Mon Jun 15, 2009 7:41 am

Post by uranus0206 »

yeah! Here is a screenshot of Xpadder via wine.

You can see my axis all detected... "Axis Z" and "Axis Rz" stands right

stick's horizontal and vertical direction

but i still can't play with that in my game...pitty

Image
uranus0206
Level 2
Level 2
Posts: 14
Joined: Mon Jun 15, 2009 7:41 am

Post by uranus0206 »

uranus0206 wrote:yeah! Here is a screenshot of Xpadder via wine.

You can see my axis all detected... "Axis Z" and "Axis Rz" stands right

stick's horizontal and vertical direction


Image
And here is i test in windows Xp via virtualbox:
Image

the results are the same,but i still can't play with that in my game...pitty :cry:
uranus0206
Level 2
Level 2
Posts: 14
Joined: Mon Jun 15, 2009 7:41 am

Post by uranus0206 »

well, i cahnged the axis mapping to "X,Y,POV1,POV2"

and the right analog stick worked in the game menu.......

but I still cannot use that in game..

why donsent the game recognize Z axis and Rz axis?
jorl17
Level 5
Level 5
Posts: 365
Joined: Mon Jul 28, 2008 6:44 pm

Post by jorl17 »

uranus, it worked in the menu, but the left one didn't, right?
uranus0206
Level 2
Level 2
Posts: 14
Joined: Mon Jun 15, 2009 7:41 am

Post by uranus0206 »

jorl17 wrote:uranus, it worked in the menu, but the left one didn't, right?
yes, when i changd the mapping to "X,Y,POV1,POV2"

it worked in the menu.

but didn't work in playing game
uranus0206
Level 2
Level 2
Posts: 14
Joined: Mon Jun 15, 2009 7:41 am

Post by uranus0206 »

uranus0206 wrote:
jorl17 wrote:uranus, it worked in the menu, but the left one didn't, right?
yes, when i changd the mapping to "X,Y,POV1,POV2"

it worked in the menu.

but didn't work in playing game
ps: my left analog stick always works but the right analog stick.
landeel
Level 2
Level 2
Posts: 34
Joined: Sun May 18, 2008 11:49 am

Post by landeel »

Maybe this will solve your problem:
http://ubuntuforums.org/showthread.php?t=761044
uranus0206
Level 2
Level 2
Posts: 14
Joined: Mon Jun 15, 2009 7:41 am

Post by uranus0206 »

landeel wrote:Maybe this will solve your problem:
http://ubuntuforums.org/showthread.php?t=761044
i have install jscalibrator in the ubuntu repository, and it worked well.

shou i install this?
landeel
Level 2
Level 2
Posts: 34
Joined: Sun May 18, 2008 11:49 am

Post by landeel »

Read it. This is a patched version of jscal that will let you remap your joystick axes and buttons.
uranus0206
Level 2
Level 2
Posts: 14
Joined: Mon Jun 15, 2009 7:41 am

Post by uranus0206 »

landeel wrote:Maybe this will solve your problem:
http://ubuntuforums.org/showthread.php?t=761044
I read the instruction, and i compiled the patch.

I run ./jscal -q /dev/input/js0 then it showed: jscal -u 6,0,1,2,5,16,17,12,288,289,290,291,292,293,294,295,296,297,298,299 /dev/input/js0

It means i have 6 axis which are
"0" means X at x direction of left analog stick
"1" means Y at y direction of left analog stick
"2" means Z at x direction of right analog stick
"5" means Rz at y direction of right analog stick

I've tested and it work well, and i don't have to remapping the axis.
But i still cannot use right analog stick in game
uranus0206
Level 2
Level 2
Posts: 14
Joined: Mon Jun 15, 2009 7:41 am

Post by uranus0206 »

there is another problem i forgot to mention.

my joystick in the game will be regard as two joysticks...

maybe that's the whole problem, but i don't know how to fix.
vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Post by vitamin »

uranus0206 wrote:my joystick in the game will be regard as two joysticks.
maybe that's the whole problem, but i don't know how to fix.
That's correct, Wine has 2 joystick drivers. You'll have to select in your game which one to use.
uranus0206
Level 2
Level 2
Posts: 14
Joined: Mon Jun 15, 2009 7:41 am

Post by uranus0206 »

vitamin wrote:
uranus0206 wrote:my joystick in the game will be regard as two joysticks.
maybe that's the whole problem, but i don't know how to fix.
That's correct, Wine has 2 joystick drivers. You'll have to select in your game which one to use.
I chose one that analog stick can work in menu, but i can't play game with right analog stick.
uranus0206
Level 2
Level 2
Posts: 14
Joined: Mon Jun 15, 2009 7:41 am

Post by uranus0206 »

This time i run wine in terminal and i got a message

fixme:dinput:joy_polldev joystick cannot handle type 4 event (code 4)
uranus0206
Level 2
Level 2
Posts: 14
Joined: Mon Jun 15, 2009 7:41 am

[Problem Sloved]

Post by uranus0206 »

OK! Now i finally find where the problem is! And it's simple to solve!

I find the fifa game will regard my "Logitech Dual Action" joystick as the

"Default" joystick.

That's why i can't use right analog stick even i change mapping in regedit

Now the solution is just modify some contents in the installed game folder

called (FIFA08 for example in the windows browser view):

C:\Program Files\EA Sports\FIFA 08\deta\input\devdata.dat

just edit this file with editor such as gedit, notepad(wine)...

and search "Logitech Dual Action" in the content, like this

Image

and then copy all the mapping values below this subject.

Then search "Default", and paste what you copy to replace all the content

but remain the title of gampad name.

Image

and then copy this file to ~/FIFA 08/user/

now i can play with whole function in game!

PS:maybe it will work with others non Logitech gamepad...
Locked