Author Archives: smittytone

About smittytone

Tech Author and Writer

First look: Pimoroni’s PicoSystem hackable handheld games console

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.

PSP = PicoSystem by Pimoroni

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.

Remove the four screws for a peek inside

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.

A very neatly laid out circuitboard

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 start() and loop(), init() and 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.

Accessible SWD header! Hurrah!

The 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 CMakeLists.txt setting.

The 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.

T’other side of the board: the display, controls and battery charge LED

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.

The PicoSystem costs £58.50 from Pimoroni and other suppliers. The SDK is available on GitHub.

Clive Sinclair (1941-2021) Part three — resurgam

In part one we saw how the young Clive Sinclair created Sinclair Radionics — twice — and built it into a successful business that launched hi-fi products in the 1960s and the first ever pocket calculator in 1972. In part two, we investigated the genesis of the Radionics microcomputer. Read on to learn what occurred when Radionics finally went under, and how the ZX80 came about…

Clive Sinclair in 1981
Continue reading

Clive Sinclair (1940-2021) Part two — Radionics’ last, great hope: the microcomputer

In part one, we saw how the young Clive Sinclair created Sinclair Radionics — twice — and built it into a successful business that launched hi-fi products in the 1960s and the first ever pocket calculator in 1972, but soon suffered badly as its digital watch efforts foundered and competition crushed its calculator sales. Read on to learn how Radionics met its end, but (almost) gave birth to a new microcomputer…

Clive Sinclair in 1983
Continue reading

Clive Sinclair (1940-2021) Part one — how it all began

Clive Sinclair formed the first company to bear his name in 1961 while he was a 21-year-old electronics journalist. He had received no formal education in the subject, but as a highly intelligent autodidact, he had developed a passion for electronics during his teens. He also had an entrepreneurial bent, and even in his youth spotted a business opportunity in designing and selling kits to fellow electronics enthusiasts.

Sir Clive Sinclair (1940-2021) in 1985
Continue reading

How to build a cellular IoT device with the Raspberry Pi Pico — part two, the code

In part one, I described an IoT demo setup based on the Raspberry Pi Pico and the Waveshare Pico SIM7080G Cat-M1/NB-IoT cellular add-on board, and wrote about some of the design goals. Now it’s time to implement that design with some C++ code: a host application, drivers for the modem, the HT16K3-based display and the MCP9808 temperature sensor, and some third-party libraries to decode incoming commands formatted as JSON and encoded in base64 for easy SMS transmission.

Pico + Waveshare cellular module = compact IoT development board
Continue reading

How to build a cellular IoT device with the Raspberry Pi Pico — part one, the hardware

To turn the Raspberry Pi Pico into an Internet of Things (IoT) device, you need to add wireless connectivity. I thought I’d give it go, to see how straightforward it might be to connect the Pico to cellular networks and have a bare-metal app written in C++ run the show. For a modem, I chose to use Waveshare’s suitably sized Pico SIM7080G Cat-M1/NB-IoT.

Raspberry Pi Pico piggybacking on the Waveshare cellular board
Continue reading

Spectrum, Oric, Dragon… even Enterprise — demanded designs come to smittytone’s retro tech T-shirt store

You asked for it and you got it: following the ZX80 and ZX81 keyboard layout T-shirts comes my ZX Spectrum version — giving you the chance to steal a march on April 2022’s 40th anniversary!

Wear your ‘dead flesh‘ with pride. ZX Spectrum keyboard shirt modelled by yours truly
Continue reading

PreviewApps updated

All three of my PreviewApps — PreviewMarkdown, PreviewCode and PreviewYaml — got big updates this week. Headline features: significantly improved font, style and colour selection, across-the-range stability improvements, and faster PreviewCode theme preview presentation.

Continue reading