batocera-linux / batocera.linux

batocera.linux
https://batocera.org
Other
1.96k stars 511 forks source link

Powkiddy RGB10 Max 2 - Inverted Analog Controls in PPSSPP #6030

Open nickfun opened 2 years ago

nickfun commented 2 years ago

Hello, I wanted to report a small issue. I've got a RGB10 Max 2 device and I'm using the batocera-rk3326-rk3326-33-20220203.img.gz image. When I load up a game in PPSSPP and I use the d-pad it works as expected. When I use the left analog stick the inputs are reversed. I must push up to go down, right to go left, etc. When I remap in the PPSSPP menu it works. The settings are not preserved when I restart the game. If I setup a "game specific config" then the remapped controls are preserved. So it has a work around, just documenting the issue here. Let me know if there is more info I can provide.

I know the device isn't officially listed as supported but otherwise Batocera is working great on this device. Thanks for all your work on this project, it's great!

dmanlfc commented 2 years ago

@nickfun did you 'configure' the controller correctly in Batocera?

mirimoshpit commented 2 years ago

Hello, I have the same issue regarding to all emulators which don't belong to RetroArch. I tested the DraStic DS Emulator and the PPSSPP emulator. The left analog stick from my RGB10 Max2 is also inverted. The configuration in Batocera was correct. All RetroArch emulators are working fine but only external emulators have this inverted analog stick issue. I can't get it to work, properly. Maybe someone can help, thanks a lot.

nickfun commented 2 years ago

@dmanlfc At first I didn't use the "configure" option in the batocera menu. I ran through it and that has improved PPSSPP. However even after using that when I play a Nintendo DS game I still have an inversion issue. The left analog is inverted like @mirimoshpit described. Also, the right analog stick is half-inverted. up/down works correct, but left/right is inverted it goes right/left instead.

(edit) to add to the Nintendo DS issue, when I open the emulator menu with Select+B the d-pad doesn't always move through the menu. The analog stick does move through the menu, but it's inverted here too.

james1191991 commented 2 years ago

I have the same issue on RGB10 Max 2, even after configured from Batocera menu. Key mappings and analog sticks in RetroArch has no problem, the issue only happened in standalone emulators.

My temporary workaround is manually swapping axis mappings in those configs:

For PPSSPP: /usr/lib/python3.10/site-packages/configgen/generators/ppsspp/ppssppControllers.py For DraStic: /usr/share/evmapy/nds.drastic.keys

And do batocera-save-overlay.

dmanlfc commented 2 years ago

so just to be clear - is it all standalone emulators or just ppsspp & drastic?

james1191991 commented 2 years ago

so just to be clear - is it all standalone emulators or just ppsspp & drastic?

Hello. I have tested some standalone emulators, not all of them have this problem.

Inverted analog sticks: drastic (NDS) easyrpg (EasyRPG) ppsspp (PSP) solarus (Solarus) vice (C64)

No problem with analog sticks: mupen64plus (N64) openbor (OpenBOR) scummvm (ScummVM) sdlpop (SdlPop)

As I don't have a lot of games, I can't test all emulators.

nadenislamarre commented 2 years ago

i think i guess the issue. pads have values from -X to +X, some emulators assumes that -X is left and +X right ; some emulators needs both configuration i would say (just a theory). can you : do a batocera-support, or open es-input.cfg and revert the axis order for the axis in this config : i see different possibilities

for the solutions, we'll see depending on the answers. in worse case, evsieve remapping can fix the issue.

james1191991 commented 2 years ago

Hello. Sorry for late reply. I did some check with es-input.cfg. I figure out that most of axis on this device have reverted value.

The original es-input.cfg config: (Which has the problem on RGB10Max2, but OK on original OGS because both devices shared same joystick GUID.)

<inputConfig type="joystick" deviceName="GO-Super Gamepad" deviceGUID="190000004b4800000011000000010000">
  ...
  <input name="joystick1left" type="axis" id="0" value="-1" code="0" />
  <input name="joystick1up" type="axis" id="1" value="-1" code="1" />
  <input name="joystick2left" type="axis" id="2" value="-1" code="3" />
  <input name="joystick2up" type="axis" id="3" value="-1" code="4" />
  ...
</inputConfig>

My config after doing controller configuration:

<inputConfig type="joystick" deviceName="GO-Super Gamepad" deviceGUID="190000004b4800000011000000010000">
  ...
  <input name="joystick1left" type="axis" id="0" value="1" code="0" />
  <input name="joystick1up" type="axis" id="1" value="1" code="1" />
  <input name="joystick2left" type="axis" id="3" value="1" code="4" />
  <input name="joystick2up" type="axis" id="2" value="-1" code="3" />
  ...
</inputConfig>

sdl2-jstest shows reverted axis values too. (e.g -X is right, +X is left)

I don't know if the information above is enough for the problem, please let me know if more detail are needed.