LOCAL AND AUTOMATED BUILDS

AMY COMPILER CLI

Compile an ordinary .alexis source with the same compiler and Z80 assembler used by Amy Studio.

node tools/amyc.mjs game.alexis --output --asm --opt balanced

AUTHORITATIVE HELP

Ask the compiler you are running.

The command below always describes the exact options and values supported by your checkout:

node tools/amyc.mjs --help

OUTPUTS

Choose only the artifacts you need.

OptionResult
--output [path]ColecoVision ROM or ADAM binary; --rom remains an alias.
--asm [path]Generated Z80 assembly.
--optimized-asm [path]Assembly after optimizer passes.
--symbols [path]Debugger symbols.
--report-json pathMachine-readable result and diagnostics.
--report-jr-candidatesList user-ASM jp instructions that could become one-byte-smaller jr instructions, including protected and applied candidates.

When an optional path is omitted, the file is written beside the source. Output directories are created automatically. Compilation and RAM/ROM reporting still run when no output option is selected.

PROFILES

Optimization is explicit.

Select a profile with --opt value. The default is balanced; legacy --opt on means aggressive.

ValuePurpose
autoSafe for Tiny Sound sources, Balanced otherwise.
offNo assembler optimization; useful for debugging.
safeConservative local optimization.
balancedRecommended size and safety balance; CLI default.
aggressiveMore speculative optimization; validate the ROM.
experimentalLeast conservative; requires runtime testing.

TARGETS AND MEMORY

ColecoVision and ADAM builds.

--target value: colecovision-cartridge, colecovision-megacart, adam-native-program, adam-disk, adam-data-pack.

--memory-profile id: colecovision-cartridge, colecovision-megacart, colecovision_legacy_sdcc, adam-eos-application, adam-os7-eos-drivers.

ADAM medium: --medium dsk or --medium ddp. The single-source CLI emits the program payload; complete multifile media packaging remains an Amy Studio project operation.

PROJECT OPTIONS

Assets, hardware, and symbols.

--project-dir dirResolve @project/... and project ASM includes.
--hardware idRepeatable: sgm, sgm1, adam-sound-enhancer, adamlink, eve-serial, orphanware-serial, micro-serial, microinnovations-serial.
--define symbolAdd a compile-time symbol; repeat as needed.

A .amy.json manifest targeting colecovision-megacart builds one complete banked ROM. It may combine an Amy fixed bank with Amy, Z80 assembly, and binary-asset switchable banks; exported symbols and call bank N, Name imports are linked automatically.

ADVANCED AND DIAGNOSTIC

Explicit controls, never hidden defaults.

--disable-opt-pass idDisable one optimizer pass; repeatable and intended for compiler investigation.
--experimental-record-ixEnable experimental record-array IX code generation.
-h, --helpPrint the exact reference belonging to the installed compiler.

--report-jr-candidates reports but does not alter ordinary asm {}. Use asm relax {} to permit proven branch shortening and .timed / .endtimed to protect selected timing-sensitive regions.

Unknown options, invalid values, missing values and extra positional arguments are rejected. Exit code 0 means success, 1 means compilation or assembly failure, and 2 means invalid command-line use. The complete CLI reference includes copy-ready examples.