cecilarmitais 909484fb99 Decomp the six DSE LFO track-event handlers
Decompile from asm:

  DseTrackEvent_SetupKeyBendLfoEnvelope  0x0207222C
  DseTrackEvent_UseKeyBendLfo            0x0207225C
  DseTrackEvent_SetupVolumeLfoEnvelope   0x02072504
  DseTrackEvent_UseVolumeLfo             0x02072534
  DseTrackEvent_SetupPanLfoEnvelope      0x02072720
  DseTrackEvent_UsePanLfo                0x02072750

All six index struct dse_channel's existing lfo_settings[4], which sits at
offset 0x74 with a 0x10 stride -- the stride the asm computes as ip lsl #4, and
the offset another handler in this family loads directly as channel + 0x74. The
three pairs address entries 0, 1 and 2, so key bend, volume and pan each own one
lfo_settings slot. Within an entry the setters write +0xa and +0xc, which are
msec_until_lfo_started and lfo_envelope_len_msec, and the Use handlers write +1
and +2, which are type and output_type.

output_type is set to 1, 2 and 3 for key bend, volume and pan respectively,
which is consistent with the slot each one uses; that is an observation about
the constants, not something the bytes label.

The Use handlers needed an explicit if/else rather than a ternary. Every
conditional-expression spelling tried -- v ? N : 0, v == 0 ? 0 : N, !v ? 0 : N,
and (v != 0) -- emits movne before moveq, where the target emits moveq before
movne. The statement form reverses the pair and matches.

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 15:18:27 -07: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%