joycontrol icon indicating copy to clipboard operation
joycontrol copied to clipboard

Added support for Pro Controller Grip colors.

Open SuperPichu opened this issue 4 years ago • 6 comments

The color info field for the device info subcommand needs to be set to 2 instead of 1 for Pro Controllers so that the grip color customization they added in 5.0 works correctly.

Sorry for recreating this, forgot to do it to a branch so it added a bunch of unrelated commits to the old PR.

SuperPichu avatar Mar 26 '20 20:03 SuperPichu

Hey, thank you really much for the contribution. I didn't know about grip color customization. How do you get different colors? Are you emulating the spi flash?

I know that, if the byte is 0x01 the Switch reads color information from the controller memory. I tried emulating a Pro Controller with memory of a blue JoyCon. The Controller appears to be completely blue in the menu afterwards.

The byte actually should be 0x00 if no spi flash is emulated, so that the Switch uses default colors. Just haven't changed it yet.

mart1nro avatar Mar 27 '20 08:03 mart1nro

Yes you would have to be emulating spi. There are separate color fields for body and button color normally, on Pro Controllers now they added two extra ones for left and right color grips.

SuperPichu avatar Mar 29 '20 19:03 SuperPichu

Did you test emulating the spi flash of a Pro Controller? How did you get a dump? I'm asking cause I currently don't have access to one and the dump_spi_flash.py doesn't work on a Pro Controller. Would be amazing if somebody could add the product id and port it.

mart1nro avatar Mar 30 '20 15:03 mart1nro

I have a pro controller, how do I find the product id?

EDIT: Nevermind, I got it. I used the hid module in python to get the hid devices connected and found my pro controller with a vendor id of 1406 and product id of 8201. Vendor id matches the one already in the code which makes good sense. Will make a PR for things

JuanPotato avatar Apr 11 '20 22:04 JuanPotato

I did test using a pro controller SPI dump. I just found a dump from someone else online. I can send you a link if you want one. I haven't gone into testing doing the colors without a dump.

SuperPichu avatar Apr 28 '20 23:04 SuperPichu

Did you test emulating the spi flash of a Pro Controller? How did you get a dump? I'm asking cause I currently don't have access to one and the dump_spi_flash.py doesn't work on a Pro Controller. Would be amazing if somebody could add the product id and port it.

If you still need a pro controller dump, I can send you mine, if you like

choss avatar Aug 02 '20 10:08 choss