Commit Graph

293 Commits

Author SHA1 Message Date
wintiger0222 cb45bf5a80 [Reverse-engineering] [th04/th05] EGC-powered page 1→0 region copies 2019-12-17 23:26:58 +01:00
wintiger0222 c0705c395c [Naming] [th03/th04/th05] Music Room functions changed from TH02 2019-12-17 23:26:57 +01:00
wintiger0222 d7906ef78e [Reverse-engineering] [th04/th05] ZUN Soft logo 2019-12-17 23:26:57 +01:00
nmlgc c6ab779897 [Maintenance] [th04/th05] Correctly declare the ZUN Soft explosion functions 2019-12-17 23:26:57 +01:00
wintiger0222 38e8fd6a8d [Reverse-engineering] [th04/th05] Music Room / ending background image buffers
"bgimage" really was the best name I could come up with here, given
what it's used for. Everything else sounded way too ambiguous. Even
something like "mempage", in the meaning of "a third memory-backed
graphics page"… --Nmlgc
2019-12-17 23:26:56 +01:00
wintiger0222 1317273aa0 [Reduction] [th03/th04/th05] Music Room code identical to TH02 2019-12-17 23:26:56 +01:00
wintiger0222 680af1afd9 [Position independence] [th03/th04/th05] Music Room file names and titles 2019-12-17 23:26:56 +01:00
wintiger0222 2a722db215 [Reverse-engineering] [th05] Music Room piano functions
No need to declare most of these in C land if 1) it isn't even clear
yet whether we can even decompile these functions with their 2)
complex __usercall conventions, which 3) aren't even called from
outside this slice. --Nmlgc
2019-12-17 23:26:56 +01:00
wintiger0222 53f316792f [Reverse-engineering] [th05] Music Room piano sprite data 2019-12-17 23:26:56 +01:00
wintiger0222 b25ec3d138 [Reverse-engineering] [th05] PMD work area and piano note data
Good job identifying what is bascially the QQ structure from PMDWin!
--Nmlgc
2019-12-17 23:26:55 +01:00
wintiger0222 2b617dfa75 [Reverse-engineering] [th05] Music Room piano coordinates 2019-12-17 23:26:55 +01:00
wintiger0222 b74b7f9bce [Reverse-engineering] [th05] Music Room piano label font 2019-12-17 23:26:55 +01:00
wintiger0222 0b084b83c3 [Reverse-engineering] [th04/th05] graph_putsa_fx 2019-12-17 23:26:54 +01:00
wintiger0222 75f05c8b90 [Reverse-engineering] [th04/th05] graph_putsa_fx tables 2019-12-17 23:26:54 +01:00
wintiger0222 6e09a2c15f [Naming] [th04/th05] graph_putsa_fx 2019-12-17 22:44:30 +01:00
wintiger0222 811ba84e3f [Reverse-engineering] [th03/th04/th05] snd_delay_until_measure 2019-12-17 22:44:27 +01:00
wintiger0222 e8c9876bef [Reverse-engineering] [th05] Current BGM measure
Split off from the delay function in this game, since the ending syncs
a bunch of things independent from any frame delays. -Nmlgc
2019-12-17 22:44:23 +01:00
nmlgc a23dab3154 [Reverse-engineering] MMD ticks-per-quarter-note constant
And then, ZUN hardcodes all measure-related functions to 4/4…
2019-12-17 22:40:05 +01:00
nmlgc 30e6b7c3db [Maintenance] Correctly declare all input functions
The pascal calling convention for TH03's input mode functions actually
sort of matters, since we have this nice function pointer type that
expects pascal.
2019-11-30 19:34:55 +01:00
nmlgc a6a805f008 [ZUN symbols] key_det / shiftkey
Not applying this leak to TH03 since it would have more than one
`key_det` variable, resulting in names that are as much fanfiction as
the current ones…
2019-11-30 19:32:10 +01:00
nmlgc 5bffab4f43 [Position independence] [th04/th05] Remaining references to PI slots
Part of P0060, funded by Touhou Patch Center.
2019-11-28 23:23:30 +01:00
nmlgc 619203a1c9 [Position independence] [th02/th03/th04/th05] Color palettes
Part of P0060, funded by Touhou Patch Center.
2019-11-28 23:23:29 +01:00
wintiger0222 09edcab744 [Reduction] [th03/th04/th05] game_init_op 2019-11-24 14:04:36 +01:00
nmlgc 71c737c4ee [Maintenance] Move DOS memory assignment sizes to separate files
Ideally, these could be calculated from some other game-specific
parameters? Anyone else who wants to look into this?
2019-11-24 14:04:36 +01:00
nmlgc 3f25caa5df [Reverse-engineering] [th02/th03/th04/th05] DOS memory assignment sizes
Changing the variable suffix to _paras rather than _siz here, since
master.lib uses the latter for byte sizes, while these are paragraphs.
2019-11-24 14:04:34 +01:00
wintiger0222 0009c3c161 [Reduction] [th03/th04/th05] game_exit_to_dos 2019-11-24 12:45:25 +01:00
wintiger0222 34b7b61964 [Reduction] [th03/th04/th05] game_exit 2019-11-24 12:45:17 +01:00
nmlgc 6c4852f789 [Position independence] False positives in master.lib GRCG function calls
Yup, function parameters that can clearly be identified as coordinates
are by far the fastest way to raise the calculated position
independence percentage. Kinda makes it sound like useless work, which
I'm only doing because it's dictated by some counting algorithm on a
website, but decompilation will want to un-hex all of these values
anyway. We're merely doing that right now, across all games.

Part of P0058, funded by -Tom-.
2019-11-14 00:51:48 +01:00
nmlgc f07089017f [Maintenance] Rename the extension of game-specific ASM includes to .inc
Rule of thumb going forward: Everything that emits data is .asm,
everything that doesn't is .inc.
(Let's hope that th01_reiiden_2.inc won't exist for that much longer!)

Part of P0032, funded by zorg.
2019-09-21 13:03:56 +02:00
nmlgc 3b7561a711 [Maintenance] Export all pascal functions with their proper uppercase names
Yup, that was one massive screw-up.

Part of P0030, funded by zorg.
2019-09-15 20:29:47 +02:00
nmlgc e10502bfe6 [Maintenance] Fix the function name format of CDG/CD2 functions
No leading underscore for functions with Pascal calling convention, but
we do have one for all variables, because it's not worth it to put
keywords in front of everything for no reason.
Seemed to have forgotten this rule in 2017?

Part of P0030, funded by zorg.
2019-09-15 20:29:40 +02:00
nmlgc c241af414f [Reverse-engineering] Current difficulty
Funded by -Tom-.
2019-03-01 23:07:42 +01:00
nmlgc 35ef90f4d1 [Reduction] Page flipping
Funded by -Tom-.
2018-12-30 00:16:18 +01:00
nmlgc 3f06c63206 [Reverse-engineering] [th03/th04/th05] Pointers to the resident structure
Quickly doing these despite not having RE'd the structures themselves
yet…

Funded by zorg.
2018-12-26 17:59:03 +01:00
nmlgc bc3c85f09a [Reverse-engineering] [th04/th05] GRCG/EGC-powered VRAM writes
Funded by zorg.
2018-12-25 23:45:24 +01:00
nmlgc 41622254a8 [Reverse-engineering] EGC register writes
Funded by zorg.
2018-12-25 23:45:24 +01:00
nmlgc d08a7f49b6 [Reduction] [th04/th05] Redefined GRCG mode/color setting functions
Funded by -Tom-.
2018-12-06 22:39:11 +01:00
nmlgc 70d1e1c230 [Reverse-engineering] [th04/th05] Inlined GRCG color setting calls
Funded by -Tom-.
2018-12-06 19:42:44 +01:00
nmlgc 83e089cba9 [Reverse-engineering] Inlined GRCG mode setting calls
Funded by -Tom-.
2018-12-06 19:18:02 +01:00
nmlgc fc8d51c7d7 [Reverse-engineering] [th04/th05] Non-color CDG display 2018-10-16 01:04:46 +02:00
nmlgc aa47bb33d9 [Reverse-engineering] [th04/th05] Non-alpha CDG display 2018-10-16 01:04:46 +02:00
nmlgc bfef793805 [Reverse-engineering] [th04/th05] Normal CDG display
In which the th05 difference is the lack of self-modifying code.
2018-10-16 01:04:46 +02:00
nmlgc 286c6431d8 [Reverse-engineering] [th04/th05] CDG loading 2018-10-16 01:04:46 +02:00
nmlgc 79cc3ed71c [Reverse-engineering] [th03/th04/th05] Input change delay function
With TH05 definitely being the Galaxy Brain version of this function.
You'll see once I get to push the C decompilation for that one…

Anyway, that covers all shared input functions of TH02-TH05!

Funded by zorg.
2018-09-17 22:10:42 +02:00
nmlgc c592464121 [Reverse-engineering] [th03/th04/th05] Basic keyboard input functions
Funded by zorg.
2018-09-11 19:34:19 +02:00
wintiger0222 2f00af8756 [Reverse-engineering] [th05] Rename some labels
Comparing with uth05win, I renamed some
label so that easy to see.
I should not test whether there is grammer error.
So if you find some grammer error, please notice me.
2018-09-02 16:34:01 +02:00
nmlgc a4308d6c09 [Reduction] #712: js_sense
In which ZUN actively refuses help from master.lib and rips out
everything that isn't immediately related to reading the one joystick
port of the PC-9801-86 sound board.

Maybe there actually was a good reason for that?

Funded by -Tom-.
2018-04-15 23:51:49 +02:00
nmlgc 6c35094bea [Reduction] #711: master.lib joystick globals
Funded by -Tom-.
2018-04-15 23:51:49 +02:00
nmlgc 371fa21610 [Reduction] #710: js_start
Might be interesting to research why ZUN explicitly removed support for
the SAJ-98 there.

Funded by -Tom-.
2018-04-15 23:51:49 +02:00
nmlgc 843905ecea [Reverse-engineering] [th04/th05] ZUN Soft logo explosions
Which seemed a nicer and more debuggable intro to how ZUN implements
sprites than starting with a random structure from MAIN.EXE.

Funded by -Tom-.
2018-03-21 23:20:04 +01:00