3 axis joy stick problem

Find any bugs in Vega Strike? See if someone has already found it, or report them here!
GustaveDelior
Merchant
Merchant
Posts: 38
Joined: Sat Jul 14, 2007 8:09 am

3 axis joy stick problem

Post by GustaveDelior »

I own th Satex st290 pro when i put it on 3 axis an throttle setting
when i throttle up my ship spins, when i try to use my third axis my throttle goes up or down depeneding on which way i tun the stick.

the only conclusion i can come up with (at least for my series of joysticks)
are that the throttle and the 3rd axis are switched in config, how ever i have not seen anyone else with this problem so it could be my own joystick and i simply have to redifine throttle and 3rd axis. so to make the end of this short.
i don't know how to redefine what needs to be redifined.
after all i have learned i feel i have learned nothing. Therefore i am not a wise man but i know much about nothing.
loki1950
The Shepherd
Posts: 5841
Joined: Fri May 13, 2005 8:37 pm
Location: Ottawa
Contact:

Post by loki1950 »

The file to hack is vegastrike.config which is XML i use notepad++ in windows for it's syntax highlighting the section you want is the bindings try changing axis that are used there is a section in the wiki on joystick configuration that should give you a guide to start.

Enjoy the Choice :)
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 19.2/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo ideapad 320-15ARB Win 10/Mint 19.2
ace123
Lead Network Developer
Lead Network Developer
Posts: 2560
Joined: Sun Jan 12, 2003 9:13 am
Location: Palo Alto CA
Contact:

Post by ace123 »

If you say that the X-axis does throttle, and throttle turns side to side, then you just want to switch those two axes in the configuration file.

If you look into your vegastrike.config file, you need to look for the line saying:
<axis name="throttle" joystick="0" axis="2"/>
This is 25% through, line 306 in the config file.

If you look 10 lines up from that you will see:
<axis name="x" joystick="0" axis="0" inverse="false" />
<axis name="y" joystick="0" axis="1" inverse="false" />

Basically you can switch around the axis numbers and see the effects... like making "x" be "1", "y" be "2" and "throttle" be axis="0".
rigelan
Confed Special Operative
Confed Special Operative
Posts: 291
Joined: Sat Jan 28, 2006 2:58 am
Location: Des Moines, Iowa

Post by rigelan »

Are you running the recent SVN Gustave?

Because i have been, but my saitek 4-axis joystick has not been working in SVN.
AMD 4800 - NVIDIA 7600 - Slackware Linux 12.2
ace123
Lead Network Developer
Lead Network Developer
Posts: 2560
Joined: Sun Jan 12, 2003 9:13 am
Location: Palo Alto CA
Contact:

Post by ace123 »

Rigelan, I would be interested in your problem too.

I know my two-axis joystick *does* work... and I don't see any good reason for a 4-axis one not to work.

I would be interested in your settings, and the stdout.txt/stderr.txt, and the result of running a joystick calibration program (i.e. which function controls which axis function, and which hatswitches do and do not work)...
Or if you have posted this information in another forum thread, where is it?
rigelan
Confed Special Operative
Confed Special Operative
Posts: 291
Joined: Sat Jan 28, 2006 2:58 am
Location: Des Moines, Iowa

Post by rigelan »

Nope, never posted one. Would it be okay if i start the program without opening any games? I'm pretty sure the joystick is deteced by then. Or should I open up a campaign and then close it down?
AMD 4800 - NVIDIA 7600 - Slackware Linux 12.2
rigelan
Confed Special Operative
Confed Special Operative
Posts: 291
Joined: Sat Jan 28, 2006 2:58 am
Location: Des Moines, Iowa

Post by rigelan »

Oh, and I also know by running a KDE control center, that all of my buttons, switches, and axes DO work (I checked a few days ago). And my joystick worked in SVN till a month ago, until right after I recompiled the binary. For some reason it stopped.
AMD 4800 - NVIDIA 7600 - Slackware Linux 12.2
Jibbles
Merchant
Merchant
Posts: 40
Joined: Wed Sep 19, 2007 1:33 am

Post by Jibbles »

This works for the MS Sidewinder 3d pro on 0.4.3
<axis name="x" joystick="0" axis="3" inverse="false" />
<axis name="y" joystick="0" axis="1" inverse="false" />
<!-- #end -->

<!-- #joy_throttle joy_t_a_rev
<axis name="throttle" joystick="0" axis="0" inverse="true"/>
#end -->
<!-- #joy_t_a_rev
<axis name="z" joystick="0" axis="2"/>
#end -->
<!-- #joy_throttle_and_axis -->
<axis name="throttle" joystick="0" axis="2"/>
<!-- #end -->
<!-- #joy_axis joy_throttle_and_axis -->
<axis name="z" joystick="0" axis="0" inverse="true"/>
<!-- #end -->

Unfortunately I am unable to get my joystick to work at all!, i'll try a system restart, and loose the usb adapter (its fine in windows and 0.4.3 btw)

Seems that VS 0.5 doesn't like it being USB, its fine when i remove the adapter.

And that setup works with 0.5 using my joystick. If i can be bothered, i'll write an app that can do all this for ya.
ace123
Lead Network Developer
Lead Network Developer
Posts: 2560
Joined: Sun Jan 12, 2003 9:13 am
Location: Palo Alto CA
Contact:

Post by ace123 »

is it possible that it doesn't show up as joystick 0, but instead somewhere else?

That's why I was interested in the console output (specifically stderr):

You should see something like:
The Names of the Joystics are:
MS Sidewinder
Axes: 4, Buttons: 15, Hats: 1
Can you find that section and see what joysticks/axes vegastrike does find. That will narrow down if it's a Vegastrike/configuration problem, or a SDL problem, or something else altogether.
rigelan
Confed Special Operative
Confed Special Operative
Posts: 291
Joined: Sat Jan 28, 2006 2:58 am
Location: Des Moines, Iowa

Post by rigelan »

STDERR & STDOUT.

If this provides any help, wonderful. I'm not sure that it will though.
You do not have the required permissions to view the files attached to this post.
AMD 4800 - NVIDIA 7600 - Slackware Linux 12.2
Jibbles
Merchant
Merchant
Posts: 40
Joined: Wed Sep 19, 2007 1:33 am

Post by Jibbles »

Hehe, this is quite bizzare

"0 joysticks were found."
with USB joystick only (I have to manually add the game-port version, and it remains in the damn list too if removed, up the top of course).

"2 joysticks were found.

The names of the joysticks are:
Microsoft SideWinder Precision Pro
axes: 4 buttons: 10 hats: 1
Microsoft SideWinder Precision Pro (USB)
axes: 4 buttons: 9 hats: 1"

if i still have the game-port joystick added but are using the USB adapter (still nothing in game though). Notice the number of buttons, the joystick has only 9 buttons, perhaps there is a cloaked button which is only accessable when using the game-port?

and finally.......
"1 joysticks were found.

The names of the joysticks are:
Microsoft SideWinder Precision Pro
axes: 4 buttons: 10 hats: 1"

with the game-port only (and connected i might add).
I'll post up the stdout's is you want

Just another thought. is it possible to force it to see a joystick at position 1 (or 0), or to possibly make it use the second joystick.
ace123
Lead Network Developer
Lead Network Developer
Posts: 2560
Joined: Sun Jan 12, 2003 9:13 am
Location: Palo Alto CA
Contact:

Post by ace123 »

Linux will not renumber the devices if you unplug one, so your usb joystick may remain /dev/input/js1 even if js0 doesn't exist.

Though I just looked at the SDL source code and it looks like it loops through all the joystick devices looking for them.
This is most certainly an SDL bug of some sort... since Vega Strike uses SDL's joystick library.

When you get to a point where it doesn't actually work, could you try in a terminal:

Code: Select all

head -c0 /dev/input/*
and also:

Code: Select all

ls -l /dev/input/*/*
If all else fails, set the environment variable "SDL_JOYSTICK_DEVICE".

Code: Select all

export SDL_JOYSTICK_DEVICE=/dev/input/js0
which is the actually
Jibbles
Merchant
Merchant
Posts: 40
Joined: Wed Sep 19, 2007 1:33 am

Post by Jibbles »

I suppose i should of mentioned this, I'm using windows and the install of 0.5. On another note, i'm curious to know if there are linux drivers for the ms sidewinder joysticks, anyone know?

What i've generally done when programming using joysticks, i'll make a list of them then let the user select one, i know its not the best, but....yea i do it like that :).

Cheers
Last edited by Jibbles on Thu Oct 04, 2007 10:29 am, edited 1 time in total.
ace123
Lead Network Developer
Lead Network Developer
Posts: 2560
Joined: Sun Jan 12, 2003 9:13 am
Location: Palo Alto CA
Contact:

Post by ace123 »

@rigelan, well I see it:
1 joysticks were found.

The names of the joysticks are:
Saitek Cyborg USB Stick
axes: 6 buttons: 12 hats: 0
So try swapping around those <axis> lines in the vegastrike.config.

Also, have you gone into
http://vegastrike.sourceforge.net/wiki/ ... s:Joystick
loki1950
The Shepherd
Posts: 5841
Joined: Fri May 13, 2005 8:37 pm
Location: Ottawa
Contact:

Post by loki1950 »

@Jibbles there is no need for joystick drivers as such in linux the drivers are part of the kernel and yes the ms joysticks are supported 8)

Enjoy the Choice :)
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 19.2/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo ideapad 320-15ARB Win 10/Mint 19.2
rigelan
Confed Special Operative
Confed Special Operative
Posts: 291
Joined: Sat Jan 28, 2006 2:58 am
Location: Des Moines, Iowa

Post by rigelan »

I did rebind axis 3 and 4 before, switching them so I could get my throttle and my spinning axis correct. But vegastrike.config is completely reverted and up to date at the moment. If that is the problem (and i doubt it would be, since many joysticks do work, and the x & y axis on all joysticks should be the same), I wouldn't be sure how to fix it. Maybe I have the wrong ( a differecnt ) SDL library installed on my computer than the one that will work for vegastrike. I am using SDL-1.2.11 at the moment. Does this help our issue?
AMD 4800 - NVIDIA 7600 - Slackware Linux 12.2
Jibbles
Merchant
Merchant
Posts: 40
Joined: Wed Sep 19, 2007 1:33 am

Post by Jibbles »

Thanks for that. My vs still can't see the Joystick if I am using the USB adapter?. It can only see it if there is another joystick (such as the sidewinder gameport added to the list but not connected).
I'll add a copy of the stdout and you can see what I mean. Note, windows and 0.4.3 can see this joystick (also my laptop using 0.5 can see my joystick (USB) and use it).
Maybe it is a bung install?
You do not have the required permissions to view the files attached to this post.
My Rig: AMD64 3000+ (939), Asus Extreme AX700, Windows XP pro.
ace123
Lead Network Developer
Lead Network Developer
Posts: 2560
Joined: Sun Jan 12, 2003 9:13 am
Location: Palo Alto CA
Contact:

Post by ace123 »

Indeed, rigelan has a possible theory.

The version of SDL included in Vegastrike 0.4.3 is SDL-1.2.8
The version in the latest release is SDL-1.2.11.

@jibbles, since you are on windows, it is easy to copy DLL files without breaking your system libraries.

Could you find the file named SDL.dll from the "bin" folder in your 0.4.3 install and copy it to the "bin" folder in the 0.5 beta?
I recommend backing up (rather than overwriting) the one from 0.5 beta, so just move it to your Desktop if you aren't sure.
Then, after you copied 0.4.3's SDL.dll into the 0.5 version try running Vega Strike again and see if it now recognises your joystick.

If copying SDL over fixes it then we will have to do some research as to which version of SDL to include in the release...

@rigelan, if you are playing 0.4.3 installed from the website installer it will be statically linked, so it indeed would still be using 1.2.8 rather than 1.2.11 which would explain why you also experience these problems.
rigelan
Confed Special Operative
Confed Special Operative
Posts: 291
Joined: Sat Jan 28, 2006 2:58 am
Location: Des Moines, Iowa

Post by rigelan »

I just installed 1.2.9 (which I had previously) to see if it would make the joystick work.

6 months ago, when I did have 1.2.9 installed, the joystick was working.

unfortunately, reinstalling 1.2.9 instead of 1.2.11 didn't make it work on the linux side.
AMD 4800 - NVIDIA 7600 - Slackware Linux 12.2
lowededwookie
Trader
Trader
Posts: 25
Joined: Sat Jul 21, 2007 6:24 am

Post by lowededwookie »

Actually I had a similar problem with my Logitech 3D Extreme and this was resolved by using the reverse controls in the configuration application.
ace123
Lead Network Developer
Lead Network Developer
Posts: 2560
Joined: Sun Jan 12, 2003 9:13 am
Location: Palo Alto CA
Contact:

Post by ace123 »

So it *could be* between 1.2.8 and 1.2.9 in that case.

If you used the binary installer for the Linux version, it was *statically linked* with 1.2.7. The windows version was included with 1.2.8. And you say you tried 1.2.9 and it did not work.

Now that's not necessarily the problem, and I would just as soon suspect a bug in the code, but I am unable to reproduce the problem and I would like to narrow down the possible causes.

I'm still trying to locate why it might happen, but I can't reproduce it myself. It just bugs me that it happens both on windows and linux.
rigelan
Confed Special Operative
Confed Special Operative
Posts: 291
Joined: Sat Jan 28, 2006 2:58 am
Location: Des Moines, Iowa

Post by rigelan »

Well, ace, sort of right. 1.2.9 DID work with the joystick on my computer before (~July) . But 1.2.9 does not work now. I tried with 1.2.9 & 1.2.11, neither of which work. I am guessing it probably isn't the SDL version. Or if it is, then it is only part of the problem.
AMD 4800 - NVIDIA 7600 - Slackware Linux 12.2
ace123
Lead Network Developer
Lead Network Developer
Posts: 2560
Joined: Sun Jan 12, 2003 9:13 am
Location: Palo Alto CA
Contact:

Post by ace123 »

Did you use the binary installer for 0.4.3? If you did then the version was staically linked with SDL.dll, and therefore was using 1.2.7 regardless of what stopped it.

What did you do in July to make it stop working...

Assuming you had just done an SVN update, do you remember approximately the two dates between when you updated? That might help me narrow down the version when this joystick problem first happened if it is a Vegastrike-specific problem.

It just bugs me that I can't reproduce this problem myself.

Jibbles said that copying SDL 1.2.8 into the windows beta fixed the joystick issue, so that points to the SDL version.

rigelan, can you try running these commands:

Code: Select all

head -c0 /dev/input/*
ls -l /dev/input/*/*
jstest /dev/input/js0
and tell me what they say?

To allow SDL to use a speicfic device (which the ls -l would find), do:

Code: Select all

export SDL_JOYSTICK_DEVICE=/dev/input/js0
in the same terminal you start vegastrike from.

SDL should find it after setting the environment variable.

I'm gong to see what changed happened between 1.2.8 and 1.2.9 to see if that can help me narrow down if it's an SDL bug.
rigelan
Confed Special Operative
Confed Special Operative
Posts: 291
Joined: Sat Jan 28, 2006 2:58 am
Location: Des Moines, Iowa

Post by rigelan »

Code: Select all

colemana@popeye:~$ head -c0 /dev/input/*
==> /dev/input/by-id <==

==> /dev/input/by-path <==
head: cannot open `/dev/input/event0' for reading: Permission denied
head: cannot open `/dev/input/event1' for reading: Permission denied
head: cannot open `/dev/input/event2' for reading: Permission denied
head: cannot open `/dev/input/event3' for reading: Permission denied
head: cannot open `/dev/input/event4' for reading: Permission denied
head: cannot open `/dev/input/event5' for reading: Permission denied

==> /dev/input/js0 <==

==> /dev/input/mice <==

==> /dev/input/mouse0 <==

==> /dev/input/mouse1 <==
colemana@popeye:~$ ls -l /dev/input/*/*
lrwxrwxrwx 1 root root 9 2007-10-07 05:42 /dev/input/by-id/usb-06a3_Saitek_Cyborg_USB_Stick-event-joystick -> ../event1
lrwxrwxrwx 1 root root 6 2007-10-07 05:42 /dev/input/by-id/usb-06a3_Saitek_Cyborg_USB_Stick-joystick -> ../js0
lrwxrwxrwx 1 root root 9 2007-10-07 05:42 /dev/input/by-id/usb-Chicony_Saitek_Eclipse_Keyboard-event-kbd -> ../event2
lrwxrwxrwx 1 root root 9 2007-10-07 05:42 /dev/input/by-id/usb-Logitech_USB-PS.2_Optical_Mouse-event-mouse -> ../event4
lrwxrwxrwx 1 root root 9 2007-10-07 05:42 /dev/input/by-id/usb-Logitech_USB-PS.2_Optical_Mouse-mouse -> ../mouse1
lrwxrwxrwx 1 root root 9 2007-10-07 05:42 /dev/input/by-path/pci-0000:00:0c.1-usb-0:2:1.0-event-joystick -> ../event1
lrwxrwxrwx 1 root root 6 2007-10-07 05:42 /dev/input/by-path/pci-0000:00:0c.1-usb-0:2:1.0-joystick -> ../js0
lrwxrwxrwx 1 root root 9 2007-10-07 05:42 /dev/input/by-path/pci-0000:00:11.2-usb-0:1:1.0-event-kbd -> ../event2
lrwxrwxrwx 1 root root 9 2007-10-07 05:42 /dev/input/by-path/pci-0000:00:11.2-usb-0:1:1.1-event- -> ../event3
lrwxrwxrwx 1 root root 9 2007-10-07 05:42 /dev/input/by-path/pci-0000:00:11.2-usb-0:2:1.0-event-mouse -> ../event4
lrwxrwxrwx 1 root root 9 2007-10-07 05:42 /dev/input/by-path/pci-0000:00:11.2-usb-0:2:1.0-mouse -> ../mouse1
lrwxrwxrwx 1 root root 9 2007-10-07 10:42 /dev/input/by-path/platform-pcspkr-event-spkr -> ../event5
colemana@popeye:~$
jstest doesn't exist as a command on my 'puter.

In August (1st), I know that I updated from Slackware 11.0 to 12.0. But I also know that I had been keeping current in the changelogs, so that shouldn't have been a huge issue. But then again, when I reinstalled, I obliterated everything on my harddrive and reinstalled, so it might be that I am missing a library or program that vegastrike expects. And I had thought that I had the joystick working since after I reinstalled Slackware, but I'm not sure.

The other thing that I did was I'm guessing sometime in between that and svn 11546 something changed. I'm pretty sure it was close to 11546, since that is when I first reported an issue. So my best guess would be in the week leading up to 11546.

updatedhttp://vegastrike.sourceforge.net/forums/viewtopic.php?t=9447
AMD 4800 - NVIDIA 7600 - Slackware Linux 12.2
loki1950
The Shepherd
Posts: 5841
Joined: Fri May 13, 2005 8:37 pm
Location: Ottawa
Contact:

Post by loki1950 »

Is it possible that HAL and udev are playing permission games with usb devices in general adding a rule may solve it or adding the device to the user group.just a hunch :wink: the upgrade to 2.6.0 kernel's

Enjoy the Choice :)
my box::HP Envy i5-6400 @2Q70GHzx4 8 Gb ram/1 Tb(Win10 64)/3 Tb Mint 19.2/GTX745 4Gb acer S243HL K222HQL
Q8200/Asus P5QDLX/8 Gb ram/WD 2Tb 2-500 G HD/GF GT640 2Gb Mint 17.3 64 bit Win 10 32 bit acer and Lenovo ideapad 320-15ARB Win 10/Mint 19.2
Post Reply