Case study
Kingdom Hearts 358/2 Days: a matching Nintendo DS decompilation
Reconstructs the ARM9 program and overlays of the EU Nintendo DS release of Kingdom Hearts 358/2 Days as C that recompiles byte for byte with CodeWarrior. README reports all 306 modules byte-identical, with about 99.5% of functions in real C and library assembly counted separately; the ARM7 binary is outside its scope. The repository holds no ROM, game assets or extracted disassembly and produces no playable build.
Requirements and limitations
- README reports every function of the EU (YKGP) ARM9 program and its overlays matched and all initialized data reconstructed, with 306 of 306 rebuilt modules byte-identical; the remaining work is readability, such as shared structures, naming and file grouping. It counts 23,125 of about 23,233 functions as real C and tracks 108 assembly implementations (library routines and two game functions that need clz) separately. docs/ARM7.md states that the decomp covers the ARM9 only. This is a matching decompilation, not a port, and it produces no playable build or redistributable binary.
- Requires the user’s own EU ROM dump, days.nds: 268,435,456 bytes, SHA-1 6fae8f5bbe80114b4e2535260eab5f4d0fc8a844 (CONTRIBUTING.md also lists SHA-256 and MD5). Other dumps will not line up with the committed addresses. The repository tracks no ROM, extracted data (including the extracted asm/ tree), build output or proprietary toolchain, and a pull-request check rejects added ROM, binary or asset files.
- CONTRIBUTING.md lists Python 3 with capstone, pyelftools and ndspy, the dsd extraction and delinking tool, the proprietary CodeWarrior mwccarm 3.0 build 139 compiler (not supplied), arm-none-eabi-as and a Ninja-driven mwccarm/mwldarm build; its commands call tools/dsd.exe alongside Bash scripts. A few precompiled-middleware units use an older mwccarm through per-file compiler overrides.
- dsd check modules compares each built module with the base ROM, verify_idx.py checks single functions including relocations, and the ROM round-trip script is expected to differ from the reference dump only in four non-functional CRC bytes. CONTRIBUTING notes that functions listed as known mismatches are kept out of the link and filled with original bytes. CI does not build the game; it rejects forbidden files and regenerates progress reports. decomp.dev reports YKGP 100.00% decompiled and fully linked at the reviewed commit, counting verified SDK assembly; this collection did not rerun these checks.
- Contributors’ decompilation and tooling are dedicated to the public domain under CC0 1.0; the original game and its assets remain their owners’ property, and the CodeWarrior compiler is not distributed. DS Protect sources are reconstructed after taxicat1/dsprot, and the SDK identification harness compiles NitroSDK sources from pret/pokediamond. The reviewed sources disclose no REA or AI use, and no runtime reproduction is claimed; the separate khdays-port PC runtime is not covered.
About this entry
- Type
- Case study
- Category
- Independent reconstruction cases
- Relationship
- Independent reconstruction project
- Targets
- Game
Sources reviewed
The description was reviewed against primary sources. This does not establish runtime testing, security auditing or verified compatibility.
Primary sources
- README.md GitHub · Yokimitsuro/khdays-decomp · Revision 261a89e
- CONTRIBUTING.md GitHub · Yokimitsuro/khdays-decomp · Revision 261a89e
- PROGRESS.md GitHub · Yokimitsuro/khdays-decomp · Revision 261a89e
- docs/PROGRESS_POLICY.md GitHub · Yokimitsuro/khdays-decomp · Revision 261a89e
- docs/ARM7.md GitHub · Yokimitsuro/khdays-decomp · Revision 261a89e
- .github/workflows/checks.yml GitHub · Yokimitsuro/khdays-decomp · Revision 261a89e
- .github/workflows/report.yml GitHub · Yokimitsuro/khdays-decomp · Revision 261a89e
- LICENSE GitHub · Yokimitsuro/khdays-decomp · Revision 261a89e
- https://decomp.dev/Yokimitsuro/khdays-decomp