totk-mobile README

The project's README from github.com/OJZen/totk-mobile. As one markdown file: README.md.

Zelda-Mobile

English | 简体中文

Zelda-Mobile runs the Nintendo Switch release of The Legend of Zelda: Tears of the Kingdom v1.4.3 natively on Apple silicon Macs and iPads, with an early iPhone build. The game's ARM64 code executes directly on the Apple CPU, system services are reimplemented by the host, and NVN graphics commands are translated to Metal. The Mac and iOS front ends share one core.

[!IMPORTANT] This project is not affiliated with, authorized or endorsed by Nintendo. The repository contains source code only: no game files, updates, keys, saves, game shaders or any other game-derived data, and no instructions for obtaining them. Use only a game and keys that you own and dumped from your own console.

Status

The project is under active development. You can load a save and play, but a full playthrough has not been validated.

Platform Working Known limits
Apple silicon Mac Loading saves and playing scenes, keyboard and Xbox controller (with rumble), audio, cutscenes, 30 / 60 / 90 FPS targets The first visit to a new area or camera angle may stutter while shaders compile; not every area holds 60 FPS
iPad (M1 or newer) Development-signed install, resource import, loading saves, touch controller, camera, audio Well below 60 FPS at the original resolution; the first shader preparation takes a long time; hardware controllers are not fully validated
iPhone 15 Pro Development-signed install, resource import, verified offline shader libraries, warm launch to the title screen Gameplay, frame rate, memory and thermals have not been measured; no other iPhone has been tried, and chips without BC texture support (before A17 Pro) are untested

Only v1.4.3 is supported. The preparation scripts verify module fingerprints and refuse other versions.

Requirements

Quick start (Mac)

See Building and running for the full steps and troubleshooting. In short:

git clone https://github.com/OJZen/totk-mobile.git
cd totk-mobile
brew install cmake pkg-config opus libvpx [email protected]
mkdir -p local/games local/keys
# Put the base game and the v1.4.3 update in local/games/ and prod.keys in local/keys/, then:
./script/prepare.sh
./script/prepare_resources.sh local/keys/prod.keys
./script/prepare_shaders.sh
./script/build_and_run.sh --load-only
./launch.command

After that, start the game by double-clicking launch.command (or running it in a terminal). quick-load.command additionally walks the in-game menu and loads the first entry of the save list.

The first launch prepares tens of thousands of shaders. This can take several minutes or longer; the startup screen shows each stage and its progress. Later launches reuse the cache.

Controls

Action Keyboard
Move / camera W A S D / I J K L
A / B / X / Y X (confirm) / Z (back) / R / F
L / R, ZL / ZR Q / E, Shift / Space
Inventory (+) / map (−) Return / Tab
Control panel / performance overlay / full screen ⌘, / ⌘P / ⌃⌘F

Xbox controllers connect automatically over Bluetooth or USB. Frame rate, resolution, MetalFX, sound and rumble are set in the control panel (⌘,). See Controls and settings.

Saves

Saves live in work/save/ inside the project and use the same format as the console. See Saves for importing and backing up. Do not modify this directory while the game is running.

FAQ

Startup takes a long time. The first shader preparation is slow; the startup screen shows the current stage and its progress, and during play the performance overlay (⌘P) shows shader activity. The log is work/logs/native-probe.log.

A preparation script reports a module or version mismatch. Make sure the update is v1.4.3 and that local/games/ holds exactly one base game and one update.

The game stutters. The first time a scene is seen, its pipelines are compiled on the spot and then cached. For sustained low frame rates, compare against the 1080 or 720 resolution setting in the control panel.

Does it run on Intel Macs? No. The game code runs natively as ARM64 and needs Apple silicon.

For developers

License

The original code in this repository is licensed under the Apache License 2.0. Reused third-party components keep their own licenses; see Third-party notices.

Credits

Zelda-Mobile was built with d2r-mobile as its reference project: the loader, the ARM64 module rewriter and the NVN → Metal backend follow its design, and the files this project builds on are included in core/ under its MIT license. It also draws on public work from Ryujinx, libnx, Switchbrew, SPIRV-Cross, hactool and others. See Third-party notices for details.

"The Legend of Zelda", "Tears of the Kingdom" and "Nintendo Switch" are trademarks of Nintendo.

totk-mobile (OJZen/totk-mobile)

game-preservation
Searching Database…

What is this?This is an experimental native port of the Nintendo Switch game The Legend of Zelda: Tears of the Kingdom (v1.4.3) that runs directly on Apple silicon Macs and iPads, with an early iPhone build in progress.
Is this an emulator, or does it run the original game code directly?It is not a classic emulator: the game's ARM64 machine code executes directly on the Apple CPU, while system services are reimplemented by the host and the console's NVN graphics calls are translated to Metal.
How do I get it running on my Mac?On an Apple silicon Mac with Xcode, the command line tools and Homebrew installed, you build the project and then double-click launch.command (or run it in a terminal); quick-load.command also auto-loads the first save slot for you.
What do I need to actually play the game with this?You must supply your own dumped Tears of the Kingdom base game and v1.4.3 update (.nsz) plus matching prod.keys pulled from your own console; the repo deliberately ships no game files, updates, keys or saves.
Does it work on Intel Macs, and are there other rough edges?No, it requires Apple silicon because the game code runs natively as ARM64. Even on supported hardware, visiting a new area for the first time can stutter while shaders compile, and a full playthrough has not yet been validated.
How well does it run on iPhone and iPad compared to Mac?Mac is the most complete target with playable scenes, controller and audio support; iPad (M1+) works but stays well below 60 FPS; the iPhone 15 Pro build only reaches a warm launch to the title screen, with gameplay and performance still unmeasured.
Is the whole codebase under one license?The project's own code is Apache License 2.0, but reused third-party components it builds on keep their own separate licenses.
Why doesn't the repo just include the game files?Nintendo owns the game, so this project only publishes its own reverse-engineering code; players are expected to dump their own purchased copy and keys from their own console.
What did the author base this project on?It uses d2r-mobile as a reference design for the loader, ARM64 module rewriter and NVN-to-Metal backend, and also draws on public work from Ryujinx, libnx, Switchbrew, SPIRV-Cross and hactool.
How much disk space should I set aside?Roughly 60GB free, since the extracted RomFS alone is about 16GB and shader caches plus build artifacts add significantly more on top.
How do I control the game on a Mac?WASD or IJKL move the camera, X/Z/R/F map to A/B/X/Y, Q/E and Shift/Space handle the shoulder triggers, and Xbox controllers connect automatically over Bluetooth or USB with rumble support.
Creator
OJZen
Size
1.5 MB
Stars
224
Updated
CommitOct 21
Age
1mo
Commits · 90 Days