Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to map multiple controllers from hubs like Mayflash DolphinBar? #641

Closed
HomeStarRunnerTron opened this issue Dec 15, 2022 · 5 comments
Closed

Comments

@HomeStarRunnerTron
Copy link

HomeStarRunnerTron commented Dec 15, 2022

Hi-hi! Sorry if this is a common-sense question, but I've been searching for a while now and can't seem to find an answer. Using SDL Gamepad Tool, I'm able to perfectly map the Player 1 controller on a MayFlash DolphinBar (which, in Mode 3, allows for four controllers to map to the same USB sensor bar), but when I try to add the remaining three mappings (which all come from the same GUID), I end up just overwriting the other three controllers. All four controllers use different buttons in the GUID, so the button presses themselves wouldn't override each other... Here's all four of my mappings...

03000000790000000318000000010000,DolphinBar Player 1 Classic Controller,a:b8,b:b12,back:b32,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b44,leftshoulder:b16,lefttrigger:b24,leftx:a0,lefty:a4,rightshoulder:b20,righttrigger:b28,rightx:a8,righty:a12,start:b36,x:b0,y:b4,platform:Mac OS X,

03000000790000000318000000010000,DolphinBar Player 2 Classic Controller,platform:Mac OS X,a:b9,b:b13,x:b1,y:b5,back:b33,guide:b45,start:b37,leftshoulder:b17,rightshoulder:b21,dpup:h1.1,dpdown:h1.4,dpleft:h1.8,dpright:h1.2,leftx:a1,lefty:a5,rightx:a9,righty:a13,lefttrigger:b25,righttrigger:b29,

03000000790000000318000000010000,DolphinBar Player 3 GameCube Controller,platform:Mac OS X,a:b10,b:b14,x:b2,y:b6,start:b38,leftshoulder:b18,rightshoulder:b22,dpup:h2.1,dpdown:h2.4,dpleft:h2.8,dpright:h2.2,leftx:a2,lefty:a6,rightx:a10,righty:a14,lefttrigger:b26,righttrigger:b30,

03000000790000000318000000010000,DolphinBar Player 4 GameCube Controller,platform:Mac OS X,a:b11,b:b15,x:b3,y:b7,start:b39,leftshoulder:b19,rightshoulder:b23,dpup:h3.1,dpdown:h3.4,dpleft:h3.8,dpright:h3.2,leftx:a3,lefty:a7,rightx:a11,righty:a15,lefttrigger:b27,righttrigger:b31,

Is there anything I can do to use all four? When I use Dolphin, which appears to use SDL2, it can read all four controllers' responses just fine, but just about every other program seems confused.

@AliceLR
Copy link
Contributor

AliceLR commented Dec 15, 2022

Some drivers for the EMS USB2 PlayStation controller adapter also combine both controllers into the same joystick, so I'd like to know as well. Should these types of edge cases get HID drivers in SDL?

@offalynne
Copy link
Collaborator

offalynne commented Dec 15, 2022

Seems to be an issue with several other Mayflash adapters on Mac as well, where what shows up as multiple devices in DInput/udev presents as a single device for some reason on Mac. Obviously the one GUID one map scheme fails in this case, so yes, as @AliceLR suggests I think this would have to be SDL driver work.

Best to take up with SDL project directly: https://github.com/libsdl-org/SDL

@HomeStarRunnerTron
Copy link
Author

Ahh, okay, thank you for the help! I WILL say that I'm allowed to use all four players on the Dolphin emulator (which I'm pretty sure is doing all this through SDL), even if they're all part of the same device-- is there anything I might be able to do to circumvent this issue in a similar way?

@offalynne
Copy link
Collaborator

offalynne commented Dec 15, 2022

Dolphin presumably has bespoke code for handling the device since the literature for both the software and the hardware product mention each other explicitly.

Edit: https://github.com/dolphin-emu/dolphin/search?q=dolphinbar

@HomeStarRunnerTron
Copy link
Author

Ah, okay! For most of that stuff in the documentation, it's talking about Mode 4, which IS specifically for Dolphin and doesn't appear to work anywhere else. Mode 3 was created, at the time, as a way to use the controllers everywhere. But, obviously, lots has changed since then, and the DolphinBar is certainly not the first thing people think of when thinking of compatibility, hahaha. OpenEmu also has great support for Mode 3, and even brings up each of the controllers as separate, which is actually more than what Dolphin does in Mode 3. I assume that's also a great amount of custom work, though. Thank you for helping me get on the right track!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants