Getting a 2026 C++20 codebase onto a 2000 Mac
- Retro68's GCC targets PEF/XCOFF. Its linker gave GCC's weak common symbols (template statics, inline variables) zero-length sections, so unrelated variables silently shared memory. A post-compile pass rewrites every object file and the toolchain's own libraries.
- There are no threads on Classic Mac OS. Mutexes, futures and the job pool became single-threaded stand-ins, and the game yields to the OS between frames.
- The Memory Manager stalls under hundreds of thousands of small blocks, so malloc is replaced by a size-class allocator. The tables use the original game's limits (a 256×256 map, 255 rides, 10,000 entities) instead of OpenRCT2's far larger ones.
Making it fast enough
- The game draws in 8-bit with RCT's own palette loaded as the hardware colour table, so no pixel conversion happens anywhere. Palette animation (water) goes straight into the Rage 128's colour table.
- When the view pans, the video card moves the picture on screen and only the newly exposed strip is painted.
- OpenRCT2 rebuilds and sorts the visible scene every frame. This build keeps a sorted list of map elements for each 32-pixel column, along with a picture of that column with only the map drawn. When a guest moves, the dirty rectangle is restored from the picture, and only the guest and the scenery in front of it are redrawn. Before this, 92% of the per-frame drawing was scenery behind something that moved.
- RCT Classic's Ogg Vorbis sounds are converted ahead of time to formats the Sound Manager decodes itself, one Sound Manager channel per sound.
Testing
- A big-endian PowerPC Linux build, run under qemu-user, must produce the same state digests as the x86 build after thousands of ticks. The G3 produces them too.
- Every timing comes from the real iMac. QEMU's G3 is 3.5× faster than the hardware, so it was never used to judge speed.
Data No game files are included. A script converts your own RollerCoaster Tycoon 2 or RCT Classic files, optionally with RCT1, into pack files the Mac reads.
Installing: download RCT.bin, openrct2.pak and title.pak from the GitHub release, convert your own game files with tools/make_packs.py, and copy everything to the Mac. If the Mac runs AgentChat, a coding agent can do the install for you over the network.
whiskthecat