# {{PROJECT_NAME}} - Toolchain ## Decision - Language: **{{LANGUAGE_TITLE}}** - Recipe: **{{RECIPE_TITLE}}** (`{{RECIPE_ID}}`) - Build location: {{BUILD_LOCATION}} - Foundry recommendation: {{TOOLCHAIN_RECOMMENDED}} {{TOOLCHAIN_OVERRIDE}} ### Why this language {{TOOLCHAIN_REASONS}} ### Alternatives considered {{TOOLCHAIN_ALTERNATIVES}} ## Tools {{TOOLS_TABLE}} Check them with `pwsh -File tools/check-prereqs.ps1`. Lookup order for each tool: its environment variable (folder or folder\bin), then `PATH`, then common install folders. ## Commands | Purpose | Command | |---|---| | Check prerequisites | `pwsh -File tools/check-prereqs.ps1` | | Build all targets | `pwsh -File tools/build.ps1` | | Build one target | `pwsh -File tools/build.ps1 -Target ` | | Run in VICE | `pwsh -File tools/run.ps1 -Target ` (add `-Video ntsc` to try NTSC) | | Automated smoke test | `pwsh -File tools/smoke.ps1` (exit 0 pass, 1 fail, 2 missing tool, 3 manual only) | ## Target settings and verification status {{CATALOG_VERIFIED}} {{TARGET_COMMANDS}} ### How the smoke test works `tools/smoke.ps1` starts VICE with `-config -default -warp -minimized -sounddev dummy`, so your own VICE settings are never read or changed. It gives the monitor a command file (`-moncommands`) that sets non-stopping tracepoints on the program's ready point. When the program reaches it, VICE saves memory with `bsave` into `build/smoke//`. VICE exits after `-limitcycles` cycles and writes `-exitscreenshot`; that is the normal way the run ends, so VICE's own exit code is ignored. The script then compares the saved memory with the expected screen text (as VIC-II/VDC screen codes) and mode bytes. Smoke hooks in the source: - cc65 C programs: `smoke_capture()` and `smoke_ready()` in `src/smoke.c`. 80-column builds copy the first VDC rows into `smoke_probe[]`, because VDC memory is not visible to the CPU. - ca65 programs: the `smoke_ready` label. - BASIC programs: `POKE 679,1` (BASIC V2) or `POKE 3071,1` (BASIC 7.0) after the first screen is drawn. ## Assumptions still to verify {{TOOLCHAIN_VERIFY}} {{ON_COMMODORE}} ## Sources {{SOURCES}}