ReC98/th01/hardware
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
..
color.asm [Reverse-engineering] [th01] Basic hardware palette functions 2020-01-05 19:08:31 +01:00
egc.inc [Reduction] EGC-powered VRAM region copies 2018-12-29 17:03:26 +01:00
egccopyr.c [Decompilation] Add separate types for 1bpp planar pixel lines 2019-12-17 23:26:59 +01:00
frmdely.c [Decompilation] [th01] frame_delay 2019-11-18 21:29:43 +01:00
graph_page.asm [Reduction] Page flipping 2018-12-30 00:16:18 +01:00
palette.hpp [Decompilation] [th01] master.lib resident palette function reimplementations 2020-01-05 20:23:27 +01:00
palette[data].asm [Reverse-engineering] [th01] Main color palette 2020-01-05 19:07:48 +01:00
palette_black.asm [Reverse-engineering] [th01] Basic hardware palette functions 2020-01-05 19:08:31 +01:00
palette_set_show.asm [Reverse-engineering] [th01] Basic hardware palette functions 2020-01-05 19:08:31 +01:00
palette_white.asm [Reverse-engineering] [th01] Basic hardware palette functions 2020-01-05 19:08:31 +01:00
respal.cpp [Decompilation] [th01] master.lib resident palette function reimplementations 2020-01-05 20:23:27 +01:00
respal[data].asm [Decompilation] [th01] master.lib resident palette function reimplementations 2020-01-05 20:23:27 +01:00
vplanset.c [C decompilation] [th01] VRAM region copy via EGC 2015-02-27 23:11:47 +01:00
vram_planes[bss].asm Make the VRAM plane constants available to C 2015-02-24 22:16:31 +01:00
vram_planes_set.asm [C decompilation] [th02] Code segment #2 of all three executables 2015-03-14 23:25:50 +01:00
vsync.c [C decompilation] [th01] VSync interrupt handler 2015-09-05 22:33:07 +02:00
vsync[bss].asm [C decompilation] [th01] VSync interrupt handler 2015-09-05 22:33:07 +02:00
vsync[data].asm [C decompilation] [th01] VSync interrupt handler 2015-09-05 22:33:07 +02:00
vsyncclr.c [C decompilation] [th01] VSync interrupt handler 2015-09-05 22:33:07 +02:00