c64bridge 0.7.4 → 0.8.0
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/.github/prompts/README.md +14 -4
- package/.github/prompts/assembly-routine-session.prompt.md +9 -9
- package/.github/prompts/basic-program-session.prompt.md +11 -9
- package/.github/prompts/drive-management-session.prompt.md +9 -9
- package/.github/prompts/hello-world-session.prompt.md +17 -0
- package/.github/prompts/petscii-art-session.prompt.md +9 -9
- package/.github/prompts/play-classic-game.prompt.md +9 -9
- package/.github/prompts/pr-converge.prompt.md +13 -0
- package/.github/prompts/sid-music-session.prompt.md +9 -9
- package/AGENTS.md +59 -60
- package/README.md +550 -191
- package/data/assembly/assembly-spec.md +290 -1
- package/data/context/bootstrap.md +26 -2
- package/data/context/fast-paths.md +44 -0
- package/data/graphics/petscii-style-guide.md +6 -2
- package/data/graphics/sprite-charset-best-practices.md +5 -5
- package/dist/.tsbuildinfo +1 -1
- package/dist/c64Client.js +990 -26
- package/dist/config.js +5 -1
- package/dist/device.js +680 -57
- package/dist/diagnostics.js +371 -0
- package/dist/mcp/metadata.js +39 -0
- package/dist/mcp-server.js +170 -20
- package/dist/platform.js +10 -2
- package/dist/prompts/registry.js +166 -309
- package/dist/rag/init.js +37 -1
- package/dist/rag/knowledgeIndex.js +18 -6
- package/dist/rag/rateLimiter.js +2 -2
- package/dist/streamCapture.js +135 -0
- package/dist/tools/audio.js +3 -1
- package/dist/tools/debug.js +470 -0
- package/dist/tools/developer.js +10 -4
- package/dist/tools/graphics.js +183 -17
- package/dist/tools/machineControl.js +11 -5
- package/dist/tools/memory.js +19 -10
- package/dist/tools/meta/audio.js +240 -1
- package/dist/tools/meta/config.js +20 -28
- package/dist/tools/meta/configInventory.js +104 -0
- package/dist/tools/meta/diagnostics.js +45 -2
- package/dist/tools/meta/graphics.js +14 -6
- package/dist/tools/meta/index.js +1 -0
- package/dist/tools/meta/memory.js +20 -6
- package/dist/tools/meta/program.js +473 -0
- package/dist/tools/pollValidator.js +4 -2
- package/dist/tools/programRunners.js +8 -4
- package/dist/tools/registry/config.js +17 -0
- package/dist/tools/registry/disk.js +7 -0
- package/dist/tools/registry/drive.js +3 -0
- package/dist/tools/registry/graphics.js +111 -27
- package/dist/tools/registry/index.js +6 -0
- package/dist/tools/registry/memory.js +1 -0
- package/dist/tools/registry/platform.js +121 -0
- package/dist/tools/registry/program.js +26 -8
- package/dist/tools/registry/sound.js +96 -0
- package/dist/tools/registry/system.js +15 -2
- package/dist/tools/storage.js +1 -0
- package/dist/tools/streaming.js +1 -0
- package/dist/tools/types.js +38 -4
- package/dist/tools/vice.js +160 -0
- package/dist/vicBitmap.js +317 -0
- package/dist/vice/mockServer.js +439 -0
- package/dist/vice/process.js +310 -0
- package/dist/vice/readiness.js +18 -2
- package/dist/vice/viceClient.js +382 -22
- package/doc/developer.md +62 -24
- package/doc/img/backend-switch/hello-c64u.png +0 -0
- package/doc/img/backend-switch/hello-vice-and-c64u.png +0 -0
- package/doc/img/backend-switch/hello-vice.png +0 -0
- package/doc/img/backend-switch/metadata.json +50 -0
- package/doc/plans/vice-backend-switch/plan.md +486 -0
- package/doc/plans/vice-backend-switch-2/plan.md +48 -0
- package/doc/plans/vice-support/notes.md +1 -0
- package/doc/plans/vice-support/plan.md +5 -0
- package/doc/plans/vice-support/rollout.md +23 -17
- package/doc/reviews/vice-support-review.md +185 -0
- package/doc/troubleshooting-mcp.md +35 -6
- package/doc/vice/support-matrix.md +54 -0
- package/mcp/prompts.json +292 -0
- package/mcp/protocol-examples.json +46 -0
- package/mcp/resources.json +940 -0
- package/mcp/schemas/c64_config.schema.json +350 -0
- package/mcp/schemas/c64_debug.schema.json +380 -0
- package/mcp/schemas/c64_disk.schema.json +278 -0
- package/mcp/schemas/c64_drive.schema.json +120 -0
- package/mcp/schemas/c64_extract.schema.json +302 -0
- package/mcp/schemas/c64_graphics.schema.json +333 -0
- package/mcp/schemas/c64_memory.schema.json +155 -0
- package/mcp/schemas/c64_printer.schema.json +218 -0
- package/mcp/schemas/c64_program.schema.json +391 -0
- package/mcp/schemas/c64_rag.schema.json +67 -0
- package/mcp/schemas/c64_select_backend.schema.json +32 -0
- package/mcp/schemas/c64_sound.schema.json +644 -0
- package/mcp/schemas/c64_stream.schema.json +61 -0
- package/mcp/schemas/c64_system.schema.json +227 -0
- package/mcp/schemas/c64_vice.schema.json +63 -0
- package/mcp/server.json +15 -0
- package/mcp/tools.json +4517 -0
- package/mcp.json +83 -9
- package/package.json +8 -3
- package/scripts/capture-backend-switch-screenshots.mjs +276 -0
- package/scripts/generate-mcp-interface.ts +289 -0
- package/scripts/invoke-bun.mjs +67 -21
- package/scripts/mockC64Server.mjs +162 -6
- package/scripts/run-coverage.mjs +284 -0
- package/scripts/run-tests.mjs +95 -39
- package/scripts/run-tests.ts +378 -73
- package/scripts/update-readme.ts +147 -13
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-

|
|
2
|
-
|
|
3
1
|
# C64 Bridge
|
|
4
2
|
|
|
3
|
+

|
|
4
|
+
|
|
5
5
|
Your AI Command Bridge for the Commodore 64.
|
|
6
6
|
|
|
7
7
|
[](https://www.npmjs.com/package/c64bridge)
|
|
@@ -10,94 +10,203 @@ Your AI Command Bridge for the Commodore 64.
|
|
|
10
10
|
[](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)
|
|
11
11
|
[](doc/developer.md)
|
|
12
12
|
|
|
13
|
+
C64 Bridge is a Model Context Protocol ([MCP](https://modelcontextprotocol.io/docs/getting-started/intro)) server for controlling a real Commodore 64 Ultimate or Ultimate 64, and for switching into a VICE emulator session when you want emulator-backed workflows in the same MCP conversation.
|
|
14
|
+
|
|
15
|
+
It is built on the official TypeScript `@modelcontextprotocol/sdk` and supports both `stdio` for local AI integration and an optional HTTP bridge for manual inspection.
|
|
16
|
+
|
|
17
|
+
## Contents
|
|
18
|
+
|
|
19
|
+
- [C64 Bridge](#c64-bridge)
|
|
20
|
+
- [Contents](#contents)
|
|
21
|
+
- [Overview](#overview)
|
|
22
|
+
- [Features](#features)
|
|
23
|
+
- [Quick Start](#quick-start)
|
|
24
|
+
- [1. Install Node.js 24+ and npm](#1-install-nodejs-24-and-npm)
|
|
25
|
+
- [2. Start the Server](#2-start-the-server)
|
|
26
|
+
- [3. Add Backend Configuration](#3-add-backend-configuration)
|
|
27
|
+
- [4. Connect from an MCP Client](#4-connect-from-an-mcp-client)
|
|
28
|
+
- [Configuration](#configuration)
|
|
29
|
+
- [Configuration File Order](#configuration-file-order)
|
|
30
|
+
- [Configuration Merge Rules](#configuration-merge-rules)
|
|
31
|
+
- [Backend Configuration: C64 Ultimate](#backend-configuration-c64-ultimate)
|
|
32
|
+
- [Backend Configuration: VICE](#backend-configuration-vice)
|
|
33
|
+
- [Runtime Backend Switching](#runtime-backend-switching)
|
|
34
|
+
- [VS Code MCP Setup](#vs-code-mcp-setup)
|
|
35
|
+
- [Enable the C64 Agent](#enable-the-c64-agent)
|
|
36
|
+
- [Optional Overrides](#optional-overrides)
|
|
37
|
+
- [Environment Variables in MCP Client Configs](#environment-variables-in-mcp-client-configs)
|
|
38
|
+
- [Runtime Environment Variable Reference](#runtime-environment-variable-reference)
|
|
39
|
+
- [Server Runtime](#server-runtime)
|
|
40
|
+
- [C64 Ultimate](#c64-ultimate)
|
|
41
|
+
- [VICE Runtime](#vice-runtime)
|
|
42
|
+
- [VICE Audio Capture](#vice-audio-capture)
|
|
43
|
+
- [SID Playback](#sid-playback)
|
|
44
|
+
- [RAG](#rag)
|
|
45
|
+
- [Testing](#testing)
|
|
46
|
+
- [Example Workflow](#example-workflow)
|
|
47
|
+
- [HTTP Invocation](#http-invocation)
|
|
48
|
+
- [Build and Test](#build-and-test)
|
|
49
|
+
- [Documentation](#documentation)
|
|
50
|
+
- [Static MCP Interface](#static-mcp-interface)
|
|
51
|
+
- [MCP API Reference](#mcp-api-reference)
|
|
52
|
+
- [Tools](#tools)
|
|
53
|
+
- [c64\_config](#c64_config)
|
|
54
|
+
- [c64\_debug](#c64_debug)
|
|
55
|
+
- [c64\_disk](#c64_disk)
|
|
56
|
+
- [c64\_drive](#c64_drive)
|
|
57
|
+
- [c64\_extract](#c64_extract)
|
|
58
|
+
- [c64\_graphics](#c64_graphics)
|
|
59
|
+
- [c64\_memory](#c64_memory)
|
|
60
|
+
- [c64\_printer](#c64_printer)
|
|
61
|
+
- [c64\_program](#c64_program)
|
|
62
|
+
- [c64\_rag](#c64_rag)
|
|
63
|
+
- [c64\_select\_backend](#c64_select_backend)
|
|
64
|
+
- [c64\_sound](#c64_sound)
|
|
65
|
+
- [c64\_stream](#c64_stream)
|
|
66
|
+
- [c64\_system](#c64_system)
|
|
67
|
+
- [c64\_vice](#c64_vice)
|
|
68
|
+
- [Resources](#resources)
|
|
69
|
+
- [Prompts](#prompts)
|
|
70
|
+
|
|
13
71
|
## Overview
|
|
14
72
|
|
|
15
|
-
C64 Bridge
|
|
73
|
+
C64 Bridge gives an AI agent one place to drive program execution, memory access, graphics, sound, storage, printer workflows, and knowledge retrieval for a Commodore 64 environment.
|
|
74
|
+
|
|
75
|
+
The core workflow is simple:
|
|
16
76
|
|
|
17
|
-
|
|
77
|
+
1. Start the MCP server.
|
|
78
|
+
2. Point it at C64 Ultimate hardware, VICE, or both.
|
|
79
|
+
3. Let the client call grouped MCP tools such as `c64_program`, `c64_memory`, `c64_graphics`, and `c64_sound`.
|
|
80
|
+
4. Switch backends at runtime with `c64_select_backend` when both are configured.
|
|
18
81
|
|
|
19
82
|
## Features
|
|
20
83
|
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
84
|
+
- Program runners for BASIC, 6510 assembly, and PRG or CRT execution
|
|
85
|
+
- Full memory access, including raw reads and writes plus screen polling
|
|
86
|
+
- System integration for drives, files, printers, and task orchestration
|
|
87
|
+
- SID music tools for playback, composition, generation, and verification
|
|
88
|
+
- Built-in knowledge resources and prompts for safer LLM workflows
|
|
89
|
+
- Mixed runtime support for hardware `c64u` and emulator `vice`
|
|
27
90
|
|
|
28
91
|
## Quick Start
|
|
29
92
|
|
|
30
|
-
|
|
93
|
+
If you want the shortest path, do these four things:
|
|
94
|
+
|
|
95
|
+
1. Install Node.js 24+ and npm.
|
|
96
|
+
2. Start the server.
|
|
97
|
+
3. Add backend configuration for C64 Ultimate, VICE, or both.
|
|
98
|
+
4. Connect from VS Code or another MCP client.
|
|
99
|
+
|
|
100
|
+
### 1. Install Node.js 24+ and npm
|
|
101
|
+
|
|
102
|
+
Linux (Ubuntu or Debian):
|
|
103
|
+
|
|
104
|
+
Recommended:
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
sudo apt update
|
|
108
|
+
sudo apt install -y curl ca-certificates
|
|
109
|
+
curl -fsSL https://deb.nodesource.com/setup_24.x | sudo -E bash -
|
|
110
|
+
sudo apt install -y nodejs
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Fallback:
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
sudo apt install -y nodejs npm
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
macOS:
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
brew install node@24
|
|
123
|
+
brew link --overwrite node@24
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Windows:
|
|
127
|
+
|
|
128
|
+
```powershell
|
|
129
|
+
# winget
|
|
130
|
+
winget install OpenJS.NodeJS.LTS
|
|
131
|
+
# or Chocolatey
|
|
132
|
+
choco install nodejs-lts -y
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Verify the installation:
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
node --version
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Expected result: `v24.x`
|
|
31
142
|
|
|
32
|
-
|
|
33
|
-
- Recommended:
|
|
143
|
+
### 2. Start the Server
|
|
34
144
|
|
|
35
|
-
|
|
36
|
-
sudo apt update
|
|
37
|
-
sudo apt install -y curl ca-certificates
|
|
38
|
-
curl -fsSL https://deb.nodesource.com/setup_24.x | sudo -E bash -
|
|
39
|
-
sudo apt install -y nodejs
|
|
40
|
-
```
|
|
145
|
+
Use one of the following entry points.
|
|
41
146
|
|
|
42
|
-
|
|
147
|
+
Run from `npx` with zero setup:
|
|
43
148
|
|
|
44
|
-
|
|
149
|
+
```bash
|
|
150
|
+
npx -y c64bridge@latest
|
|
151
|
+
```
|
|
45
152
|
|
|
46
|
-
|
|
47
|
-
brew install node@24
|
|
48
|
-
brew link --overwrite node@24
|
|
49
|
-
```
|
|
153
|
+
Run from a local npm install:
|
|
50
154
|
|
|
51
|
-
|
|
155
|
+
```bash
|
|
156
|
+
mkdir -p ~/c64bridge && cd ~/c64bridge
|
|
157
|
+
npm init -y
|
|
158
|
+
npm install c64bridge
|
|
159
|
+
node ./node_modules/c64bridge/dist/index.js
|
|
160
|
+
```
|
|
52
161
|
|
|
53
|
-
|
|
54
|
-
# winget
|
|
55
|
-
winget install OpenJS.NodeJS.LTS
|
|
56
|
-
# or Chocolatey
|
|
57
|
-
choco install nodejs-lts -y
|
|
58
|
-
```
|
|
162
|
+
Run from source for development or testing:
|
|
59
163
|
|
|
60
|
-
|
|
164
|
+
```bash
|
|
165
|
+
git clone https://github.com/chrisgleissner/c64bridge.git
|
|
166
|
+
cd c64bridge
|
|
167
|
+
./build install
|
|
168
|
+
npm start
|
|
169
|
+
```
|
|
61
170
|
|
|
62
|
-
|
|
171
|
+
On startup, the server probes the selected target, performs connectivity checks, and then announces that it is running on stdio.
|
|
63
172
|
|
|
64
|
-
|
|
173
|
+
### 3. Add Backend Configuration
|
|
65
174
|
|
|
66
|
-
|
|
67
|
-
npx -y c64bridge@latest
|
|
68
|
-
```
|
|
175
|
+
The server can run against:
|
|
69
176
|
|
|
70
|
-
-
|
|
177
|
+
- only C64 Ultimate hardware
|
|
178
|
+
- only VICE
|
|
179
|
+
- both backends in one session, with runtime switching
|
|
71
180
|
|
|
72
|
-
|
|
73
|
-
mkdir -p ~/c64bridge && cd ~/c64bridge
|
|
74
|
-
npm init -y
|
|
75
|
-
npm install c64bridge
|
|
76
|
-
node ./node_modules/c64bridge/dist/index.js
|
|
77
|
-
```
|
|
181
|
+
The detailed lookup order, merge rules, backend examples, and override model are in the [Configuration](#configuration) section below.
|
|
78
182
|
|
|
79
|
-
|
|
183
|
+
### 4. Connect from an MCP Client
|
|
80
184
|
|
|
81
|
-
|
|
82
|
-
git clone https://github.com/chrisgleissner/c64bridge.git
|
|
83
|
-
cd c64bridge
|
|
84
|
-
npm install
|
|
85
|
-
npm start
|
|
86
|
-
```
|
|
185
|
+
If you use VS Code, follow the [VS Code MCP Setup](#vs-code-mcp-setup) section below.
|
|
87
186
|
|
|
88
|
-
|
|
187
|
+
If you use another MCP client, point it at the `stdio` server entry point and pass any required environment variables exactly as documented in this README and in [mcp.json](./mcp.json).
|
|
89
188
|
|
|
90
189
|
## Configuration
|
|
91
190
|
|
|
191
|
+
### Configuration File Order
|
|
192
|
+
|
|
92
193
|
The server reads configuration in this order:
|
|
93
194
|
|
|
94
|
-
1. `C64BRIDGE_CONFIG
|
|
195
|
+
1. `C64BRIDGE_CONFIG`, if it points to a config file
|
|
95
196
|
2. `.c64bridge.json` in the project root
|
|
96
|
-
3. `~/.c64bridge.json` in
|
|
197
|
+
3. `~/.c64bridge.json` in the home directory
|
|
97
198
|
|
|
98
|
-
###
|
|
199
|
+
### Configuration Merge Rules
|
|
99
200
|
|
|
100
|
-
|
|
201
|
+
Configuration is merged per backend section while scanning those files in order.
|
|
202
|
+
|
|
203
|
+
- The first file that contains a `c64u` section supplies the C64 Ultimate configuration.
|
|
204
|
+
- The first file that contains a `vice` section supplies the VICE configuration.
|
|
205
|
+
- This allows a project-local `.c64bridge.json` to define `c64u` while `~/.c64bridge.json` defines `vice`, with both backends available at runtime.
|
|
206
|
+
|
|
207
|
+
### Backend Configuration: C64 Ultimate
|
|
208
|
+
|
|
209
|
+
Use this for a C64 Ultimate or Ultimate 64:
|
|
101
210
|
|
|
102
211
|
```json
|
|
103
212
|
{
|
|
@@ -109,24 +218,59 @@ Use this for a C64 Ultimate:
|
|
|
109
218
|
}
|
|
110
219
|
```
|
|
111
220
|
|
|
112
|
-
- If no file is found,
|
|
113
|
-
-
|
|
221
|
+
- If no file is found, the default target is `c64u:80` with no network password.
|
|
222
|
+
- `networkPassword` is only needed when you enabled a password in the C64 Ultimate network settings.
|
|
223
|
+
- `C64U_HOST`, `C64U_PORT`, and `C64U_PASSWORD` override the configured host, port, and network password.
|
|
114
224
|
|
|
115
|
-
### VICE
|
|
225
|
+
### Backend Configuration: VICE
|
|
116
226
|
|
|
117
|
-
Use this for VICE:
|
|
227
|
+
Use this for managed VICE launches:
|
|
118
228
|
|
|
119
229
|
```json
|
|
120
230
|
{
|
|
121
231
|
"vice": {
|
|
122
|
-
"exe": "/usr/bin/x64sc"
|
|
232
|
+
"exe": "/usr/bin/x64sc",
|
|
233
|
+
"directory": "/usr/local/share/vice"
|
|
123
234
|
}
|
|
124
235
|
}
|
|
125
236
|
```
|
|
126
237
|
|
|
238
|
+
- `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.
|
|
239
|
+
- `VICE_BINARY`, `VICE_DIRECTORY`, `VICE_HOST`, `VICE_PORT`, `VICE_VISIBLE`, `VICE_WARP`, and `VICE_ARGS` override managed VICE startup without editing config files.
|
|
240
|
+
- 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.
|
|
241
|
+
|
|
242
|
+
> [!NOTE]
|
|
243
|
+
> VICE supports only the operations marked with a VICE checkmark in the [MCP API Reference](#mcp-api-reference). Unsupported operations return `unsupported_platform`.
|
|
244
|
+
|
|
245
|
+
### Runtime Backend Switching
|
|
246
|
+
|
|
247
|
+
When both `c64u` and `vice` are configured, C64 Bridge starts with one active backend and keeps the other available for runtime switching.
|
|
248
|
+
|
|
249
|
+
- `C64_MODE` chooses the initial backend: `c64u` or `vice`
|
|
250
|
+
- `c64_select_backend` switches backends without restarting the MCP server
|
|
251
|
+
- `c64://platform/status` reports the active backend and the full configured backend set
|
|
252
|
+
- In prompts, say things like `use vice`, `vice: run this program`, `use c64u`, or `run this on the real machine`
|
|
253
|
+
- In VS Code, include the backend preference in the same prompt when you want to force emulator versus hardware execution
|
|
254
|
+
|
|
255
|
+
Prompt illustration (issued via Copilot in VS Code, using GPT 5.4 Medium):
|
|
256
|
+
|
|
257
|
+
```text
|
|
258
|
+
c64u: write a small BASIC program that clears the screen and prints HELLO C64U
|
|
259
|
+
vice: write a small BASIC program that clears the screen and prints HELLO VICE
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
The screenshots below were captured from actual backend bitmap responses after those prompts ran, using the same `c64_graphics` `capture_frame` MCP tool on both backends. The C64U implementation captures streamed video frames, while the VICE implementation captures and normalizes the emulator display frame. Both images were then verified optically against the expected text with the C64 character generator, and both matched exactly.
|
|
263
|
+
|
|
264
|
+
| Backend | Screenshot |
|
|
265
|
+
| --- | --- |
|
|
266
|
+
| C64 Ultimate |  |
|
|
267
|
+
| VICE |  |
|
|
268
|
+
|
|
127
269
|
## VS Code MCP Setup
|
|
128
270
|
|
|
129
|
-
If this repository is checked out locally,
|
|
271
|
+
If this repository is checked out locally, open the prepared [.vscode/mcp.json](./.vscode/mcp.json).
|
|
272
|
+
|
|
273
|
+
Otherwise, put the following into your own `.vscode/mcp.json`:
|
|
130
274
|
|
|
131
275
|
```json
|
|
132
276
|
{
|
|
@@ -142,25 +286,25 @@ If this repository is checked out locally, simply open the prepared [.vscode/mcp
|
|
|
142
286
|
}
|
|
143
287
|
```
|
|
144
288
|
|
|
145
|
-
Then click the
|
|
289
|
+
Then click the start button shown above the `c64bridge` entry.
|
|
146
290
|
|
|
147
|
-
Your
|
|
291
|
+
Your MCP server should now be running:
|
|
148
292
|
|
|
149
293
|

|
|
150
294
|
|
|
151
295
|
For more details, see the official [VS Code MCP Server documentation](https://code.visualstudio.com/docs/copilot/customization/mcp-servers).
|
|
152
296
|
|
|
153
|
-
### Enable
|
|
297
|
+
### Enable the C64 Agent
|
|
154
298
|
|
|
155
|
-
After the
|
|
299
|
+
After the server is running, switch to the `C64` agent in VS Code.
|
|
156
300
|
|
|
157
|
-
This agent is
|
|
301
|
+
This agent is preconfigured for Commodore 64 work. It steers Copilot toward `c64bridge` workflows for BASIC, 6502 assembly, SID audio, VIC-II graphics, memory inspection, disk operations, printing, streaming, and device control.
|
|
158
302
|
|
|
159
303
|

|
|
160
304
|
|
|
161
305
|
### Optional Overrides
|
|
162
306
|
|
|
163
|
-
You can add `env` entries in `.vscode/mcp.json` to select a config file or force
|
|
307
|
+
You can add `env` entries in `.vscode/mcp.json` to select a config file, override C64 Ultimate connection details, or force an initial backend:
|
|
164
308
|
|
|
165
309
|
```json
|
|
166
310
|
{
|
|
@@ -173,21 +317,166 @@ You can add `env` entries in `.vscode/mcp.json` to select a config file or force
|
|
|
173
317
|
],
|
|
174
318
|
"env": {
|
|
175
319
|
"C64BRIDGE_CONFIG": "/home/you/.c64bridge.json",
|
|
320
|
+
"C64U_HOST": "192.168.1.99",
|
|
321
|
+
"C64U_PORT": "80",
|
|
322
|
+
"C64U_PASSWORD": "secret",
|
|
176
323
|
"C64_MODE": "c64u",
|
|
324
|
+
"LOG_LEVEL": "debug"
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
- `C64BRIDGE_CONFIG` points to a specific config file
|
|
332
|
+
- `C64U_HOST`, `C64U_PORT`, and `C64U_PASSWORD` override the C64 Ultimate connection without editing config files
|
|
333
|
+
- `C64_MODE` forces the initial backend to `c64u` or `vice`
|
|
334
|
+
- `LOG_LEVEL=debug` enables verbose logging
|
|
335
|
+
|
|
336
|
+
### Environment Variables in MCP Client Configs
|
|
337
|
+
|
|
338
|
+
Every runtime environment variable documented in the root [mcp.json](./mcp.json) can be supplied by your MCP client configuration, including `.vscode/mcp.json` under `servers.c64bridge.env`.
|
|
339
|
+
|
|
340
|
+
When an environment variable maps to a JSON config field, the override order is always:
|
|
341
|
+
|
|
342
|
+
1. the explicit environment variable from your MCP client config or shell
|
|
343
|
+
2. the merged JSON config section loaded from `C64BRIDGE_CONFIG`, the repo `.c64bridge.json`, then `~/.c64bridge.json`
|
|
344
|
+
3. the built-in default compiled into the server
|
|
345
|
+
|
|
346
|
+
When an environment variable has no JSON config equivalent, the order is:
|
|
347
|
+
|
|
348
|
+
1. the explicit environment variable from your MCP client config or shell
|
|
349
|
+
2. the built-in default
|
|
350
|
+
|
|
351
|
+
That rule applies uniformly across the documented runtime environment variables below.
|
|
352
|
+
|
|
353
|
+
Example: visible VICE with a specific ROM or resource directory, plus a hardware fallback that can still be selected instantly at runtime:
|
|
354
|
+
|
|
355
|
+
```json
|
|
356
|
+
{
|
|
357
|
+
"servers": {
|
|
358
|
+
"c64bridge": {
|
|
359
|
+
"command": "node",
|
|
360
|
+
"args": ["${workspaceFolder}/scripts/start.mjs"],
|
|
361
|
+
"type": "stdio",
|
|
362
|
+
"env": {
|
|
363
|
+
"C64_MODE": "vice",
|
|
364
|
+
"C64U_HOST": "c64u",
|
|
365
|
+
"C64U_PORT": "80",
|
|
366
|
+
"VICE_BINARY": "/usr/local/bin/x64sc",
|
|
367
|
+
"VICE_DIRECTORY": "/usr/local/share/vice",
|
|
368
|
+
"VICE_VISIBLE": "true",
|
|
369
|
+
"VICE_WARP": "false"
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
Example: keep JSON config files for backend endpoints, but override diagnostics, polling, and RAG behavior from VS Code:
|
|
377
|
+
|
|
378
|
+
```json
|
|
379
|
+
{
|
|
380
|
+
"servers": {
|
|
381
|
+
"c64bridge": {
|
|
382
|
+
"command": "node",
|
|
383
|
+
"args": ["${workspaceFolder}/scripts/start.mjs"],
|
|
384
|
+
"type": "stdio",
|
|
385
|
+
"env": {
|
|
386
|
+
"C64BRIDGE_CONFIG": "/home/you/.c64bridge.json",
|
|
177
387
|
"LOG_LEVEL": "debug",
|
|
388
|
+
"C64BRIDGE_POLL_MAX_MS": "8000",
|
|
389
|
+
"C64BRIDGE_POLL_INTERVAL_MS": "200",
|
|
390
|
+
"RAG_BUILD_ON_START": "1",
|
|
391
|
+
"RAG_EMBEDDINGS_DIR": "/home/you/c64bridge-data"
|
|
178
392
|
}
|
|
179
393
|
}
|
|
180
394
|
}
|
|
181
395
|
}
|
|
182
396
|
```
|
|
183
397
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
-
|
|
398
|
+
### Runtime Environment Variable Reference
|
|
399
|
+
|
|
400
|
+
<!-- AUTO-GENERATED:ENV-VARS-START -->
|
|
401
|
+
|
|
402
|
+
Every runtime environment variable documented in `mcp.json` can be set in your MCP client configuration, including `.vscode/mcp.json` under `servers.c64bridge.env`.
|
|
403
|
+
|
|
404
|
+
#### Server Runtime
|
|
405
|
+
|
|
406
|
+
| Variable | Default | JSON Config Key | Description |
|
|
407
|
+
| --- | --- | --- | --- |
|
|
408
|
+
| `C64_MODE` | c64u | — | Select active backend (c64u for Ultimate hardware, vice for emulator) |
|
|
409
|
+
| `C64_TASK_STATE_FILE` | auto | — | Override the path used to persist MCP background-task state |
|
|
410
|
+
| `C64BRIDGE_CONFIG` | ~/.c64bridge.json | config path | Path to configuration JSON |
|
|
411
|
+
| `C64BRIDGE_DIAGNOSTICS_DIR` | ~/.c64bridge/diagnostics | — | Override the directory where persistent MCP diagnostics files are written |
|
|
412
|
+
| `C64BRIDGE_DISABLE_DIAGNOSTICS` | 0 | — | Set to 1 to disable persistent diagnostics logging |
|
|
413
|
+
| `C64BRIDGE_POLL_INTERVAL_MS` | 200 | — | Interval between screen polls during program-output validation in normal runtime mode |
|
|
414
|
+
| `C64BRIDGE_POLL_MAX_MS` | 2000 | — | Maximum time to poll for program-output validation before timing out in normal runtime mode |
|
|
415
|
+
| `C64BRIDGE_POLL_STABILIZE_MS` | 100 | — | Extra settle time after a successful poll match before considering output stable |
|
|
416
|
+
| `LOG_LEVEL` | info | — | Logger verbosity (debug, info, warn, error) |
|
|
417
|
+
|
|
418
|
+
#### C64 Ultimate
|
|
419
|
+
|
|
420
|
+
| Variable | Default | JSON Config Key | Description |
|
|
421
|
+
| --- | --- | --- | --- |
|
|
422
|
+
| `C64U_HOST` | c64u | c64u.host | Override the C64 Ultimate host name or IP address |
|
|
423
|
+
| `C64U_PASSWORD` | | c64u.networkPassword | Override the C64 Ultimate network password sent as X-Password |
|
|
424
|
+
| `C64U_PORT` | 80 | c64u.port | Override the C64 Ultimate REST port |
|
|
425
|
+
|
|
426
|
+
#### VICE Runtime
|
|
427
|
+
|
|
428
|
+
| Variable | Default | JSON Config Key | Description |
|
|
429
|
+
| --- | --- | --- | --- |
|
|
430
|
+
| `DISABLE_XVFB` | 0 | — | Set to 1 to disable Xvfb fallback and use the current display only |
|
|
431
|
+
| `FORCE_XVFB` | 0 | — | Set to 1 to force managed VICE launches to run under Xvfb |
|
|
432
|
+
| `VICE_ARGS` | | vice.args | Extra command-line arguments forwarded to managed VICE launches |
|
|
433
|
+
| `VICE_BINARY` | x64sc | vice.exe | VICE binary to launch for managed emulator sessions and audio capture |
|
|
434
|
+
| `VICE_DIRECTORY` | auto-detect | vice.directory | Override the VICE resource directory used for ROM and UI asset discovery |
|
|
435
|
+
| `VICE_HOST` | 127.0.0.1 | vice.host | Override the VICE Binary Monitor host |
|
|
436
|
+
| `VICE_PORT` | 6502 | vice.port | Override the VICE Binary Monitor port |
|
|
437
|
+
| `VICE_VISIBLE` | true | vice.visible | Launch VICE visibly on the desktop instead of headless/Xvfb when possible |
|
|
438
|
+
| `VICE_WARP` | false when visible, true when headless | vice.warp | Enable warp mode for managed VICE sessions |
|
|
439
|
+
| `VICE_XVFB_DISPLAY` | :99 | — | Display number to use when managed VICE launches under Xvfb |
|
|
440
|
+
|
|
441
|
+
#### VICE Audio Capture
|
|
442
|
+
|
|
443
|
+
| Variable | Default | JSON Config Key | Description |
|
|
444
|
+
| --- | --- | --- | --- |
|
|
445
|
+
| `VICE_LIMIT_CYCLES` | 120000000 | — | Maximum CPU cycles to render when VICE generates audio |
|
|
446
|
+
| `VICE_MODE` | ntsc | — | Default video standard for VICE audio capture (ntsc\|pal) |
|
|
447
|
+
| `VICE_RUN_TIMEOUT_MS` | 10000 | — | Timeout for headless VICE runs in milliseconds |
|
|
448
|
+
|
|
449
|
+
#### SID Playback
|
|
450
|
+
|
|
451
|
+
| Variable | Default | JSON Config Key | Description |
|
|
452
|
+
| --- | --- | --- | --- |
|
|
453
|
+
| `SIDPLAY_BINARY` | sidplayfp | — | sidplayfp binary to launch when generating audio |
|
|
454
|
+
| `SIDPLAY_LIMIT_CYCLES` | 120000000 | — | Maximum CPU cycles to render when sidplayfp generates audio |
|
|
455
|
+
| `SIDPLAY_MODE` | ntsc | — | Default SID playback mode (ntsc\|pal) |
|
|
456
|
+
| `SIDPLAYFP_BINARY` | | — | Legacy alias for SIDPLAY_BINARY (sidplayfp executable name) |
|
|
457
|
+
|
|
458
|
+
#### RAG
|
|
459
|
+
|
|
460
|
+
| Variable | Default | JSON Config Key | Description |
|
|
461
|
+
| --- | --- | --- | --- |
|
|
462
|
+
| `GITHUB_TOKEN` | | — | Personal access token used for optional RAG discovery against GitHub |
|
|
463
|
+
| `RAG_BUILD_ON_START` | 0 | — | Set to 1 to rebuild embeddings on server start |
|
|
464
|
+
| `RAG_DISCOVER_FORCE_REFRESH` | 0 | — | Set to 1 to ignore cached discovery results when fetching external docs |
|
|
465
|
+
| `RAG_DOC_FILES` | | — | Comma-separated extra docs to include in RAG |
|
|
466
|
+
| `RAG_EMBEDDINGS_DIR` | data | — | Directory containing RAG embedding JSON files |
|
|
467
|
+
| `RAG_REINDEX_INTERVAL_MS` | 0 | — | Periodic reindex interval in ms (0 disables) |
|
|
468
|
+
|
|
469
|
+
#### Testing
|
|
470
|
+
|
|
471
|
+
| Variable | Default | JSON Config Key | Description |
|
|
472
|
+
| --- | --- | --- | --- |
|
|
473
|
+
| `C64_TEST_TARGET` | | — | Overrides integration tests to hit mock or real hardware (mock\|real) |
|
|
474
|
+
|
|
475
|
+
<!-- AUTO-GENERATED:ENV-VARS-END -->
|
|
187
476
|
|
|
188
|
-
## Example
|
|
477
|
+
## Example Workflow
|
|
189
478
|
|
|
190
|
-
Compose a children’s song with ChatGPT
|
|
479
|
+
Compose a children’s song with ChatGPT and VS Code:
|
|
191
480
|
|
|
192
481
|

|
|
193
482
|
|
|
@@ -195,10 +484,17 @@ Then render PETSCII art for it:
|
|
|
195
484
|
|
|
196
485
|

|
|
197
486
|
|
|
487
|
+
This is representative of the intended workflow:
|
|
488
|
+
|
|
489
|
+
1. Ask the MCP client to generate or refine C64-oriented content.
|
|
490
|
+
2. Use grouped tools such as `c64_program`, `c64_graphics`, and `c64_sound` to execute it.
|
|
491
|
+
3. Verify the result via screen reads, frame capture, memory inspection, or audio analysis.
|
|
492
|
+
|
|
198
493
|
## HTTP Invocation
|
|
199
494
|
|
|
200
|
-
- Preferred transport is `stdio`.
|
|
201
|
-
-
|
|
495
|
+
- Preferred transport is `stdio`.
|
|
496
|
+
- The HTTP bridge is disabled by default and is intended only for manual testing.
|
|
497
|
+
- The following curl commands are illustrative so you can see what grouped MCP calls look like over HTTP.
|
|
202
498
|
|
|
203
499
|
```bash
|
|
204
500
|
# Upload and run BASIC
|
|
@@ -217,14 +513,27 @@ curl -s -X POST -H 'Content-Type: application/json' \
|
|
|
217
513
|
http://localhost:8000/tools/c64_system
|
|
218
514
|
```
|
|
219
515
|
|
|
220
|
-
## Build
|
|
516
|
+
## Build and Test
|
|
517
|
+
|
|
518
|
+
The [`./build`](./build) script at the project root wraps all development tasks behind a single, self-documented interface:
|
|
519
|
+
|
|
520
|
+
```bash
|
|
521
|
+
./build --help # full command reference
|
|
522
|
+
./build # install + build + test matrix (full CI run)
|
|
523
|
+
./build --skip-tests # install + build only
|
|
524
|
+
./build build # TypeScript compile + doc generation
|
|
525
|
+
./build test # integration tests (mock backend)
|
|
526
|
+
./build test --real # test against real hardware
|
|
527
|
+
./build test --platform vice --target mock # single test leg
|
|
528
|
+
./build test:matrix # full matrix (c64u/mock · vice/mock · vice/device)
|
|
529
|
+
./build coverage # merged coverage report
|
|
530
|
+
./build coverage:single --platform c64u --target mock
|
|
531
|
+
./build check # build + test matrix (no install)
|
|
532
|
+
./build rag:rebuild # rebuild RAG embeddings
|
|
533
|
+
./build release --version 1.2.3 # prepare a release
|
|
534
|
+
```
|
|
221
535
|
|
|
222
|
-
|
|
223
|
-
- `npm start` — dev server (ts-node)
|
|
224
|
-
- `npm run build` — type‑check and build
|
|
225
|
-
- `npm test` — integration tests (mock)
|
|
226
|
-
- `npm test -- --real` — target real hardware (reuses your config)
|
|
227
|
-
- `npm run coverage` — coverage via Bun harness (minimum 90%)
|
|
536
|
+
> **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.
|
|
228
537
|
|
|
229
538
|
## Documentation
|
|
230
539
|
|
|
@@ -233,11 +542,17 @@ curl -s -X POST -H 'Content-Type: application/json' \
|
|
|
233
542
|
- [doc/c64u/c64-openapi.yaml](doc/c64u/c64-openapi.yaml) — REST surface (OpenAPI 3.1)
|
|
234
543
|
- [AGENTS.md](AGENTS.md) — LLM-facing quick setup, usage, and personas
|
|
235
544
|
|
|
545
|
+
## Static MCP Interface
|
|
546
|
+
|
|
547
|
+
The repository contains an auto-generated static mirror of the MCP server interface in the [./mcp](./mcp) folder.
|
|
548
|
+
|
|
549
|
+
This allows agents to inspect the available tools, resources, prompts, and schemas without connecting to the server.
|
|
550
|
+
|
|
236
551
|
## MCP API Reference
|
|
237
552
|
|
|
238
553
|
<!-- AUTO-GENERATED:MCP-DOCS-START -->
|
|
239
554
|
|
|
240
|
-
This MCP server exposes **
|
|
555
|
+
This MCP server exposes **15 tools**, **26 resources**, and **10 prompts** for controlling your Commodore 64.
|
|
241
556
|
|
|
242
557
|
### Tools
|
|
243
558
|
|
|
@@ -245,160 +560,200 @@ This MCP server exposes **12 tools**, **25 resources**, and **7 prompts** for co
|
|
|
245
560
|
|
|
246
561
|
Grouped entry point for configuration reads/writes, diagnostics, and snapshots.
|
|
247
562
|
|
|
248
|
-
| Operation | Description | Required Inputs | Notes |
|
|
249
|
-
| --- | --- | --- | --- |
|
|
250
|
-
| `batch_update` | Apply multiple configuration updates in a single request. | — | — |
|
|
251
|
-
| `diff` | Compare the current configuration with a snapshot. | `path` | — |
|
|
252
|
-
| `get` | Read a configuration category or specific item. | `category` | — |
|
|
253
|
-
| `info` | Retrieve Ultimate hardware information and status. | — | — |
|
|
254
|
-
| `list` | List configuration categories reported by the firmware. | — | — |
|
|
255
|
-
| `load_flash` | Load configuration from flash storage. | — | — |
|
|
256
|
-
| `read_debugreg` | Read the Ultimate debug register ($D7FF). | — | — |
|
|
257
|
-
| `reset_defaults` | Reset firmware configuration to factory defaults. | — | — |
|
|
258
|
-
| `restore` | Restore configuration from a snapshot file. | `path` | — |
|
|
259
|
-
| `save_flash` | Persist the current configuration to flash storage. | — | — |
|
|
260
|
-
| `set` | Write a configuration value in the selected category. | `category`, `item`, `value` | — |
|
|
261
|
-
| `shuffle` | Discover PRG/CRT files and run each with optional screen capture. | — | — |
|
|
262
|
-
| `snapshot` | Snapshot configuration to disk for later restore or diff. | `path` | — |
|
|
263
|
-
| `version` | Fetch firmware version details. | — | — |
|
|
264
|
-
| `write_debugreg` | Write a hex value to the Ultimate debug register ($D7FF). | `value` | — |
|
|
563
|
+
| Operation | Description | Required Inputs | Notes | C64U | VICE |
|
|
564
|
+
| --- | --- | --- | --- | --- | --- |
|
|
565
|
+
| `batch_update` | Apply multiple configuration updates in a single request. | — | — | ✅ | ✅ |
|
|
566
|
+
| `diff` | Compare the current configuration with a snapshot. | `path` | — | ✅ | ✅ |
|
|
567
|
+
| `get` | Read a configuration category or specific item. | `category` | — | ✅ | ✅ |
|
|
568
|
+
| `info` | Retrieve Ultimate hardware information and status. | — | — | ✅ | ✅ |
|
|
569
|
+
| `list` | List configuration categories reported by the firmware. | — | — | ✅ | ✅ |
|
|
570
|
+
| `load_flash` | Load configuration from flash storage. | — | — | ✅ | |
|
|
571
|
+
| `read_debugreg` | Read the Ultimate debug register ($D7FF). | — | — | ✅ | |
|
|
572
|
+
| `reset_defaults` | Reset firmware configuration to factory defaults. | — | — | ✅ | |
|
|
573
|
+
| `restore` | Restore configuration from a snapshot file. | `path` | — | ✅ | ✅ |
|
|
574
|
+
| `save_flash` | Persist the current configuration to flash storage. | — | — | ✅ | |
|
|
575
|
+
| `set` | Write a configuration value in the selected category. | `category`, `item`, `value` | — | ✅ | ✅ |
|
|
576
|
+
| `shuffle` | Discover PRG/CRT files and run each with optional screen capture. | — | — | ✅ | |
|
|
577
|
+
| `snapshot` | Snapshot configuration to disk for later restore or diff. | `path` | — | ✅ | ✅ |
|
|
578
|
+
| `version` | Fetch firmware version details. | — | — | ✅ | ✅ |
|
|
579
|
+
| `write_debugreg` | Write a hex value to the Ultimate debug register ($D7FF). | `value` | — | ✅ | |
|
|
580
|
+
|
|
581
|
+
#### c64_debug
|
|
582
|
+
|
|
583
|
+
Grouped entry point for VICE debugger operations (breakpoints, registers, stepping).
|
|
584
|
+
|
|
585
|
+
| Operation | Description | Required Inputs | Notes | C64U | VICE |
|
|
586
|
+
| --- | --- | --- | --- | --- | --- |
|
|
587
|
+
| `create_checkpoint` | Create a new checkpoint (breakpoint) in VICE. | `address` | — | | ✅ |
|
|
588
|
+
| `delete_checkpoint` | Remove a checkpoint by id. | `id` | — | | ✅ |
|
|
589
|
+
| `get_checkpoint` | Fetch a single checkpoint by id. | `id` | — | | ✅ |
|
|
590
|
+
| `get_registers` | Read register values, optionally filtered by name or id. | — | — | | ✅ |
|
|
591
|
+
| `list_checkpoints` | List all active VICE checkpoints (breakpoints). | — | — | | ✅ |
|
|
592
|
+
| `list_registers` | List available registers (metadata). | — | — | | ✅ |
|
|
593
|
+
| `set_condition` | Attach a conditional expression to a checkpoint. | `id`, `expression` | — | | ✅ |
|
|
594
|
+
| `set_registers` | Write register values. | `writes` | — | | ✅ |
|
|
595
|
+
| `step` | Single-step CPU execution. | — | — | | ✅ |
|
|
596
|
+
| `step_return` | Continue execution until the current routine returns. | — | — | | ✅ |
|
|
597
|
+
| `toggle_checkpoint` | Enable or disable a checkpoint by id. | `id`, `enabled` | — | | ✅ |
|
|
265
598
|
|
|
266
599
|
#### c64_disk
|
|
267
600
|
|
|
268
601
|
Grouped entry point for disk mounts, listings, image creation, and program discovery.
|
|
269
602
|
|
|
270
|
-
| Operation | Description | Required Inputs | Notes |
|
|
271
|
-
| --- | --- | --- | --- |
|
|
272
|
-
| `create_image` | Create a blank disk image of the specified format. | `format`, `path` | — |
|
|
273
|
-
| `file_info` | Inspect metadata for a file on the Ultimate filesystem. | `path` | — |
|
|
274
|
-
| `find_and_run` | Search for a PRG/CRT by name substring and run the first match. | `nameContains` | — |
|
|
275
|
-
| `list_drives` | List Ultimate drive slots and their mounted images. | — | — |
|
|
276
|
-
| `mount` | Mount a disk image with optional verification and retries. | `drive`, `image` | supports verify |
|
|
277
|
-
| `unmount` | Remove the mounted image from an Ultimate drive slot. | `drive` | — |
|
|
603
|
+
| Operation | Description | Required Inputs | Notes | C64U | VICE |
|
|
604
|
+
| --- | --- | --- | --- | --- | --- |
|
|
605
|
+
| `create_image` | Create a blank disk image of the specified format. | `format`, `path` | — | ✅ | |
|
|
606
|
+
| `file_info` | Inspect metadata for a file on the Ultimate filesystem. | `path` | — | ✅ | |
|
|
607
|
+
| `find_and_run` | Search for a PRG/CRT by name substring and run the first match. | `nameContains` | — | ✅ | |
|
|
608
|
+
| `list_drives` | List Ultimate drive slots and their mounted images. | — | — | ✅ | ✅ |
|
|
609
|
+
| `mount` | Mount a disk image with optional verification and retries. | `drive`, `image` | supports verify | ✅ | ✅ |
|
|
610
|
+
| `unmount` | Remove the mounted image from an Ultimate drive slot. | `drive` | — | ✅ | ✅ |
|
|
278
611
|
|
|
279
612
|
#### c64_drive
|
|
280
613
|
|
|
281
614
|
Grouped entry point for drive power, mode, reset, and ROM operations.
|
|
282
615
|
|
|
283
|
-
| Operation | Description | Required Inputs | Notes |
|
|
284
|
-
| --- | --- | --- | --- |
|
|
285
|
-
| `load_rom` | Temporarily load a custom ROM into an Ultimate drive slot. | `drive`, `path` | — |
|
|
286
|
-
| `power_off` | Power off a specific Ultimate drive slot. | `drive` | — |
|
|
287
|
-
| `power_on` | Power on a specific Ultimate drive slot. | `drive` | — |
|
|
288
|
-
| `reset` | Issue an IEC reset for the selected drive slot. | `drive` | — |
|
|
289
|
-
| `set_mode` | Set the emulation mode for a drive slot (1541/1571/1581). | `drive`, `mode` | — |
|
|
616
|
+
| Operation | Description | Required Inputs | Notes | C64U | VICE |
|
|
617
|
+
| --- | --- | --- | --- | --- | --- |
|
|
618
|
+
| `load_rom` | Temporarily load a custom ROM into an Ultimate drive slot. | `drive`, `path` | — | ✅ | |
|
|
619
|
+
| `power_off` | Power off a specific Ultimate drive slot. | `drive` | — | ✅ | ✅ |
|
|
620
|
+
| `power_on` | Power on a specific Ultimate drive slot. | `drive` | — | ✅ | ✅ |
|
|
621
|
+
| `reset` | Issue an IEC reset for the selected drive slot. | `drive` | — | ✅ | ✅ |
|
|
622
|
+
| `set_mode` | Set the emulation mode for a drive slot (1541/1571/1581). | `drive`, `mode` | — | ✅ | ✅ |
|
|
290
623
|
|
|
291
624
|
#### c64_extract
|
|
292
625
|
|
|
293
626
|
Grouped entry point for sprite/charset extraction, memory dumps, filesystem stats, and firmware health checks.
|
|
294
627
|
|
|
295
|
-
| Operation | Description | Required Inputs | Notes |
|
|
296
|
-
| --- | --- | --- | --- |
|
|
297
|
-
| `charset` | Locate and extract 2KB character sets from RAM. | — | — |
|
|
298
|
-
| `firmware_health` | Run firmware readiness checks and report status metrics. | — | — |
|
|
299
|
-
| `fs_stats` | Walk the filesystem and aggregate counts/bytes by extension. | — | — |
|
|
300
|
-
| `memory_dump` | Dump a RAM range to hex or binary files with manifest metadata. | `address`, `length`, `outputPath` | — |
|
|
301
|
-
| `sprites` | Scan RAM for sprites and optionally export .spr files. | `address`, `length` | — |
|
|
628
|
+
| Operation | Description | Required Inputs | Notes | C64U | VICE |
|
|
629
|
+
| --- | --- | --- | --- | --- | --- |
|
|
630
|
+
| `charset` | Locate and extract 2KB character sets from RAM. | — | — | ✅ | |
|
|
631
|
+
| `firmware_health` | Run firmware readiness checks and report status metrics. | — | — | ✅ | |
|
|
632
|
+
| `fs_stats` | Walk the filesystem and aggregate counts/bytes by extension. | — | — | ✅ | |
|
|
633
|
+
| `memory_dump` | Dump a RAM range to hex or binary files with manifest metadata. | `address`, `length`, `outputPath` | — | ✅ | |
|
|
634
|
+
| `sprites` | Scan RAM for sprites and optionally export .spr files. | `address`, `length` | — | ✅ | |
|
|
302
635
|
|
|
303
636
|
#### c64_graphics
|
|
304
637
|
|
|
305
|
-
Grouped entry point for
|
|
638
|
+
Grouped entry point for frame capture and graphics rendering workflows.
|
|
306
639
|
|
|
307
|
-
| Operation | Description | Required Inputs | Notes |
|
|
308
|
-
| --- | --- | --- | --- |
|
|
309
|
-
| `
|
|
310
|
-
| `
|
|
311
|
-
| `
|
|
312
|
-
| `
|
|
640
|
+
| Operation | Description | Required Inputs | Notes | C64U | VICE |
|
|
641
|
+
| --- | --- | --- | --- | --- | --- |
|
|
642
|
+
| `capture_frame` | Capture one or more complete video frames from the active backend. | — | — | ✅ | ✅ |
|
|
643
|
+
| `render_bitmap` | Import an image file, convert it to VIC-II bitmap memory, write it into RAM, and display it. | `imagePath`, `format` | — | ✅ | ✅ |
|
|
644
|
+
| `render_petscii_art` | Create PETSCII art from prompts, text, or explicit bitmap data, and optionally display it on the C64. | — | — | ✅ | ✅ |
|
|
645
|
+
| `render_petscii_text` | Display PETSCII text with optional border and background colours. | `text` | — | ✅ | ✅ |
|
|
646
|
+
| `render_sprite` | Display supplied 63-byte sprite data at the requested position and colour by writing memory and patching VIC-II registers directly. | `sprite` | — | ✅ | ✅ |
|
|
313
647
|
|
|
314
648
|
#### c64_memory
|
|
315
649
|
|
|
316
650
|
Grouped entry point for memory I/O, screen reads, and screen polling.
|
|
317
651
|
|
|
318
|
-
| Operation | Description | Required Inputs | Notes |
|
|
319
|
-
| --- | --- | --- | --- |
|
|
320
|
-
| `read` | Read a range of bytes and return a hex dump with address metadata. | `address` | — |
|
|
321
|
-
| `read_screen` | Return the current 40x25 text screen converted to ASCII. | — | — |
|
|
322
|
-
| `wait_for_text` | Poll the screen until a substring or regex appears, or timeout elapses. | `pattern` | — |
|
|
323
|
-
| `write` | Write a hexadecimal byte sequence into RAM. | `address`, `bytes` | supports verify |
|
|
652
|
+
| Operation | Description | Required Inputs | Notes | C64U | VICE |
|
|
653
|
+
| --- | --- | --- | --- | --- | --- |
|
|
654
|
+
| `read` | Read a range of bytes and return a hex dump with address metadata. | `address` | — | ✅ | ✅ |
|
|
655
|
+
| `read_screen` | Return the current 40x25 text screen converted to ASCII. | — | — | ✅ | ✅ |
|
|
656
|
+
| `wait_for_text` | Poll the screen until a substring or regex appears, or timeout elapses. | `pattern` | — | ✅ | ✅ |
|
|
657
|
+
| `write` | Write a hexadecimal byte sequence into RAM. | `address`, `bytes` | supports verify | ✅ | ✅ |
|
|
324
658
|
|
|
325
659
|
#### c64_printer
|
|
326
660
|
|
|
327
661
|
Grouped entry point for Commodore and Epson printing helpers.
|
|
328
662
|
|
|
329
|
-
| Operation | Description | Required Inputs | Notes |
|
|
330
|
-
| --- | --- | --- | --- |
|
|
331
|
-
| `define_chars` | Define custom printer characters (Commodore DLL mode). | `firstChar`, `chars` | — |
|
|
332
|
-
| `print_bitmap` | Print a bitmap row via Commodore (BIM) or Epson ESC/P workflows. | `printer`, `columns` | — |
|
|
333
|
-
| `print_text` | Generate BASIC that prints text to device 4. | `text` | — |
|
|
663
|
+
| Operation | Description | Required Inputs | Notes | C64U | VICE |
|
|
664
|
+
| --- | --- | --- | --- | --- | --- |
|
|
665
|
+
| `define_chars` | Define custom printer characters (Commodore DLL mode). | `firstChar`, `chars` | — | ✅ | |
|
|
666
|
+
| `print_bitmap` | Print a bitmap row via Commodore (BIM) or Epson ESC/P workflows. | `printer`, `columns` | — | ✅ | |
|
|
667
|
+
| `print_text` | Generate BASIC that prints text to device 4. | `text` | — | ✅ | |
|
|
334
668
|
|
|
335
669
|
#### c64_program
|
|
336
670
|
|
|
337
671
|
Grouped entry point for program upload, execution, and batch workflows.
|
|
338
672
|
|
|
339
|
-
| Operation | Description | Required Inputs | Notes |
|
|
340
|
-
| --- | --- | --- | --- |
|
|
341
|
-
| `batch_run` | Run multiple PRG/CRT programs with post-run assertions. | `programs` | — |
|
|
342
|
-
| `bundle_run` | Capture screen, memory, and debug registers into an artifact bundle. | `runId`, `outputPath` | — |
|
|
343
|
-
| `
|
|
344
|
-
| `
|
|
345
|
-
| `
|
|
346
|
-
| `
|
|
347
|
-
| `
|
|
673
|
+
| Operation | Description | Required Inputs | Notes | C64U | VICE |
|
|
674
|
+
| --- | --- | --- | --- | --- | --- |
|
|
675
|
+
| `batch_run` | Run multiple PRG/CRT programs with post-run assertions. | `programs` | — | ✅ | ✅ |
|
|
676
|
+
| `bundle_run` | Capture screen, memory, and debug registers into an artifact bundle. | `runId`, `outputPath` | — | ✅ | |
|
|
677
|
+
| `cross_platform_greeting` | Show a platform-customized greeting on one or more configured backends, capture screenshots, and verify the results. | — | supports verify | ✅ | ✅ |
|
|
678
|
+
| `load_prg` | Load a PRG from Ultimate storage without executing it. | `path` | — | ✅ | |
|
|
679
|
+
| `run_crt` | Mount and run a CRT cartridge image. | `path` | — | ✅ | |
|
|
680
|
+
| `run_prg` | Load and execute a PRG from Ultimate-visible storage on c64u or a host-local path on VICE. | `path` | — | ✅ | ✅ |
|
|
681
|
+
| `upload_run_asm` | Assemble 6502/6510 source, upload the PRG, and execute it. | `program` | supports verify | ✅ | ✅ |
|
|
682
|
+
| `upload_run_basic` | Upload Commodore BASIC v2 source and execute it immediately. | `program` | supports verify | ✅ | ✅ |
|
|
348
683
|
|
|
349
684
|
#### c64_rag
|
|
350
685
|
|
|
351
686
|
Grouped entry point for BASIC and assembly RAG lookups.
|
|
352
687
|
|
|
353
|
-
| Operation | Description | Required Inputs | Notes |
|
|
354
|
-
| --- | --- | --- | --- |
|
|
355
|
-
| `asm` | Retrieve 6502/6510 assembly references from the local knowledge base. | `q` | — |
|
|
356
|
-
| `basic` | Retrieve BASIC references and snippets from the local knowledge base. | `q` | — |
|
|
688
|
+
| Operation | Description | Required Inputs | Notes | C64U | VICE |
|
|
689
|
+
| --- | --- | --- | --- | --- | --- |
|
|
690
|
+
| `asm` | Retrieve 6502/6510 assembly references from the local knowledge base. | `q` | — | ✅ | ✅ |
|
|
691
|
+
| `basic` | Retrieve BASIC references and snippets from the local knowledge base. | `q` | — | ✅ | ✅ |
|
|
692
|
+
|
|
693
|
+
#### c64_select_backend
|
|
694
|
+
|
|
695
|
+
Switch the active backend between C64U hardware and the VICE emulator at runtime.
|
|
696
|
+
|
|
697
|
+
| Operation | Description | Required Inputs | Notes | C64U | VICE |
|
|
698
|
+
| --- | --- | --- | --- | --- | --- |
|
|
699
|
+
| `select` | Switch the active runtime backend without restarting the MCP server. | `backend` | — | ✅ | ✅ |
|
|
357
700
|
|
|
358
701
|
#### c64_sound
|
|
359
702
|
|
|
360
703
|
Grouped entry point for SID control, playback, composition, and analysis workflows.
|
|
361
704
|
|
|
362
|
-
| Operation | Description | Required Inputs | Notes |
|
|
363
|
-
| --- | --- | --- | --- |
|
|
364
|
-
| `analyze` | Automatically analyze SID playback when verification is requested. | `request` | — |
|
|
365
|
-
| `
|
|
366
|
-
| `
|
|
367
|
-
| `
|
|
368
|
-
| `
|
|
369
|
-
| `
|
|
370
|
-
| `
|
|
371
|
-
| `
|
|
372
|
-
| `
|
|
373
|
-
| `
|
|
374
|
-
| `
|
|
375
|
-
| `
|
|
705
|
+
| Operation | Description | Required Inputs | Notes | C64U | VICE |
|
|
706
|
+
| --- | --- | --- | --- | --- | --- |
|
|
707
|
+
| `analyze` | Automatically analyze SID playback when verification is requested. | `request` | — | ✅ | |
|
|
708
|
+
| `capture_samples` | Capture raw stereo PCM samples from the C64 Ultimate audio UDP stream. | — | — | ✅ | |
|
|
709
|
+
| `compile_play` | Compile SIDWAVE or CPG source and optionally play it immediately. | — | — | ✅ | ✅ |
|
|
710
|
+
| `generate` | Generate a lightweight SID arpeggio playback sequence. | — | — | ✅ | ✅ |
|
|
711
|
+
| `note_off` | Release a SID voice by clearing its gate bit. | `voice` | — | ✅ | ✅ |
|
|
712
|
+
| `note_on` | Trigger a SID voice with configurable waveform, ADSR, and pitch. | — | — | ✅ | ✅ |
|
|
713
|
+
| `pipeline` | Compile a SIDWAVE score, play it, and analyze the recording. | — | supports verify | ✅ | |
|
|
714
|
+
| `play_mod_file` | Play a MOD tracker module via the Ultimate SID player. | `path` | — | ✅ | |
|
|
715
|
+
| `play_preset` | Compile and play a built-in SID preset such as Für Elise by Beethoven. | — | supports verify | ✅ | ✅ |
|
|
716
|
+
| `play_sid_file` | Play a SID file stored on the Ultimate filesystem. | `path` | — | ✅ | |
|
|
717
|
+
| `record_analyze` | Record audio for a fixed duration and return SID analysis metrics. | `durationSeconds` | — | ✅ | |
|
|
718
|
+
| `reset` | Soft or hard reset of SID registers to clear glitches. | — | — | ✅ | ✅ |
|
|
719
|
+
| `set_volume` | Set the SID master volume register at $D418 (0-15). | `volume` | — | ✅ | ✅ |
|
|
720
|
+
| `silence_all` | Silence all SID voices with optional audio verification. | — | supports verify | ✅ | ✅ |
|
|
376
721
|
|
|
377
722
|
#### c64_stream
|
|
378
723
|
|
|
379
724
|
Grouped entry point for starting and stopping Ultimate streaming sessions.
|
|
380
725
|
|
|
381
|
-
| Operation | Description | Required Inputs | Notes |
|
|
382
|
-
| --- | --- | --- | --- |
|
|
383
|
-
| `start` | Start an Ultimate streaming session toward a host:port target. | `stream`, `target` | — |
|
|
384
|
-
| `stop` | Stop an active Ultimate streaming session. | `stream` | — |
|
|
726
|
+
| Operation | Description | Required Inputs | Notes | C64U | VICE |
|
|
727
|
+
| --- | --- | --- | --- | --- | --- |
|
|
728
|
+
| `start` | Start an Ultimate streaming session toward a host:port target. | `stream`, `target` | — | ✅ | |
|
|
729
|
+
| `stop` | Stop an active Ultimate streaming session. | `stream` | — | ✅ | |
|
|
385
730
|
|
|
386
731
|
#### c64_system
|
|
387
732
|
|
|
388
733
|
Grouped entry point for power, reset, menu, and background task control.
|
|
389
734
|
|
|
390
|
-
| Operation | Description | Required Inputs | Notes |
|
|
391
|
-
| --- | --- | --- | --- |
|
|
392
|
-
| `list_tasks` | List known background tasks with status metadata. | — | — |
|
|
393
|
-
| `menu` | Toggle the Ultimate menu button for navigation. | — | — |
|
|
394
|
-
| `pause` | Pause the machine
|
|
395
|
-
| `
|
|
396
|
-
| `
|
|
397
|
-
| `
|
|
398
|
-
| `
|
|
399
|
-
| `
|
|
400
|
-
| `
|
|
401
|
-
| `
|
|
735
|
+
| Operation | Description | Required Inputs | Notes | C64U | VICE |
|
|
736
|
+
| --- | --- | --- | --- | --- | --- |
|
|
737
|
+
| `list_tasks` | List known background tasks with status metadata. | — | — | ✅ | ✅ |
|
|
738
|
+
| `menu` | Toggle the Ultimate menu button for navigation. | — | — | ✅ | |
|
|
739
|
+
| `pause` | Pause the machine until resumed. | — | — | ✅ | |
|
|
740
|
+
| `performance_report` | Summarize diagnostics spans and tool latencies from the current or latest MCP session. | — | — | ✅ | ✅ |
|
|
741
|
+
| `poweroff` | Request a controlled shutdown via the Ultimate firmware. | — | — | ✅ | ✅ |
|
|
742
|
+
| `reboot` | Trigger a firmware reboot to recover from faults. | — | — | ✅ | ✅ |
|
|
743
|
+
| `reset` | Issue a soft reset without cutting power. | — | — | ✅ | ✅ |
|
|
744
|
+
| `resume` | Resume CPU execution after a pause. | — | — | ✅ | |
|
|
745
|
+
| `start_task` | Start a named background task that runs on an interval. | `name`, `operation` | — | ✅ | ✅ |
|
|
746
|
+
| `stop_all_tasks` | Stop every running background task and persist state. | — | — | ✅ | ✅ |
|
|
747
|
+
| `stop_task` | Stop a specific background task and clear its timer. | `name` | — | ✅ | ✅ |
|
|
748
|
+
|
|
749
|
+
#### c64_vice
|
|
750
|
+
|
|
751
|
+
Grouped entry point for reading and updating selected VICE resources.
|
|
752
|
+
|
|
753
|
+
| Operation | Description | Required Inputs | Notes | C64U | VICE |
|
|
754
|
+
| --- | --- | --- | --- | --- | --- |
|
|
755
|
+
| `resource_get` | Read a VICE configuration resource (safe prefixes only). | `name` | — | | ✅ |
|
|
756
|
+
| `resource_set` | Write a VICE configuration resource (safe prefixes only). | `name`, `value` | — | | ✅ |
|
|
402
757
|
|
|
403
758
|
### Resources
|
|
404
759
|
|
|
@@ -406,6 +761,7 @@ Grouped entry point for power, reset, menu, and background task control.
|
|
|
406
761
|
| --- | --- |
|
|
407
762
|
| `c64://docs/index` | Explains how to approach each knowledge bundle and when to consult it. |
|
|
408
763
|
| `c64://context/bootstrap` | Step-by-step rules for safe automation, verification, and rollback on the C64. |
|
|
764
|
+
| `c64://context/fast-paths` | Condensed routing guide for one-call demos, backend switching, and when to prefer orchestration over manual tool composition. |
|
|
409
765
|
| `c64://specs/basic` | Token definitions, syntax rules, and device I/O guidance for BASIC v2. |
|
|
410
766
|
| `c64://docs/basic/pitfalls` | Quickref covering quotation handling, line length, tokenization, variable names, and other BASIC traps. |
|
|
411
767
|
| `c64://specs/assembly` | Official opcode matrix, addressing modes, and zero-page strategy for the 6510 CPU. |
|
|
@@ -434,12 +790,15 @@ Grouped entry point for power, reset, menu, and background task control.
|
|
|
434
790
|
|
|
435
791
|
| Name | Description |
|
|
436
792
|
| --- | --- |
|
|
437
|
-
| `assembly-program` |
|
|
438
|
-
| `basic-program` |
|
|
439
|
-
| `
|
|
440
|
-
| `
|
|
441
|
-
| `
|
|
442
|
-
| `
|
|
443
|
-
| `
|
|
793
|
+
| `assembly-program` | Route 6502/6510 routine requests to the canonical assembly skill. |
|
|
794
|
+
| `basic-program` | Route bespoke Commodore BASIC v2 requests to the canonical BASIC skill. |
|
|
795
|
+
| `cross-platform-demo` | Route quick visible demo requests to the cross-platform demo skill. |
|
|
796
|
+
| `drive-manager` | Route disk-image and drive-state requests to the canonical drive skill. |
|
|
797
|
+
| `graphics-demo` | Route graphics requests to the canonical graphics skill. |
|
|
798
|
+
| `hello-world` | Route ultra-fast hello-world and smoke-test requests to the canonical greeting skill. |
|
|
799
|
+
| `memory-debug` | Route reversible memory inspection or patching work to the canonical memory skill. |
|
|
800
|
+
| `preset-music-demo` | Route quick recognizable tune requests to the SID music skill. |
|
|
801
|
+
| `printer-job` | Route printer work to the canonical printer skill. |
|
|
802
|
+
| `sid-music` | Route SID playback and composition work to the canonical SID skill. |
|
|
444
803
|
|
|
445
804
|
<!-- AUTO-GENERATED:MCP-DOCS-END -->
|