ndeadly / MissionControl

Use controllers from other consoles natively on your Nintendo Switch via Bluetooth. No dongles or other external hardware neccessary.
GNU General Public License v2.0
2.5k stars 138 forks source link

[Controller Request]: Dualshock 3 #541

Closed vivanadal closed 1 year ago

vivanadal commented 1 year ago

Controller Name

PS3 DualShock 3 Controller

Current Controller Behaviour

Controller is not successful in pairing with the console

Controller vendor and product ID

No response

Supported Features

Input Report Format

No response

Additional Details

Hi, Could it be possible to add PS3 Controllers to Mission Control ?

That would be A-MA-ZING :)

ndeadly commented 1 year ago

This has been requested already in https://github.com/ndeadly/MissionControl/issues/7 and is one of the longest standing Mission Control issues.

Originally I thought it couldn't be done without compromise, but I have since revised my stance on the matter and have done some recent work on it. Its still non-trivial though and will require more reverse engineering work and binary patching of the bluetooth module to enable support, so no time frame on when it will be finished.

Masamune3210 commented 1 year ago

I'm assuming most of the work is due to the incredibly non-standard way the DS3 handles pairing?

ndeadly commented 1 year ago

Áfter spending a fair bit of time on this, I'm not even sure how "non-standard" the DS3 is outside of the weird USB mac address exchange you have to do at the start, and possibly some missing identifying information. Currently, it seems to me that most of the issues I'm encountering are due to hardcoded security settings and other assumptions the bluetooth module makes about the devices that are connecting.

Masamune3210 commented 1 year ago

It breaks the standard in a couple of other ways iirc, but the one most people always seem to talk about is the MAC exchange. It's not as bad as the Wiimote, but I know it's not fully compliant either

ndeadly commented 1 year ago

You might be right. There's not really any single good source of DS3 information, everything just seems to be scattered around forums and mailing lists. Will see what comes of it. To answer your question above, most of the work is in reverse engineering Nintendo's bluetooth stack implementation enough to be able to follow the events and callbacks through the various layers in gdb to find out what's failing. Then ultimately devising a way to fix the issues via binary patches for each firmware revision.

Masamune3210 commented 1 year ago

Might have some luck looking around for some open source projects on PC that can handle the DS3 to see how they handle the connection. Obviously won't be directly applicable, but it could help get a rough sketch