Commit Graph

78 Commits

Author SHA1 Message Date
nmlgc f303222ffc Replace MASTERMOD with a per-game constant
Yup, packfiles finally proved that we really have a different set of changes
to master.lib in every game. Also, there are bound to be more of these game-
specific small changes to otherwise identical code in ZUN's own code.

And hey, no need to define that value in the build scripts anymore.

(I've also considered just copying modified versions into the individual game
subdirectories, but it's not too nice to expect people to diff them in order
to actually understand why these copies exist and where the changes actually
are.)
2014-11-15 02:03:41 +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 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 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 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 274b37eed7 [Reduction] #504: master.lib version string
Fulfilling the original licensing conditions... I think.
2014-09-16 04:11:09 +02:00
nmlgc 80fc5c6d82 [Reduction] #496: mem_unassign
Which challenges a lot about what we thought to know about Amusement Makers'
modifications to master.lib, due to the fact that TH02 contains the modified
version of this function, but the original of draw_trapezoid...

And I haven't even begun to research how this removal of conditional branches
could have a positive effect on the game, especially since it's only called
before exiting anyway.
2014-09-08 20:47:09 +02:00
nmlgc 9e405575ea [Reduction] #474-475: super_wave_put 2014-09-07 01:56:57 +02:00
nmlgc 01a126da71 [Reduction] #449: setvbuf 2014-09-03 14:02:14 +02:00
nmlgc 9d5aa934d4 [Reduction] #445: flushall 2014-09-02 21:44:35 +02:00
nmlgc 429f134a51 [Reduction] #442-444: fseek and ftell 2014-09-02 21:04:29 +02:00
nmlgc 1546628658 [Reduction] #399: grc_setclip 2014-08-31 08:36:33 +02:00
nmlgc b108d5d46f [Reduction] #372: IRand 2014-08-30 12:13:04 +02:00
nmlgc 614caf64eb [Reduction] #370: key_sense 2014-08-30 09:56:49 +02:00
nmlgc 6ebf0877f7 [Reduction] #257: xfflush 2014-08-28 21:54:04 +02:00
nmlgc 0c8e9d8550 [Reduction] #252: 16-bit sine and cosine table
Nice! It's not used by master.lib itself, but ZUN makes good use of these
tables to avoid having to rely on floating-point functions.
2014-08-28 07:54:38 +02:00
nmlgc a65a9c07c3 [Reduction] #251: Sine table for super_wave_put() and super_vibra_put() 2014-08-28 07:17:42 +02:00
nmlgc 2d8f579e14 [Reduction] #249-250: super_put_8 2014-08-28 06:34:30 +02:00
nmlgc 7efab8b20f [Reduction] #248: grcg_circlefill 2014-08-28 06:02:11 +02:00
nmlgc 366ba7a85f [Reduction] #247: grcg_pset 2014-08-28 05:48:32 +02:00
nmlgc 2cf62174c0 [Reduction] #232: graph_start 2014-08-28 01:16:54 +02:00
nmlgc c1dac953a5 [Reduction] #231: graph_hide 2014-08-28 01:05:11 +02:00
nmlgc 9b3e42a150 [Reduction] #230: graph_400line 2014-08-28 00:58:40 +02:00
nmlgc 0dad2dffc8 [Reduction] #228: grcg_hline 2014-08-28 00:17:57 +02:00
nmlgc 523da7f7b9 [Reduction] #227: Edge pattern table 2014-08-28 00:05:06 +02:00
nmlgc b6872319c4 [Reduction] #226: grcg_byteboxfill_x 2014-08-28 00:04:27 +02:00
nmlgc 877fbd8bd6 [Reduction] #225: Clipping variables for drawing
Well, great. Why did the trapezoid variables have to be included in this
object file? 10 of the executables don't use them, and there's no way to
locate that one needle in the haystack of uninitialized data now.
2014-08-28 00:04:26 +02:00
nmlgc 4f075e1718 [Reduction] #217-218: grcg_setcolor and grcg_off 2014-08-27 07:05:16 +02:00
nmlgc a28cd273c4 [Reduction] #214: graph_clear 2014-08-27 06:03:08 +02:00
nmlgc 199138182a [Reduction] #213: Graphic VRAM-related global data
Nothing in the BSS segment for once! Yay.
2014-08-27 05:45:01 +02:00
nmlgc 967a8e3aa5 [Reduction] #212: graph_show
ReC98, where a function consisting of 3 instructions still saves over 150
lines.
2014-08-27 05:19:11 +02:00
nmlgc 4a36dd15de [Reduction] #159: super_entry_bfnt
[Binary change] Order of 5 relocations in TH05's MAIN.EXE.
2014-08-23 18:09:23 +02:00
nmlgc 3de251fb60 Identify 4 functions accidentally missed in TH01's ZUNSOFT.COM
Wow. I just had to miss smem_release() once to find myself with a total of 4
missed functions (+ smem_wget(), bfnt_entry_pat() and
bfnt_extend_header_analysis()) a day later. Blasted tiny model.
2014-08-23 17:30:00 +02:00
nmlgc 656f993e8d [Reduction] #158: bfnt_palette_set 2014-08-23 16:56:01 +02:00
nmlgc 6e6293be79 [Reduction] #157: palette_init 2014-08-23 16:18:30 +02:00
nmlgc e76a9948b8 [Reduction] #156: palette_show 2014-08-23 16:11:16 +02:00
nmlgc 61ccf52f3e [Reduction] #155: Palette data 2014-08-23 15:47:05 +02:00
nmlgc 138fcd2fce [Reduction] #153-154: Key beep control 2014-08-23 14:01:53 +02:00
nmlgc 7046c47d28 [Reduction] #149: bfnt_header_read 2014-08-23 12:08:48 +02:00
nmlgc ba3e077fc8 [Reduction] #140: dos_close 2014-08-23 00:48:48 +02:00
nmlgc 2e2151b592 [Reduction] #139: super_entry_pat
Heh, all the references to this function are still expressed in db opcode
form, because IDA couldn't process the self-modifying code in
bfnt_entry_pat(). That's almost practical in our case!
2014-08-23 00:28:05 +02:00
nmlgc 4e6ef3bd8d [Reduction] #138: super_entry_at 2014-08-22 23:56:33 +02:00
nmlgc 857c443b57 [Reduction] #137: super_free
... yeah, TH02's MAINE.EXE indeed seems to not free its superimposed data.
In case it even allocates any.

[Binary change] db 0 → nop in ZUNSOFT.COM.
2014-08-22 23:45:21 +02:00
nmlgc 22112eab6a [Reduction] #136: super_cancel_pat 2014-08-22 23:33:18 +02:00
nmlgc 587f109e6a [Reduction] #135: Superimposed pattern data
... It really shows that I forgot to compress the "db 0" statements in
2bd664c5e4.
2014-08-22 22:31:44 +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 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
nmlgc 2d1dc1589c [Reduction] #128-129: __rtl_write and __write
Underscores and wrappers, hooray.
__write is not included in the widely available version of WRITEA.CAS, but
it's still part of the same object file.
2014-08-22 02:55:11 +02:00
nmlgc 216413d8a6 [Reduction] #127: lseek
Yup, gotta move all the "handle" definitions away first.
2014-08-22 01:55:05 +02:00