Skip to content

feat(target): add 8BitDo Ultimate 2 Wireless controller emulation#544

Merged
pastaq merged 5 commits intoShadowBlip:mainfrom
honjow:8bitdo-u2
Apr 1, 2026
Merged

feat(target): add 8BitDo Ultimate 2 Wireless controller emulation#544
pastaq merged 5 commits intoShadowBlip:mainfrom
honjow:8bitdo-u2

Conversation

@honjow
Copy link
Copy Markdown
Contributor

@honjow honjow commented Mar 5, 2026

Adds a 8bitdo-u2 target device that emulates the 8BitDo Ultimate 2 Wireless in DInput mode (VID=0x2DC8, PID=0x6012) via UHID.

Steam uses SDL_hidapi_8bitdo.c to identify and parse this device by VID/PID, reading the 34-byte input report at fixed offsets. The HID report structure and IMU coordinate mapping are derived from that source.

Supported features:

  • Buttons: face, shoulder, triggers, d-pad, L4/R4/PL/PR back buttons
  • Gyroscope and accelerometer (axes and signs verified on hardware)
  • Rumble via HID output report ID 0x05

To support rumble routing, this also adds OutputEvent::Rumble and a process_rumble handler in the evdev gamepad source that keeps a single persistent FF_RUMBLE effect alive and updates its magnitude in-place.

A udev rule is included to grant hidraw access so Steam can open the virtual device without root.

Tested on MSI Claw 8 and GPD Win5 .

image

honjow added 2 commits March 6, 2026 16:53
Emulates the 8BitDo Ultimate 2 Wireless controller (DInput mode,
VID=0x2DC8/PID=0x6012) as a UHID target device.

- HID report structure derived from SDL_hidapi_8bitdo.c
- Full button mapping including L4/R4/PL/PR back buttons
- Gyroscope and accelerometer with coordinate rotation matching SDL
- Rumble support via OutputEvent::Rumble routed through evdev FF
- Add generic OutputEvent::Rumble variant and process_rumble handler
  in evdev gamepad source for direct magnitude-based rumble control
Allow the current session user to read/write the UHID hidraw node
(VID=0x2DC8, PID=0x6012) so Steam can use the emulated device.
Comment thread src/input/output_event/mod.rs Outdated
Comment thread src/input/output_event/mod.rs Outdated
@pastaq
Copy link
Copy Markdown
Contributor

pastaq commented Mar 7, 2026

Looks good. All try to give it a test some time next week once I'm home. If you haven't heard from me by Thursday morning feel free to ping me.

Comment thread src/input/target/ultimate2_wireless.rs Outdated
Copy link
Copy Markdown
Contributor

@pastaq pastaq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on Legion Go S in Grid [2019]

Copy link
Copy Markdown
Contributor

@ShadowApex ShadowApex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some small comments, but otherwise looks good! Thanks for this!

Comment thread src/input/source/hidraw/dualsense.rs Outdated
Comment thread src/input/source/hidraw/legos_xinput.rs Outdated
Comment thread src/input/source/hidraw/steam_deck.rs Outdated
Comment thread src/input/output_event/mod.rs Outdated
Rename OutputEvent::Rumble to GenericRumble to align with the existing
naming convention. Also implement rumble routing in DualSense, Legion Go,
and Steam Deck source devices instead of silently ignoring the event.
@pastaq pastaq merged commit df3ede3 into ShadowBlip:main Apr 1, 2026
3 checks passed
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 1, 2026

🎉 This PR is included in version 0.76.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants