SDLPop retropie controller - shift

Open-source port of PoP that runs natively on Windows, Linux, etc.
Post Reply
megasuperlexa
Scholar Scribe
Scholar Scribe
Posts: 3
Joined: March 8th, 2021, 12:20 pm

SDLPop retropie controller - shift

Post by megasuperlexa »

hi. I've installed SDLPop as opt package on my retropie 4.
Everything works, but I cannot figure out where the shift is on my controller (which is a NES-type wireless) so I could make "fine" movements, hang and pick up things.

I can move around, jump, etc - but without shift modifier its hard to make any progress.

I tried switching between keyboard\joystick modes - did not notice any diff, what are they for? my controller works in both modes, as well as my keyboard.
Can I configure some mapping? Please point me to right direction.
Attachments
Screenshot at Mar 08 13-29-24.png
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5746
Joined: April 9th, 2009, 10:58 pm

Re: SDLPop retropie controller - shift

Post by Norbert »

megasuperlexa wrote: March 8th, 2021, 12:30 pmhi. I've installed SDLPop as opt package on my retropie 4.
Everything works, but I cannot figure out where the shift is on my controller (which is a NES-type wireless) so I could make "fine" movements, hang and pick up things.
Hi megasuperlexa.
The RetroPie SDLPoP page, similar to the SDLPoP README, suggests X as Shift, but this is (probably) Xbox 360 gamepad info.
Try visiting gamepad-tester.com, hold down each action button (A, B, X, Y), and tell us which Bx each changes to value 1.00.
If you have the technical skills, you could also do a similar test with SDL specifically - the software development library used by SDLPoP:

Code: Select all

<Install cmake. Raspberry Pi OS is Debian-based, so you should be able to use "sudo apt install cmake" or become root and then run "apt install cmake".>
mkdir test
cd test
wget https://gitlab.com/sdl-jstest/sdl-jstest/-/archive/master/sdl-jstest-master.zip
unzip sdl-jstest-master.zip
cd sdl-jstest-master/
rmdir SDL_GameControllerDB
wget https://github.com/gabomdq/SDL_GameControllerDB/archive/master.zip
unzip master.zip
mv -i SDL_GameControllerDB-master SDL_GameControllerDB
mkdir build
cd build
cmake ..
make
./sdl2-jstest --list
<Note the number after "Joystick Number:", and use it here:>
./sdl2-jstest --test <number>
<Now press gamepad buttons, and write their names and matching SDL numbers.>
<Ctrl+c to stop.>
megasuperlexa
Scholar Scribe
Scholar Scribe
Posts: 3
Joined: March 8th, 2021, 12:20 pm

Re: SDLPop retropie controller - shift

Post by megasuperlexa »

ok, from sdl-jstest:
Joystick Name: 'Controller'
Joystick GUID: 03000000790000002601000011010000
Joystick Number: 0
Number of Axes: 4
Number of Buttons: 13
Number of Hats: 1
Number of Balls: 0
GameControllerConfig:
missing (see 'gamecontrollerdb.txt' or SDL_GAMECONTROLLERCONFIG)
--------buttons--------
A:1
B:2
Y:3
X:0
L:4
R:5
SELECT:8
START:9
-------D-pad------------
Up: Axis 1: -32768
Down: Axis 1: 32767
Left: Axis 0: -32768
Right: Axis 0: 32767
Please let me know if something else is needed.
Also I am still curious about "Joystick mode" vs "Keyboard mode" as there is no visible diffirence :?
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5746
Joined: April 9th, 2009, 10:58 pm

Re: SDLPop retropie controller - shift

Post by Norbert »

megasuperlexa wrote: March 8th, 2021, 4:15 pm ok, from sdl-jstest:
Joystick Name: 'Controller'
Joystick GUID: 03000000790000002601000011010000
[...]
GameControllerConfig:
missing (see 'gamecontrollerdb.txt' or SDL_GAMECONTROLLERCONFIG)
Try applying the following two changes, and then restart SDLPoP:
1. Add a new file gamecontrollerdb.txt in the SDLPoP directory, with in it (source):

Code: Select all

03000000790000002601000011010000,My SNES Controller,a:b1,b:b2,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b9,x:b0,y:b3,platform:Linux,
2. Edit SDLPoP.ini, to remove (just) the semicolon from the line:

Code: Select all

;gamecontrollerdb_file = gamecontrollerdb.txt
(For this to work, you'll need "<program> --version" to say v1.21 or newer.)
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5746
Joined: April 9th, 2009, 10:58 pm

Re: SDLPop retropie controller - shift

Post by Norbert »

Something else you could try is the following. First, in the starting room, climb up on the top floor. Then use D-pad down; as soon as you've initiated the character climbing down, let go of D-pad down; and quickly press and hold down the action button you expect(ed) to function as Shift. If the character then dangles from the top ledge instead of drops down, this could mean that 'Shift' actually works, but that your controller simply cannot handle particular simultaneous inputs.
megasuperlexa
Scholar Scribe
Scholar Scribe
Posts: 3
Joined: March 8th, 2021, 12:20 pm

Re: SDLPop retropie controller - shift

Post by megasuperlexa »

Norbert wrote: March 8th, 2021, 4:57 pm
Try applying the following two changes, and then restart SDLPoP:
1. Add a new file gamecontrollerdb.txt in the SDLPoP directory, with in it (source):

Code: Select all

03000000790000002601000011010000,My SNES Controller,a:b1,b:b2,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b9,x:b0,y:b3,platform:Linux,
2. Edit SDLPoP.ini, to remove (just) the semicolon from the line:

Code: Select all

;gamecontrollerdb_file = gamecontrollerdb.txt
(For this to work, you'll need "<program> --version" to say v1.21 or newer.)
Huge THANKS it worked!! (my X became SHIFT)
I guess this must be included by default because the controller is by no means exclusive... they go 10-12 bucks on Ali :mrgreen: but very handy.

Thanks again your instructions were super clear and accurate.
User avatar
Norbert
The Prince of Persia
The Prince of Persia
Posts: 5746
Joined: April 9th, 2009, 10:58 pm

Re: SDLPop retropie controller - shift

Post by Norbert »

megasuperlexa wrote: March 8th, 2021, 7:55 pmit worked
Great. :)
David
The Prince of Persia
The Prince of Persia
Posts: 2850
Joined: December 11th, 2008, 9:48 pm
Location: Hungary

Re: SDLPop retropie controller - shift

Post by David »

megasuperlexa wrote: March 8th, 2021, 12:30 pm I tried switching between keyboard\joystick modes - did not notice any diff, what are they for? my controller works in both modes, as well as my keyboard.
megasuperlexa wrote: March 8th, 2021, 4:15 pm Also I am still curious about "Joystick mode" vs "Keyboard mode" as there is no visible diffirence :?
Since version 1.18, SDLPoP automatically switches to keyboard or joystick/gamepad mode if there is input from the corresponding device.
As a result, Ctrl+K and Ctrl+J are now redundant.
Post Reply