diff --git a/docs/toolchain.md b/docs/toolchain.md index d7e810d..0348d9c 100644 --- a/docs/toolchain.md +++ b/docs/toolchain.md @@ -59,7 +59,7 @@ Starter configurations marked verified were exercised by the Foundry's automated - World check: `pwsh -File tools/check-world.ps1` validates the tile data saved by the smoke test. - Split check: `pwsh -File tools/check-split.ps1` runs VICE headless for 20,000,000 cycles. It logs the raster line and cycle of the three mode writes at `split_store` (src/status.inc) every frame and requires them to start between line 210 cycle 53 and line 210 cycle 64. That window was measured by building with split delays 6-12 under `+autostart-delay-random`: starts at 210:40-51 damaged the last map line, starts at 211:0-11 damaged the first text line, and 210:50-211:1 were clean; the shipped delay starts at 210:55-61 at y-scroll 3. Tracepoints on the `key_row_*` instructions fake "no key" and then scroll down three cells and back up (phase byte at $CFF0, VICE conditional checkpoints), so every map y-scroll value 0-7 is split and checked against the same window (y-scroll 2, a bad line at line 210, uses a shorter delay; measured 2026-12-03: starts at 210:58-64). It also checks that a split happens every frame, that after each status update the people-in-view digits equal the number of people whose dot is at least partly in the visible window (computed by the script from the people table and view), and (coarsely) the screenshot colours at the boundary. Output: `build/check-split/`. - Key check: `pwsh -File tools/check-keys.ps1` runs eight headless VICE scenarios. VICE's monitor cannot press keys, so tracepoints on the `key_row_*` instructions in `src/keys.inc` replace the port B row bits with those of held keys (`r a = `). It checks `scroll_dx`/`scroll_dy` for no key, right, left (right SHIFT), down, up (left SHIFT), down-right and up-left, and that SPACE held from frame 60 regenerates exactly once. Output: `build/check-keys/`. -- Scroll check: `pwsh -File tools/check-scroll.ps1` runs three headless VICE scenarios (edges, middle, reverse). Each is a list of phases: fake held keys (as in the key check) until a condition on the program state is met at `people_moved` (a `move_frame` value or a view position). The phase number is kept in free RAM at $CFF0 and moved on by VICE conditional checkpoints (`trace exec $addr if (@cpu:$addr == $nn) && (...)`: the parentheses are needed, and checkpoints at one address run in the order they were defined, so phase changes are defined latest first). Every frame it logs the phase, view, scroll registers, visible buffer, flip state and people table. It checks that the view moves at most one pixel per axis per frame and only in the direction of the keys read the frame before, stays inside 0-336 x 0-244 and stops at the edges, that $D011/$D016 match the fine scroll, that no frame is missed and the people update ends before raster 55, and reports frames where a held key did not move the view (stalls, allowed up to 40). At the end it compares the buffer about to be shown, byte for byte, with a fresh render of the world at the view plus the people's dots (and, when a flip is pending, the shown buffer with the previous frame's dots). Any monitor script error fails the check. Output: `build/check-scroll/`. +- Scroll check: `pwsh -File tools/check-scroll.ps1` runs three headless VICE scenarios (edges, middle, reverse). Each is a list of phases: fake held keys (as in the key check) until a condition on the program state is met at `people_moved` (a `move_frame` value or a view position). The phase number is kept in free RAM at $CFF0 and moved on by VICE conditional checkpoints (`trace exec $addr if (@cpu:$addr == $nn) && (...)`: the parentheses are needed, and checkpoints at one address run in the order they were defined, so phase changes are defined latest first). Every frame it logs the phase, view, scroll registers, visible buffer, flip state and people table. It checks that the view moves at most one pixel per axis per frame and only in the direction of the keys read the frame before, stays inside 0-336 x 0-244 and stops at the edges, that $D011/$D016 match the fine scroll, that in every frame the shown buffer is complete and built for the view's cell (a half-rebuilt buffer on screen tears the top of the map), that nothing is stored into the shown buffer's map screen RAM or bitmap during raster 55-210, that no frame is missed and the people update ends before raster 55, and reports frames where a held key did not move the view (stalls, allowed up to 40). At the end it compares the buffer about to be shown, byte for byte, with a fresh render of the world at the view plus the people's dots (and, when a flip is pending, the shown buffer with the previous frame's dots). Any monitor script error fails the check. Output: `build/check-scroll/`. - People check: `pwsh -File tools/check-people.ps1` runs VICE headless (NTSC, warp) for 40,000,000 cycles, logs the people table at the `people_moved` hook every frame through the monitor, and checks that all 16 people stay inside the world, never stand on a water or stone tile, move at most one pixel per step, all move, and start spread over the four screens. It also saves both bitmap buffers before people are drawn and at the last frame, and checks byte for byte that the hidden buffer is the clean map plus the current dots and the visible buffer is the clean map plus the previous frame's dots (no trails, no damaged terrain). It checks that the main loop never misses a frame (x64sc NTSC frame: 263 lines x 65 = 17,095 cycles) and that each people update ends before raster line 51, the first visible line. Output: `build/check-people/`. ### How the smoke test works diff --git a/docs/verification-status.md b/docs/verification-status.md index fb11c59..866595a 100644 --- a/docs/verification-status.md +++ b/docs/verification-status.md @@ -16,11 +16,13 @@ manual = `pending`, `confirmed by user ()`, `problem reported ():