@henols/c64-re-tools 2.6.0-rc.16 → 2.6.0-rc.17
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@henols/c64-re-tools",
|
|
3
|
-
"version": "2.6.0-rc.
|
|
3
|
+
"version": "2.6.0-rc.17",
|
|
4
4
|
"description": "Agent-friendly Commodore 64 engineering toolkit for reverse engineering, debugging, development and testing.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Henrik Olsson",
|
|
@@ -109,9 +109,9 @@ A rebuilt program gets its source from the project knowledge. A change is a swit
|
|
|
109
109
|
- Build the base release and compare it with the original. This build must be identical to the original.
|
|
110
110
|
- Build the default build.
|
|
111
111
|
- When the default build does not have the switch, set the switch to 1 in `src/config.asm`. Then build the default build. After the test, set the value back to the default if the user did not ask for the change.
|
|
112
|
-
8. Test the
|
|
113
|
-
- When the behavior must stay the same as the original, replay
|
|
114
|
-
-
|
|
112
|
+
8. Test the builds:
|
|
113
|
+
- When the behavior must stay the same as the original, replay each recording on the default build `build/clean.prg`. Do not replay a build with a switch that is not at its default. Run a test scenario in `tests/` only when no recording executes the changed code.
|
|
114
|
+
- On the build that has the switch, run a run file with `expect` steps that show the feature or the fix.
|
|
115
115
|
|
|
116
116
|
### The answer
|
|
117
117
|
|
|
@@ -85,7 +85,7 @@ Do the stages in this sequence. Go to the next stage only when its exit check is
|
|
|
85
85
|
|
|
86
86
|
| Stage | Work | Exit check |
|
|
87
87
|
|---|---|---|
|
|
88
|
-
| 1. Acceptance | Ask the user for the criteria of the rebuild. Offer these criteria: a base release that is identical to the original, and a passed replay of the default build. Also offer
|
|
88
|
+
| 1. Acceptance | Ask the user for the criteria of the rebuild. Offer these criteria: a base release that is identical to the original, and a passed replay of each recording on the default build. Also offer test scenarios and a list of the code that no run executed. Also offer documentation of the flows, tables, formats and graphics. | The user gave the criteria. |
|
|
89
89
|
| 2. Get | List the disk image. Extract the start file into `original/`. | The start file is in the project. |
|
|
90
90
|
| 3. Start | Find the SYS address of the BASIC start. | You have the entry address. |
|
|
91
91
|
| 4. Unpack | Examine the program for a packer. Trace it and find its stages. Capture a packed program into `.c64-re-tools/local/`. When a segment is the data of a cracktro and the program does not read it, capture again and exclude that range. Put the capture, or the PRG of a program without a packer, into the project knowledge. | The program in the project knowledge has the segments and the entry. |
|
|
@@ -94,15 +94,15 @@ Do the stages in this sequence. Go to the next stage only when its exit check is
|
|
|
94
94
|
| 7. Name | If the workspace has a routine library, match the program against it. Write the names of the matches to the project knowledge. Then name each routine in the scope and give it a comment. Find the platform addresses in the memory map of the C64. Record the modules. Put the modules of one part of the program in one folder, for example `music/`, `irq/` or `graphics/`. When the scope has hundreds of routines, ask the user which routines to name. The source gives the other routines an `l_xxxx` label. | Each routine that the user selected has a name and a comment. |
|
|
95
95
|
| 8. Releases and switches | Record the original file, or the capture of it, as the base release in the project knowledge. The project knowledge keeps the bytes of each release. Record each other release. Compare the releases. Find the leftovers. Record a switch for each copy protection, trainer, cheat, crack change and correction. Record a patch for each range of a switch. Record each leftover as a region with a comment. | The project knowledge lists each switch. Each difference between the releases is in a patch, or the answer gives it as an exception. |
|
|
96
96
|
| 9. Generate | Generate the source from the project knowledge into `src`. For an unpacked program, also generate the loader. | The result of the generation is PASS. A release whose code is at other addresses is a version with a project of its own, or an exception in the answer. See "Versions of one program". |
|
|
97
|
-
| 10. Build and test | Build the base release into `build/`, and compare it with the original. Build the default build. Replay
|
|
97
|
+
| 10. Build and test | Build the base release into `build/`, and compare it with the original. Build the default build `build/clean.prg`. Replay each recording on it. For each replay, give the checkpoint routine, the state and the random state with the names of stage 7. Then do only the tests that the next paragraph gives. | The criteria of stage 1 are true. |
|
|
98
98
|
| 11. Document | When the criteria ask for documentation, generate it into `README.md` and `docs/`. For versions in a group folder, also write the shared pages of the group folder. Then link the pages. | The link check of the documentation gives PASS. |
|
|
99
99
|
| 12. Hand over | Find each file that you made outside `.c64-re-tools/local/` and that is not a deliverable. Move it into `.c64-re-tools/local/`. Then give the answer (below). | Each file that you made outside `.c64-re-tools/local/` is a deliverable. |
|
|
100
100
|
|
|
101
101
|
In stage 5, make the recordings before you change the program. A recording needs no names, and its coverage gives the analysis of stage 6 more code. If you cannot get to a part of the program, ask the user how to get to it. Do stages 7 to 9 again until the source is clear. Each generation writes the source again.
|
|
102
102
|
|
|
103
|
-
In stage 10, a base release that is identical to the original proves the source. Do not test the base release more. The default build is different from the base release only in its patches, its leftovers and its loader.
|
|
103
|
+
In stage 10, a base release that is identical to the original proves the source. Do not test the base release more. The default build is different from the base release only in its patches, its leftovers and its loader. The replays on the default build test these differences:
|
|
104
104
|
|
|
105
|
-
-
|
|
105
|
+
- Replay only the default build `build/clean.prg`. Do not replay a release build or a build with a switch that is not at its default.
|
|
106
106
|
- Write a test scenario only for a test that a replay cannot do. Examples are a program that loads more files from a disk, and a criterion of the user.
|
|
107
107
|
- Do the other tests of stage 1 only when the user selected them.
|
|
108
108
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: c64-testing
|
|
3
|
-
description: Tests if a rebuilt or changed C64 program behaves as the original, or if a program has the expected values. It runs a scenario on the original and on the rebuild in an emulator. It compares memory, registers, chip state and the screen with explicit rules, and gives PASS, FAIL or INCONCLUSIVE. Use it when you must show that a rebuild or a correction keeps the behavior of the original. Use it to do many steps on one program and keep the screens, coverage maps, traces and snapshots as files. Use it to test a new program or a correction with expected values. Use it to record a play session of the original and replay it on
|
|
3
|
+
description: Tests if a rebuilt or changed C64 program behaves as the original, or if a program has the expected values. It runs a scenario on the original and on the rebuild in an emulator. It compares memory, registers, chip state and the screen with explicit rules, and gives PASS, FAIL or INCONCLUSIVE. Use it when you must show that a rebuild or a correction keeps the behavior of the original. Use it to do many steps on one program and keep the screens, coverage maps, traces and snapshots as files. Use it to test a new program or a correction with expected values. Use it to record a play session of the original and replay it on the default build of the rebuild. Use it to find what changed between two machine states, and to make a checklist for a human playtest. It does not find the cause of a difference. It does not build the program.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# C64 testing
|
|
@@ -179,6 +179,7 @@ A recording keeps a session of the original program, for example a play through
|
|
|
179
179
|
- Make the recordings early, before you change the program.
|
|
180
180
|
- Ask the user to play first. Tell the user which parts of the program the recordings must have, for example each room, a fight and a lost life.
|
|
181
181
|
- Record a session from steps only for a part that the sessions of the user do not have, or when the user cannot play.
|
|
182
|
+
- Replay each recording on the default build `build/clean.prg`. Do not replay a release build or a build with a switch that is not at its default.
|
|
182
183
|
- Commit the recording folder with the scenarios. Do not put a recording into the project knowledge. Do not put test results, screenshots or playtest results into it.
|
|
183
184
|
- A finding that a recording shows can go into the project knowledge. Give the `recording.json` of the recording as its test evidence.
|
|
184
185
|
- The C64 of a recording has no disk drive. For a program that loads more files from a disk, use a scenario with `test`.
|