@henols/c64-re-tools 2.7.1 → 2.8.0-rc.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/package.json +1 -1
- package/skills/c64-assembler/SKILL.md +23 -38
- package/skills/c64-assembler/scripts/assembler.ts +137 -17
- package/skills/c64-basic/SKILL.md +11 -31
- package/skills/c64-basic/scripts/basic.ts +4 -1
- package/skills/c64-development/SKILL.md +2 -2
- package/skills/c64-disk/SKILL.md +11 -32
- package/skills/c64-docs/SKILL.md +27 -45
- package/skills/c64-docs/references/page-types.md +20 -18
- package/skills/c64-docs/references/style.md +10 -4
- package/skills/c64-docs/scripts/docs.ts +13 -2
- package/skills/c64-docs/scripts/lib/reference.ts +47 -5
- package/skills/c64-knowledge/SKILL.md +138 -267
- package/skills/c64-knowledge/references/batches.md +48 -0
- package/skills/c64-knowledge/references/coverage.md +29 -0
- package/skills/c64-knowledge/references/source-knowledge.md +72 -0
- package/skills/c64-knowledge/references/start-screen.md +44 -0
- package/skills/c64-knowledge/scripts/knowledge.ts +266 -61
- package/skills/c64-knowledge/scripts/lib/check.ts +133 -0
- package/skills/c64-knowledge/scripts/lib/listing.ts +71 -8
- package/skills/c64-memory-map/SKILL.md +11 -32
- package/skills/c64-packer/SKILL.md +11 -31
- package/skills/c64-provenance/SKILL.md +43 -64
- package/skills/c64-provenance/scripts/lib/leftovers.ts +8 -3
- package/skills/c64-provenance/scripts/provenance.ts +65 -56
- package/skills/c64-reverse-engineering/SKILL.md +20 -47
- package/skills/c64-reverse-engineering/references/comment-check.md +42 -0
- package/skills/c64-reverse-engineering/references/versions.md +47 -0
- package/skills/c64-source/SKILL.md +48 -237
- package/skills/c64-source/references/export.md +50 -0
- package/skills/c64-source/references/loader.md +78 -0
- package/skills/c64-source/references/source-format.md +46 -0
- package/skills/c64-source/scripts/lib/export.ts +28 -13
- package/skills/c64-source/scripts/lib/loader.ts +4 -82
- package/skills/c64-source/scripts/lib/source.ts +3 -5
- package/skills/c64-source/scripts/source.ts +48 -51
- package/skills/c64-static-analysis/SKILL.md +52 -52
- package/skills/c64-static-analysis/scripts/lib/coverage.ts +55 -2
- package/skills/c64-static-analysis/scripts/lib/idioms.ts +43 -17
- package/skills/c64-static-analysis/scripts/static-analysis.ts +79 -15
- package/skills/c64-testing/SKILL.md +72 -58
- package/skills/c64-testing/references/recording-format.md +5 -80
- package/skills/c64-testing/references/scenario-format.md +4 -12
- package/skills/c64-testing/scripts/lib/play.ts +16 -8
- package/skills/c64-testing/scripts/lib/recording.ts +74 -9
- package/skills/c64-testing/scripts/lib/replay.ts +4 -0
- package/skills/c64-testing/scripts/lib/runs.ts +112 -1
- package/skills/c64-testing/scripts/lib/scenario.ts +12 -6
- package/skills/c64-testing/scripts/lib/start-screen.ts +27 -0
- package/skills/c64-testing/scripts/testing.ts +34 -13
- package/skills/c64-unpacker/SKILL.md +10 -30
- package/skills/emulator/SKILL.md +7 -36
- package/src/build-name.ts +12 -1
- package/src/c64.ts +16 -0
- package/src/knowledge/history.ts +8 -0
- package/src/knowledge/program.ts +84 -4
- package/src/knowledge/read.ts +46 -2
- package/src/knowledge/recording-files.ts +32 -0
- package/src/knowledge/schema.ts +3 -1
- package/src/knowledge/separate.ts +165 -11
- package/src/knowledge/start-screen.ts +99 -17
- package/src/knowledge/text.ts +2 -1
- package/src/knowledge/write.ts +15 -8
- package/src/loader.ts +167 -0
- package/src/native/decompiler/analyze.ts +7 -6
- package/src/native/decompiler/walk.ts +32 -2
- package/src/native/dxa.ts +4 -4
- package/src/native/types.ts +34 -4
- package/src/script.ts +102 -25
- package/skills/c64-export/SKILL.md +0 -63
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: c64-export
|
|
3
|
-
description: Exports a rebuilt C64 program as the start of a new program. The export sets each switch to one value in the code. Corrections, trainers and cheats are in, and copy protection and crack changes are out. It removes code and data that nothing uses. It writes a new project folder with the source, a baseline program, the tests and a small knowledge, and a zip file of the folder. Use it when the user asks to "export the project", "start a new game from this rebuild" or "make a clean package of the code". It does not change the rebuilt project or its knowledge.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# C64 export
|
|
7
|
-
|
|
8
|
-
## Purpose
|
|
9
|
-
|
|
10
|
-
Make the start of a new program from a rebuilt program. The new program is a new project. A person changes its source directly.
|
|
11
|
-
|
|
12
|
-
Do not change the rebuilt project or its knowledge.
|
|
13
|
-
|
|
14
|
-
## Inputs
|
|
15
|
-
|
|
16
|
-
- A rebuilt project: the generation of its source from the project knowledge gives PASS.
|
|
17
|
-
- The folder of the new project. It must be new or empty, and no project can hold it. Use a folder beside the project, for example `../game-new`.
|
|
18
|
-
- Optional: the coverage of the runs in the knowledge. Without coverage, nothing becomes free by itself.
|
|
19
|
-
|
|
20
|
-
## Workflow
|
|
21
|
-
|
|
22
|
-
1. Generate the source from the project knowledge into `src`. Continue only when the result is PASS. If it is not PASS, stop. Complete the rebuild of the program first.
|
|
23
|
-
2. Read the switches in the project knowledge. Tell the user the export value of each switch:
|
|
24
|
-
- `fix`, `trainer` and `cheat`: 1. The code becomes a part of the new program.
|
|
25
|
-
- `protection` and `crack`: 0.
|
|
26
|
-
- `change`: its default.
|
|
27
|
-
|
|
28
|
-
If the user wants another value for a switch, change its kind or its default in the project knowledge first.
|
|
29
|
-
3. Export the program of the project knowledge to the folder of the new project.
|
|
30
|
-
4. Read `unreachableExecuted` in the result of the export. Each range is code that a run executed and that the entry does not get to now. For each range, find the code that calls it in the project knowledge:
|
|
31
|
-
- Only code that the export removed calls it, for example a copy check: drop the range.
|
|
32
|
-
- Code that the knowledge does not show can call it, for example through a pointer: keep the range.
|
|
33
|
-
- If you are not sure, ask the user.
|
|
34
|
-
5. To drop a range, remove the folder and the zip file of the export. Then export again, and drop each range.
|
|
35
|
-
6. Build the new project with the build commands in its `README.md`. Use the new folder as the project. The build that compares with the baseline must give PASS.
|
|
36
|
-
7. Run each test of the new project with the test commands in its `README.md`. Use the new folder as the project. Each test must give PASS.
|
|
37
|
-
|
|
38
|
-
### The answer
|
|
39
|
-
|
|
40
|
-
Give the user a short answer at the end:
|
|
41
|
-
|
|
42
|
-
1. The folder and the zip file.
|
|
43
|
-
2. The value of each switch.
|
|
44
|
-
3. The free ranges, with their bytes.
|
|
45
|
-
4. Each test and its result, and the tests that the export left out, with the reason.
|
|
46
|
-
5. The next step: develop features and fixes in the source of the new project.
|
|
47
|
-
|
|
48
|
-
## Knowledge
|
|
49
|
-
|
|
50
|
-
Read the switches, and the code at the addresses of `unreachableExecuted`.
|
|
51
|
-
|
|
52
|
-
Do not write to the knowledge of the rebuilt project. The export writes the knowledge of the new project.
|
|
53
|
-
|
|
54
|
-
## Result
|
|
55
|
-
|
|
56
|
-
A new project folder and a zip file of it. Its build is identical to its baseline, and each of its tests gives PASS.
|
|
57
|
-
|
|
58
|
-
## Failure and conflicts
|
|
59
|
-
|
|
60
|
-
- The export gives FAIL: read `stage` and `reason`. Do as `reason` tells.
|
|
61
|
-
- The export refuses the folder: give a new or empty folder outside every project. Remove a folder or a zip file of an earlier export only when this task made it.
|
|
62
|
-
- A test of the new project gives FAIL: the export dropped a range that the program uses. Remove the folder and the zip file. Export again and keep the range. Then test again.
|
|
63
|
-
- A task reports `installation-incomplete` or `machine-unavailable`: stop the whole task. Give the message to the user and wait for the user. Do not continue with other tasks.
|