{
  "added_at": "2026-10-18",
  "additional_evidence_urls": [
    "https://github.com/jhaizhou-ops/d2r-mobile/blob/9393b00ea9aca52d9254214da93738f26582562f/dm/README.md",
    "https://github.com/jhaizhou-ops/d2r-mobile/blob/9393b00ea9aca52d9254214da93738f26582562f/dm/verify/README.md",
    "https://github.com/jhaizhou-ops/d2r-mobile/blob/9393b00ea9aca52d9254214da93738f26582562f/docs/GAME_FILES.md",
    "https://github.com/jhaizhou-ops/d2r-mobile/blob/9393b00ea9aca52d9254214da93738f26582562f/docs/DERIVED.md",
    "https://github.com/jhaizhou-ops/d2r-mobile/blob/9393b00ea9aca52d9254214da93738f26582562f/docs/DEPENDENCIES.md",
    "https://github.com/jhaizhou-ops/d2r-mobile/blob/9393b00ea9aca52d9254214da93738f26582562f/LICENSE"
  ],
  "category": "reconstruction-cases",
  "description_en": "Runs the Nintendo Switch release’s own aarch64 program natively on iPhone, iPad and Apple silicon Macs, rewriting only instructions that depend on the Horizon kernel and supplying its system services and the NVN graphics API on Metal. Shaders are translated offline from the user’s files, and the project adds its own touch interface and endgame features. It is a rehosting compatibility layer, not a decompilation or recompiled source.",
  "description_zh": "在 iPhone、iPad 和 Apple 芯片 Mac 上原生运行 Nintendo Switch 版自身的 aarch64 程序，仅改写依赖 Horizon 内核的指令，并以 Metal 提供其系统服务与 NVN 图形 API。着色器由使用者自有文件离线转译，项目另行加入触控界面与终局玩法。这是重新托管的兼容层，不是反编译或重编译出的源码。",
  "entry_url": "https://awesomerea.org/resources/d2r-mobile-switch-rehost-case/",
  "entry_url_zh": "https://awesomerea.org/zh/resources/d2r-mobile-switch-rehost-case/",
  "evidence_url": "https://github.com/jhaizhou-ops/d2r-mobile/blob/9393b00ea9aca52d9254214da93738f26582562f/README.md",
  "group": "cases",
  "id": "d2r-mobile-switch-rehost-case",
  "json_url": "https://awesomerea.org/resources/d2r-mobile-switch-rehost-case/record.json",
  "kind": "case-study",
  "markdown_url": "https://awesomerea.org/resources/d2r-mobile-switch-rehost-case/index.md",
  "markdown_url_zh": "https://awesomerea.org/zh/resources/d2r-mobile-switch-rehost-case/index.md",
  "name": "D2R Mobile: rehosting Diablo II: Resurrected’s Switch program on Apple devices",
  "name_zh": "D2R Mobile：在 Apple 设备上重新托管 Diablo II: Resurrected 的 Switch 程序",
  "reconstruction_method": "other",
  "record_type": "resource",
  "relationship": "independent-reconstruction",
  "requirement_facets": [
    "scope",
    "prerequisites",
    "prerequisites",
    "testing",
    "license"
  ],
  "requirements": [
    "Targets only the Switch release with the Reign of the Warlock expansion at 1.0.34.0 (PC 3.3.94012); the rewrite rules stop on other versions. README reports iPhone/iPad builds for A14/M1 or later (iOS 26, or iOS 18–25 via an older-API build) and native Apple silicon Mac builds; A16-and-earlier devices need an extra texture pack, Apple TV is a community developer preview, and Intel Macs, A13-and-earlier chips and online play are unsupported.",
    "Supply your own Switch program files (ExeFS main, sdk and subsdk0) and RomFS update data for that version; the rewritten program, translated shaders and on-device resource folder are generated locally from them. The repository holds no game code, art, text or shaders, but records shader interface tables, graphics-API names and about 800 main-program addresses, itemized in docs/DERIVED.md.",
    "The main route is a full build on an Apple silicon Mac with Xcode, the Python environment that setup.sh prepares and an Apple signing account; a no-Xcode route packages a prebuilt shell on Windows, with Linux packaging and sideloading-tool signing reported unverified. Shader translation bundles Ryujinx’s translator, and SPIRV-Cross emits Metal source.",
    "dm/verify documents structural checks and Unicorn-based equivalence tests for every rewrite site, which need only the user’s files, plus unit tests. Save, tick-state and screenshot gates compare against ground-truth recordings from a patched Ryujinx; those recordings and driver scripts are not shipped, so these gates cannot be rerun from the repository. README reports a 44-device closed beta and dated iPhone 17 Pro Max measurements.",
    "The project declares MIT; bundled third-party code keeps its own license (the Ryujinx translator MIT, deko3d-derived code zlib, FLIP BSD 3-Clause). Seven offline-play rewrites come from a community patch whose authorship and license are unknown. Blizzard and Nintendo retain their rights in the game."
  ],
  "requirements_zh": [
    "仅支持带 Reign of the Warlock 资料片、版本 1.0.34.0（对应 PC 3.3.94012）的 Switch 版；其他版本会被改写规则拦下。README 报告支持 A14／M1 及以上的 iPhone／iPad 构建（iOS 26，或经旧版 API 构建支持 iOS 18–25）以及原生 Apple 芯片 Mac 构建；A16 及更早设备需额外纹理包，Apple TV 为社区开发者预览版，Intel Mac、A13 及更早芯片和联机均不支持。",
    "需自备该版本的 Switch 程序文件（ExeFS 中的 main、sdk、subsdk0）及 RomFS 更新数据；改写后的程序、转译后的着色器和设备端资源文件夹均据此在本地生成。仓库不含游戏代码、美术、文本或着色器，但记录了着色器接口表、图形 API 名称及约 800 个主程序地址，并在 docs/DERIVED.md 中逐项列明。",
    "主要途径是在装有 Xcode 的 Apple 芯片 Mac 上完整构建，需 setup.sh 准备的 Python 环境及 Apple 签名账户；无 Xcode 途径在 Windows 上为预构建外壳打包，Linux 打包及侧载工具签名报告尚未验证。着色器转译内置 Ryujinx 的转译器，并由 SPIRV-Cross 生成 Metal 源码。",
    "dm/verify 记录了对每个改写位置的结构检查和基于 Unicorn 的等价测试（只需使用者自有文件）以及单元测试。存档、逐 tick 状态和截图关卡与修补版 Ryujinx 录制的基准数据比对；这些录制及驱动脚本不随仓库提供，因此无法仅凭仓库重跑这些关卡。README 报告 44 台设备的封闭测试及注明日期的 iPhone 17 Pro Max 实测。",
    "项目声明采用 MIT；内置第三方代码保留各自许可（Ryujinx 转译器为 MIT，源自 deko3d 的代码为 zlib，FLIP 为 BSD 3-Clause）。七条离线运行改写取自作者与许可均不明的社区补丁。Blizzard 与 Nintendo 对游戏的权利不受影响。"
  ],
  "targets": [
    "game"
  ],
  "url": "https://github.com/jhaizhou-ops/d2r-mobile",
  "verification": "source-reviewed",
  "verified_at": "2026-10-18"
}
