{
  "added_at": "2026-11-01",
  "additional_evidence_urls": [
    "https://github.com/ZeldaWWHDDecomp/wwhd/blob/b2811a3ce838d1f875bc8e68536c1950af5d7ffc/tools/verify/README.md",
    "https://github.com/ZeldaWWHDDecomp/wwhd/blob/b2811a3ce838d1f875bc8e68536c1950af5d7ffc/docs/review-notes.md",
    "https://github.com/ZeldaWWHDDecomp/wwhd/blob/b2811a3ce838d1f875bc8e68536c1950af5d7ffc/docs/hd-vs-gc-summary.md",
    "https://github.com/ZeldaWWHDDecomp/wwhd/blob/b2811a3ce838d1f875bc8e68536c1950af5d7ffc/docs/decomp-notes.md",
    "https://github.com/ZeldaWWHDDecomp/wwhd/blob/b2811a3ce838d1f875bc8e68536c1950af5d7ffc/tools/verify/assets.py",
    "https://github.com/ZeldaWWHDDecomp/wwhd/blob/b2811a3ce838d1f875bc8e68536c1950af5d7ffc/LICENSE",
    "https://github.com/ZeldaWWHDRecomp/ZeldaWWHDRecomp/tree/df2cf51bd6d02e0b310d46a5da062693bac7314f"
  ],
  "category": "reconstruction-cases",
  "description_en": "Decompiles the USA Wii U release of The Wind Waker HD function by function into readable C++ in zeldaret/tww’s style, and verifies each function by running it beside the original, statically recompiled from the user’s own copy, comparing return values, memory writes and calls on generated and recorded inputs, with coverage and mutation checks. README reports 28,244 of the game’s 39,713 functions verified, including 22,068 of 22,215 GameCube-derived functions. The code calls undecompiled functions by address, so it runs only inside the ZeldaWWHDRecomp port, not as a standalone game build.",
  "description_zh": "将 Wii U 美版《塞尔达传说 风之杖 HD》逐个函数反编译为 zeldaret/tww 风格的可读 C++，并让每个函数与由使用者自有副本静态重编译得到的原版函数并排运行，在生成输入和录制输入上比较返回值、内存写入和函数调用，同时检查覆盖率并进行变异测试。README 报告游戏 39,713 个函数中已有 28,244 个通过验证，其中来自 GameCube 版的 22,215 个函数里有 22,068 个。代码通过地址调用尚未反编译的函数，因此只能在 ZeldaWWHDRecomp 移植中运行，不能单独构建成游戏。",
  "entry_url": "https://awesomerea.org/resources/wind-waker-hd-decomp-case/",
  "entry_url_zh": "https://awesomerea.org/zh/resources/wind-waker-hd-decomp-case/",
  "evidence_url": "https://github.com/ZeldaWWHDDecomp/wwhd/blob/b2811a3ce838d1f875bc8e68536c1950af5d7ffc/README.md",
  "group": "cases",
  "id": "wind-waker-hd-decomp-case",
  "json_url": "https://awesomerea.org/resources/wind-waker-hd-decomp-case/record.json",
  "kind": "case-study",
  "markdown_url": "https://awesomerea.org/resources/wind-waker-hd-decomp-case/index.md",
  "markdown_url_zh": "https://awesomerea.org/zh/resources/wind-waker-hd-decomp-case/index.md",
  "name": "Wind Waker HD decompilation: functions verified against the recompiled Wii U game",
  "name_zh": "《风之杖 HD》反编译：与重编译的 Wii U 版逐函数比对验证",
  "reconstruction_method": "decompilation",
  "record_type": "resource",
  "relationship": "independent-reconstruction",
  "requirements": [
    "README describes a hybrid decompilation of cking.rpx (USA, version 0): decompiled functions call others through their original addresses, so the tree builds no game on its own and runs only with the port’s recompiled code. It reports the HD UI decompiled, while about 11,400 generic-library functions (sead, agl, NW4F, most of JSystem, the Cafe SDK and the C runtime) are not planned. zeldaret/tww is the reference for names and structure, and the docs record HD differences for 838 units compared with the GameCube version.",
    "Building or verifying needs the user’s own legally obtained game, extracted with the port’s tool from a disc image with its disc key and the Wii U common key. README states that the repository contains no machine code, recompiled code, game assets or keys; small data tables used by the code are included, while model data, the RPX image, recompiled output, game-derived names and recorded inputs are generated locally and git-ignored. The recommended GameCube signature checks also use zeldaret/tww built from the user’s own GameCube disc.",
    "The harness runs inside a ZeldaWWHDRecomp checkout at the tested commit df2cf51b (v0.2.3), replacing the port’s older tools/verify. It needs Python 3, clang/clang++ with C++20 and the port’s game-extraction requirements; building the port itself is needed only for recording inputs. A full verify_all.py run is long, and some units need tens of GB of memory.",
    "Each function runs on 10,000 generated inputs on each of two seeds, must reach nearly all basic blocks of the original and is mutation-tested; README reports the whole tree re-verified after the October 2026 readability rewrite. tools/verify/README.md says equivalence is to the recompiled code’s model of the Espresso CPU, not the console, and that timing, threading and the exact stack layout are not checked. The in-game swap-test build is not part of the release, and the repository has no CI workflow.",
    "CC0 1.0 covers the decompiled source, tools and documentation; the game, Nintendo data and the port runtime keep their own terms. README calls it an unofficial, non-commercial fan project with no donations or paid builds. tools/verify/README.md reports pilot timings for an agent using the tools and two functions written by parallel agents."
  ],
  "requirements_zh": [
    "README 称这是针对 cking.rpx（美版，版本 0）的混合式反编译：已反编译的函数通过原始地址调用其他函数，因此该源码树本身构建不出游戏，只能与移植项目的重编译代码一起运行。据其报告，HD 界面已完成反编译，而约 11,400 个通用库函数（sead、agl、NW4F、JSystem 的大部分、Cafe SDK 及 C 运行时）暂不计划处理。名称与结构以 zeldaret/tww 为参照，文档还记录了与 GameCube 版比较的 838 个单元中 HD 版的差异。",
    "构建或验证都需要使用者自己合法取得的游戏，用移植项目的工具从附有光盘密钥和 Wii U 通用密钥的光盘镜像中提取。README 声明仓库不含机器码、重编译代码、游戏素材或密钥；代码本身使用的小型数据表包含在内，而模型数据、RPX 镜像、重编译输出、源自游戏的函数名和录制输入均在本地生成，并被 git 忽略。推荐启用的 GameCube 签名检查还需使用以使用者自己的 GameCube 光盘构建的 zeldaret/tww。",
    "验证工具须在 ZeldaWWHDRecomp 的指定测试提交 df2cf51b（v0.2.3）的检出中运行，并替换该移植中较旧的 tools/verify。需要 Python 3、支持 C++20 的 clang/clang++，以及移植项目提取游戏所需的条件；只有录制输入时才需要构建移植本身。完整运行 verify_all.py 耗时很长，部分单元需要数十 GB 内存。",
    "每个函数在两个随机种子上各运行 10,000 组生成输入，须覆盖原函数几乎所有基本块，并经过变异测试；README 报告 2026 年 10 月可读性重写后已对整个源码树重新验证。tools/verify/README.md 说明，等价性是相对于重编译代码对 Espresso CPU 的模拟，而非主机本身，且不检查时序、线程和精确的栈帧布局。游戏内替换测试所用的构建不在发布内容中，仓库没有 CI 工作流。",
    "CC0 1.0 适用于反编译源码、工具和文档；游戏本身、任天堂的数据及移植运行时保留各自条款。README 称其为非官方、非商业的粉丝项目，不接受捐助，也没有付费构建。tools/verify/README.md 报告了一个智能体使用这些工具时的试点耗时，以及由并行智能体编写的两个函数。"
  ],
  "targets": [
    "game"
  ],
  "url": "https://github.com/ZeldaWWHDDecomp/wwhd",
  "verification": "source-reviewed",
  "verified_at": "2026-10-19"
}
