BerryBasiC turns a Raspberry Pi 4 into a BASIC machine

Oct 31, 2026 Last reply: 15 hours ago 2 Replies
Jump to replies (2)

The whole thing started from a feeling: the maker wanted to bring back the moment a home computer powered up straight to a BASIC prompt, complete with that old nervousness about typing your first line and watching it fail. There is even a joke in there about a program falling over on line 1020, which tells you exactly which era this is chasing.



What the maker actually built is a bare-metal operating system for the Pi 4 with its own interpreter running natively on the hardware, no underlying OS in between. Around that core there is real substance: GPIO access from the language, SD card reading and writing through ordinary BASIC commands, image loading, a graphics library described as somewhat usable, and support for TTF fonts. There is also a path to compile native C with tcc and run the result directly on the machine.



The detail that grabbed me is that DOOM runs on it. The boot text reports real Pi hardware with PWM audio and PCIe active, mounts an SD filesystem, and brings up a USB keyboard and mouse through the VL805 xHCI controller before starting the interpreter. A demo session plays the Knee-Deep in the Dead episode on Hurt Me Plenty, with movement, pistol shots and an armour pickup, then drops back to the shell for a quick cls. The project is open source with build and run instructions on GitHub, plus a readable manual.



Two open ends worth noting. It is in beta and the maker discourages production use, and the question of which interpreter dialect sits underneath has not been answered yet. Whether the same code runs on a Pi 3B also remains unconfirmed.


The tcc route is the choice that stands out to me. Letting a BASIC environment compile native C and execute it on the metal gives the machine an escape hatch beyond interpreted speed, and it fits the spirit of old micros where BASIC and machine code lived side by side. The trade-off is that native code running bare metal can take the whole system down with it, which in beta is arguably part of the charm.

A port to the Pi 3B would be my suggestion. Since nobody has confirmed whether the bare-metal code runs on that board, getting it booting there would show how tightly it is tied to Pi 4 hardware and would make the project reach a lot of boards sitting in drawers. If the PCIe-dependent parts are isolated, the rest of the system might travel well.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required