Commit Graph

579 Commits

Author SHA1 Message Date
nmlgc bbd8ff96ab [Reduction] #563-568: Floating-point emulator initialization
Finally - and there was indeed no way around switching to JWlink, as ALINK
v1.6 refuses to link the TH01 executables with a nondescript "Undefined base
seg" message once nec_fpinit.asm is included.
2014-11-01 17:09:13 +01:00
nmlgc ae6c844b25 Ensure the correct amount of padding between the TEXTC and DSEG segments
Since DSEG is *supposed* to be aligned to a paragraph boundary, this should
have never mattered. However, JWlink seems to not obey this segment alignment
in some layer of the linking process.
This now guarantees identical builds with TLINK, ALINK and JWlink.
2014-11-01 09:54:57 +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 696d7f9476 Identify the missing BSS slice of xxv.cpp
sigdata.c doesn't specify any alignment, so this is the only position that
makes sense.
2014-10-29 05:41:43 +01:00
nmlgc 935e68f35e [Reduction] #560: puts 2014-10-29 05:34:30 +01:00
nmlgc 2d62776e02 [Reduction] #559: printf 2014-10-28 03:01:42 +01:00
nmlgc c4aee8a236 [Reduction] #556-558: open 2014-10-27 02:50:32 +01:00
nmlgc ebd20ebc88 [Reduction] #554-555: __rtl_open/__open
Same situation as with __rtl_close/__close, __rtl_read/__read and
__rtl_write/__write.
2014-10-26 02:16:29 +02:00
nmlgc d7d9758fac [Reduction] #553: C++ vector_new 2014-10-25 02:53:27 +02:00
nmlgc 2c2977aa69 [Reduction] #552: Far new[] operator 2014-10-24 03:00:29 +02:00
nmlgc 0b6a824296 [Reduction] #551: Far new operator 2014-10-23 02:01:06 +02:00
nmlgc 4c12d226a4 [Reduction] #550: lrotr 2014-10-22 13:45:02 +02:00
nmlgc c9ee6b0aef [Reduction] #549: lrotl 2014-10-21 03:46:42 +02:00
nmlgc 340c8a792a General cleanup
Mostly moving spurious null bytes, which are actually supposed to denote
alignment, into their associated slices, but also prettying up some of the
very first slices.
2014-10-20 17:20:04 +02:00
nmlgc 1c72d7e242 [Reduction] #548: Floating-point emulation data
Well, we have to start reducing this mess somewhere. The actual reduced
initialization code I've been preparing still fails to compile, and the data
is shared with a number of other components anyway, so...
2014-10-19 23:37:46 +02:00
nmlgc 191fd5b76b [Reduction] #543-547: fgetc and friends 2014-10-18 02:20:40 +02:00
nmlgc 489ecc8a96 [Reduction] #542: fprintf 2014-10-17 18:26:56 +02:00
nmlgc 54968ed7a3 [Reduction] #541: Fake floating point conversion 2014-10-16 07:29:53 +02:00
nmlgc 16b4e1d240 [Reduction] #540: close
Now with DOS error codes.
2014-10-15 08:39:22 +02:00
nmlgc d6449b27cf [Reduction] #537-539: sprintf 2014-10-14 04:00:44 +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 658ed9e72b Move "Abnormal program termination" to its own slice
That was the very first function reduced, before I came up with the data slice
model in 59688e23fc.
2014-10-12 18:37:58 +02:00
nmlgc afdd1c06e0 [Reduction] #532: fmode
Yup, finally adding the opening flags as well.
2014-10-11 23:56:44 +02:00
nmlgc 365763c459 [Reduction] #531: conio_type_init
Yup, platform detection by checking whether the date returned by the IBM real-
time clock interrupt is in the 20th or 21st century.
2014-10-10 21:20:22 +02:00
nmlgc 47a6be4db2 [Reduction] #530: delay 2014-10-09 03:51:01 +02:00
nmlgc 9003aea36b [Reduction] #527-529: nec_delay 2014-10-08 04:19:18 +02:00
nmlgc 4625339af1 Identify all remaining nopcalls 2014-10-07 06:32:20 +02:00
nmlgc 26e795f0bc [Reduction] #526: ibm_delay
There's also the PC-98-specific nec_delay. Which means that the inclusion of
this function into the games was *ding* entirely pointless.

Man, compilers sucked in the early 90s.
2014-10-06 03:18:36 +02:00
nmlgc 6fb80fba79 [Reduction] #525: conio_type 2014-10-05 02:11:00 +02:00
nmlgc 8b4a461283 [Reduction] #523-524: __rtl_close/__close
Same situation as with __rtl_read/__read and __rtl_write/__write.
2014-10-04 02:59:04 +02:00
nmlgc 05702534bc [Reduction] #521-522: setargv 2014-10-03 18:03:36 +02:00
nmlgc ef57ff6ae8 [Reduction] #519-520: intdos 2014-10-02 17:54:48 +02:00
nmlgc 399e6e3098 [Reduction] #517-518: int86 2014-10-01 16:04:50 +02:00
nmlgc 96c4a77d66 [Reduction] #516: xclose 2014-09-30 20:13:56 +02:00
nmlgc bf364ebfae [Reduction] #515: eof 2014-09-29 07:09:38 +02:00
nmlgc 8a2061bcab [Reduction] #513-514: atol and atoi 2014-09-28 05:05:32 +02:00
nmlgc 8cc3df1eb1 [Reduction] #512: xfclose 2014-09-27 22:51:10 +02:00
nmlgc 86b99b9265 [Reduction] #511: segread 2014-09-26 23:15:24 +02:00
nmlgc bbf47ec102 [Reduction] #509-510: mkname and tmpnam 2014-09-24 23:21:48 +02:00
nmlgc eace57b1a2 Wrap all code segments into their own group
Necessary to keep the original segment ordering with ALINK, our new linker.
2014-09-22 22:19:29 +02:00
nmlgc 5aad47cb08 [Reduction] #508: fclose 2014-09-21 13:37:38 +02:00
nmlgc 8ae2349005 [Reduction] #507: filelength 2014-09-20 12:41:18 +02:00
nmlgc 624119866b [Reduction] #505-506: LONGTOA and UTOA 2014-09-19 19:22:51 +02:00
nmlgc 00e2dcb519 Remove comments containing garbage characters
... as well as other useless comments that were in close proximity to those.
Now, all files should be valid Shift-JIS.
2014-09-18 20:41:06 +02:00
nmlgc 1e991fbec0 Remove automatically generated line breaks in string constants
Especially annoying if that happens in the middle of a Shift-JIS multi-byte
sequence, like in those two instances in TH02's OP.EXE. Also, making up for
the lack of string analysis during the dumping process of TH05's MAIN.EXE.
2014-09-17 06:24:22 +02:00
nmlgc 274b37eed7 [Reduction] #504: master.lib version string
Fulfilling the original licensing conditions... I think.
2014-09-16 04:11:09 +02:00
nmlgc 86b86a96b8 [Reduction] #503: graph_gaiji_puts 2014-09-15 03:03:52 +02:00
nmlgc a4a5bc9df9 [Reduction] #502: graph_gaiji_putc
Introducing MASTERMOD v3. How long until a GAME_NUMBER macro? (Answer: Once we
find ZUN code that slightly changed between games.)
2014-09-14 17:39:30 +02:00
nmlgc 69f85fa2de Identify and reduce gaiji strings across all executables 2014-09-13 12:26:33 +02:00