James Randall Musings on software development, business and technology.
MacBeeb
Annhexation gameplay — a hex-based 4X strategy map
Annhexation Steam demo

A turn-based 4X strategy game you can complete in an evening — built from scratch with a custom WebGPU engine and eight civilisations. Try the demo on Steam.

You can download MacBeeb from GitHub, where the source is too.

MacBeeb is a BBC Micro emulator written for the Mac in Swift. I’ve spent a lot of time in the BBC Micro’s internals through my Thrust and Exile projects, and I wanted an emulator that felt like a proper Mac app: native, fast, at home on macOS 26, and with the tools I actually wanted when I was taking those games apart.

At its heart is a cycle-exact machine. The 6502 is a port of Tom Seddon’s simulator from b2: each tick is one bus cycle, so the rest of the machine - the VIAs, the 6845, the video ULA, the sound chip, the disc controllers - sees every access at the moment it really happens, 1MHz stretching and all. It’s checked against the standard CPU test suites, against results measured on real hardware, and cycle by cycle against perfect6502, a transistor-level simulation of the chip.

It emulates the Model A, Model B, B+ 128K, Master 128 and Master Compact, with the 8271 and 1770 disc controllers (including the Watford and Opus boards), DFS and ADFS discs, and cassettes that load at real speed through the serial ULA and ACIA, decoding the tones as the hardware does. The ROMs are built in, so it works out of the box.

It also emulates the second processors. Alongside the 6502 Second Processor there’s the Z80, which boots straight into CP/M; the Master 512, an 80186 board that runs DOS Plus and, with the emulated AMX mouse, GEM; and the ARM Evaluation System, built around ARM1, Acorn’s first ARM processor. The Z80 and the Master 512 start with their system discs in the drive, so each is a menu choice away from booting.

For development there’s a debugger with breakpoints, watchpoints, conditions and log points, a trace and a profiler, for both the 6502 and the Z80. Because the machine keeps a rewind history, you can also step and continue backwards: find where something went wrong, then go back to see how it got there. It talks the Debug Adapter Protocol, so it works from VS Code with symbols from ca65, and BeebAsm is built in.

It’s also built to be driven by AI agents. An MCP server lets a coding assistant boot the machine, type into it, read the screen as text, take screenshots, load discs, use the mouse and drive the debugger - on its own headless machine, or the one running in the app. Everything in between is there too: save states, a rewind timeline, video recording and screenshots.

MacBeeb needs macOS 26, runs natively on Apple silicon and Intel, is notarised and keeps itself up to date. It’s open source under the GPL v3.

Elite, the 6502 Second Processor version, in flight

Exile

Repton

The debugger, stopped in Exile’s main loop, with the profiler’s heat on the busiest instructions

Annhexation gameplay — a hex-based 4X strategy map
Annhexation Steam demo

Forty-two years after I first started programming, I built a 4X strategy game from scratch — a custom WebGPU engine, eight civilisations, and a game you can complete in an evening. Try the demo on Steam.

Built by James Randall — tool-maker, system builder, and occasional cyclist. Walking the hills with my four-legged friend when I'm not building worlds.
© 2025