[EM 2.848] Controller / joystick button nr. 32 dont register *FIXED 2.878*

For help with SW3DG game related technical issues.
raron
Ensign
Ensign
Posts: 22
Joined: Fri Nov 09, 2012 7:33 am

[EM 2.848] Controller / joystick button nr. 32 dont register *FIXED 2.878*

Post by raron »

One of my controllers happens to have 32 buttons / switches, but button nr. 32 don't register in the "keyboards and buttons control" settings (got a little worried there for a second, but it worked fine in game controller properties in windows). As buttons are zero based in EM, the highest button nr. that registers is 30, but should be 31 (I haven't tested this with any virtual controllers btw).

Tried this with v. 2.848 and also 2.874 (testbuild for the "axis already bound" bug), same results.

I've been meaning to post about this for a few days. Anyway, no biggie, but I suppose the Dev (Vice) would want to know about it.

Using Windows 7 Ultimate, 64-bit.
User avatar
Vice
Administrator
Administrator
Posts: 11560
Joined: Fri Apr 25, 2003 1:38 am

[EM 2.848] Controller / joystick button nr. 32 dont register *FIXED 2.878*

Post by Vice »

The button(s) is/are likely out of the range the game is able to utilize. Could be because of a unique signal method or something else. You may have to use the device's profiling software to use those buttons. In the meantime, you can download the joystick config program available at the link below to see what the raw return values are for that device:

http://www.starwraith.com/evochronmerce ... Config.zip

Extract the file and place it in the save data folder for the game (default c:\\sw3dg\\EvochronMercenary). When you run the program, it will load your current joystick control profile you use for the game and lets you monitor the exact signal inputs from the joystick. You may need to swap ID's temporarily (moving device 2 or 3 to slot 1) to test the buttons on the device you're trying to use specifically.

[Edited on 7-17-2014 by Vice]
StarWraith 3D Games
www.starwraith.com | www.spacecombat.org
3D Space Flight and Combat Simulations
User avatar
DaveK
Global Moderator
Global Moderator
Posts: 4164
Joined: Mon Apr 19, 2010 9:04 pm
Location: Leeds UK

[EM 2.848] Controller / joystick button nr. 32 dont register *FIXED 2.878*

Post by DaveK »

From post: 171820, Topic: tid=11533, author=Vice wrote:In the meantime, you can download the joystick config program available at the link below to see what the raw return values are for that device:

http://www.starwraith.com/evochronmerce ... config.zip
The link comes up with a 404 - not found error for me.

:)
Callsign: Incoming
Image
Life is like a sewer... what you get out of it depends on what you put into it. - Bob Newhart
Hell is being in a pure platinum asteroid field... with a diamond mining beam
ImageImage
Capt_Caveman
Commander
Commander
Posts: 967
Joined: Tue Mar 30, 2010 1:08 pm

[EM 2.848] Controller / joystick button nr. 32 dont register *FIXED 2.878*

Post by Capt_Caveman »

same here
User avatar
Vice
Administrator
Administrator
Posts: 11560
Joined: Fri Apr 25, 2003 1:38 am

[EM 2.848] Controller / joystick button nr. 32 dont register *FIXED 2.878*

Post by Vice »

Copied and pasted an old link, needs to be case sensitive:

http://www.starwraith.com/evochronmerce ... Config.zip
StarWraith 3D Games
www.starwraith.com | www.spacecombat.org
3D Space Flight and Combat Simulations
raron
Ensign
Ensign
Posts: 22
Joined: Fri Nov 09, 2012 7:33 am

[EM 2.848] Controller / joystick button nr. 32 dont register *FIXED 2.878*

Post by raron »

Nice suggestion about a controller profiler software, thanks! I didn't think about that actually! From a quick test just now I see it's possible to e.g. assign a keyboard press/release to a button. I'll likely go this route if I really need that button 32 :)

I've also tested a quick vJoy (virtual controller) button 32 now (and a few other buttons), and it's the same result: Button 32 is invisible/unregistered (No. 31 in EM). Button 31 (=30 in EM) shows up. Presumably EM buttons 0-30 works.

I tried the JoystickConfig program, but I'm not sure how to swap controller ID's.. My ID #1 is the wheel, unticking "switch selected device to ID 1" in its global settings didn't do much, nor did unplugging everything but the throttle controller (the one with 32 buttons). Found a reference to a joystick ID swapper by wingmanteam but not their website (seems vanished). Also found a regedit hack but I'm a bit reluctant to that (and possible consequences of messing with controller IDs via regedit).

I did find this post with some DPB code over at TGC forum: http://forum.thegamecreators.com/?m=for ... 1#m2307471 Testing that in DBP all buttons are registered (also vJoy button 32. Or 31 zero-based as in EM). Curiously the wheel is not at the first controller ID listed here.
(Hope that's ok to say, in no way do I claim any knowledge about how EM works or should work or whatever. For all I know EM have another method of obtaining controller inputs. I have meddled a (little) bit with DBC years ago. DBP not so much at all really, but I probably know enough to be dangerous, copy/paste etc :P).
User avatar
Vice
Administrator
Administrator
Posts: 11560
Joined: Fri Apr 25, 2003 1:38 am

[EM 2.848] Controller / joystick button nr. 32 dont register *FIXED 2.878*

Post by Vice »

For the ID's, you should be able to just temporarily unplug the devices in the way of getting the device you want to test into ID 1. If that doesn't work, then one of the other ID's may be persistent and temporarily changing the preferred device within Windows to the device you want to test should put it into ID 1 (you can reverse it to the previous preferred device as desired after testing). But if it's not something you want to try, don't worry about it. Odds are, if the game can't see the button signal, the config program won't either. It's just one option to confirm that result. Yes, the technique at the link you posted is very different from the method used in EM (EM uses a different DirectInput method, a component of DirectX within Windows). So profiling the button to provide a desired signal (ie a particular key) is probably the best way to go.

For reference, what is the make, model, and driver version of the control device you are using?
StarWraith 3D Games
www.starwraith.com | www.spacecombat.org
3D Space Flight and Combat Simulations
raron
Ensign
Ensign
Posts: 22
Joined: Fri Nov 09, 2012 7:33 am

[EM 2.848] Controller / joystick button nr. 32 dont register *FIXED 2.878*

Post by raron »

It's a Thrustmaster HOTAS Warthog.
Joystick have firmware version 11, throttle firmware version 20.
Driver version is apparently the 2011 version 1 (2011_TMWH_1.exe is simply the name of the driver install file. I can't for the life of me find anything sensible about it in windows, just a generic "HID compliant game controller" in Device Manager).

They have a new driver version out now, I didn't notice until just now (2014_TMWH_1 with firmware versions 11 and 23). I'm not sure if I want to update it just yet, as it works just fine as far as I know. At least I have to find out more about it first.


Btw I just figured out the joystick ID thing (I had the wheel unplugged, ran "joy.cpl" to get to "Game Controllers" in control panel, clicked "Advanced" and selected the throttle as the preferred device).

Running JoystickConfig, under "Joystick Button Input Signals":
Button 30: 1073741824
Button 31: -2147483648

(And where button 31 is the 32nd button..)
I think you were right about the out of range thing (Seems like a signed vs unsigned range).

Thanks for replying.
User avatar
Vice
Administrator
Administrator
Posts: 11560
Joined: Fri Apr 25, 2003 1:38 am

[EM 2.848] Controller / joystick button nr. 32 dont register *FIXED 2.878*

Post by Vice »

I'll look into trying to work around that for the next update.
StarWraith 3D Games
www.starwraith.com | www.spacecombat.org
3D Space Flight and Combat Simulations
Onirim
Ensign
Ensign
Posts: 36
Joined: Wed May 28, 2014 1:56 pm

[EM 2.848] Controller / joystick button nr. 32 dont register *FIXED 2.878*

Post by Onirim »

There will be another update! That's good news! (even if it's just to tune things up)
“Evolution brings human beings. Human beings, through a long and painful process, bring humanity.�
― Dan Simmons, Hyperion
raron
Ensign
Ensign
Posts: 22
Joined: Fri Nov 09, 2012 7:33 am

[EM 2.848] Controller / joystick button nr. 32 dont register *FIXED 2.878*

Post by raron »

Thanks, nice!

Btw, of course the controller ID's got messed up after this, but luckily I managed to get them back into place. I disconnected all but one controller, set it as "preferred device" in Game Controllers, connected the next one, set that as a "preferred device", and so on. Had to try a couple of sequences before I got it. The last one to be a "preferred device" was the wheel, to get it back as ID 1. Still works after a reboot so I think it sticks. Just FYI for other googlers or something.
User avatar
Vice
Administrator
Administrator
Posts: 11560
Joined: Fri Apr 25, 2003 1:38 am

[EM 2.848] Controller / joystick button nr. 32 dont register *FIXED 2.878*

Post by Vice »

I've sent you a link to a test build with changes applied to the button input system that should allow it to work with that button 32 signal.
StarWraith 3D Games
www.starwraith.com | www.spacecombat.org
3D Space Flight and Combat Simulations
raron
Ensign
Ensign
Posts: 22
Joined: Fri Nov 09, 2012 7:33 am

[EM 2.848] Controller / joystick button nr. 32 dont register *FIXED 2.878*

Post by raron »

I just wanted to say a big thank you for fixing it so speedy (again)! Seems to work great!

Also, about controller IDs, maybe it wasn't necessary to disconnect and reconnect them one by one when I think about it. Perhaps it would be enough to simply assign the different controllers as "preferred device" in some sequence to shuffle the IDs back (not tested).
User avatar
Vice
Administrator
Administrator
Posts: 11560
Joined: Fri Apr 25, 2003 1:38 am

[EM 2.848] Controller / joystick button nr. 32 dont register *FIXED 2.878*

Post by Vice »

Thanks for your help testing. This change, along with the changes to the axis channel mapping system will be included in the next planned official update, hopefully available in early to mid August if beta testing continues to go well.
StarWraith 3D Games
www.starwraith.com | www.spacecombat.org
3D Space Flight and Combat Simulations