From 1bcc2a4dcb49f326595fe1cb51540e87ef800334 Mon Sep 17 00:00:00 2001 From: Daniel Covington Date: Thu, 3 Dec 2026 08:09:34 -0500 Subject: [PATCH] M1.2: generate seeded terrain world --- docs/manual-tests.md | 8 +- docs/toolchain.md | 3 +- docs/verification-status.md | 2 +- project.json | 18 ++- src/main.s | 10 +- src/world.inc | 277 ++++++++++++++++++++++++++++++++++++ tools/check-world.ps1 | 59 ++++++++ 7 files changed, 364 insertions(+), 13 deletions(-) create mode 100644 src/world.inc create mode 100644 tools/check-world.ps1 diff --git a/docs/manual-tests.md b/docs/manual-tests.md index bc13571..fba111d 100644 --- a/docs/manual-tests.md +++ b/docs/manual-tests.md @@ -36,7 +36,13 @@ with shoreline edges and corners. The black roads meet at crossings and bend around a small loop on the right. Check that roads join without gaps and that the terrain shows only its intended colours. -Once the generated world is displayed: +At M1.2, run `pwsh -File tools/smoke.ps1 -Target c64` and then +`pwsh -File tools/check-world.ps1 -ShowMap`. Expect `MAP READY` in the smoke +output and an 80×50 grid in the terminal. Look for water (`~`), stone (`#`), +grass (`g`), trees (`T`), land (`.`), and four road intersections (`+`). +The VICE window still shows the static tile test view for this task. + +Starting at M1.3, when the generated world is displayed: Steps: 1. Wait for the map view. diff --git a/docs/toolchain.md b/docs/toolchain.md index 674cf6e..9f8535d 100644 --- a/docs/toolchain.md +++ b/docs/toolchain.md @@ -53,8 +53,9 @@ Starter configurations marked verified were exercised by the Foundry's automated - Emulator: `x64sc -ntsc -autostart build/land-map-64.prg` - Smoke test: `pwsh -File tools/smoke.ps1 -Target c64`. It runs VICE headless for 30000000 cycles, saves memory when the program reaches `smoke_ready`, and checks: - Title in the status mirror - - Terrain tile view reached its ready point (`TILES READY` at M1.1) + - World generation reached its ready point (`MAP READY`) - C64 KERNAL reset vector at $FFFC (machine is in C64 mode) +- World check: `pwsh -File tools/check-world.ps1` validates the tile data saved by the smoke test. ### How the smoke test works diff --git a/docs/verification-status.md b/docs/verification-status.md index fc546f1..49496b3 100644 --- a/docs/verification-status.md +++ b/docs/verification-status.md @@ -10,7 +10,7 @@ manual = `pending`, `confirmed by user ()`, `problem reported ():