Explorar el Código

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 <noreply@anthropic.com>
main
Daniel Covington hace 3 días
padre
commit
91ec2f04f9
Se han modificado 4 ficheros con 17 adiciones y 12 borrados
  1. +2
    -2
      docs/milestones.md
  2. +2
    -1
      docs/spec.md
  3. +4
    -2
      docs/verification-status.md
  4. +9
    -7
      project.json

+ 2
- 2
docs/milestones.md Ver fichero

@@ -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.

+ 2
- 1
docs/spec.md Ver fichero

@@ -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


+ 4
- 2
docs/verification-status.md Ver fichero

@@ -16,11 +16,13 @@ manual = `pending`, `confirmed by user (<date>)`, `problem reported (<date>): <n
| M2.2 Per-buffer saved-byte lists: restore the bytes under people from two frames ago, draw people in view, flip in vertical blank. | passed (2026-12-03, `pwsh -File tools/build.ps1`; `pwsh -File tools/smoke.ps1`; `pwsh -File tools/check-world.ps1`; `pwsh -File tools/check-people.ps1`: 2,117 frames, 0 missed flips, update done by raster line 26 at the latest, both final bitmaps byte-exact against clean map plus dots) | confirmed by user (2026-12-03) |
| M3.1 Keyboard matrix reading for the cursor keys with SHIFT, held-key repeat. | passed (2026-12-03, `pwsh -File tools/build.ps1`; `pwsh -File tools/smoke.ps1`; `pwsh -File tools/check-world.ps1`; `pwsh -File tools/check-people.ps1`; `pwsh -File tools/check-keys.ps1`: 8 of 8 scenarios, SPACE held = 1 regeneration) | confirmed by user (2026-12-03) |
| 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. | passed (2026-12-03, `pwsh -File tools/build.ps1`; `pwsh -File tools/smoke.ps1` incl. status text in both banks; `pwsh -File tools/check-world.ps1`; `pwsh -File tools/check-people.ps1`; `pwsh -File tools/check-keys.ps1`; `pwsh -File tools/check-split.ps1`: 955 splits in 955 frames, writes start at 210:55-61, digits right in every frame) | confirmed by user (2026-12-03) |
| 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. | not run | pending |
| M3.4 Draw people relative to the view; measure the frame budget with a border-colour timing bar. | not run | pending |
| 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). | not run | pending |
| M3.4 Check that people stay aligned with the terrain over long scrolling runs; measure the frame budget with a border-colour timing bar. | not run | pending |

## Notes

- 2026-12-03: Spec change approved by the user: R3 reworded for scrolling (people drawn in the shown buffer during vertical blank while a scroll rebuild runs), and drawing people relative to the view moved from M3.4 to M3.3. Acceptance criteria unchanged.

- 2026-12-03 (M3.2): A7 partly checked in VICE: with the map at y-scroll 3, the split's mode writes land in the measured border window every frame (tools/check-split.ps1). Under vertical fine scroll it is not checked yet (M3.3). Fixed while doing M3.2: the temporary M3.1 border indicator wrote $D020 every frame, which showed a single light grey pixel in the bottom border (consistent with the VIC-II grey-dot effect of a colour-register write mid-line); it now writes only when the colour changes, and the pixel is gone from the smoke and split-check screenshots. tools/check-people.ps1 now compares only the 20 map rows of each bitmap.

- 2026-12-03: Spec change approved by the user: 5-line status area below a 20-row map (new R6, R1 and R5 updated, assumption A7 added). Old M3.2 is now M3.3 and old M3.3 is now M3.4; the new M3.2 is the split screen. M0-M3.1 results are unaffected.


+ 9
- 7
project.json Ver fichero

@@ -11,7 +11,8 @@
"Round 3: water and stone block people (user said \"yes block\"; stone included by the agent's reading, to confirm at review). Map layout fully procedural. User said \"just cursor keys to control\"; what the keys do is being clarified.",
"Round 4: cursor keys scroll a bigger world (2x2 screens), pixel-smooth scrolling in the first release (user chose it over block steps), people spread over the world, SPACE = new world. Destination left at the default.",
"Spec approved 2026-12-03 without changes; D1 (stone blocks people) left open at its default.",
"2026-12-03 change (approved): 5-line status area below a 20-row map via a raster split (R6); status readout in upper-case ROM text, light red; split task inserted as M3.2, old M3.2/M3.3 renumbered M3.3/M3.4."
"2026-12-03 change (approved): 5-line status area below a 20-row map via a raster split (R6); status readout in upper-case ROM text, light red; split task inserted as M3.2, old M3.2/M3.3 renumbered M3.3/M3.4.",
"2026-12-03 change (approved): R3 reworded so that 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."
]
},
"project": {
@@ -98,7 +99,7 @@
},
{
"title": "Flicker-free double buffering, partial redraw",
"text": "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.",
"text": "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.",
"priority": "must",
"acceptance": [
"No flicker or tearing of the dots is visible in VICE at normal speed",
@@ -468,25 +469,26 @@
},
{
"id": "M3.3",
"text": "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.",
"text": "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).",
"requirements": [
"R5",
"R3",
"R6"
"R6",
"R2"
],
"outcome": "Smooth scrolling across the world under a fixed status area",
"outcome": "Smooth scrolling across the world under a fixed status area, people in place",
"check": "Manual tests MT3.1, MT3.2 and MT3.3"
},
{
"id": "M3.4",
"text": "Draw people relative to the view; measure the frame budget with a border-colour timing bar.",
"text": "Check that people stay aligned with the terrain over long scrolling runs; measure the frame budget with a border-colour timing bar.",
"requirements": [
"R2",
"R3",
"R5",
"R6"
],
"outcome": "People stay aligned with terrain while scrolling; budget measured",
"outcome": "People stay aligned with terrain over long runs; budget measured",
"check": "Manual tests MT3.2 and MT3.3"
}
],


Cargando…
Cancelar
Guardar

Powered by TurnKey Linux.