Commit Graph

579 Commits

Author SHA1 Message Date
nmlgc b62a8b29a6 [Reverse-engineering] [th02/th04/th05] Boss-related function pointers
No idea what these other ones in TH02 are.

Funded by zorg.
2018-12-18 19:52:41 +01:00
nmlgc 0cde4b7cd3 [Reverse-engineering] [th05] Laser update and render functions
Funded by zorg.
2018-12-17 00:27:38 +01:00
nmlgc 8634e10b6d [Reverse-engineering] [th04/th05] Bullet clear trigger and time
Funded by zorg.
2018-12-16 01:49:55 +01:00
nmlgc 4aeb035121 [Reverse-engineering] [th04/th05] A random shared draw coordinate
Local variables are so overrated.

Funded by zorg.
2018-12-16 00:31:05 +01:00
nmlgc b3c5e4dcfe [Reverse-engineering] [th05] Rendering and hit testing for a single laser
What the hell.

Funded by zorg.
2018-12-15 23:04:26 +01:00
nmlgc 9d79c1413c [Reverse-engineering] [th05] Laser coordinate sub-structure
Yup, the draw function actually takes a sub-structure starting at 0x02.

Funded by zorg.
2018-12-15 23:04:24 +01:00
nmlgc 07e466cf3b [Reverse-engineering] [th01/th02/th04/th05] Player hit flag
Funded by zorg.
2018-12-15 22:57:36 +01:00
nmlgc e73d740926 [Reverse-engineering] [th05] Laser control functions
Funded by zorg.
2018-12-15 22:57:34 +01:00
nmlgc ac7e6bc176 [Reverse-engineering] [th05] Rank-based speed adjustment
Again, one of these functions that ZUN *probably* wrote in ASM for shits
and giggles, which you *again could* "decompile" using in-line assembly,
but that kind of defeats the point.
Oh well, at least the fact that the parameter is passed in AL means that
the calling convention must have been __fastcall, and *that* part *does*
cleanly map to C. Unlike some of the functions in d08a7f4.

Funded by zorg.
2018-12-12 21:50:44 +01:00
nmlgc 807df3d5a7 [Reverse-engineering] [th05] Laser structure
Struct strLASER in uth05win… except that the member names in that one
were not only a bit too unclear, but `ageThres` and `shootAgeThres`
should have also been the other way round.

Also, yes, TH04's laser structure seems completely different.

Funded by -Tom-.
2018-12-12 02:49:42 +01:00
nmlgc 0e8bbe8130 [Reverse-engineering] [th04/th05] Player performance ("rank") management
Going with uth05win's "player performance" here, since we already use
"rank" for Easy/Normal/Hard/Lunatic.

Funded by -Tom-.
2018-12-10 21:00:19 +01:00
nmlgc f3b6137fe2 [Reverse-engineering] [th04/th05] Midboss HP
Funded by -Tom-.
2018-12-09 01:09:17 +01:00
nmlgc 9fd3f6dbf6 [Reverse-engineering] [th04/th05] Boss position
Funded by -Tom-.
2018-12-09 00:57:42 +01:00
nmlgc 59e692a82a [Reverse-engineering] [th04/th05] Midboss position
Funded by -Tom-.
2018-12-09 00:47:52 +01:00
nmlgc 352240e6c5 [Reverse-engineering] [th04/th05] Boss animation sprite IDs
Funded by -Tom-.
2018-12-09 00:47:50 +01:00
nmlgc 36b1a02773 [Reverse-engineering] [th05] Yuki's HP
Internally, Mai is seen as the "primary" Stage 4 boss.

Funded by -Tom-.
2018-12-09 00:44:31 +01:00
nmlgc e855e1a908 [Reverse-engineering] [th04/th05] Boss phase end HP
Funded by -Tom-.
2018-12-09 00:40:20 +01:00
nmlgc 49a67a1a8b [Reverse-engineering] [th04/th05] Boss HP
Funded by -Tom-.
2018-12-09 00:20:27 +01:00
nmlgc b03bc91357 [Reverse-engineering] [th04/th05] Growing and shrinking circles
As seen during bomb animations, and around bosses. Class CCircle in
uth05win.

Funded by -Tom-.
2018-12-06 23:29:45 +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 d7483c09cc [Maintenance] Fix the TASM32 crash when assembling th03_mainl.asm
Right, the last path component in an INCLUDE file name is "limited" to 28
bytes. Turns out it only crashes on every system that *isn't* the main one I
develop on, though…
2018-12-04 19:55:18 +01:00
nmlgc 141baa4ca9 [Reverse-engineering] [th05/maine] Remaining references to CDG slot data
…unlike these two identical functions, which hopefully become clearer
after more reverse-engineering has been done around them. It's not like
they're directly related to CDG slot data anyway, they just apply the
TH05 version of the dissolution effect in the staff roll on top of the
already displayed image.

And that concludes all CDG/CD2-related code!

Funded by DTM.
2018-10-16 01:04:46 +02:00
nmlgc 01a430d027 [Reverse-engineering] [th03/mainl] CDG line removal for upwards motion
Not *really* CDG-related, but it does use CDG slot data, and is easy
enough to be covered right now…

Funded by DTM.
2018-10-16 01:04:46 +02:00
nmlgc 766a34d044 [Reverse-engineering] [th04/maine] Single-plane CDG display
Only used in the staff roll.

Funded by DTM.
2018-10-16 01:04:46 +02:00
nmlgc 4bc6da4858 [Reverse-engineering] [th03/mainl] Dissolved CDG display
Depending on two variables that… uh, aren't exactly related to this
function? Let's wait with those until we get there.

Funded by DTM.
2018-10-16 01:04:46 +02:00
nmlgc 850b8d783c [Reverse-engineering] [th03/mainl] CDG freeing
Funded by DTM.
2018-10-16 01:04:46 +02: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 18ae3e5cca [Reverse-engineering] [th03] Horizontally flipped CDG display 2018-10-16 01:04:46 +02:00
nmlgc 4b8d0931b9 [Reverse-engineering] [th03] Non-alpha CDG display 2018-10-16 01:04:46 +02:00
nmlgc df768ebea6 [Reverse-engineering] [th03] Normal CDG display 2018-10-16 01:04:43 +02:00
nmlgc fa39c23fad [Reverse-engineering] [th03] CDG loading 2018-10-16 00:47:58 +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 8dfc2cd535 [Research] Find out why ≥TH03 checks input twice per frame, with a 0.6ms delay
Thanks to @joncampbell123 for the tip!

Funded by zorg.
2018-09-13 18:32:24 +02:00
nmlgc cbe8a37c53 [Reverse-engineering] [th03] Single-/multi-player/CPU input modes
Funded by zorg.
2018-09-12 15:53:12 +02:00
nmlgc c592464121 [Reverse-engineering] [th03/th04/th05] Basic keyboard input functions
Funded by zorg.
2018-09-11 19:34:19 +02:00
nmlgc 178d589408 [Reverse-engineering] [th04/th05] Player position
Funded by zorg.
2018-09-02 21:10:26 +02:00
nmlgc 5a5c347e82 [Reverse-engineering] [th04/th05] Generic motion structure and its step method
Seemingly included in every other larger structure describing anything
remotely sprite-like. Couldn't find this in the earlier games,
unfortunately…

Funded by zorg.
2018-09-02 21:06:48 +02:00
nmlgc b29894b4e5 [Reverse-engineering] [th05] Dream value
Funded by zorg.
2018-09-02 21:06:48 +02:00
nmlgc 0052606563 [Reverse-engineering] [th04] Dream item number and score
The score table is also still present in TH05.

Funded by zorg.
2018-09-02 21:06:47 +02:00
nmlgc b487d6fc20 [Reverse-engineering] [th02/th04/th05] Power overflow bonus
Funded by zorg.
2018-09-02 20:48:31 +02:00
nmlgc 746681db22 [Reverse-engineering] [th04/th05] Enemy drop table
TH02 just seems to use a sequence of branches in sub_D6CA.
I thought about keeping variable and function names consistent with
uth05win (on which most upcoming reverse-engineering commits will be
based). But as it will turn out, it ignored a certain very important
substructure, so I don't think it's worth introducing this naming style
clash.

Funded by zorg.
2018-09-02 20:42:17 +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 2881d8736c [Readme] Rewrite a bunch of sentences
• Mention the existence of DOSBox-X
• Add more reasons why this project is a good idea
• PyTouhou is actually quite the opposite of what we are doing
• JynX's Re:Mystic Square wasn't actually written in Danmakufu, thanks
  to Ryann1908#9434 for reporting this oversight
• Move details about our planned remakes down to the Moddability section
  of the roadmap (yeah, I no longer believe we're ever gonna see those)
• Who needs this entire "we are not a wholesome FOSS project" sentence
  anyway
2018-06-23 23:54:07 +02:00
nmlgc d62dd06ddf [Reverse-engineering] [th02/th04/th05] Shot type control functions
Now you can mix and match characters and shot types any way you want.

TH02 and TH05 simply use the regular shot sprites associated with the
character/shot type no matter which function is used, which quite
surprisingly works without glitches for the few combinations I've tried.
TH04, however, always uses the sprites that were originally intended to
be used with that shot function, regardless of the character you assign
the function to, meaning that it always loads all 4 shot sprite sheets
into memory. Not doing that would have been one way to reduce the game's
memory footprint so that it doesn't require an extender…

Funded by -Tom-.
2018-04-21 15:32:33 +02:00
nmlgc 82bacbf01d [Reverse-engineering] [th04/th05] Current player character ID
TH03, again, uses structures for this.

Funded by -Tom-.
2018-04-20 21:37:41 +02:00