duduke [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=57092 PICO-8 on RetroFlag GPi Case <p>I've tried a few guides to try and make a quick booting PICO-8 cartridge for RetroFlag GPi Case (<a href="https://www.retroflag.com/GPi-CASE.html">https://www.retroflag.com/GPi-CASE.html</a>), most of them seem outdated and not completely easy IMHO.</p> <p>I'm pretty familiar with LAKKA (<a href="https://www.lakka.tv/">https://www.lakka.tv/</a>) - a retroarch distro that supports plenty of devices and is based on OpenELEC, so uses a very lightweight quick booting goodness.</p> <p>So, here goes a small guide:</p> <ol> <li>Download a compatible LAKKA image for the GPi-Case: (<a href="https://le-builds.lakka.tv/GPICase.arm/Lakka-GPICase.arm-3.2.img.gz">https://le-builds.lakka.tv/GPICase.arm/Lakka-GPICase.arm-3.2.img.gz</a>) OR a later one if this post gets too old.</li> <li>&quot;burn&quot; the image to a micro-sd (16Gb should be more than enough).</li> <li>Put it back in the GPi-Case and let it boot at least once so that it can resize the partition.</li> <li>Once booted and in retroarch, goto Settings -&gt; Services -&gt; Enable SSH</li> <li>Still in Settings, goto Wifi, and connect to your local Wifi.</li> <li>Go back to the main menu, and select Information -&gt; Network to view the IP address you got.</li> <li>Login via SSH from your PC (root/root).</li> <li>Run the following:<br /> <code>mkdir /storage/roms/pico-8</code><br /> cd /storage/roms/pico-8</li> <li>Download the pico-8 pi binary (if you bought it, you should have the URL):<br /> 'wget <a href="https://www.lexaloffle.com/dl/xxxxxx/pico-8_0.2.2c_raspi.zip">https://www.lexaloffle.com/dl/xxxxxx/pico-8_0.2.2c_raspi.zip</a>'</li> <li>run this command: <code>unzip ./pico-8_0.2.2c_raspi.zip</code></li> <li>create a runscript for pico-8:<br /> <code>nano /storage/roms/pico-8/run_pico8.sh</code></li> <li>paste the following into the script: <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 SDL_VIDEO_GL_DRIVER=/usr/lib/libGLESv2.so SDL_VIDEO_EGL_DRIVER=/usr/lib/libGLESv2.so /storage/roms/pico8 -splore -preblit_scale 6 -draw_rect 32,0,256,240 -pixel_perfect 0</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div></li> <li>create a systemd service file for pico-8:<br /> <code>nano /storage/.config/system.d/pico8.service</code></li> <li>paste the following into the systemd service: <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>[Unit] Description=Pico-8 After=gpicase-safeshutdown.service ConditionKernelCommandLine=!pico=0 [Service] Environment=HOME=/storage ExecStart=/storage/roms/pico-8/run_pico8.sh KillMode=killall pico8 TimeoutStopSec=10 Restart=always RestartSec=2 StartLimitInterval=0 [Install] WantedBy=multi-user.target</pre></div></td> <td background=/gfx/code_bg1.png width=16><div style="width:16px;display:block"></div></td> </tr></table></div></div></li> <li>Enable the service <code>systemctl enable pico8.service</code></li> <li>poweroff the gpi, and insert the micro-sd back into your PC.</li> <li>disable retroatch by editing cmdline.txt and adding the following to the end of the boot= line:<br /> <code>retroarch=0</code></li> <li>That's it. put the micro-sd back in the cart, and it should boot straight into PICO-8 splore mode.</li> </ol> <p>If in the future, you want to switch back to retroarch:<br /> remove the retroarch=0 and add pico8=0 to the end of the boot= line in the cmdline.txt file.</p> https://www.lexaloffle.com/bbs/?tid=44060 https://www.lexaloffle.com/bbs/?tid=44060 Sun, 01 Aug 2021 19:33:13 UTC