Skip to content

Conversation

@JonnyHaystack
Copy link
Owner

NintendoSwitchBackend had several issues. Firstly, I messed up the descriptor, which was why this comms backend didn't work on PC. Secondly, because the Nintendo Switch apparently applies a deadzone and scaling to GameCube controller analog stick inputs, it was necessary to reverse engineer this scaling and replicate it in NintendoSwitchBackend so that we scale the inputs before sending them to the console, in the same way that the Switch would scale them after receiving them. Until now I have been using a naive multiplication which was not close enough to the actual formula to prevent input issues manifesting when using the Ultimate mode. Thanks to Zeronia, we have much more data now and I have been able to reverse engineer the scaling formula to get one that matches almost exactly. The only remaining considerations are that the GameCube controller C-Stick is apparently scaled differently to the left analog stick, and that I have only implemented a basic square deadzone rather than a circular deadzone. It is yet to be seen whether these things will cause any input inconsistencies in existing controller modes.

@JonnyHaystack JonnyHaystack self-assigned this Mar 15, 2025
NintendoSwitchBackend had several issues. Firstly, I messed up the
descriptor, which was why this comms backend didn't work on PC.
Secondly, because the Nintendo Switch apparently applies a deadzone and
scaling to GameCube controller analog stick inputs, it was necessary to
reverse engineer this scaling and replicate it in NintendoSwitchBackend
so that we scale the inputs before sending them to the console, in the
same way that the Switch would scale them after receiving them. Until
now I have been using a naive multiplication which was not close enough
to the actual formula to prevent input issues manifesting when using the
Ultimate mode. Thanks to Zeronia, we have much more data now and I have
been able to reverse engineer the scaling formula to get one that
matches almost exactly. The only remaining considerations are that the
GameCube controller C-Stick is apparently scaled differently to the left
analog stick, and that I have only implemented a basic square deadzone
rather than a circular deadzone. It is yet to be seen whether these
things will cause any input inconsistencies in existing controller
modes.
@JonnyHaystack JonnyHaystack force-pushed the fix/switch_backend_scaling branch from 2b349dc to 13b25fe Compare March 15, 2025 14:11
@JonnyHaystack JonnyHaystack merged commit 46b3466 into master Mar 15, 2025
17 checks passed
@JonnyHaystack JonnyHaystack deleted the fix/switch_backend_scaling branch April 10, 2025 15:54
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.

2 participants