OoT Native (io.github.p1r4n351.oot, work in progress) brings the Nintendo Switch 2 edition of The Legend of Zelda: Ocarina of Time (0400486024DEC000, update v131072) natively to 64-bit Android handhelds with Qualcomm Adreno GPUs — targeting the dual-screen AYN Thor (QCS8550 / Adreno 740, 16 GB RAM) with a second-screen companion on the bottom display.
It is not a CPU emulator: the game's AArch64 modules (main, subsdk0, sdk) are rewritten once to execute directly on the phone's ARMv9 cores, Horizon / Switch 2 (Ounce) services are answered natively by the host runtime, and NVN 2 + Ampere (sm86) shaders execute on Vulkan 1.3 with Mesa Turnip. The repository and APKs contain no game files, keys, firmware, shaders, saves, or Nintendo artwork — you supply your own legally obtained dump from your own Switch 2.
- M0 (Dump, Container & Shader Inventory) — Complete: Verified NUP v1 layout, SDK 22.2.8 (
Ounce) module digests (PKG[0]v65536+PKG[1]v131072),ZBICsegment encoding,186,583-file RomFS, and42,845-shader Amperesm86(0x98761234v0xc9) corpus (15,851VS,22,352FS,20task,500mesh,4,122CS). - M1 (Rewriter, NVN 2 & Adreno 740 Gap Audit) — Complete: Verified
patch_nso.py(DM_HOST_TP=tpidr_el0) acrosssubsdk0,sdk, andmain(51,654slot sites,0gates), catalogued all259NVN 2 entry points beyond Switch 1 NVN 1, and verified live Adreno 740 Vulkan extensions (VK_EXT_shader_atomic_floatpresent;VK_EXT_map_memory_placedvia bundled Mesa Turnip27.0-devel;VK_EXT_mesh_shaderabsent, requiring Vulkan compute-mesh lowering). - M2a / M2b (Host, Pack & Shader Library) — Complete: Integrated BananaNative (
af1ed596,v0.3.43), builtv131072android-pack(main/sdk/subsdk0), and compiled42,843SPIR-V shaders (52,858modules,695.6 MBdmsh_vk.lib). - M2c (16 GB AYN Thor Boot & Live Gameplay Verification) — Complete: Verified
22.4 mincold-to-3D run (26,109frames,0crashes,170 MiBcached Turnip pipelines,267,000audrenframes with0underruns,25,246 / 65,530VMAs =38.5%), fixed Android 13vkMapMemory2+nn::codecAV160 fpslock +driver.id=18Turnip defaults (a5fc6b359894), and verified206 mswarm pipeline load,60.0–60.2 fpstitle, and stable15 fpsKokiri Forest playback with synchronized audio. - M2d (Adreno 740 / Turnip Vulkan Replay & Low-RAM Hardening) — Complete:
DM_VK_MESH_EMU_COND=1(vka_memu_cond.h,040f68e/ upstream branchpr/mesh-emu-render-cond): EvaluatesRenderControlconditions across mesh compute look-ahead and steps past redundantSetRenderTargetsmatching the active pass whenDM_VK_PASS_KEEPis enabled, cutting Kokiri Forest look-ahead stops from21.0/frame(n=43) to0.9/frameand lifting mesh compute batching from2.24to5.63–6.85draws/batch (4.22->13.81–56.20draws/split pass).DM_VK_RAM_SAVER=2vktl_saver_capfix + OoT low-RAM caps (6359a2f/ upstream branchpr/oot-low-ram-caps,low_ram_place_part_mb=64,low_ram_img_cache_max_mb=1280): Cuts peak Vulkan allocations in Kokiri Forest from4,775 MiB(placed 1,636 MiB,images 3,012 MiB,n=256) to1,987–2,606 MiBwhile keeping the required9,216 MiB(0x240000000) guestapp_pool(7,424 MiBfailsmainSetHeapSize).DM_VK_GMEM_REPLAY=1(vka_spv_gmem_replay.{h,c},97187ff/ upstream branchpr/vk-spv-gmem-replay/ standalone MITP1R4N351/spv-gmem-replay): Pure C11VkShaderModule-time straight-line vertexGMEM_MAPreplay pass (4pool slots +2gaps inPrivate,281/282OoTv131072vertex shader interpreter parity,0NDK r28spirv-val --target-env vulkan1.3errors,70–71call sites rewritten across7live Kokiri Forest shaders,324/324device-local pipeline keys prewarmed on1thread in3.2 s, zeroDMSH_VK_CHAINbump).
- M3 (Production Identity, Companion Waist, Bifrost &
v0.2.0-beta.1) — Complete: Addedcompanion_state.h+oot_companion.h/.cwaist (20 Hzreader,3-frame pause hold from0x4BE4FB0, Ocarinapage 4),BifrostBridgestick-LED controller + localizedGameSettingstoggle, procedural emerald/brass vector icons & banner (scripts/make_oot_launcher_art.py, zero Nintendo art),PadFocus.hasGamepad()initial focus, and published the first release-signed (-PnxLive=true,NX_PACK_ENGINE=fake) pre-releasev0.2.0-beta.1(bba4b0a7207436af864d4c0bdf4bcb27816f3e3a,OoT-Native-0.2.0-beta.1.apk,io.github.p1r4n351.oot,9,000,088B, SHA-2569758a38bbf9e41cea4af6e35e3db1749f7be40c27f0de21168d5d6dee7564dd8) with per-app updater, signer stamp, and wiki URL overrides. - M4 (Dual-Screen Companion, 3D Radar, Ocarina Sequencer &
v0.2.0-beta.2) — APK Published (2026-11-21): Integrated clean-room MITP1R4N351/nx-second-screenv0.2.0(companion_trail.h,companion_seq.h,oot_companion_catalog.h), extendedoot_companion_tap.h/oot_companion.c/input_android.c/nxlaunch.cwithOOT-05/OOT-10..20live state + fail-closed Ocarina song/note input sequencing (DemoOcarina&oot_companion_write_safegated), builtOotCompanionModel.java,OotCompanionView.java, Display 4OotCompanionPresentation.java, and opt-in single-screen drawer (OotCompanionController.java,SidePanel.java), and published the release-signed pre-releasev0.2.0-beta.2(50ead06356f62b5570db8039213c607e5f5547e9,OoT-Native-0.2.0-beta.2.apk,io.github.p1r4n351.oot,versionCode=3,9,084,388B, SHA-25631544f661af2a404e6e58e33bb02259f1c98edb99c33db547111d5bd5043ea28,-PnxLive=true,NX_PACK_ENGINE=fake). Host C11 ASan/UBSan + pure-JVM-Xlint:all -Werrorsuites andaapt2/apksigner/zipalign/llvm-readelf/dexdumpbinary checks pass; AYN Thor Display 4 live gameplay smoke verification remains pending. - Second-Screen Tie-In Ledger — Active:
30+gmd::GameDataMgrhashes, livePlayerXYZ + camera pointers, transition/dim guards,OOT-29pause-canvas detection, and save structures documented in games/oot/SECOND_SCREEN_NOTES.md.
- On-device smoke test of
v0.2.0-beta.2on AYN Thor (#5, #7, #3, #4) — Verify non-debuggable-PnxLive=trueAPK launch, in-app updater (P1R4N351/oot-android) / wiki link / controller focus, liveoot_companion+BifrostBridgestick LEDs, Display 4OotCompanionPresentation, single-screen companion drawer (SidePanel), 3D radar pins, 5-bottle/gear live state,0x4BE4FB0vsUI_IsOpen*pause detection (OOT-29), and Ocarina playback (nn::hid::IsOunceVibrationDeviceMounted,H4). - Kokiri Forest GPU performance (
15 fps->30+ fps) & shader/VMA hardening (#2, #3) — Profile Adreno 740 / Turnipdriver.id=18frame time (DM_VK_GPUPROF=1,vka_memucompute-mesh lowering,ir3register spills,scene_res/skip_layers/DM_OOT_*levers, andLichiipost-tonemap bypass evaluation), validate the5omitted point-mesh shaders againstvulkan-sdk-1.4.363.0(spirv-val v2026.4), and soak multi-area / dungeon transitions against/proc/<pid>/mapsVMA growth (H2). - Bundle real on-device Prepare (
-PnxPackEngine=real) (#6) — Build and bundle theandroid/ondevice/build.shnative packer stage (libpython3.14.so,libnxpack.so,libzbicdec.so,libcra.so, NativeAOTlibdmsh_xlate.so,libSPIRV-Tools-shared.so) so players can prepare.nupdumps directly on the handheld without a PC.
Full technical inventory, reference audit, and gap analysis: games/oot/README.md.
Roadmap, completed milestones, and upcoming technical hurdles (H1–H5): MILESTONES.md.
Three single-concern branches rebased directly onto moceure/BananaNative:android (9c98a63b1e176564ee6c7de6b5d9ef0b8da5d9b0) are published here for upstream submission and downstream forks:
| Branch | Commit SHA | Change |
|---|---|---|
pr/mesh-emu-render-cond |
46da96ea |
vka_memu_cond.h (DM_VK_MESH_EMU_COND=1): look ahead across RenderControl conditions in mesh compute emulation |
pr/oot-low-ram-caps |
770fc6f5 |
0400486024DEC000: low_ram_place_part_mb 64 + low_ram_img_cache_max_mb 1280 (scoped free of vktl_saver_cap / PR #504 overlap) |
pr/vk-spv-gmem-replay |
efe1a297 |
vka_spv_gmem_replay.{h,c} (DM_VK_GMEM_REPLAY=1): runtime MIT C11 vertex GMEM_MAP replay pass (standalone repo) |
Downstream BananaNative forks can pull any branch cleanly:
git fetch https://github.com/P1R4N351/oot-android.git pr/mesh-emu-render-cond
git cherry-pick FETCH_HEADVerified Adreno 740 / Turnip low-RAM runtime overrides (env-0400486024DEC000.txt):
DM_VK_LOW_RAM=1
DM_VK_RAM_SAVER=2
DM_VK_MESH_EMU_COND=1
DM_VK_GMEM_REPLAY=1Community contributors and testers are welcome! High-leverage areas open right now:
- Adreno 740 / Mesa Turnip
ir3Profiling: Reducing cold-compile stalls and register spills on large Ampere-translated vertex shaders and compute-lowered mesh passes (20task +500mesh shaders). - Pause / Menu & Active-Cutscene Memory Signals (
v131072e0f3ccfa): Pinpointing the exact pause-menu-open and active-Navi-hint addresses inmainto pair with the 5 verified scene-transition booleans in games/oot/SECOND_SCREEN_NOTES.md (OOT-24,OOT-25). - Second-Screen Companion (
0400486024DEC000): Declarative1240×1080dual-screen pages (north-up / camera-up scene & dungeon maps, item/equipment grids, guarded C-button touch assignment, Spiritual Stones / Medallions / Gold Skulltula status, and learned Ocarina song reference). - Device Testing (12 GB vs 16 GB Snapdragon / Xclipse handhelds): Tracking
/proc/<pid>/mapsVMA coalescing (vm.max_map_count) and thermal stability across extended dungeon transitions.
Please never include game binaries, keys, firmware, extracted assets, raw shader dumps, or save files in issues or pull requests.
If this work is useful to you, donations are gratefully accepted. They are voluntary, unlock nothing, and go to this port's maintainers (PiSCES), not to the upstream Banana Native project.
- Bitcoin:
bc1q4a3lqcg87rvw7vxulausdqhhuwkwwa6w6v4mxx - VitaDB profile: PiSCES
Download builds only from this repository's Releases. Nobody will ever ask you for keys, game files or account details.
This project builds on and coordinates with open-source Switch 1 / Switch 2 native port and companion efforts:
- BotW Native & TotK Native (fork) (based on AurelioB/totk-android, MIT): Android controller menu, Mesa Turnip integration,
companion_state.hwaist, and Bifrost stick-LED bridge. - nxnative by seedds (MIT), Banana Native by moceure & contributors (MIT core; GPL-3.0-or-later mesh/compute & LSFG components), Anka Native by EddizEge (MIT), and MacNativeGames by ly05010419 & contributors (MIT).
- a55uka/nup (MIT), Ryujinx (MIT), and Mesa Turnip (MIT).
- Eden Duo & eden-duo-companions (GPL-3.0-or-later) for the dual-screen companion runtime.
- NaviScout by jfhutchi (MIT), OOT-SW2SE by Traiver (MIT), oot-editor by christianfurr (MIT), and NX2navi-Trainer by Miragui (MIT) for verified
v131072gmd::GameDataMgrand actor layouts.
Repository-authored documentation, scripts, and clean interfaces are licensed under the MIT License (LICENSE). Any build or APK integrating GPL-3.0-or-later components (such as the Eden Duo companion host or GPL-3.0 compute-mesh / shader-translation components) is distributed as a whole under GPL-3.0-or-later with complete corresponding source published in this repository. Third-party components retain their respective licenses.
You must own the game. Use this project only with a copy of The Legend of Zelda: Ocarina of Time that you legally purchased and dumped from your own Nintendo Switch 2 console. This is an independent, non-commercial interoperability and preservation research project; it is not affiliated with, endorsed by, or sponsored by Nintendo. The Legend of Zelda, Ocarina of Time, and Nintendo Switch are trademarks of Nintendo.