mirror of
https://github.com/pret/pmd-sky.git
synced 2026-09-30 22:27:51 -05:00
14c23438b4cf1b65e1885f9e6898b8f06e972cb7
Decompile UFixedPoint64CmpLt (0x02001A30) from asm. It compares two 64-bit values held as high/low word pairs and returns whether the first is less than the second. asm/main_02001A30.s held only this function, so the file and its .inc are removed rather than split, the function merges into the adjacent src/main_020018D0.c, and main.lsf drops asm/main_02001A30.o. Three details of the interface are read off the target rather than assumed, each tested with the others held fixed. The four words arrive as separate parameters: a 2-word struct passed by value makes the compiler push all four argument registers and reload them, which the target does not do. Those parameters are unsigned: the comparisons select movlo/movhi, where signed high words give movlt/movgt. The return is word-sized: a u8-width return such as bool8 appends and r0, r0, #0xff, which the target does not have. BOOL is used rather than int because it is the tree's word-sized boolean, and it produces the same bytes. src/main_02001BB4.c declared this function from its call site, before it was decompiled. That declaration is replaced by an include of the header. It was never visible to the compiler at the same time as the definition, so the two disagreeing prototypes could not be caught by a build; its parameter types were signed, which does not describe this function. No comments are added to any pmd-sky file. Authored by Claude (Opus 4.8, amended by Opus 5) under human direction. Confirmed by a matching build: build/pmdsky.us/pmdsky.us.nds: OK. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> 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%