Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

848 lignes
36KB

  1. {
  2. "schemaVersion": "1.0",
  3. "status": "approved",
  4. "interview": {
  5. "startedOn": "2026-11-26",
  6. "stage": "review",
  7. "openQuestions": [],
  8. "notes": [
  9. "User idea named an existing commercial game; the Foundry is building an original game in the same genre (no names, characters, art or look from that game). Working title Stonehold 64 accepted by the user.",
  10. "Round 1: C64 only, PAL+NTSC, VICE only. Smallest version accepted; user added: original custom character set, not stock PETSCII.",
  11. "Round 2: user accepted the out-of-scope list (except random map generation, now in). Added: 1351 mouse required, mouse may be used alongside joystick/keyboard. Map 128x128, randomly generated. Sound effects yes.",
  12. "Round 3: dig cursor sits under the mouse pointer. Memory/speed budget, map generation plan, name and destination accepted. Language: C with assembly functions callable from C for speed.",
  13. "Foundry maintenance done at the user's request: mouse-1351 capability added to the catalog (cc65 languages; VICE -controlport1device 3), with test briefs mouse-1351-c and conflict-basic-mouse."
  14. ]
  15. },
  16. "project": {
  17. "name": "Stonehold 64",
  18. "slug": "stonehold-64",
  19. "idea": "Dwarf Fortress clone",
  20. "summary": "An original colony-simulation game for the Commodore 64 in the fortress-building genre. The player does not control dwarves directly: they designate tiles to dig and a small crew of dwarves walks over and mines them on their own, revealing a randomly generated underground map. The view is a top-down tile map, drawn with an original custom character set, that scrolls over a world much larger than the screen.",
  21. "kind": "game",
  22. "smallestUsefulVersion": "One randomly generated 128x128 underground level, three dwarves, a cursor (mouse, joystick or keyboard) to mark rock for digging; dwarves path to marked tiles and mine them, each mined tile yields one stone shown in a counter; the game runs in real time and can be paused."
  23. },
  24. "targets": [
  25. {
  26. "id": "c64",
  27. "name": "Commodore 64 (PAL primary, NTSC supported)",
  28. "platform": "c64",
  29. "display": "vicii-40",
  30. "video": "pal-ntsc",
  31. "expectedBehavior": "Autostarts to the Stonehold screen drawn with the custom character set: title on row 0, a map view on rows 1-23, status line (stone counter, seed, RUN/PAUSED) on row 24. Three dwarves move on their own to mine tiles the player marks with the mouse, joystick or keyboard."
  32. }
  33. ],
  34. "dualTarget": null,
  35. "buildLocation": "windows-cross",
  36. "onCommodore": null,
  37. "testing": {
  38. "emulator": "vice",
  39. "realHardware": {
  40. "requested": false,
  41. "reason": "VICE only (user choice). Real-hardware steps stay optional in the manual tests."
  42. }
  43. },
  44. "scope": {
  45. "firstRelease": "One randomly generated 128x128 underground level (soft rock, hard rock, a few caverns and a starting cave), shown through a scrolling 40x23 map view drawn with an original custom character set. The player marks rock tiles for digging with a Commodore 1351 mouse (the dig cursor sits under the pointer), a joystick in port 2 or the keyboard. Three autonomous dwarves pick marked tiles within about 32 tiles, walk there, and mine them; each mined tile becomes floor and adds one stone to a counter. Real-time with pause, SID sound effects, same game speed on PAL and NTSC.",
  46. "inScope": [
  47. "Randomly generated 128x128 tile map with a visible seed, new layout each game",
  48. "Scrolling 40x23 map view",
  49. "Original custom character set for terrain, dwarves and cursor",
  50. "Dig designation with a 1351 mouse, a joystick or the keyboard",
  51. "Three autonomous dwarves with local pathfinding to designated tiles",
  52. "Mining turns rock into floor and adds stone to a counter; hard rock takes longer",
  53. "Real-time simulation with pause",
  54. "SID sound effects"
  55. ],
  56. "outOfScope": [
  57. "Food, drink, needs and moods",
  58. "Building walls, doors or furniture",
  59. "Stockpiles and hauling",
  60. "Combat and enemies",
  61. "More than one z-level",
  62. "Saving and loading",
  63. "Music"
  64. ]
  65. },
  66. "requirements": [
  67. {
  68. "id": "R1",
  69. "title": "Original character set and screen layout",
  70. "priority": "must",
  71. "text": "The game switches the VIC-II to an original custom character set: letters, digits and punctuation keep their usual shapes (copied from ROM at start), and new glyphs are defined for soft rock, hard rock, floor, marked rock, dwarf and cursor. Screen layout: row 0 title, rows 1-23 map view, row 24 status line.",
  72. "acceptance": [
  73. "After autostart in VICE x64sc (PAL) the screen appears within 5 seconds and row 0 reads 'STONEHOLD 64'",
  74. "Rock, floor, dwarves and marked rock are drawn with the game's own glyphs, visibly different from stock PETSCII graphics",
  75. "Text on rows 0 and 24 is readable in the normal uppercase letter shapes"
  76. ],
  77. "capabilities": [
  78. "text-ui",
  79. "custom-charset"
  80. ]
  81. },
  82. {
  83. "id": "R2",
  84. "title": "Random map generation",
  85. "priority": "must",
  86. "text": "At the start of each game a 128x128 map is generated from a 16-bit seed: mostly soft rock, veins of hard rock, several random caverns, and an open starting cave near the centre where the three dwarves start. The same seed always gives the same map. The seed is shown on the status line.",
  87. "acceptance": [
  88. "Row 24 shows 'SEED nnnnn'",
  89. "Two new games (restart or reload) show different seeds and different map layouts",
  90. "A fixed seed set in the debug build gives an identical map in two runs (compare screenshots)",
  91. "The dwarves start on floor tiles inside an open cave"
  92. ],
  93. "capabilities": [
  94. "text-ui"
  95. ]
  96. },
  97. {
  98. "id": "R3",
  99. "title": "Scrolling map view",
  100. "priority": "must",
  101. "text": "The 40x23 map view shows part of the 128x128 map. Moving the cursor within 2 tiles of a view edge scrolls the view one tile in that direction, stopping at the map borders. The view is redrawn by an assembly routine callable from C.",
  102. "acceptance": [
  103. "Holding a direction scrolls the map steadily until the map edge, where scrolling stops",
  104. "All four map edges can be reached",
  105. "A full-view redraw completes within one frame (border-colour timing bar check)"
  106. ],
  107. "capabilities": [
  108. "text-ui",
  109. "custom-charset"
  110. ]
  111. },
  112. {
  113. "id": "R4",
  114. "title": "Dig designation by keyboard and joystick",
  115. "priority": "must",
  116. "text": "Cursor keys or W/A/S/D move the dig cursor one tile; D marks or unmarks the rock tile under the cursor. A joystick in port 2 moves the cursor (with key repeat), and fire marks or unmarks. Floor tiles cannot be marked.",
  117. "acceptance": [
  118. "Pressing D on a rock tile changes it to the marked-rock glyph; pressing D again restores it",
  119. "Pressing D on a floor tile changes nothing",
  120. "The joystick in port 2 moves the cursor and fire marks/unmarks exactly like D"
  121. ],
  122. "capabilities": [
  123. "keyboard-input",
  124. "joystick-input"
  125. ]
  126. },
  127. {
  128. "id": "R5",
  129. "title": "Commodore 1351 mouse",
  130. "priority": "must",
  131. "text": "A 1351 mouse in control port 1 (proportional mode) moves a sprite pointer. The dig cursor is always the map tile under the pointer. The left button marks or unmarks that tile. Holding the pointer at a view edge scrolls the map. The mouse can be used at the same time as the joystick and keyboard.",
  132. "acceptance": [
  133. "With VICE 1351 mouse emulation on port 1, moving the mouse moves the pointer smoothly by the pixel",
  134. "The highlighted dig cursor tile is always the tile under the pointer tip",
  135. "Left click on a rock tile marks it; left click again unmarks it",
  136. "Holding the pointer at the right edge scrolls the map right"
  137. ],
  138. "capabilities": [
  139. "mouse-1351",
  140. "sprites"
  141. ]
  142. },
  143. {
  144. "id": "R6",
  145. "title": "Autonomous dwarves",
  146. "priority": "must",
  147. "text": "Three dwarves act on their own. An idle dwarf searches (breadth-first, within about 32 tiles) for the nearest marked tile that has a walkable neighbour, walks there at 2-4 steps per second, and mines it: soft rock takes about 1 second, hard rock about 3 seconds. Two dwarves never claim the same tile. A marked tile no dwarf can reach stays marked.",
  148. "acceptance": [
  149. "Marking a rock tile next to the starting cave makes a dwarf walk to it and mine it within about 5 seconds",
  150. "The mined tile changes to floor",
  151. "With three adjacent marked tiles, the three dwarves mine different tiles",
  152. "Hard rock visibly takes longer to mine than soft rock",
  153. "A marked tile with no path to it stays marked and no dwarf freezes"
  154. ],
  155. "capabilities": [
  156. "text-ui"
  157. ]
  158. },
  159. {
  160. "id": "R7",
  161. "title": "Stone counter",
  162. "priority": "must",
  163. "text": "Each mined tile adds one stone. The total is shown on row 24 as 'STONE nnn'.",
  164. "acceptance": [
  165. "The game starts with 'STONE 000' on row 24",
  166. "Each mined tile increments the counter by exactly 1"
  167. ],
  168. "capabilities": [
  169. "text-ui"
  170. ]
  171. },
  172. {
  173. "id": "R8",
  174. "title": "Pause",
  175. "priority": "must",
  176. "text": "SPACE pauses and resumes the simulation. While paused, dwarves and mining stop, the status line shows 'PAUSED', and the player can still scroll and mark tiles.",
  177. "acceptance": [
  178. "SPACE shows 'PAUSED' on row 24 and all dwarves stop",
  179. "Tiles can be marked while paused",
  180. "SPACE again shows 'RUN' and the dwarves continue"
  181. ],
  182. "capabilities": [
  183. "keyboard-input"
  184. ]
  185. },
  186. {
  187. "id": "R9",
  188. "title": "Sound effects",
  189. "priority": "should",
  190. "text": "SID effects: a short click when a tile is marked or unmarked, and a pick strike on each mining blow. No music.",
  191. "acceptance": [
  192. "A click is heard on each mark or unmark",
  193. "Pick strikes are heard while a dwarf mines, and stop when mining ends or the game is paused"
  194. ],
  195. "capabilities": [
  196. "sid-sound"
  197. ]
  198. },
  199. {
  200. "id": "R10",
  201. "title": "PAL and NTSC",
  202. "priority": "must",
  203. "text": "The game detects PAL or NTSC at start and scales its timers so that dwarf speed and mining time are the same in seconds on both.",
  204. "acceptance": [
  205. "In VICE with -pal and with -ntsc, a dwarf takes the same time (within 10%) to walk 10 tiles"
  206. ],
  207. "capabilities": [
  208. "text-ui"
  209. ]
  210. }
  211. ],
  212. "design": {
  213. "controls": {
  214. "value": "Commodore 1351 mouse in control port 1 (proportional mode): a sprite pointer, the dig cursor is the tile under the pointer, the left button marks/unmarks, the pointer at a view edge scrolls the map. Joystick in port 2: move the cursor, fire marks/unmarks. Keyboard: cursor keys or W/A/S/D move, D marks/unmarks, SPACE pauses/resumes. All three can be used together.",
  215. "source": "user"
  216. },
  217. "visuals": {
  218. "value": "Character mode with an original custom character set at $3800 (VIC bank 0, screen at $0400): codes 0-127 copied from the lower/upper-case ROM set so conio text (capital letters at screen codes 65-90) stays readable, codes 128+ hold the game's own glyphs (soft rock, hard rock, floor, marked rock, dwarf, cursor). Colours: rock brown, hard rock grey, floor dark grey, marked rock yellow, dwarves orange, cursor white, on a black background. The mouse pointer is hardware sprite 0.",
  219. "source": "user"
  220. },
  221. "sound": {
  222. "value": "SID effects only: a mark/unmark click and a pick strike while mining. No music.",
  223. "source": "user"
  224. },
  225. "persistence": {
  226. "value": "None. Nothing is saved in the first release.",
  227. "source": "n/a"
  228. },
  229. "fileFormats": {
  230. "value": "None. A single PRG.",
  231. "source": "n/a"
  232. },
  233. "peripherals": {
  234. "value": "Commodore 1351 mouse in control port 1; joystick in control port 2 (optional; keyboard works alone). No disk access after loading.",
  235. "source": "user"
  236. },
  237. "budgets": {
  238. "value": "Map 128x128 at one byte per tile (16 KB: tile type plus marked/claimed flags in the same byte). Pathfinding is a breadth-first search limited to a 65x65 window around the dwarf (about 4.2 KB scratch, shared by all dwarves, one search per frame at most). Dwarves move 2-4 steps per second. View redraw (40x23 tiles) in assembly within one frame. Input polled every frame. Program plus data must fit below $D000 with the charset at $3800.",
  239. "source": "user"
  240. },
  241. "other": [
  242. {
  243. "topic": "Map generation",
  244. "value": "128x128 tiles from a visible 16-bit seed: mostly soft rock, veins of hard rock, several random caverns, a starting cave near the centre. Hard rock takes about three times as long to mine.",
  245. "source": "user"
  246. },
  247. {
  248. "topic": "Language split",
  249. "value": "C for game logic, map generation and pathfinding; ca65 assembly functions with C prototypes for the speed-critical parts (view redraw, frame wait, later anything profiling shows is too slow).",
  250. "source": "user"
  251. }
  252. ]
  253. },
  254. "capabilities": [
  255. "text-ui",
  256. "keyboard-input",
  257. "joystick-input",
  258. "custom-charset",
  259. "sprites",
  260. "sid-sound",
  261. "mouse-1351"
  262. ],
  263. "assumptions": [
  264. {
  265. "id": "A1",
  266. "text": "cc65's statically linked 1351 driver (c64_1351_mou, mouse_install with mouse_def_callbacks) drives sprite 0 as the pointer and works alongside joystick reads on port 2. The Foundry verified (test brief mouse-1351-c) that the driver links and installs in VICE 3.10 with a 1351 on control port 1; pointer movement together with joystick and keyboard input is still to be checked by hand.",
  267. "status": "unverified"
  268. },
  269. {
  270. "id": "A2",
  271. "text": "VICE emulates the 1351 on control port 1 with -controlport1device 3 (added to tools/run.ps1 and tools/smoke.ps1 automatically by the mouse-1351 capability). The host mouse must be grabbed with Alt+M (or -mouse) for the pointer to move.",
  272. "status": "confirmed"
  273. },
  274. {
  275. "id": "A3",
  276. "text": "Memory map: screen $0400, custom charset $3800-$3FFF in VIC bank 0. Once the program (code, data, BSS including the 16 KB map) grows past $3800, the map or the charset must move (for example map at a fixed address above the program, or a custom ld65 config that reserves $3800-$3FFF and updating tools/build.ps1). The starter checks at run time that its BSS ends below $3800 and shows 'MEMORY CLASH' if not.",
  277. "status": "unverified"
  278. },
  279. {
  280. "id": "A4",
  281. "text": "A breadth-first search over a 65x65 window, at most one search per frame, is fast enough that dwarves start walking within a second of a tile being marked.",
  282. "status": "unverified"
  283. },
  284. {
  285. "id": "A5",
  286. "text": "Video standard is detected at start with get_tv(); timers are counted in frames and scaled for 50 Hz (PAL) and 60 Hz (NTSC).",
  287. "status": "default"
  288. },
  289. {
  290. "id": "A6",
  291. "text": "VICE x64sc with default C64 model settings is a faithful reference for timing.",
  292. "status": "default"
  293. }
  294. ],
  295. "openDecisions": [],
  296. "toolchain": {
  297. "recipe": "cc65",
  298. "language": "mixed-c-asm",
  299. "recommended": {
  300. "recipe": "cc65",
  301. "language": "mixed-c-asm"
  302. },
  303. "reasons": [
  304. "BASIC V2 is far too slow: generating a 16 KB map, running pathfinding for three dwarves and redrawing a scrolling 920-tile view every frame is beyond interpreted BASIC.",
  305. "C (cc65) keeps the game rules, map generator and pathfinding readable and easy to change, and cc65 ships a 1351 mouse driver.",
  306. "Small ca65 assembly functions with C prototypes handle the speed-critical parts: the map view redraw and the frame wait. More can be moved to assembly later if profiling shows a hot spot (for example the pathfinding inner loop).",
  307. "The user asked for exactly this split: C with assembly functions callable from C. It matches the Foundry recommendation, so no override is needed.",
  308. "Everything builds on Windows with one cc65 install and runs in VICE x64sc."
  309. ],
  310. "alternatives": [
  311. {
  312. "option": "BASIC V2",
  313. "whyNot": "Too slow for map generation, pathfinding and per-frame view redraws."
  314. },
  315. {
  316. "option": "C only (cc65)",
  317. "whyNot": "A 920-tile view redraw in compiled C takes several frames, so scrolling would stutter. Assembly for that loop is needed."
  318. },
  319. {
  320. "option": "6502 assembly only (ca65)",
  321. "whyNot": "Fastest, but map generation, pathfinding and job logic would take much longer to write and change. The speed is only needed in a few routines."
  322. }
  323. ],
  324. "override": null,
  325. "assumptionsToVerify": [
  326. "A1: the pointer follows the grabbed host mouse and the left button is detected while the joystick in port 2 and the keyboard still work (before M2 is complete).",
  327. "A3: memory map. Check the map file (build/stonehold-64.map) at every milestone; settle where the 16 KB map lives in M1.",
  328. "A4: measure worst-case pathfinding time with a border-colour timing bar in M3.",
  329. "Frame budget: the view redraw finishes within one frame on PAL and NTSC (timing bar) in M1."
  330. ]
  331. },
  332. "starter": {
  333. "screenTitle": "STONEHOLD 64",
  334. "expectedScreen": "Row 0: 'STONEHOLD 64'. Rows 1-23: the part of a randomly generated 128x128 map around the starting cave, drawn with the custom glyphs: brown soft rock, grey hard-rock veins, dark-grey floor in caverns and in the starting cave, three orange dwarves standing on floor in the starting cave. Row 24: 'STONE 000 SEED nnnnn ANY KEY EXITS'. If the memory map is wrong, row 1 shows 'MEMORY CLASH' instead of the map. Any key restores the normal character set and returns to BASIC.",
  335. "smokeChecks": [
  336. {
  337. "row": 0,
  338. "col": 0,
  339. "text": "STONEHOLD 64",
  340. "description": "Title on row 0"
  341. },
  342. {
  343. "row": 24,
  344. "col": 0,
  345. "text": "STONE 000",
  346. "description": "Stone counter on the status line"
  347. },
  348. {
  349. "row": 24,
  350. "col": 11,
  351. "text": "SEED ",
  352. "description": "Seed on the status line"
  353. }
  354. ],
  355. "filesDir": "stonehold-64-files",
  356. "requirements": [
  357. "R1"
  358. ]
  359. },
  360. "milestones": [
  361. {
  362. "id": "M1",
  363. "title": "World and view",
  364. "goal": "A random 128x128 map exists and the player can scroll around it with the keyboard.",
  365. "tasks": [
  366. {
  367. "id": "M1.1",
  368. "text": "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.",
  369. "requirements": [
  370. "R1",
  371. "R2"
  372. ],
  373. "outcome": "Documented memory map in docs/ and a PRG that still passes the smoke test",
  374. "check": "build/stonehold-64.map shows no overlap; smoke test passes"
  375. },
  376. {
  377. "id": "M1.2",
  378. "text": "Map generator in C: seeded PRNG, soft rock, hard-rock veins, caverns, starting cave near the centre. Show the seed on row 24.",
  379. "requirements": [
  380. "R2"
  381. ],
  382. "outcome": "PRG that generates a map and shows 'SEED nnnnn'",
  383. "check": "Manual test MT1.1"
  384. },
  385. {
  386. "id": "M1.3",
  387. "text": "Assembly view redraw (draw_view(x, y), C prototype) copying a 40x23 window of the map to screen and colour RAM via a tile-to-glyph/colour table.",
  388. "requirements": [
  389. "R3"
  390. ],
  391. "outcome": "PRG with a full-view redraw inside one frame",
  392. "check": "Border-colour timing bar ends before the bottom of the screen on PAL and NTSC"
  393. },
  394. {
  395. "id": "M1.4",
  396. "text": "Keyboard cursor (cursor keys and W/A/S/D) with edge scrolling and map-border clamping. Status line: 'STONE 000 SEED nnnnn RUN'.",
  397. "requirements": [
  398. "R3",
  399. "R7"
  400. ],
  401. "outcome": "PRG in which the cursor moves and the view scrolls",
  402. "check": "Manual test MT1.2"
  403. }
  404. ],
  405. "manualTests": [
  406. {
  407. "id": "MT1.1",
  408. "title": "Random map and seed",
  409. "target": "c64",
  410. "setup": "VICE x64sc, PAL.",
  411. "steps": [
  412. "Start the game and note the seed on row 24.",
  413. "Reset VICE and start the game again; note the seed."
  414. ],
  415. "expected": [
  416. "Row 24 shows 'SEED nnnnn' each time",
  417. "The two seeds differ and the visible maps differ",
  418. "Three dwarves stand on floor tiles inside a cave"
  419. ],
  420. "requirements": [
  421. "R1",
  422. "R2"
  423. ]
  424. },
  425. {
  426. "id": "MT1.2",
  427. "title": "Scroll to all four edges",
  428. "target": "c64",
  429. "setup": "VICE x64sc, PAL.",
  430. "steps": [
  431. "Hold the right cursor key until the view stops moving.",
  432. "Repeat for down, left and up (W/A/S/D as well)."
  433. ],
  434. "expected": [
  435. "The view scrolls one tile at a time without garbage characters",
  436. "Scrolling stops at each map edge and the cursor cannot leave the map"
  437. ],
  438. "requirements": [
  439. "R3"
  440. ]
  441. }
  442. ]
  443. },
  444. {
  445. "id": "M2",
  446. "title": "Designation by keyboard, joystick and mouse",
  447. "goal": "The player can mark and unmark rock tiles with any of the three input devices.",
  448. "tasks": [
  449. {
  450. "id": "M2.1",
  451. "text": "Mark/unmark with D on rock tiles only; marked-rock glyph. Joystick port 2 cursor movement with key repeat and fire to mark.",
  452. "requirements": [
  453. "R4"
  454. ],
  455. "outcome": "PRG in which D and fire toggle marks",
  456. "check": "Manual test MT2.1"
  457. },
  458. {
  459. "id": "M2.2",
  460. "text": "1351 mouse via cc65 c64_1351_mou: 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/.",
  461. "requirements": [
  462. "R5"
  463. ],
  464. "outcome": "PRG controllable by mouse",
  465. "check": "Manual test MT2.2"
  466. }
  467. ],
  468. "manualTests": [
  469. {
  470. "id": "MT2.1",
  471. "title": "Mark by keyboard and joystick",
  472. "target": "c64",
  473. "setup": "VICE x64sc, PAL, a joystick or keyset mapped to port 2.",
  474. "steps": [
  475. "Move the cursor onto a rock tile and press D, then D again.",
  476. "Move onto a floor tile and press D.",
  477. "Use the joystick to move to another rock tile and press fire."
  478. ],
  479. "expected": [
  480. "D marks the rock tile (yellow marked glyph) and the second D unmarks it",
  481. "D on floor changes nothing",
  482. "The joystick moves the cursor and fire marks the tile"
  483. ],
  484. "requirements": [
  485. "R4"
  486. ]
  487. },
  488. {
  489. "id": "MT2.2",
  490. "title": "Mark by mouse",
  491. "target": "c64",
  492. "setup": "VICE x64sc, PAL, control port 1 set to Mouse (1351), mouse grab enabled.",
  493. "steps": [
  494. "Move the mouse slowly across the map.",
  495. "Left-click a rock tile, then click it again.",
  496. "Hold the pointer at the right edge of the view."
  497. ],
  498. "expected": [
  499. "The pointer moves smoothly and the highlighted cursor tile is always under the pointer tip",
  500. "The first click marks the tile, the second unmarks it",
  501. "The map scrolls right while the pointer stays at the edge"
  502. ],
  503. "requirements": [
  504. "R5"
  505. ]
  506. }
  507. ]
  508. },
  509. {
  510. "id": "M3",
  511. "title": "Dwarves at work",
  512. "goal": "Three dwarves mine marked tiles on their own; the stone counter and pause work, at the same speed on PAL and NTSC.",
  513. "tasks": [
  514. {
  515. "id": "M3.1",
  516. "text": "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.",
  517. "requirements": [
  518. "R6"
  519. ],
  520. "outcome": "PRG in which dwarves mine marked tiles",
  521. "check": "Manual test MT3.1; timing bar for the search (A4)"
  522. },
  523. {
  524. "id": "M3.2",
  525. "text": "Stone counter increments per mined tile; SPACE pauses and resumes; marking still works while paused.",
  526. "requirements": [
  527. "R7",
  528. "R8"
  529. ],
  530. "outcome": "PRG with a working counter and pause",
  531. "check": "Manual test MT3.2"
  532. },
  533. {
  534. "id": "M3.3",
  535. "text": "Frame-based timers scaled for PAL and NTSC using get_tv().",
  536. "requirements": [
  537. "R10"
  538. ],
  539. "outcome": "PRG with matching speed on both standards",
  540. "check": "Manual test MT3.3"
  541. }
  542. ],
  543. "manualTests": [
  544. {
  545. "id": "MT3.1",
  546. "title": "Dwarves mine marked tiles",
  547. "target": "c64",
  548. "setup": "VICE x64sc, PAL.",
  549. "steps": [
  550. "Mark three adjacent rock tiles at the edge of the starting cave.",
  551. "Watch the dwarves.",
  552. "Mark one soft and one hard rock tile and compare mining time.",
  553. "Mark a rock tile that is completely enclosed by rock."
  554. ],
  555. "expected": [
  556. "Within about 5 seconds dwarves walk to the marked tiles, each to a different one",
  557. "Each mined tile turns into floor",
  558. "Hard rock takes clearly longer (about 3x)",
  559. "The enclosed tile stays marked and no dwarf gets stuck"
  560. ],
  561. "requirements": [
  562. "R6"
  563. ]
  564. },
  565. {
  566. "id": "MT3.2",
  567. "title": "Stone counter and pause",
  568. "target": "c64",
  569. "setup": "VICE x64sc, PAL.",
  570. "steps": [
  571. "Note 'STONE 000' and mark two tiles; wait until both are mined.",
  572. "Press SPACE while a dwarf is walking; mark another tile.",
  573. "Press SPACE again."
  574. ],
  575. "expected": [
  576. "The counter reads 'STONE 002' after two tiles",
  577. "Row 24 shows 'PAUSED', the dwarves stop, and marking still works",
  578. "Row 24 shows 'RUN' and the dwarves continue"
  579. ],
  580. "requirements": [
  581. "R7",
  582. "R8"
  583. ]
  584. },
  585. {
  586. "id": "MT3.3",
  587. "title": "Same speed on PAL and NTSC",
  588. "target": "c64",
  589. "setup": "VICE x64sc started once with -pal and once with -ntsc.",
  590. "steps": [
  591. "Mark a tile 10 tiles away from a dwarf through open floor and time how long it takes to arrive."
  592. ],
  593. "expected": [
  594. "The two times differ by less than 10%"
  595. ],
  596. "requirements": [
  597. "R10"
  598. ]
  599. }
  600. ]
  601. },
  602. {
  603. "id": "M4",
  604. "title": "Sound",
  605. "goal": "The game gives audible feedback for marking and mining.",
  606. "tasks": [
  607. {
  608. "id": "M4.1",
  609. "text": "SID effects (assembly or C): mark/unmark click on one voice, pick strike on another, silenced while paused.",
  610. "requirements": [
  611. "R9"
  612. ],
  613. "outcome": "PRG with sound effects",
  614. "check": "Manual test MT4.1"
  615. }
  616. ],
  617. "manualTests": [
  618. {
  619. "id": "MT4.1",
  620. "title": "Sound effects",
  621. "target": "c64",
  622. "setup": "VICE x64sc, PAL, sound on.",
  623. "steps": [
  624. "Mark and unmark a tile.",
  625. "Watch and listen while a dwarf mines; pause during mining."
  626. ],
  627. "expected": [
  628. "A click on each mark and unmark",
  629. "Repeated pick strikes while mining, which stop when the tile is done or the game is paused"
  630. ],
  631. "requirements": [
  632. "R9"
  633. ]
  634. }
  635. ]
  636. }
  637. ],
  638. "destination": "C:\\Development\\Commodore\\Foundry Projects\\stonehold-64",
  639. "approval": {
  640. "approvedBy": "Daniel Covington",
  641. "approvedOn": "2026-11-26",
  642. "notes": "Approved together with the request to add 1351 mouse support to the Foundry."
  643. },
  644. "generated": {
  645. "by": "C64/C128 Dev Foundry",
  646. "foundryVersion": "1.0",
  647. "on": "2026-11-26",
  648. "fromBrief": "stonehold-64.json"
  649. },
  650. "resolved": {
  651. "_note": "Generated by the C64/C128 Dev Foundry from the approved brief and catalog. tools/*.ps1 read this section; edit it (and docs/toolchain.md) together if the build changes.",
  652. "recipe": "cc65",
  653. "recipeTitle": "Windows cross-development with cc65 (C, ca65 assembly or mixed) and VICE",
  654. "language": "mixed-c-asm",
  655. "languageTitle": "C (cc65) with ca65 assembly modules",
  656. "starter": "cc65-mixed",
  657. "tools": [
  658. {
  659. "id": "cl65",
  660. "executable": "cl65",
  661. "package": "cc65",
  662. "purpose": "cc65 compile/assemble/link driver (C and ca65 assembly)",
  663. "verifiedVersion": "cl65 V2.19 - Git cc3c40c",
  664. "versionArgs": [
  665. "--version"
  666. ],
  667. "envVar": "CC65_HOME",
  668. "searchPaths": [
  669. "C:\\cc65\\bin",
  670. "C:\\Program Files\\cc65\\bin"
  671. ],
  672. "install": {
  673. "source": "https://cc65.github.io/getting-started.html",
  674. "download": "https://sourceforge.net/projects/cc65/files/cc65-snapshot-win64.zip",
  675. "firstCommand": "Download https://sourceforge.net/projects/cc65/files/cc65-snapshot-win64.zip, unzip it (for example to C:\\cc65), then run: [Environment]::SetEnvironmentVariable('CC65_HOME','C:\\cc65','User') and open a new terminal."
  676. },
  677. "docs": [
  678. "https://cc65.github.io/doc/cl65.html",
  679. "https://cc65.github.io/doc/ca65.html"
  680. ],
  681. "requiredFor": [
  682. "build of target c64 (tools/build.ps1)"
  683. ]
  684. },
  685. {
  686. "id": "x64sc",
  687. "executable": "x64sc",
  688. "package": "vice",
  689. "purpose": "VICE cycle-exact Commodore 64 emulator",
  690. "verifiedVersion": "VICE 3.10",
  691. "versionArgs": [],
  692. "envVar": "VICE_HOME",
  693. "searchPaths": [
  694. "C:\\Program Files\\GTK3VICE-*\\bin",
  695. "C:\\Program Files\\SDL2VICE-*",
  696. "%LOCALAPPDATA%\\Microsoft\\WinGet\\Packages\\VICE-Team.VICE.GTK3*\\*\\bin"
  697. ],
  698. "install": {
  699. "source": "https://vice-emu.sourceforge.io/index.html#download",
  700. "download": "https://sourceforge.net/projects/vice-emu/files/releases/binaries/windows/GTK3VICE-3.10-win64.zip/download",
  701. "firstCommand": "winget install --id VICE-Team.VICE.GTK3 -e (or unzip GTK3VICE-3.10-win64.zip and set VICE_HOME to the unzipped folder)"
  702. },
  703. "docs": [
  704. "https://vice-emu.sourceforge.io/vice_2.html#SEC50",
  705. "https://vice-emu.sourceforge.io/vice_6.html",
  706. "https://vice-emu.sourceforge.io/vice_12.html"
  707. ],
  708. "requiredFor": [
  709. "run and smoke test of target c64 (tools/run.ps1, tools/smoke.ps1)"
  710. ]
  711. }
  712. ],
  713. "targets": [
  714. {
  715. "id": "c64",
  716. "name": "Commodore 64 (PAL primary, NTSC supported)",
  717. "platform": "c64",
  718. "display": "vicii-40",
  719. "video": "pal",
  720. "videoSupport": "pal-ntsc",
  721. "artifact": "build/stonehold-64.prg",
  722. "expectedBehavior": "Autostarts to the Stonehold screen drawn with the custom character set: title on row 0, a map view on rows 1-23, status line (stone counter, seed, RUN/PAUSED) on row 24. Three dwarves move on their own to mine tiles the player marks with the mouse, joystick or keyboard.",
  723. "build": {
  724. "kind": "cc65",
  725. "cc65Target": "c64",
  726. "config": "cfg/stonehold-64.cfg",
  727. "defines": [
  728. "FOUNDRY_TARGET_C64"
  729. ],
  730. "sourceDirs": [
  731. "src"
  732. ],
  733. "labels": "build/stonehold-64.lbl",
  734. "map": "build/stonehold-64.map"
  735. },
  736. "disk": null,
  737. "emulator": {
  738. "binary": "x64sc",
  739. "args": [
  740. "-controlport1device",
  741. "3"
  742. ],
  743. "autostart": "prg",
  744. "notes": [
  745. "mouse-1351: Control port 1 = Mouse (1351). Grab the host mouse in VICE with Alt+M (default GTK3 hotkeys; Alt+Q with the WinVICE legacy hotkey file) or start VICE with -mouse; without a grab the C64 pointer does not move. Press Alt+M again to release it."
  746. ]
  747. },
  748. "smoke": {
  749. "ready": {
  750. "kind": "exec",
  751. "symbol": "_smoke_ready",
  752. "address": null
  753. },
  754. "limitCycles": 30000000,
  755. "dumps": [
  756. {
  757. "name": "screen",
  758. "symbol": null,
  759. "address": "0400",
  760. "length": 1000
  761. },
  762. {
  763. "name": "vector",
  764. "symbol": null,
  765. "address": "FFFC",
  766. "length": 2
  767. },
  768. {
  769. "name": "layout",
  770. "symbol": "_layout_ok",
  771. "address": null,
  772. "length": 1
  773. },
  774. {
  775. "name": "gentime",
  776. "symbol": "_gen_jiffies",
  777. "address": null,
  778. "length": 2
  779. }
  780. ],
  781. "checks": [
  782. {
  783. "dump": "screen",
  784. "offset": 0,
  785. "text": "STONEHOLD 64",
  786. "encoding": "screen-mixed",
  787. "bytes": null,
  788. "description": "Title on row 0"
  789. },
  790. {
  791. "dump": "layout",
  792. "offset": 0,
  793. "text": null,
  794. "encoding": null,
  795. "bytes": "01",
  796. "description": "Memory map as expected (layout_ok = 1; 'MEMORY CLASH' otherwise)"
  797. },
  798. {
  799. "dump": "screen",
  800. "offset": 960,
  801. "text": "STONE 000",
  802. "encoding": "screen-mixed",
  803. "bytes": null,
  804. "description": "Stone counter on the status line"
  805. },
  806. {
  807. "dump": "screen",
  808. "offset": 971,
  809. "text": "SEED ",
  810. "encoding": "screen-mixed",
  811. "bytes": null,
  812. "description": "Seed on the status line"
  813. },
  814. {
  815. "dump": "vector",
  816. "offset": 0,
  817. "text": null,
  818. "encoding": null,
  819. "bytes": "E2 FC",
  820. "description": "C64 KERNAL reset vector at $FFFC (machine is in C64 mode)"
  821. }
  822. ],
  823. "expectedScreen": "Row 0: 'STONEHOLD 64'. Rows 1-23: the part of a randomly generated 128x128 map around the starting cave, drawn with the custom glyphs: brown soft rock, grey hard-rock veins, dark-grey floor in caverns and in the starting cave, three orange dwarves standing on floor in the starting cave. Row 24: 'STONE 000 SEED nnnnn ANY KEY EXITS'. If the memory map is wrong, row 1 shows 'MEMORY CLASH' instead of the map. Any key restores the normal character set and returns to BASIC."
  824. },
  825. "recipeStatus": "verified",
  826. "validationPlan": []
  827. }
  828. ],
  829. "onCommodore": null,
  830. "catalogVerifiedOn": "2026-11-26",
  831. "catalogVerifiedWith": {
  832. "cc65": "cl65 V2.19 - Git cc3c40c (Windows x64 snapshot)",
  833. "vice": "VICE 3.10 GTK3 win64 (x64sc, x128, c1541, petcat)",
  834. "powershell": "PowerShell 7.6.7",
  835. "git": "git 2.53.0.windows.1",
  836. "os": "Windows 11 Pro 10.0.26200"
  837. },
  838. "sources": [
  839. "https://cc65.github.io/doc/cl65.html",
  840. "https://cc65.github.io/doc/c64.html#toc4.2",
  841. "https://cc65.github.io/doc/c128.html",
  842. "https://cc65.github.io/doc/ca65.html",
  843. "https://vice-emu.sourceforge.io/vice_2.html#SEC50",
  844. "https://vice-emu.sourceforge.io/vice_7.html#SEC194",
  845. "https://vice-emu.sourceforge.io/vice_12.html"
  846. ]
  847. }
  848. }

Powered by TurnKey Linux.