The Atari 680x0 C99 Compiler

rg-cc

A modern optimising C99 compiler targeting the Motorola 680x0 and Atari ST/Falcon: low cycle counts, compact binaries, and fast standalone builds.

Loading release…

Key features

  • 680x0-native codegen: Multi-pass SSA optimiser and code generator built around the 68k instruction set, addressing modes, split register file, and cycle timings.
  • C99 compliance: Full C99 language and library support for hosted and freestanding targets.
  • Whole-program LTO: Merges translation units at link time for cross-file inlining, dead-code removal, and interprocedural register allocation.
  • Fastcall register ABI: Passes arguments in registers to reduce stack traffic, while interoperating with standard stack-based objects and libraries.
  • Full 680x0 & FPU targets: Emits tuned code from stock 68000 to 68060, with 68881/68882 FPU and fast software floating-point support.
  • Drop-in Atari dialect support: Compiles existing GCC, VBCC, Lattice C, AHCC, and Pure C codebases.
  • Single-binary toolchain: Compiler, assembler, archiver, and linker in one executable, emitting ELF objects, static libraries, or bootable .TOS/.PRG binaries.
  • Embedded RBS build engine: Compiles across all host CPU cores in memory without Makefiles or external build tools.
  • Pure C .PRJ support: Builds classic Atari .PRJ projects natively on Windows, macOS, and Linux with automatic path and library resolution.
  • Verified on real Atari software: Tested against Atari ST and Falcon games, demos, tools, and libraries.
rg-cc; direct single-step compilation to Atari TOS
$ rg-cc -O2 main.c player.c sound.c -o game.tos
 
  █▀▀▄ █▀▀▀
  █▀█▄ █ ▀█   RESERVOIR GODS
  ▀  ▀ ▀▀▀▀   rg-cc 0.8.3 · C99 compiler for 680x0 / Atari
 
   Compiling main.c (O2, fastcall, 68000)
   Compiling player.c (O2, fastcall, 68000)
   Compiling sound.c (O2, fastcall, 68000)
     Linking game.tos
    Finished game.tos (17,672 B · text 14,320 · data 2,400 · bss 8,192) in 64ms
$ 

Quick start

rg-cc -O2 main.c player.c sound.c -o game.tos     # direct compilation to TOS
rg-cc -c -O2 --opt-size game.c -o game.o          # size-optimised object
rg-cc -c -O3 --lto *.c -o engine.o                # whole-program LTO
rg-cc -c --emit-depfile -I include/ src/*.c       # generate Makefile depfiles
rg-cc --emit-headers include/                     # export built-in headers

Verify

After unzipping, check the extracted files (the archive includes SHA256SUMS):

sha256sum -c SHA256SUMS

Learn more