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
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
"render_petscii_art",
|
|
9
9
|
"render_petscii_text",
|
|
10
10
|
"render_sprite",
|
|
11
|
-
"render_bitmap"
|
|
11
|
+
"render_bitmap",
|
|
12
|
+
"get_display_state"
|
|
12
13
|
],
|
|
13
14
|
"description": "Selects the operation."
|
|
14
15
|
},
|
|
@@ -228,6 +229,417 @@
|
|
|
228
229
|
"required": [
|
|
229
230
|
"op"
|
|
230
231
|
],
|
|
231
|
-
"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.\n- render_petscii_art: Create PETSCII art from prompts, text, or explicit bitmap data, and optionally display it on the C64.\n- render_petscii_text: Display PETSCII text with optional border and background colours.\n- render_sprite: Display supplied 63-byte sprite data at the requested position and colour by writing memory and patching VIC-II registers directly.\n- render_bitmap: Import an image file, convert it to VIC-II bitmap memory, write it into RAM, and display it.",
|
|
232
|
-
"additionalProperties": false
|
|
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": [
|
|
235
|
+
{
|
|
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
|
+
}
|
|
281
|
+
},
|
|
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": {
|
|
381
|
+
"type": "integer",
|
|
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
|
+
}
|
|
397
|
+
}
|
|
398
|
+
},
|
|
399
|
+
"required": [
|
|
400
|
+
"width",
|
|
401
|
+
"height",
|
|
402
|
+
"pixels"
|
|
403
|
+
],
|
|
404
|
+
"additionalProperties": false
|
|
405
|
+
},
|
|
406
|
+
"op": {
|
|
407
|
+
"const": "render_petscii_art"
|
|
408
|
+
}
|
|
409
|
+
},
|
|
410
|
+
"additionalProperties": false,
|
|
411
|
+
"required": [
|
|
412
|
+
"op"
|
|
413
|
+
]
|
|
414
|
+
}
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
"op": "render_petscii_text",
|
|
418
|
+
"description": "Display PETSCII text with optional border and background colours.",
|
|
419
|
+
"required": [
|
|
420
|
+
"text"
|
|
421
|
+
],
|
|
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
|
+
}
|
|
463
|
+
},
|
|
464
|
+
{
|
|
465
|
+
"op": "render_sprite",
|
|
466
|
+
"description": "Display supplied 63-byte sprite data at the requested position and colour by writing memory and patching VIC-II registers directly.",
|
|
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": {
|
|
496
|
+
"type": "integer",
|
|
497
|
+
"description": "Sprite index (0-7) to configure in screen memory.",
|
|
498
|
+
"minimum": 0,
|
|
499
|
+
"maximum": 7,
|
|
500
|
+
"default": 0
|
|
501
|
+
},
|
|
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
|
+
}
|
|
531
|
+
},
|
|
532
|
+
"required": [
|
|
533
|
+
"sprite",
|
|
534
|
+
"op"
|
|
535
|
+
],
|
|
536
|
+
"additionalProperties": false
|
|
537
|
+
}
|
|
538
|
+
},
|
|
539
|
+
{
|
|
540
|
+
"op": "render_bitmap",
|
|
541
|
+
"description": "Import an image file, convert it to VIC-II bitmap memory, write it into RAM, and display it.",
|
|
542
|
+
"required": [
|
|
543
|
+
"imagePath",
|
|
544
|
+
"format"
|
|
545
|
+
],
|
|
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
|
+
}
|
|
643
|
+
}
|
|
644
|
+
]
|
|
233
645
|
}
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"properties": {
|
|
4
|
+
"op": {
|
|
5
|
+
"type": "string",
|
|
6
|
+
"enum": [
|
|
7
|
+
"write_text",
|
|
8
|
+
"key",
|
|
9
|
+
"joystick"
|
|
10
|
+
],
|
|
11
|
+
"description": "Selects the operation."
|
|
12
|
+
},
|
|
13
|
+
"text": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"description": "Text to type. Use {RETURN}, {CLR}, {F1}…{F8}, {UP/DOWN/LEFT/RIGHT}, colour names, etc.",
|
|
16
|
+
"minLength": 1,
|
|
17
|
+
"maxLength": 512
|
|
18
|
+
},
|
|
19
|
+
"delayMs": {
|
|
20
|
+
"type": [
|
|
21
|
+
"integer",
|
|
22
|
+
"null"
|
|
23
|
+
],
|
|
24
|
+
"description": "Delay in ms after sending (default 0).",
|
|
25
|
+
"minimum": 0,
|
|
26
|
+
"maximum": 10000,
|
|
27
|
+
"default": 0
|
|
28
|
+
},
|
|
29
|
+
"key": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"description": "Key to press: a printable character, or a PETSCII token name (RETURN, F1…F8, UP, etc.).",
|
|
32
|
+
"minLength": 1,
|
|
33
|
+
"maxLength": 32
|
|
34
|
+
},
|
|
35
|
+
"durationMs": {
|
|
36
|
+
"type": [
|
|
37
|
+
"integer",
|
|
38
|
+
"null"
|
|
39
|
+
],
|
|
40
|
+
"description": "Delay in ms after each queued key press before the next press (default 0 = no delay).",
|
|
41
|
+
"minimum": 0,
|
|
42
|
+
"maximum": 5000,
|
|
43
|
+
"default": 0
|
|
44
|
+
},
|
|
45
|
+
"count": {
|
|
46
|
+
"type": [
|
|
47
|
+
"integer",
|
|
48
|
+
"null"
|
|
49
|
+
],
|
|
50
|
+
"description": "Number of times to press the key (default 1).",
|
|
51
|
+
"minimum": 1,
|
|
52
|
+
"maximum": 100,
|
|
53
|
+
"default": 1
|
|
54
|
+
},
|
|
55
|
+
"port": {
|
|
56
|
+
"type": "integer",
|
|
57
|
+
"description": "Joystick port (1 = $DC01, 2 = $DC00).",
|
|
58
|
+
"minimum": 1,
|
|
59
|
+
"maximum": 2
|
|
60
|
+
},
|
|
61
|
+
"controls": {
|
|
62
|
+
"type": "array",
|
|
63
|
+
"description": "List of controls to activate simultaneously.",
|
|
64
|
+
"items": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"description": "Control to activate.",
|
|
67
|
+
"enum": [
|
|
68
|
+
"up",
|
|
69
|
+
"down",
|
|
70
|
+
"left",
|
|
71
|
+
"right",
|
|
72
|
+
"fire"
|
|
73
|
+
]
|
|
74
|
+
},
|
|
75
|
+
"minItems": 0
|
|
76
|
+
},
|
|
77
|
+
"action": {
|
|
78
|
+
"type": "string",
|
|
79
|
+
"description": "press = hold until a release call; release = restore all bits; tap = press then release after durationMs.",
|
|
80
|
+
"enum": [
|
|
81
|
+
"press",
|
|
82
|
+
"release",
|
|
83
|
+
"tap"
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"required": [
|
|
88
|
+
"op"
|
|
89
|
+
],
|
|
90
|
+
"description": "Input operations: write_text, key, joystick.\n\nOperations:\n- write_text: Send a text string to the keyboard buffer, with PETSCII token expansion. Required inputs: text. Optional inputs: delayMs.\n- key: Tap a single key or hold it for a duration. Required inputs: key. Optional inputs: durationMs, count.\n- joystick: Simulate joystick input by writing directly to CIA1 Port A/B registers. Required inputs: port, controls, action. Optional inputs: durationMs.",
|
|
91
|
+
"additionalProperties": false,
|
|
92
|
+
"x-c64bridge-operations": [
|
|
93
|
+
{
|
|
94
|
+
"op": "write_text",
|
|
95
|
+
"description": "Send a text string to the keyboard buffer, with PETSCII token expansion.",
|
|
96
|
+
"required": [
|
|
97
|
+
"text"
|
|
98
|
+
],
|
|
99
|
+
"optional": [
|
|
100
|
+
"delayMs"
|
|
101
|
+
],
|
|
102
|
+
"inputSchema": {
|
|
103
|
+
"type": "object",
|
|
104
|
+
"description": "Send a text string to the keyboard buffer, with PETSCII token expansion.",
|
|
105
|
+
"properties": {
|
|
106
|
+
"op": {
|
|
107
|
+
"const": "write_text"
|
|
108
|
+
},
|
|
109
|
+
"text": {
|
|
110
|
+
"type": "string",
|
|
111
|
+
"description": "Text to type. Use {RETURN}, {CLR}, {F1}…{F8}, {UP/DOWN/LEFT/RIGHT}, colour names, etc.",
|
|
112
|
+
"minLength": 1,
|
|
113
|
+
"maxLength": 512
|
|
114
|
+
},
|
|
115
|
+
"delayMs": {
|
|
116
|
+
"type": [
|
|
117
|
+
"integer",
|
|
118
|
+
"null"
|
|
119
|
+
],
|
|
120
|
+
"description": "Delay in ms after sending (default 0).",
|
|
121
|
+
"minimum": 0,
|
|
122
|
+
"maximum": 10000,
|
|
123
|
+
"default": 0
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
"required": [
|
|
127
|
+
"op",
|
|
128
|
+
"text"
|
|
129
|
+
],
|
|
130
|
+
"additionalProperties": false
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"op": "key",
|
|
135
|
+
"description": "Tap a single key or hold it for a duration.",
|
|
136
|
+
"required": [
|
|
137
|
+
"key"
|
|
138
|
+
],
|
|
139
|
+
"optional": [
|
|
140
|
+
"durationMs",
|
|
141
|
+
"count"
|
|
142
|
+
],
|
|
143
|
+
"inputSchema": {
|
|
144
|
+
"type": "object",
|
|
145
|
+
"description": "Tap a single key or hold it for a duration.",
|
|
146
|
+
"properties": {
|
|
147
|
+
"op": {
|
|
148
|
+
"const": "key"
|
|
149
|
+
},
|
|
150
|
+
"key": {
|
|
151
|
+
"type": "string",
|
|
152
|
+
"description": "Key to press: a printable character, or a PETSCII token name (RETURN, F1…F8, UP, etc.).",
|
|
153
|
+
"minLength": 1,
|
|
154
|
+
"maxLength": 32
|
|
155
|
+
},
|
|
156
|
+
"durationMs": {
|
|
157
|
+
"type": [
|
|
158
|
+
"integer",
|
|
159
|
+
"null"
|
|
160
|
+
],
|
|
161
|
+
"description": "Delay in ms after each queued key press before the next press (default 0 = no delay).",
|
|
162
|
+
"minimum": 0,
|
|
163
|
+
"maximum": 5000,
|
|
164
|
+
"default": 0
|
|
165
|
+
},
|
|
166
|
+
"count": {
|
|
167
|
+
"type": [
|
|
168
|
+
"integer",
|
|
169
|
+
"null"
|
|
170
|
+
],
|
|
171
|
+
"description": "Number of times to press the key (default 1).",
|
|
172
|
+
"minimum": 1,
|
|
173
|
+
"maximum": 100,
|
|
174
|
+
"default": 1
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
"required": [
|
|
178
|
+
"op",
|
|
179
|
+
"key"
|
|
180
|
+
],
|
|
181
|
+
"additionalProperties": false
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"op": "joystick",
|
|
186
|
+
"description": "Simulate joystick input by writing directly to CIA1 Port A/B registers.",
|
|
187
|
+
"required": [
|
|
188
|
+
"port",
|
|
189
|
+
"controls",
|
|
190
|
+
"action"
|
|
191
|
+
],
|
|
192
|
+
"optional": [
|
|
193
|
+
"durationMs"
|
|
194
|
+
],
|
|
195
|
+
"inputSchema": {
|
|
196
|
+
"type": "object",
|
|
197
|
+
"description": "Simulate joystick input by writing directly to CIA1 Port A/B registers.",
|
|
198
|
+
"properties": {
|
|
199
|
+
"op": {
|
|
200
|
+
"const": "joystick"
|
|
201
|
+
},
|
|
202
|
+
"port": {
|
|
203
|
+
"type": "integer",
|
|
204
|
+
"description": "Joystick port (1 = $DC01, 2 = $DC00).",
|
|
205
|
+
"minimum": 1,
|
|
206
|
+
"maximum": 2
|
|
207
|
+
},
|
|
208
|
+
"controls": {
|
|
209
|
+
"type": "array",
|
|
210
|
+
"description": "List of controls to activate simultaneously.",
|
|
211
|
+
"items": {
|
|
212
|
+
"type": "string",
|
|
213
|
+
"description": "Control to activate.",
|
|
214
|
+
"enum": [
|
|
215
|
+
"up",
|
|
216
|
+
"down",
|
|
217
|
+
"left",
|
|
218
|
+
"right",
|
|
219
|
+
"fire"
|
|
220
|
+
]
|
|
221
|
+
},
|
|
222
|
+
"minItems": 0
|
|
223
|
+
},
|
|
224
|
+
"action": {
|
|
225
|
+
"type": "string",
|
|
226
|
+
"description": "press = hold until a release call; release = restore all bits; tap = press then release after durationMs.",
|
|
227
|
+
"enum": [
|
|
228
|
+
"press",
|
|
229
|
+
"release",
|
|
230
|
+
"tap"
|
|
231
|
+
]
|
|
232
|
+
},
|
|
233
|
+
"durationMs": {
|
|
234
|
+
"type": [
|
|
235
|
+
"integer",
|
|
236
|
+
"null"
|
|
237
|
+
],
|
|
238
|
+
"description": "Duration to hold for tap action in ms (default 80).",
|
|
239
|
+
"minimum": 10,
|
|
240
|
+
"maximum": 5000,
|
|
241
|
+
"default": 80
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
"required": [
|
|
245
|
+
"op",
|
|
246
|
+
"port",
|
|
247
|
+
"controls",
|
|
248
|
+
"action"
|
|
249
|
+
],
|
|
250
|
+
"additionalProperties": false
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
]
|
|
254
|
+
}
|