@henols/c64-re-tools 2.8.0-rc.4 → 2.8.0-rc.6

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 (67) hide show
  1. package/package.json +1 -1
  2. package/skills/c64-assembler/SKILL.md +1 -1
  3. package/skills/c64-assembler/scripts/assembler.ts +78 -24
  4. package/skills/c64-docs/scripts/docs.ts +31 -10
  5. package/skills/c64-knowledge/SKILL.md +11 -7
  6. package/skills/c64-knowledge/references/batches.md +2 -1
  7. package/skills/c64-knowledge/references/source-knowledge.md +1 -1
  8. package/skills/c64-knowledge/scripts/knowledge.ts +46 -29
  9. package/skills/c64-packer/scripts/packer.ts +9 -2
  10. package/skills/c64-provenance/SKILL.md +2 -2
  11. package/skills/c64-provenance/scripts/lib/runtime.ts +45 -10
  12. package/skills/c64-provenance/scripts/provenance.ts +10 -3
  13. package/skills/c64-source/references/loader.md +8 -7
  14. package/skills/c64-source/scripts/lib/loader.ts +4 -111
  15. package/skills/c64-source/scripts/lib/source.ts +3 -1
  16. package/skills/c64-source/scripts/source.ts +49 -78
  17. package/skills/c64-static-analysis/SKILL.md +2 -2
  18. package/skills/c64-static-analysis/scripts/lib/coverage.ts +56 -4
  19. package/skills/c64-static-analysis/scripts/lib/idioms.ts +92 -42
  20. package/skills/c64-static-analysis/scripts/static-analysis.ts +32 -21
  21. package/skills/c64-testing/SKILL.md +7 -0
  22. package/skills/c64-testing/scripts/lib/play.ts +8 -7
  23. package/skills/c64-testing/scripts/lib/recording.ts +278 -27
  24. package/skills/c64-testing/scripts/lib/replay.ts +9 -8
  25. package/skills/c64-testing/scripts/lib/runs.ts +5 -1
  26. package/skills/c64-testing/scripts/lib/scenario.ts +4 -0
  27. package/skills/c64-testing/scripts/testing.ts +30 -11
  28. package/skills/c64-unpacker/SKILL.md +13 -11
  29. package/skills/c64-unpacker/scripts/lib/loads.ts +10 -5
  30. package/skills/c64-unpacker/scripts/lib/machine.ts +163 -3
  31. package/skills/c64-unpacker/scripts/lib/stages.ts +13 -6
  32. package/skills/c64-unpacker/scripts/unpacker.ts +34 -15
  33. package/skills/emulator/SKILL.md +2 -2
  34. package/src/c64.ts +21 -0
  35. package/src/host/vice/adapter.ts +2 -1
  36. package/src/host/vice/chips.ts +6 -9
  37. package/src/host/vice/session.ts +2 -2
  38. package/src/host-client/image.ts +40 -4
  39. package/src/host-client/tools.ts +1 -1
  40. package/src/host-client/transfer.ts +48 -26
  41. package/src/host-client/vice-session.ts +15 -0
  42. package/src/knowledge/database.ts +72 -19
  43. package/src/knowledge/import.ts +32 -7
  44. package/src/knowledge/join.ts +50 -2
  45. package/src/knowledge/names.ts +2 -2
  46. package/src/knowledge/program.ts +103 -24
  47. package/src/knowledge/schema.ts +6 -0
  48. package/src/knowledge/start-screen.ts +57 -7
  49. package/src/knowledge/write.ts +20 -13
  50. package/src/loader.ts +101 -33
  51. package/src/mcp/output.ts +13 -12
  52. package/src/mcp/server.ts +33 -22
  53. package/src/mcp/tools/debug.ts +21 -24
  54. package/src/mcp/tools/media.ts +27 -27
  55. package/src/mcp/tools/memory.ts +13 -17
  56. package/src/mcp/tools/video.ts +10 -12
  57. package/src/native/c64run.ts +39 -1
  58. package/src/native/decompiler/analyze.ts +1 -1
  59. package/src/native/dxa.ts +2 -2
  60. package/src/native/types.ts +26 -7
  61. package/src/opcodes.ts +5 -0
  62. package/src/program-code.ts +4 -2
  63. package/src/project.ts +224 -71
  64. package/src/protocol/vice.ts +5 -3
  65. package/src/script.ts +60 -15
  66. package/{skills/c64-source/scripts/lib → src}/stage.ts +142 -11
  67. package/tools/c64run.c +18 -5
@@ -13,7 +13,7 @@ import { knowledgeNames } from "#src/knowledge/names.ts";
13
13
  import { analyze as analyzeWithDxa } from "#src/native/dxa.ts";
14
14
  import { analyze as analyzeWithDecompiler } from "#src/native/decompiler/analyze.ts";
15
15
  import { localToolContext } from "#src/native/local.ts";
16
- import { DECOMPILER_LIMITS, type RefusedSeed, type SeedReport } from "#src/native/types.ts";
16
+ import { DECOMPILER_LIMITS, DXA_LIMITS, type RefusedSeed, type SeedReport } from "#src/native/types.ts";
17
17
  import { openForRead, withRead, withWrite } from "#src/knowledge/database.ts";
18
18
  import { analyzedBytes, operandImages, programCoverage, requireProgram } from "#src/knowledge/program.ts";
19
19
  import { applyBatch, type BatchOperation } from "#src/knowledge/write.ts";
@@ -22,7 +22,7 @@ import { currentRevision, listMacros, listMacroUses, listPatches, listReferences
22
22
  import { CODE_REGION_TYPES, DEFAULT_SPACE, SEMANTIC_ORIGINS, type Analyzer } from "#src/knowledge/schema.ts";
23
23
  import { platformAddresses, platformNames, platformNamesFor, romUseOfProgram, type RomUse } from "#src/platform.ts";
24
24
  import { listed, OPTIONS, reply, runScript, UsageError, type Call } from "#src/script.ts";
25
- import { codeEntries, coverageConflicts, imageReader, writtenNotExecuted, explainGaps, type GapReason, type ImageByte } from "./lib/coverage.ts";
25
+ import { codeEntries, coverageConflicts, imageReader, referenceTargets, withoutOverlaps, writtenNotExecuted, explainGaps, type GapReason, type ImageByte } from "./lib/coverage.ts";
26
26
  import { decidedFromKnowledge, dxaFindings, decompilerFindings, seedsFromKnowledge } from "./lib/findings.ts";
27
27
  import { findIdioms } from "./lib/idioms.ts";
28
28
  import { instructionList } from "./lib/instructions.ts";
@@ -311,28 +311,34 @@ async function analyze(call: Call): Promise<unknown> {
311
311
  // Idiom tables and the RAM under ROM that the runs never used are data for this run too; semantic data ranges come first.
312
312
  // A range with an entry point of the knowledge or --entry in it is left out: that code stays code.
313
313
  const fromRom = coverage === undefined ? [] : romOnlyRanges(coverage, byteAt).filter((range) => !known.some((entry) => entry >= range.start && entry <= range.end));
314
+ const limits = analyzer === "dxa" ? DXA_LIMITS : DECOMPILER_LIMITS;
314
315
  const dataRanges = [...seeds.dataRanges];
315
316
  for (const range of [...idioms.dataRanges, ...fromRom]) if (!dataRanges.some((seed) => range.start <= seed.end && range.end >= seed.start)) dataRanges.push(range);
316
- seeds.dataRanges = dataRanges.slice(0, DECOMPILER_LIMITS.dataRanges);
317
- // Knowledge routines and --entry first, then code regions and JMP tables, then idioms, then coverage, up to the seed bound:
318
- // at most DECOMPILER_LIMITS.entryPoints (1024) entry points for both analyzers, and for the decompiler at most
319
- // DECOMPILER_LIMITS.codeStarts (8192) coverage flow starts that are code in a routine. coverageSeeds gives what was used.
320
- // The decompiler takes the coverage as code starts without a function. DXA has one list, without the coverage starts
321
- // that it reaches by fall-through from another seed, for example the instruction after a JSR.
317
+ seeds.dataRanges = dataRanges.slice(0, limits.dataRanges);
318
+ // Knowledge routines and --entry first, then code regions and JMP tables, then idioms, then coverage, then for DXA the
319
+ // jump and call targets of the knowledge, up to the seed bound of the analyzer: at most 1024 entry points for the decompiler
320
+ // and 8192 for DXA, and for the decompiler at most DECOMPILER_LIMITS.codeStarts (8192) coverage flow starts that are code
321
+ // in a routine. coverageSeeds gives what was used. The decompiler takes the coverage as code starts without a function.
322
+ // DXA has one list, without the coverage starts that it reaches by fall-through from another seed, for example the
323
+ // instruction after a JSR. Each target stays a seed: DXA drops routes that fall-through would show as reached.
324
+ const targets = analyzer === "dxa" ? referenceTargets(reader, analyzer, inProgram, { data: seeds.dataRanges, dualUse: idioms.findings.regions.filter((region) => region.type === "dual-use") }, space) : [];
322
325
  const fallThrough = (from: readonly number[]) => (coverage === undefined ? new Set<number>() : dxaFallThrough(from, coverage, inProgram, seeds.dataRanges));
323
326
  const reached = analyzer === "dxa" ? fallThrough([...known, ...idioms.entryPoints, ...fromCoverage]) : new Set<number>();
324
327
  const kinds = analyzer === "dxa" || coverage === undefined ? { routines: fromCoverage.filter((entry) => !reached.has(entry)), codeStarts: [] } : coverageSeedKinds(coverage, inProgram);
325
- const ordered = [...new Set([...known, ...idioms.entryPoints, ...kinds.routines])];
326
- seeds.entryPoints = ordered.slice(0, DECOMPILER_LIMITS.entryPoints).sort((a, b) => a - b);
327
- const allCodeStarts = kinds.codeStarts.filter((entry) => !seeds.entryPoints.includes(entry));
328
- const codeStarts = allCodeStarts.slice(0, DECOMPILER_LIMITS.codeStarts);
328
+ const ordered = [...new Set([...known, ...idioms.entryPoints, ...kinds.routines, ...targets])];
329
+ seeds.entryPoints = ordered.slice(0, limits.entryPoints).sort((a, b) => a - b);
330
+ const seeded = new Set(seeds.entryPoints);
331
+ const allCodeStarts = kinds.codeStarts.filter((entry) => !seeded.has(entry));
332
+ const codeStarts = allCodeStarts.slice(0, limits.codeStarts);
329
333
  // The seeds over the limits of the analyzer: it never sees them.
330
- const cut = { analyzer, entryPoints: ordered.slice(DECOMPILER_LIMITS.entryPoints), codeStarts: allCodeStarts.slice(DECOMPILER_LIMITS.codeStarts), dataRanges: dataRanges.slice(DECOMPILER_LIMITS.dataRanges) };
334
+ const cut = { analyzer, entryPoints: ordered.slice(limits.entryPoints), codeStarts: allCodeStarts.slice(limits.codeStarts), dataRanges: dataRanges.slice(limits.dataRanges) };
331
335
  const overLimit = { entryPoints: cut.entryPoints.length, codeStarts: cut.codeStarts.length, dataRanges: cut.dataRanges.length };
332
- const romUsed = fromRom.filter((range) => seeds.dataRanges.includes(range)).length;
336
+ const usedRanges = new Set(seeds.dataRanges);
337
+ const romUsed = fromRom.filter((range) => usedRanges.has(range)).length;
333
338
  // DXA also decodes a coverage start that it did not get, when a seed that it got reaches the start by fall-through.
334
339
  const followed = analyzer === "dxa" ? fallThrough(seeds.entryPoints) : new Set<number>();
335
- const coverageUsed = fromCoverage.filter((entry) => seeds.entryPoints.includes(entry) || codeStarts.includes(entry) || followed.has(entry)).length;
340
+ const started = new Set(codeStarts);
341
+ const coverageUsed = fromCoverage.filter((entry) => seeded.has(entry) || started.has(entry) || followed.has(entry)).length;
336
342
  // Platform names are C64 names: drive code and banks get none.
337
343
  const platform = space === DEFAULT_SPACE ? platformNames() : [];
338
344
  /** The analyzer version of the last analysis of these bytes: a new version can change the findings by itself. */
@@ -398,21 +404,24 @@ async function analyze(call: Call): Promise<unknown> {
398
404
  /**
399
405
  * The result from the knowledge after both imports: the fields of both
400
406
  * analyzers around the fields that only one gives (`gaps` after the
401
- * coverage, `tail` after the idioms), and the hint.
407
+ * coverage, `tail` after the idioms), and the hint. A seed that the
408
+ * analysis refused because of a known overlap is not a refused seed: it
409
+ * is no fault of the knowledge. Read after the idioms, which write dual-use regions.
402
410
  */
403
411
  const resultOf = (
404
412
  db: DatabaseSync | undefined,
405
- run: { toolVersion: string | undefined; imported: ReturnType<typeof record>; report: SeedReport; seeds: ReturnType<typeof seedsResult>; found: ReturnType<typeof idiomsResult>; gaps?: Record<string, unknown>; tail: Record<string, unknown> },
413
+ run: { toolVersion: string | undefined; imported: ReturnType<typeof record>; report: SeedReport; given: Record<string, number>; overLimit: Record<string, number>; found: ReturnType<typeof idiomsResult>; gaps?: Record<string, unknown>; tail: Record<string, unknown> },
406
414
  ) => {
407
415
  const runOnWritten = coverage === undefined ? [] : writtenNotExecuted(db, analyzer, coverage, space);
408
416
  const { factsOf, ...found } = run.found;
417
+ const refused = withoutOverlaps(run.report.refused, listRegions(db, undefined, "dual-use", undefined, space));
409
418
  const body = {
410
419
  analyzer,
411
420
  ...(run.toolVersion === undefined ? {} : { analyzerVersion: run.toolVersion }),
412
421
  ...(space === DEFAULT_SPACE ? {} : { space }),
413
422
  ...run.imported,
414
423
  conflicts: run.imported.conflicts.map((conflict) => showConflictFacts(conflict, analyzer, factsOf, max)),
415
- seeds: run.seeds,
424
+ seeds: seedsResult(run.given, run.overLimit, { ...run.report, refused }, max),
416
425
  ...coverageResult(db),
417
426
  ...run.gaps,
418
427
  ...(runOnWritten.length === 0 ? {} : { writtenNotExecuted: listed(runOnWritten, max, showWritten) }),
@@ -425,7 +434,7 @@ async function analyze(call: Call): Promise<unknown> {
425
434
  macros: { candidates: found.idioms.candidates.macros.count, applied: applyMacros, revision: found.idioms.candidates.macros.revision },
426
435
  version: { now: run.toolVersion, last: lastVersion, revision: run.imported.revision },
427
436
  retiredReferences: run.imported.changes.references.retired,
428
- guards: { refused: toCorrect(run.report.refused, entries), writtenNotExecuted: runOnWritten.length },
437
+ guards: { refused: toCorrect(refused, entries), writtenNotExecuted: runOnWritten.length },
429
438
  cut,
430
439
  });
431
440
  };
@@ -449,7 +458,8 @@ async function analyze(call: Call): Promise<unknown> {
449
458
  toolVersion: result.toolVersion,
450
459
  imported,
451
460
  report,
452
- seeds: seedsResult({ entryPoints: seeds.entryPoints.length, dataRanges: seeds.dataRanges.length }, { entryPoints: overLimit.entryPoints, dataRanges: overLimit.dataRanges }, report, max),
461
+ given: { entryPoints: seeds.entryPoints.length, dataRanges: seeds.dataRanges.length },
462
+ overLimit: { entryPoints: overLimit.entryPoints, dataRanges: overLimit.dataRanges },
453
463
  found: idiomsResult(db, idiomsImported),
454
464
  tail: {
455
465
  coverage: result.coverage.map(formatC64RangeFields),
@@ -483,7 +493,8 @@ async function analyze(call: Call): Promise<unknown> {
483
493
  toolVersion: result.toolVersion,
484
494
  imported,
485
495
  report,
486
- seeds: seedsResult({ entryPoints: seeds.entryPoints.length, codeStarts: codeStarts.length, dataRanges: seeds.dataRanges.length }, overLimit, report, max),
496
+ given: { entryPoints: seeds.entryPoints.length, codeStarts: codeStarts.length, dataRanges: seeds.dataRanges.length },
497
+ overLimit,
487
498
  found,
488
499
  gaps: coverage === undefined ? {} : { coverageGaps: listed(explained, max, showGap, "a larger --max-listed") },
489
500
  tail: {
@@ -229,10 +229,14 @@ The script does the steps of the record file on the reference program. Then it w
229
229
  - `coverageFrom`: the `frame` and the `pc` where the coverage map starts. `null` when the coverage did not start.
230
230
  - `reason`: with a FAIL, why the session did not complete.
231
231
  - `evidence`: only when the project knowledge gives a file of `--out` as evidence, and this record changed the file. Each item has the `file`, its `state` and the `revisions` that give the file.
232
+ - `entryStateDiffers`: the ranges of `$0002`-`$03ff` where the program at its entry has other bytes than the entry state of the project knowledge. The script compares only when it examines the entry. The script does not compare the free part of the stack page. It does not compare the KERNAL bytes that change by time alone: the jiffy clock and the cursor blink. It does not compare the load pointer at `$00ac`-`$00ad`, which the start sets. When no byte is different, the body has no `entryStateDiffers`.
233
+ - `entryState`: a note in place of `entryStateDiffers`. The program came to its entry during the input of the session. Input is a key, a joystick that is not centered, or the keys of a `type` step. A new capture cannot remove that difference. Do not capture again for it.
232
234
 
233
235
  Do this for each result:
234
236
 
235
237
  - `PASS`: for a folder in `tests/recordings/`, `hint` tells you to commit the folder and to add its coverage map to the project knowledge as coverage. Git ignores `.c64-re-tools/local/`, thus the project knowledge must not name a file in it. For a folder there, `hint` tells you to record again with `--out tests/recordings/<name>`. `nextAction` replays the recording on the reference. Run it to make sure that the recording replays.
238
+ - `PASS`, and `hint` names a step that "ran before the program came to its entry", or tells that "the program did not come to its entry". The entry is the entry in the project knowledge, where the loader of a rebuild starts the program. Thus `replay` on a rebuild with a loader gives `INCONCLUSIVE`. A `replay` on the reference, or on a rebuild without a loader, can use the recording. For a rebuild with a loader, make the steps of the record file start after the entry. Make the session continue until the program runs from its entry. Then record the session again. The script examines the entry only when `symbols` of the record file is `knowledge` or `none`.
239
+ - `PASS` with `entryStateDiffers`: the input of the record file before the entry is not the input of the capture of the program. The loader of a rebuild writes the entry state of the capture. Thus a replay on that rebuild starts from a different state. Capture the program again with the input of the record file before the entry. Then put the capture into the project knowledge, and generate the loader again.
236
240
  - `PASS` with `evidence`: you recorded into the folder of an earlier recording. Put the new coverage map into the project knowledge as coverage, as `hint` tells. It replaces the map of the earlier recording. For another file in `evidence`, examine the facts of its revisions against the new recording.
237
241
  - `FAIL` after a cancel on the page: `hint` tells you to ask the user what to do. Do not record a session from steps in place of the session of the user.
238
242
  - Another `FAIL`: `reason` names the step that did not complete. Examples are a `runUntil` step that did not get to its target, and a `type` step with too many keys. Change the step, then run `record` again.
@@ -285,6 +289,8 @@ A `$` address is an address of the reference. On the rebuild, it moves with the
285
289
  - `movedSites`: the number of input sites at a different address in the rebuild.
286
290
  - `startScreen`: `skipped` when the rebuild started after its start screen.
287
291
  - `idleReads`: the number of input reads of the rebuild that the recording had no value for.
292
+ - `entryStateDiffers`: only for a rebuild with a loader. The ranges of `$0002`-`$03ff` where the reference at its entry has other bytes than the rebuild at its entry. The loader of the rebuild wrote these bytes. The script does not compare the free part of the stack page. It does not compare the KERNAL bytes that change by time alone: the jiffy clock and the cursor blink. It does not compare the load pointer at `$00ac`-`$00ad`, which the start sets. When no byte is different, the body has no `entryStateDiffers`.
293
+ - `entryState`: a note in place of `entryStateDiffers`. The program came to its entry during the input of the session. Input is a key, a joystick that is not centered, or the keys of a `type` step. A new capture cannot remove that difference. Do not capture again for it.
288
294
  - `files`: with `--out` and a FAIL, the RAM of each side at the first different checkpoint.
289
295
  - `screen`: with `--screen`, the PNG file of the screen of the reference at the end of the session.
290
296
 
@@ -295,6 +301,7 @@ Do this for each result:
295
301
  - `PASS`: each checkpoint of the rebuild has the state of the reference. Without `--rebuild`, the recording replays on the reference.
296
302
  - `FAIL` with `--out`: `files` has the RAM of each side at the first different checkpoint. `nextAction` compares the two files with `diff`. Then examine the first different state item in the emulator.
297
303
  - `FAIL` without `--out`: `hint` tells you to give `--out`. A FAIL where an enemy or an event is different, but the input is the same, often shows that a `--pin` is missing.
304
+ - A result with `entryStateDiffers`: the rebuild starts from a different state than the reference. A FAIL can come from this difference. Capture the program again with the input of the record file before the entry. Then put the capture into the project knowledge, generate the loader again, and replay again.
298
305
  - `FAIL` with no `firstDifference`: the rebuild did not get to all checkpoints. `reason` gives the number. When the rebuild has the names of the recording, `hint` tells you to give `--symbols`. Else examine the rebuild in the emulator after its last checkpoint.
299
306
  - `INCONCLUSIVE`: `reason` gives the cause:
300
307
  - "does not reproduce": the reference does not end the session with the recorded state. Record the session again.
@@ -223,10 +223,10 @@ const RESTORE = Symbol("restore");
223
223
  * undefined: the recording is complete. Cancel gives CANCELLED, and a RESTORE
224
224
  * that fails gives its reason. No frame runs after End or Cancel.
225
225
  */
226
- export async function play(core: Pick<C64RunSession, "command" | "status">, options: PlayOptions): Promise<string | undefined> {
226
+ export async function play(core: Pick<C64RunSession, "command" | "status" | "key" | "joy">, options: PlayOptions): Promise<string | undefined> {
227
227
  const palette = (await core.command("palette")).split(" ").slice(1).join(" ");
228
228
  const viewers = new Set<ServerResponse>();
229
- const pending: Array<string | typeof RESTORE> = [];
229
+ const pending: Array<{ code: number; down: boolean } | typeof RESTORE> = [];
230
230
  let mask = 0;
231
231
  let port = options.joystick;
232
232
  let reason: string | undefined;
@@ -270,7 +270,7 @@ export async function play(core: Pick<C64RunSession, "command" | "status">, opti
270
270
  const keys = (url.searchParams.get("keys") ?? "").split(",").map((key) => (/^\d{1,2}$/.test(key) ? Number(key) : -1));
271
271
  if (!keys.every((key) => PAGE_KEYS.has(key))) return void response.writeHead(400).end();
272
272
  const state = url.searchParams.get("down") === "1" ? "down" : "up";
273
- if (phase === "playing") for (const key of keys) pending.push("key " + (0x80 + key).toString(16) + " " + state);
273
+ if (phase === "playing") for (const key of keys) pending.push({ code: 0x80 + key, down: state === "down" });
274
274
  answer(phase === "playing");
275
275
  } else if (request.method === "POST" && url.pathname === "/restore") {
276
276
  if (phase === "playing") pending.push(RESTORE);
@@ -302,15 +302,16 @@ export async function play(core: Pick<C64RunSession, "command" | "status">, opti
302
302
  await leftWaiting;
303
303
  while (phase === "playing") {
304
304
  const started = Date.now();
305
- const joy = port === 1 ? "joy " + mask.toString(16) + " 0" : "joy 0 " + mask.toString(16);
305
+ const masks: [number, number] = port === 1 ? [mask, 0] : [0, mask];
306
+ const joy = masks.join(" ");
306
307
  if (joy !== sent) {
307
- await core.command(joy);
308
+ await core.joy(...masks);
308
309
  sent = joy;
309
310
  }
310
311
  while (pending.length > 0 && phase === "playing") {
311
312
  const next = pending.shift()!;
312
313
  if (next !== RESTORE) {
313
- await core.command(next);
314
+ await core.key(next.code, next.down);
314
315
  continue;
315
316
  }
316
317
  const failed = await options.restore();
@@ -332,7 +333,7 @@ export async function play(core: Pick<C64RunSession, "command" | "status">, opti
332
333
  await new Promise((resolve) => setTimeout(resolve, Math.max(0, FRAME_MS - (Date.now() - started))));
333
334
  }
334
335
  } finally {
335
- await core.command("joy 0 0");
336
+ await core.joy(0, 0);
336
337
  for (const viewer of viewers) viewer.end();
337
338
  await new Promise((resolve) => server.close(resolve));
338
339
  }