29 October 2026: the battle scripts, and a grid that talks to the sound chip
Two pieces went in today after a pause of eleven days while the project's weekly allowance ran out: the battle scripts are now readable, and the packed $C3 module is past 90% of its code.
The battle scripts
Every attack, tech and item in a battle is a small program: which sprites move where, which sounds play, when the damage numbers appear, how the target reacts. The game keeps these as bytecode, 70 KB of it, and the enemies' decisions (which attack to use, and when) as another 17 KB of records. Both now rebuild byte for byte from readable text.
An action script starts with a header naming the threads it runs, in the order the game's loaders read them: threads 0-3 move battlers, 4 works on a set of targets, and 8-15 drive the effect's own sprites. Each opcode's length was worked out the same way as for the event scripts, by running the code that handles it on symbols; here it had to be done once per kind of thread, because a few opcodes really do behave differently in each.
The independent audit found one thing worth a picture in words. Three opcodes, in some kinds of thread, move on by a length that an earlier opcode left in memory, not one they set themselves. The tools had been calling that "the end of the thread". It is not; it is the original quietly reusing a stale number. They are now classed apart, and a check over the real data makes sure no change can blur the two again.
The enemies' scripts turned out not to be a language at all: each is a list of tests ("if HP is below a quarter") followed by actions, with no jumps. They are handled like the game's other tables, as records whose layout is proved by the code that reads them.
Programs 10, 12 and 13
The module's eighth batch is three scenes built around a turning picture: 32 frames of a rotation, half of them stored and half made at run time by mirroring the others. It brings the module to 19,050 of its 21,030 code bytes (90.58%), 411 routines, every one verified.
Two of the original's oddities from this batch:
- One list of tiles names tile 208 eight times, though the pack it reads from ends at tile 204. The reads go past its end into bytes another pack left as zeros, so the eight copies come out blank and nobody ever noticed.
- A routine that fills a map writes each entry with a 16-bit store aimed one byte below the RAM port it means. The extra byte lands on
$217F, which on the SNES is a mirror of the sound chip's port 3: the loop sends the sound CPU the value 0, 1,024 times, while drawing a grid.
Where the module stands
What is left of the module is the scripts and tasks these last programs run, about 5.5 KB, and that batch is in progress now.
Next
The rest of the module; the scene and battle layer-effect scripts, which are written and in audit; the music; and the largest remaining piece, the graphics, as images that can be edited and rebuilt exactly.