Project

General

Profile

Actions

Emulator Issues #12711

closed

Wrong control stick recognition with few GamePads – potential bug source roughly found

Added by Barock about 3 years ago. Updated almost 2 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
% Done:

0%

Operating system:
Android
Issue type:
Bug
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:
5.0-18920

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. ;)

Actions #1

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

Actions #2

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.

Actions #3

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.

Actions #4

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

Actions #5

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

Actions #6

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.

Actions #7

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!

Actions

Also available in: Atom PDF