# 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.

- Type: Case study
- Targets: Game
- Category: Independent reconstruction cases
- Relationship: Independent reconstruction project
- Sources reviewed: 2026-10-18
- Added to the catalog: 2026-10-18
- Original resource: <https://github.com/Yokimitsuro/khdays-decomp>
- Primary source: <https://github.com/Yokimitsuro/khdays-decomp/blob/261a89eaa8f65dd566ae0828b0b57c85c847a6ee/README.md>
- Catalog page: <https://awesomerea.org/resources/kingdom-hearts-days-matching-decomp-case/>
- Record JSON: <https://awesomerea.org/resources/kingdom-hearts-days-matching-decomp-case/record.json>
- Chinese version: [简体中文](https://awesomerea.org/zh/resources/kingdom-hearts-days-matching-decomp-case/index.md)

## Requirements & limits

- **Prerequisites:** 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.
- **Prerequisites:** 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.
- **Scope:** 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.
- **Testing evidence:** 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.
- **License:** 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.

## Primary sources

1. <https://github.com/Yokimitsuro/khdays-decomp/blob/261a89eaa8f65dd566ae0828b0b57c85c847a6ee/README.md>
2. <https://github.com/Yokimitsuro/khdays-decomp/blob/261a89eaa8f65dd566ae0828b0b57c85c847a6ee/CONTRIBUTING.md>
3. <https://github.com/Yokimitsuro/khdays-decomp/blob/261a89eaa8f65dd566ae0828b0b57c85c847a6ee/PROGRESS.md>
4. <https://github.com/Yokimitsuro/khdays-decomp/blob/261a89eaa8f65dd566ae0828b0b57c85c847a6ee/docs/PROGRESS_POLICY.md>
5. <https://github.com/Yokimitsuro/khdays-decomp/blob/261a89eaa8f65dd566ae0828b0b57c85c847a6ee/docs/ARM7.md>
6. <https://github.com/Yokimitsuro/khdays-decomp/blob/261a89eaa8f65dd566ae0828b0b57c85c847a6ee/.github/workflows/checks.yml>
7. <https://github.com/Yokimitsuro/khdays-decomp/blob/261a89eaa8f65dd566ae0828b0b57c85c847a6ee/.github/workflows/report.yml>
8. <https://github.com/Yokimitsuro/khdays-decomp/blob/261a89eaa8f65dd566ae0828b0b57c85c847a6ee/LICENSE>
9. <https://decomp.dev/Yokimitsuro/khdays-decomp>
10. <https://web.archive.org/web/20261020041901/https://decomp.dev/Yokimitsuro/khdays-decomp/YKGP/261a89eaa8f65dd566ae0828b0b57c85c847a6ee.json>

## More in Games

- [LEGO Island: source reconstruction with separately reported exact rebuilds](https://awesomerea.org/resources/lego-island-decomp-case/index.md) · Case study
- [Majora’s Mask: matching US N64 decompilation](https://awesomerea.org/resources/zelda-mm-decomp-case/index.md) · Case study
- [Mario Kart Wii: an in-progress matching decompilation of the PAL release](https://awesomerea.org/resources/mario-kart-wii-decomp-case/index.md) · Case study
- [Mario Kart: Double Dash!!: a matching GameCube decompilation of the debug build](https://awesomerea.org/resources/mario-kart-double-dash-decomp-case/index.md) · Case study
- [Mario Party 4: matching GameCube decompilation of the USA releases](https://awesomerea.org/resources/mario-party-4-decomp-case/index.md) · Case study
- [MediEvil decompilation: an early checksum-gated PlayStation project](https://awesomerea.org/resources/medievil-decomp-case/index.md) · Case study

## About this entry

The description was reviewed against primary sources.
Original editorial content: MIT. Linked projects, papers and assets retain their own rights and licenses.
