mirror of
https://github.com/pret/pmd-sky.git
synced 2026-09-28 13:24:02 -05:00
59fad373ccbf213db7422ff81f54e63da7c204aa
Decompile from asm: DseTrackEvent_SetupVolumeLfo 0x020724A8 DseTrackEvent_SetupPanLfo 0x020726C4 DseTrackEvent_SetupLfo 0x02072770 Each reads five bytes and initialises one lfo_settings entry: waveform index, a signed 16-bit amplitude, a phase-change time, and zeroes for the envelope fields. The two fixed-slot handlers also set type and output_type, using the same slot-to-output_type mapping as the Use handlers -- 2 for volume, 3 for pan. SetupLfo is the indexed form and takes its slot from channel + 0x61. struct dse_lfo_settings gains field_0xE. All four of these handlers store a zero byte at that offset, which the struct previously described as trailing padding. The struct's size is unchanged: it already rounded to 0x10 for the s32 amplitude's alignment, and the 0x10 stride is confirmed by the shift-by-4 the asm uses to index the array. Adding the field is therefore byte-neutral to every existing user, which the build confirms. All five stream bytes are read into locals before the first store. Reading them inline instead interleaves the loads between stores, and the target issues all five ldrb up front. DseTrackEvent_SetupKeyBendLfo is deliberately not included. It is the same shape and reaches an instruction-for-instruction identical body -- every mnemonic, offset and immediate matches -- differing only in which registers the allocator picks, at score 65. Reordering the locals, introducing an explicit amplitude temporary, and dropping the pointer local were all tried and moved the score without closing it. It is left in asm rather than landed as a near-match. 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%