mirror of
https://github.com/pret/pmd-sky.git
synced 2026-09-28 05:07:58 -05:00
6f3ad6941c15e2bdfaf535885a3787f38d6db226
Every function of four whole asm files now matches, so all four objects leave main.lsf and the .s/.inc files go: asm/overlay_29_023055B0.s 4 functions asm/overlay_29_02314810.s 9 functions asm/overlay_29_022E7EC4.s 25 functions asm/main_0202AB94.s 10 functions struct unk_0202AAA8 gains four members carved out of existing byte padding: a u32 at 0x0, the third menu kind's flag word plus its initial selected index at 0xFC/0x100, a u8 * at 0x160, and a signed s32 at 0x1A8. Offsets and sizeof are unchanged (0x1C8), proven by compiling one offsetof assertion per member with mwccarm and reading the folded constant back; the check carries a negative control that correctly fails, so "all as expected" is an outcome it could have missed. Nothing in the tree read any of the four offsets. struct struct_2 moves from include/overlay_31_02382820.h to include/window.h so a src/main_* file can reach it. CreateSimpleMenuInternal copies it whole (0x98 bytes), so its size is load-bearing. It is a pure move; the name is pre-existing and unchanged. window.h rather than main_0202AAA8.h because the latter drags main_0202AB40.h's prototypes into overlay_31_02382820.c, where they collide with that file's own declarations. Four data symbols declared `extern s32` from a call site whose parameter was void * are given their real types: _0209C85C and ov11_02322CC8 are WindowTemplate (each measures exactly 0x10 to the next symbol, and WindowTemplate is 16 bytes), _0209C86C and ov11_02322CF0 are struct unk_0202A5CC[] (8-byte records, matching the element counts the call sites pass). Each had exactly one user. The (s32) cast at overlay_11_02307334.c's call site goes with them -- field_0x1c is already a struct struct_2. Region arms, all message ids: overlay_29_0230558C.c gains a JPN_MSG_OFFSET block for five ids; move_orb_effects.c reuses its existing one and adds MESSAGE_ED0 / MESSAGE_ED1 for the two that shift by -0x2BE rather than the file's flat -0x2C0; overlay_29_02315118.c gains five named defines because it has no offset constant of its own. Every other region delta in these four files is a header-driven field displacement and needs nothing. Nine call-site-derived declarations across six files are replaced by an include of the owning header. Four declared void where the function returns bool8; two declared an s8 return where it is s32; three took an s8 parameter where it is s32. One was the fifth extern on a single physical line, which a line-oriented grep does not see. Authored by Claude (Opus 5) under human direction. Confirmed by matching builds in all three regions: build/pmdsky.us/pmdsky.us.nds: OK, build/pmdsky.eu/pmdsky.eu.nds: OK, build/pmdsky.jp/pmdsky.jp.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%