Build Your Own Arcade Controls Forum

Main => Main Forum => Topic started by: jshel65 on November 15, 2014, 01:55:18 am

Title: Help/Advice for multiple USB controllers
Post by: jshel65 on November 15, 2014, 01:55:18 am
I am attempting to create what could be an awesome setup with my hyperspin front end. The idea being that nes, snes, sega genesis, ps1 and 2, as well as gamecube emulators are all controlled by their actual original controllers. I am using mayflash and related usb cables to allow me to do this.

My plan is that you would navigate through hyperspin using my x-arcade tankstick. Then once a particular system is chosen you would simply pull out the original controller for that system and carry on!


So far, it seems that windows is getting confused on which controller is being used and is proving to be a real challenge thus far. Has anyone else attempted a similar setup, and if so have any suggestions?

Any help is much appreciated guys.
Title: Re: Help/Advice for multiple USB controllers
Post by: DeLuSioNal29 on November 15, 2014, 02:19:25 am
What you seek is here:  http://forum.arcadecontrols.com/index.php/topic,108767.0.html (http://forum.arcadecontrols.com/index.php/topic,108767.0.html)

Good luck!

DeLuSioNaL29
Title: Re: Help/Advice for multiple USB controllers
Post by: jshel65 on November 15, 2014, 08:47:07 am
Thank you very much! I will definitely give this a shot! Will this interfere with xpadder? I currently use xpadder for my xbox 360 controllers which up until now have controlled every emulator on my hyperspin setup (I only recently decided to work on this multiple original controller upgrade to my setup).
Title: Re: Help/Advice for multiple USB controllers
Post by: IAmDotorg on November 16, 2014, 07:26:55 am
What you seek is here:  http://forum.arcadecontrols.com/index.php/topic,108767.0.html (http://forum.arcadecontrols.com/index.php/topic,108767.0.html)

Good luck!

DeLuSioNaL29

Won't help -- it doesn't fix the controller order, it just fixes up MAME's configuration.

Right now I haven't found a solution unless you're on XP or earlier and can use JoyIDs.

I've got some ideas that may or may not help that I'm trying up to something as extreme as injecting code into the emulator process to hook the DirectInput calls and remap them on the fly.

Fundamentally its an emulator problem because they're not accessing the controllers properly. For nearly a decade the docs say games must reference them by GUID not index into the controller list.

The worst part is that HyperSpin seems to only work with ID 0 or 1, so remapping the controls in the emulators won't help.
Title: Re: Help/Advice for multiple USB controllers
Post by: jshel65 on November 16, 2014, 09:12:40 am
Man, this is pretty discouraging. Just dropped a decent amount of cash trying to round up the necessary usb cables and old controllers. I would be surprised if there isn't somebody out there who knows how to make this happen. I'll keep working on it, although I'm not the most computer savvy guy but I hate to waste money and not see my vision come through.
Title: Re: Help/Advice for multiple USB controllers
Post by: IAmDotorg on November 16, 2014, 10:01:44 am
Man, this is pretty discouraging. Just dropped a decent amount of cash trying to round up the necessary usb cables and old controllers. I would be surprised if there isn't somebody out there who knows how to make this happen. I'll keep working on it, although I'm not the most computer savvy guy but I hate to waste money and not see my vision come through.

There really isn't. Windows has a somewhat convoluted way of tracking USB controllers, and the APIs that the emulators are incorrectly using have no defined order things get returned in. I've looked into it in quite a bit of detail.

From what I can tell, your only options are:

- Get the code for all of your emulators, fix their broken controller handling to be GUID and not ID/offset based
- Write a tool like ControllerRemapper for all of your emulators individually (although you may get lucky and some may be GUID based)
- Use something like vJoy to remap the controllers to virtual controllers which hopefully are stable (note, there's no guarantee of that, either)
- Use the Detours library and remote code injection to patch the API calls to reorder the controllers in a controllable way. (This is probably the "best" option but its extremely complicated coding.)
- Downgrade to XP where JoyIDs works.
- Don't use external controllers.

And with HyperSpin unless you got lucky and your P1/P2 controls ended up 0 and 1, you'll need a program to map the joystick buttons to keyboard events because HyperSpin's joystick handling is even more fundamentally broken than the emulators' handling.

I'm having to write a tool like ControllerRemapper for MAME anyway, so that's probably the initial pass I'm going to do. (I have an added complexity that which stick and buttons are P1/P2 vary depending on the game, so I need more sophisticated logic setting up my MAME defaults anyway.)

I haven't solved my HyperSpin problem, though.

Now another more extreme option would be to use Linux. I think there's some pretty substantial downsides of that, but the upside is the controllers map in a more reliable way and worst-case you can use symbolic links to the devices to switch them around.

I may end up nixing the external controller idea, though, because there just doesn't seem to be a reliable way to do it.
Title: Re: Help/Advice for multiple USB controllers
Post by: keilmillerjr on November 16, 2014, 10:02:27 am
If your having issues with multiple usb devices, is using origional port reciprocal's and wiring them to a single controller an option for you?
Title: Re: Help/Advice for multiple USB controllers
Post by: jshel65 on November 16, 2014, 06:22:48 pm
It seems to be quite a complex solution to this issue. I'm surprised there hasn't been a program written for windows at this point to solve this. What if you had one of the USB hubs that have the on/off switches for each one like thishttp://www.amazon.com/Generic-7-Port-USB-Hub-Port/dp/B007S642BW.

In this case could you simply have all of your controllers plugged into this and once you launch into an emulator turn only the controller that you're going to use for that system on? That way those two controllers would automatically move up to first preference?
Title: Re: Help/Advice for multiple USB controllers
Post by: jshel65 on November 16, 2014, 07:34:38 pm
Check out this video..according to Chris this type of 3.0 USB card is the answer!How to configure your arcade for multiple control…: http://youtu.be/n_ctY35sGTY (http://youtu.be/n_ctY35sGTY)
Title: Re: Help/Advice for multiple USB controllers
Post by: DeLuSioNal29 on November 16, 2014, 10:55:43 pm
Looks promising. How much are the controllers?
Title: Re: Help/Advice for multiple USB controllers
Post by: sharpfork on November 16, 2014, 11:29:30 pm
While I know you already invested in mayflash adapters, our upcoming KADE hardware will solve this problem.  The arcade and all the original console encoders use the same USB device (one per player).  You can even use the arcade and console controls at the same time and change console controllers on the fly.  I'd like to know more about your project to see if we are missing any features.
Title: Re: Help/Advice for multiple USB controllers
Post by: yotsuya on November 16, 2014, 11:40:49 pm
While I know you already invested in mayflash adapters, our upcoming KADE hardware will solve this problem.  The arcade and all the original console encoders use the same USB device (one per player).  You can even use the arcade and console controls at the same time and change console controllers on the fly.  I'd like to know more about your project to see if we are missing any features.

Oooooooooooooooooooooooooooooooooo.......  :notworthy:
Title: Re: Help/Advice for multiple USB controllers
Post by: jshel65 on November 16, 2014, 11:43:09 pm
I'm intrigued by this KADE hardware. Can you describe what exactly this is? Is this a piece of hardware that will allow you to plug in original controllers directly or does it accept usb inputs and then organize the joypads with the associated software?? Sounds interesting.....
Title: Re: Help/Advice for multiple USB controllers
Post by: sharpfork on November 16, 2014, 11:49:18 pm
I'm intrigued by this KADE hardware. Can you describe what exactly this is? Is this a piece of hardware that will allow you to plug in original controllers directly or does it accept usb inputs and then organize the joypads with the associated software?? Sounds interesting.....
Original controllers via converter cables to DB15.  I've been playing on prototypes for over a year and it is a really cool solution or just consoles or arcade & consoles. We will provide more info as release time gets closer.
Title: Re: Help/Advice for multiple USB controllers
Post by: jshel65 on November 16, 2014, 11:51:54 pm
Ok, sounds cool to me. I will definitely be keeping tabs on the project! So, is the advantage of DB15 that it avoids the confusion that emulators tend to have with so many usb devices plugged in?
Title: Re: Help/Advice for multiple USB controllers
Post by: sharpfork on November 16, 2014, 11:57:47 pm
Ok, sounds cool to me. I will definitely be keeping tabs on the project! So, is the advantage of DB15 that it avoids the confusion that emulators tend to have with so many usb devices plugged in?

That is one of the many advantages, you don't plug and unplug USB to change controllers.   :cheers:
Title: Re: Help/Advice for multiple USB controllers
Post by: PL1 on November 17, 2014, 12:23:45 am
Minor point of clarification: Kevin is referring to the upcoming KADE miniConsole+ that was announced here (http://forum.arcadecontrols.com/index.php/topic,142133.0.html), not the currently-available miniArcade or microArcade encoders.   ;D


Scott
Title: Re: Help/Advice for multiple USB controllers
Post by: jshel65 on November 17, 2014, 10:53:36 pm
Guys, I've been working on this a lot today and I think I at least have an idea at a solution.

Couldn't I just use xpadder for every controller so that every button push on every controller is simply interpreted by the emulators as a press of the keyboard?

Then you could simply go into each emulator and map both 1 and 2 player controls off of the keyboard.

It seems that this would alleviate the issue of the emulator confusing which joypad is which.
What do you guys think? Do you see any issues that I'm not thinking of??
Title: Re: Help/Advice for multiple USB controllers
Post by: IAmDotorg on November 18, 2014, 05:51:53 am
Guys, I've been working on this a lot today and I think I at least have an idea at a solution.

Couldn't I just use xpadder for every controller so that every button push on every controller is simply interpreted by the emulators as a press of the keyboard?

Then you could simply go into each emulator and map both 1 and 2 player controls off of the keyboard.

It seems that this would alleviate the issue of the emulator confusing which joypad is which.
What do you guys think? Do you see any issues that I'm not thinking of??

For simpler sticks and setups, that'll work. It won't help if you have analog sticks, though.

That's what I ended up doing, though. I can fix the very few games that run the U360s in analog mode by hand. It was the only way to get HyperSpin and HyperLaunch working anyway. Its not really fixing the issue but it does bypass it a bit.
Title: Re: Help/Advice for multiple USB controllers
Post by: jshel65 on November 18, 2014, 07:20:10 pm
I've worked my butt off on this and made a couple videos of what i have so far.
Let me know if you guys see anything I could change or to look out for to avoid issues.

https://www.youtube.com/watch?v=73y1Wpgsdw0 (https://www.youtube.com/watch?v=73y1Wpgsdw0)

https://www.youtube.com/watch?v=1qMRoD04Kjs (https://www.youtube.com/watch?v=1qMRoD04Kjs)
Title: Re: Help/Advice for multiple USB controllers
Post by: PL1 on November 18, 2014, 07:45:10 pm
I've worked my butt off on this and made a couple videos of what i have so far.
Let me know if you guys see anything I could change or to look out for to avoid issues.

Attempt at ultimate retro gaming system (http://www.youtube.com/watch?v=73y1Wpgsdw0#ws)

Hyperspin retro gaming original controllers prt2 (http://www.youtube.com/watch?v=1qMRoD04Kjs#ws)
FTFY. (changed "https" to "http" to embed the youtube videos)


Scott
Title: Re: Help/Advice for multiple USB controllers
Post by: jshel65 on November 18, 2014, 08:04:08 pm
Thanks PL1...I will do that next time ;D
Title: Re: Help/Advice for multiple USB controllers
Post by: jshel65 on November 19, 2014, 11:26:33 am
So everything seems to be working fine. The main issue that I am having as IAmDotorg mentioned is that analog function is broken. I have every emulator mapped to keyboard keys so of course you lose analog. :banghead: Hmmmmmm...I guess I will just have to patiently wait for the KADE setup unless anybody knows a way around this?
Title: Re: Help/Advice for multiple USB controllers
Post by: IAmDotorg on November 20, 2014, 01:58:58 pm
Its good you got it working -- I can't, for some damn reason.

HyperLaunch scans the joysticks in the wrong order, and mis-assigns everything.  Xpadder sees my sticks in the correct order and orders them correctly in the tabs (UltraStik 1, UltraStik 2, UltraStick 3, UltraStik 4), but HyperLaunch is setting the profiles in the ID order (which, in my case, is 3, 2, 1, 4, so it loads p3, p2, p1, p4).

Given that's the order I get if I just use the sticks directly, its clearly not properly binding the USB controller in the defined player order. No freakin' idea why. I've wasted hours on it.

Title: Re: Help/Advice for multiple USB controllers
Post by: jshel65 on November 20, 2014, 04:22:12 pm
It's definitely frustrating as all hell man! I am really anxious to see what this upcoming KADE product is all about...I'm hoping it will remedy all of our controller woes! Any ideas when it will be coming out???
Title: Re: Help/Advice for multiple USB controllers
Post by: PL1 on November 20, 2014, 08:08:47 pm
It's definitely frustrating as all hell man! I am really anxious to see what this upcoming KADE product is all about...I'm hoping it will remedy all of our controller woes! Any ideas when it will be coming out???
Since Jon, Kevin, and Bruno all have day jobs and the team is making their own custom AVR board (http://forum.arcadecontrols.com/index.php/topic,142133.msg1471978.html#msg1471978) and adapters for it, I wouldn't expect to see the new encoders built/tested/shipped before spring to Kickstarter supporters.   :dunno


Scott
Title: Re: Help/Advice for multiple USB controllers
Post by: yotsuya on November 20, 2014, 08:26:34 pm
It's definitely frustrating as all hell man! I am really anxious to see what this upcoming KADE product is all about...I'm hoping it will remedy all of our controller woes! Any ideas when it will be coming out???
Since Jon, Kevin, and Bruno all have day jobs and the team is making their own custom AVR board (http://forum.arcadecontrols.com/index.php/topic,142133.msg1471978.html#msg1471978) and adapters for it, I wouldn't expect to see the new encoders built/tested/shipped before spring to Kickstarter supporters.   :dunno


Scott

Was a Kickstarter ever announced?
Title: Re: Help/Advice for multiple USB controllers
Post by: PL1 on November 20, 2014, 08:34:04 pm
It's definitely frustrating as all hell man! I am really anxious to see what this upcoming KADE product is all about...I'm hoping it will remedy all of our controller woes! Any ideas when it will be coming out???
Since Jon, Kevin, and Bruno all have day jobs and the team is making their own custom AVR board (http://forum.arcadecontrols.com/index.php/topic,142133.msg1471978.html#msg1471978) and adapters for it, I wouldn't expect to see the new encoders built/tested/shipped before spring to Kickstarter supporters.   :dunno
Was a Kickstarter ever announced?
Jon teased/announced the upcoming KADE+ kickstarter in the OP of the link above, but it hasn't gone live yet.


Scott
Title: Re: Help/Advice for multiple USB controllers
Post by: jshel65 on November 20, 2014, 10:11:08 pm
Have you guys seen this?? This is incredible! But what a pain it would be to internally mod every controller like that right?

MVGS2-DREAM-STATION : Multi Video Games System Cabinet with Universal Retro Video Game Controllers (http://www.youtube.com/watch?v=qDLe0FKwgy8#ws)
Title: Re: Help/Advice for multiple USB controllers
Post by: lamprey on November 21, 2014, 01:36:06 pm
Have you guys seen this?? This is incredible! But what a pain it would be to internally mod every controller like that right?
That's pretty bad-ass!

Looks like they are using HyperSpin for the front end too.
Title: Re: Help/Advice for multiple USB controllers
Post by: IAmDotorg on November 21, 2014, 01:48:06 pm
It's definitely frustrating as all hell man! I am really anxious to see what this upcoming KADE product is all about...I'm hoping it will remedy all of our controller woes! Any ideas when it will be coming out???

I actually figured out the problem -- more of a UI issue with HyperLaunchHQ. For it to get them in the right order, you have to go under GLOBAL -> Settungs -> Main Settings -> Keymapper and enable JoyIds. Its not really documented, and that has nothing to do with the JoyIDs program (which doesn't work on Win8). It basically re-orders the sticks in the registry which is enough to get everything else mapping in the right order. With it off, things won't map correctly if your joysticks are currently out of order.

HyperLaunchHQ really should change that label and description to make clear what its doing. (I only figured it out because I went into the Keymapper.ahk code and saw a function to do that and couldn't figure out where it was being called from. )
Title: Re: Help/Advice for multiple USB controllers
Post by: jshel65 on November 22, 2014, 12:53:24 am
That is interesting...I just checked mine and sure enough it is set to true.
What I have done is a little different than you I think though. I have 2 controllers for each system and have set as similiar xpadder profiles as possible for each controller. I also do not have hyperspin launching any profiles at all, I just have them always with the same profiles assigned when they are plugged in which has worked decent so far. The only issue at this point is the loss of analog.
Title: Re: Help/Advice for multiple USB controllers
Post by: TheSlim on November 22, 2014, 10:33:10 am
I built a new control panel that has ipac32, a USB happ trackball, 2 gamecube, 2 n64, 2 snes, and 2 snes ports.  the control ports were via usb from raphnet.  unfortunately, i got it configured but they messed up all the emus i had set up.  for instance, i would have liked to use the arcade controls as default and then when i entered an emu if i plugged in a controller use either the arcade controls or the controller.  but once the gameports were activated the emus all defaulted to game controllers and the arcade controls i had set up no longer worked.  i just unplugged the usb hub that held the game ports.

my original id was to assign unique usb ids to each game port, that works in theory but this really messes up all the emulators. 

now they are just decorations.  it was a good idea on paper but hard to implement.