Commit Graph

26 Commits

Author SHA1 Message Date
nmlgc bc3c85f09a [Reverse-engineering] [th04/th05] GRCG/EGC-powered VRAM writes
Funded by zorg.
2018-12-25 23:45:24 +01:00
nmlgc 41622254a8 [Reverse-engineering] EGC register writes
Funded by zorg.
2018-12-25 23:45:24 +01:00
nmlgc fa39c23fad [Reverse-engineering] [th03] CDG loading 2018-10-16 00:47:58 +02:00
nmlgc c592464121 [Reverse-engineering] [th03/th04/th05] Basic keyboard input functions
Funded by zorg.
2018-09-11 19:34:19 +02:00
nmlgc 145ecaaa54 Rename all code segments to names that Turbo C++ would generate
Well, duh, of course, we *can* do this in order to allow decompilation to be
started at the end (not the beginning) of any segment. In fact, if we hadn't
done this, we would have had to start by moving _TEXT out to libraries....
2015-02-21 12:47:24 +01:00
nmlgc c2a8c221f2 Let Turbo C++ link in the Borland C/C++ runtime for the main EXE files
This took long enough, so we're not covering the COM files right now. Like, I
can't even tell how you're supposed to work around the forced word alignment
for the _TEXT segment. Guess we'll just have to decompile all of these in one
go, just like we did with ZUNSOFT.COM.

Also, it really seems as if we're merely trading one ugly workaround for
another in our quest for identical binaries.
2015-02-19 10:22:00 +01:00
nmlgc 2d5d38426f Finally use standard segment names everywhere
And I guess we just have to ignore and disable that segment alignment warning
for TH01. It's not like this changes anything in the binary.
2015-02-18 14:04:43 +01:00
nmlgc f0ab47fd18 [Reduction] Hardware text colors and effects
Turns out we're not quite done with reduction yet, as there still are a bunch
of macros in master.h that #define PC-98-specific hardware constants and I/O
ports.
2014-12-20 22:36:38 +01:00
nmlgc 181d2920af [Reverse-engineering] Symbols for PMD and MMD API calls 2014-11-27 19:35:54 +01:00
nmlgc f54b85577d [Reverse-engineering] Slot-based PI file loading and freeing 2014-11-18 17:56:13 +01:00
nmlgc 225d8f2a28 Identify all function pointers referenced from code
> introduce a new macro to halve the lines of a far function pointer
  assignment, hoping that this commit will end up deleting more lines than it
  adds, because TH03 has lots of those
> oh wait, these games mainly use near function pointers
> unearth even more new functions in the process

Seriously, how many more functions are still hidden in this codebase? And all
that just because IDA was not smart enough to begin with.
2014-11-14 01:57:40 +01:00
nmlgc 84180b9cd9 [Reduction] #685: ldtrunc 2014-11-09 14:49:18 +01:00
nmlgc 015ceec3e1 [Reduction] #569: xcvt
... and even with EMUL being set up and working, TASM still needs to be hacked
into actually emitting emulator calls for certain instructions.
2014-11-02 06:55:48 +01:00
nmlgc 4ac17ac2a5 Trick TASM into not creating 32-bit default segments
So that's the - admittedly rather weird - solution to the problem that has
been plaguing this project ever since the beginning of the reduction step.
Without any 32-bit dummy segments in the compiled object files, more linkers
will be able to build this project, one of them being JWlink
(http://sourceforge.net/projects/jwlink/).

Still can't rename dseg to _DATA though, as TASM stupidly refuses to accept
any ALIGN directives above a segment's alignment attribute value. TH01's
floating-point data slices already require larger alignments, and we're very
likely to have even more of those in the future.

Also, we're finally defining the Borland C++ model symbols directly in the
code, rather than in my unpublished build batch files. :)
2014-10-31 08:17:54 +01:00
nmlgc 48088875ca [Reduction] #561-562: scantol
Also finally getting a macro for the recurring "pop cx if LDATA" case.
2014-10-30 09:38:46 +01:00
nmlgc c4aee8a236 [Reduction] #556-558: open 2014-10-27 02:50:32 +01:00
nmlgc 16b4e1d240 [Reduction] #540: close
Now with DOS error codes.
2014-10-15 08:39:22 +02:00
nmlgc 3457818399 [Reduction] #533-536: fopen
More flags and constants, despite reminding me why exactly I haven't done this
all along.
2014-10-13 06:12:09 +02:00
nmlgc afdd1c06e0 [Reduction] #532: fmode
Yup, finally adding the opening flags as well.
2014-10-11 23:56:44 +02:00
nmlgc b4794ec1d9 [Reduction] #240: cutline 2014-08-28 05:14:54 +02:00
nmlgc 40de176f2c [Reduction] #191: bcloser 2014-08-26 20:54:57 +02:00
nmlgc b7aa7291db [Reduction] #182: bgm_read_sdata
[Binary change] Order of 2 relocations in all modified executables.
2014-08-26 06:07:19 +02:00
nmlgc 674ecce1c3 [Reduction] #171: _bgm_bell_org
[Binary change] db 0 → nop before the function in every affected executable.
2014-08-25 04:49:19 +02:00
nmlgc 193ca02550 [Reduction] #130: ___write
Doing one of these C monstrosities a day seems like a good habit. And hey,
ZUNSOFT.COM has already shrunk by over a third.
2014-08-22 19:28:05 +02:00
nmlgc fbb78b9dd0 Replace the compatibility NOPs with a macro 2014-08-22 18:03:40 +02:00
nmlgc 4e9ad18af1 Move common directives and includes to a separate include file
Note that .386 needs to come before .MODEL, and is therefore not included in
ReC98.inc. Causes, um, weird label errors otherwise.
2014-08-22 18:01:06 +02:00