Log In  

Next Thing Co. now has an alpha test image of the next version of the PocketCHIP software (4.4 alpha) that includes Pico-8 1.9. If you don't mind installing an alpha version (which may have bugs that cause data loss), it's easy to give it a try. It's easy enough that you probably don't even need instructions but there's one bit that I found by guessing so I thought I'd write it up.

You'll need a computer running Chrome, a USB-to-micro-USB cable, and your PocketCHIP. Ideally, the computer would be plugged into power so it doesn't lose power in the middle of the update.

  1. In Chrome, go to http://flash.getchip.com/. If this is your first time using the CHIP flash utility in Chrome, it will prompt you to install the Chrome extension. Do so.
  2. Connect PocketCHIP to your computer via the USB cable.
  3. Turn on PocketCHIP. Allow PocketCHIP to boot up to the main menu.
  4. On PocketCHIP, press the "power" on-screen button. In the power menu, select "Flash Software."
  5. In the Chrome window, start the flasher, then follow the prompts. Ignore the instructions involving a paperclip and "FEL" mode; you accomplished this with the menu option.
  6. Leave everything connected until the flasher utility reports success.
  7. Unplug PocketCHIP and allow it to reboot.

Start Pico-8 and notice it displays the 0.1.9 version number during start-up. Enjoy!

P#32191 2016-11-03 23:40


I just got a Pimoroni Picade, an arcade mini-cabinet for use with small board computers like the Raspberry Pi. It's a great match for PICO-8!

See also a short video I posted to Twitter.

The cabinet is $240 / £180, not including the Raspberry Pi and power supply. The cabinet goes together with a screwdriver (no soldering) and is fun and easy to build. (Be sure to refer to the assembly video in addition to the written instructions.) The result is solid and gorgeous.

I used a RaspPi 3 for my Picade. I strongly recommend the USB audio adapter that Adafruit sells, a major improvement in sound quality over connecting the Picade speakers directly to the RaspPi headphone jack. RaspPi 3 has built-in wireless Internet, but if you're using an older model you'll also want a RaspPi-compatible USB wifi dongle.

RetroPie is an easy-to-use software package of the best retro-gaming projects for the Raspberry Pi. It includes emulators for many platforms (arcade and home computers) as well as media center software, and a master menu called Emulation Station that you can manipulate using just the joystick and buttons so you don't need a keyboard connected once it's all set up.

Setting up RetroPie for Picade

I won't go through the RetroPie set-up procedure in detail. There are plenty of guides on the web, including at Adafruit. What follows are a few notes from my build.

Download the RetroPie image, in my case "retropie-v3.8.1-rpi2_rpi3.img".

Format an appropriately-sized SD card, at least 8 GB. I used a 32 GB card, which takes a while to format.

Write the image to the SD card. I have a Mac laptop and I used the command line to do this, as follows:

  1. Determine which disk device (e.g. "disk2") is the SD card.
diskutil list
  1. Unmount the SD card, substituting "disk2" with your actual device name.
diskutil unmountDisk /dev/disk2
  1. Write the image to the SD card, substituting "rdisk2" with your actual device name with a "r" in front of it ("rdisk" instead of "disk"). This command can take a while.
sudo dd bs=1m if=retropie-v3.8.1-rpi2_rpi3.img of=/dev/rdisk2

With the SD card still connected to the laptop, edit "/boot/config.txt" (accessible on the Mac as "/Volumes/boot/config.txt"). Uncomment this line so that Picade's screen will work correctly:


Unmount the SD card then remove it from your computer. Put the SD card in the Pi, hook it all up, and supply power. It should boot to Emulation Station and let you set up the button bindings. I mapped the D-pad controls to the joystick, and took a guess at the six top, two front, and two right buttons. (The two left buttons are for the speaker volume and are not seen by the Pi.) This is easy to change later.

From Emulation Station, go into the RetroPie menu and set up wifi. You'll need a keyboard connected to the Pi to enter your wifi password.

Once wifi is set up, select "show IP" from the RetroPie menu. You can use this IP address to connect to the Pi over the wireless network, transfer files, and make config changes. To get to a remote shell from your laptop, use the "ssh" command, substituting your IP address, and enter a password of "raspberry":

ssh pi@

To copy a file to the Pi:

scp pico-8_0.1.8_arm.zip pi@

The USB audio interface needs to be configured from the command line. See Adafruit's tutorial and RetroPie's sound docs for reference. Mine came up as the CM-Headphone type, and the only config change I needed to make was to create the "/etc/asound.conf" file:

pcm.!default {
  type hw card 1
ctl.!default {
  type hw card 1

Reboot the Pi:

sudo shutdown -r now

The Emulation Station menu plays sounds, and RetroPie comes with Doom pre-installed (see the Ports system menu). Test the audio. Use the volume buttons on the left of the cabinet to adjust as needed; it may start out too quiet to hear.

PICO-8 on the Picade

You can run the Raspberry Pi version of PICO-8 with this set-up. Copy PICO-8 to the Pi and unpack it into the ~/pico-8 directory:

# (starting from your computer:)
scp pico-8_0.1.8_arm.zip pi@
ssh pi@

# (now on the RaspPi:)
unzip pico-8_0.1.8_arm.zip

On the Picade with a keyboard connected, exit Emulation Station (Menu button, Quit, Quit Emulation Station) to get a shell prompt, then run the pico8 command:

~/pico-8/pico8 -splore

Controls, fullscreen graphics, sound, and Splore over the Internet should all just work.

Launching PICO-8 from Emulation Station

Of course, it'd be better if you didn't need the command line and a keyboard to start up PICO-8, especially since Splore lets you download and play PICO-8 games using just the joystick and buttons. I wanted the ability to launch PICO-8 from Emulation Station, as in this video. It turns out this wasn't too difficult, but it involves a few steps.

I made two versions of the PICO-8 logo, one with light text and one with dark text, based on the one I made for the PICO-8 wiki (which in turn is heavily based on the official logos). You can get these here:

On the Pi, create a new pico8 theme directory for Emulation Station:

cd /etc/emulationstation
sudo mkdir themes/carbon/pico8

Copy the logo files to the Pi and move them to this directory. (You will need to use "sudo mv ..." to move the files into place.)

You also need to create a "theme.xml" file in this directory. Copy the one from .../themes/carbon/amiga/theme.xml, then edit it (such as with the "nano" editor):

sudo cp themes/carbon/amiga/theme.xml themes/carbon/pico8/theme.xml
sudo nano -w themes/carbon/pico8/theme.xml

Make these changes:

  1. Replace all instances of "./art/controller.svg" with "./../amiga/art/controller.svg".

  2. Change the logo for the main system screen, using the dark text version:
<view name="system">
  <image name="logo">
  1. Change the logo for the system detail screen, using the light text version:
<view name="basic, detailed">
  <image name="logo">

Now you need to add pico8 to the list of systems. Edit the system config file:

sudo nano -w /etc/emulationstation/es_systems.cfg

Inside <systemList>...</systemList>, add these lines:

    <extension>.sh .SH</extension>
    <command>/opt/retropie/supplementary/runcommand/runcommand.sh 0 "/home/pi/pico-8/pico8 -splore"</command>

Emulation Station expects to find a directory of game files under <path> whose names have an extension specified by <extension>, so it can list them all in its menu and launch them individually. If you really want to use this feature with PICO-8 carts (and not use Splore), you could use <extension>.p8 .p8.png</extension>, <command>/opt/retropie/supplementary/runcommand/runcommand.sh 0 "/home/pi/pico-8/pico8 %ROM%"</command>, and an appropriate <path>. Every cart you put in your cart directory will appear as a menu option in Emulation Station.

For my configuration, I just wanted Emulation Station to launch PICO-8 in Splore mode. My configuration says to look for ".sh" files in the "/home/pi/pico-8" directory and create a menu entry for each one it finds. Emulation Station will not show the system in the main menu unless there is at least one such file. I created an empty file called "/home/pi/pico-8/+Start PICO-8.sh". When I select this option from the Emulation Station menu, it runs <command>, which in this case ignores the selected menu option and just starts PICO-8 with Splore.

Another way to do this is to make "/home/pi/pico-8/+Start PICO-8.sh" a real script that starts PICO-8, like this:

pushd "/home/pi/pico-8"
./pico8 -splore

Don't forget to make the script executable:

chmod a+x "+Start PICO-8.sh"

Change the command to <command>/opt/retropie/supplementary/runcommand/runcommand.sh 0 %ROM%</command>. This runs the script itself as the command when the menu option is selected. Doing it this way lets you add more items to the PICO-8 Emulation Station menu simply by adding more scripts to /home/pi/pico-8, such as to have multiple configurations (such as a non-Splore gamedev mode) or jump straight to your favorite carts.

Reboot ("sudo shutdown -r now") and you should now have PICO-8 in your list of systems. Select the PICO-8 system, then select the "+Start PICO-8" option. PICO-8 starts in Splore mode, and you can browse the BBS, play games, and add them to your favorites all using Picade controls. You only need a keyboard connected if you want to do text searches in Splore, or if you want the ability to exit to the PICO-8 command prompt or code editor.

retropie picade

P#25959 2016-07-27 04:22


I'm happy to announce the relaunch of the Pico-8 wiki!


I've spent the last few weekends writing articles and reference material for Pico-8, including complete API and command references, a memory map (including format details), a summary of the Lua subset, and tutorials on several subjects. This is very much a rough draft and I still have a list of to-dos, missing articles, more thorough sample code with screenshots, and some stuff I want to reorganize.

But it's a wiki, so you can help! Corrections are welcome at this stage. If you want to discuss a change before making it, hit me up on Slack or use Wikia's messaging feature or just reply here. But don't be shy about changing things directly.

Let me know what you think!


Two possible points of controversy I'll mention up front:

  • I tweaked the theme colors so they're reasonably readable, matching the forum site. I'm still a bit concerned that the Pico-8 red is unsuitable for link and header text. One of my monitors apparently doesn't support sub-pixel rendering or something and blurs it all to hell, but I'm not sure how big a problem that is. I tried a bunch of options and all the others seemed to drop the Pico-8 feel of the site. Suggestions welcome.

  • The cos, sin, and atan2 articles currently use a different convention to explain the y-inversion than the official docs do. A quick survey of the Slack group led me to try and explain it as inverting the angle direction and not the sign of sin(). This works until you get to atan2, which requires inverting the dy argument to fit that model. So the choices are counterclockwise with inverted sin() result, or clockwise with inverted atan2() dy argument. Inverting a result seems less problematic than inverting an argument, so I'll probably change it back. (I already have the diagram drawn.) Feedback welcome here as well.


-- Dan


P#23100 2016-06-18 04:40


Cart [#11980#] | Copy | Code | 2015-07-28 | Link

An implementation of Conway's Game of Life cellular automata.

Wikipedia: https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life
Game of Life wiki: http://www.conwaylife.com/wiki/Main_Page

v0.1: Initial version. GoL simulation uses the screen itself for storing cell data, using the two-line buffer method, with null edges.
v0.2: Pattern library. Audible feedback. Small bug fixes and performance improvements.
v0.3: Performance improvements. Pattern placer now lets you stamp multiple copies until you cancel. Simulation displays a generation count. Small visual changes.

P#11841 2015-07-26 04:35

:: More
About | Contact | Updates | Terms of Use
Follow Lexaloffle:
Generated 2017-03-30 04:46 | 0.136s | 2097k