-
Notifications
You must be signed in to change notification settings - Fork 114
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
Xinput support - emulate xbox 360 controllers #185
Comments
any code submissions are welcome as examples! |
https://github.com/FeralAI/MPG |
@leecyrille I am looking to do xinput with tinyUSB on RP2040 as well. I came across this project, but still working on verifying it works for me. https://github.com/fluffymadness/tinyusb-xinput |
The GP2040-CE project is an advanced working example with platform.io more properly configured. You can look at my issue for the (https://github.com/fluffymadness/tinyusb-xinput) which explains how I got it working. I am mostly looking to get away from platform.io because it becomes painful if you want to edit the dependencies (which were MPG in my case). For now I am using this: Here is my repo with a fully built out 2 and 4 player composite example on the bluepill, and a 4 player composite example for my custom breakoutboard with the STM32F1 chip with more pins: Apruss's composite library inside rogerclarkmelbourne's STM32 framework has this multi-xbox component which makes a single hardware instance send up to six xinput reports, which makes them permenantly in the correct order inside windows somehow, which is like magic for people trying to build 4 player arcade cabinets (my project). For the Xbox parts of that library, it seems limited to the STM32F1 chips so far (missing config somewhere for F4 chips I think). |
oh after digging into this more I see that this actually the opposite of what I'm looking for. Trying to find a working example of reading x-input from controllers over USB input rather than simulating x-input devices. This gets me a bit closer though. 🙏 |
I got XInput device mode working with this library and using MS OS 2.0 descriptors to get Windows to enumerate the device correctly. However, because this library defines |
Is your feature request related to a problem? Please describe.
Existing solutions for xinput and the RP2040/pico require platform.io and other unstable solutions which are difficult to use.
I am attempting to make a 4 player xinput solution for arcade cabinets
Describe the solution you'd like
Add xinput to the Adafruit_TinyUSB library similar to this:
Describe alternatives you've considered
I have am using David Madison's xinput library for Arduino in my arcade cabinet now, but it is slower to initilize and not as nice for flashing. RP2040 availability is also better for building custom boards.
Additional context
Arduino 32U4 and Teensy xinput library:
https://github.com/dmadison/ArduinoXInput
https://www.partsnotincluded.com/understanding-the-xbox-360-wired-controllers-usb-data/ (Extremely versbose explaination of xinput)
https://www.partsnotincluded.com/xbox-360-controller-led-animations-info/ (details about the player LED data - LED data is useful for trying to build multiplayer controllers)
Example project with RP2040 and xinput option (also nintendo switch):
https://github.com/FeralAI/GP2040 (older version)
https://github.com/OpenStickFoundation/GP2040-CE (Newer community fork under active development)
https://discord.gg/kbU9FC2v (Discord channel with firmware developer channel - massive amounts of info regarding game controllers)
composite libary for ST F1/F4 with xinput AND multiple Xinput on a single MCU (This would be amazing to have in arduino)
https://github.com/arpruss/USBComposite_stm32f1
The text was updated successfully, but these errors were encountered: