ReC98/Research
nmlgc e55a48b700 [Decompilation] [th01] master.lib resident palette function reimplementations
Which store colors as GRB, as suggested by the structure's ID string.
Even master.lib's own functions add an additional XCHG AH, AL
instruction to get colors into and out of this format. MASTER.MAN
suggests that it's some sort of standard on PC-98. It does match the
order of ths hardware's palette register ports, after all.
(0AAh = green, 0ACh = red, 0AEh = blue)

Now we also know why __seg* wasn't used more commonly, as lamented in
c8e8e98. Turbo C++ simply doesn't support a lot of arithmetic on
segment pointers.

And then that undecompilable far call to a function within the same
segment, but inside a different translation unit…
Also, thanks again to Egor for the SCOPY@ hack that debuted in 0460072.
Would have probably struggled with this a lot more without that.

And *then* you realize that TH01 effectively doesn't even use the
resident palette. 😐

And yes, we're procrastinating the whole issue of potentially using
a single translation unit for all three binaries by using a common
segment name, because it *really* isn't that easy.

Completes P0066, funded by Keyblade Wiedling Neko and Splashman.
2020-01-05 20:23:27 +01:00
..
Borland C++ decompilation.md [Decompilation] [th01] master.lib resident palette function reimplementations 2020-01-05 20:23:27 +01:00
HOLDKEY.C [Research] Find out why ≥TH03 checks input twice per frame, with a 0.6ms delay 2018-09-13 18:32:24 +02:00
Makefile.mak [Research] Find out why ≥TH03 checks input twice per frame, with a 0.6ms delay 2018-09-13 18:32:24 +02:00
README.md [Research] Find out why ≥TH03 checks input twice per frame, with a 0.6ms delay 2018-09-13 18:32:24 +02:00

README.md

This directory collects various pieces of research into PC-98 hardware details that were made during the reverse-engineering phase, in order for us to better understand certain details and name functions/data more adequately.

Run maker to build the examples. The executables will be directly placed into this directory.