Work top to bottom, one task at a time (AGENTS.md section 4). Every task must leave all targets building. Requirement IDs refer to docs/spec.md.
Goal: Prove the toolchain, emulator configuration and smoke test work before any feature work.
Requirements: R1
| Task | Description | Requirements | Buildable outcome | Completion check |
|---|---|---|---|---|
| M0.1 | Run tools/check-prereqs.ps1, then tools/smoke.ps1 for every target. | R1 | Starter artifact(s) built: build/stonehold-64.prg | tools/smoke.ps1 exits 0 (or every target without automation is verified by hand), and the user confirms the M0 manual test. |
Manual verification: see docs/manual-tests.md section M0.
Goal: A random 128x128 map exists and the player can scroll around it with the keyboard.
Requirements: R1, R2, R3, R7
| Task | Description | Requirements | Buildable outcome | Completion check |
|---|---|---|---|---|
| M1.1 | Settle the memory map (A3): where the 16 KB map, the charset and the program live. Add a check that fails the build or shows an error if they overlap. | R1, R2 | Documented memory map in docs/ and a PRG that still passes the smoke test | build/stonehold-64.map shows no overlap; smoke test passes |
| M1.2 | Map generator in C: seeded PRNG, soft rock, hard-rock veins, caverns, starting cave near the centre. Show the seed on row 24. | R2 | PRG that generates a map and shows ‘SEED nnnnn’ | Manual test MT1.1 |
| M1.3 | Assembly view redraw (draw_view(x, y), C prototype) copying a 40x23 window of the map to screen and colour RAM. Each map byte is its own screen code with its colour in the low nibble (changed from a tile-to-glyph/colour table with user approval on 2026-11-26: the table version measured 22,754 PAL / 23,177 NTSC cycles, over one frame). | R3 | PRG with a full-view redraw inside one frame | Border-colour timing bar ends before the bottom of the screen on PAL and NTSC (manual test MT1.3); smoke check view_fast on PAL and NTSC |
| M1.4 | Keyboard cursor (cursor keys and W/A/S/D) with edge scrolling and map-border clamping. Status line: ‘STONE 000 SEED nnnnn RUN’. | R3, R7 | PRG in which the cursor moves and the view scrolls | Manual test MT1.2 |
Manual verification: see docs/manual-tests.md section M1.
Goal: The player can mark and unmark rock tiles with any of the three input devices.
Requirements: R4, R5
| Task | Description | Requirements | Buildable outcome | Completion check |
|---|---|---|---|---|
| M2.1 | Mark/unmark with RETURN on rock tiles only; marked-rock glyph. Joystick port 2 cursor movement with key repeat and fire to mark. | R4 | PRG in which RETURN and fire toggle marks | Manual test MT2.1 |
| M2.2 | 1351 mouse via the game's own POT reader in assembly (src/mouse1351.s; changed from cc65 c64_1351_mou with user approval on 2026-11-26 because that driver read garbage POT values in VICE 3.10): sprite 0 pointer, dig cursor = tile under the pointer tip, left button marks/unmarks, pointer at a view edge scrolls. Verify A1/A2 and record the exact VICE options in docs/. | R5 | PRG controllable by mouse | Manual test MT2.2 |
| M2.3 | Scrolling without tearing: draw_view writes the view row by row behind the raster beam, so no row is shown half old, half new; trim the per-frame work so a frame with a scroll fits in one PAL frame, and measure NTSC. View still moves in whole tiles (R3 unchanged). Added at the user's request on 2026-11-26. | R3 | PRG that scrolls without tearing | Manual test MT2.3; worst scroll frame within one PAL frame (measured) |
Manual verification: see docs/manual-tests.md section M2.
Goal: Three dwarves mine marked tiles on their own; the stone counter and pause work, at the same speed on PAL and NTSC.
Requirements: R6, R7, R8, R10
| Task | Description | Requirements | Buildable outcome | Completion check |
|---|---|---|---|---|
| M3.1 | Dwarf job system: idle dwarves claim the nearest reachable marked tile via a windowed breadth-first search (one search per frame at most), walk there, mine for a time that depends on the rock type, turn it into floor. | R6 | PRG in which dwarves mine marked tiles | Manual test MT3.1; timing bar for the search (A4) |
| M3.2 | Stone counter increments per mined tile; SPACE pauses and resumes; marking still works while paused. | R7, R8 | PRG with a working counter and pause | Manual test MT3.2 |
| M3.3 | Frame-based timers scaled for PAL and NTSC using get_tv(). | R10 | PRG with matching speed on both standards | Manual test MT3.3 |
Manual verification: see docs/manual-tests.md section M3.
Goal: The game gives audible feedback for marking and mining.
Requirements: R9
| Task | Description | Requirements | Buildable outcome | Completion check |
|---|---|---|---|---|
| M4.1 | SID effects (assembly or C): mark/unmark click on one voice, pick strike on another, silenced while paused. | R9 | PRG with sound effects | Manual test MT4.1 |
Manual verification: see docs/manual-tests.md section M4.
Goal: The view glides pixel by pixel instead of jumping one tile at a time.
Requirements: R3 (to be changed with the user's approval before M5 starts)
| Task | Description | Requirements | Buildable outcome | Completion check |
|---|---|---|---|---|
| M5.1 | Pixel-smooth scrolling with the VIC-II fine-scroll registers ($D016/$D011) and a double-buffered screen. Before work starts, spec R3 (one-tile steps) is changed with the user's approval and this task is split into reviewable steps. Added at the user's request on 2026-11-26. | R3 | PRG with pixel-smooth scrolling | Manual test MT5.1 (written when M5 starts) |
Manual verification: see docs/manual-tests.md section M5 (to be written when M5 starts).
Powered by TurnKey Linux.