joycontrol
joycontrol copied to clipboard
Added support for Pro Controller Grip colors.
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.
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.
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.
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.
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
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.
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