mirror of
https://github.com/pret/pmd-sky.git
synced 2026-10-01 14:48:14 -05:00
262177377d4ac65477da2141c7a0503dd8b29657
Decompile from asm: DseTrackEvent_Invalid 0x0207191C DseTrackEvent_WaitSame 0x02071928 DseTrackEvent_WaitDelta 0x02071934 DseTrackEvent_Wait8 0x0207194C DseTrackEvent_Wait16 0x0207195C DseTrackEvent_Wait24 0x02071978 DseTrackEvent_MainLoopBegin 0x02071A14 These are handlers in SMD_EVENTS_FUN_TABLE, dispatched by ParseDseEvent. No new types are introduced: struct dse_track and struct dse_sub_loop already exist in lib/DSE/include/dse.h, and every offset these functions touch lines up with a named field there -- is_playing at 2, wait_ticks_left at 0xc, previous_wait_ticks at 0x10, loop_start at 0x20. The shared four-argument signature is read off the dispatcher rather than guessed. ParseDseEvent loads the handler from SMD_EVENTS_FUN_TABLE and calls it with r0 already advanced past the opcode byte, r1 its own first argument, r2 the track, and r3 track->channel from offset 0x54; the returned r0 becomes the track's new position. Its caller passes a sequence and that sequence's track at offset 0xa8, which is what types the second parameter. The second parameter is unused by all seven bodies, so their own bytes do not constrain its type; it is typed from the dispatcher's call site, and the handlers that do use it are still asm. Six of these are contiguous and merge into one source file; MainLoopBegin sits after WaitUntilFadeout and EndTrack, which remain asm, so it splits separately. 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%