mirror of
https://github.com/pret/pmd-sky.git
synced 2026-09-28 05:07:58 -05:00
00d4d6428c2b5e755816a9cf4fc2089b81926a6b
Decompile from asm: DseTrackEvent_WaitUntilFadeout 0x0207199C DseTrackEvent_EndTrack 0x020719C8 DseTrackEvent_SubLoopBegin 0x02071A1C DseTrackEvent_SubLoopEnd 0x02071A5C This empties asm/main_0207199C.s and asm/main_02071A1C.s, so both files and their .inc are removed rather than split, and the handlers merge into the adjacent sources added by the previous commit. EndTrack confirms the second parameter's type, which the previous commit could only infer from the dispatcher: it writes 1 to the byte at offset 3 of that argument, which is field_0x0.has_looped in struct dse_sequence. A track that reaches the end of its main loop setting has_looped is consistent, and no other struct in dse.h places a byte with that meaning at offset 3. SubLoopBegin and SubLoopEnd index track->loop_stack, the existing struct dse_sub_loop[4] at offset 0x24 with a 12-byte stride, which is what the asm's multiply by 0xc computes. SubLoopEnd needed two changes past the obvious form. Its index and count locals are int, not u8: at byte width the compiler inserts and rX, rX, #0xff after each decrement, which the target does not have. And the early return has to be the fall-through path -- written as an early return the compiler if-converts the tail into predicated stores, where the target branches with bxeq lr. Inverting the condition, so the longer body sits inside the if, produces the branch. DseVoice_CountNumActiveInChannel and DseChannel_DeallocateVoices are still asm; their prototypes are provisional and declared in this file's header. Neither was declared anywhere else in the tree. No comments are added to any pmd-sky file. Authored by Claude (Opus 5) under human direction. Confirmed by a matching build: build/pmdsky.us/pmdsky.us.nds: OK. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…
…
…
…
…
Pokémon Mystery Dungeon: Explorers of Sky
This is a WIP disassembly of Pokémon Mystery Dungeon: Explorers of Sky. For instructions on how to set up the repository, please read INSTALL.md. For information on how to contribute changes, see CONTRIBUTING.md.
This repository builds the following ROMs:
- pmdsky.us.nds
sha1: 5fa96ca8d8dd6405d6cd2bad73ed68bc73a9d152 - pmdsky.eu.nds
sha1: c838a5adf1ed32d2da8454976e5b1a1aa189c139 - pmdsky.jp.nds
sha1: 7785138dd343b6f2d0f2c9cadc26b4aa927161d7
For contacts and other pret projects, see pret.github.io.
Description
Languages
Assembly
66.3%
C
18%
C++
7.1%
Boogie
4.3%
sed
1.5%
Other
2.8%