-
-
Notifications
You must be signed in to change notification settings - Fork 118
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
Implement OpenGC (GameCube) HID Protocol #1081
Comments
Awesome thanks, I'll likely create a pytest script to simulate it and test my code change this way. Once that part done can you personally test a BlueRetro FW with your pad? |
Sounds good to me! I should also mention, the output data is full-scale (0-255). |
Sorry for long delay on this, looking at implementing this now. I though initially you were going to send the RAW wired GameCube report but looks like you are modifying it to make it look more like a standard HID device. ex HAT switch instead of discrete buttons, axes scaling to max out range etc.. I Assume the Y axis polarity match standard HID device (down is positive and up is negative)? rather than the Nintendo convention. (Up is positive and down is negative). I would suggest to also modify the buttons bitfield to match the most common mapping using in HID device: I see two way of mapping this to gamecube, either by name or by position: Or by position: Let me know what you think, I can also use your original spec too. |
I guess you going for some sort of WiiU adapter compatibility? So I guess you probably can't change it. |
This specific profile is meant explicitly for bluetooth; In the context of Windows/Android, there really isn't an existing input method to get the unique aspect of the GameCube controller which is the analog + digital nature of the triggers, while also having rumble feedback. I'm open to having the descriptor/button order be exactly as you have suggested. If you have a revised descriptor, I can use it. VID/PID are open for changing as well, I'm not exactly registered anywhere so something that is unused would be fine. I'm deep in a rewrite of my entire firmware currently, and this is not an urgent matter, but if you create a descriptor and have the support for it, I can implement it when I get to that stage and test it with your adapter firmware when that's available for an update. |
ok sound good I can likely have something done tonight |
The descriptor below should work with this beta of BlueRetro: Changes:
Note: BlueRetro doesn't support Players LEDs for generic controller, but I'll add it soon. IMHO you should use a unique VID, PID, this will allow if needed Drivers and application to recognise the controller without guessing. Since you use a ESP32 you can get a unique PID under the Espressif VID:
|
My players LEDs usage were wrong, I edited my previous post to fix it. |
@darthcloud I've submitted a PID pull request. I will go ahead and start testing the new descriptor now and getting that moving. Thank you for the collaboration on this ^^ |
@mitchellcairns That's great! Are you planing to use that PID for different products? I think it's better to make that PID specific to OpenGC. If you make a new product you can request another PID. Even if the underlying code is the same, the physical product might be different enough that a different PID would be useful in some way. |
The goal is to have one shared PID for now that would use the same basic report structure, because it's based on my gamepad library which presumes the gamepad will handle any device differences. I think in the future it could be worthwhile having different PIDs per device but this is what I'm going with for now. I suppose you are still right that having different PIDs for different devices would be useful down the line, but for now I would consider this base PID for the 'library' as a generic thing. |
oh.. and adding one thing-- it's the idea that I want to be able to encourage people to make their own gamepads without the hassle of having to define a PID etc. That's the main reason for having a 'library' PID rather than a per-device at this point |
BlueRetro firmware version
24.04
BlueRetro firmware specification
HW2
BlueRetro firmware variant
Universal
BlueRetro hardware type
External adapter dongle (1 port only)
Manufacturer
N/A
System used
Nintendo GameCube
Bluetooth controller brand & name
N/A
What is problem? (only list ONE problem per report)
This is a request to implement a specific HID descriptor specification to support future Bluetooth gamepads that can utilize the full GameCube pad functionality. This includes dual-stage triggers with a separate analog/digital press. This descriptor also includes other button inputs to add compatibility with other consoles (Stick click, Home/Select/4 triggers).
This also supports an output report to set Rumble and the current Player number (Shared output report)
The device name is
OpenGC BT Gamepad
I'm using
Vendor ID: 0x057E
Product ID: 0x0337 (Equal to the GC adapter for Wii U/Switch)
Here's the HID descriptor (Size 145 bytes):
Here's some struct definitions to help along the way
What did you expect to happen?
N/A
Attach files like logs or Bluetooth traces here
No response
The text was updated successfully, but these errors were encountered: