Development leftovers in the code
Things the developers left in the shipped game; none of them changes what a player sees.
- Where
- main.dol (asset loader mode word 0x8018AD90, effect loader, story hub, scene core)
- Visible in the retail game
- None of these
- Still in the code
- All of them
Loading from loose files
The asset loader has a mode word, set to 2 in the retail game, which means “read everything out of the .MRG archives”. Mode 0 is a different layout: one loose file per asset, with names such as Texture/0_system/sys%03d.tpl, m%03d.dat (a monster model by its card number), stage%04d.dat and b%03d.rel for an effect module. Mode 1 reads the archives but can take an effect module from its loose file. Presumably that is how the team worked before the archives were packed. The card menu still has a picture-loading loop for the loose layout. The code paths are still there; nothing in the game writes the mode word, so it stays 2.
“%sduel2.str”
The effect module loader’s constants still hold the file-name pattern "%sduel2.str", built like the loader’s loose-file names. The function that used it is gone (the linker removed it), so nothing builds the name, and no file of that name is on the disc.
A cut-scene that is not there
Cut-scenes are found by an id of the form group × 10000 + number. The story hub has a mode that asks for cut-scene 7770/0 and then returns to the title, like the mode that plays the story endings (8010/0, 8010/10, 8010/20). No cut-scene has that id, and no code switches the hub to that mode, so the request is not made. Why it is there is not known.
Three debug prints
The map code still calls printf three times, with these formats:
type %d
b %x
p %f
e %f
[%d][%d]-%d
(%f,%f)
All three are in the step that pushes units apart after a battle on the map (map_push_units_apart). That step runs at frame 0x6E of an engagement when the map’s mode type is 0. printf writes to the developers’ debug output, so nothing appears on screen.
Switches nobody flips
- Entering the developer menu sets a flag in the game’s system state (bit
0x04at+0xC5) that no code reads, so what it was for is not known. - The fog code supports an extra range adjustment, but its only caller always passes
-1for the adjustment’s centre and width, which leaves it off. - The effect loader knows three kinds of modules:
b(basic attacks),z(special attacks and skill cards) and a third kind, lettere(archivee_MODULE.MRG, or loosee%03d.relfiles), of which there is nothing on the disc. - The sound player treats ids
0xF000-0xFFFFas timed random sequences, stepped every 16 frames. Their table holds no entries and no code plays such an id; only the developer menu’s sound test could. - Every cut-scene script contains a
markcommand that stores a position nothing reads; removing all 51 would free 153 bytes.
Evidence
All of these were found while rewriting the game’s code: the asset loader and its mode word (no store to it anywhere), the string table of the effect loader, the three bl printf instructions in map_push_units_apart (at 0x800064C8, 0x80006A80 and 0x80006A94, called from map_engage_step), the hub’s call to the cut-scene search with the constant 0x04A19BA0 (7770 × 10000; the hub’s mode field is only ever set to 0, 1, 2, 4 and 9, never to the 7 that branch needs, and only the hub’s own code touches it), the stores to the system flags, the fog code’s one caller, and the sound driver’s sequence table. “Nothing reads it” means that no code in the game, and none of the 233 effect modules, reads the value.