I’ve had my eye on the PicoSystem, the Raspberry Pi RP2040-based games console platform, for some time. It surfaced back in the Spring and was long marked “coming soon”. But now it’s here, mine showed up yesterday while I was at work, and this morning I’ve been messing about with it.
My interest in this gadget was piqued back when I was thinking about how to port Phantom Slayer to the RP2040. It seemed like an ideal platform for my new-hardware take on a 1982 3D shooter that I’ve loved since first playing it on my Dragon 32. In the end, I had to build the game out of a Raspberry Pi Pico and a monochrome OLED I had in my spares box.
What most appeals about the PicoSystem — I must stop typing ‘PicoStation’ every time… — is that nice 1.5-inch, 240 x 240 IPS LCD that does 16-bit colour, and a proper button layout that’s hard to achieve with a bag of switches and a solderless breadboard. It’s all wrapped in an aluminium casing that packs in a 3.7V, 525mAh rechargeable battery, a USB-C port for charging and program transfer, and a piezo speaker.
So just a nicely tooled Pico add-on then? No, it’s more than that. The RP2040 microcontroller is built in, so you don’t even have buy and fit a Pico. However, there are four large screws on the back so it’s dead easy to get inside, and you might very well want to do just that.
Within resides the aforementioned battery, the RP2040 and a generous 16GB of external Flash, all on a neatly labelled circuitboard. But the real reason to crack open the casing is that Pimoroni has left the RP2040’s SWD (Serial Wire Debug) points exposed, so you can, with care, remove the face plate too — undo two more, smaller screws — and solder on a header so you can do real-time debugging during development.
Being equipped with an RP2040, the PicoSystem has native UF2 support, so transferring compiled code is just a matter of holding down the X button, the power key and slotting in a computer-connected USB-C cable. “Just” a matter? It’s harder than it sounds. You need two hands: one to hold down the buttons — guitar chord fashion — and the older to fit the cable. Too awkward for me, I think, which is why I shall certainly go down the SWD route.
Alongisde the hardware, there’s a decent C++ SDK which has been designed to do most of the work for you. You write your game around a trio of pre-defined functions. There are the equivalents of Arduino’s
update(), and these are joined by a third structural function,
draw(). It’s not hard to guess what each is for, and I’ll be using them to remake Phantom Slayer in colour.
update() is called with a fixed 10ms periodicity, but that’s applied as a variable in the source code so it can be changed if you need trigger the function less frequently. It’d be nice if it was a
draw() function is called as often as the system can call it: up to but not further than 60fs, apparently, or every 16ms. Blitting a full 57,600 pixels (112.5KB at two bytes per pixel) to the ST7789 TFT display takes 12ms, so you’re going to have to consider timing if you’re writing anything but a simple game. Fortunately, there’s a pixel double mode — for an effective resolution of 120 x 120 — if you need to reduce the time your game spends drawing and blitting the picture.
By default the RP2040 is overclocked to 250MHz. The SDK doesn’t appear to take advantage of the MCU’s second core, so there’s an extra resource you can make use of.
You don’t interact with the peripherals directly: the SDK abstracts all of that away for you, which will make it easier to port code when the PicoSystem 2 eventually launches as it inevitably will. The SDK uses the RP2040‘s Programmable IO to squirt the contents of its graphics buffer down to the display.
Right, that’s the platform — now it’s time to start porting my Phantom Slayer C over to the PicoStation SDK. When it’s done I’ll post an update on how it went, and share the code in my GitHub repo.