mirror of
https://github.com/pret/pmd-sky.git
synced 2026-10-01 06:37:50 -05:00
6f907c680c4a73f4c9b7238251fc172c67039daa
Decompile from asm: PlayBgmByIdVeneer 0x02017B58 PlayBgmByIdVolumeVeneer 0x02017B64 PlaySeByIdVolumeWrapper 0x02017C80 GroupOamAttributesWrapper 0x0201BA9C CopyAttributesToOamWrapper 0x0201BAAC CopyAndInterleaveWrapper 0x0201BFF0 SetAnimationControlPausedFlag 0x0201D198 DeleteWanTableEntryVeneer 0x0201D72C Most are tail calls the compiler reaches with bx rather than bl, either passing their arguments through unchanged or supplying one: PlaySeByIdVolumeWrapper fixes the volume at 0x100, the two Oam wrappers offset their argument by 0x20, and CopyAndInterleaveWrapper halves its length. That halving is a shift, not a division. Written as len / 2 the compiler adds the round-toward-zero correction a signed divide needs; the target has a bare asr #1, which is what len >> 1 produces. SetAnimationControlPausedFlag sets or clears bit 0x4000 of the bitfield at the start of struct animation_control, which already exists in graphics.h. Two cautions for a reviewer. The callees are all still asm and had no declarations in the tree, so every prototype here is provisional and declared beside its caller. And a veneer that only forwards constrains nothing about its own argument list -- the arguments are already in the right registers, so declaring none, one or several all produce the same bytes. The parameter lists are chosen to read sensibly against each callee's name, not read off the target. The exception is PlaySeByIdVolumeWrapper, whose signature is pinned by an existing C caller in overlay_25_init.c that passes a single s32. 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%