c64bridge 0.9.1 → 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 +34 -2
- 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 +5 -6
- package/dist/.tsbuildinfo +1 -1
- package/dist/c64Client.js +33 -8
- package/dist/sidwaveCompiler.js +1 -1
- package/dist/tools/input.js +5 -7
- package/dist/tools/memory.js +11 -2
- package/dist/tools/programRunners.js +3 -3
- package/dist/tools/responses.js +14 -1
- package/dist/tools/{assember.js → translation/assembler.js} +56 -162
- package/dist/tools/{basicTokenizer.js → translation/basicTokenizer.js} +1 -1
- package/dist/tools/translation/disassembler.js +150 -0
- package/dist/tools/translation/opcodeInventory.js +126 -0
- package/doc/reviews/audit.md +143 -0
- package/mcp/schemas/c64_input.schema.json +231 -113
- package/mcp/server.json +1 -1
- package/mcp/tools.json +234 -115
- package/mcp.json +1 -1
- package/package.json +2 -2
- package/scripts/c64-cli.mjs +2 -2
- package/scripts/run-coverage.mjs +54 -3
- package/scripts/run-tests.mjs +1 -0
- package/scripts/run-tests.ts +1 -0
- package/server.json +2 -2
- package/dist/tools/disassembler.js +0 -478
- /package/dist/tools/{symbolRegistry.js → translation/symbolRegistry.js} +0 -0
|
@@ -1,136 +1,254 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "object",
|
|
3
|
-
"
|
|
4
|
-
|
|
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": [
|
|
5
93
|
{
|
|
6
|
-
"
|
|
94
|
+
"op": "write_text",
|
|
7
95
|
"description": "Send a text string to the keyboard buffer, with PETSCII token expansion.",
|
|
8
|
-
"properties": {
|
|
9
|
-
"op": {
|
|
10
|
-
"const": "write_text"
|
|
11
|
-
},
|
|
12
|
-
"text": {
|
|
13
|
-
"type": "string",
|
|
14
|
-
"description": "Text to type. Use {RETURN}, {CLR}, {F1}…{F8}, {UP/DOWN/LEFT/RIGHT}, colour names, etc.",
|
|
15
|
-
"minLength": 1,
|
|
16
|
-
"maxLength": 512
|
|
17
|
-
},
|
|
18
|
-
"delayMs": {
|
|
19
|
-
"type": [
|
|
20
|
-
"integer",
|
|
21
|
-
"null"
|
|
22
|
-
],
|
|
23
|
-
"description": "Delay in ms after sending (default 0).",
|
|
24
|
-
"minimum": 0,
|
|
25
|
-
"maximum": 10000,
|
|
26
|
-
"default": 0
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
96
|
"required": [
|
|
30
|
-
"op",
|
|
31
97
|
"text"
|
|
32
98
|
],
|
|
33
|
-
"
|
|
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
|
+
}
|
|
34
132
|
},
|
|
35
133
|
{
|
|
36
|
-
"
|
|
134
|
+
"op": "key",
|
|
37
135
|
"description": "Tap a single key or hold it for a duration.",
|
|
38
|
-
"properties": {
|
|
39
|
-
"op": {
|
|
40
|
-
"const": "key"
|
|
41
|
-
},
|
|
42
|
-
"key": {
|
|
43
|
-
"type": "string",
|
|
44
|
-
"description": "Key to press: a printable character, or a PETSCII token name (RETURN, F1…F8, UP, etc.).",
|
|
45
|
-
"minLength": 1,
|
|
46
|
-
"maxLength": 32
|
|
47
|
-
},
|
|
48
|
-
"durationMs": {
|
|
49
|
-
"type": [
|
|
50
|
-
"integer",
|
|
51
|
-
"null"
|
|
52
|
-
],
|
|
53
|
-
"description": "Delay in ms after each queued key press before the next press (default 0 = no delay).",
|
|
54
|
-
"minimum": 0,
|
|
55
|
-
"maximum": 5000,
|
|
56
|
-
"default": 0
|
|
57
|
-
},
|
|
58
|
-
"count": {
|
|
59
|
-
"type": [
|
|
60
|
-
"integer",
|
|
61
|
-
"null"
|
|
62
|
-
],
|
|
63
|
-
"description": "Number of times to press the key (default 1).",
|
|
64
|
-
"minimum": 1,
|
|
65
|
-
"maximum": 100,
|
|
66
|
-
"default": 1
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
136
|
"required": [
|
|
70
|
-
"op",
|
|
71
137
|
"key"
|
|
72
138
|
],
|
|
73
|
-
"
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
"
|
|
78
|
-
|
|
79
|
-
"
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
"
|
|
85
|
-
"minimum": 1,
|
|
86
|
-
"maximum": 2
|
|
87
|
-
},
|
|
88
|
-
"controls": {
|
|
89
|
-
"type": "array",
|
|
90
|
-
"description": "List of controls to activate simultaneously.",
|
|
91
|
-
"items": {
|
|
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": {
|
|
92
151
|
"type": "string",
|
|
93
|
-
"description": "
|
|
94
|
-
"
|
|
95
|
-
|
|
96
|
-
"down",
|
|
97
|
-
"left",
|
|
98
|
-
"right",
|
|
99
|
-
"fire"
|
|
100
|
-
]
|
|
152
|
+
"description": "Key to press: a printable character, or a PETSCII token name (RETURN, F1…F8, UP, etc.).",
|
|
153
|
+
"minLength": 1,
|
|
154
|
+
"maxLength": 32
|
|
101
155
|
},
|
|
102
|
-
"
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
"
|
|
109
|
-
"
|
|
110
|
-
"
|
|
111
|
-
|
|
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
|
+
}
|
|
112
176
|
},
|
|
113
|
-
"
|
|
114
|
-
"
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
},
|
|
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.",
|
|
124
187
|
"required": [
|
|
125
|
-
"op",
|
|
126
188
|
"port",
|
|
127
189
|
"controls",
|
|
128
190
|
"action"
|
|
129
191
|
],
|
|
130
|
-
"
|
|
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
|
+
}
|
|
131
252
|
}
|
|
132
|
-
]
|
|
133
|
-
"discriminator": {
|
|
134
|
-
"propertyName": "op"
|
|
135
|
-
}
|
|
253
|
+
]
|
|
136
254
|
}
|