Commit Graph

10 Commits

Author SHA1 Message Date
nmlgc 152ecaa496 [Separate translation units] [th05] Music Room piano (undecompilable functions)
Reasons:
• piano_fm_part_put_raw(): SI register referenced and not saved on
  the stack
• piano_current_note_from(): Would be decompilable… into a mess.
  Not worth adding a separate translation unit just for it.
• piano_part_keys_put_raw(): DI register saved before the SI register
• piano_pressed_key_put(): DI register referenced and not immediately
  saved on the stack
• piano_label_put_raw(): SI and DI registered referenced and not saved
  on the stack
• grcg_setcolor_direct_seg1_raw(): Let's procrastinate this one until
  we have to reference all of these instances in C land.

And we could have even emitted that PIANO_KEY_PRESSED_TOP pixel data
into the code segment, by using `#pragma option -z` to give identical
names to both the code and the data segment. At least we can decompile
the first two functions here.

Part of P0135, funded by [Anonymous].
2021-03-19 23:23:06 +01:00
nmlgc d25daf7075 [Maintenance] Move the number of VRAM planes to pc98.h
Allowing us to consistently mirror the declaration in pc98.inc
without adding a planar.inc file. 😛 And points us to two more
dots8_t* arrays that should have used the Planar<> template.

Part of P0135, funded by [Anonymous].
2021-03-19 19:29:17 +01:00
nmlgc f158e393e8 [Maintenance] Mirror recent pc98.h and master.hpp declarations in ASM land
Part of P0134, funded by [Anonymous].
2021-02-20 23:49:58 +01:00
nmlgc 97ce07bfc9 [Reverse-engineering] [th03] CDG: VRAM plane iteration
Which is where ZUN adds those additional 0x2000 to make the jump from
the 0xB800 plane to the 0xE000 plane.

Part of P0114, funded by Lmocinemod.
2020-09-07 21:18:38 +02:00
nmlgc 0f3359e1b3 [Maintenance] Use @@locals for self-modifying code in bfnt_entry_pat()
Which finally allows us to use the PLANE_SIZE macro in ASM land. Yeah,
(ROW_SIZE * RES_Y) has finally got old.

Part of P0073, funded by [Anonymous] and -Tom-.
2020-02-16 21:35:16 +01:00
nmlgc 4340b5d6ae [Maintenance] [th01/th02] Split graph_putsa_fx() into its shared parts
I did consider not doing this, because "well, can't anyone who's
*actually* interested just diff the TH01 and TH02 implementations to
figure out the differences themselves", but that duplication ended up
feeling too filthy after all.

And hey, it's a nice excuse to update TH02's version to current naming
standards! 😛

Part of P0068, funded by Yanga.
2020-01-14 22:03:00 +01:00
nmlgc 0e19e52572 [Maintenance] Templatize RGB and palette types for 4- and 8-bit components
Right, PC-98 hardware only supports 4 bits per RGB component, for a
total of 4,096 possible colors. The 8-bit RGB color values we've been
seeing throughout the later games are a master.lib extension, to allow
for more toning precision. Which TH01, with all its NIH syndrome,
doesn't use.

And yup, that means templates in the most basic header files… Since
that would have meant renaming *everything* to compile as C++, I simply
made these types exclusive to C++ code, thcrap style.

Part of P0066, funded by Keyblade Wiedling Neko and Splashman.
2020-01-05 19:06:32 +01:00
nmlgc 80cec5b231 [Reverse-engineering] [th03] 1P/2P selection gaiji cursor
Part of P0064, funded by Touhou Patch Center.
2019-12-29 20:59:34 +01:00
wintiger0222 0b084b83c3 [Reverse-engineering] [th04/th05] graph_putsa_fx 2019-12-17 23:26:54 +01:00
nmlgc 8b01c60f44 [Maintenance] Move PC-98 hardware constants to a separate include file
SPRITE16 would also like to refer to those later.

Part of P0061, funded by Touhou Patch Center.
2019-12-05 21:38:39 +01:00