diff --git a/docs/manual-tests.md b/docs/manual-tests.md index f759316..0d59a71 100644 --- a/docs/manual-tests.md +++ b/docs/manual-tests.md @@ -129,6 +129,23 @@ Expected: Verifies: R5 +### MT2.3: Scrolling without tearing (c64) + +Setup: VICE x64sc, once with PAL and once with NTSC. +Start: `pwsh -File tools/run.ps1 -Target c64`, then `pwsh -File tools/run.ps1 -Target c64 -Video ntsc` + +Steps: +1. Hold a cursor key so the view scrolls across a busy area (hard-rock veins), in all four directions. +2. Rest the mouse pointer on an edge so the view scrolls (mouse grabbed with Alt+M). +3. Watch the map, especially vertical veins while scrolling left/right. + +Expected: +- Every scroll step moves the whole map at once: no row or band of the map is ever shown one tile behind the rest (no tear or shear) +- The cursor, pointer and dwarves stay steady while the map scrolls +- On PAL the scrolling is even; on NTSC it may be slightly less even (a scroll step can take two frames there, see docs/verification-status.md) + +Verifies: R3 + ## M3 - Dwarves at work ### MT3.1: Dwarves mine marked tiles (c64) @@ -205,3 +222,7 @@ Optional for this release. Use these steps when hardware is available. 2. Get the program onto a disk the machine can read, for example: copy the .prg (or .d64) to an SD2IEC/Pi1541/1541 Ultimate SD card; or write the .d64 to a real floppy with a ZoomFloppy/XUM1541 and OpenCBM (`d64copy build\.d64 8`). 3. On the machine: `LOAD"*",8` then `RUN` (a C128 in native mode can also use `RUN"name"`). For C64-mode targets on a C128, enter C64 mode first (`GO 64`, then `Y`). 4. Repeat the manual tests for the current milestone and note any difference from VICE (timing, colours, display artefacts, disk speed) in docs/verification-status.md. + +## M5 - Smooth scrolling + +To be written when M5 starts (pixel-smooth scrolling; spec R3 changes with the user's approval first). diff --git a/docs/milestones.md b/docs/milestones.md index e064d28..e4259b9 100644 --- a/docs/milestones.md +++ b/docs/milestones.md @@ -40,6 +40,7 @@ Requirements: R4, R5 |---|---|---|---|---| | 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. @@ -68,3 +69,15 @@ Requirements: R9 | 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. + +## M5 - Smooth scrolling + +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). diff --git a/docs/spec.md b/docs/spec.md index 8fcb239..06c37da 100644 --- a/docs/spec.md +++ b/docs/spec.md @@ -218,3 +218,4 @@ Capabilities: text-ui | 2026-11-26 | Charset layout: codes 0-127 from the lower/upper-case ROM set, game glyphs at 128+ (cc65 conio prints capitals at screen codes 65-90). | user | | 2026-11-26 | R4 and Controls: RETURN marks/unmarks instead of D, because D also moves the cursor right (W/A/S/D). | user | | 2026-11-26 | A1 / M2.2: the 1351 mouse is read by the game's own assembly routine instead of cc65's c64_1351_mou driver, which read garbage POT values in VICE 3.10. | user | +| 2026-11-26 | Planned: M2.3 removes tearing while scrolling (R3 unchanged). M5 adds pixel-smooth scrolling after M4; R3 (one-tile steps) is to be changed with the user's approval when M5 starts. | user | diff --git a/docs/verification-status.md b/docs/verification-status.md index aa02f73..acf2b92 100644 --- a/docs/verification-status.md +++ b/docs/verification-status.md @@ -13,12 +13,14 @@ manual = `pending`, `confirmed by user ()`, `problem reported (): Reset only returns to BASIC; the program is not reloaded.)", + "Fixed seed (R2.3): run `pwsh -File tools/run.ps1 -Target c64 -Define FIXED_SEED=12345`, take a screenshot (or note the visible map), close VICE and run the same command again.", + "Run `pwsh -File tools/build.ps1` afterwards so the normal (random-seed) build is back in build/." ], "expected": [ - "Row 24 shows 'SEED nnnnn' each time", - "The two seeds differ and the visible maps differ", - "Three dwarves stand on floor tiles inside a cave" + "Row 24 shows 'GENERATING MAP' for about 2 seconds, then 'STONE 000 SEED nnnnn ANY KEY EXITS'", + "Steps 1 and 2: the two seeds differ and the visible maps differ", + "Step 3: both runs show 'SEED 12345' and exactly the same map", + "Three orange dwarves stand on dark-grey floor tiles inside an open cave in the middle of the view", + "The map shows brown soft rock, grey hard-rock veins and (often) part of a dark cavern; no letters or stray symbols inside the map area" ], "requirements": [ "R1", @@ -434,12 +438,35 @@ "target": "c64", "setup": "VICE x64sc, PAL.", "steps": [ - "Hold the right cursor key until the view stops moving.", - "Repeat for down, left and up (W/A/S/D as well)." + "Note row 24 and the blinking white cursor bracket in the starting cave.", + "Tap the right cursor key a few times. Then hold it until the view stops moving, and keep holding.", + "Repeat for down, left and up. Then do the same with W (up), A (left), S (down) and D (right)." ], "expected": [ - "The view scrolls one tile at a time without garbage characters", - "Scrolling stops at each map edge and the cursor cannot leave the map" + "Row 24 reads 'STONE 000 SEED nnnnn RUN'", + "Each tap moves the cursor one tile. The cursor blinks, showing the tile or dwarf under it in between.", + "The view starts scrolling when the cursor is 2 tiles from an edge, and scrolls steadily one tile at a time while the key is held, without garbage characters. A brief shear or tear in the map while it scrolls is a known limitation, not a failure.", + "At each map edge the view stops scrolling and the cursor goes on to the outermost tile (2 tiles from the view edge), then stops. It cannot leave the map.", + "W/A/S/D move exactly like the cursor keys" + ], + "requirements": [ + "R3" + ] + }, + { + "id": "MT1.3", + "title": "View redraw within one frame", + "target": "c64", + "setup": "VICE x64sc, once with PAL and once with NTSC.", + "steps": [ + "Wait for the map to appear and watch the border.", + "Close VICE and run `pwsh -File tools/build.ps1` so the normal build is back in build/." + ], + "expected": [ + "The border shows a red band. It starts in the bottom border, continues through the top border and ends partway down the screen (PAL: about the middle of the screen; NTSC: just above the status line). Below it the border is black down to the bottom border.", + "The border is never red all the way round (that would mean a redraw takes more than one frame)", + "In this timing build the dwarves may flicker, because the view is redrawn over them every frame. The normal build does not do that.", + "Automated equivalent: `pwsh -File tools/smoke.ps1 -Video ntsc` passes the 'Full view redraw fits in one frame' check" ], "requirements": [ "R3" @@ -469,6 +496,15 @@ ], "outcome": "PRG controllable by mouse", "check": "Manual test MT2.2" + }, + { + "id": "M2.3", + "text": "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.", + "requirements": [ + "R3" + ], + "outcome": "PRG that scrolls without tearing", + "check": "Manual test MT2.3; worst scroll frame within one PAL frame (measured)" } ], "manualTests": [ @@ -476,16 +512,20 @@ "id": "MT2.1", "title": "Mark by keyboard and joystick", "target": "c64", - "setup": "VICE x64sc, PAL, a joystick or keyset mapped to port 2.", + "setup": "VICE x64sc, PAL, a joystick or keyset mapped to port 2 (Preferences > Settings > Input devices > Joystick; a keyset must not use the cursor keys, W/A/S/D or RETURN).", "steps": [ - "Move the cursor onto a rock tile and press RETURN, then RETURN again.", - "Move onto a floor tile and press RETURN.", - "Use the joystick to move to another rock tile and press fire." + "Move the cursor out of the cave onto a rock tile (brown or grey) and press RETURN. Then press RETURN again.", + "Move onto a floor tile (dark, inside the cave) and press RETURN.", + "With the joystick: tap a direction once, then hold it for a second, then try a diagonal.", + "Move with the joystick onto another rock tile and press fire. Press fire again.", + "Mark a few tiles, scroll them out of view and back." ], "expected": [ - "RETURN marks the rock tile (yellow marked glyph) and the second RETURN unmarks it", + "After RETURN the tile under the cursor shows for a moment as the yellow marked glyph (framed X), and the blinking cursor then returns. The tile stays yellow between blinks. The second RETURN restores the brown or grey rock.", "RETURN on floor changes nothing", - "The joystick moves the cursor and fire marks the tile" + "A joystick tap moves exactly one tile. Holding moves one tile, pauses briefly, then repeats steadily (about 12 tiles per second). Diagonals move both ways at once. The view scrolls at the edges as with the keys.", + "Each fire press marks or unmarks once, exactly like RETURN. Holding fire does not keep toggling.", + "Marked tiles are still yellow after scrolling away and back" ], "requirements": [ "R4" @@ -495,20 +535,45 @@ "id": "MT2.2", "title": "Mark by mouse", "target": "c64", - "setup": "VICE x64sc, PAL, control port 1 set to Mouse (1351), mouse grab enabled.", + "setup": "VICE x64sc, PAL. tools/run.ps1 already sets control port 1 to Mouse (1351) (`-controlport1device 3`). After the game starts, click into the VICE window and press Alt+M to grab the host mouse (Alt+M again releases it). A joystick or keyset on port 2 is needed for step 6.", "steps": [ - "Move the mouse slowly across the map.", - "Left-click a rock tile, then click it again.", - "Hold the pointer at the right edge of the view." + "Before grabbing the mouse, wait 10 seconds without touching anything.", + "Grab the mouse (Alt+M). Move it slowly across the map, then quickly.", + "Left-click a rock tile, then click it again. Left-click a floor tile.", + "Hold the pointer on the rightmost column, then on the leftmost, the top view row and the bottom view row.", + "Use the cursor keys while the pointer rests in the middle of the map.", + "Move with the joystick, then with the mouse, then press RETURN, all in one session." ], "expected": [ - "The pointer moves smoothly and the highlighted cursor tile is always under the pointer tip", - "The first click marks the tile, the second unmarks it", - "The map scrolls right while the pointer stays at the edge" + "Step 1: the white arrow pointer sits on the cursor in the starting cave and does not move. The map does not scroll on its own.", + "Step 2: the pointer follows the mouse smoothly, pixel by pixel, in the right directions (mouse up = pointer up). The blinking cursor is always the tile under the arrow tip.", + "Step 3: the first click marks the rock (yellow), the second unmarks it, a click on floor does nothing. Holding the button down does not toggle again, and the game does not react as if a key had been pressed.", + "Step 4: the map scrolls steadily in that direction while the pointer rests on the edge, and stops at the map border.", + "Step 5: the pointer jumps onto the cursor tile and follows each keyboard move.", + "Step 6: all three devices work together; none of them stops working or produces stray moves." ], "requirements": [ "R5" ] + }, + { + "id": "MT2.3", + "title": "Scrolling without tearing", + "target": "c64", + "setup": "VICE x64sc, once with PAL and once with NTSC.", + "steps": [ + "Hold a cursor key so the view scrolls across a busy area (hard-rock veins), in all four directions.", + "Rest the mouse pointer on an edge so the view scrolls (mouse grabbed with Alt+M).", + "Watch the map, especially vertical veins while scrolling left/right." + ], + "expected": [ + "Every scroll step moves the whole map at once: no row or band of the map is ever shown one tile behind the rest (no tear or shear)", + "The cursor, pointer and dwarves stay steady while the map scrolls", + "On PAL the scrolling is even; on NTSC it may be slightly less even (a scroll step can take two frames there, see docs/verification-status.md)" + ], + "requirements": [ + "R3" + ] } ] }, @@ -639,6 +704,23 @@ ] } ] + }, + { + "id": "M5", + "title": "Smooth scrolling", + "goal": "The view glides pixel by pixel instead of jumping one tile at a time.", + "tasks": [ + { + "id": "M5.1", + "text": "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.", + "requirements": [ + "R3" + ], + "outcome": "PRG with pixel-smooth scrolling", + "check": "Manual test MT5.1 (written when M5 starts)" + } + ], + "manualTests": [] } ], "destination": "C:\\Development\\Commodore\\Foundry Projects\\stonehold-64",