-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Joystick doesn't handle diagonal directions #127
Comments
I've noticed that diagonal inputs seem to work correctly when using X-input controllers. Any other controller protocol doesn't register diagonals. I've tested this with an 8bitdo Pro 2 controller paired over bluetooth. In D-input mode, it will not register diagonal inputs, but in X-input mode it does. I've seen the same results with an M30 Bluetooth controller. No diagonals in D-input or Switch mode, yes in X-input. |
I never noticed such behavior depending on protocols. But if it happens with some controllers, then it's not because of MiSTer code. Probably something is in driver or even in controller firmware. |
I tested with a few other controllers I have on hand to see if I got different results. It works with the 8bitdo SN30 Pro 2 (in Xinput mode), the 8bitdo M30 Bluetooth (in Xinput mode), the Pokken Tournament USB controller, and the Switch Online SNES controller (wired). It does not work with the 8bitdo M30 Bluetooth (in any other mode), or the iBuffalo USB controller. So I spoke too soon pointing the finger at Xinput support. But it's still strange that it's only certain controllers that is the issue, especially when those same controllers' diagonals work fine in other cores I test. This issue seems to be unique to the AO486 core. |
It might have something to do how the axes are being reported by the controller. I couldn't see anything with controller test, but I know those usb controllers report the dpad presses as x/y axes, and I wonder if the ao486 uses that data directly. |
It looks like this problem concerns any controller which reports d-pad as joystick axis via linux evdev (but only ever produces values 0, 128 or 255). This is simple to test; map any other buttons as left/right/up/down, and diagonals work correctly. In mister shell, you can check exactly how linux sees your controller(s):
I'm currently trying to learn how inputs are handled on mister main binary side and in the ao486 core.. it's rough |
I was able to get an iBuffalo gamepad working correctly, by removing existing input maps for it:
Not yet sure what exactly in the mappings triggered the problem, but in the linux side code the d-pad X-axis was handled as left analog stick, but Y-axis as right analog stick. |
It seems that the joystick support doesn't do diagonal directions at all when using gamepad as input. Using gravutil.exe (from gravis analog pro) it can be observed that even if gamepad up/left directions (for example) are pressed, the emulated PC only sees one axis being moved.
The text was updated successfully, but these errors were encountered: