25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
2.1KB

  1. # {{PROJECT_NAME}} - Toolchain
  2. ## Decision
  3. - Language: **{{LANGUAGE_TITLE}}**
  4. - Recipe: **{{RECIPE_TITLE}}** (`{{RECIPE_ID}}`)
  5. - Build location: {{BUILD_LOCATION}}
  6. - Foundry recommendation: {{TOOLCHAIN_RECOMMENDED}}
  7. {{TOOLCHAIN_OVERRIDE}}
  8. ### Why this language
  9. {{TOOLCHAIN_REASONS}}
  10. ### Alternatives considered
  11. {{TOOLCHAIN_ALTERNATIVES}}
  12. ## Tools
  13. {{TOOLS_TABLE}}
  14. 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.
  15. ## Commands
  16. | Purpose | Command |
  17. |---|---|
  18. | Check prerequisites | `pwsh -File tools/check-prereqs.ps1` |
  19. | Build all targets | `pwsh -File tools/build.ps1` |
  20. | Build one target | `pwsh -File tools/build.ps1 -Target <id>` |
  21. | Run in VICE | `pwsh -File tools/run.ps1 -Target <id>` (add `-Video ntsc` to try NTSC) |
  22. | Automated smoke test | `pwsh -File tools/smoke.ps1` (exit 0 pass, 1 fail, 2 missing tool, 3 manual only) |
  23. ## Target settings and verification status
  24. {{CATALOG_VERIFIED}}
  25. {{TARGET_COMMANDS}}
  26. ### How the smoke test works
  27. `tools/smoke.ps1` starts VICE with `-config <temp file> -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/<target>/`. 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.
  28. Smoke hooks in the source:
  29. - 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.
  30. - ca65 programs: the `smoke_ready` label.
  31. - BASIC programs: `POKE 679,1` (BASIC V2) or `POKE 3071,1` (BASIC 7.0) after the first screen is drawn.
  32. ## Assumptions still to verify
  33. {{TOOLCHAIN_VERIFY}}
  34. {{ON_COMMODORE}}
  35. ## Sources
  36. {{SOURCES}}

Powered by TurnKey Linux.