P#70346 2019-11-29 01:07 ( Edited 2019-11-29 02:09)
I've got Pico-8 running nicely on my Raspberry Pi through Retropie/Emulation Station now, but there's one minor annoyance.
It's a bit of a faff to have to reach over to the keyboard to hit Ctrl-R to start a game or Windows+Q to exit back to ES. It'd be really handy to be able to map those commands to a couple of the spare buttons on my arcade stick.
I see there's a file called sdl_controllers.txt, containing the text // add SDL2 game controller mappings to this file, but that's ALL it says. There are no clues as to what it wants that file to contain in order to map anything. config.txt also includes these lines:
// Custom keyboard scancodes for buttons. player0 0..6, player1 0..5
button_keys 0 0 0 0 0 0 0 0 0 0 0 0 0
but again, heaven knows what that means. KEYCONFIG is no good, it only lets you redefine the two Pico controller action buttons, not the other ones on my arcade stick.
Can anyone help?
Does anyone actually have this working? If so, can you just tell us in simple language what we need and where? This much-linked "tutorial" is completely incomprehensible to normal people https://www.lexaloffle.com/bbs/?tid=3935 and none of the others I've found are any better.
Here's where I'm at so far:
I've copied the pico-8 folder you get into /home/pi, since after much searching I eventually figured out that's where it was meant to go.
I've got a file in that /home/pi/pico-8 folder called +Start PICO-8.sh, whose contents are this:
#!/bin/bash pushd "/home/pi/pico-8" ./pico8 -splore popd
I have absolutely no idea what any of that means, I just copied and pasted it from some of the various gibberish tutorials.
I've added the following to es_systems.cfg:
<system> <name>pico8</name> <fullname>PICO-8</fullname> <path>/home/pi/pico-8</path> <extension>.sh .p8 .p8.png .SH .P8 .P8.PNG</extension> <command>/opt/retropie/supplementary/runcommand/runcommand.sh 0 "/home/pi/pico-8/pico8 -splore"</command> <platform>pico8</platform> <theme>pico8</theme> </system>
I've added a couple of game files (in .p8.png format) into the same folder, because I couldn't see anything telling the Pi to look anywhere else for them. (Though I put them in /home/pi/RetroPie/roms/pico8 as well just for laffs.)
And I added a theme in /opt/retropie/configs/all/emulationstation/themes/carbon/pico8, and an EMULATORS.CFG in /opt/retropie/configs/pico8, even though nobody mentioned doing one, just because that's what you do for every other emulator in Retropie and in case it helped somehow. Contents of the file:
pico-8 = "/home/pi/pico-8/pico8 %ROM%" default="pico-8"
Now when I boot EmulationStation the Pico-8 core shows up, but the only file listed is +Start PICO-8.sh. When I try to run it I get dumped back to the menu, with this RUNCOMMAND.LOG:
Parameters: Executing: /home/pi/pico-8/pico8 /home/pi/pico-8/+Start\ PICO-8.sh /opt/retropie/supplementary/runcommand/runcommand.sh: line 1002: /home/pi/pico-8/pico8: Permission denied
The permission settings for the pico-8 folder are 0755. One of the tutorials said something about "a+x" but I haven't a clue what that means, so I just checked all the X columns. When that didn't work I tried the blunt instrument of making it 0777 but it made no difference.
Then I tried changing the permissions on the pico8 executable file itself to 0777, and got this RUNCOMMAND.LOG instead:
Parameters: Executing: /home/pi/pico-8/pico8 /home/pi/pico-8/+Start\ PICO-8.sh /home/pi/pico-8/pico8: error while loading shared libraries: libwiringPi.so: cannot open shared object file: No such file or directory
I searched for that and eventually found out that I should be trying to install something called wiringpi, but when I tried that I got this:
And I'm wary of typing the suggested command because I haven't a clue what it might do.
All I want to do is run it like a normal ES core, with a list of "ROMs" (the .p8.png files) that run when I click them. Any useful thoughts gratefully received.