Right analog one direction is ignored
-
Hey guys,
I'm working on a handheld called RetroBlock2 (cf
The gamepad is setup with a python script using uinput to generate a gamepad device.
The left joystick works without issue.
The right joystick is working fine on hardware level (The ADC values can be read and it's all OK).
But the right joystick Up direction is not recognized by the gamepad mapping. As I can confirm it's working on a hardware level it means the issue is on EmulationStation. Specially since the Down direction register and is on the same axis.
I seen this problem is also found on a lot of gamepads : https://www.reddit.com/r/RetroPie/comments/chqfr4/right_analog_left_direction_ignored/
But no fix seems to exist.
In my python script, Left joystick axis are registered as uinput ABS_X & ABS_Y while Right joystick is ABS_RX & ABS_RY
Something interesting is that on Xfce the right joystick is recognized as the mouse wheel. Which makes me think that this 'mouse wheel' input is preventing the axis from being recognized by EmulationStation.
In the different reddit posts about this issue, I can't find any solution. Which seems odd considering that it seems to affect most gamepads with 2 joysticks?
Is there a solution for this?
-
Ok I finally found where this issue was coming from. And it has nothing to do with other controllers afterall.
See the plastic case around the right joystick is not completely flat. Such that the 'Up' direction does not go exactly as far as the other directions in fact.
The axis values setup with uinput were : 0 to 40.
The real ADC values read were :- left-right axis : Between 4(left) and 37 (right)
- Up-Down axis : Between 6(up) and 38 (down)
So the up direction was 6 units from the minimum value, while the others were only 4 units or less from min/max values. And it seems that was the issue here. This 6 must have been considered inside the 'Dead-zone' of the joystick for the EmulationStation mapping configurator.
After modifying the python script such that the axis setup was between 0 and 36, and reducing the read values of ADC by 4, I now have :
The axis values setup with uinput were : 0 to 36.
The real ADC values read :- left-right axis : Between 0(left) and 34 (right)
- Up-Down axis : Between 1(up) and 35 (down)
And now it's registering correctly.
Though I think this issue is probably the same for the other topics/gamepads that I found on reddit/this forum. It's probably the joystick "dead-zone" which is too big in the emulationstation mapping configurator for those specific gamepads.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.