I don't know anything about ANSI/VT100/??? escape sequences, but after some
quick research, these sequences and their effect seem to be specific to the
PC-98 (although they're implemented as part of DOS, of course).
With seg000 changed to word alignment and all definitions for "func" removed,
the master.lib functions can keep their exact alignment themselves.
[Binary change] db 0 → nop before get_machine_98() in the MAIN.EXE and
MAINE.EXE files of TH04 and TH05, respectively.
... I, um, don't know what's going on there. C++ class instances, maybe? At
least the code is largely identical in all three executables, so reduction's
going to take care of that.
Again, we can't split dseg into the "real" segments just yet, because that
would force us to correct the assumed data segment in every single function.
[Binary change] Relocations in TH01's FUUIN.EXE. Again.
Um. Not sure if ZUN used an older version there, or if these additional
branches simply resulted from a lack of optimization...
And I even had to convert the labels to local syntax.
Having thought this over for a while, I've decided to stay with the "include
slice" model for now, due to various bugs and other reasons.
We need to compile for the 386 CPU, but this causes TASM to automatically
default every segment to 32-bit mode, which of course is not what we want (and
no, .MODEL USE16 sadly does not help either). Appending USE16 to every segment
declaration in all included files seems to work, but for some reason, this
messes up certain jump instructions. WTF? And even if it did work, we would
still have to do this for every single file we include.
The alternative would be to build proper libraries and let the linker merge
all the code. This would add a lot of unwarranted complexity to the build
process. Not to mention all the EXTERN statements we'd have to maintain.
Ultimately, all of the C runtime ASM code is going to vanish anyway once we've
completed the reduction step. Once we're there, we can simply link to the
original version of the library. These initial dumps are not pretty, and I see
no point in wasting time on making intermediary stages of development look
pretty.
Since including RULES.ASI from every slice seems a bit inefficient (and even
potentiall harmful, considering the age of the development tools we have to
work with), we'll only include it once at the top of every main dump file.
[Binary change] Relocations in TH01's REIIDEN.EXE, again.
Wow, what a slice. Lots of code, and it comes with its own data declarations
inside the code segment! Since all these functions were originally contained
in one code file, it makes sense to do all 13 in one commit. This removes all
erroneous references to the 'NULL CHECK' string.
[Binary change] This also changes some relocations in TH01's REIIDEN.EXE.
To get anywhere, we must become able to include assembly files that define
their own segments. But this will only work if we include these files in the
order they appear in in our dumps, *starting from the very first one*. And to
include the very first one, we must first get rid of the erroneous references
to the first few bytes of the data segment... and this function happens to be
the first one referencing those.
It begins. And this already shows that the inclusion of TH01's ZUNSOFT.COM
will double the size of all Borland C routines we slice out, because we have
to cover both large and tiny memory models...
Yup. th01 *is* different from any other game, and that includes the
initialization program. It neither consists of three smaller programs smashed
together, nor does it seem to have any output.