-
Notifications
You must be signed in to change notification settings - Fork 357
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
Add a generic USB HID mode #1061
Merged
arntsonl
merged 8 commits into
OpenStickCommunity:main
from
bsstephan:generic-usb-hid-mode
Jun 17, 2024
Merged
Add a generic USB HID mode #1061
arntsonl
merged 8 commits into
OpenStickCommunity:main
from
bsstephan:generic-usb-hid-mode
Jun 17, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
e8a1d85
to
3a02cdf
Compare
the intent is to redo the HID driver as a generic, quirkless, expandable (!), and customizable (!!) driver so that we have a mode that is free of odd VID/PID dependencies, report layouts, and so on. to accomplish that, we want to retain the existing HID mode, which has some PS3 quirks, as a separate driver. configurations referring to this driver will continue to point at it in the future, as this is an internal rename and move (i.e. the new HID driver will be truly new, a different config entry and so on). the PS3 mode was tested in a gamepad tester in Linux, and via SSF2THDR and MvC2 on PS3 --- all seems well, including the analogs on MvC2 and the functionality of the PS button on both.
this just covers the basics; 16 buttons (the last two don't work yet) + a hat. TODOs include getting the axes back, and then will begin some level of customization (be it by defines or protobuf), but that'll happen later. I also need to see how some devices (e.g. converters, maybe an Undamned USB decoder, maybe even an Analogue Pocket Dock) handle this, because this alone might be usable for those things. maybe.
this draws a direct line from GAMEPAD_MASK values to the HID report for Generic mode, including the dpad Up/Down/Left/Right values as buttons, and defining 12 "extra" buttons that are only used/output in this mode
3a02cdf
to
31651ac
Compare
arntsonl
approved these changes
Jun 17, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!!! New Generic mode makes it much easier to split support, and now we can have our PS3 quirks and our generic USBHID
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
All the existing HID modes have quirks and host-specific decisions --- specific VID/PIDs, how the analogs are ordered, weird counter stuff, undocumented analog button payloads, auth packets, etc. Meanwhile, Bounty 35 has requested additional inputs for USB HID devices, for people who want to map more than 14 buttons. That bounty also (rightly IMO) surmises that we'd have to break out a new mode. The goal might be one day that this new mode can be user-configurable with specific button counts or who knows what else, especially once we get I/O expanders integrated --- maybe you could define a bunch of analogs!
Anyway, this PR: