mirror of
https://github.com/pret/pmd-sky.git
synced 2026-09-28 05:07:58 -05:00
d387d4e2737b99d523dd7d23c73f2fd7004af266
ActivateEndOfTurnEffects (0x0230FC24, 1235 instructions in US) is the per-turn status tick: the warp-scarf counter, the leader's belly and hunger messages, weather damage, Shed Skin and Hydration, the burn, poison, bad-poison, constriction, wrap, ingrain, curse and leech-seed damage countdowns, perish song and bide. It is the last of five functions in asm/overlay_29_0230F9A4.s and the next object in main.lsf is src/overlay_29_02311010.o, so extract_function.py merges rather than splits and main.lsf is unchanged. struct monster declared 0xAC as u8 bide_move_id plus u8 field_0xad. Retail accesses it with ldrh/strh and stores 0x165 = MOVE_BIDE_UNLEASH, which does not fit in a byte; enum move_id runs to 558, so -enum min sizes it to two bytes - the width struct move's own enum move_id id at 0x2 already has. The field becomes enum move_id and absorbs field_0xad. The struct size and every later offset are unchanged, no other source reads either member, and InitMove already takes enum move_id so no cast is needed. This deviates from pmdsky-debug's u8; the reasoning note linked from the PR has the evidence. The 29 callees that are still asm are declared extern in the .c with prototypes read off their own asm, as the sibling files do, and so are the 24 data symbols - const on the read-only rodata ones, which is what places their loads correctly. Region handling: the sound-effect guard in the hunger block is a genuine three-way fork, EU calling ov29_022E34A8_EU where JP omits the end_floor_no_death_check_flag test that US performs, and nine message ids are file-scope defines at US - 0x2C0 under JAPAN. The JP struct and dungeon offset shifts are absorbed by the headers with no directive. Locals are generic and declared at function scope. That is not cosmetic: the allocator's unit is the coalesced web, and the function-scope declaration list is the only thing that orders it, so the declaration order is what reproduces retail's register assignment. Authored by Claude (Opus 5) under human direction. Confirmed by matching builds of 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%