DevTerm: Gamepad SDL mapping (CM4)

Hi folks,

I’ve used the breadcrumbs here
D-Pad buttons are not recognized when running RetroPie emulationstation and here Fixing detected gamepad in some games to configure my DevTerm’s gamepad controls but I am surprised to find that the DevTerm’s D-pad is not mapped as an SDL D-pad, but is instead mapped to the SDL left-analog stick ???

I don’t really know much about this.

Does anyone have any insight ?

Best wishes,

Tom

1 Like

Having had a bit of a play, I’m going to suggest that the currently recommended setting:

export SDL_GAMECONTROLLERCONFIG="03000000af1e00002400000010010000,ClockworkPI DevTerm,platform:Linux,a:b1,b:b2,x:b0,y:b3,back:b8,start:b9,leftx:a0,lefty:a1,"

is “wrong”, or at the very least “wrong under some circumstances” and it should be:

export SDL_GAMECONTROLLERCONFIG="03000000af1e00002400000010010000,ClockworkPI DevTerm,platform:Linux,a:b1,b:b2,x:b0,y:b3,back:b8,start:b9,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,"

This latter enables the D-pad as an SDL D-pad and is how, for example, the “iBuffalo SNES Controller” is configured within the SDL source-code: SDL/src/joystick/SDL_gamepad_db.h at 6e53a364141d6f5e95bfd805982a9b137bd5463d · libsdl-org/SDL · GitHub

As with all things, YMMV.

Best wishes,

Tom

2 Likes