Emulator Issues #12711
closedWrong control stick recognition with few GamePads – potential bug source roughly found
0%
Description
Assumption¶
There seems to be a buffer overflow in the recognition of gamepads right control stick. >Up< and >right< is already set with "Axis 11+" and >down< and >left< is already set with "Axis 14+" on some gamepads. There are no negative axis found.
What steps will reproduce the problem?
Connect the 8Bitdo Gamepad SF30 Pro via Bluetooth to you android phone.
Configure the buttons of your GameCube Controller 1 and use the right control stick. The negative axis won't be recognized like described above.
Is the issue present in the latest development version? For future reference, please also write down the version number of the latest development version.
Yes - Dolphin Emulator (Android) 5.0-15339
What are your PC specifications? (CPU, GPU, Operating System, more)
Smartphone: Poco F3
OS: Android 11
GamePad that causes the bug: '8Bitdo Gamepad SF30 Pro'
GamePad that doesn't causes the bug: Ipega 9037
The difference between these two gamepads are analyzed below.
Is there anything else that can help developers narrow down the issue? (e.g. logs, screenshots,
configuration files, savefiles, savestates)
Only one of the two gamepads I use causes this bug. I try to find out the delta of the right control stick of those two gamepads by the android app "Gamepad tester" and found the following:
Right control stick of working Gamepad (Ipega 9037):¶
Vertical axis¶
axis 0x0e AXIS RZ default value (not moved): 0.003921628
up maximum: -0.89 (already slight different but near -0.9)
down maximum: 0.89 (already slight different but near +0.9)
Horizontal axis¶
axis 0x0b AXIS Z default value (not moved): 0.003921628
left maximum: -0.89 (already slight different but near -0.9)
right maximum: 0.89 (already slight different but near +0.9)
Right control stick of problematic Gamepad (8Bitdo Gamepad SF30 Pro)¶
Vertical axis¶
axis 0x0e AXIS RZ default value (not moved): 1.5258789E-5
up maximum: -0.89 (already slight different but near -0.9)
down maximum: 0.89 (already slight different but near +0.9)
Horizontal axis¶
axis 0x0b AXIS Z default value (not moved): 1.5258789E-5
left maximum: -0.89 (already slight different but near -0.9)
right maximum: 0.89 (already slight different but near +0.9)
Conclusion¶
Only the default value is different. The floating number 1.5258789E-5 draws attention and seems to be a source of a wrong calculation. ;)
Updated by Barock about 3 years ago
The title uses a wrong word. :-P The last word should be found not founded.
Wrong control stick recognition with few GamePads – potential bug source roughly found ed
Updated by JosJuice about 3 years ago
- Subject changed from Wrong control stick recognition with few GamePads – potential bug source roughly founded to Wrong control stick recognition with few GamePads – potential bug source roughly found
- Operating system Android added
- Operating system deleted (
N/A)
1.5258789E-5 is a very small number. I don't think this number has anything to do with the problem.
Updated by golivax over 2 years ago
Barock wrote:
Assumption¶
There seems to be a buffer overflow in the recognition of gamepads right control stick. >Up< and >right< is already set with "Axis 11+" and >down< and >left< is already set with "Axis 14+" on some gamepads. There are no negative axis found.
What steps will reproduce the problem?
Connect the 8Bitdo Gamepad SF30 Pro via Bluetooth to you android phone.
Configure the buttons of your GameCube Controller 1 and use the right control stick. The negative axis won't be recognized like described above.Is the issue present in the latest development version? For future reference, please also write down the version number of the latest development version.
Yes - Dolphin Emulator (Android) 5.0-15339
What are your PC specifications? (CPU, GPU, Operating System, more)
Smartphone: Poco F3 OS: Android 11 GamePad that causes the bug: '8Bitdo Gamepad SF30 Pro' GamePad that doesn't causes the bug: Ipega 9037 The difference between these two gamepads are analyzed below.
Is there anything else that can help developers narrow down the issue? (e.g. logs, screenshots,
configuration files, savefiles, savestates)Only one of the two gamepads I use causes this bug. I try to find out the delta of the right control stick of those two gamepads by the android app "Gamepad tester" and found the following:
Right control stick of working Gamepad (Ipega 9037):¶
Vertical axis¶
axis 0x0e AXIS RZ default value (not moved): 0.003921628 up maximum: -0.89 (already slight different but near -0.9) down maximum: 0.89 (already slight different but near +0.9)
Horizontal axis¶
axis 0x0b AXIS Z default value (not moved): 0.003921628 left maximum: -0.89 (already slight different but near -0.9) right maximum: 0.89 (already slight different but near +0.9)
Right control stick of problematic Gamepad (8Bitdo Gamepad SF30 Pro)¶
Vertical axis¶
axis 0x0e AXIS RZ default value (not moved): 1.5258789E-5 up maximum: -0.89 (already slight different but near -0.9) down maximum: 0.89 (already slight different but near +0.9)
Horizontal axis¶
axis 0x0b AXIS Z default value (not moved): 1.5258789E-5 left maximum: -0.89 (already slight different but near -0.9) right maximum: 0.89 (already slight different but near +0.9)
Conclusion¶
Only the default value is different. The floating number 1.5258789E-5 draws attention and seems to be a source of a wrong calculation. ;)
I have the exact same problem using an original Gamecube Controller via an 8bitdo GBros bluetooth adapter (latest firmware v2.25). I'm running latest Dolphin Dev Build 5.0-16907 on a Galaxy S10 with Android 12.
Looking at ControllerMappingHelper.java, I've noticed that some controllers need axis rescaling. I wonder if 8Bitdo controllers also require some sort of axis rescaling/adjustment.
Updated by golivax over 2 years ago
Now I see. It's the other way around. Dolphin is rescaling the axes for my controller even though it shouldn't. The reason is because Android reads my controller as an XBox One controller.
More details on PR 10795
Updated by JosJuice almost 2 years ago
Could you test if this is working properly in the input overhaul pull request?
Pull request: https://github.com/dolphin-emu/dolphin/pull/11385
APK: https://dl.dolphin-emu.org/prs/b0/82/pr-11385-dolphin-latest.apk
Updated by JosJuice almost 2 years ago
- Status changed from New to Fixed
- Fixed in set to 5.0-18920
This should be fixed in https://dolphin-emu.org/download/dev/62ff2f1030ae95ac0e5bf9ae02e9cc78664ab83e/. If it isn't, please comment here and I can reopen the issue.
Updated by Barock almost 2 years ago
I confirm the fix of this bug in 5.0-18920! I was waiting such a long time for this fix! Thank you so much, JosJuice!