Skip to content

feat: add standalone macOS ports for Diablo III, It Takes Two, Minecraft Dungeons, and Minecraft Dungeons 2 - #2404

Open
Ting2024 wants to merge 1 commit into
ly05010419:mainfrom
Ting2024:feat/d3-itt-mcd-mcd2-ports
Open

Ting2024 wants to merge 1 commit into
ly05010419:mainfrom
Ting2024:feat/d3-itt-mcd-mcd2-ports

Conversation

@Ting2024

Copy link
Copy Markdown

Summary

This PR adds standalone macOS Apple Silicon ports under games/ for four Nintendo Switch
titles, targeting high-framerate playability (up to 120 FPS on D3 / ITT / MCD, and ~100 FPS
on MCD2) with zero game assets included:

  1. games/d3 — Diablo III: Eternal Collection (2.7.6 / v1441792)
    • Title ID: 01001B300B9BE000 (Update 01001B300B9BE800)
    • Static binary retranslation + Metal/NVN runtime, async shader/PSO translation, HID
      rumble offloaded to a background queue, LAN multiplayer support, per-user save isolation,
      and optional iOS packaging scripts under games/d3/iOS/.
  2. games/itt — It Takes Two (1.0.4 / v262144)
    • Title ID: 010092A0172E4000 (Update 010092A0172E4800)
    • Standalone macOS runtime with VP8/Movie audio pacing, uniform-buffer overlap & tbuf pool
      optimizations, and per-user state isolation.
  3. games/mcd — Minecraft Dungeons (1.17.0.0 / v1769472)
    • Title ID: 01006C100EC08000 (Update 01006C100EC08800)
    • Standalone UE4 macOS runtime with dynamic frame pacing, compute shared memory support
      (big_shared), and VPX/movie playback fixes.
  4. games/mcd2 — Minecraft Dungeons 2 (1.1.3.0 / v131072)
    • Title ID: 0100A7C01B792000 (Update 0100A7C01B792800)
    • Standalone UE4 macOS runtime with async shader compilation, frame pacing tuned up to
      ~100 FPS, and VPX/movie playback fixes.

Note on PR scope (CONTRIBUTING.md "One topic per pull request"): All four ports are
self-contained inside games/{d3,itt,mcd,mcd2}/. Aside from README.md (Switch 1 game
tables + What's new / 更新说明), only the three upstream CI registry files were touched
(tests/test_active_players.py, tests/test_hud_panel_shared.py,
tools/translator_changes.json). If maintainers prefer separate per-game PRs, I am happy to
split this into 4 independent PRs.


Upstream Integration & Architecture Notes

  • Standalone layout: Each port builds independently via cd games/<name> && make prepare runtime app (no changes to root build_app.py).
  • Shared upstream components adopted:

    shared/third_party/d2r_gfx/gfx/nvn/{hud_panel.inc,fps_overlay.h,fps_overlay.c,compute_shar ed.h}
    • shared/runtime/movie_pace.h
    • mng_active.h (mng_active_start)
    • Native-only totk_shader_rt.m invoking build/shader-service/totk_xlate
    • tools/deps resolution instead of hardcoded /opt/homebrew paths
  • CI Registry Updates:
    • Registered d3, itt, mcd, mcd2 in tests/test_hud_panel_shared.py (UNIFIED) and
      tests/test_active_players.py (STARTS).
    • Recorded games/{d3,itt,mcd,mcd2}/prebuilt/macos-arm64/totk_xlate SHA-256 digests and
      translator_code.code_sha256 entries in tools/translator_changes.json.

Build & Test Verification

Checked on commit 7f9b5f5e (rebased onto main 9c2554bc) on Apple Silicon macOS:

  • Upstream CI invariant suites (python -m unittest -v ...): 34/34 PASSED across all
    8 relevant suites:
    • test_active_players, test_compute_shared_memory, test_contrib_inbox_only,
      test_hud_panel_shared, test_movie_pacing, test_no_homebrew,
      test_shader_service_native_only, test_translator_changes
  • C unit checks (make check-c): PASS
  • Object & runtime compilation: PASS for all 4 ports (22 GFX_OBJECTS + launcher +
    frontend.m, plus movie_host.c with -Wall -Wextra -Werror on mcd/mcd2)
  • Python bytecode check (python3 -m py_compile on games/{d3,itt,mcd,mcd2}): PASS
  • Translator binary checksums (shasum -a 256 against totk_xlate.sha256): OK for
    all 4 ports
  • Pre-commit hook (.githooks/pre-commit): PASS (verified no game binaries, keys,
    RomFS/ExeFS, or save files included)

Platform Testing & Honest Scope

  • macOS (Apple Silicon):
    • Built & verified on 7f9b5f5e: Runtime C/ObjC compilation, C checks, and all 8
      upstream CI invariant suites listed above.
    • Gameplay optimization heritage (local branch prior to final upstream adaptation on
      7f9b5f5e)
      : Played and tuned on Mac with user-dumped NSPs — Diablo III (2.7.6, up to
      120 FPS), It Takes Two (1.0.4, up to 120 FPS), Minecraft Dungeons (1.17.0.0, up to 120
      FPS), Minecraft Dungeons 2 (1.1.3.0, up to ~100 FPS). End-to-end make app packaging
      and live gameplay have not yet been re-run specifically after the final shared/
      HUD/movie/deps adaptation in 7f9b5f5e.
  • iOS (games/d3/ios/):
    • Not built or played on iPhone/iPad in this environment (included from the standalone
      d3 port with tools/deps / hud_panel.inc API updates applied).
  • Note on full upstream suite: Full unittest discover -s tests was not re-run after the
    final edit; an earlier pre-adaptation run hit an environment error in
    test_oot_hmma_calls.py due to missing local Xcode iOS MetalToolchain.

Legal & Checklist

  • No copyrighted game binaries, RomFS/ExeFS dumps, decryption keys, or save files
    included (verified by .githooks/pre-commit).
  • Users must supply their own legally dumped game files via make prepare.
  • Commit follows <type>: <description> format.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant