User blog:RottenBlock/System 1 Compilation, Part 9

While I started work on System 3.0 the other day, adding untested support for all of its commands (one of them is gonna be trouble), I want to tidy up any remaining mess in System 1 before moving on, especially if it uncovers any errors that might exist in System 3.0.

To this end, I want to get to the point where Sys0Decompiler is able to decompile and compile every remaining game in the set to new-style code. I've updated the program to properly address $ commands, which were all wrong, and to also handle multiple DISK files correctly. Unfortunately, we're having various problems (which, among other things, is why I'm not uploading the fixed code). I also haven't had a chance to check out the new, maintained version of TTSys that ヌヌハラ pointed out to me! All important stuff in its due time.

Current Problems: Actions:
 * Intruder: Seems to have an error in BDISK.DAT's header, conveying a negative file size. Since multiple disk support was just now repaired, it's possible I missed something, but no other game is crying foul. ALDExplorer reveals it has multiple copies of the same code files (presumably to minimize disk switching), which isn't the case for other DISKs, is this throwing off the headers somehow?
 * Crescent Moon Girl: Has invalid data in the compiled file. Something else is probably wrong. ALDExplorer won't even open its DISK file, which is bizarre. Test this in TTSys.
 * Dangerous Tengu Legend: The first file has code beyond its End of File character, which despite its placement is actually still used - in fact, the file has three seperate EOF characters each with a used code block inside! But just when you start to think this is "normal," another file has unused, junk code beyond its EOF, which breaks mid-command. The file with the mystery code has other signs of tampering, so it may be one of a kind.
 * DPS: Broken junk code beyond the EOF, seemingly a copy of code somewhat earlier in the file.
 * DPS SG: Haven't tested everything, but at least one of them has busted code beyond its EOF, seemingly an older version of the code in the file (text changes, slightly different choice of words).
 * Toushin Toshi Hint Disk: Actually decompiles fine! Unfortunately, this is one of the programs that TTSys wasn't running properly, and while I will check that out at some point in the future (perhaps using the new version of TTSys), it doesn't make a very good test case at this stage.
 * 1) Haven't had a chance to compile all the code before I started investigating this junk code phenominon. Turn off extraction of the post-EOF junk code and see if this "used but hidden" phenominon is unique to Tengu, or for that matter, found anywhere else in Tengu. Scour all 84 files of Tengu if I have to.
 * 2) If "used but hidden" code is a frequent practice, output junk code to seperate files, pageXX_junk.adv or something. Big pain to do it formatted, but without formatting how will the end programmer know what it is? Code isn't built to keep printing if there's an error, have to add checks to multiple endpoints.
 * 3) Check the Intruder header manually. Try to work out a way to check it in TTSys without actually getting to the point where the game checks BDISK.DAT, which seems to be at the very end!
 * 4) If I can't fix it Intruder's header, it might be better to allow Sys0Decompiler to directly decompile SCO files, since I can extract what seems to be all of Intruder's SCO files using ALDExplorer.
 * 5) Can TTSys actually handle Crescent Moon Girl's seemingly-broken DISK file? Hard to say without knowing where the break is.