c64bridge 0.8.1 → 0.9.1

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.
Files changed (92) hide show
  1. package/.github/prompts/steer.prompt.md +55 -0
  2. package/AGENTS.md +9 -7
  3. package/README.md +192 -154
  4. package/data/embeddings_asm.json +1 -1
  5. package/data/embeddings_basic.json +1 -1
  6. package/data/embeddings_hardware.json +1 -1
  7. package/data/embeddings_mixed.json +1 -1
  8. package/data/embeddings_other.json +1 -1
  9. package/data/graphics/petscii-style-guide.md +4 -4
  10. package/data/graphics/sprite-charset-best-practices.md +9 -9
  11. package/data/vice/vice-binary-monitor-spec.md +938 -0
  12. package/dist/.tsbuildinfo +1 -1
  13. package/dist/c64Client.js +76 -2
  14. package/dist/device.js +129 -13
  15. package/dist/mcp-server.js +1 -1
  16. package/dist/prompts/registry.js +27 -25
  17. package/dist/rag/indexer.js +18 -8
  18. package/dist/rag/knowledgeIndex.js +112 -79
  19. package/dist/rag/resourceUris.js +93 -0
  20. package/dist/sidwaveCompiler.js +1 -1
  21. package/dist/{assemblyConverter.js → tools/assember.js} +10 -1
  22. package/dist/tools/audio.js +11 -11
  23. package/dist/{basicConverter.js → tools/basicTokenizer.js} +1 -1
  24. package/dist/tools/debug.js +159 -6
  25. package/dist/tools/developer.js +13 -13
  26. package/dist/tools/disassembler.js +478 -0
  27. package/dist/tools/graphics.js +10 -10
  28. package/dist/tools/input.js +338 -0
  29. package/dist/tools/machineControl.js +5 -5
  30. package/dist/tools/memory.js +336 -12
  31. package/dist/tools/meta/index.js +1 -1
  32. package/dist/tools/printer.js +11 -12
  33. package/dist/tools/programRunners.js +61 -22
  34. package/dist/tools/rag.js +9 -9
  35. package/dist/tools/registry/batch.js +167 -0
  36. package/dist/tools/registry/config.js +1 -1
  37. package/dist/tools/registry/disk.js +1 -1
  38. package/dist/tools/registry/drive.js +1 -1
  39. package/dist/tools/registry/extract.js +1 -1
  40. package/dist/tools/registry/graphics.js +102 -2
  41. package/dist/tools/registry/index.js +4 -0
  42. package/dist/tools/registry/input.js +2 -0
  43. package/dist/tools/registry/memory.js +62 -2
  44. package/dist/tools/registry/platform.js +1 -1
  45. package/dist/tools/registry/printer.js +1 -1
  46. package/dist/tools/registry/program.js +1 -1
  47. package/dist/tools/registry/rag.js +1 -1
  48. package/dist/tools/registry/sound.js +1 -1
  49. package/dist/tools/registry/stream.js +1 -1
  50. package/dist/tools/registry/system.js +1 -1
  51. package/dist/tools/schema.js +4 -5
  52. package/dist/tools/storage.js +15 -15
  53. package/dist/tools/streaming.js +3 -3
  54. package/dist/tools/symbolRegistry.js +49 -0
  55. package/dist/tools/types.js +56 -4
  56. package/dist/tools/vice.js +2 -5
  57. package/dist/vice/process.js +120 -2
  58. package/dist/vice/readiness.js +35 -0
  59. package/dist/vice/smokeOptions.js +44 -0
  60. package/dist/vice/viceClient.js +5 -1
  61. package/dist/viceRunner.js +2 -0
  62. package/doc/plans/prompts/README.md +7 -7
  63. package/mcp/prompts.json +42 -59
  64. package/mcp/protocol-examples.json +2 -2
  65. package/mcp/resources.json +179 -166
  66. package/mcp/schemas/c64_batch.schema.json +53 -0
  67. package/mcp/schemas/c64_config.schema.json +525 -283
  68. package/mcp/schemas/c64_debug.schema.json +763 -304
  69. package/mcp/schemas/c64_disk.schema.json +499 -243
  70. package/mcp/schemas/c64_drive.schema.json +165 -90
  71. package/mcp/schemas/c64_extract.schema.json +533 -274
  72. package/mcp/schemas/c64_graphics.schema.json +607 -295
  73. package/mcp/schemas/c64_input.schema.json +136 -0
  74. package/mcp/schemas/c64_memory.schema.json +637 -128
  75. package/mcp/schemas/c64_printer.schema.json +393 -196
  76. package/mcp/schemas/c64_program.schema.json +699 -340
  77. package/mcp/schemas/c64_rag.schema.json +100 -54
  78. package/mcp/schemas/c64_select_backend.schema.json +49 -23
  79. package/mcp/schemas/c64_sound.schema.json +1092 -577
  80. package/mcp/schemas/c64_stream.schema.json +89 -47
  81. package/mcp/schemas/c64_system.schema.json +351 -185
  82. package/mcp/schemas/c64_vice.schema.json +85 -47
  83. package/mcp/server.json +1 -1
  84. package/mcp/tools.json +7299 -3346
  85. package/mcp.json +3 -3
  86. package/package.json +17 -14
  87. package/scripts/fetch-external-sources.mjs +1 -2
  88. package/scripts/run-coverage.mjs +33 -1
  89. package/scripts/run-tests.mjs +2 -2
  90. package/scripts/run-tests.ts +275 -52
  91. package/scripts/update-readme.ts +132 -3
  92. package/server.json +2 -2
@@ -1,333 +1,645 @@
1
1
  {
2
2
  "type": "object",
3
- "description": "Graphics operations available via the c64_graphics tool.",
4
- "oneOf": [
5
- {
6
- "type": "object",
7
- "description": "Capture one or more complete video frames from the active backend.",
3
+ "properties": {
4
+ "op": {
5
+ "type": "string",
6
+ "enum": [
7
+ "capture_frame",
8
+ "render_petscii_art",
9
+ "render_petscii_text",
10
+ "render_sprite",
11
+ "render_bitmap",
12
+ "get_display_state"
13
+ ],
14
+ "description": "Selects the operation."
15
+ },
16
+ "count": {
17
+ "type": [
18
+ "integer",
19
+ "null"
20
+ ],
21
+ "description": "Number of frames to capture.",
22
+ "minimum": 1,
23
+ "maximum": 32,
24
+ "default": 1
25
+ },
26
+ "includePixels": {
27
+ "type": [
28
+ "boolean",
29
+ "null"
30
+ ],
31
+ "description": "Include pixel payload bytes in the response.",
32
+ "default": true
33
+ },
34
+ "encoding": {
35
+ "type": [
36
+ "string",
37
+ "null"
38
+ ],
39
+ "description": "Encoding used for the pixel payload when included.",
40
+ "enum": [
41
+ "base64",
42
+ "hex"
43
+ ],
44
+ "default": "base64"
45
+ },
46
+ "prompt": {
47
+ "type": [
48
+ "string",
49
+ "null"
50
+ ],
51
+ "description": "Natural language prompt describing the desired PETSCII art.",
52
+ "minLength": 1
53
+ },
54
+ "text": {
55
+ "type": [
56
+ "string",
57
+ "null"
58
+ ],
59
+ "description": "Exact text to render in PETSCII (overrides prompt derivation).",
60
+ "minLength": 1
61
+ },
62
+ "maxWidth": {
63
+ "type": [
64
+ "integer",
65
+ "null"
66
+ ],
67
+ "description": "Maximum bitmap width in pixels (1-320).",
68
+ "minimum": 1,
69
+ "maximum": 320
70
+ },
71
+ "maxHeight": {
72
+ "type": [
73
+ "integer",
74
+ "null"
75
+ ],
76
+ "description": "Maximum bitmap height in pixels (1-200).",
77
+ "minimum": 1,
78
+ "maximum": 200
79
+ },
80
+ "borderColor": {
81
+ "type": [
82
+ "integer",
83
+ "null"
84
+ ],
85
+ "description": "Border colour index (0-15).",
86
+ "minimum": 0,
87
+ "maximum": 15
88
+ },
89
+ "backgroundColor": {
90
+ "type": [
91
+ "integer",
92
+ "null"
93
+ ],
94
+ "description": "Background colour index (0-15).",
95
+ "minimum": 0,
96
+ "maximum": 15
97
+ },
98
+ "foregroundColor": {
99
+ "type": [
100
+ "integer",
101
+ "null"
102
+ ],
103
+ "description": "Foreground colour index (0-15).",
104
+ "minimum": 0,
105
+ "maximum": 15
106
+ },
107
+ "dryRun": {
108
+ "type": "boolean",
109
+ "description": "When true, skip uploading the generated BASIC program to the C64.",
110
+ "default": false
111
+ },
112
+ "bitmap": {
113
+ "description": "Explicit bitmap definition for PETSCII rendering.",
114
+ "type": [
115
+ "object",
116
+ "null"
117
+ ],
8
118
  "properties": {
9
- "op": {
10
- "const": "capture_frame"
11
- },
12
- "count": {
13
- "type": [
14
- "integer",
15
- "null"
16
- ],
17
- "description": "Number of frames to capture.",
119
+ "width": {
120
+ "type": "integer",
18
121
  "minimum": 1,
19
- "maximum": 32,
20
- "default": 1
122
+ "maximum": 320
21
123
  },
22
- "includePixels": {
23
- "type": [
24
- "boolean",
25
- "null"
26
- ],
27
- "description": "Include pixel payload bytes in the response.",
28
- "default": true
124
+ "height": {
125
+ "type": "integer",
126
+ "minimum": 1,
127
+ "maximum": 200
29
128
  },
30
- "encoding": {
31
- "type": [
32
- "string",
33
- "null"
34
- ],
35
- "description": "Encoding used for the pixel payload when included.",
36
- "enum": [
37
- "base64",
38
- "hex"
39
- ],
40
- "default": "base64"
129
+ "pixels": {
130
+ "type": "array",
131
+ "items": {
132
+ "type": "integer",
133
+ "minimum": 0,
134
+ "maximum": 1
135
+ }
41
136
  }
42
137
  },
43
138
  "required": [
44
- "op"
139
+ "width",
140
+ "height",
141
+ "pixels"
45
142
  ],
46
143
  "additionalProperties": false
47
144
  },
145
+ "sprite": {
146
+ "description": "63-byte sprite definition provided as base64/hex string or array of bytes.",
147
+ "type": [
148
+ "string",
149
+ "array"
150
+ ],
151
+ "items": {
152
+ "type": "integer",
153
+ "minimum": 0,
154
+ "maximum": 255
155
+ },
156
+ "minItems": 63,
157
+ "maxItems": 63
158
+ },
159
+ "index": {
160
+ "type": "integer",
161
+ "description": "Sprite index (0-7) to configure in screen memory.",
162
+ "minimum": 0,
163
+ "maximum": 7,
164
+ "default": 0
165
+ },
166
+ "x": {
167
+ "type": "integer",
168
+ "description": "Sprite X position (0-511).",
169
+ "minimum": 0,
170
+ "maximum": 511,
171
+ "default": 100
172
+ },
173
+ "y": {
174
+ "type": "integer",
175
+ "description": "Sprite Y position (0-255).",
176
+ "minimum": 0,
177
+ "maximum": 255,
178
+ "default": 100
179
+ },
180
+ "color": {
181
+ "type": "integer",
182
+ "description": "Sprite colour index (0-15).",
183
+ "minimum": 0,
184
+ "maximum": 15,
185
+ "default": 1
186
+ },
187
+ "multicolour": {
188
+ "type": "boolean",
189
+ "description": "Enable multicolour mode for the sprite.",
190
+ "default": false
191
+ },
192
+ "imagePath": {
193
+ "type": "string",
194
+ "description": "Filesystem path of the source image (PNG, JPEG, BMP, GIF, TIFF, and other Jimp-supported formats).",
195
+ "minLength": 1
196
+ },
197
+ "format": {
198
+ "description": "Bitmap encoding mode to generate for the VIC-II display.",
199
+ "type": "string",
200
+ "enum": [
201
+ "hires",
202
+ "multicolor"
203
+ ]
204
+ },
205
+ "bitmapAddress": {
206
+ "description": "Absolute C64 memory address, provided as an integer or hex string such as $2000.",
207
+ "type": [
208
+ "integer",
209
+ "string",
210
+ "null"
211
+ ],
212
+ "default": 8192
213
+ },
214
+ "screenAddress": {
215
+ "description": "Absolute C64 memory address, provided as an integer or hex string such as $2000.",
216
+ "type": [
217
+ "integer",
218
+ "string",
219
+ "null"
220
+ ],
221
+ "default": 1024
222
+ },
223
+ "preserveAspect": {
224
+ "type": "boolean",
225
+ "description": "Preserve the source image aspect ratio and pad with the background colour.",
226
+ "default": true
227
+ }
228
+ },
229
+ "required": [
230
+ "op"
231
+ ],
232
+ "description": "Graphics operations available via the c64_graphics tool.\n\nOperations:\n- capture_frame: Capture one or more complete video frames from the active backend. Required inputs: none. Optional inputs: count, includePixels, encoding.\n- render_petscii_art: Create PETSCII art from prompts, text, or explicit bitmap data, and optionally display it on the C64. Required inputs: none. Optional inputs: prompt, text, maxWidth, maxHeight, borderColor, backgroundColor, foregroundColor, dryRun, bitmap.\n- render_petscii_text: Display PETSCII text with optional border and background colours. Required inputs: text. Optional inputs: borderColor, backgroundColor.\n- render_sprite: Display supplied 63-byte sprite data at the requested position and colour by writing memory and patching VIC-II registers directly. Required inputs: sprite. Optional inputs: index, x, y, color, multicolour.\n- render_bitmap: Import an image file, convert it to VIC-II bitmap memory, write it into RAM, and display it. Required inputs: imagePath, format. Optional inputs: bitmapAddress, screenAddress, borderColor, backgroundColor, preserveAspect.\n- 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. Required inputs: none.",
233
+ "additionalProperties": false,
234
+ "x-c64bridge-operations": [
48
235
  {
49
- "type": "object",
50
- "description": "Create PETSCII art from prompts, text, or explicit bitmap data, and optionally display it on the C64.",
51
- "properties": {
52
- "prompt": {
53
- "type": [
54
- "string",
55
- "null"
56
- ],
57
- "description": "Natural language prompt describing the desired PETSCII art.",
58
- "minLength": 1
59
- },
60
- "text": {
61
- "type": [
62
- "string",
63
- "null"
64
- ],
65
- "description": "Exact text to render in PETSCII (overrides prompt derivation).",
66
- "minLength": 1
67
- },
68
- "maxWidth": {
69
- "type": [
70
- "integer",
71
- "null"
72
- ],
73
- "description": "Maximum bitmap width in pixels (1-320).",
74
- "minimum": 1,
75
- "maximum": 320
76
- },
77
- "maxHeight": {
78
- "type": [
79
- "integer",
80
- "null"
81
- ],
82
- "description": "Maximum bitmap height in pixels (1-200).",
83
- "minimum": 1,
84
- "maximum": 200
85
- },
86
- "borderColor": {
87
- "type": [
88
- "integer",
89
- "null"
90
- ],
91
- "description": "Border colour index (0-15).",
92
- "minimum": 0,
93
- "maximum": 15
94
- },
95
- "backgroundColor": {
96
- "type": [
97
- "integer",
98
- "null"
99
- ],
100
- "description": "Background colour index (0-15).",
101
- "minimum": 0,
102
- "maximum": 15
103
- },
104
- "foregroundColor": {
105
- "type": [
106
- "integer",
107
- "null"
108
- ],
109
- "description": "Foreground colour index (0-15).",
110
- "minimum": 0,
111
- "maximum": 15
112
- },
113
- "dryRun": {
114
- "type": "boolean",
115
- "description": "When true, skip uploading the generated BASIC program to the C64.",
116
- "default": false
236
+ "op": "capture_frame",
237
+ "description": "Capture one or more complete video frames from the active backend.",
238
+ "required": [],
239
+ "optional": [
240
+ "count",
241
+ "includePixels",
242
+ "encoding"
243
+ ],
244
+ "inputSchema": {
245
+ "type": "object",
246
+ "description": "Capture one or more complete video frames from the active backend.",
247
+ "properties": {
248
+ "op": {
249
+ "const": "capture_frame"
250
+ },
251
+ "count": {
252
+ "type": [
253
+ "integer",
254
+ "null"
255
+ ],
256
+ "description": "Number of frames to capture.",
257
+ "minimum": 1,
258
+ "maximum": 32,
259
+ "default": 1
260
+ },
261
+ "includePixels": {
262
+ "type": [
263
+ "boolean",
264
+ "null"
265
+ ],
266
+ "description": "Include pixel payload bytes in the response.",
267
+ "default": true
268
+ },
269
+ "encoding": {
270
+ "type": [
271
+ "string",
272
+ "null"
273
+ ],
274
+ "description": "Encoding used for the pixel payload when included.",
275
+ "enum": [
276
+ "base64",
277
+ "hex"
278
+ ],
279
+ "default": "base64"
280
+ }
117
281
  },
118
- "bitmap": {
119
- "description": "Explicit bitmap definition for PETSCII rendering.",
120
- "type": [
121
- "object",
122
- "null"
123
- ],
124
- "properties": {
125
- "width": {
126
- "type": "integer",
127
- "minimum": 1,
128
- "maximum": 320
129
- },
130
- "height": {
131
- "type": "integer",
132
- "minimum": 1,
133
- "maximum": 200
134
- },
135
- "pixels": {
136
- "type": "array",
137
- "items": {
282
+ "required": [
283
+ "op"
284
+ ],
285
+ "additionalProperties": false
286
+ }
287
+ },
288
+ {
289
+ "op": "render_petscii_art",
290
+ "description": "Create PETSCII art from prompts, text, or explicit bitmap data, and optionally display it on the C64.",
291
+ "required": [],
292
+ "optional": [
293
+ "prompt",
294
+ "text",
295
+ "maxWidth",
296
+ "maxHeight",
297
+ "borderColor",
298
+ "backgroundColor",
299
+ "foregroundColor",
300
+ "dryRun",
301
+ "bitmap"
302
+ ],
303
+ "inputSchema": {
304
+ "type": "object",
305
+ "description": "Create PETSCII art from prompts, text, or explicit bitmap data, and optionally display it on the C64.",
306
+ "properties": {
307
+ "prompt": {
308
+ "type": [
309
+ "string",
310
+ "null"
311
+ ],
312
+ "description": "Natural language prompt describing the desired PETSCII art.",
313
+ "minLength": 1
314
+ },
315
+ "text": {
316
+ "type": [
317
+ "string",
318
+ "null"
319
+ ],
320
+ "description": "Exact text to render in PETSCII (overrides prompt derivation).",
321
+ "minLength": 1
322
+ },
323
+ "maxWidth": {
324
+ "type": [
325
+ "integer",
326
+ "null"
327
+ ],
328
+ "description": "Maximum bitmap width in pixels (1-320).",
329
+ "minimum": 1,
330
+ "maximum": 320
331
+ },
332
+ "maxHeight": {
333
+ "type": [
334
+ "integer",
335
+ "null"
336
+ ],
337
+ "description": "Maximum bitmap height in pixels (1-200).",
338
+ "minimum": 1,
339
+ "maximum": 200
340
+ },
341
+ "borderColor": {
342
+ "type": [
343
+ "integer",
344
+ "null"
345
+ ],
346
+ "description": "Border colour index (0-15).",
347
+ "minimum": 0,
348
+ "maximum": 15
349
+ },
350
+ "backgroundColor": {
351
+ "type": [
352
+ "integer",
353
+ "null"
354
+ ],
355
+ "description": "Background colour index (0-15).",
356
+ "minimum": 0,
357
+ "maximum": 15
358
+ },
359
+ "foregroundColor": {
360
+ "type": [
361
+ "integer",
362
+ "null"
363
+ ],
364
+ "description": "Foreground colour index (0-15).",
365
+ "minimum": 0,
366
+ "maximum": 15
367
+ },
368
+ "dryRun": {
369
+ "type": "boolean",
370
+ "description": "When true, skip uploading the generated BASIC program to the C64.",
371
+ "default": false
372
+ },
373
+ "bitmap": {
374
+ "description": "Explicit bitmap definition for PETSCII rendering.",
375
+ "type": [
376
+ "object",
377
+ "null"
378
+ ],
379
+ "properties": {
380
+ "width": {
138
381
  "type": "integer",
139
- "minimum": 0,
140
- "maximum": 1
382
+ "minimum": 1,
383
+ "maximum": 320
384
+ },
385
+ "height": {
386
+ "type": "integer",
387
+ "minimum": 1,
388
+ "maximum": 200
389
+ },
390
+ "pixels": {
391
+ "type": "array",
392
+ "items": {
393
+ "type": "integer",
394
+ "minimum": 0,
395
+ "maximum": 1
396
+ }
141
397
  }
142
- }
398
+ },
399
+ "required": [
400
+ "width",
401
+ "height",
402
+ "pixels"
403
+ ],
404
+ "additionalProperties": false
143
405
  },
144
- "required": [
145
- "width",
146
- "height",
147
- "pixels"
148
- ],
149
- "additionalProperties": false
406
+ "op": {
407
+ "const": "render_petscii_art"
408
+ }
150
409
  },
151
- "op": {
152
- "const": "render_petscii_art"
153
- }
154
- },
155
- "additionalProperties": false,
156
- "required": [
157
- "op"
158
- ]
410
+ "additionalProperties": false,
411
+ "required": [
412
+ "op"
413
+ ]
414
+ }
159
415
  },
160
416
  {
161
- "type": "object",
417
+ "op": "render_petscii_text",
162
418
  "description": "Display PETSCII text with optional border and background colours.",
163
- "properties": {
164
- "text": {
165
- "type": "string",
166
- "description": "The PETSCII text to print after clearing the screen.",
167
- "minLength": 1
168
- },
169
- "borderColor": {
170
- "type": [
171
- "integer",
172
- "null"
173
- ],
174
- "description": "Border colour index (0-15).",
175
- "minimum": 0,
176
- "maximum": 15
177
- },
178
- "backgroundColor": {
179
- "type": [
180
- "integer",
181
- "null"
182
- ],
183
- "description": "Background colour index (0-15).",
184
- "minimum": 0,
185
- "maximum": 15
186
- },
187
- "op": {
188
- "const": "render_petscii_text"
189
- }
190
- },
191
419
  "required": [
192
- "text",
193
- "op"
420
+ "text"
194
421
  ],
195
- "additionalProperties": false
422
+ "optional": [
423
+ "borderColor",
424
+ "backgroundColor"
425
+ ],
426
+ "inputSchema": {
427
+ "type": "object",
428
+ "description": "Display PETSCII text with optional border and background colours.",
429
+ "properties": {
430
+ "text": {
431
+ "type": "string",
432
+ "description": "The PETSCII text to print after clearing the screen.",
433
+ "minLength": 1
434
+ },
435
+ "borderColor": {
436
+ "type": [
437
+ "integer",
438
+ "null"
439
+ ],
440
+ "description": "Border colour index (0-15).",
441
+ "minimum": 0,
442
+ "maximum": 15
443
+ },
444
+ "backgroundColor": {
445
+ "type": [
446
+ "integer",
447
+ "null"
448
+ ],
449
+ "description": "Background colour index (0-15).",
450
+ "minimum": 0,
451
+ "maximum": 15
452
+ },
453
+ "op": {
454
+ "const": "render_petscii_text"
455
+ }
456
+ },
457
+ "required": [
458
+ "text",
459
+ "op"
460
+ ],
461
+ "additionalProperties": false
462
+ }
196
463
  },
197
464
  {
198
- "type": "object",
465
+ "op": "render_sprite",
199
466
  "description": "Display supplied 63-byte sprite data at the requested position and colour by writing memory and patching VIC-II registers directly.",
200
- "properties": {
201
- "sprite": {
202
- "description": "63-byte sprite definition provided as base64/hex string or array of bytes.",
203
- "type": [
204
- "string",
205
- "array"
206
- ],
207
- "items": {
467
+ "required": [
468
+ "sprite"
469
+ ],
470
+ "optional": [
471
+ "index",
472
+ "x",
473
+ "y",
474
+ "color",
475
+ "multicolour"
476
+ ],
477
+ "inputSchema": {
478
+ "type": "object",
479
+ "description": "Display supplied 63-byte sprite data at the requested position and colour by writing memory and patching VIC-II registers directly.",
480
+ "properties": {
481
+ "sprite": {
482
+ "description": "63-byte sprite definition provided as base64/hex string or array of bytes.",
483
+ "type": [
484
+ "string",
485
+ "array"
486
+ ],
487
+ "items": {
488
+ "type": "integer",
489
+ "minimum": 0,
490
+ "maximum": 255
491
+ },
492
+ "minItems": 63,
493
+ "maxItems": 63
494
+ },
495
+ "index": {
208
496
  "type": "integer",
497
+ "description": "Sprite index (0-7) to configure in screen memory.",
209
498
  "minimum": 0,
210
- "maximum": 255
499
+ "maximum": 7,
500
+ "default": 0
211
501
  },
212
- "minItems": 63,
213
- "maxItems": 63
214
- },
215
- "index": {
216
- "type": "integer",
217
- "description": "Sprite index (0-7) to configure in screen memory.",
218
- "minimum": 0,
219
- "maximum": 7,
220
- "default": 0
221
- },
222
- "x": {
223
- "type": "integer",
224
- "description": "Sprite X position (0-511).",
225
- "minimum": 0,
226
- "maximum": 511,
227
- "default": 100
228
- },
229
- "y": {
230
- "type": "integer",
231
- "description": "Sprite Y position (0-255).",
232
- "minimum": 0,
233
- "maximum": 255,
234
- "default": 100
235
- },
236
- "color": {
237
- "type": "integer",
238
- "description": "Sprite colour index (0-15).",
239
- "minimum": 0,
240
- "maximum": 15,
241
- "default": 1
242
- },
243
- "multicolour": {
244
- "type": "boolean",
245
- "description": "Enable multicolour mode for the sprite.",
246
- "default": false
502
+ "x": {
503
+ "type": "integer",
504
+ "description": "Sprite X position (0-511).",
505
+ "minimum": 0,
506
+ "maximum": 511,
507
+ "default": 100
508
+ },
509
+ "y": {
510
+ "type": "integer",
511
+ "description": "Sprite Y position (0-255).",
512
+ "minimum": 0,
513
+ "maximum": 255,
514
+ "default": 100
515
+ },
516
+ "color": {
517
+ "type": "integer",
518
+ "description": "Sprite colour index (0-15).",
519
+ "minimum": 0,
520
+ "maximum": 15,
521
+ "default": 1
522
+ },
523
+ "multicolour": {
524
+ "type": "boolean",
525
+ "description": "Enable multicolour mode for the sprite.",
526
+ "default": false
527
+ },
528
+ "op": {
529
+ "const": "render_sprite"
530
+ }
247
531
  },
248
- "op": {
249
- "const": "render_sprite"
250
- }
251
- },
252
- "required": [
253
- "sprite",
254
- "op"
255
- ],
256
- "additionalProperties": false
532
+ "required": [
533
+ "sprite",
534
+ "op"
535
+ ],
536
+ "additionalProperties": false
537
+ }
257
538
  },
258
539
  {
259
- "type": "object",
540
+ "op": "render_bitmap",
260
541
  "description": "Import an image file, convert it to VIC-II bitmap memory, write it into RAM, and display it.",
261
- "properties": {
262
- "imagePath": {
263
- "type": "string",
264
- "description": "Filesystem path of the source image (PNG, JPEG, BMP, GIF, TIFF, and other Jimp-supported formats).",
265
- "minLength": 1
266
- },
267
- "format": {
268
- "description": "Bitmap encoding mode to generate for the VIC-II display.",
269
- "type": "string",
270
- "enum": [
271
- "hires",
272
- "multicolor"
273
- ]
274
- },
275
- "bitmapAddress": {
276
- "description": "Absolute C64 memory address, provided as an integer or hex string such as $2000.",
277
- "type": [
278
- "integer",
279
- "string",
280
- "null"
281
- ],
282
- "default": 8192
283
- },
284
- "screenAddress": {
285
- "description": "Absolute C64 memory address, provided as an integer or hex string such as $2000.",
286
- "type": [
287
- "integer",
288
- "string",
289
- "null"
290
- ],
291
- "default": 1024
292
- },
293
- "borderColor": {
294
- "type": [
295
- "integer",
296
- "null"
297
- ],
298
- "description": "Border colour index (0-15).",
299
- "minimum": 0,
300
- "maximum": 15,
301
- "default": 0
302
- },
303
- "backgroundColor": {
304
- "type": [
305
- "integer",
306
- "null"
307
- ],
308
- "description": "Background colour index (0-15). Used for multicolor mode and aspect-ratio padding.",
309
- "minimum": 0,
310
- "maximum": 15,
311
- "default": 0
312
- },
313
- "preserveAspect": {
314
- "type": "boolean",
315
- "description": "Preserve the source image aspect ratio and pad with the background colour.",
316
- "default": true
317
- },
318
- "op": {
319
- "const": "render_bitmap"
320
- }
321
- },
322
542
  "required": [
323
543
  "imagePath",
324
- "format",
325
- "op"
544
+ "format"
326
545
  ],
327
- "additionalProperties": false
546
+ "optional": [
547
+ "bitmapAddress",
548
+ "screenAddress",
549
+ "borderColor",
550
+ "backgroundColor",
551
+ "preserveAspect"
552
+ ],
553
+ "inputSchema": {
554
+ "type": "object",
555
+ "description": "Import an image file, convert it to VIC-II bitmap memory, write it into RAM, and display it.",
556
+ "properties": {
557
+ "imagePath": {
558
+ "type": "string",
559
+ "description": "Filesystem path of the source image (PNG, JPEG, BMP, GIF, TIFF, and other Jimp-supported formats).",
560
+ "minLength": 1
561
+ },
562
+ "format": {
563
+ "description": "Bitmap encoding mode to generate for the VIC-II display.",
564
+ "type": "string",
565
+ "enum": [
566
+ "hires",
567
+ "multicolor"
568
+ ]
569
+ },
570
+ "bitmapAddress": {
571
+ "description": "Absolute C64 memory address, provided as an integer or hex string such as $2000.",
572
+ "type": [
573
+ "integer",
574
+ "string",
575
+ "null"
576
+ ],
577
+ "default": 8192
578
+ },
579
+ "screenAddress": {
580
+ "description": "Absolute C64 memory address, provided as an integer or hex string such as $2000.",
581
+ "type": [
582
+ "integer",
583
+ "string",
584
+ "null"
585
+ ],
586
+ "default": 1024
587
+ },
588
+ "borderColor": {
589
+ "type": [
590
+ "integer",
591
+ "null"
592
+ ],
593
+ "description": "Border colour index (0-15).",
594
+ "minimum": 0,
595
+ "maximum": 15,
596
+ "default": 0
597
+ },
598
+ "backgroundColor": {
599
+ "type": [
600
+ "integer",
601
+ "null"
602
+ ],
603
+ "description": "Background colour index (0-15). Used for multicolor mode and aspect-ratio padding.",
604
+ "minimum": 0,
605
+ "maximum": 15,
606
+ "default": 0
607
+ },
608
+ "preserveAspect": {
609
+ "type": "boolean",
610
+ "description": "Preserve the source image aspect ratio and pad with the background colour.",
611
+ "default": true
612
+ },
613
+ "op": {
614
+ "const": "render_bitmap"
615
+ }
616
+ },
617
+ "required": [
618
+ "imagePath",
619
+ "format",
620
+ "op"
621
+ ],
622
+ "additionalProperties": false
623
+ }
624
+ },
625
+ {
626
+ "op": "get_display_state",
627
+ "description": "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.",
628
+ "required": [],
629
+ "optional": [],
630
+ "inputSchema": {
631
+ "type": "object",
632
+ "description": "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.",
633
+ "properties": {
634
+ "op": {
635
+ "const": "get_display_state"
636
+ }
637
+ },
638
+ "required": [
639
+ "op"
640
+ ],
641
+ "additionalProperties": false
642
+ }
328
643
  }
329
- ],
330
- "discriminator": {
331
- "propertyName": "op"
332
- }
644
+ ]
333
645
  }