Closed shymian closed 4 months ago
Here's a comparison of the host device vs virtual device. Both running on the same machine as part of testing.
| Host Device | Virtual Device |
| Input driver version is 1.0.1 | Input driver version is 1.0.1 |
| Input device ID: bus 0x3 vendor 0x57e product 0x2009 version 0x8111 | Input device ID: bus 0x3 vendor 0x57e product 0x2009 version 0xab00 |
| Input device name: "Nintendo Switch Pro Controller" | Input device name: "Wolf Nintendo (virtual) pad" |
|---------------------------------------------------------------------+---------------------------------------------------------------------|
| Supported events: | Supported events: |
| Event type 0 (EV_SYN) | Event type 0 (EV_SYN) |
| Event type 1 (EV_KEY) | Event type 1 (EV_KEY) |
| Event code 304 (BTN_SOUTH) | Event code 304 (BTN_SOUTH) |
| Event code 305 (BTN_EAST) | Event code 305 (BTN_EAST) |
| Event code 307 (BTN_NORTH) | Event code 307 (BTN_NORTH) |
| Event code 308 (BTN_WEST) | Event code 308 (BTN_WEST) |
| Event code 309 (BTN_Z) | |
| Event code 310 (BTN_TL) | Event code 310 (BTN_TL) |
| Event code 311 (BTN_TR) | Event code 311 (BTN_TR) |
| Event code 312 (BTN_TL2) | |
| Event code 313 (BTN_TR2) | |
| Event code 314 (BTN_SELECT) | Event code 314 (BTN_SELECT) |
| Event code 315 (BTN_START) | Event code 315 (BTN_START) |
| Event code 316 (BTN_MODE) | Event code 316 (BTN_MODE) |
| Event code 317 (BTN_THUMBL) | Event code 317 (BTN_THUMBL) |
| Event code 318 (BTN_THUMBR) | Event code 318 (BTN_THUMBR) |
| | |
| Event type 3 (EV_ABS) | Event type 3 (EV_ABS) |
| Event code 0 (ABS_X) | Value -224 |
| Value 96 | Min -32768 |
| Min -32767 | Max 32767 |
| Max 32767 | Fuzz 16 |
| Fuzz 250 | Flat 128 |
| Flat 500 | Value 5702 |
| Event code 1 (ABS_Y) | Min -32768 |
| Value -366 | Max 32767 |
| Min -32767 | Fuzz 16 |
| Max 32767 | Flat 128 |
| Fuzz 250 | Event code 2 (ABS_Z) |
| Flat 500 | Value 0 |
| Event code 3 (ABS_RX) | Min 0 |
| Value 96 | Max 255 |
| Min -32767 | Value 0 |
| Max 32767 | Min -32768 |
| Fuzz 250 | Max 32767 |
| Flat 500 | Fuzz 16 |
| Event code 4 (ABS_RY) | Flat 128 |
| Value -366 | Value 0 |
| Min -32767 | Min -32768 |
| Max 32767 | Max 32767 |
| Fuzz 250 | Fuzz 16 |
| Flat 500 | Flat 128 |
| | Event code 5 (ABS_RZ) |
| | Value 0 |
| | Min 0 |
| | Max 255 |
| | |
| Event code 16 (ABS_HAT0X) | Event code 16 (ABS_HAT0X) |
| Value 0 | Value 0 |
| Min -1 | Min -1 |
| Max 1 | Max 1 |
| Event code 17 (ABS_HAT0Y) | Event code 17 (ABS_HAT0Y) |
| Value 0 | Value 0 |
| Min -1 | Min -1 |
| Max 1 | Max 1 |
| Event type 21 (EV_FF) | Event type 21 (EV_FF) |
| Event code 80 (FF_RUMBLE) | Event code 80 (FF_RUMBLE) |
| Event code 81 (FF_PERIODIC) | Event code 81 (FF_PERIODIC) |
| | Event code 82 (FF_CONSTANT) |
| | Event code 87 (FF_RAMP) |
| Event code 88 (FF_SQUARE) | |
| Event code 89 (FF_TRIANGLE) | |
| Event code 90 (FF_SINE) | Event code 90 (FF_SINE) |
| Event code 96 (FF_GAIN) | Event code 96 (FF_GAIN) |
| | |
Edit: updated formatted and correctly layout of rumble events
The following now worked correctly on initial connection: Minus (Select) Plus (Start) Home L-Bumper R-Bumper
Still incorrect: A/B are still reversed Pressing the B button (physical button south) shows as BTN_EAST in evtest for the wolf virtual controller Pressing the A button (physical button east) show as BTN_SOUTH in evtest No input from L/R-Triggers shows as ABS_Z and ABS_RZ rather than BTN_TL2 / BTN_TR2 No input from Capture button (BTN_Z) ~R-Stick has no horizontal movement by default~ R stick works in Pegasus, not in Yuzu. So might be a mapping issue. R stick shows correct ABS_RX / ABS_RY in evtest when input is provided
Sticks show immediate phantom input after the first time touching them. evtest shows lots of small inputs back and forth on the sticks even when not touching them. Fuzz on host is 250, while virtual device is 16. Flat is 500 on host, and 128 in virtual. Not quite sure what they settings do, but might play into it?
Edit: typo and more detail
Per discussion, here is the testing of the mapping issues I am seeing using a Nintendo Pro Controller (8BitDo Pro 2 in Switch mode)
Wolf image used for testing ghcr.io/games-on-whales/wolf:dev-input-protocol
Host machine sees this device as: Input device ID: bus 0x3 vendor 0x57e product 0x2009 version 0x8111 Input device name: "Nintendo Switch Pro Controller"
Virtual Device created by Wolf Input device ID: bus 0x3 vendor 0x57e product 0x2009 version 0xab00 Input device name: "Wolf Nintendo (virtual) pad"
General mapping issues:
Full list of mapping testing
Other notes Reviewing event codes between the host device and virtual device (via evtest) appear generally the same. So I'm a bit confused as to why the mappings are off when used within applications. Is it possible Moonlight is changing these mappings? I'm not familiar enough where to look within the code to check this.
Additionally, evtest reports lots of L-Stick movement within the virtual device even though no activity is taking place on the physical device. This at times appears as chaotic movement on screen.
Let me know if any clarification is needed.