mirror of
https://github.com/pret/pmd-sky.git
synced 2026-09-28 05:07:58 -05:00
637d196646a6354bfca9670ba9ff5a0c028a173b
asm/overlay_29_022E4BB4.s 26 functions cleared asm/overlay_29_0230D088.s 25 functions cleared asm/overlay_29_022EA008.s 13 functions cleared asm/main_02055894.s 22 of 23 split sub_020559D8 is at score 75 (0 structural rows, 11 register-colouring rows) and is NOT landed, so main_02055894.s splits: asm/main_020559D8.o holds that one function between src/main_02055770.o and src/main_02056294.o. Five struct ground_monster members are retyped, on load-width evidence from sub_02055E14: level, level_at_first_evo and level_at_second_evo are read ldrb though declared s8, and iq and max_hp are read ldrsh though declared u16. The reading validates itself -- id at 0x4 is read ldrsh and is already declared s16, and every member whose declaration is already correct reads exactly as declared. A cast at the read site cannot fix this: MWCC takes the load's width AND signedness from the declared member type alone. This deviates from pmdsky-debug's s8/u16, and it narrows ApplyGummiBoostsGroundMode's second parameter from u16 * to s16 * -- that function is still asm, so its prototype is now pinned by this reading rather than by its own body. struct dungeon's `u8 field_0x1c; u8 field_0x1d;` become one s16, forced by ldrsh/strlth at 0x1c. 0x1C is 4-aligned and 0x1E is already s16, so no padding appears and no offset moves. No other translation unit names either field. sub_0205B008's second parameter becomes struct ground_monster * instead of u32: it forwards the argument straight to sub_02055894, and both asm call sites load r1 with `ldr r1, [r0, #0x3c]`, a word out of a struct field. src/overlay_29_022E9FC0.c declares DUNGEON_PTR with a COMPLETE type, [2] rather than []. ov29_022EA008 scores 1025 under the incomplete form: it lets mwcc keep DUNGEON_PTR[0] live across a store the target reloads after. [] and [2] are compatible types, so no use site changes. struct unk_02353560 in that file grows from 5 to 0x10 bytes and struct unk_0237C850 is new; neither is named outside it. Twelve message ids in src/overlay_29_0230BBAC.c get an #ifdef JAPAN block. Every other region delta across the four files is a header-driven field displacement and needs nothing. Thirty-five pre-existing declarations across nineteen files are removed in favour of an include of the owning header, or corrected in place. Eleven of them disagreed with the definition: UnkMapRelatedFunc declared with an unsigned first parameter in four files where the switch dispatch is a signed range test, six declared with no prototype at all and the wrong return type, and one (sub_02055894) declared as taking a u32 where it takes a pointer. 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%