Bladeren bron

Spec: add 5-line status area below a 20-row map (R6)

Approved by the user 2026-12-03. Updates spec, milestones (new M3.2 split
screen; old M3.2/M3.3 become M3.3/M3.4), manual tests (MT3.3),
verification status and project.json together.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
main
Daniel Covington 3 dagen geleden
bovenliggende
commit
7572cf0181
5 gewijzigde bestanden met toevoegingen van 134 en 37 verwijderingen
  1. +22
    -2
      docs/manual-tests.md
  2. +6
    -5
      docs/milestones.md
  3. +25
    -8
      docs/spec.md
  4. +5
    -2
      docs/verification-status.md
  5. +76
    -20
      project.json

+ 22
- 2
docs/manual-tests.md Bestand weergeven

@@ -125,7 +125,7 @@ Start: `pwsh -File tools/run.ps1 -Target c64`
At M3.1 (keys only, no scrolling yet): run `pwsh -File tools/check-keys.ps1` and
expect `[PASS] all 8 key scenarios decode correctly`. Then start the program and,
while the map is shown, hold each key below for a second or two and release it.
Until M3.2 the border colour shows the direction that is held:
Until M3.3 the border colour shows the direction that is held:

| Keys held (VICE PC key) | Border |
|---|---|
@@ -143,7 +143,7 @@ moving smoothly. Tapping SPACE gives a new map; holding SPACE gives exactly one.
(Right + Up or Left + Down cannot be told apart on a real C64, because SHIFT
reverses both cursor keys; they show grey or one of the colours above.)

From M3.2:
From M3.3:

Steps:
1. Hold each cursor key (with SHIFT for up and left) until the view stops.
@@ -170,6 +170,26 @@ Expected:

Verifies: R2, R3, R5

### MT3.3: Status area (c64)

Setup: VICE x64sc, NTSC (-ntsc), warp off.
Start: `pwsh -File tools/run.ps1 -Target c64`

Steps:
1. Wait for the map view and read the text below the map.
2. Watch the boundary between map and text for 30 seconds while the dots move.
3. Tap SPACE and watch the boundary while the new map is generated and shown.
4. From M3.3: hold each cursor key and watch the text and the boundary while the map scrolls.

Expected:
- The map fills the top 20 cell rows; five lines of light red upper-case text on brown sit below it:
`LAND MAP 64`, `VIEW X 00 Y 00`, `PEOPLE IN VIEW nn OF 16`, an empty line, `CRSR SCROLL SPACE NEW WORLD`.
- The people-in-view number equals the number of dots you can count on the map.
- The boundary is a clean, steady horizontal line: no flicker, jitter, garbage characters or half-height rows.
- From M3.3: the text never moves while the map scrolls, and the VIEW X/Y values follow the scrolling.

Verifies: R6 (and the R1 view size)

## Real hardware

Optional for this release. Use these steps when hardware is available.


+ 6
- 5
docs/milestones.md Bestand weergeven

@@ -42,16 +42,17 @@ Requirements: R2, R3

Manual verification: see docs/manual-tests.md section M2.

## M3 - Pixel-smooth scrolling
## M3 - Split screen and pixel-smooth scrolling

Goal: The cursor keys scroll the view smoothly across the whole world with people kept in place.
Goal: A fixed 5-line status area sits below a 20-row map, and the cursor keys scroll the map smoothly across the whole world with people kept in place.

Requirements: R5, R3, R2
Requirements: R5, R6, R3, R2

| Task | Description | Requirements | Buildable outcome | Completion check |
|---|---|---|---|---|
| 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 | Fine scroll via $D016/$D011 in 38x24 mode; rebuild the hidden buffer from tiles over 8 frames and flip on wrap; stop at world edges. | R5, R3 | Smooth scrolling across the world | Manual tests MT3.1 and MT3.2 |
| M3.3 | Draw people relative to the view; measure the frame budget with a border-colour timing bar. | R2, R3, R5 | People stay aligned with terrain while scrolling; budget measured | Manual test MT3.2 |
| 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 |

Manual verification: see docs/manual-tests.md section M3.

+ 25
- 8
docs/spec.md Bestand weergeven

@@ -2,6 +2,10 @@

Approved by Daniel Covington on 2026-12-03. Changes to this file follow AGENTS.md section 6.

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

## Summary

A C64 program written in 6502 assembly that procedurally generates a 2x2-screen landscape world (brown land, grey stone, green grass and trees, black roads, blue water) shown as a multicolour bitmap. The cursor keys scroll the view smoothly across the world. 16 people, drawn as light red dots, wander the world but are blocked by water and stone. Two bitmap buffers are flipped each update, and only the spots where people move are redrawn.
@@ -14,7 +18,7 @@ Smallest useful version: A 2x2-screen world generated from a seed at start-up, s

## First release

A generated 2x2-screen world in multicolour bitmap mode with pixel-smooth cursor-key scrolling, 16 moving people blocked by water and stone, double-buffered partial redraw, and SPACE for a new world.
A generated 2x2-screen world in multicolour bitmap mode with pixel-smooth cursor-key scrolling, a 5-line status area below the map, 16 moving people blocked by water and stone, double-buffered partial redraw, and SPACE for a new world.

### In scope

@@ -24,6 +28,7 @@ A generated 2x2-screen world in multicolour bitmap mode with pixel-smooth cursor
- 16 people as light red dots (one multicolour pixel each), spread over the world, blocked by water and stone; only those in view are drawn
- Two bitmap buffers flipped once per update; only the bytes under people are restored and redrawn between scroll steps
- SPACE generates a new world
- A 5-line text status area below a 20-row map, using a raster split: title, view position, people in view, a spare line and key help
- NTSC timing

### Out of scope
@@ -42,7 +47,7 @@ A generated 2x2-screen world in multicolour bitmap mode with pixel-smooth cursor

| Target | Machine / mode | Display | Video | Artifact | Expected behavior |
|---|---|---|---|---|---|
| `c64` | Commodore 64 | VIC-II 40x25 text/graphics screen (C64, or C128 40-column) | ntsc | `build/land-map-64.prg` | Autostarts, shows a short generating message, then a full-screen multicolour bitmap view of the world: brown land, grey stone, green grass and trees, blue water, black roads. Light red dots move on land and roads. Cursor keys scroll the view smoothly; SPACE generates a new world. |
| `c64` | Commodore 64 | VIC-II 40x25 text/graphics screen (C64, or C128 40-column) | ntsc | `build/land-map-64.prg` | Autostarts, shows a short generating message, then a multicolour bitmap view of the world (20 rows): brown land, grey stone, green grass and trees, blue water, black roads, with 5 lines of status text below it. Light red dots move on land and roads. Cursor keys scroll the view smoothly; SPACE generates a new world. |

### Dual-target and mode notes

@@ -63,7 +68,7 @@ Each criterion is observable. Criteria IDs (for example R1.2) are referenced by

### R1 - Generated 2x2-screen world (must)

At start-up the program generates a world of 2x2 screens (80x50 cells of 4x8 multicolour pixels) from a seed. The generator decides the layout, shapes and counts of features; every world contains brown land, grey stone, green grass and trees, blue water and black roads that connect to each other. The view shows one screen-sized window of it in multicolour bitmap mode.
At start-up the program generates a world of 2x2 screens (80x50 cells of 4x8 multicolour pixels) from a seed. The generator decides the layout, shapes and counts of features; every world contains brown land, grey stone, green grass and trees, blue water and black roads that connect to each other. The view shows a 40x20-cell window of it in multicolour bitmap mode, above the status area (R6).

Acceptance criteria:
- [R1.1] After autostart in VICE (x64sc, NTSC) the map view appears within 15 seconds
@@ -107,7 +112,7 @@ Capabilities: keyboard-input

### R5 - Pixel-smooth scrolling (must)

Holding a cursor key scrolls the view across the world one hires pixel per frame in that direction, using the VIC-II fine-scroll registers ($D016, $D011) in 38-column/24-row mode. Every 8 pixels the view shifts by one cell: the hidden buffer is rebuilt from the world data over the preceding frames and flipped in at the moment the fine scroll wraps. Scrolling stops at the world edges.
Holding a cursor key scrolls the view across the world one hires pixel per frame in that direction, using the VIC-II fine-scroll registers ($D016, $D011) in the 20-row map area in 38-column mode. Every 8 pixels the view shifts by one cell: the hidden buffer is rebuilt from the world data over the preceding frames and flipped in at the moment the fine scroll wraps. Scrolling stops at the world edges. The status area below the map does not scroll.

Acceptance criteria:
- [R5.1] Holding a cursor key moves the view smoothly with no jumps, tearing or half-drawn rows
@@ -117,6 +122,17 @@ Acceptance criteria:

Capabilities: keyboard-input, smooth-animation, raster-interrupts

### R6 - Status area (must)

Below the 20-row map, five rows of 40-column text in the upper-case ROM font, light red on brown, show: the title, the view position (top-left cell of the view), the number of people in view out of 16, a spare line, and key help. A raster split switches the VIC-II from multicolour bitmap to text at the boundary every frame; the text area never scrolls.

Acceptance criteria:
- [R6.1] The five status lines appear below the map whenever the map is shown: title, view position, people in view, a spare line and key help
- [R6.2] The status text and the split line between map and text stay steady (no jitter, flicker or tearing) while people move and while the view scrolls
- [R6.3] The view position shown matches the view's top-left cell and changes as the view scrolls; the people-in-view count matches the dots visible in the map

Capabilities: raster-interrupts

## Design decisions

"Practical default" means the Foundry proposed it and the user accepted it without a specific preference. It can be changed later through AGENTS.md section 6.
@@ -124,13 +140,13 @@ Capabilities: keyboard-input, smooth-animation, raster-interrupts
| Topic | Decision | Source |
|---|---|---|
| Controls | Cursor keys scroll the view. On a real C64 these are CRSR down/right, plus SHIFT for up/left; the keyboard matrix is read directly so a key held down scrolls continuously. VICE maps the PC arrow keys to them. SPACE generates a new world. | decided by user |
| Visuals | Multicolour bitmap mode (160x200, double-wide pixels), 38-column/24-row display for smooth scrolling. Brown is the shared background colour; light red is the colour-RAM colour in every cell, so people can be drawn anywhere without colour clash and colour RAM never needs scrolling. The two screen-RAM colours of each 4x8 cell come from grey (stone), green (grass and trees), blue (water) and black (roads). The world is stored as one tile byte per 4x8 cell; each tile is drawn from a small set of 8-byte pixel patterns (including edge and corner patterns) so shorelines and roads look natural. | decided by user |
| Visuals | Multicolour bitmap mode (160x200, double-wide pixels) for a 38-column map area 20 cell rows high, smooth-scrolled; below it a raster split to a fixed 5-row, 40-column text status area in the upper-case ROM font, light red on brown. Brown is the shared background colour; light red is the colour-RAM colour in every cell, so people can be drawn anywhere without colour clash and colour RAM never needs scrolling. The two screen-RAM colours of each 4x8 cell come from grey (stone), green (grass and trees), blue (water) and black (roads). The world is stored as one tile byte per 4x8 cell; each tile is drawn from a small set of 8-byte pixel patterns (including edge and corner patterns) so shorelines and roads look natural. | decided by user |
| Sound | None in the first release. | practical default |
| Persistence (save/load) | None. Maps and seeds are not saved. | practical default |
| File formats | None. A single PRG. | practical default |
| Peripherals | Keyboard only. No disk access after loading, no joystick. | practical default |
| Timing and memory budgets | NTSC: 60 Hz, 17,095 cycles per frame (263 lines x 65 cycles, the NTSC VIC-II 6567R8 that x64sc emulates). Per frame: fine-scroll update, one slice of the hidden-buffer rebuild (about 9,000 bytes of bitmap and screen RAM spread over 8 frames), and restoring and redrawing visible people; together under one frame. World data about 4 KB; two bitmap buffers with their screen RAM about 18 KB. World generation may take several seconds. | practical default |
| Memory layout | Buffer A in VIC bank 1 and buffer B in VIC bank 2, each with its own 8 KB bitmap and 1 KB screen RAM; flipping switches bank bits in $DD00 during vertical blank. Colour RAM is shared and constant (light red). | practical default |
| Timing and memory budgets | NTSC: 60 Hz, 17,095 cycles per frame (263 lines x 65 cycles, the NTSC VIC-II 6567R8 that x64sc emulates). Per frame: fine-scroll update, one slice of the hidden-buffer rebuild (about 7,600 bytes of bitmap and screen RAM, 20 map rows plus one partial row, spread over 8 frames), and restoring and redrawing visible people; together under one frame. World data about 4 KB; two bitmap buffers with their screen RAM about 18 KB. World generation may take several seconds. | practical default |
| Memory layout | Buffer A in VIC bank 1 and buffer B in VIC bank 2, each with its own 8 KB bitmap and 1 KB screen RAM; flipping switches bank bits in $DD00 during vertical blank. Each bank also holds a 1 KB status text screen (bank + $0400) and a 2 KB copy of the upper-case ROM font (bank + $0800), at the same offsets so a flip still changes only $DD00. Colour RAM is shared and constant (light red), which is also the status text colour. | practical default |
| Rebuild source | The hidden buffer is rebuilt from the tile world, never copied from the visible buffer, so people's dots are never copied into the new view. | practical default |
| Seed | The seed comes from the CIA timer at start-up and at each SPACE press. It is not shown or saved in the first release. | practical default |

@@ -147,9 +163,10 @@ Capabilities: keyboard-input, smooth-animation, raster-interrupts
| A1 | Light red (C64 colour 10) stands in for tan, as the C64 has no tan. | confirmed |
| A2 | The map generator keeps every 4x8 cell to at most two of grey, green, blue and black (besides brown). Where three would meet, for example a road along a shoreline next to grass, it changes the least-represented colour in that cell. | default |
| A3 | Each buffer has its own bitmap and screen RAM in a separate VIC bank (banks 1 and 2), flipped via $DD00 in vertical blank; colour RAM is shared and constant. | unverified |
| A4 | Rebuilding the hidden buffer from tile patterns (about 9,000 bytes) can be spread over 8 frames alongside the people update within the NTSC frame budget, which allows 1 pixel per frame scrolling. | unverified |
| A4 | Rebuilding the hidden buffer from tile patterns (about 7,600 bytes) can be spread over 8 frames alongside the people update within the NTSC frame budget, which allows 1 pixel per frame scrolling. | unverified |
| A5 | The smoke test cannot read a bitmap. The program writes a status mirror ("LAND MAP 64", "MAP READY") into the unused text screen at $0400 once the first view is shown; the smoke test checks that text, and the VICE screenshot shows the map. | default |
| A6 | The catalog has no bitmap-graphics capability. Multicolour bitmap mode and VIC bank switching are documented in Mapping the Commodore 64 (53265 $D011, 53270 $D016, 53272 $D018, 56576 $DD00); a catalog update is proposed separately. | unverified |
| A7 | Switching from the fine-scrolled multicolour bitmap to fixed text (and back at the top of the frame) with raster interrupts gives a steady split in VICE x64sc NTSC with no bad-line glitches at the boundary, whatever the map's vertical fine-scroll value. | unverified |

## Unresolved decisions



+ 5
- 2
docs/verification-status.md Bestand weergeven

@@ -15,11 +15,14 @@ manual = `pending`, `confirmed by user (<date>)`, `problem reported (<date>): <n
| M2.1 People table (world x, y, direction) and movement rules; water and stone block. | 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,106 frames logged, every person stepped 263-264 times, none on water or stone) | confirmed by user (2026-12-03) |
| 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 Fine scroll via $D016/$D011 in 38x24 mode; rebuild the hidden buffer from tiles over 8 frames and flip on wrap; stop at world edges. | not run | pending |
| M3.3 Draw people relative to the view; measure the frame budget with a border-colour timing bar. | not run | pending |
| 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. | 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. | not run | pending |
| M3.4 Draw people relative to the view; measure the frame budget with a border-colour timing bar. | not run | pending |

## Notes

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

- 2026-12-03 (M2.2): VICE x64sc NTSC runs 263 lines x 65 cycles = 17,095 cycles per frame (measured with tools/check-people.ps1). The spec's budget said 17,030 (the 262-line 6567R56A figure). The difference does not affect any acceptance criterion. With the user's approval (2026-12-03), docs/spec.md and project.json now say 17,095.
- 2026-12-03 (M3.1): The KERNAL timer interrupt is now switched off at start-up (keys are read from the matrix directly). RUN/STOP alone no longer breaks out (nothing scans for it); use a VICE reset to leave. RUN/STOP + RESTORE has not been tested. Fixed a parsing bug in tools/check-people.ps1: it could read the monitor's ASCII column as extra bytes when people's coordinates were printable characters. The bug could only cause false failures, so the earlier M2 passes stand.
- 2026-12-03 (M2.2): A3 checked in VICE only: flipping the two buffers with the $DD00 bank bits in vertical blank shows the same map in both banks and passes the byte-exact buffer check. The user's MT2.2 visual check is still pending.


+ 76
- 20
project.json Bestand weergeven

@@ -10,7 +10,8 @@
"Round 2: user added blue water, chose NTSC only, people move all over the map, 16 people, multicolour mode, light red for people, and redraw only where people move.",
"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."
"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."
]
},
"project": {
@@ -27,7 +28,7 @@
"name": "Commodore 64 (NTSC)",
"video": "ntsc",
"id": "c64",
"expectedBehavior": "Autostarts, shows a short generating message, then a full-screen multicolour bitmap view of the world: brown land, grey stone, green grass and trees, blue water, black roads. Light red dots move on land and roads. Cursor keys scroll the view smoothly; SPACE generates a new world.",
"expectedBehavior": "Autostarts, shows a short generating message, then a multicolour bitmap view of the world (20 rows): brown land, grey stone, green grass and trees, blue water, black roads, with 5 lines of status text below it. Light red dots move on land and roads. Cursor keys scroll the view smoothly; SPACE generates a new world.",
"platform": "c64"
}
],
@@ -42,7 +43,7 @@
}
},
"scope": {
"firstRelease": "A generated 2x2-screen world in multicolour bitmap mode with pixel-smooth cursor-key scrolling, 16 moving people blocked by water and stone, double-buffered partial redraw, and SPACE for a new world.",
"firstRelease": "A generated 2x2-screen world in multicolour bitmap mode with pixel-smooth cursor-key scrolling, a 5-line status area below the map, 16 moving people blocked by water and stone, double-buffered partial redraw, and SPACE for a new world.",
"inScope": [
"Procedural generation of a 2x2-screen world (80x50 cells of 4x8 multicolour pixels) from a seed",
"Terrain colours: brown land (background), grey stone, green grass and trees, blue water, black roads that connect",
@@ -50,6 +51,7 @@
"16 people as light red dots (one multicolour pixel each), spread over the world, blocked by water and stone; only those in view are drawn",
"Two bitmap buffers flipped once per update; only the bytes under people are restored and redrawn between scroll steps",
"SPACE generates a new world",
"A 5-line text status area below a 20-row map, using a raster split: title, view position, people in view, a spare line and key help",
"NTSC timing"
],
"outOfScope": [
@@ -67,7 +69,7 @@
"requirements": [
{
"title": "Generated 2x2-screen world",
"text": "At start-up the program generates a world of 2x2 screens (80x50 cells of 4x8 multicolour pixels) from a seed. The generator decides the layout, shapes and counts of features; every world contains brown land, grey stone, green grass and trees, blue water and black roads that connect to each other. The view shows one screen-sized window of it in multicolour bitmap mode.",
"text": "At start-up the program generates a world of 2x2 screens (80x50 cells of 4x8 multicolour pixels) from a seed. The generator decides the layout, shapes and counts of features; every world contains brown land, grey stone, green grass and trees, blue water and black roads that connect to each other. The view shows a 40x20-cell window of it in multicolour bitmap mode, above the status area (R6).",
"priority": "must",
"acceptance": [
"After autostart in VICE (x64sc, NTSC) the map view appears within 15 seconds",
@@ -126,7 +128,7 @@
"id": "R5",
"title": "Pixel-smooth scrolling",
"priority": "must",
"text": "Holding a cursor key scrolls the view across the world one hires pixel per frame in that direction, using the VIC-II fine-scroll registers ($D016, $D011) in 38-column/24-row mode. Every 8 pixels the view shifts by one cell: the hidden buffer is rebuilt from the world data over the preceding frames and flipped in at the moment the fine scroll wraps. Scrolling stops at the world edges.",
"text": "Holding a cursor key scrolls the view across the world one hires pixel per frame in that direction, using the VIC-II fine-scroll registers ($D016, $D011) in the 20-row map area in 38-column mode. Every 8 pixels the view shifts by one cell: the hidden buffer is rebuilt from the world data over the preceding frames and flipped in at the moment the fine scroll wraps. Scrolling stops at the world edges. The status area below the map does not scroll.",
"acceptance": [
"Holding a cursor key moves the view smoothly with no jumps, tearing or half-drawn rows",
"The view stops at all four world edges",
@@ -138,15 +140,29 @@
"smooth-animation",
"raster-interrupts"
]
},
{
"id": "R6",
"title": "Status area",
"priority": "must",
"text": "Below the 20-row map, five rows of 40-column text in the upper-case ROM font, light red on brown, show: the title, the view position (top-left cell of the view), the number of people in view out of 16, a spare line, and key help. A raster split switches the VIC-II from multicolour bitmap to text at the boundary every frame; the text area never scrolls.",
"acceptance": [
"The five status lines appear below the map whenever the map is shown: title, view position, people in view, a spare line and key help",
"The status text and the split line between map and text stay steady (no jitter, flicker or tearing) while people move and while the view scrolls",
"The view position shown matches the view's top-left cell and changes as the view scrolls; the people-in-view count matches the dots visible in the map"
],
"capabilities": [
"raster-interrupts"
]
}
],
"design": {
"visuals": {
"value": "Multicolour bitmap mode (160x200, double-wide pixels), 38-column/24-row display for smooth scrolling. Brown is the shared background colour; light red is the colour-RAM colour in every cell, so people can be drawn anywhere without colour clash and colour RAM never needs scrolling. The two screen-RAM colours of each 4x8 cell come from grey (stone), green (grass and trees), blue (water) and black (roads). The world is stored as one tile byte per 4x8 cell; each tile is drawn from a small set of 8-byte pixel patterns (including edge and corner patterns) so shorelines and roads look natural.",
"value": "Multicolour bitmap mode (160x200, double-wide pixels) for a 38-column map area 20 cell rows high, smooth-scrolled; below it a raster split to a fixed 5-row, 40-column text status area in the upper-case ROM font, light red on brown. Brown is the shared background colour; light red is the colour-RAM colour in every cell, so people can be drawn anywhere without colour clash and colour RAM never needs scrolling. The two screen-RAM colours of each 4x8 cell come from grey (stone), green (grass and trees), blue (water) and black (roads). The world is stored as one tile byte per 4x8 cell; each tile is drawn from a small set of 8-byte pixel patterns (including edge and corner patterns) so shorelines and roads look natural.",
"source": "user"
},
"budgets": {
"value": "NTSC: 60 Hz, 17,095 cycles per frame (263 lines x 65 cycles, the NTSC VIC-II 6567R8 that x64sc emulates). Per frame: fine-scroll update, one slice of the hidden-buffer rebuild (about 9,000 bytes of bitmap and screen RAM spread over 8 frames), and restoring and redrawing visible people; together under one frame. World data about 4 KB; two bitmap buffers with their screen RAM about 18 KB. World generation may take several seconds.",
"value": "NTSC: 60 Hz, 17,095 cycles per frame (263 lines x 65 cycles, the NTSC VIC-II 6567R8 that x64sc emulates). Per frame: fine-scroll update, one slice of the hidden-buffer rebuild (about 7,600 bytes of bitmap and screen RAM, 20 map rows plus one partial row, spread over 8 frames), and restoring and redrawing visible people; together under one frame. World data about 4 KB; two bitmap buffers with their screen RAM about 18 KB. World generation may take several seconds.",
"source": "default"
},
"sound": {
@@ -172,7 +188,7 @@
"other": [
{
"topic": "Memory layout",
"value": "Buffer A in VIC bank 1 and buffer B in VIC bank 2, each with its own 8 KB bitmap and 1 KB screen RAM; flipping switches bank bits in $DD00 during vertical blank. Colour RAM is shared and constant (light red).",
"value": "Buffer A in VIC bank 1 and buffer B in VIC bank 2, each with its own 8 KB bitmap and 1 KB screen RAM; flipping switches bank bits in $DD00 during vertical blank. Each bank also holds a 1 KB status text screen (bank + $0400) and a 2 KB copy of the upper-case ROM font (bank + $0800), at the same offsets so a flip still changes only $DD00. Colour RAM is shared and constant (light red), which is also the status text colour.",
"source": "default"
},
{
@@ -210,7 +226,7 @@
},
{
"id": "A4",
"text": "Rebuilding the hidden buffer from tile patterns (about 9,000 bytes) can be spread over 8 frames alongside the people update within the NTSC frame budget, which allows 1 pixel per frame scrolling.",
"text": "Rebuilding the hidden buffer from tile patterns (about 7,600 bytes) can be spread over 8 frames alongside the people update within the NTSC frame budget, which allows 1 pixel per frame scrolling.",
"status": "unverified"
},
{
@@ -222,6 +238,11 @@
"id": "A6",
"text": "The catalog has no bitmap-graphics capability. Multicolour bitmap mode and VIC bank switching are documented in Mapping the Commodore 64 (53265 $D011, 53270 $D016, 53272 $D018, 56576 $DD00); a catalog update is proposed separately.",
"status": "unverified"
},
{
"id": "A7",
"text": "Switching from the fine-scrolled multicolour bitmap to fixed text (and back at the top of the frame) with raster interrupts gives a steady split in VICE x64sc NTSC with no bad-line glitches at the boundary, whatever the map's vertical fine-scroll value.",
"status": "unverified"
}
],
"openDecisions": [
@@ -263,7 +284,8 @@
"assumptionsToVerify": [
"A3: buffer flip via $DD00 bank bits in vertical blank shows no tearing on NTSC in VICE.",
"A4: measure the per-frame cost of the rebuild slice plus the people update with a border-colour timing bar before M3 is finished.",
"A6: multicolour bitmap and bank switching behave as documented in Mapping the Commodore 64."
"A6: multicolour bitmap and bank switching behave as documented in Mapping the Commodore 64.",
"A7: the bitmap-to-text raster split stays steady under vertical fine scroll in VICE x64sc NTSC."
]
},
"starter": {
@@ -422,8 +444,8 @@
},
{
"id": "M3",
"title": "Pixel-smooth scrolling",
"goal": "The cursor keys scroll the view smoothly across the whole world with people kept in place.",
"title": "Split screen and pixel-smooth scrolling",
"goal": "A fixed 5-line status area sits below a 20-row map, and the cursor keys scroll the map smoothly across the whole world with people kept in place.",
"tasks": [
{
"id": "M3.1",
@@ -436,24 +458,36 @@
},
{
"id": "M3.2",
"text": "Fine scroll via $D016/$D011 in 38x24 mode; rebuild the hidden buffer from tiles over 8 frames and flip on wrap; stop at world edges.",
"text": "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.",
"requirements": [
"R5",
"R3"
"R6",
"R1"
],
"outcome": "Smooth scrolling across the world",
"check": "Manual tests MT3.1 and MT3.2"
"outcome": "Steady 20-row map with 5 status lines below",
"check": "Manual test MT3.3"
},
{
"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.",
"requirements": [
"R5",
"R3",
"R6"
],
"outcome": "Smooth scrolling across the world under a fixed status area",
"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.",
"requirements": [
"R2",
"R3",
"R5"
"R5",
"R6"
],
"outcome": "People stay aligned with terrain while scrolling; budget measured",
"check": "Manual test MT3.2"
"check": "Manual tests MT3.2 and MT3.3"
}
],
"manualTests": [
@@ -493,6 +527,28 @@
"R3",
"R5"
]
},
{
"id": "MT3.3",
"title": "Status area",
"target": "c64",
"setup": "VICE x64sc, NTSC (-ntsc), warp off.",
"steps": [
"Wait for the map view and read the text below the map.",
"Watch the boundary between map and text for 30 seconds while the dots move.",
"Tap SPACE and watch the boundary while the new map is shown.",
"From M3.3: hold each cursor key and watch the text and the boundary while the map scrolls."
],
"expected": [
"Five light red upper-case status lines below a 20-row map",
"The people-in-view number equals the dots visible on the map",
"The boundary is clean and steady: no flicker, jitter or garbage",
"From M3.3: the text never moves while the map scrolls and VIEW X/Y follow the scrolling"
],
"requirements": [
"R6",
"R1"
]
}
]
}
@@ -582,7 +638,7 @@
"video": "ntsc",
"videoSupport": "ntsc",
"artifact": "build/land-map-64.prg",
"expectedBehavior": "Autostarts, shows a short generating message, then a full-screen multicolour bitmap view of the world: brown land, grey stone, green grass and trees, blue water, black roads. Light red dots move on land and roads. Cursor keys scroll the view smoothly; SPACE generates a new world.",
"expectedBehavior": "Autostarts, shows a short generating message, then a multicolour bitmap view of the world (20 rows): brown land, grey stone, green grass and trees, blue water, black roads, with 5 lines of status text below it. Light red dots move on land and roads. Cursor keys scroll the view smoothly; SPACE generates a new world.",
"build": {
"kind": "cc65",
"cc65Target": "c64",


Laden…
Annuleren
Opslaan

Powered by TurnKey Linux.