[SOLVED] PPSSPP does not recognize my gamepad
-
Hello there, guys! So, I wanted to give ppsspp a go to see if it gets better frame rates than lr-ppsspp. However, it simply doesn't detect my gamepad, a Logitech PS3 generic controller that works basically anywhere else. I tried hitting Esc to see if there was anything there to force detection, but couldn't find anything. Am I missing something? Is there any .cfg file I could fiddle with to force detection?
-
(In case it's relevant: it's a wired PS3 controller, and I've never needed the ps3controller package. Still, I tried installing it too, to no avail.)
-
This post is deleted! -
So, I'm still stuck with this, thought I'd give it one last try. Any ideas on how to mess with ppsspp's controller detection?
-
I decided to turn my Pi upside down to find out why the heck PPSSPP wasn't recognizing my gamepad. Below is a little journal of my journey, describing what I had to do to fix things. Please, bear in mind that I'm a Linux newbie, and this is a tutorial of sorts intended to those just as new to it as me.
So, a little background information: I use a PS3 Logitech ChillStream (identified as a “PS3/USB Corded Gamepad”) with my RPi. This nice little gamepad works perfectly with everything EmulationStation throws at me... Except for ppsspp (not to be confused with lr-ppsspp: it DOES work with that core). It wasn't an in-emulator mapping problem, the damn thing didn't even recognize button pressing when I tried binding stuff.
I've read elsewhere that controller recognition was a hardcoded part of PPSSPP, and that you couldn't do much to make it see a controller it isn't seeing. But after two months of trying to find documentation and workarounds for this, I decided that I had enough. I would look under the hood and see how PPSSPP detected controllers myself.
By navigating to
/opt/retropie/emulators/ppsspp/assets
, I was pleasantly surprised to see that there is actually a list of recognized controllers insidegamecontrollerdb.txt
, presented in a very readable way. For sure, my gamepad wasn't listed there, under either of its names. I had at last pinpointed the source of my problems.Searching around the web, I found out that the file originates from a tool in SDL2 , a development library that provides low level access to audio, keyboard, mouse, joystick and graphics hardware via OpenGL. That tool is called
controllermap
. Luckily, if you originally set up your RPi using NOOBS to install a full Raspbian OS, you'll already have the required SDL2 library lying around (in my case,libsdl2-dev-2.0.6
). If you don't have that library, just find and install it. The library won't come withcontrollermap
, though, so you'll have to compile and install it yourself.If you're a newbie like me, that will sound more complicated than it really is. I followed the guide found here, but in easier terms (remember to substitute the version number for the version of the SDL2 library you have):
- Compile
controllermap
1.1.wget https://www.libsdl.org/release/SDL2-2.0.6.tar.gz
1.2.tar -zxvf SDL2-2.0.6.tar.gz
1.3.cd SDL2-2.0.6/test
1.4../configure
1.5.make controllermap
1.6.mv controllermap ../..
1.7.cd ../..
- Connect the gamepad.
./controllermap
- Does it output anything? If yes, great, you can keep going! For the next step, you'll have to drop out to CLI (that is, you can't be running a terminal in an x environment)
./controllermap 0 > out.txt
- You should see an illustration of a gamepad on the screen now. IF YOU DON'T, JUST PRESS ESC. Check the error log, you must be missing some image files. In my case, they were
axis.bmp
,button.bmp
andcontrollermap.bmp
. Just fetch those files inSDL2-2.0.6
's/test/
folder and put them right next tocontrollermap
, at/home/pi
, and try again. Press your controller's equivalent of the highlighted buttons. If you want to skip a button, press the spacebar. The results will be saved toout.txt
. - You may now remove the SDL2 source and object files:
7.1.rm -r SDL2-2.0.6
7.2.rm SDL2-2.0.6.tar.gz
If you run into any problems, please refer to the guide linked above. Anyways, you can now check the output file in
/home/pi
and see that it has the same syntax as the PPSSPP'sgamecontrollerdb.txt
. Now all you have to do is copy the line inout.txt
and paste it at the end ofgamecontrollerdb.txt
, and ppsspp should now see your controller! Bear in mind that you need to have root privileges to editgamecontrollerdb.txt
, so justsudo leafpad
and browse for the file. You will probably need to rebind the controls in the emulator, but that is extremely straightforward!Well hope this can be of use to someone who was just as lost as I was. For reference, the following is the output line from my
controllermap
. If you happen to use the same gamepad that I do, just go ahead and paste it in yourgamecontrollerdb.txt
and ignore everything else I said! =D030000006d040000d1ca000011010000,PS3/USB Corded Gamepad,platform:Linux,a:b1,b:b2,x:b0,y:b3,back:b8,start:b9,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7,
- Compile
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.