c64bridge 0.9.0 → 0.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +161 -135
- package/data/assembly/assembly-spec.md +1 -1
- package/data/context/bootstrap.md +3 -3
- package/data/context/fast-paths.md +3 -1
- package/data/graphics/petscii-style-guide.md +1 -1
- package/data/graphics/sprite-charset-best-practices.md +14 -13
- package/data/sound/sid-file-structure.md +5 -5
- package/data/sound/sid-programming-best-practices.md +5 -5
- package/data/vice/vice-binary-monitor-spec.md +26 -10
- package/dist/.tsbuildinfo +1 -1
- package/dist/c64Client.js +107 -8
- package/dist/device.js +43 -3
- package/dist/rag/indexer.js +18 -8
- package/dist/sidwaveCompiler.js +1 -1
- package/dist/tools/debug.js +158 -5
- package/dist/tools/input.js +336 -0
- package/dist/tools/memory.js +326 -1
- package/dist/tools/programRunners.js +45 -6
- package/dist/tools/registry/batch.js +167 -0
- package/dist/tools/registry/graphics.js +101 -1
- package/dist/tools/registry/index.js +4 -0
- package/dist/tools/registry/input.js +2 -0
- package/dist/tools/registry/memory.js +61 -1
- package/dist/tools/responses.js +14 -1
- package/dist/tools/schema.js +4 -5
- package/dist/{assemblyConverter.js → tools/translation/assembler.js} +66 -163
- package/dist/{basicConverter.js → tools/translation/basicTokenizer.js} +1 -1
- package/dist/tools/translation/disassembler.js +150 -0
- package/dist/tools/translation/opcodeInventory.js +126 -0
- package/dist/tools/translation/symbolRegistry.js +49 -0
- package/dist/tools/types.js +19 -4
- package/dist/vice/process.js +43 -2
- package/dist/vice/viceClient.js +5 -1
- package/doc/reviews/audit.md +143 -0
- package/mcp/schemas/c64_batch.schema.json +53 -0
- package/mcp/schemas/c64_config.schema.json +461 -2
- package/mcp/schemas/c64_debug.schema.json +641 -3
- package/mcp/schemas/c64_disk.schema.json +340 -2
- package/mcp/schemas/c64_drive.schema.json +157 -2
- package/mcp/schemas/c64_extract.schema.json +359 -2
- package/mcp/schemas/c64_graphics.schema.json +415 -3
- package/mcp/schemas/c64_input.schema.json +254 -0
- package/mcp/schemas/c64_memory.schema.json +562 -3
- package/mcp/schemas/c64_printer.schema.json +253 -2
- package/mcp/schemas/c64_program.schema.json +499 -2
- package/mcp/schemas/c64_rag.schema.json +82 -2
- package/mcp/schemas/c64_select_backend.schema.json +35 -2
- package/mcp/schemas/c64_sound.schema.json +793 -2
- package/mcp/schemas/c64_stream.schema.json +73 -2
- package/mcp/schemas/c64_system.schema.json +301 -2
- package/mcp/schemas/c64_vice.schema.json +71 -2
- package/mcp/server.json +1 -1
- package/mcp/tools.json +7509 -1929
- package/mcp.json +1 -1
- package/package.json +2 -2
- package/scripts/c64-cli.mjs +2 -2
- package/scripts/run-coverage.mjs +61 -3
- package/scripts/run-tests.mjs +1 -0
- package/scripts/run-tests.ts +3 -0
- package/scripts/update-readme.ts +79 -2
- package/server.json +2 -2
package/README.md
CHANGED
|
@@ -61,12 +61,14 @@ C64 Bridge is listed in the [Official MCP Registry](https://registry.modelcontex
|
|
|
61
61
|
- [Static MCP Interface](#static-mcp-interface)
|
|
62
62
|
- [MCP API Reference](#mcp-api-reference)
|
|
63
63
|
- [Tools](#tools)
|
|
64
|
+
- [c64\_batch](#c64_batch)
|
|
64
65
|
- [c64\_config](#c64_config)
|
|
65
66
|
- [c64\_debug](#c64_debug)
|
|
66
67
|
- [c64\_disk](#c64_disk)
|
|
67
68
|
- [c64\_drive](#c64_drive)
|
|
68
69
|
- [c64\_extract](#c64_extract)
|
|
69
70
|
- [c64\_graphics](#c64_graphics)
|
|
71
|
+
- [c64\_input](#c64_input)
|
|
70
72
|
- [c64\_memory](#c64_memory)
|
|
71
73
|
- [c64\_printer](#c64_printer)
|
|
72
74
|
- [c64\_program](#c64_program)
|
|
@@ -251,8 +253,8 @@ Use this for managed VICE launches:
|
|
|
251
253
|
}
|
|
252
254
|
```
|
|
253
255
|
|
|
254
|
-
- `directory` is optional. When omitted,
|
|
255
|
-
- `VICE_BINARY`, `VICE_DIRECTORY`, `VICE_HOST`, `VICE_PORT`, `VICE_VISIBLE`, `VICE_WARP`, and `VICE_ARGS` override managed VICE startup without editing config files.
|
|
256
|
+
- `directory` is optional. When omitted, C64 Bridge auto-detects a VICE resource directory by looking for the standard C64 ROM set near the emulator binary and in common system locations.
|
|
257
|
+
- `VICE_BINARY`, `VICE_DIRECTORY`, `VICE_HOST`, `VICE_PORT`, `VICE_VISIBLE`, `VICE_WARP`, and `VICE_ARGS` override managed VICE startup without editing config files.
|
|
256
258
|
- If no explicit binary is configured, the runtime prefers `/usr/local/bin/x64sc` when present, then falls back to `x64sc` or `x64` on `PATH` so the same setup remains portable across operating systems.
|
|
257
259
|
|
|
258
260
|
> [!NOTE]
|
|
@@ -272,6 +274,9 @@ Prompt illustration (issued via Copilot in VS Code, using GPT 5.4 Medium):
|
|
|
272
274
|
|
|
273
275
|
```text
|
|
274
276
|
c64u: write a small BASIC program that clears the screen and prints HELLO C64U
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
```text
|
|
275
280
|
vice: write a small BASIC program that clears the screen and prints HELLO VICE
|
|
276
281
|
```
|
|
277
282
|
|
|
@@ -561,22 +566,14 @@ The [`./build`](./build) script at the project root wraps all development tasks
|
|
|
561
566
|
./build test # integration tests (mock backend)
|
|
562
567
|
./build test --real # test against real hardware
|
|
563
568
|
./build test --platform vice --target mock # single test leg
|
|
564
|
-
./build test:vice:mock # curated VICE mock matrix (feature-matrix coverage)
|
|
565
|
-
./build test:vice:device # curated real-VICE validation (device backend + smoke, headless/Xvfb by default)
|
|
566
569
|
./build test:matrix # full matrix (c64u/mock · vice/mock · vice/device)
|
|
567
570
|
./build coverage # merged coverage report
|
|
568
571
|
./build coverage:single --platform c64u --target mock
|
|
569
|
-
npm run vice:smoke # direct VICE binary-monitor smoke test
|
|
570
|
-
npm run vice:smoke:visible # human-visible VICE boot + HELLO demo (keeps window open)
|
|
571
572
|
./build check # build + test matrix (no install)
|
|
572
573
|
./build rag:rebuild # rebuild RAG embeddings
|
|
573
574
|
./build release --version 1.2.3 # prepare a release
|
|
574
575
|
```
|
|
575
576
|
|
|
576
|
-
The visible smoke demo accepts `true`/`false`, `on`/`off`, and `1`/`0` for `VICE_VISIBLE`, `VICE_WARP`, and `VICE_KEEP_OPEN`. `npm run vice:smoke:visible` forces a visible, warp-off session, waits for a stable `READY.` screen, then injects `HELLO` and keeps the window open for inspection.
|
|
577
|
-
|
|
578
|
-
Automation note: `npm run test:vice:device` and `./build` force the real-VICE validation leg into headless/Xvfb mode so the CI-style matrix does not open a confusing local emulator window.
|
|
579
|
-
|
|
580
577
|
> **Starting the MCP server** is not managed by `./build`. Use `npm start` (from source) or `npx -y c64bridge@latest` (published package) as shown in the [Quick Start](#quick-start) section above.
|
|
581
578
|
|
|
582
579
|
## Documentation
|
|
@@ -596,208 +593,237 @@ This allows agents to inspect the available tools, resources, prompts, and schem
|
|
|
596
593
|
|
|
597
594
|
<!-- AUTO-GENERATED:MCP-DOCS-START -->
|
|
598
595
|
|
|
599
|
-
This MCP server exposes **
|
|
596
|
+
This MCP server exposes **17 tools**, **26 resources**, and **10 prompts** for controlling your Commodore 64.
|
|
600
597
|
|
|
601
598
|
### Tools
|
|
602
599
|
|
|
600
|
+
_Address range convention: `address` + `length` means start address plus byte count; `startAddress` + `endAddress` means inclusive bounds._
|
|
601
|
+
|
|
602
|
+
#### c64_batch
|
|
603
|
+
|
|
604
|
+
Execute multiple c64bridge tool calls in a single request. Reduces latency for multi-step workflows.
|
|
605
|
+
|
|
606
|
+
_No operations defined._
|
|
607
|
+
|
|
603
608
|
#### c64_config
|
|
604
609
|
|
|
605
610
|
Grouped entry point for configuration reads/writes, diagnostics, and snapshots.
|
|
606
611
|
|
|
607
|
-
| Operation | Description | Required Inputs | Notes | C64U | VICE |
|
|
608
|
-
| --- | --- | --- | --- | --- | --- |
|
|
609
|
-
| `batch_update` | Apply multiple configuration updates in a single request. | — | — | ✅ | ✅ |
|
|
610
|
-
| `diff` | Compare the current configuration with a snapshot. | — | — | ✅ | ✅ |
|
|
611
|
-
| `get` | Read a configuration category or specific item. |
|
|
612
|
-
| `info` | Retrieve Ultimate hardware information and status. | — | — | ✅ | ✅ |
|
|
613
|
-
| `list` | List configuration categories reported by the firmware. | — | — | ✅ | ✅ |
|
|
614
|
-
| `load_flash` | Load configuration from flash storage. | — | — | ✅ | |
|
|
615
|
-
| `read_debugreg` | Read the Ultimate debug register ($D7FF). | — | — | ✅ | |
|
|
616
|
-
| `reset_defaults` | Reset firmware configuration to factory defaults. | — | — | ✅ | |
|
|
617
|
-
| `restore` | Restore configuration from a snapshot file. |
|
|
618
|
-
| `save_flash` | Persist the current configuration to flash storage. | — | — | ✅ | |
|
|
619
|
-
| `set` | Write a configuration value in the selected category. | — | — | ✅ | ✅ |
|
|
620
|
-
| `shuffle` | Discover PRG/CRT files and run each with optional screen capture. | — | — | ✅ | |
|
|
621
|
-
| `snapshot` | Snapshot configuration to disk for later restore or diff. | — | — | ✅ | ✅ |
|
|
622
|
-
| `version` | Fetch firmware version details. | — | — | ✅ | ✅ |
|
|
623
|
-
| `write_debugreg` | Write a hex value to the Ultimate debug register ($D7FF). | — | — | ✅ | |
|
|
612
|
+
| Operation | Description | Required Inputs | Optional Inputs | Notes | C64U | VICE |
|
|
613
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
614
|
+
| `batch_update` | Apply multiple configuration updates in a single request. | — | — | — | ✅ | ✅ |
|
|
615
|
+
| `diff` | Compare the current configuration with a snapshot. | `path` | — | — | ✅ | ✅ |
|
|
616
|
+
| `get` | Read a configuration category or specific item. | `category` | `item` | — | ✅ | ✅ |
|
|
617
|
+
| `info` | Retrieve Ultimate hardware information and status. | — | — | — | ✅ | ✅ |
|
|
618
|
+
| `list` | List configuration categories reported by the firmware. | — | — | — | ✅ | ✅ |
|
|
619
|
+
| `load_flash` | Load configuration from flash storage. | — | — | — | ✅ | |
|
|
620
|
+
| `read_debugreg` | Read the Ultimate debug register ($D7FF). | — | — | — | ✅ | |
|
|
621
|
+
| `reset_defaults` | Reset firmware configuration to factory defaults. | — | — | — | ✅ | |
|
|
622
|
+
| `restore` | Restore configuration from a snapshot file. | `path` | `applyToFlash=false` | — | ✅ | ✅ |
|
|
623
|
+
| `save_flash` | Persist the current configuration to flash storage. | — | — | — | ✅ | |
|
|
624
|
+
| `set` | Write a configuration value in the selected category. | `category`, `item`, `value` | — | — | ✅ | ✅ |
|
|
625
|
+
| `shuffle` | Discover PRG/CRT files and run each with optional screen capture. | — | `root="/"`, `extensions=["prg","crt"]`, `durationMs=5000`, `captureScreen=true`, `maxPrograms=10`, `outputPath`, `resetDelayMs=100` | — | ✅ | |
|
|
626
|
+
| `snapshot` | Snapshot configuration to disk for later restore or diff. | `path` | — | — | ✅ | ✅ |
|
|
627
|
+
| `version` | Fetch firmware version details. | — | — | — | ✅ | ✅ |
|
|
628
|
+
| `write_debugreg` | Write a hex value to the Ultimate debug register ($D7FF). | `value` | — | — | ✅ | |
|
|
624
629
|
|
|
625
630
|
#### c64_debug
|
|
626
631
|
|
|
627
632
|
Grouped entry point for VICE debugger operations (breakpoints, registers, stepping).
|
|
628
633
|
|
|
629
|
-
| Operation | Description | Required Inputs | Notes | C64U | VICE |
|
|
630
|
-
| --- | --- | --- | --- | --- | --- |
|
|
631
|
-
| `
|
|
632
|
-
| `
|
|
633
|
-
| `
|
|
634
|
-
| `
|
|
635
|
-
| `
|
|
636
|
-
| `
|
|
637
|
-
| `
|
|
638
|
-
| `
|
|
639
|
-
| `
|
|
640
|
-
| `
|
|
641
|
-
| `
|
|
634
|
+
| Operation | Description | Required Inputs | Optional Inputs | Notes | C64U | VICE |
|
|
635
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
636
|
+
| `continue_execution` | Exit the Binary Monitor and resume CPU execution (BM 0xAA Exit). | — | — | — | | ✅ |
|
|
637
|
+
| `create_checkpoint` | Create a new checkpoint (breakpoint) in VICE. | `address` | `endAddress`, `stopOnHit=true`, `enabled=true`, `temporary=false`, `label`, `operations`, `memspace` | — | | ✅ |
|
|
638
|
+
| `delete_checkpoint` | Remove a checkpoint by id. | `id` | — | — | | ✅ |
|
|
639
|
+
| `get_checkpoint` | Fetch a single checkpoint by id. | `id` | — | — | | ✅ |
|
|
640
|
+
| `get_monitor_state` | Read CPU registers and return the current monitor state. | — | `memspace` | — | | ✅ |
|
|
641
|
+
| `get_registers` | Read register values, optionally filtered by name or id. | — | `memspace`, `registers` | — | | ✅ |
|
|
642
|
+
| `list_checkpoints` | List all active VICE checkpoints (breakpoints). | — | — | — | | ✅ |
|
|
643
|
+
| `list_registers` | List available registers (metadata). | — | `memspace` | — | | ✅ |
|
|
644
|
+
| `nuclear_reset` | Kill and restart the VICE process (managed instances only). | — | — | — | | ✅ |
|
|
645
|
+
| `set_condition` | Attach a conditional expression to a checkpoint. | `id`, `expression` | — | — | | ✅ |
|
|
646
|
+
| `set_registers` | Write register values. | `writes` | `memspace` | — | | ✅ |
|
|
647
|
+
| `step` | Single-step CPU execution. | — | `count=1`, `mode` | — | | ✅ |
|
|
648
|
+
| `step_return` | Continue execution until the current routine returns. | — | — | — | | ✅ |
|
|
649
|
+
| `toggle_checkpoint` | Enable or disable a checkpoint by id. | `id`, `enabled` | — | — | | ✅ |
|
|
650
|
+
| `wait_for_state` | Poll CPU registers until PC equals expectedPC or timeout elapses. | — | `expectedPC`, `timeoutMs=5000`, `pollMs=100` | — | | ✅ |
|
|
642
651
|
|
|
643
652
|
#### c64_disk
|
|
644
653
|
|
|
645
654
|
Grouped entry point for disk mounts, listings, image creation, and program discovery.
|
|
646
655
|
|
|
647
|
-
| Operation | Description | Required Inputs | Notes | C64U | VICE |
|
|
648
|
-
| --- | --- | --- | --- | --- | --- |
|
|
649
|
-
| `create_image` | Create a blank disk image of the specified format. |
|
|
650
|
-
| `file_info` | Inspect metadata for a file on the Ultimate filesystem. | — |
|
|
651
|
-
| `find_and_run` | Search for a PRG/CRT by name substring and run the first match. |
|
|
652
|
-
| `list_drives` | List Ultimate drive slots and their mounted images. | — |
|
|
653
|
-
| `mount` | Mount a disk image with optional verification and retries. |
|
|
654
|
-
| `unmount` | Remove the mounted image from an Ultimate drive slot. | — |
|
|
656
|
+
| Operation | Description | Required Inputs | Optional Inputs | Notes | C64U | VICE |
|
|
657
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
658
|
+
| `create_image` | Create a blank disk image of the specified format. | `format`, `path` | `diskname`, `tracks` | — | ✅ | |
|
|
659
|
+
| `file_info` | Inspect metadata for a file on the Ultimate filesystem. | `path` | — | — | ✅ | |
|
|
660
|
+
| `find_and_run` | Search for a PRG/CRT by name substring and run the first match. | `nameContains` | `root="/"`, `extensions`, `caseInsensitive=true`, `sort="discovered"`, `waitMs=0`, `captureCandidates=10` | — | ✅ | |
|
|
661
|
+
| `list_drives` | List Ultimate drive slots and their mounted images. | — | — | — | ✅ | ✅ |
|
|
662
|
+
| `mount` | Mount a disk image with optional verification and retries. | `drive`, `image` | `type`, `attachmentMode`, `driveMode`, `verify=false`, `powerOnIfNeeded=true`, `resetAfterMount=true`, `maxRetries=2`, `retryDelayMs=500` | supports verify | ✅ | ✅ |
|
|
663
|
+
| `unmount` | Remove the mounted image from an Ultimate drive slot. | `drive` | — | — | ✅ | ✅ |
|
|
655
664
|
|
|
656
665
|
#### c64_drive
|
|
657
666
|
|
|
658
667
|
Grouped entry point for drive power, mode, reset, and ROM operations.
|
|
659
668
|
|
|
660
|
-
| Operation | Description | Required Inputs | Notes | C64U | VICE |
|
|
661
|
-
| --- | --- | --- | --- | --- | --- |
|
|
662
|
-
| `load_rom` | Temporarily load a custom ROM into an Ultimate drive slot. | — | — | ✅ | |
|
|
663
|
-
| `power_off` | Power off a specific Ultimate drive slot. | — | — | ✅ | ✅ |
|
|
664
|
-
| `power_on` | Power on a specific Ultimate drive slot. | — | — | ✅ | ✅ |
|
|
665
|
-
| `reset` | Issue an IEC reset for the selected drive slot. | — | — | ✅ | ✅ |
|
|
666
|
-
| `set_mode` | Set the emulation mode for a drive slot (1541/1571/1581). | — | — | ✅ | ✅ |
|
|
669
|
+
| Operation | Description | Required Inputs | Optional Inputs | Notes | C64U | VICE |
|
|
670
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
671
|
+
| `load_rom` | Temporarily load a custom ROM into an Ultimate drive slot. | `drive`, `path` | — | — | ✅ | |
|
|
672
|
+
| `power_off` | Power off a specific Ultimate drive slot. | `drive` | — | — | ✅ | ✅ |
|
|
673
|
+
| `power_on` | Power on a specific Ultimate drive slot. | `drive` | — | — | ✅ | ✅ |
|
|
674
|
+
| `reset` | Issue an IEC reset for the selected drive slot. | `drive` | — | — | ✅ | ✅ |
|
|
675
|
+
| `set_mode` | Set the emulation mode for a drive slot (1541/1571/1581). | `drive`, `mode` | — | — | ✅ | ✅ |
|
|
667
676
|
|
|
668
677
|
#### c64_extract
|
|
669
678
|
|
|
670
679
|
Grouped entry point for sprite/charset extraction, memory dumps, filesystem stats, and firmware health checks.
|
|
671
680
|
|
|
672
|
-
| Operation | Description | Required Inputs | Notes | C64U | VICE |
|
|
673
|
-
| --- | --- | --- | --- | --- | --- |
|
|
674
|
-
| `charset` | Locate and extract 2KB character sets from RAM. | — | — | ✅ | |
|
|
675
|
-
| `firmware_health` | Run firmware readiness checks and report status metrics. | — | — | ✅ | |
|
|
676
|
-
| `fs_stats` | Walk the filesystem and aggregate counts/bytes by extension. | — | — | ✅ | |
|
|
677
|
-
| `memory_dump` | Dump a RAM range to hex or binary files with manifest metadata. |
|
|
678
|
-
| `sprites` | Scan RAM for sprites and optionally export .spr files. |
|
|
681
|
+
| Operation | Description | Required Inputs | Optional Inputs | Notes | C64U | VICE |
|
|
682
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
683
|
+
| `charset` | Locate and extract 2KB character sets from RAM. | — | `address`, `scanRange="common"`, `outputPath`, `pauseDuringRead=true`, `minNonEmptyChars=32`, `minEntropy=0.3` | — | ✅ | |
|
|
684
|
+
| `firmware_health` | Run firmware readiness checks and report status metrics. | — | — | — | ✅ | |
|
|
685
|
+
| `fs_stats` | Walk the filesystem and aggregate counts/bytes by extension. | — | `root="/"`, `extensions`, `includeContainers=true`, `maxSamplesPerExtension=3` | — | ✅ | |
|
|
686
|
+
| `memory_dump` | Dump a RAM range to hex or binary files with manifest metadata. | `address`, `length`, `outputPath` | `format="hex"`, `chunkSize=512`, `pauseDuringRead=true`, `retries=1` | — | ✅ | |
|
|
687
|
+
| `sprites` | Scan RAM for sprites and optionally export .spr files. | `address`, `length` | `stride=64`, `maxSprites=16`, `minNonZeroRows=4`, `minSetBits=12`, `includeBase64=true`, `outputDir`, `pauseDuringRead=true` | — | ✅ | |
|
|
679
688
|
|
|
680
689
|
#### c64_graphics
|
|
681
690
|
|
|
682
691
|
Grouped entry point for frame capture and graphics rendering workflows.
|
|
683
692
|
|
|
684
|
-
| Operation | Description | Required Inputs | Notes | C64U | VICE |
|
|
685
|
-
| --- | --- | --- | --- | --- | --- |
|
|
686
|
-
| `capture_frame` | Capture one or more complete video frames from the active backend. | — | — | ✅ | ✅ |
|
|
687
|
-
| `
|
|
688
|
-
| `
|
|
689
|
-
| `
|
|
690
|
-
| `
|
|
693
|
+
| Operation | Description | Required Inputs | Optional Inputs | Notes | C64U | VICE |
|
|
694
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
695
|
+
| `capture_frame` | Capture one or more complete video frames from the active backend. | — | `count=1`, `includePixels=true`, `encoding="base64"` | — | ✅ | ✅ |
|
|
696
|
+
| `get_display_state` | Read VIC-II and CIA2 registers to determine the current graphics mode and memory layout. Works on C64U and VICE; both backends are read through shared memory primitives so the response shape is identical. | — | — | — | ✅ | ✅ |
|
|
697
|
+
| `render_bitmap` | Import an image file, convert it to VIC-II bitmap memory, write it into RAM, and display it. | `imagePath`, `format` | `bitmapAddress=8192`, `screenAddress=1024`, `borderColor=0`, `backgroundColor=0`, `preserveAspect=true` | — | ✅ | ✅ |
|
|
698
|
+
| `render_petscii_art` | Create PETSCII art from prompts, text, or explicit bitmap data, and optionally display it on the C64. | — | `prompt`, `text`, `maxWidth`, `maxHeight`, `borderColor`, `backgroundColor`, `foregroundColor`, `dryRun=false`, `bitmap` | — | ✅ | ✅ |
|
|
699
|
+
| `render_petscii_text` | Display PETSCII text with optional border and background colours. | `text` | `borderColor`, `backgroundColor` | — | ✅ | ✅ |
|
|
700
|
+
| `render_sprite` | Display supplied 63-byte sprite data at the requested position and colour by writing memory and patching VIC-II registers directly. | `sprite` | `index=0`, `x=100`, `y=100`, `color=1`, `multicolour=false` | — | ✅ | ✅ |
|
|
701
|
+
|
|
702
|
+
#### c64_input
|
|
703
|
+
|
|
704
|
+
Keyboard buffer injection (cross-platform) and joystick simulation (VICE only).
|
|
705
|
+
|
|
706
|
+
| Operation | Description | Required Inputs | Optional Inputs | Notes | C64U | VICE |
|
|
707
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
708
|
+
| `joystick` | Simulate joystick input by writing directly to CIA1 Port A/B registers. | `port`, `controls`, `action` | `durationMs=80` | — | | ✅ |
|
|
709
|
+
| `key` | Tap a single key or hold it for a duration. | `key` | `durationMs=0`, `count=1` | — | ✅ | ✅ |
|
|
710
|
+
| `write_text` | Send a text string to the keyboard buffer, with PETSCII token expansion. | `text` | `delayMs=0` | — | ✅ | ✅ |
|
|
691
711
|
|
|
692
712
|
#### c64_memory
|
|
693
713
|
|
|
694
714
|
Grouped entry point for memory I/O, screen reads, and screen polling.
|
|
695
715
|
|
|
696
|
-
| Operation | Description | Required Inputs | Notes | C64U | VICE |
|
|
697
|
-
| --- | --- | --- | --- | --- | --- |
|
|
698
|
-
| `
|
|
699
|
-
| `
|
|
700
|
-
| `
|
|
701
|
-
| `
|
|
716
|
+
| Operation | Description | Required Inputs | Optional Inputs | Notes | C64U | VICE |
|
|
717
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
718
|
+
| `compare_memory` | Compare two memory regions byte-by-byte and report differences. | `address1`, `address2`, `length` | `maxDiffs=10` | — | ✅ | ✅ |
|
|
719
|
+
| `copy_memory` | Copy a RAM region to another address. | `source`, `dest`, `length` | — | — | ✅ | ✅ |
|
|
720
|
+
| `disassemble` | Disassemble a memory region into annotated 6502/6510 instructions, including undocumented opcodes with canonical names. Symbol annotations from `.vs` files are applied when available. Works on both C64U and VICE. | `address` | `length=64`, `instructionCount` | — | ✅ | ✅ |
|
|
721
|
+
| `fill_memory` | Fill a memory range with a repeating byte pattern. | `address`, `length`, `pattern` | — | — | ✅ | ✅ |
|
|
722
|
+
| `read` | Read a range of bytes and return a hex dump with address metadata. | `address` | `length=256` | — | ✅ | ✅ |
|
|
723
|
+
| `read_screen` | Return the current 40x25 text screen converted to ASCII. | — | — | — | ✅ | ✅ |
|
|
724
|
+
| `save_memory` | Dump a memory range to a local file, with an optional PRG load-address header. | `startAddress`, `endAddress`, `filePath` | `asPrg=true` | — | ✅ | ✅ |
|
|
725
|
+
| `search_memory` | Search for a byte pattern within a memory range and return matching addresses. | `startAddress`, `endAddress`, `pattern` | `maxResults=10` | — | ✅ | ✅ |
|
|
726
|
+
| `wait_for_text` | Poll the screen until a substring or regex appears, or timeout elapses. | `pattern` | `isRegex=false`, `caseInsensitive=true`, `timeoutMs=3000`, `intervalMs=100` | — | ✅ | ✅ |
|
|
727
|
+
| `write` | Write a hexadecimal byte sequence into RAM. | `address`, `bytes` | `verify=false`, `expected`, `mask`, `abortOnMismatch=true` | supports verify | ✅ | ✅ |
|
|
702
728
|
|
|
703
729
|
#### c64_printer
|
|
704
730
|
|
|
705
731
|
Grouped entry point for Commodore and Epson printing helpers.
|
|
706
732
|
|
|
707
|
-
| Operation | Description | Required Inputs | Notes | C64U | VICE |
|
|
708
|
-
| --- | --- | --- | --- | --- | --- |
|
|
709
|
-
| `define_chars` | Define custom printer characters (Commodore DLL mode). |
|
|
710
|
-
| `print_bitmap` | Print a bitmap row via Commodore (BIM) or Epson ESC/P workflows. |
|
|
711
|
-
| `print_text` | Generate BASIC that prints text to device 4. |
|
|
733
|
+
| Operation | Description | Required Inputs | Optional Inputs | Notes | C64U | VICE |
|
|
734
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
735
|
+
| `define_chars` | Define custom printer characters (Commodore DLL mode). | `firstChar`, `chars` | `secondaryAddress` | — | ✅ | |
|
|
736
|
+
| `print_bitmap` | Print a bitmap row via Commodore (BIM) or Epson ESC/P workflows. | `printer="commodore"`, `columns` | `repeats`, `useSubRepeat`, `secondaryAddress`, `ensureMsb=true`, `mode`, `density`, `timesPerLine` | — | ✅ | |
|
|
737
|
+
| `print_text` | Generate BASIC that prints text to device 4. | `text` | `target="commodore"`, `secondaryAddress`, `formFeed=false` | — | ✅ | |
|
|
712
738
|
|
|
713
739
|
#### c64_program
|
|
714
740
|
|
|
715
741
|
Grouped entry point for program upload, execution, and batch workflows.
|
|
716
742
|
|
|
717
|
-
| Operation | Description | Required Inputs | Notes | C64U | VICE |
|
|
718
|
-
| --- | --- | --- | --- | --- | --- |
|
|
719
|
-
| `batch_run` | Run multiple PRG/CRT programs with post-run assertions. |
|
|
720
|
-
| `bundle_run` | Capture screen, memory, and debug registers into an artifact bundle. |
|
|
721
|
-
| `cross_platform_greeting` | Show a platform-customized greeting on one or more configured backends, capture screenshots, and verify the results. | — | supports verify | ✅ | ✅ |
|
|
722
|
-
| `load_prg` | Load a PRG from Ultimate storage without executing it. |
|
|
723
|
-
| `run_crt` | Mount and run a CRT cartridge image. | — |
|
|
724
|
-
| `run_prg` | Load and execute a PRG from Ultimate-visible storage on c64u or a host-local path on VICE. |
|
|
725
|
-
| `upload_run_asm` | Assemble 6502/6510 source, upload the PRG, and execute it. |
|
|
726
|
-
| `upload_run_basic` | Upload Commodore BASIC v2 source and execute it immediately. |
|
|
743
|
+
| Operation | Description | Required Inputs | Optional Inputs | Notes | C64U | VICE |
|
|
744
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
745
|
+
| `batch_run` | Run multiple PRG/CRT programs with post-run assertions. | `programs` | `continueOnError=false`, `durationMs=2000`, `outputPath`, `resetDelayMs=100` | — | ✅ | ✅ |
|
|
746
|
+
| `bundle_run` | Capture screen, memory, and debug registers into an artifact bundle. | `runId`, `outputPath` | `captureScreen=true`, `memoryRanges`, `captureDebugReg=true` | — | ✅ | |
|
|
747
|
+
| `cross_platform_greeting` | Show a platform-customized greeting on one or more configured backends, capture screenshots, and verify the results. | — | `platforms=["vice","c64u"]`, `messageTemplate="HAVE A GREAT DAY, {PLATFORM}!"`, `verify=true`, `captureScreenshot=true`, `outputPath`, `restoreActiveBackend=true`, `timeoutMs=1500`, `pollIntervalMs=100` | supports verify | ✅ | ✅ |
|
|
748
|
+
| `load_prg` | Load a PRG from Ultimate storage without executing it. | `path` | `symbolsFile` | — | ✅ | |
|
|
749
|
+
| `run_crt` | Mount and run a CRT cartridge image. | `path` | — | — | ✅ | |
|
|
750
|
+
| `run_prg` | Load and execute a PRG from Ultimate-visible storage on c64u or a host-local path on VICE. | `path` | `symbolsFile` | — | ✅ | ✅ |
|
|
751
|
+
| `upload_run_asm` | Assemble 6502/6510 source, upload the PRG, and execute it. | `program` | `verify=false` | supports verify | ✅ | ✅ |
|
|
752
|
+
| `upload_run_basic` | Upload Commodore BASIC v2 source and execute it immediately. | `program` | `verify=false` | supports verify | ✅ | ✅ |
|
|
727
753
|
|
|
728
754
|
#### c64_rag
|
|
729
755
|
|
|
730
756
|
Grouped entry point for BASIC and assembly RAG lookups.
|
|
731
757
|
|
|
732
|
-
| Operation | Description | Required Inputs | Notes | C64U | VICE |
|
|
733
|
-
| --- | --- | --- | --- | --- | --- |
|
|
734
|
-
| `asm` | Retrieve 6502/6510 assembly references from the local knowledge base. |
|
|
735
|
-
| `basic` | Retrieve BASIC references and snippets from the local knowledge base. |
|
|
758
|
+
| Operation | Description | Required Inputs | Optional Inputs | Notes | C64U | VICE |
|
|
759
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
760
|
+
| `asm` | Retrieve 6502/6510 assembly references from the local knowledge base. | `q` | `k=3` | — | ✅ | ✅ |
|
|
761
|
+
| `basic` | Retrieve BASIC references and snippets from the local knowledge base. | `q` | `k=3` | — | ✅ | ✅ |
|
|
736
762
|
|
|
737
763
|
#### c64_select_backend
|
|
738
764
|
|
|
739
765
|
Switch the active backend between C64U hardware and the VICE emulator at runtime.
|
|
740
766
|
|
|
741
|
-
| Operation | Description | Required Inputs | Notes | C64U | VICE |
|
|
742
|
-
| --- | --- | --- | --- | --- | --- |
|
|
743
|
-
| `select` | Switch the active runtime backend without restarting the MCP server. | — | — | ✅ | ✅ |
|
|
767
|
+
| Operation | Description | Required Inputs | Optional Inputs | Notes | C64U | VICE |
|
|
768
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
769
|
+
| `select` | Switch the active runtime backend without restarting the MCP server. | `backend` | — | — | ✅ | ✅ |
|
|
744
770
|
|
|
745
771
|
#### c64_sound
|
|
746
772
|
|
|
747
773
|
Grouped entry point for SID control, playback, composition, and analysis workflows.
|
|
748
774
|
|
|
749
|
-
| Operation | Description | Required Inputs | Notes | C64U | VICE |
|
|
750
|
-
| --- | --- | --- | --- | --- | --- |
|
|
751
|
-
| `analyze` | Automatically analyze SID playback when verification is requested. |
|
|
752
|
-
| `capture_samples` | Capture raw stereo PCM samples from the C64 Ultimate audio UDP stream. | — |
|
|
753
|
-
| `compile_play` | Compile SIDWAVE or CPG source and optionally play it immediately. | — |
|
|
754
|
-
| `generate` | Generate a lightweight SID arpeggio playback sequence. | — |
|
|
755
|
-
| `note_off` | Release a SID voice by clearing its gate bit. | — |
|
|
756
|
-
| `note_on` | Trigger a SID voice with configurable waveform, ADSR, and pitch. | — |
|
|
757
|
-
| `pipeline` | Compile a SIDWAVE score, play it, and analyze the recording. | — | supports verify | ✅ | |
|
|
758
|
-
| `play_mod_file` | Play a MOD tracker module via the Ultimate SID player. | — |
|
|
759
|
-
| `play_preset` | Compile and play a built-in SID preset such as Für Elise by Beethoven. | — | supports verify | ✅ | ✅ |
|
|
760
|
-
| `play_sid_file` | Play a SID file stored on the Ultimate filesystem. |
|
|
761
|
-
| `record_analyze` | Record audio for a fixed duration and return SID analysis metrics. |
|
|
762
|
-
| `reset` | Soft or hard reset of SID registers to clear glitches. | — |
|
|
763
|
-
| `set_volume` | Set the SID master volume register at $D418 (0-15). | — |
|
|
764
|
-
| `silence_all` | Silence all SID voices with optional audio verification. | — | supports verify | ✅ | ✅ |
|
|
775
|
+
| Operation | Description | Required Inputs | Optional Inputs | Notes | C64U | VICE |
|
|
776
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
777
|
+
| `analyze` | Automatically analyze SID playback when verification is requested. | `request` | `durationSeconds`, `expectedSidwave` | — | ✅ | |
|
|
778
|
+
| `capture_samples` | Capture raw stereo PCM samples from the C64 Ultimate audio UDP stream. | — | `count=256`, `encoding="base64"` | — | ✅ | |
|
|
779
|
+
| `compile_play` | Compile SIDWAVE or CPG source and optionally play it immediately. | — | `sidwave`, `cpg`, `format`, `output="prg"`, `dryRun=false` | — | ✅ | ✅ |
|
|
780
|
+
| `generate` | Generate a lightweight SID arpeggio playback sequence. | — | `root="C4"`, `pattern="0,4,7"`, `steps=16`, `tempoMs=120`, `waveform="tri"`, `preset="classic"` | — | ✅ | ✅ |
|
|
781
|
+
| `note_off` | Release a SID voice by clearing its gate bit. | `voice` | — | — | ✅ | ✅ |
|
|
782
|
+
| `note_on` | Trigger a SID voice with configurable waveform, ADSR, and pitch. | — | `voice=1`, `note`, `frequencyHz`, `system="PAL"`, `waveform="pulse"`, `pulseWidth=2048`, `attack=1`, `decay=1`, `sustain=15`, `release=3` | — | ✅ | ✅ |
|
|
783
|
+
| `pipeline` | Compile a SIDWAVE score, play it, and analyze the recording. | — | `sidwave`, `cpg`, `output="prg"`, `waitBeforeCaptureMs=500`, `analysisDurationSeconds=3`, `expectedSidwave`, `verifySilenceBefore=true`, `verifySilenceAfter=true`, `silenceDurationSeconds=1.5`, `silenceRmsThreshold=0.02`, `postSilenceWaitMs=200`, `silenceWaitMs=150` | supports verify | ✅ | |
|
|
784
|
+
| `play_mod_file` | Play a MOD tracker module via the Ultimate SID player. | `path` | — | — | ✅ | |
|
|
785
|
+
| `play_preset` | Compile and play a built-in SID preset such as Für Elise by Beethoven. | — | `preset="fuer_elise"`, `platforms`, `verify=true`, `analysisDurationSeconds=4`, `waitBeforeCaptureMs=400`, `restoreActiveBackend=true` | supports verify | ✅ | ✅ |
|
|
786
|
+
| `play_sid_file` | Play a SID file stored on the Ultimate filesystem. | `path` | `songnr` | — | ✅ | |
|
|
787
|
+
| `record_analyze` | Record audio for a fixed duration and return SID analysis metrics. | `durationSeconds` | `expectedSidwave` | — | ✅ | |
|
|
788
|
+
| `reset` | Soft or hard reset of SID registers to clear glitches. | — | `hard=false` | — | ✅ | ✅ |
|
|
789
|
+
| `set_volume` | Set the SID master volume register at $D418 (0-15). | `volume` | — | — | ✅ | ✅ |
|
|
790
|
+
| `silence_all` | Silence all SID voices with optional audio verification. | — | `verify=false` | supports verify | ✅ | ✅ |
|
|
765
791
|
|
|
766
792
|
#### c64_stream
|
|
767
793
|
|
|
768
794
|
Grouped entry point for starting and stopping Ultimate streaming sessions.
|
|
769
795
|
|
|
770
|
-
| Operation | Description | Required Inputs | Notes | C64U | VICE |
|
|
771
|
-
| --- | --- | --- | --- | --- | --- |
|
|
772
|
-
| `start` | Start an Ultimate streaming session toward a host:port target. | — | — | ✅ | |
|
|
773
|
-
| `stop` | Stop an active Ultimate streaming session. | — | — | ✅ | |
|
|
796
|
+
| Operation | Description | Required Inputs | Optional Inputs | Notes | C64U | VICE |
|
|
797
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
798
|
+
| `start` | Start an Ultimate streaming session toward a host:port target. | `stream`, `target` | — | — | ✅ | |
|
|
799
|
+
| `stop` | Stop an active Ultimate streaming session. | `stream` | — | — | ✅ | |
|
|
774
800
|
|
|
775
801
|
#### c64_system
|
|
776
802
|
|
|
777
803
|
Grouped entry point for power, reset, menu, and background task control.
|
|
778
804
|
|
|
779
|
-
| Operation | Description | Required Inputs | Notes | C64U | VICE |
|
|
780
|
-
| --- | --- | --- | --- | --- | --- |
|
|
781
|
-
| `list_tasks` | List known background tasks with status metadata. | — | — | ✅ | ✅ |
|
|
782
|
-
| `menu` | Toggle the Ultimate menu button for navigation. | — | — | ✅ | |
|
|
783
|
-
| `pause` | Pause the machine until resumed. | — | — | ✅ | |
|
|
784
|
-
| `performance_report` | Summarize diagnostics spans and tool latencies from the current or latest MCP session. | — | — | ✅ | ✅ |
|
|
785
|
-
| `poweroff` | Request a controlled shutdown via the Ultimate firmware. | — | — | ✅ | ✅ |
|
|
786
|
-
| `reboot` | Trigger a firmware reboot to recover from faults. | — | — | ✅ | ✅ |
|
|
787
|
-
| `reset` | Issue a soft reset without cutting power. | — | — | ✅ | ✅ |
|
|
788
|
-
| `resume` | Resume CPU execution after a pause. | — | — | ✅ | |
|
|
789
|
-
| `start_task` | Start a named background task that runs on an interval. |
|
|
790
|
-
| `stop_all_tasks` | Stop every running background task and persist state. | — | — | ✅ | ✅ |
|
|
791
|
-
| `stop_task` | Stop a specific background task and clear its timer. | — | — | ✅ | ✅ |
|
|
805
|
+
| Operation | Description | Required Inputs | Optional Inputs | Notes | C64U | VICE |
|
|
806
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
807
|
+
| `list_tasks` | List known background tasks with status metadata. | — | — | — | ✅ | ✅ |
|
|
808
|
+
| `menu` | Toggle the Ultimate menu button for navigation. | — | — | — | ✅ | |
|
|
809
|
+
| `pause` | Pause the machine until resumed. | — | — | — | ✅ | |
|
|
810
|
+
| `performance_report` | Summarize diagnostics spans and tool latencies from the current or latest MCP session. | — | `scope="current"`, `includeTimeline=true`, `maxEntries=25` | — | ✅ | ✅ |
|
|
811
|
+
| `poweroff` | Request a controlled shutdown via the Ultimate firmware. | — | — | — | ✅ | ✅ |
|
|
812
|
+
| `reboot` | Trigger a firmware reboot to recover from faults. | — | — | — | ✅ | ✅ |
|
|
813
|
+
| `reset` | Issue a soft reset without cutting power. | — | — | — | ✅ | ✅ |
|
|
814
|
+
| `resume` | Resume CPU execution after a pause. | — | — | — | ✅ | |
|
|
815
|
+
| `start_task` | Start a named background task that runs on an interval. | `name`, `operation` | `arguments={}`, `intervalMs=1000`, `maxIterations` | — | ✅ | ✅ |
|
|
816
|
+
| `stop_all_tasks` | Stop every running background task and persist state. | — | — | — | ✅ | ✅ |
|
|
817
|
+
| `stop_task` | Stop a specific background task and clear its timer. | `name` | — | — | ✅ | ✅ |
|
|
792
818
|
|
|
793
819
|
#### c64_vice
|
|
794
820
|
|
|
795
821
|
Grouped entry point for reading and updating selected VICE resources.
|
|
796
822
|
|
|
797
|
-
| Operation | Description | Required Inputs | Notes | C64U | VICE |
|
|
798
|
-
| --- | --- | --- | --- | --- | --- |
|
|
799
|
-
| `resource_get` | Read a VICE configuration resource (safe prefixes only). | — | — | | ✅ |
|
|
800
|
-
| `resource_set` | Write a VICE configuration resource (safe prefixes only). | — | — | | ✅ |
|
|
823
|
+
| Operation | Description | Required Inputs | Optional Inputs | Notes | C64U | VICE |
|
|
824
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
825
|
+
| `resource_get` | Read a VICE configuration resource (safe prefixes only). | `name` | — | — | | ✅ |
|
|
826
|
+
| `resource_set` | Write a VICE configuration resource (safe prefixes only). | `name`, `value` | — | — | | ✅ |
|
|
801
827
|
|
|
802
828
|
### Resources
|
|
803
829
|
|
|
@@ -506,4 +506,4 @@ Screen-code conversion
|
|
|
506
506
|
|
|
507
507
|
- If input is ASCII uppercase 'A'..'Z', convert: screen = PETSCII - $40 (e.g. $41→$01). Implement in a small loop if needed.
|
|
508
508
|
|
|
509
|
-
This file is intentionally minimal: use `
|
|
509
|
+
This file is intentionally minimal: use `src/tools/basicTokenizer.ts` / `src/tools/assembler.ts` for tokenization/PRG building and `data/graphics/character-set.csv` for exact screen-code mappings.
|
|
@@ -17,12 +17,12 @@ Do not assume the current backend is correct without checking
|
|
|
17
17
|
|
|
18
18
|
## Fast Paths
|
|
19
19
|
|
|
20
|
-
- Grouped MCP tools are never called bare. For tools such as `c64_program`, `c64_memory`, `c64_graphics`, `c64_sound`, and `c64_system`,
|
|
21
|
-
- Wrong: `c64_program {}`. Correct: `c64_program { op: "cross_platform_greeting" }`.
|
|
20
|
+
- Grouped MCP tools are never called bare. For tools such as `c64_program`, `c64_memory`, `c64_graphics`, `c64_sound`, and `c64_system`, call the tool with flat arguments that include `op`.
|
|
21
|
+
- Wrong: `c64_program {}` or `{ "c64_program": { "op": "cross_platform_greeting" } }`. Correct: call tool `c64_program` with `{ "op": "cross_platform_greeting" }`.
|
|
22
22
|
- For simple visible confirmation on `vice`, `c64u`, or both, prefer `c64_program` with `op: "cross_platform_greeting"`.
|
|
23
23
|
- For trivial hello-world and smoke-test requests, route to `.github/skills/hello-world/SKILL.md` and let that skill use the shortest greeting workflow.
|
|
24
24
|
- That workflow switches backends internally, writes a platform-customized BASIC greeting, captures screenshots, and verifies the rendered text without extra tool composition.
|
|
25
|
-
- Use manual `c64_select_backend` plus `upload_run_basic` only when the user needs custom program logic beyond a quick greeting or text demo.
|
|
25
|
+
- Use manual `c64_select_backend` with `op: "select"` plus `c64_program` with `op: "upload_run_basic"` only when the user needs custom program logic beyond a quick greeting or text demo.
|
|
26
26
|
- On local machines with a graphical session, assume VICE should be visible by default. Only expect Xvfb or other headless fallback in CI or when no framebuffer/display session exists.
|
|
27
27
|
- For manual visible VICE BASIC runs, avoid immediate `read_screen` or `wait_for_text` calls, because Binary Monitor traffic traps execution while servicing requests.
|
|
28
28
|
|
|
@@ -27,6 +27,8 @@ Use these routing shortcuts when the user wants a quick visible or audible resul
|
|
|
27
27
|
|
|
28
28
|
Example:
|
|
29
29
|
|
|
30
|
+
Call tool `c64_sound` with:
|
|
31
|
+
|
|
30
32
|
```json
|
|
31
33
|
{
|
|
32
34
|
"op": "play_preset",
|
|
@@ -41,4 +43,4 @@ Example:
|
|
|
41
43
|
## Verification Order
|
|
42
44
|
|
|
43
45
|
1. Trust the verification defined by the selected skill first.
|
|
44
|
-
2. Use captured artifacts or follow-up inspection only when the selected skill indicates that extra verification is needed.
|
|
46
|
+
2. Use captured artifacts or follow-up inspection only when the selected skill indicates that extra verification is needed.
|
|
@@ -63,7 +63,7 @@ Conversion: Screen code ≠ PETSCII code. Use charset reference (c64://graphics/
|
|
|
63
63
|
|
|
64
64
|
- BASIC/printing: Use PETSCII codes with CHR$() or PRINT
|
|
65
65
|
- Direct screen memory: Use screen codes with POKE to $0400+offset
|
|
66
|
-
- Tools: `c64_graphics`
|
|
66
|
+
- Tools: `c64_graphics` with `op: "render_petscii_art"` returns both `petsciiCodes` array and screen memory data
|
|
67
67
|
|
|
68
68
|
## Essential PETSCII Symbols
|
|
69
69
|
|
|
@@ -246,13 +246,14 @@ Custom charsets have minimal performance impact:
|
|
|
246
246
|
### Using render_sprite
|
|
247
247
|
|
|
248
248
|
```javascript
|
|
249
|
-
{
|
|
250
|
-
|
|
249
|
+
await callTool("c64_graphics", {
|
|
250
|
+
op: "render_sprite",
|
|
251
|
+
sprite: "base64-encoded-63-bytes",
|
|
251
252
|
x: 160, // Center horizontally
|
|
252
253
|
y: 100, // Center vertically
|
|
253
|
-
|
|
254
|
+
color: 1, // White
|
|
254
255
|
multicolour: false
|
|
255
|
-
}
|
|
256
|
+
})
|
|
256
257
|
```
|
|
257
258
|
|
|
258
259
|
The tool:
|
|
@@ -270,26 +271,26 @@ When working with sprites and charsets:
|
|
|
270
271
|
1. Use memory ranges documented in c64://memory/map
|
|
271
272
|
2. Avoid BASIC program area ($0801-$9FFF) unless controlling it
|
|
272
273
|
3. Preserve zero page ($0000-$00FF) and stack ($0100-$01FF)
|
|
273
|
-
4. Use
|
|
274
|
+
4. Use `c64_memory` with `op: "read"` and `op: "write"` for safe access
|
|
274
275
|
|
|
275
276
|
## Example Workflows
|
|
276
277
|
|
|
277
278
|
### Simple Sprite Display
|
|
278
279
|
|
|
279
280
|
1. Prepare 24×21 sprite bitmap
|
|
280
|
-
2. Call `
|
|
281
|
+
2. Call `c64_graphics` with `op: "render_sprite"` and sprite data
|
|
281
282
|
3. Tool writes sprite data and patches VIC-II state automatically
|
|
282
|
-
4. Use `read_screen` to verify appearance
|
|
283
|
-
5. Optionally call `c64_memory` `write` to adjust position/colour
|
|
283
|
+
4. Use `c64_memory` with `op: "read_screen"` to verify appearance
|
|
284
|
+
5. Optionally call `c64_memory` with `op: "write"` to adjust position/colour
|
|
284
285
|
|
|
285
286
|
### Custom Charset Installation
|
|
286
287
|
|
|
287
288
|
1. Design character set (full or partial)
|
|
288
289
|
2. Encode to 8-byte-per-char format
|
|
289
|
-
3. Use `c64_memory` `write` to copy the charset to $2000
|
|
290
|
+
3. Use `c64_memory` with `op: "write"` to copy the charset to $2000
|
|
290
291
|
4. POKE $D018 to point VIC-II at new charset
|
|
291
|
-
5. Use `upload_run_basic` to test character display
|
|
292
|
-
6. Verify with `read_screen`
|
|
292
|
+
5. Use `c64_program` with `op: "upload_run_basic"` to test character display
|
|
293
|
+
6. Verify with `c64_memory` and `op: "read_screen"`
|
|
293
294
|
|
|
294
295
|
### Animated Sprite Sequence
|
|
295
296
|
|
|
@@ -297,13 +298,13 @@ When working with sprites and charsets:
|
|
|
297
298
|
2. Upload all frames to consecutive memory locations
|
|
298
299
|
3. Generate BASIC program that cycles sprite pointer
|
|
299
300
|
4. Use raster timing for smooth animation
|
|
300
|
-
5. Verify frame timing with `c64_memory` `read` checks
|
|
301
|
+
5. Verify frame timing with `c64_memory` and `op: "read"` checks
|
|
301
302
|
|
|
302
303
|
## Best Practices Summary
|
|
303
304
|
|
|
304
305
|
1. **Plan Memory Layout**: Map out sprite and charset locations before coding
|
|
305
306
|
2. **Test Incrementally**: Display one sprite/char before adding more
|
|
306
|
-
3. **Use Tools**: Leverage `render_sprite` and
|
|
307
|
+
3. **Use Tools**: Leverage `c64_graphics` with `op: "render_sprite"` and `c64_memory` operations
|
|
307
308
|
4. **Document State**: Note which sprites/chars are active
|
|
308
309
|
5. **Handle Errors**: Check return values and screen output
|
|
309
310
|
6. **Optimize Last**: Get it working, then optimize if needed
|
|
@@ -5,12 +5,12 @@ This guide summarizes the High Voltage SID Collection (HVSC) "PSID file format"
|
|
|
5
5
|
- A header containing metadata and playback parameters
|
|
6
6
|
- The actual 6502 machine code and data that the player runs on the C64
|
|
7
7
|
|
|
8
|
-
You can play a SID file on a connected device
|
|
8
|
+
You can play a SID file on a connected device with the MCP tool `c64_sound` and `op: "play_sid_file"`.
|
|
9
9
|
|
|
10
|
-
## Quick start: play a SID via
|
|
10
|
+
## Quick start: play a SID via MCP
|
|
11
11
|
|
|
12
|
-
-
|
|
13
|
-
-
|
|
12
|
+
- Tool: `c64_sound`
|
|
13
|
+
- Arguments: `{ "op": "play_sid_file", "path": "/flash/music/Example.sid", "songnr": 1 }` (optional `songnr`)
|
|
14
14
|
|
|
15
15
|
Refer to `doc/c64u/c64-rest-api.md` for the underlying device endpoint and options.
|
|
16
16
|
|
|
@@ -85,7 +85,7 @@ SID files do not embed duration. HVSC ships a `Songlengths.md5` database mapping
|
|
|
85
85
|
|
|
86
86
|
## Related API and tools
|
|
87
87
|
|
|
88
|
-
- Play from device filesystem: `
|
|
88
|
+
- Play from device filesystem: `c64_sound` with `op: "play_sid_file"` (see generated `mcp/tools.json` and `mcp/schemas/c64_sound.schema.json`)
|
|
89
89
|
- Low-level SID register programming: see `data/sound/sid-spec.md`
|
|
90
90
|
|
|
91
91
|
References for further reading: HVSC PSID v2NG file format (spec), community resources, and project notes from implementations like SIDman.
|
|
@@ -126,18 +126,18 @@ This solution was developed through:
|
|
|
126
126
|
|
|
127
127
|
```bash
|
|
128
128
|
curl -X POST -H 'Content-Type: application/json' \
|
|
129
|
-
-d '{"program": "... BASIC program ..."}' \
|
|
130
|
-
http://localhost:8000/tools/
|
|
129
|
+
-d '{"op": "upload_run_basic", "program": "... BASIC program ..."}' \
|
|
130
|
+
http://localhost:8000/tools/c64_program
|
|
131
131
|
```
|
|
132
132
|
|
|
133
133
|
### Future Audio Analysis
|
|
134
134
|
|
|
135
|
-
The working scale can now be used with
|
|
135
|
+
The working scale can now be used with `c64_sound` and `op: "analyze"`:
|
|
136
136
|
|
|
137
137
|
```bash
|
|
138
138
|
curl -X POST -H 'Content-Type: application/json' \
|
|
139
|
-
-d '{"request": "verify the scale sounds correct"}' \
|
|
140
|
-
http://localhost:8000/tools/
|
|
139
|
+
-d '{"op": "analyze", "request": "verify the scale sounds correct"}' \
|
|
140
|
+
http://localhost:8000/tools/c64_sound
|
|
141
141
|
```
|
|
142
142
|
|
|
143
143
|
## Musical Expression Example: "Alle meine Entchen"
|