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
|
@@ -13,8 +13,9 @@ Recommended C64 Bridge entry points:
|
|
|
13
13
|
| Select the VICE backend | `c64_select_backend` | `select` |
|
|
14
14
|
| Read or write memory | `c64_memory` | `read`, `write`, `read_screen`, `wait_for_text` |
|
|
15
15
|
| Debug registers and checkpoints | `c64_debug` | `get_registers`, `set_registers`, `create_checkpoint`, `list_checkpoints`, `step`, `step_return` |
|
|
16
|
+
| Send keyboard or joystick input | `c64_input` | `write_text`, `key`, `joystick` |
|
|
16
17
|
| Capture emulator display | `c64_graphics` | `capture_frame` |
|
|
17
|
-
| Reset or
|
|
18
|
+
| Reset or continue execution | `c64_system`, `c64_debug` | `reset`, `continue_execution` |
|
|
18
19
|
| Read or write VICE resources | `c64_vice` | `resource_get`, `resource_set` |
|
|
19
20
|
|
|
20
21
|
---
|
|
@@ -429,7 +430,14 @@ cmd: TL:u8 | TC:bytes[TL]
|
|
|
429
430
|
rsp: 0x72 | empty
|
|
430
431
|
```
|
|
431
432
|
|
|
432
|
-
|
|
433
|
+
C64 Bridge mapping:
|
|
434
|
+
|
|
435
|
+
| MCP tool | Operation |
|
|
436
|
+
| ----------- | ------------ |
|
|
437
|
+
| `c64_input` | `write_text` |
|
|
438
|
+
| `c64_input` | `key` |
|
|
439
|
+
|
|
440
|
+
Public input tools inject PETSCII through the shared KERNAL keyboard queue for cross-platform parity. The VICE backend still exposes BM `0x72` internally via `ViceClient.keyboardFeed()` when a direct monitor call is needed.
|
|
433
441
|
|
|
434
442
|
---
|
|
435
443
|
|
|
@@ -589,7 +597,13 @@ cmd: PN:u16 | PV:u16
|
|
|
589
597
|
rsp: 0xa2 | empty
|
|
590
598
|
```
|
|
591
599
|
|
|
592
|
-
|
|
600
|
+
C64 Bridge mapping:
|
|
601
|
+
|
|
602
|
+
| MCP tool | Operation |
|
|
603
|
+
| ----------- | ---------- |
|
|
604
|
+
| `c64_input` | `joystick` |
|
|
605
|
+
|
|
606
|
+
The public joystick tool simulates the same port state by writing CIA1 joyport registers directly, rather than issuing BM `0xa2`.
|
|
593
607
|
|
|
594
608
|
---
|
|
595
609
|
|
|
@@ -619,7 +633,7 @@ C64 Bridge mapping:
|
|
|
619
633
|
|
|
620
634
|
| MCP tool | Operation |
|
|
621
635
|
| ------------ | --------- |
|
|
622
|
-
| `
|
|
636
|
+
| `c64_debug` | `continue_execution` |
|
|
623
637
|
|
|
624
638
|
---
|
|
625
639
|
|
|
@@ -772,7 +786,7 @@ Usually emitted with `request_id = 0xffffffff`.
|
|
|
772
786
|
| Resource Get | `0x51` | `0x51` | `c64_vice.resource_get` |
|
|
773
787
|
| Resource Set | `0x52` | `0x52` | `c64_vice.resource_set` |
|
|
774
788
|
| Advance Instructions | `0x71` | `0x71` | `c64_debug.step` |
|
|
775
|
-
| Keyboard Feed | `0x72` | `0x72` |
|
|
789
|
+
| Keyboard Feed | `0x72` | `0x72` | `c64_input.write_text`, `c64_input.key` |
|
|
776
790
|
| Execute Until Return | `0x73` | `0x73` | `c64_debug.step_return` |
|
|
777
791
|
| Ping | `0x81` | `0x81` | internal |
|
|
778
792
|
| Banks Available | `0x82` | `0x82` | internal |
|
|
@@ -781,9 +795,9 @@ Usually emitted with `request_id = 0xffffffff`.
|
|
|
781
795
|
| VICE Info | `0x85` | `0x85` | internal diagnostics |
|
|
782
796
|
| CPU History | `0x86` | `0x86` | internal or unmapped |
|
|
783
797
|
| Palette Get | `0x91` | `0x91` | internal display support |
|
|
784
|
-
| Joyport Set | `0xa2` | `0xa2` |
|
|
798
|
+
| Joyport Set | `0xa2` | `0xa2` | `c64_input.joystick` |
|
|
785
799
|
| Userport Set | `0xb2` | `0xb2` | internal or unmapped |
|
|
786
|
-
| Exit | `0xaa` | `0xaa` | `
|
|
800
|
+
| Exit | `0xaa` | `0xaa` | `c64_debug.continue_execution` |
|
|
787
801
|
| Quit | `0xbb` | `0xbb` | managed VICE lifecycle |
|
|
788
802
|
| Reset | `0xcc` | `0xcc` | `c64_system.reset`, `c64_system.reboot`, `c64_drive.reset` |
|
|
789
803
|
| Autostart / Autoload | `0xdd` | `0xdd` | `c64_program.run_prg`, `c64_program.upload_run_basic`, `c64_program.upload_run_asm` |
|
|
@@ -803,6 +817,9 @@ Examples:
|
|
|
803
817
|
| Read memory at `$0801` | `c64_memory` with `op = read` |
|
|
804
818
|
| Write bytes to RAM | `c64_memory` with `op = write` |
|
|
805
819
|
| Show the current text screen | `c64_memory` with `op = read_screen` |
|
|
820
|
+
| Type `LOAD"*",8,1` then Return | `c64_input` with `op = write_text` |
|
|
821
|
+
| Tap a function key or Return | `c64_input` with `op = key` |
|
|
822
|
+
| Simulate joystick fire or left | `c64_input` with `op = joystick` |
|
|
806
823
|
| Capture the current video frame | `c64_graphics` with `op = capture_frame` |
|
|
807
824
|
| Set a breakpoint | `c64_debug` with `op = create_checkpoint` |
|
|
808
825
|
| List breakpoints | `c64_debug` with `op = list_checkpoints` |
|
|
@@ -810,17 +827,16 @@ Examples:
|
|
|
810
827
|
| Read PC and A | `c64_debug` with `op = get_registers` |
|
|
811
828
|
| Step one instruction | `c64_debug` with `op = step` |
|
|
812
829
|
| Step until return | `c64_debug` with `op = step_return` |
|
|
813
|
-
| Continue execution | `
|
|
830
|
+
| Continue execution | `c64_debug` with `op = continue_execution` |
|
|
814
831
|
| Reset VICE | `c64_system` with `op = reset` |
|
|
815
832
|
| Change a VICE setting | `c64_vice` with `op = resource_set` |
|
|
816
833
|
|
|
817
834
|
## Backend Selection
|
|
818
835
|
|
|
819
|
-
If both C64 Ultimate and VICE are configured,
|
|
836
|
+
If both C64 Ultimate and VICE are configured, call `c64_select_backend` with these arguments before making VICE-specific requests:
|
|
820
837
|
|
|
821
838
|
```json
|
|
822
839
|
{
|
|
823
|
-
"tool": "c64_select_backend",
|
|
824
840
|
"op": "select",
|
|
825
841
|
"backend": "vice"
|
|
826
842
|
}
|