A programming language for the TRS-80 Color Computer

Files
README.md

Dodo #

Dodo is a programming language for the TRS-80 Color Computer (CoCo).

Setup #

The easiest way to try out Dodo is via an emulator.

macOS #

  1. Install XRoar
  2. Add xroar to your PATH
    sudo ln -s /Applications/XRoar.app/Contents/MacOS/xroar /usr/local/bin/xroar
    
  3. Install the required ROMs:
    cargo run -- setup
    
    This downloads bas13.rom, extbas11.rom, and disk11.rom from the Color Computer Archive into ~/.xroar/roms, verifying their checksums. It's idempotent; use --check to report problems without downloading anything, or --force to re-download.
  4. Run one of the examples:
    cargo run -- run examples/01_hello.dodo
    
    This builds a DECB disk image (build/01_hello.dsk), attaches it as drive 0, and types LOADM"01HELLO":EXEC into BASIC for you. Pass --bin to skip the disk image and autorun the .bin directly. To build artifacts without launching the emulator, use cargo run -- build examples/01_hello.dodo (a .bin) or pass --dsk for a disk image.

Testing #

Unit tests run with plain cargo test. If xroar is on your PATH (and the ROMs above are installed), this also runs the end-to-end suite in crates/dodo/tests/e2e/, which executes compiled programs headlessly on an emulated CoCo 2 and asserts on the resulting memory contents.

A cycle-count report for the programs in crates/dodo/tests/e2e/perf/ (with optional per-program budgets) is available via:

cargo test --test e2e perf_report -- --ignored --nocapture

See the doc comment in crates/dodo/tests/e2e.rs for the harness protocol and how to add new test programs.