binary zoo

Binary Zoo => Feedback => Topic started by: thehighlander on May 30, 2017, 08:10:10 AM

Title: Echoes+ and xBox360 controller problem
Post by: thehighlander on May 30, 2017, 08:10:10 AM

I've had Echoes+ for a long time on Steam. I hadn't played it for a while because I can never get my xbox360 controller to work with it. The controller works fine and is wired through USB to my PC. I suspect the problem is that, like many other Steam games, Echoes+ gets confused about which controller to look at because I have a few other controllers attached at the same time. A small number of games (like Submerged) solve this problem by allowing the user to select a specific controller AND to ignore input from all others.

Assuming this is actually the solution, I'd like to offer my help in getting to the bottom of this nasty problem.

The Highlander

Title: Re: Echoes+ and xBox360 controller problem
Post by: thehighlander on May 30, 2017, 01:09:04 PM
I removed one of my extra controllers and it worked. In order to play games like Elite Dangerous I use the EDTracker, which is basically an HID compliant device (mimicing a mouse) which tracks head movement. I noticed that I was able to control the game using my EDTracker. So after unplugging the USB connector for that and restarting Echoes+ everything was fine.

I still have a Saitek X.52 HOTAS stick and a Logitech Driving Force EX attached to the system, but somehow those are being ignored by Echoes+.

Title: Re: Echoes+ and xBox360 controller problem
Post by: fog on May 31, 2017, 01:07:03 AM
Hi thehighlander and welcome :)

Thanks for all that info, it's really helpful.  A little explanation...

When launched the game scans all the available input devices and assigns control to the first one in the list.  (I don't know how the list order is decided, I have no control over that)

While I can find out how many controllers are attached, I can't find out any information about them.  So I couldn't give the user a list of named devices and let them choose which to use.

This is a limitation of the language I used for Echoes+ so I'll ask the developers of that if it's possible to grab the controller names, then I can add the option.


Title: Re: Echoes+ and xBox360 controller problem
Post by: thehighlander on May 31, 2017, 12:59:53 PM
Aahhh! It's a problem I have with many games. Perhaps it's just Windows not providing the necessary information.
Well, I hope your tool provider can shed some light on that.


Title: Re: Echoes+ and xBox360 controller problem
Post by: fog on May 31, 2017, 06:31:32 PM
Thanks for your understanding. I'll see what I can do.

Title: Re: Echoes+ and xBox360 controller problem
Post by: thehighlander on June 03, 2017, 02:48:18 PM
Sorry for the long post, but this controller thing has been on my mind for a long time. I came across a post (I'll provide the link at the end of this post) where Joshua Smith from Microsoft shed some light on how things work inside Windows. The article isn't recent, but I imagine things still work the same since it's still about DirectInput. Hope this helps somewhat.

Please note that the problem Joshua addresses is similar to mine.

Maybe I can shed some light on what's going on. First a little history.
The first implementation that was used to get joystick data was called
WinMM. It is very old, Windows 95 and previous. With the coming of DirectX
there was a new way of getting device data, DirectInput. DirectInput
supported the WinMM functions so that older games would still work. In WinMM
you could only have up to 16 devices at a time. Each device would get an ID
number and games would access controller data by this ID number. DirectInput
does not use these ID's unless the game is using the old WinMM interfaces.
It assigns each device it finds a unique GUID and applications get device
data by accessing this GUID. DirectInput will theoretically handle as many
devices as the system can physically handle. I have had 48 devices connected
to a system at once.
In Windows XP the decision was made to only expose to the user what
device was at ID1. This was due to the fact that ID configuration was one of
the biggest areas of confusion by users and most game developers had stopped
using WinMM. Game makers that used WinMM would just take whatever device was
at ID1 and almost always only supported one device. This is why we changed
the Game Controllers control to only expose the Preferred Device, the device
to be set at ID1. From what you wrote it seems you are under the impression
that the order the devices are listed on the main page of the control applet
is the ID order. This isn't the case. When DirectInput runs it calls a
function that finds all the devices attached to the system. Each discovered
device gets a GUID that it can use later to access the device. The devices
are listed in the control applet in the order the system happened to
discover them and has nothing to do with the devices WinMM ID#. When the
developers write the game it is entirely up to them when they stop asking
DirectInput for devices, or devices on ID#'s. Most stop after finding the
first device. Some will give you the option of choosing a single device in
the games options, and a few will allow you to use all the devices attached
to the system.
Now the games. Based on what you describe, and having not debugged the
games, this is what is most likely going on. The game NASCAR 2003 is quite
recent as the name implies. Chances are they are using the DirectInput
device interfaces. They are also making all controllers available to the
game and not quitting after finding the first one. Your other game, Sports
Car GT was released in April 1999. My guess is that they are also using the
DirectInput interfaces. This would explain why it doesn't matter what ID you
set the devices to you always get the shifter, you could only make the game
see the change if it was using WinMM, but unlike the NASCAR 2003 game they
are just enumerating and using the first device that DirectInput returns and
stopping. The only way this can be fixed is to see if you can get the system
to expose the device you want first, but even if you did that chances are
real good that you wouldn't have access to the shifter.

I know this doesn't fix you, but should at least explain what is happening.
Let me know if you have any questions abou this.

Joshua Smith
DirectInput and OpenGL Test Labs

Title: Re: Echoes+ and xBox360 controller problem
Post by: TheKhakinator on June 07, 2017, 10:15:49 AM
Really interesting break down there!

Title: Re: Echoes+ and xBox360 controller problem
Post by: fog on June 07, 2017, 09:50:27 PM
Yeah, always good to hear the background to seemingly nonsensical coding issues.

But it's these challenges that make coding so appealing to us developer types :)