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

Added support for Pro Controller Grip colors. #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SuperPichu
Copy link

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.

@mart1nro
Copy link
Owner

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.

@SuperPichu
Copy link
Author

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.

@mart1nro
Copy link
Owner

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.

@JuanPotato
Copy link
Contributor

JuanPotato commented Apr 11, 2020

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

@SuperPichu
Copy link
Author

SuperPichu commented Apr 28, 2020

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.

@choss
Copy link

choss commented Aug 2, 2020

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

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

Successfully merging this pull request may close these issues.

4 participants