BlinkyMcGoo [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=41185 Mapping controls to a joystick <p>I've got Pico-8 running nicely on my Raspberry Pi through Retropie/Emulation Station now, but there's one minor annoyance.</p> <p>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.</p> <p>I see there's a file called <strong>sdl_controllers.txt</strong>, containing the text <em>// add SDL2 game controller mappings to this file</em>, but that's ALL it says. There are no clues as to what it wants that file to contain in order to map anything. <strong>config.txt</strong> also includes these lines:</p> <p><em>// Custom keyboard scancodes for buttons. player0 0..6, player1 0..5<br /> button_keys 0 0 0 0 0 0 0 0 0 0 0 0 0 </em></p> <p>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.</p> <p>Can anyone help?</p> https://www.lexaloffle.com/bbs/?tid=36050 https://www.lexaloffle.com/bbs/?tid=36050 Fri, 29 Nov 2019 01:07:11 UTC Installing Pico-8 on Retropie for dummies <p>Does anyone actually have this working? If so, can you just tell us in simple language what we need and where? This much-linked &quot;tutorial&quot; is completely incomprehensible to normal people <a href="https://www.lexaloffle.com/bbs/?tid=3935">https://www.lexaloffle.com/bbs/?tid=3935</a> and none of the others I've found are any better.</p> <p>Here's where I'm at so far:</p> <p>I've copied the <strong>pico-8</strong> folder you get into <strong>/home/pi</strong>, since after much searching I eventually figured out that's where it was meant to go.<br /> I've got a file in that <strong>/home/pi/pico-8</strong> folder called <strong>+Start PICO-8.sh</strong>, whose contents are this:</p> <div> <div class=scrollable_with_touch style="width:100%; max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre>#!/bin/bash pushd &quot;/home/pi/pico-8&quot; ./pico8 -splore popd</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>I have absolutely no idea what any of that means, I just copied and pasted it from some of the various gibberish tutorials.</p> <p>I've added the following to es_systems.cfg:</p> <div> <div class=scrollable_with_touch style="width:100%; max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre> &lt;system&gt; &lt;name&gt;pico8&lt;/name&gt; &lt;fullname&gt;PICO-8&lt;/fullname&gt; &lt;path&gt;/home/pi/pico-8&lt;/path&gt; &lt;extension&gt;.sh .p8 .p8.png .SH .P8 .P8.PNG&lt;/extension&gt; &lt;command&gt;/opt/retropie/supplementary/runcommand/runcommand.sh 0 &quot;/home/pi/pico-8/pico8 -splore&quot;&lt;/command&gt; &lt;platform&gt;pico8&lt;/platform&gt; &lt;theme&gt;pico8&lt;/theme&gt; &lt;/system&gt;</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>I've added a couple of game files (in <strong>.p8.png</strong> 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 <strong>/home/pi/RetroPie/roms/pico8</strong> as well just for laffs.)</p> <p>And I added a theme in <strong>/opt/retropie/configs/all/emulationstation/themes/carbon/pico8</strong>, and an EMULATORS.CFG in <strong>/opt/retropie/configs/pico8</strong>, 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:</p> <div> <div class=scrollable_with_touch style="width:100%; max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre>pico-8 = &quot;/home/pi/pico-8/pico8 %ROM%&quot; default=&quot;pico-8&quot;</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>Now when I boot EmulationStation the Pico-8 core shows up, but the only file listed is <strong>+Start PICO-8.sh</strong>. When I try to run it I get dumped back to the menu, with this RUNCOMMAND.LOG:</p> <div> <div class=scrollable_with_touch style="width:100%; max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre>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</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>The permission settings for the pico-8 folder are <strong>0755</strong>. One of the tutorials said something about <em>&quot;a+x&quot;</em> 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.</p> <p>Then I tried changing the permissions on the <strong>pico8</strong> executable file itself to 0777, and got this RUNCOMMAND.LOG instead:</p> <div> <div class=scrollable_with_touch style="width:100%; max-width:800px; overflow:auto; margin-bottom:12px"> <table style="width:100%" cellspacing=0 cellpadding=0> <tr><td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> <td background=/gfx/code_bg0.png> <div style="font-family : courier; color: #000000; display:absolute; padding-left:10px; padding-top:4px; padding-bottom:4px; "> <pre>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 </pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div> <p>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:</p> <img style="margin-bottom:16px" border=0 src="https://www.lexaloffle.com/bbs/files/41185/wpi.jpg" alt="" /> <p>And I'm wary of typing the suggested command because I haven't a clue what it might do.</p> <p>All I want to do is run it like a normal ES core, with a list of &quot;ROMs&quot; (the .p8.png files) that run when I click them. Any useful thoughts gratefully received.</p> https://www.lexaloffle.com/bbs/?tid=36031 https://www.lexaloffle.com/bbs/?tid=36031 Tue, 26 Nov 2019 02:44:03 UTC