From 8680339533994b53fb5fe99676615245a697e54f Mon Sep 17 00:00:00 2001 From: Daniel Covington Date: Fri, 4 Dec 2026 08:40:34 -0500 Subject: [PATCH] M6.2: status area shows only the chosen person; random names and sex Every person gets a sex (50/50, shown as M or F) and a random 2-3 syllable name from male or female syllable lists (up to 10 letters). The status area shows the chosen person's number, name and sex on row 20 and their scores on row 21; the title, view position, people-in-view count and key help are gone. Keys unchanged. Spec R6/R8 updated (approved); MT6.2 confirmed by the user. Checks: check-keys validates names, sexes and rows 20-21; check-split checks the shown person in both banks and blank rows 22-24; smoke expectations updated. Co-Authored-By: Claude Opus 5.5 --- README.md | 2 +- docs/manual-tests.md | 29 +++++- docs/milestones.md | 3 +- docs/spec.md | 20 ++-- docs/verification-status.md | 6 ++ project.json | 102 +++++++++++-------- src/main.s | 18 +--- src/people.inc | 188 ++++++++++++++++++++++++++---------- src/status.inc | 67 ++++++++----- tools/check-keys.ps1 | 37 +++++-- tools/check-split.ps1 | 39 +++----- 11 files changed, 335 insertions(+), 176 deletions(-) diff --git a/README.md b/README.md index acfc432..e564fdd 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Land Map 64 -A C64 program written in 6502 assembly that procedurally generates a 2x2-screen landscape world (light brown land, grey stone, green grass and trees, blue water) shown as a multicolour bitmap. The cursor keys scroll the view smoothly across the world. 16 people, drawn as white dots, wander the world but are blocked by water and stone. Where they walk often they wear dark brown paths into the land, which fade again when they are no longer used. Each person has six D&D-style scores (3d6); P steps through the people, showing their scores below the map and making their dot blink. Two bitmap buffers are flipped each update, and only the spots where people move are redrawn. +A C64 program written in 6502 assembly that procedurally generates a 2x2-screen landscape world (light brown land, grey stone, green grass and trees, blue water) shown as a multicolour bitmap. The cursor keys scroll the view smoothly across the world. 16 people, drawn as white dots, wander the world but are blocked by water and stone. Where they walk often they wear dark brown paths into the land, which fade again when they are no longer used. Each person has a random name, a sex (M or F) and six D&D-style scores (3d6); P steps through the people, showing the chosen one below the map and making their dot blink. Two bitmap buffers are flipped each update, and only the spots where people move are redrawn. - Targets: `c64` (details in [docs/spec.md](docs/spec.md)) - Language/toolchain: 6502 assembly (ca65) - Windows cross-development with cc65 (C, ca65 assembly or mixed) and VICE ([docs/toolchain.md](docs/toolchain.md)) diff --git a/docs/manual-tests.md b/docs/manual-tests.md index 70a51ef..e207053 100644 --- a/docs/manual-tests.md +++ b/docs/manual-tests.md @@ -234,6 +234,10 @@ Expected: - VIEW X/Y show the view's top-left cell (X 0-42, Y 0-30) and follow the scrolling. - The people-in-view number follows dots entering and leaving the map (it updates 15 times a second; a dot cut by the map's edge counts). +Since M6.2 the status area shows only the chosen person (see MT6.2): the title, VIEW X/Y, the +people-in-view number and the key help are gone. In MT3.1 and MT3.3 check the scroll limits and +the boundary by eye instead. + Verifies: R6 (and the R1 view size) ## M4 - Terrain all over the world @@ -336,7 +340,7 @@ Start: `pwsh -File tools/run.ps1 -Target c64` Automated first: `pwsh -File tools/check-keys.ps1` should end with `[PASS]`. Steps: -1. Wait for the map and read status line 4 (the line above the key help). +1. Wait for the map and read the scores (since M6.2 on line 2 below the map; line 4 before). 2. Press P a few times, then hold P down for a second. 3. Press P until it shows P16, then once more. 4. Scroll around while a person is chosen; find their dot. @@ -348,7 +352,28 @@ Expected: - After P16 comes P01. - The chosen person's dot blinks about twice a second when it is in view; the map and the other dots stay steady, also while scrolling. -- The key help line ends with `P PERSON`. +- (M6.1 only, removed in M6.2) the key help line ends with `P PERSON`. - SPACE gives a new world with new scores and shows P01. Verifies: R8, R6 + +### MT6.2: Names, sex and the person-only status area (c64) + +Setup: VICE x64sc, NTSC (-ntsc), pepto-pal palette (tools/run.ps1 selects it), warp off. +Start: `pwsh -File tools/run.ps1 -Target c64` + +Automated first: `pwsh -File tools/check-keys.ps1` should end with `[PASS]`. + +Steps: +1. Wait for the map and read the two lines below it. +2. Press P through all 16 people. +3. Scroll around, then press SPACE. + +Expected: +- Line 1 reads like `P01 ALDRIC M`: the number, a made-up name of up to 10 letters, then + M or F. Line 2 shows the six scores. The other three lines are blank. +- No title, view position, people-in-view count or key help anywhere below the map. +- Each person has their own name; both M and F appear among the 16. +- Cursor keys, SPACE and P still work; SPACE gives new names, sexes and scores and shows P01. + +Verifies: R8, R6 diff --git a/docs/milestones.md b/docs/milestones.md index 6be66f7..fc92c9e 100644 --- a/docs/milestones.md +++ b/docs/milestones.md @@ -84,12 +84,13 @@ Manual verification: see docs/manual-tests.md section M5. ## M6 - People's attributes -Goal: Every person has D&D-style scores that the player can look at one person at a time. +Goal: Every person has a name, a sex and D&D-style scores that the player can look at one person at a time. Requirements: R8, R6, R2, R3 | Task | Description | Requirements | Buildable outcome | Completion check | |---|---|---|---|---| | M6.1 | Six scores per person (STR, DEX, CON, INT, WIS, CHA; 3d6, one byte each, 96 bytes), rolled with the people for every new world. P (new press only) steps to the next person; status line 4 shows 'Pnn' and the six scores, rewritten only when the person changes, on a frame without the status update. The chosen person's dot is left out of the people draw for 16 of every 32 frames (draw_skip, which the checks read to know which dots to expect). The walk counts move to $C000 to make room below $4000. | R8, R6, R2, R3 | Scores per person, shown with P; the chosen person blinks | `pwsh -File tools/check-keys.ps1` (P held: one step; scores 3-18; status line 4 matches), `tools/check-people.ps1`, `tools/check-scroll.ps1 -Long`; manual test MT6.1 | +| M6.2 | Status area shows only the chosen person, who gets a random name and sex: sex 50/50 (people_sex), name from a start syllable, half the time a middle one, and a male or female end syllable (people_name, 10 letters, space padded), rolled with the scores. Row 20 'Pnn' + name + M/F, row 21 the scores, rows 22-24 blank; the title, view position, people-in-view count and key help (and the per-frame status update and people-in-view count) are removed. All keys still work. | R8, R6 | Status area shows the chosen person's name, sex and scores only | `pwsh -File tools/check-keys.ps1` (names 3-10 letters, sex 0/1, rows 20-21 match the shown person), `tools/check-split.ps1` (rows 20-21 lit, 22-24 blank, person 01 in both banks), `tools/smoke.ps1`; manual test MT6.2 | Manual verification: see docs/manual-tests.md section M6. diff --git a/docs/spec.md b/docs/spec.md index 2d47b9b..ba1e513 100644 --- a/docs/spec.md +++ b/docs/spec.md @@ -11,6 +11,7 @@ Changes approved by the user since then: - 2026-12-03: Terrain all over the world ("the different land spaces need to be all over the map, not just here and there"): R1 reworded; new criteria R1.5 (every view shows at least three terrain kinds) and R1.6 (each world rolls its own random terrain mix). Roads stay a grid and cross water on bridges. New milestone M4. - 2026-12-03: Worn paths instead of roads ("keep track of where the people walk and when the counter hits 128 then it is a path/road but the number can be reduced by one every certain number of cycles"; "remove their creation"): the generator makes no roads (R1 text, R1.2, R1.3); new R7 worn paths (dark brown patches, appear at 128, fade below 64, counts go down by one every 60 seconds, all chosen by the user); new milestone M5. - 2026-12-03: People's attributes ("now we need to give each person attributes like D&D"): new R8. Each person has six scores (strength, dexterity, constitution, intelligence, wisdom, charisma), rolled 3d6 when a world is made and stored one byte each; shown only, they do not change behaviour. P (a letter key, chosen by the user instead of Tab, which the C64 does not have) steps through the people; status line 4 (the spare line, R6) shows the chosen person's number and scores, and that person's dot blinks on the map. New milestone M6. +- 2026-12-04: Status area shows only the chosen person, who also gets a name and a sex ("we dont need land map 64 text, view, or people in view or the directions on how to move the screen or new world or person; we do want the person's attributes; also every person needs a random name and needs to be male or female"): the title, view position, people-in-view count and key help are removed from the status area (R6); the keys all still work. R8 adds a random sex (50/50, shown as M or F) and a random name of 2-3 syllables from male or female syllable lists (up to 10 letters); line 1 shows number, name and sex, line 2 the scores, lines 3-5 are blank (layout chosen by the user). New task M6.2. ## Summary @@ -24,7 +25,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, 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. +A generated 2x2-screen world in multicolour bitmap mode with pixel-smooth cursor-key scrolling, a 5-line status area below the map showing the chosen person, 16 moving people blocked by water and stone, double-buffered partial redraw, and SPACE for a new world. ### In scope @@ -34,8 +35,8 @@ A generated 2x2-screen world in multicolour bitmap mode with pixel-smooth cursor - 16 people as white 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, the chosen person's scores and key help -- Six D&D-style scores per person (3d6 each), shown one person at a time; P picks the next person, whose dot blinks +- A 5-line text status area below a 20-row map, using a raster split: the chosen person's number, name, sex and scores +- A random name, a sex (M or F) and six D&D-style scores (3d6 each) per person, shown one person at a time; P picks the next person, whose dot blinks - NTSC timing ### Out of scope @@ -54,7 +55,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 multicolour bitmap view of the world (20 rows): light brown land, grey stone, green grass and trees, blue water, with 5 lines of status text below it. White dots move on the land and wear paths into it. 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): light brown land, grey stone, green grass and trees, blue water, with the chosen person's name, sex and scores in the text area below it. White dots move on the land and wear paths into it. Cursor keys scroll the view smoothly; SPACE generates a new world. | ### Dual-target and mode notes @@ -133,12 +134,12 @@ 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, white on light brown, show: the title, the view position (top-left cell of the view), the number of people in view out of 16, the chosen person's scores (R8; a spare line before M6), 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. +Below the 20-row map, five rows of 40-column text in the upper-case ROM font, white on light brown. Since M6.2 they show only the chosen person (R8): line 1 their number, name and sex, line 2 their six scores; lines 3-5 are blank. (Before M6.2 they showed the title, the view position, the number of people in view, the scores and key help; the user removed those.) 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, the chosen person's scores (R8) and key help +- [R6.1] The status lines appear below the map whenever the map is shown: line 1 the chosen person's number, name and M or F, line 2 their six scores (R8) - [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 +- [R6.3] Lines 3-5 are blank: no title, view position, people-in-view count or key help is shown Capabilities: raster-interrupts @@ -157,14 +158,15 @@ Capabilities: smooth-animation ### R8 - People's attributes (must) -Each of the 16 people has six scores, as in D&D: strength, dexterity, constitution, intelligence, wisdom and charisma. Each is rolled with three six-sided dice (3-18) when a world is made, and stored as one byte. For now the scores are only shown; they do not change how people move. Status line 4 shows one person at a time: `P01 STR12 DEX09 CON15 INT10 WIS08 CHA13`. Each press of P shows the next person (after 16 comes 1); holding P does not repeat. The chosen person's dot blinks on the map (left out for 16 of every 32 frames) so it can be found. SPACE rolls new scores for the new world and shows person 1. +Each of the 16 people is male or female (at random, 50/50) and has a random name of two or three syllables from a male or female syllable list (up to 10 letters), and six scores, as in D&D: strength, dexterity, constitution, intelligence, wisdom and charisma. Each score is rolled with three six-sided dice (3-18) when a world is made, and stored as one byte. For now the scores are only shown; they do not change how people move. The status lines show one person at a time: `P01 ALDRIC M` and `STR12 DEX09 CON15 INT10 WIS08 CHA13`. Each press of P shows the next person (after 16 comes 1); holding P does not repeat. The chosen person's dot blinks on the map (left out for 16 of every 32 frames) so it can be found. SPACE rolls new names, sexes and scores for the new world and shows person 1. Acceptance criteria: - [R8.1] Every person has six scores from 3 to 18, rolled 3d6 when a world is made; SPACE rolls new ones -- [R8.2] Status line 4 shows the chosen person's number (1-16) and six scores, labelled STR, DEX, CON, INT, WIS and CHA; person 1 is shown after a new world +- [R8.2] Status line 1 shows the chosen person's number (1-16), name and M or F; line 2 their six scores, labelled STR, DEX, CON, INT, WIS and CHA; person 1 is shown after a new world - [R8.3] Each press of P shows the next person, after 16 comes 1; a held P counts once - [R8.4] The chosen person's dot blinks about twice a second, wherever they are in the view, without disturbing the map or the other dots - [R8.5] The scores do not change how people move +- [R8.6] Every person is male or female at random and has a random name of 2-3 syllables (up to 10 letters) from the male or female syllable list; SPACE gives new ones Capabilities: keyboard-input diff --git a/docs/verification-status.md b/docs/verification-status.md index fc86cf7..1e34f7d 100644 --- a/docs/verification-status.md +++ b/docs/verification-status.md @@ -22,9 +22,15 @@ manual = `pending`, `confirmed by user ()`, `problem reported ():