Commit Graph

355 Commits

Author SHA1 Message Date
nmlgc e551d590bd [JWasm move] Fix the interrupt vector declarations in c0[data].asm
The leniency! It hurts!
2014-11-19 07:26:12 +01:00
nmlgc af1ce6cad8 [JWasm move] Specify struct names where necessary
It may look redundant and it surely bloats the code, but well, registers don't
have types, so it really *is* good coding style to do this everywhere.
2014-11-19 07:15:10 +01:00
nmlgc b4361e8487 [Reduction] #700-704: pfopen
... and then I end up copying modified versions into the individual game
subdirectories after all, because the changes between games were simply too
drastic. (That's also why I'm counting pfopen() itself twice.)

Only one slice left now, and then we're done with reduction!
2014-11-17 04:54:40 +01:00
nmlgc 62d4593842 [Reduction] #697-699: Packfile interrupt hooking 2014-11-16 04:08:46 +01:00
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 af5419e350 Fix the directory of the fperror() slices
(Damn, the other commit prepared for today is not getting done, why does IDA
have to be so terrible...!)

Anyway, here's a small consistency edit instead.
2014-11-11 23:42:56 +01:00
nmlgc 87a682dd4f [Reduction] #695-696: User entry points for read() and write()
That's it, segment 0 cleared out in all executables of TH01! Only missing that
last floating-point slice now...
2014-11-10 22:20:59 +01:00
nmlgc 7705bea1f9 [Reduction] #694: scanf 2014-11-10 21:42:09 +01:00
nmlgc 4c30e5e974 [Reduction] #693: scanner 2014-11-10 21:04:32 +01:00
nmlgc 8386db1cb9 [Reduction] #692: coreleft 2014-11-10 19:58:08 +01:00
nmlgc 6ab63bc2ab [Reduction] #691: farcoreleft 2014-11-10 19:19:33 +01:00
nmlgc dfc9361b33 [Reduction] #690: farcalloc 2014-11-10 19:11:34 +01:00
nmlgc 1681595338 [Reduction] #689: Long pointer+scalar addition
This file has been lying around there for almost three months now, because I
initially couldn't describe its functionality...
2014-11-10 19:10:46 +01:00
nmlgc f7cb71193b [Reduction] #686-688: scantod 2014-11-10 01:02:11 +01:00
nmlgc 84180b9cd9 [Reduction] #685: ldtrunc 2014-11-09 14:49:18 +01:00
nmlgc 03139534f7 [Reduction] #684: control87 2014-11-09 13:18:19 +01:00
nmlgc 13b10ef589 [Reduction] #683: access (the one that *actually* has no underscore) 2014-11-09 11:58:33 +01:00
nmlgc 986590f321 [Reduction] #682: ftol
And surprisingly, TH01's OP.EXE ends up as the first game executable that has
its seg000 cleared out.
2014-11-09 01:11:04 +01:00
nmlgc 408fe19952 [Reduction] #681: ungetc 2014-11-08 11:45:33 +01:00
nmlgc cab8db3ce2 [JWasm move] "addr" is a reserved word 2014-11-07 12:38:54 +01:00
nmlgc 52209cbcdf [JWasm move] Add symbol names to the ENDP and ENDS directives where necessary 2014-11-06 06:45:35 +01:00
nmlgc 4dc9b9ab4a [JWasm move] Don't use the DIST/CALLMODEL constants for procedures and labels
Once you've actually found the right syntax that makes the assembler just use
the default call type of the current memory model for both procedures (where
it's just "PROC" without anything else) and labels (where it's "LABEL PROC"),
these constants become completely unneccessary, even with TASM.
2014-11-05 18:20:02 +01:00
nmlgc 00bacc7af3 [Reduction] #673-680: BERO's Pi loader library
> randomly google "PC-98 ライブラリ"
> 3rd hit: http://www.vector.co.jp/soft/dos/prog/se037608.html
> Oh look, it's the mystery code at the beginning of the TH01 executables!

This library also has dedicated support for transparency, which is used in the
Konngara fight (BOSS8_D*.GRP) and which we couldn't edit during the
development of the static English patches.
But of course, ZUN just had to change the format magic in order to make it
seem unique.
2014-11-04 18:42:43 +01:00
nmlgc 0b34460155 [Reduction] #670-672: e087_Trap
I guess this marks the final demystification of how segment declarations work
and how they are compiled. However, it only really makes sense for anything
outside the TEXT segment, like these floating-point functions. As long as the
slices aren't immediately next to each other, it would still be annoying to
have segment declarations inside of them, since we'd have to copy-paste these
declarations around every INCLUDE directive...
2014-11-02 20:11:20 +01:00
nmlgc 3a1c2fd679 Move the stack segment into its own slice
Saves 141 lines, and we'll need to ASSUME it in the upcoming floating-point
slices.
2014-11-02 19:44:02 +01:00
nmlgc a777ad2ad1 [Reduction] #668-669: pow10 2014-11-02 16:41:47 +01:00
nmlgc 0856fab827 [Reduction] #576-667: emu086.asm 2014-11-02 11:20:05 +01:00
nmlgc 7790ecdb7c [Reduction] #574-575: vprinter
And that would be the final function of the printf() family!
2014-11-02 09:01:46 +01:00
nmlgc 6d422052ca [Reduction] #570-573: realcvt 2014-11-02 08:27:17 +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 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 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