TGViewer
C++ - Reddit C++ - Reddit @r_cpp · 229 subscribers
Post #24439 20
BEEP-8 – compile C++20 to a tiny ARM ROM and run it instantly in a browser

I’ve been working on a small side project called BEEP-8 and thought some C++ folks might find it interesting.

The idea is:

* you write C++20 (subset) against a small SDK
* cross-compile it to a ROM image for a tiny ARM-based “console”
* open a URL, point it at the ROM, and it runs immediately in your browser on PC or phone

No native install, no WASM glue – the browser is just hosting an emulator for a fixed virtual machine.

What the target looks like

* CPU: software ARMv4-ish core, integer-only, fixed 4 MHz “virtual clock”
* Memory: 1 MB RAM, 1 MB ROM
* Video: simple 8/16-bit-style VDP (tilemaps, sprites, 16-colour PICO-8-compatible palette)
* Audio: small tone/noise APU
* Input: buttons plus touch-friendly controls so it works on phones as well

From user code you never touch JS or WebGL; it just looks like a small C++ API plus some memory-mapped registers.

Toolchain / workflow

1. `git clone` [`https://github.com/beep8/beep8-sdk.git`](https://github.com/beep8/beep8-sdk.git)
* The repo includes a preconfigured GNU Arm GCC cross-compiler in-tree, so there’s no separate compiler install.
2. Write code in C or C++20 (integer-only environment) using the SDK headers.
3. Run `make` to build a `.b8` ROM for the virtual ARM machine.
4. Open [`https://beep8.org`](https://beep8.org) (or your own self-hosted copy), select the ROM, and it boots and runs in the browser at 60 fps.

Links

* Live console + sample games/demos (runs directly in the browser): [https://beep8.org](https://beep8.org)

SDK, toolchain, and source (MIT-licensed):
[https://github.com/beep8/beep8-sdk](https://github.com/beep8/beep8-sdk)

I’m curious what the C++ community thinks about this kind of target:

* Would you consider it a useful little playground for teaching C/C++ or for jams / prototypes?
* Any obvious changes you’d make to the API or build flow to make it nicer for C++ developers?
* If you were writing a small C++ library or demo for a 4 MHz ARM with 1 MB RAM, what would you build first?

Happy to answer questions or share more details about the toolchain and runtime if anyone’s interested.

https://redd.it/1pgjqdl
@r_cpp
More from @r_cpp
  1. Oct 11, 2026VKRT NES Remaster — an open-source C++20 NES emulator with an observation-driven remasteri…
  2. Oct 11, 2026Right way to test async code https://redd.it/1x2wqgz @r_cpp
  3. Oct 10, 2026Yantra: an LALR(1) parser generator for C++23 Yantra: an LALR(1) parser generator for C++2…
  4. Oct 10, 2026Opting in, and back out again https://dryperspective.github.io/posts/opting-in/ https://re…
  5. Oct 10, 2026I’m Building Bursztyn OS a Polish Operating System From Scratch I’m building Bursztyn OS,…
  6. Oct 9, 2026std::variant, operator== and pattern matching I was thinking, wouldn't adding equality com…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →