User blog:RottenBlock/System 1 Compilation, Part 2

I've recently migrated all my work on TTSys to ALDExplorer,. ALDExplorer is still present and functional, but I'll be removing it later once I'm sure of what I do and don't need.

Presently, the program only does two things: it can decompile original System 1 ADISK.DAT and A00.DAT files like my TTSys mod from a few posts ago (have only tested Little Vampire's) and it can compile A00.DAT files that work just fine, as well as new-style ADISK.DAT files (or, to be more accurate: a normal ADISK.DAT file with new-style .SCO files inside). Unfortunately, it can't yet decompile the new-style ADISK.DAT files, and of course I haven't updated TTSys to play the finished product, so I can't say for certain if the compiler is doing its job right (it looks fine, but only the computer can confirm that). But like I said, I'm going to be uploading my intermediary work for safety's sake.

I've dubbed the program Sys0Decompiler. Here are some instructions on how to use it. Mind that use is very restricted, and that I haven't even started stress testing it for errors and irregular use cases. Usability and error testing will be higher priorities in later builds. I don't even have progress bars in the decompile process yet, it's a mess like any WIP.

Decompiling
Select File -> Decompile -> System 1. You will be asked to select a directory with the files you want to decompile. Point it to the directory containing your A00.DAT and ADISK.DAT files (preferably both, but the program will handle them on their own if it has to). They must have those names, and while I did do a little peripheral setup for subsequent BDISK, CDISK, etc files, I never tested it. Sys0Decompiler will create a /code/ directory in the target dir and will output !verb.adv and !object.adv files (from A00.DAT) and page####.adv files (from ADISK.DAT) to said directory.

Compiling
Select File -> Compile -> System 1. You will be asked to select the directory containing your code files (the ones created above). The program will automatically create compiled A00.DAT and ADISK.DAT files in the same folder as the code. There may be errors if you're missing either of the verb/obj or page files.

From this point, I need to work on decompiling the new-style SCO files. dis0000.sco contains a tag indicating its revision (REV) status, which will cause things to break the moment you start trying to decompile or play the new-style ADISK.DAT file. The next step is to build in support for decompiling the new-style files. I'm not expecting a huge amount of trouble on this, but once it's done I intend to check all the commands in the language to make sure they're compiling and decompiling properly.

Once I confirm the same files are coming out as are going in, I'll probably upload that version and then go on to making TTSys run the new code. At that point, the System 1 Decompiler/Compiler will arguably be complete, though it will probably need adjustment by testing a full-sized game or two, as I've discussed in the past.

Will probably have to write a Sys1 manual at some point.

Download: MediaFire