A ready-to-build CMOC 6809 cross-compiler toolchain for Vectrex game development.
Based on CMOC by Pierre Sarrazin (v0.1.98) with an
enhanced C-wrapper library for Vectrex BIOS functions. You write C, you get a .bin
ROM image that runs in an emulator or on real hardware.
The toolchain consists of:
- cmoc — the CMOC C compiler, targeting the Motorola 6809
- lwtools — assembler, linker and archiver (lwasm, lwlink, lwar)
- stdlib — Vectrex headers and precompiled libraries, including the C wrapper for the Vectrex BIOS
- examples/ — small, ready-to-build sample programs
Pick your platform:
| Platform | Instructions | Notes |
|---|---|---|
| macOS | README-MACOS.md | Prebuilt download (Apple Silicon), or build with ./build-macos.sh |
| Windows | README-WINDOWS.md | Prebuilt download available, or build with MSYS2 |
Once installed, compiling a Vectrex game looks the same everywhere:
cmoc --vectrex -I <toolchain>/stdlib -L <toolchain>/stdlib -o game.bin game.c
The initial version of the C-Wrapper library was written by Johan Van den Brande. This version contains a subset of the most important BIOS calls with naming conventions compatible with gcc6809 to simplify porting code between toolchains.
- Provide a full working C wrapper for Vectrex BIOS in CMOC
- Use similar names as gcc6809 to simplify porting
- Include joystick abstraction (controller.h functionality) directly in the wrapper
Progress: Tracking spreadsheet
- CMOC compiler by Pierre Sarrazin — Homepage
- lwtools by William Astle — Homepage
- C-Wrapper originally by Johan Van den Brande
- VIDE by Malban — GitHub (recommended Vectrex IDE)
- Many thanks to the Vectrex community for help, examples, and documentation
See the file COPYING. Note that it does not apply to the files
under cmoc/src/usim-0.91-cmoc.
All changes and additions by Roger Boesch are free to use, change and distribute
without any limitations.