From 91ec2f04f9b1ae1e00c928f7e6212085dbabcab7 Mon Sep 17 00:00:00 2001 From: Daniel Covington Date: Thu, 3 Dec 2026 09:13:19 -0500 Subject: [PATCH] Spec: R3 people drawing while scrolling; move view-relative people to M3.3 Approved by the user 2026-12-03. Co-Authored-By: Claude Opus 5.5 --- docs/milestones.md | 4 ++-- docs/spec.md | 3 ++- docs/verification-status.md | 6 ++++-- project.json | 16 +++++++++------- 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/docs/milestones.md b/docs/milestones.md index 5a5a255..ea5fd42 100644 --- a/docs/milestones.md +++ b/docs/milestones.md @@ -52,7 +52,7 @@ Requirements: R5, R6, R3, R2 |---|---|---|---|---| | M3.1 | Keyboard matrix reading for the cursor keys with SHIFT, held-key repeat. | R5 | Scroll direction from keys | Manual test MT3.1 | | M3.2 | Split screen: raster interrupts switch to text below a 20-row map and back at the top of the frame; status text screen and ROM font copy in both banks; status lines with the people-in-view count. | R6, R1 | Steady 20-row map with 5 status lines below | Manual test MT3.3 | -| M3.3 | Fine scroll via $D016/$D011 in the 38-column, 20-row map area; rebuild the hidden buffer from tiles over 8 frames and flip on wrap; stop at world edges; show the view position in the status area. | R5, R3, R6 | Smooth scrolling across the world under a fixed status area | Manual tests MT3.1, MT3.2 and MT3.3 | -| M3.4 | Draw people relative to the view; measure the frame budget with a border-colour timing bar. | R2, R3, R5, R6 | People stay aligned with terrain while scrolling; budget measured | Manual tests MT3.2 and MT3.3 | +| M3.3 | Fine scroll via $D016/$D011 in the 38-column, 20-row map area; rebuild the hidden buffer from tiles over 8 frames and flip on wrap; stop at world edges; show the view position in the status area; draw people relative to the view (in the shown buffer during vertical blank while a rebuild runs). | R5, R3, R6, R2 | Smooth scrolling across the world under a fixed status area, people in place | Manual tests MT3.1, MT3.2 and MT3.3 | +| M3.4 | Check that people stay aligned with the terrain over long scrolling runs; measure the frame budget with a border-colour timing bar. | R2, R3, R5, R6 | People stay aligned with terrain over long runs; budget measured | Manual tests MT3.2 and MT3.3 | Manual verification: see docs/manual-tests.md section M3. diff --git a/docs/spec.md b/docs/spec.md index 5b7ac7e..5e34577 100644 --- a/docs/spec.md +++ b/docs/spec.md @@ -5,6 +5,7 @@ Approved by Daniel Covington on 2026-12-03. Changes to this file follow AGENTS.m Changes approved by the user since then: - 2026-12-03: NTSC frame budget corrected to 17,095 cycles. - 2026-12-03: 5-line status area below a 20-row map (R6; R1 and R5 updated; milestone M3 gained the split-screen task). +- 2026-12-03: R3 reworded for scrolling: while a scroll rebuild runs, people are drawn in the shown buffer during vertical blank; drawing people relative to the view moved from M3.4 to M3.3. ## Summary @@ -91,7 +92,7 @@ Capabilities: smooth-animation ### R3 - Flicker-free double buffering, partial redraw (must) -People are drawn into the hidden bitmap buffer, which is then flipped into view during vertical blank. Each update restores only the bitmap bytes under people at their previous positions in that buffer and draws them at their new positions; the rest of the map is never redrawn. +While the view is still, people are drawn into the hidden bitmap buffer, which is then flipped into view during vertical blank. While the view scrolls, the hidden buffer is being rebuilt for the next scroll step, so people are restored and drawn in the shown buffer during vertical blank, before the first map line, and the rebuilt buffer is flipped in at the scroll step. Each update restores only the bitmap bytes under people at their previous positions in that buffer and draws them at their new positions; apart from the scroll rebuild, the rest of the map is never redrawn. Acceptance criteria: - [R3.1] No flicker or tearing of the dots is visible in VICE at normal speed diff --git a/docs/verification-status.md b/docs/verification-status.md index 9569e4d..78a7d80 100644 --- a/docs/verification-status.md +++ b/docs/verification-status.md @@ -16,11 +16,13 @@ manual = `pending`, `confirmed by user ()`, `problem reported ():