Skip to content

Add support for DragonRise/Manta generic USB gamepad (VID 081F, PID E401)#5

Open
jedgarpark wants to merge 1 commit into
freewili:mainfrom
jedgarpark:feature/manta-controller
Open

Add support for DragonRise/Manta generic USB gamepad (VID 081F, PID E401)#5
jedgarpark wants to merge 1 commit into
freewili:mainfrom
jedgarpark:feature/manta-controller

Conversation

@jedgarpark

Copy link
Copy Markdown

Summary

  • Adds input_manta_report() — a dedicated HID report parser for the DragonRise/Manta generic USB gamepad (VID 0x081F, PID 0xE401), commonly sold as an unlicensed SNES-style USB controller
  • Routes this VID/PID in the controller callback in main.cpp, alongside the existing Sony and XInput handlers
  • Adds MANTA_CONTROLLER.md documenting the confirmed HID report layout

The device has a non-standard report format: 5 axis bytes precede the button byte, so the generic input_gamepad_report() misreads it. The correct layout was determined empirically using a PICO-8 diagnostic cart (input.manta_raw() Lua function + visual bit display).

Confirmed report layout:

Byte Content
0 X axis (d-pad horizontal)
1 Y axis (d-pad vertical)
2–4 Extra axes (Z, Rz, slider — ignored)
5 bits 0–3: hat switch; bit 5: A→O (btn(4)); bit 6: B→X (btn(5))

Test plan

  • Flash firmware, connect Manta gamepad, confirm [Controller] Mounted: VID=081F PID=E401 on serial
  • D-pad moves correctly in a PICO-8 cart
  • A button → PICO-8 O (btn(4))
  • B button → PICO-8 X (btn(5))
  • No regression on XInput (Xbox) or Sony (DualSense/DualShock) controllers

🤖 Generated with Claude Code

…401)

Routes HID reports for this device to a dedicated parser that handles
its non-standard layout: 5 axis bytes precede the button byte, with
face buttons in byte 5 (bit 5 = A/O, bit 6 = B/X). Layout confirmed
empirically using a PICO-8 diagnostic cart.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

1 participant