Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: My Arcade sticks keep switching sides (Player 1 switches with Player 2)  (Read 3657 times)

0 Members and 1 Guest are viewing this topic.

maks

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 8
  • Last login:July 29, 2019, 04:05:19 pm
  • I want to build my own arcade controls!
My 2-player arcade cabinet is almost complete except for one major annoyance. Sometimes after a power cycle my PC will switch the Player 1 side with Player 2. Is there a convenient way to always keep Player 1 on the left side and Player 2 on right? Perhaps a script of some sort???

My stick and buttons are connected to the PS360+ pcb which is emulating as an Xbox 360 controller. I want to avoid disconnecting my PS360+'s and then re-connecting them in order. I have a PC and Xbox 360 in my cabinet. I am using a USB switch with a button to toggle between Xbox and PC so thats got to stay. Here is my hardware setup...

Alienware Alpha PC (Hyperspin & Steam)(Windows 8.1)
Xbox 360 (Xbox games)
IOGEAR 2 x 4 USB 2.0 switch
PS360+ pcb's (x2)
« Last Edit: June 14, 2015, 04:55:32 pm by maks »

Slippyblade

  • Trade Count: (+2)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3167
  • Last login:November 16, 2023, 11:39:51 am
  • And to the death god we say, "Not today!"
Using the toggle, you are effectively unplugging and re-plugging the usb switch which causes Windows to re-assign device ID's.  Which results in what you are experiencing.  There is a utility to do what you need, but I can't recall the name right now.

maks

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 8
  • Last login:July 29, 2019, 04:05:19 pm
  • I want to build my own arcade controls!
I definitely noticed it switching sides after i toggle between xbox and PC use. But it has also occurred after PC only use. Example, i will use my PC fine on Monday and then shut it down. On Tuesday when I turn on PC the sides are switched. Its pretty random when it occurs.

The one fix i do have besides unplugging cables is to actually completely shut down all power to my cabinet by unplugging the power plug.

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9226
  • Last login:Yesterday at 03:37:41 pm
  • ...
This utility will help with MAME (since mame sees them as direct input devices, you won't have an issue with emulators like model 2 that support xinput)

http://forum.arcadecontrols.com/index.php/topic,108767.0.html

stigzler

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 977
  • Last login:February 11, 2022, 03:01:48 pm
  • It seemed like a good idea at the time....
    • Mago Arcade
and try this add-on for the above - GUI version:

https://controllerremapgui.codeplex.com/

maks

  • Trade Count: (0)
  • Jr. Member
  • **
  • Offline Offline
  • Posts: 8
  • Last login:July 29, 2019, 04:05:19 pm
  • I want to build my own arcade controls!
Thanks for the replies, but it doesn't look like ControllerRemap will quite work for me since it only covers Mame. On the software side of things I am using Win8.1 and playing games with Steam and Hyperspin (w/ xpadder). My controller mappings work great, its just the switched sides that ruin it. Any other solution?


stigzler

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 977
  • Last login:February 11, 2022, 03:01:48 pm
  • It seemed like a good idea at the time....
    • Mago Arcade
Sorry - don';t know anything about that pcb thingy you're on about.
However, it may be helpful if you specify exactly what emulators/system (is it the 360 or the PC) you're having trouble in.

My guess would be that windows allocates USB devices randomly on power cycles/hotswapping. Thus what one day may be "USB Device 1" may on another be "USB Device 2." There's hopefully fellas on here who know the technicalities - some Emus can handle this - others (such as mame) dont (think some look at the Hardware ID of the USB device - uniquely identifying it).

Here's some stuff from Dr Venture's guide that may/may not be helpful:

Quote
Well, if you’ve ever set up a MAME cabinet that has external USB ports, you may have noticed
that, on occasion, when you plug other USB devices in, your Mame control configuration becomes
completely messed up, particularly if you use USB joysticks like Ultimarc’s u360.
The reason is because Mame references USB Game controller devices ONLY by their enumeration
number. And USB devices are enumerated based on a hex “VendorID” that is assigned to the vendor on
request. The numbers are more or less random, so, depending on what the vendorID is on that game
controller you just plugged in, it might end up enumerating above or below the devices that you already
have in your system.
As an example…
You’ve just built your great new Mame machine. You’re using several USB devices in it, including a
Wingman Flightstick and 2 U360’s. The devices are enumerated by Windows like so:
1)  Wingman stick
2)  Ultimarc U360 Player 1
3)  Ultimarc U360 Player 2
You spend a good chunk of time configuring Mame to use all the right controllers, keyboard buttons, etc
and get it working perfectly.
Then, you decide it’d be nice to add a PS2-USB adapter and external ports for some PS2 devices (say,
dance pads or D-pad type controllers).
You pick up an adapter off eBay, plug it into a spare USB port and away you go. UNTIL…. You run Mame
and discover some of your device mappings don’t work anymore. That’s because that new PS2 adapter
changes the enumeration of some of your existing devices
1)  Wingman stick
2)  PS2 USB Adapter
3)  Ultimarc U360 Player 1
4)  Ultimarc U360 Player 2
Fine, you curse under your breath, remap everything, and you’re good again.
A few weeks later, you pick up some nice Xbox Controllers you’d like to hook up. No big deal, you run a
couple extender cables to external ports on your cab, and connect them up to 2 more spare USB ports
inside.
Connect up the new controllers and….scrambled again. All your Mame controllers you’d just
reconfigured don’t work yet again. And worse, the flight stick doesn’t work, now, either.
Looking at the enumerated list of devices, you see this:
1)  Microsoft XBOX Controller
2)  Microsoft XBOX Controller
3)  Wingman stick
4)  PS2 USB Adapter
5)  Ultimarc U360 Player 1
6)  Ultimarc U360 Player 2
Then, you come to a sinking realization. Regardless of how you fix the controller mapping, since you
won’t typically leave the Xbox controllers plugged in all the time, you’re going to be constantly
remapping controllers if you want to use them.
Not a good scene.

 Ideally, the Mame team (or someone more well versed
in the intricacies of the Mame input model than I) will rework the Input.c code to deal with USB Game
controller devices (and multiple Raw Mouse devices) via their built in JoystickID number or some other
unique identifier, which doesn’t change regardless of whether other devices are added or removed.
FoFix and many games make use of the JoystickID, and the excellent little utility JoystickIDs
(http://www.wingmanteam.com/latest_software/gadgets.htm#JoyIDs_Utility:) allows you to easily set
those IDs to anything you want.
But, for now, Mame doesn’t use JoystickIDs.
« Last Edit: June 14, 2015, 06:05:02 pm by stigzler »