cecilarmitais d387d4e273 Decomp ActivateEndOfTurnEffects; monster::bide_move_id is a 2-byte enum move_id
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>
2026-09-18 23:12:41 -07:00
2026-04-08 09:53:43 +02:00
2024-04-17 23:52:39 -04:00
2026-08-22 20:45:50 -04:00
2023-11-20 17:24:08 -06:00
2024-06-23 16:59:48 -05:00
2023-08-13 23:03:51 -04:00
2024-12-28 02:25:07 -06:00
2026-08-01 12:46:55 -04:00
2023-06-28 23:35:19 -04:00
2023-06-28 23:35:19 -04:00
2023-06-28 23:35:19 -04:00
2026-09-04 13:13:23 -07:00
2026-07-16 07:36:58 -07:00
2025-06-10 23:35:01 -04:00
2023-08-20 22:43:00 -04:00
2023-08-14 00:17:21 -04:00
2023-11-01 18:44:19 -04:00
2024-04-17 23:52:39 -04:00
2023-08-28 00:09:02 -04:00
2024-04-17 23:52:40 -04:00
2023-08-08 00:17:03 -04:00

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:

For contacts and other pret projects, see pret.github.io.

Description
Decompilation of Pokémon Mystery Dungeon: Explorers of Sky
Readme 335 MiB
Languages
Assembly 66.3%
C 18%
C++ 7.1%
Boogie 4.3%
sed 1.5%
Other 2.8%