Read all steps before proceeding with the installation. Feedback is appreciated!
- If you want to avoid the headache of Step 4, I recommend using a Pi or other Linux computer to write the installation image to the SD card! It can be the same Pi you use for the Lite installation, you just need to switch SD cards to change OSs.
Hello everyone,
I haven't seen any tutorials for doing exactly this so I thought it would be helpful if there was a guide for anyone who specifically just wants a little portable machine that launches PICO-8 after booting, and without using Retropie or a desktop environment. This installation won't have a super fast boot like PICOPi (https://github.com/keints/picopi) but it will have online functionality and will be a great starting point for a physical fantasy console project.
The whole process takes about 45 minutes to complete
Things you will need:
- The latest PICO-8 for Raspberry Pi zip: https://www.lexaloffle.com/games.php?page=updates
- Raspberry Pi (any model) setup with a display and keyboard
- SD card or microSD card (depending on the model of Pi) at least 16GB
- SD card reader
-
Windows/macOS/Linux computer with internet access (this can also be a Pi, in fact it can even be the same Pi if you have two SD cards!)
- Optional: USB thumb drive to transfer files from your PC to the Pi
- Optional: Second SD card to install a desktop version of Raspberry Pi OS to transfer files to your "Lite" installation
Step 1: Download & install the latest Raspberry Pi OS Lite image
Step 2: Setup Raspberry Pi OS
Step 3: Update Raspberry Pi OS and install PICO-8 dependencies
Step 4: Copy and extract your PICO-8 zip to your Pi user's home directory
Step 5: Create a startup script
Troubleshooting
-
No sound
If there is no sound, go back to theraspi-config
tool and selectSystem Options
and thenAudio
and make sure audio is being routed to the correct output device. -
The command line doesn't show the usual prompt or display PICO-8 after logging in
Usually this is because PICO-8 starts and bash runs in the foreground. Try pressing Ctrl+C and wait to see if the command prompt appears after a few moments. I've found that adding thesleep 15
command to the first line of the startup script avoids this issue. If anyone knows what causes it any info would be appreciated! - A number of SDL-related errors are displayed, but no PICO-8
Happens because PICO-8 starts too early after login. Press Ctrl+C to terminate the process and try adding thesleep 15
command before yourecho "Starting PICO-8..."
command in the startup script.
A few notes
- While the goal is to effectively create a physical fantasy console, remember that the Raspberry Pi is still a real computer with an OS that is connected to the internet. It's good to upgrade packages every so often to fix issues and keep your system secure. If you've completed this tutorial, you should now know how to check for updated software packages and how to install them. If this sounds like a hassle, I would recommend considering keeping your installation offline. Or you can learn how to automate the process of keeping your system up to date. The world is your oyster!
Hope this was helpful! If this is your first experience with a Pi or Linux, I can promise you it isn't normally this much work to get an OS setup. You can always install the desktop version of Raspberry Pi OS (or any other OS) and use it just like you would use a Windows or macOS computer. I hope you'll continue to explore and learn how Linux works, maybe you can write a better guide than this one! See if you can figure out how to get the Pi to shutdown by itself after shutting down PICO-8 ;)
one note: no need to use sudo
to run chmod
on a file you own! also, the goal of chmod +x
is to let us run a script with ./start-pico8
rather than sh start-pico8
! this is great because it means you don’t need to know if an executable is a shell script, a python program, a native binary: it’s just an executable and you run it like all executables :]
but are you sure you can run reboot
without sudo
?
Hey @KidColeco! Glad the tutorial worked out. I don't have a Pi or TV with composite input to test it right now but I'm pretty sure you can find the toggle for composite out in the raspi-config
tool somewhere! I'll edit this comment after I can check.
Hey again @merwok, I can't find a package that's named just libsdl2
on Raspberry Pi OS bookworm repos. However, there is a package named libsdl2-2.0-0
. Following this guide but replacing libsdl2-dev
with libsdl2-2.0-0
will result in a message that says ** FATAL ERROR: Unable to create window
, but if you subsequently install the packages that libsdl2-dev
installs PICO-8 boots right up. I'm not really sure what is fixing the issue but I can't get it to work without libsdl2-dev
. As for the composite out, I'll have an opportunity to investigate that this weekend and see if there's something I'm missing that would enable that functionality.
[Please log in to post a comment]