ReC98/th01
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
..
hardware [Decompilation] [th01] master.lib resident palette function reimplementations 2020-01-05 20:23:27 +01:00
fuuin_05.c [C decompilation] [th01] VSync interrupt handler 2015-09-05 22:33:07 +02:00
fuuin_06.c [C decompilation] [th01] Text mode functions 2015-03-11 23:29:58 +01:00
fuuin_08.cpp [Decompilation] [th01] master.lib resident palette function reimplementations 2020-01-05 20:23:27 +01:00
fuuin_11.c [Maintenance] Fix any whitespace issues in our own code 2015-09-07 15:44:48 +02:00
fuuin_12.c [C decompilation] [th01/fuuin] Slow 2x VRAM region scaling 2015-03-09 17:58:30 +01:00
fuuin_13.c [Maintenance] Fix #include syntax for mdrv2.c 2019-11-24 12:45:08 +01:00
grps2xsc.c [Decompilation] Add separate types for 1bpp planar pixel lines 2019-12-17 23:26:59 +01:00
main_02.c [Decompilation] [th01] frame_delay 2019-11-18 21:29:43 +01:00
main_03.c [C decompilation] [th01] VSync interrupt handler 2015-09-05 22:33:07 +02:00
main_04.c [C decompilation] [th01] VSync interrupt handler 2015-09-05 22:33:07 +02:00
main_06.cpp [Decompilation] [th01] master.lib resident palette function reimplementations 2020-01-05 20:23:27 +01:00
main_12.c [C decompilation] [th01/op] [th01/reiiden] Random resident structure stuff 2015-03-07 17:43:39 +01:00
main_13.c [C decompilation] [th01/reiiden] Randomly shaped VRAM copy functions, #1 2015-03-10 17:39:00 +01:00
main_14.c [C decompilation] [th01/reiiden] 2D vector construction 2015-03-13 23:03:39 +01:00
main_16.c [Maintenance] Fix #include syntax for mdrv2.c 2019-11-24 12:45:08 +01:00
mdrv2.c [Decompilation] Add a separate segment type 2019-12-17 23:26:59 +01:00
mdrv2[data].asm [Decompilation] [th01] mdrv2_resident 2019-11-04 22:14:10 +01:00
op_02.c [Decompilation] [th01] frame_delay 2019-11-18 21:29:43 +01:00
op_03.c [C decompilation] [th01] VSync interrupt handler 2015-09-05 22:33:07 +02:00
op_04.c [C decompilation] [th01] Text mode functions 2015-03-11 23:29:58 +01:00
op_06.cpp [Decompilation] [th01] master.lib resident palette function reimplementations 2020-01-05 20:23:27 +01:00
op_10.c [C decompilation] [th01/op] [th01/reiiden] Random resident structure stuff 2015-03-07 17:43:39 +01:00
op_11.c [Maintenance] Fix #include syntax for mdrv2.c 2019-11-24 12:45:08 +01:00
op_12.cpp [C decompilation] [th01/op] Archive functions 2015-03-05 23:12:14 +01:00
pf.asm [C decompilation] [th01/op] Archive functions 2015-03-05 23:12:14 +01:00
pf.cpp [Decompilation] Finally declare <stdint.h> types 2019-12-17 23:26:58 +01:00
pf[bss].asm [C decompilation] [th01/op] Archive functions 2015-03-05 23:12:14 +01:00
pf[data].asm [C decompilation] [th01/op] Archive functions 2015-03-05 23:12:14 +01:00
player_is_hit[bss].asm [Reverse-engineering] [th01/th02/th04/th05] Player hit flag 2018-12-15 22:57:36 +01:00
ranks.h [Reverse-engineering] [th04/th05] Resident structure 2020-01-03 21:43:43 +01:00
resstuff.c [Maintenance] Use the same resident structure pointer name for every game 2020-01-03 21:26:10 +01:00
th01.h [Reverse-engineering] [th01] grcg_setcolor() C reimplementations 2019-12-17 23:26:57 +01:00
th01.inc [Reverse-engineering] [th01/th02/th04/th05] Player invincibility frames 2019-09-24 21:57:53 +02:00
ztext.c [Decompilation] Finally declare <stdint.h> types 2019-12-17 23:26:58 +01:00
ztext[data].asm [C decompilation] [th01] Text mode functions 2015-03-11 23:29:58 +01:00
zunsoft.c [C decompilation] [th01/reiiden] 2D vector construction 2015-03-13 23:03:39 +01:00