Commit Graph

803 Commits

Author SHA1 Message Date
nmlgc a3ab75cd34 [Reduction] #25: _strcat 2014-08-14 12:22:37 +02:00
nmlgc adf8e137d9 [Reduction] #24: _strcmp
[Binary change] Relocation order in TH01's REIIDEN.EXE... do they depend on
some kind of RNG?
2014-08-14 12:22:31 +02:00
nmlgc 111fc05e58 [Reduction] #19-23: Far heap checking functions
They're only used as part of TH01's debugging functionality.
2014-08-14 12:22:23 +02:00
nmlgc 18f77cb7da Include RULES.ASI from every executable's dump file.
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.
2014-08-14 09:54:00 +02:00
nmlgc 43f280ab55 [Reduction] #6-18: Far heap functions
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.
2014-08-13 14:40:41 +02:00
nmlgc 534ba2d142 [Reduction] #5: bfill
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.
2014-08-10 11:47:36 +02:00
nmlgc 130a5c587d [Reduction] #4: _strcpy 2014-08-10 07:52:56 +02:00
nmlgc 23674951e5 [Reduction] #3: _stricmp 2014-08-10 07:52:29 +02:00
nmlgc 4dba5673cb [Reduction] #2: _strlen
Yes, I do have the .CAS files. However, even though they contain the assembly
source, they're actually C source, and we're not that far yet.
2014-08-10 07:51:36 +02:00
nmlgc 713ad758b6 [Reduction] #1: __abort
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...
2014-08-10 07:50:38 +02:00
nmlgc 60cf35edad Remove IDA's cross reference comments
We're going to rename *everything*, and grep is a much more useful tool to
achieve the same.
2014-08-10 07:40:12 +02:00
nmlgc 93ef812580 th01/reiiden: Initial state
Step 1 done! Now, the fun begins.
2014-08-09 03:44:10 +02:00
nmlgc e0ecdf40f2 Describe the entire project and the current roadmap in the Readme file 2014-08-07 03:30:39 +02:00
nmlgc 56000a9044 th01/zunsoft: Initial state
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.
2014-08-06 21:16:14 +02:00
nmlgc c716ac05fb th01/fuuin: Initial state 2014-08-06 05:21:22 +02:00
nmlgc 39f3b4e741 th01/op: Initial state 2014-08-05 21:24:06 +02:00
nmlgc 48961cde6b th04/main: Fix the crash when beating Yuuka
I sure hope that this was the last one of that sort.
2014-07-14 03:21:13 +02:00
nmlgc f1d931c639 th05/main: Identify end-of-stage strings 2014-07-12 23:35:16 +02:00
nmlgc 0459f03cfe th02/op: Identify performance option string pointers 2014-07-08 03:05:19 +02:00
nmlgc 0f5b52c28e th02/main: Identify the stage title halflengths array 2014-07-06 18:10:36 +02:00
nmlgc 21b4a16512 th02/main: Identify some more data referenced when displaying the BGM title 2014-07-06 01:52:54 +02:00
nmlgc 550b037521 th05/maine: Identify some missing All Cast data references 2014-07-05 23:45:26 +02:00
nmlgc 2bd664c5e4 Compress unitialized memory by replacing bytes with dwords 2014-07-05 23:08:34 +02:00
nmlgc 174e08fc60 th05: Fix all remaining alignment errors
These stray NOPs and "db 0" declarations were exactly what made the recompiled
executables comparatively large.
2014-07-05 22:29:58 +02:00
nmlgc 31f6554d1c th05/main: Identify the score numeral bitmaps 2014-07-05 01:36:16 +02:00
nmlgc 0b0013beb0 th04/main: Identify the score numeral bitmaps 2014-07-05 01:30:20 +02:00
nmlgc 8586dbe98c th02/main: Identify the score numeral bitmaps 2014-07-04 21:41:03 +02:00
nmlgc 92e5e772be th05/maine: Declare some missing strings as such 2014-07-04 18:19:46 +02:00
nmlgc 0ff83ca74e th05/op: Identify menu description strings 2014-07-04 15:00:44 +02:00
nmlgc 4eceb05d9d th05/op: Identify sound setup strings
More relocation changes?
2014-07-04 14:55:07 +02:00
nmlgc 5a1b691f21 th05/op: Identify Music Room strings 2014-07-04 14:50:35 +02:00
nmlgc 53fa9b1cfb th05/op: Declare some missing strings as such
Well, nobody actually creates perfect code the first time around, except
Linus Torvalds. (http://youtu.be/4XpnKHJAok8?t=22m18s)
2014-07-04 14:42:38 +02:00
nmlgc 17f6ac7d1d th02/main: Identify stage and BGM title pointers 2014-07-03 16:10:24 +02:00
nmlgc fc5b599a63 th04/main: Identify stage and BGM title pointers 2014-07-03 08:29:18 +02:00
nmlgc 60195806f8 th03/mainl: Identify character name and title string pointers
For some reason, this ends up modifying the relocations in the .exe header.
Oh well, it's not code, so... *shrug*
2014-07-02 23:49:19 +02:00
nmlgc 8106ddf80f th05/maine: Identify All Cast string pointers 2014-07-02 23:15:59 +02:00
nmlgc 267f9eb90a th02/main: Initial state 2014-07-02 21:00:04 +02:00
nmlgc 4ae365a60b th02/maine: Initial state 2014-07-02 19:43:15 +02:00
nmlgc 3186da7cec th02/op: Initial state 2014-07-02 19:18:32 +02:00
nmlgc d569ad64f2 th03/main: Initial state 2014-07-01 23:25:51 +02:00
nmlgc cdf5141dee th03/mainl: Initial state 2014-07-01 20:30:39 +02:00
nmlgc bd5099f904 th03/op: Initial state 2014-06-30 00:52:27 +02:00
nmlgc 93360e2a13 th05/main: Split off segments 3 and 4 into a separate file
Getting rid of all the hash space hacks.
2014-06-30 00:00:24 +02:00
nmlgc 48ce5beaea th04/main: Initial state
To anyone else encountering TASM's "Near jump or call to different CS" issue:
Just split off the offending segment into a different source file and include
it from the main one.
2014-06-29 23:04:24 +02:00
nmlgc 6afe3e89a3 th04/maine: Initial state 2014-06-29 18:45:48 +02:00
nmlgc bf430e4231 th04/op: Initial state 2014-06-29 16:51:19 +02:00
nmlgc 82bc23ec58 th05/main: Identify Stage 4 boss theme strings 2014-06-29 03:21:02 +02:00
nmlgc 467a7db913 th05/main: Initial state 2014-06-29 02:43:13 +02:00
nmlgc 21b8ca62ab th05/maine: Initial state 2014-06-28 22:13:04 +02:00
nmlgc 91cb632353 th05/op: Additional alignment fixes
Now, we're fully identical to the original build - save for three instructions
that are getting assembled using different, but equivalent opcodes.
2014-06-28 20:38:31 +02:00