nxnative:在 iPhone 和 iPad 上原生运行你自己的 Nintendo Switch 游戏。自带游戏(NSP 文件)和你的 prod.keys,一个脚本就能把它们变成可侧载的 IPA。
GitHub: https://github.com/seedds/nxnative(6.3k+ star,MIT)
中文版
它不是模拟器
游戏自身的代码直接在苹果芯片上跑,Switch 图形在 Metal 上重建。仓库里不含任何游戏内容,项目与任天堂及任何游戏发行商无关。这套原生执行路线源自 d2r-mobile(把《暗黑破坏神 II:重制版》搬上手机的项目,MIT),nxnative 从它的通用部分起步:NSO 重写器、顶替 Horizon 系统的宿主、NVN-on-Metal 图形层和 iOS 应用外壳;着色器翻译用 Ryujinx 的组件(Maxwell → SPIR-V → MSL),内核语义参考 Atmosphère 和 yuzu,NSP 读取用 LibHac。修复在两个项目间双向流动。
硬件要求
- iOS / iPadOS 26 或更高
- iPhone 15 Pro 或更新(A17 Pro 及以后),或 M1 及以后的 iPad——游戏纹理是 BC 压缩,老 iPhone 读不了这个格式
- 打包需要一台装了 Xcode 和 Homebrew 的 Mac
已测游戏(100+)
README 里列了上百款在 Mac 或 iPhone 上测过的游戏,包括:马力欧卡丁车 8 豪华版、塞尔达传说:旷野之息(更新 1.9.0 后 60 fps)、王国之泪(1.4.3 后 60 fps)、集合啦!动物森友会、超级马力欧兄弟 惊奇、奥德赛、银河 1/2、纸片马力欧千年之门(60 fps)、任天堂明星大乱斗 特别版(离线)、怪物猎人 崛起(60 fps)、Hades / Hades II、空洞骑士:丝之歌、女神异闻录 5 皇家版、尼尔:自动人形、火焰纹章 风花雪月 / Engage(均 60 fps)、宝可梦 剑/盾、星之卡比 探索发现等。未支持的游戏脚本会写一份调查报告并尽力打包,但 IPA 可能启动不了。
打包三步
- 装工具:
git clone后brew install xcodegen zstd spirv-cross glslang、brew install --cask dotnet-sdk、pip install lz4 capstone fonttools - 把一款游戏的 NSP 放进一个文件夹:本体(NSP 或 XCI 卡带 dump)+ 更新 + DLC(都可选,脚本打包文件夹里的最新版本;NSZ/XCZ 压缩格式也支持)
- 跑脚本:
python3 scripts/build_ipa_from_nsp.py ~/Games/MarioWonder -k ~/keys/prod.keys,IPA 出现在同一文件夹
首次构建 30–60 分钟,后续构建只重跑输入变了的步骤(只改宿主时约一分钟)。磁盘需要约 NSP 两倍大小 + 10 GB。怕命令行的可以用社区 GUI 分支 NX2Apple(macOS 应用,全流程代劳)。还能用 --platform mac-app 打包成 Apple 芯片 Mac 应用,从访达直接打开;有苹果开发者账号可用 --prepare-xcode 生成 Xcode 工程。
安装与游玩
- 用 AltStore、Sideloadly、LiveContainer 等工具装 IPA,应用名、图标、版本都取自游戏
- 签名时尽量带上 Increased Memory Limit 能力:没有它 iOS 只给约 3.4 GB,大游戏(塞尔达无双:灾厄启示录、Hades II 等)会被关;带上后新款 iPhone 约给 6 GB
- 启动前有设置屏:帧率、渲染缩放、底座/掌机模式、游戏语言、帧率计数器、震动,分组在同一滚动页
- 触控:2D / 3D 两套布局可切换(3D 布局右摇杆靠右三分之一屏滑动),接上手柄自动隐藏触控;震动走 iPhone 触感引擎或手柄;摇手机可触发体感动作(如奥德赛的摇杆帽子投掷)
- 存档和日志在「文件」App 里应用名下(
save/和log.txt);新场景第一次出现时短卡顿是编译图形,之后会记住 - 语言打包时用
--language zh-Hans指定,也能在设置屏里改,不用重打包
已知问题
- 不支持 amiibo 和任何联网功能
- 火焰纹章 Engage:切出应用再切回,部分声音可能消失,重启恢复
- 风花雪月:贴花落点有小方块瑕疵;马力欧银河 1/2:点/线绘制的特效只有一像素宽
English Version
nxnative: play your own Nintendo Switch games natively on iPhone and iPad. Bring your game (its NSP files) and your prod.keys; one script turns them into an IPA that you sideload.
GitHub: https://github.com/seedds/nxnative (6.3k+ stars, MIT)
It is not an emulator
The game’s own code runs directly on the Apple chip, with Switch graphics rebuilt on Metal. Nothing from any game is in the repository, and the project is not affiliated with Nintendo or any game publisher. The native-execution approach comes from d2r-mobile (Diablo II: Resurrected on mobile, MIT): nxnative started from its generic parts — the NSO rewriter, the host that stands in for Horizon, the NVN-on-Metal layer and the iOS app shell. Shader translation uses Ryujinx components (Maxwell → SPIR-V → MSL); kernel semantics reference Atmosphère and yuzu; NSP reading uses LibHac. Fixes go both ways.
Requirements
- iOS / iPadOS 26 or later
- iPhone 15 Pro or newer (A17 Pro chip or later), or an iPad with M1 or later — the games’ textures are BC-compressed and older iPhones can’t read that format
- Packing needs a Mac with Xcode and Homebrew
Tested games (100+)
The README lists 100+ games tested on Mac or iPhone, including Mario Kart 8 Deluxe, The Legend of Zelda: Breath of the Wild (60 fps with update 1.9.0), Tears of the Kingdom (60 fps with 1.4.3), Animal Crossing: New Horizons, Super Mario Bros. Wonder, Odyssey, Galaxy 1/2, Paper Mario: The Thousand-Year Door (60 fps), Super Smash Bros. Ultimate (offline), Monster Hunter Rise (60 fps), Hades / Hades II, Hollow Knight: Silksong, Persona 5 Royal, NieR:Automata, Fire Emblem: Three Houses / Engage (both 60 fps), Pokémon Sword/Shield, Kirby and the Forgotten Land, and many more. For unsupported games the script writes a survey and still tries its best to pack an IPA, which may not start.
Pack an IPA in three steps
- Get the tools: clone, then
brew install xcodegen zstd spirv-cross glslang,brew install --cask dotnet-sdk,pip install lz4 capstone fonttools - Put one game’s NSPs in a folder: base game (NSP or XCI cartridge dump) plus its update and DLC if you have them (all optional — the script packs the newest version in the folder; NSZ/XCZ work too)
- Run:
python3 scripts/build_ipa_from_nsp.py ~/Games/MarioWonder -k ~/keys/prod.keys— the IPA appears in the same folder
The first build takes 30–60 minutes; later builds reuse every step whose inputs didn’t change (about a minute when only the host changed). Free disk space needed: about twice the NSPs’ size plus 10 GB. Prefer a GUI? The community fork NX2Apple is a macOS app that runs the whole pipeline. --platform mac-app packs a Mac app for Apple silicon instead; --prepare-xcode generates an Xcode project if you have a developer account.
Install and play
- Install the IPA with AltStore, Sideloadly, LiveContainer, etc. The app takes the game’s name, icon and version
- Sign with the Increased Memory Limit capability if your tool can: without it iOS gives the app about 3.4 GB and closes the bigger games (Hyrule Warriors: Age of Calamity, Hades II); with it a recent iPhone gives about 6 GB
- A settings screen before the game starts: frame rate, render scale, docked or handheld mode, game language, frame-rate counter and rumble — one scrollable screen, choices remembered
- Touch controls with 2D / 3D layouts (in 3D, swipe the right third of the screen for the right stick); a connected controller hides the touch controls; rumble uses the iPhone’s haptic engine or the controller; shake the phone for motion moves (e.g. Odyssey’s cap throw)
- Saves and logs live in the Files app under the app’s name (
save/,log.txt); short stutters the first time a scene appears are shader compilation, remembered for the next launch - Game language can be set when packing (
--language zh-Hans) or changed on the settings screen without rebuilding
Known issues
- No amiibo and no online features
- Fire Emblem Engage: after switching away and back, some sounds may stay silent until restart
- Three Houses: small square patches where decals land; Mario Galaxy 1/2: point/line effects render one pixel wide
来源 / Source
- GitHub: seedds/nxnative(6.3k+ star,MIT)
- 技术来源 / Built on: d2r-mobile、Ryujinx、Atmosphère、LibHac

评论(0)
暂无评论