cecilarmitais 00d4d6428c Decomp the last four DSE track-event handlers in arm9
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>
2026-08-16 14:42:05 -07:00
2026-07-31 18:03:24 -04:00
…
2026-08-01 12:46:55 -04:00
2026-07-16 07:36:58 -07:00
…
…
…
…
…

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:

For contacts and other pret projects, see pret.github.io.

Description
Decompilation of Pokémon Mystery Dungeon: Explorers of Sky
Readme 335 MiB
Languages
Assembly 66.3%
C 18%
C++ 7.1%
Boogie 4.3%
sed 1.5%
Other 2.8%