[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-107617":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":16,"stars30d":17,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":18,"rankGlobal":10,"rankLanguage":10,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":22,"hasPages":20,"topics":23,"createdAt":10,"pushedAt":10,"updatedAt":37,"readmeContent":38,"aiSummary":39,"trendingCount":16,"starSnapshotCount":16,"syncStatus":40,"lastSyncTime":41,"discoverSource":42},107617,"pokopia-native","xFractals\u002Fpokopia-native","xFractals","Build Pokémon Pokopia (Switch 2) into a native Windows app, Mac app, and iPhone app from your own dump. Tools only; With multiplayer and cross-device saves!","",null,"C",486,43,8,5,0,336,54.93,"MIT License",false,"main",true,[24,25,26,27,28,29,30,31,32,33,34,35,36],"apple-silicon","ios","iphone","macos","metal","native","native-port","nintendo-switch-2","nxnative","pokemon","pokopia","switch2","windows-builder","2026-11-24 04:01:25","# Pokémon Pokopia, running natively on your Mac, iPhone and Windows PC with Cross-Device Saves and Multiplayer\n\n**Join the community on [Discord](https:\u002F\u002Fdiscord.gg\u002FAj9GqxZj8V)**: help with installing, bug reports, finding co-op partners and news of every release.\n\nI got Pokémon Pokopia (the Switch 2 game) running natively on my Mac and on my iPhone. Not through an emulator: the\ngame's own code runs on the Apple chip, and the graphics go through Metal. After a lot of work on the shaders it looks\nexactly like the Switch 2. I lined up screenshots from the Switch 2 against the phone, scene for scene, and could not tell\nthem apart. Shadows, clouds, time of day, the lot.\n\nThis repository is the tool that lets you do the same with **your own copy of the game**. It takes your dump, and on\nyour Mac it builds a Mac app and an iPhone app. On a Windows PC it builds the game for Windows itself, recompiled for your\nPC, and the iPhone app too. Everything that comes from the game is created on your machine and stays in your build\nfolder. Nothing from the game is in here.\n\nThis works for both versions 1.0.5 (v327680) and 2.0.1 (v655360) as of 11\u002F3\u002F2026. The tool is version **1.2.4**.\n\n## Which download do I need?\n\nEvery release has one download per computer. Take the one for the computer you build on:\n\n- **I have a Windows PC and want to play on Windows** →\n  [**Pokopia Native for Windows PCs**](https:\u002F\u002Fgithub.com\u002FxFractals\u002Fpokopia-native\u002Freleases\u002Flatest\u002Fdownload\u002FPokopia-Native-for-Windows.zip).\n  Unzip it, double-click `Pokopia Native Builder.cmd` and tick \"Windows: play on this PC\". The steps:\n  [Windows: play on your PC](#windows-play-on-your-pc).\n- **I have a Windows PC and want to build for iPhone** →\n  [**Pokopia Native for Windows PCs**](https:\u002F\u002Fgithub.com\u002FxFractals\u002Fpokopia-native\u002Freleases\u002Flatest\u002Fdownload\u002FPokopia-Native-for-Windows.zip) (the same download).\n  Tick \"iPhone IPA\"; it needs Apple's tools and a paid developer team: [docs\u002FWINDOWS.md](docs\u002FWINDOWS.md#the-iphone-app).\n- **I have a Mac and want to play on Mac** →\n  [**Pokopia Native for Macs**](https:\u002F\u002Fgithub.com\u002FxFractals\u002Fpokopia-native\u002Freleases\u002Flatest\u002Fdownload\u002FPokopia-Native-for-Mac.zip).\n  A Mac with Apple silicon (M1 or newer); tick \"Mac app\". The steps: [How to build](#how-to-build).\n- **I have a Mac and want to build for iPhone** →\n  [**Pokopia Native for Macs**](https:\u002F\u002Fgithub.com\u002FxFractals\u002Fpokopia-native\u002Freleases\u002Flatest\u002Fdownload\u002FPokopia-Native-for-Mac.zip) (the same download).\n  Tick \"iPhone IPA\", and read [the Apple developer thing](#the-apple-developer-thing-iphone-only-read-this) first.\n\nPlaying together (Link Play) works between Windows, Mac and iPhone, on the same Wi-Fi or over the internet:\n[Playing together](#playing-together-link-play). Two rules:\n\n- **Co-op needs the same pokopia-native version on every device** (the builder window's title shows it).\n- **Each player needs their own save**: the game refuses two copies of the same save, so a save copied to a second device cannot play with itself.\n\nOlder versions and the release notes: [all releases](https:\u002F\u002Fgithub.com\u002FxFractals\u002Fpokopia-native\u002Freleases).\nAlready have an older version set up? [Updating from an older version](#updating-from-an-older-version) keeps your save.\nBringing your save from an emulator or another device? [Moving your save](#moving-your-save).\n\nBefore anything else:\n\n> **Please Please Please Please do not share game files, this is for your own games files only and that is the intention it was built with.**\n\nThat means: do not upload your dump, do not upload the build folder, do not upload the app or the IPA this makes (they\ncontain the game), do not upload shader caches or recorded shaders (they are pieces of the game too). If you want to\nhelp someone, point them here. They need their own Switch 2, their own copy, their own dump. The tool checks the dump\nis the right version and refuses anything else, and it needs no keys of any kind. Keep it that way, and this stays up.\n\n---\n\n## Message From the Creator\n\nHey guys, I really hope you enjoy this. I just have to give a massive shout-out to the people at NxNative, this wouldn't be possible without them. I'd never tried to do any of this until last week, when they went viral, and once I found out, I kept going. This all started after 0x2593 posted their fork of Eden for NS2, shout out to them as well, that was a great help for getting this going. After running the first emulation of Pokopia, I just knew I needed to fix it and put it on my phone and Mac. Right now all of the PC emulators with Pokopia have issues with the shaders. My work on this native build allowed me to dig deeper and fix all of those issues. If you want to play emulated Pokopia with Eden, that's my other repository \"pokopia-fixes\" (https:\u002F\u002Fgithub.com\u002FxFractals\u002FEden-NS2), which is a fork of https:\u002F\u002Fgithub.com\u002F0x2593\u002FEden-NS2. Go check it out if you want, hopefully it gets merged into main soon. Anyways Enjoy!\n\nAlso, if you find any bugs, please feel free to submit an issue request or a PR; it's much appreciated!\n\n## Gameplay on the iPhone\n\nCaptures from my phone, straight from the build this tool makes. I checked every one of these scene for scene against\nSwitch 2 footage of the game. The Switch side-by-sides are not posted here because that footage is not mine to repost;\nwhen I have captures from my own console they will go up next to these.\n\n![Night, campfire with Professor Tangrowth](docs\u002Fimages\u002Fiphone-night.png)\n\n![Day, the first area](docs\u002Fimages\u002Fiphone-day.png)\n\n\u003Cimg width=\"1007\" height=\"485\" alt=\"Screenshot 2026-11-04 205343\" src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F238eb6b2-a815-4ac7-aeea-7c4d99479f19\" \u002F>\n\n![Opening, the workbench at night](docs\u002Fimages\u002Fiphone-intro-18.png)\n\n## What you get\n\n- **A Mac app.** Double-click, press Play, it runs. Saves live in your Library folder like any Mac game.\n- **An iPhone app.** The game runs natively on the phone, full quality, 30 fps (the Switch 2 runs this game at 30 in\n  handheld too). There is a catch about Apple developer accounts, explained below. Read it before you get excited.\n- **A Windows game.** On a Windows PC the game's code is recompiled for your PC and drawn with Vulkan: 60 fps, mouse look,\n  controllers with rumble, your save from Eden, the phone or the Mac. [Windows: play on your PC](#windows-play-on-your-pc).\n\nBoth are built from your dump by one script, `nxs2.py`. The first build takes about an hour, nearly all of it the\nMac compiling 3,800 shaders. After that, rebuilds take a couple of minutes.\n\n## What you need\n\n- A **Mac with Apple silicon** (M1 or newer) and roughly 20 GB of free disk. The game's code is arm64, so an Intel Mac\n  cannot run it. The Mac does the building for the iPhone too, or a Windows PC can (the last item here).\n- **16 GB of memory is recommended on the Mac.** The game itself uses about 6 GB there, so on an 8 GB Mac it can run out\n  of graphics memory once macOS and your other apps have taken their share (see [Common problems](#common-problems)).\n- **Xcode 27** installed, with its command line tools and the Metal toolchain (Xcode → Settings → Components). For the\n  iPhone build you also need the iOS platform from that same screen, and `xcodegen` (`brew install xcodegen`).\n- **Python 3.12 or newer, with the builder's own environment.** Homebrew's Python takes no pip packages of its own\n  (\"externally-managed-environment\"), so the builder's go into a private environment. Once, in Terminal:\n  ```bash\n  brew install python@3.12 python-tk@3.12\n  python3.12 -m venv ~\u002F.pokopia-native\u002Fvenv\n  ~\u002F.pokopia-native\u002Fvenv\u002Fbin\u002Fpython -m pip install \"capstone>=5,\u003C6\" lz4 fonttools pillow\n  ```\n  (Pillow only for the app icon.) **Pokopia Native Builder.app** uses that environment by itself. For the commands in\n  this README, run `source ~\u002F.pokopia-native\u002Fvenv\u002Fbin\u002Factivate` first in each Terminal window: `python3.12` and `pip`\n  are then the environment's.\n- The **.NET 10 runtime** (the shader translator is .NET): `brew install --cask dotnet-sdk`.\n- **Your dump.** The game's files as your dumping tool wrote them, with the update:\n  ```\n  \u003Cyour folder>\u002Fupdates\u002F\u003Cversion>\u002Fexefs\u002F   main  main.npdm  rtld  sdk  subsdk0\n  \u003Cyour folder>\u002Fupdates\u002F\u003Cversion>\u002Fromfs\u002F   LD_C0_R.BIN  LI_C0_R.IDX  motor_asset_re\u002F  movie_asset\u002F\n  ```\n  A folder that holds `exefs\u002F` and `romfs\u002F` directly works too, and so does a **`.nup` file** (a NUP container of\n  an already-decrypted dump: pick it with **.nup file…** in the window, or give its path to `nxs2.py build`). The\n  builder unpacks the update it needs into the build folder (about 7–10 GB more), once; it needs Python's `zstandard`\n  module: `python3.12 -m pip install zstandard`. Two updates of Pokémon Pokopia (title\n  `0400A3A01EE4C000`) are supported, and the tool tells which one you have from the build IDs: **v327680** and\n  **2.0.1 (v655360)**. Both get everything, including the mouse and drag look. The base game alone is not enough, and\n  another version will not build until it is added, because the patch recipe and the camera address are per version.\n- **Copy the dump in binary mode.** If you move it off the console with FTP, set the transfer type to **Binary**\n  (FileZilla: Transfer → Transfer type → Binary). The default \"auto\" mode treats files without an extension as text and\n  quietly drops bytes from `main`, `sdk` and `subsdk0`; I lost an evening to that. The tool checks for it and tells you.\n- For the **iPhone**: see the next section.\n- **No Mac?** A Windows PC builds and signs the iPhone app alone: [docs\u002FWINDOWS.md](docs\u002FWINDOWS.md) (one play session\n  on the phone before the title screen draws, see \"No Mac?\" below).\n\n`python3.12 nxs2.py doctor` (or the window's **Check tools** button) checks all of this and tells you how to get whatever\nis missing.\n\n## Common problems\n\n- **The title screen is black apart from its text on the first launch.** That is the shaders the game makes while it\n  runs, not a broken build: play a few minutes, then run `python3.12 nxs2.py setup` once (if you never have) and\n  `python3.12 nxs2.py refresh \"\u003Cbuild folder>\"`. Details: [the shaders, and what refresh is for](#the-shaders-and-what-refresh-is-for-read-this-too).\n- **On an 8 GB Mac the game freezes at a scene change and the screen later turns pink.** The Mac ran out of graphics\n  memory (the log says \"Insufficient Memory\"). Quit other apps, browsers above all, and start the game again; 16 GB is\n  the comfortable size for now.\n- **Mouse look stops while you hold movement keys on a MacBook's trackpad.** The trackpad ignores your finger while keys\n  are held down (palm rejection), so the game never sees the movement. An external mouse or a controller works.\n- **Mac: Pokopia Native Builder does nothing, and its log says `nxs2_gui.py: No such file`** (macOS 27, with a path\n  containing `AppTranslocation`). macOS ran the app from a temporary copy away from its folder, because the downloaded\n  folder is still marked as downloaded. Since 1.2.0 the app finds its folder by itself. With an older download, move the\n  whole unzipped folder somewhere else (into Documents, say) and open the app from there, or run\n  `xattr -dr com.apple.quarantine \u003Cthe unzipped folder>` in Terminal.\n- **Mac: `pip install` fails with \"externally-managed-environment\".** Homebrew's Python takes no pip packages of its own:\n  make the builder's environment as in \"What you need\" and install the packages there. The Builder app picks it up by\n  itself from 1.2.1 on.\n- **Windows: `pip install lz4` fails with \"Microsoft Visual C++ 14.0 or greater is required\".** Your Python is 3.15,\n  and lz4 has no ready-made package for it yet, so pip tries to compile it (the Visual C++ Redistributable is not what\n  it asks for). Install Python 3.14 from python.org beside it and run `py -3.14 -m pip install lz4 fonttools pillow`;\n  `Pokopia Native Builder.cmd` then uses 3.14 by itself.\n- **Windows: Setup or Build stops with \"No such file or directory\" (or \"cannot write in…\") for a file in its own\n  folder.** Windows Security's Controlled folder access, or an antivirus, is blocking Python in Documents, Desktop,\n  Downloads or Pictures. Move the unzipped folder and the build folder somewhere else, such as `C:\\Pokopia Native`, or\n  allow `python.exe` under Ransomware protection → Allow an app through Controlled folder access.\n- **Your dump is a single file** (.nsp, .xci or something else). The builder takes the game's files as folders, an\n  `exefs\u002F` and a `romfs\u002F`, or a `.nup` (see \"Your dump\" above); have your dumping tool extract the others.\n\n## Updating from an older version\n\nYour build folder, the shaders you have recorded and your save all carry over.\n\n1. Download the new version ([Which download do I need?](#which-download-do-i-need)) and unzip it into a new folder.\n2. Press **Setup** once in the new folder (or `python3.12 nxs2.py setup`). Every new download needs it once.\n3. Build again from the same dump. The build reuses your build folder (`\u003Cdump folder>_native`) and only redoes what\n   changed, so it is much quicker than the first time. Shaders you already recorded and refreshed stay.\n4. **iPhone:** sign the new IPA and install it **over** the old app. Installing over it keeps the app's Documents, which\n   hold your save and the game files. **Do not delete the app first**: deleting an iPhone app deletes its save with it.\n5. **Mac:** replace the app. Saves live in `~\u002FLibrary\u002FApplication Support\u002Fnxnative\u002F0400A3A01EE4C000\u002F`, outside the app.\n\nThe game files on the phone only need copying again if you moved to another update of the game (v327680 to 2.0.1,\nsay): run `tools\u002Fphone_setup.py --romfs \"\u003Cbuild folder>\u002Fextract\u002FRomFS.img\"` once more. Same game update, same dump:\nnothing to copy. Backing your save up first never hurts (Finder's file sharing for the phone, your Library folder on\nthe Mac). Link Play needs the same pokopia-native version on every device, so update them all.\n\n## Moving your save\n\nA Pokopia save is three folders: **`B00`, `G00` and `S00`**. Moving a save means copying those three folders from one\nplace to another, and the same save works everywhere: in an emulator, the Windows game, the Mac app and the iPhone app.\n\n**Before you copy:** close the game on both sides, and keep a copy of the save you are about to replace (a copy\nreplaces it; saves don't merge). A save that game version 2.0.1 has written may not load in 1.0.5.\n\n| Where | Its save folder (the one holding `B00`, `G00` and `S00`) |\n|---|---|\n| **Eden**, and emulators built on it such as **Eglantine** | Right-click Pokémon Pokopia in the game list → **Open Save Data Location**. On Windows Eden's is usually `%APPDATA%\\eden\\nand\\user\\save\\0000000000000000\\\u003Ca long user ID>\\0400A3A01EE4C000`; a portable install keeps it in the `user` folder next to the program. |\n| **Windows game** | `%APPDATA%\\Pokopia Native\\\u003Cgame version>\\save`, for example `…\\Pokopia Native\\2.0.1\\save` |\n| **Mac app** | `~\u002FLibrary\u002FApplication Support\u002Fnxnative\u002F0400A3A01EE4C000\u002Fsave` (Finder → Go → Go to Folder…) |\n| **iPhone app** | the `save` folder in the app's Documents, through file sharing (below) |\n\n**Into the Windows game:** **Import save…** in the builder window. **Yes** takes Eden's save on this PC by itself; **No**\nlets you choose any save folder: another emulator's, or one you copied off the iPhone or the Mac. The save that was\nthere is kept beside it as `save.before-\u003Cdate>`.\n\n**Into the Mac app:** quit it, then copy the three folders into its save folder above (make the `save` folder if it is\nnot there yet).\n\n**Into or out of the iPhone app:** fully close the app on the phone first (swipe it away in the app switcher), and open\nit again when you're done.\n- **With a Mac:** connect the phone and select it in Finder → **Files** → the Pokopia app. Drag its `save` folder out\n  (that's your backup, or the save to move). To put one in, drag a folder named `save` holding `B00`, `G00` and `S00`\n  onto the app and choose to replace.\n- **With Windows:** the **Apple Devices** app from the Microsoft Store (or iTunes) → your iPhone → **Files** → the\n  Pokopia app, the same way.\n\n**Into an emulator:** open its save folder with **Open Save Data Location** (start the game there once first if the\nfolder doesn't exist yet) and copy the three folders in.\n\n**Link Play:** a copied save is still the same save, and the game won't let two copies of one save play together. For\nco-op each player needs a save of their own.\n\n## The Apple developer thing (iPhone only, read this)\n\nPokopia is a big game. It reserves 11 GB of memory address space and actually uses several GB of it. To let an iPhone\napp do that, the app has to carry two Apple entitlements: **Increased Memory Limit** and **Extended Virtual\nAddressing**. Apple only grants the second one when the app is signed by a **paid Apple Developer Program** team (the\n99 a year one). An app signed with a free Apple ID, through AltStore, Sideloadly and the like, installs fine and then\nstops at start-up when the game cannot reserve its memory.\n\nI happen to have an Apple developer account, so I sign my build with my own team and never needed anything else. **I have\nnot tested any workaround.** If you know one, something that signs with a profile that carries that entitlement, you are\nfree to try it and I would like to hear whether it worked, in the issues. But I am not going to tell you it works when I\nhave not done it myself.\n\nWith a paid team, the flow is: `nxs2.py build ... --xcode --team-id \u003Cyour team>` then `nxs2.py sign`, and the signed\nIPA installs over USB. Your Apple ID has to be signed into Xcode once and your phone registered on the team (Xcode does\nthat itself when the phone is plugged in). The details are in [docs\u002FIPHONE.md](docs\u002FIPHONE.md).\n\nMemory on the phone itself matters too. The game uses a lot of it. I run it on an iPhone19,4 on iOS 27.2. If your\nphone has less memory than the recent Pro models, expect trouble.\n\n## How to build\n\nThere is a window and there is a command line; they do the same thing.\n\n**The window.** Clone or download the repository, then double-click **Pokopia Native Builder.app** on the Mac\n(**Pokopia Native Builder.cmd** on Windows). Press **Setup** once, choose your dump folder, tick what you want, press\n**Build**. The stages scroll by in the window with the elapsed time; **Refresh shaders** is the refresh step explained\nfurther down, **Open build folder** shows the outputs. If the app will not open, it tells you what to install (Python\n3.12 with Tk: `brew install python@3.12 python-tk@3.12`). A clone opens directly. A copy downloaded with a browser is\nblocked the first time, because the app is not signed by a registered developer: try to open it, then System Settings →\nPrivacy & Security → **Open Anyway** (or once in Terminal: `xattr -dr com.apple.quarantine \"Pokopia Native Builder.app\"`).\n\n**The command line.**\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FxFractals\u002Fpokopia-native.git\ncd pokopia-native\npython3.12 nxs2.py setup\npython3.12 nxs2.py build \"\u002Fpath\u002Fto\u002Fyour\u002Fdump folder\" --mac-app --ipa\n```\n\n`setup` fetches nxnative (the host this runs on, more below) at the exact commit this is made for, applies the Switch 2\npatch to it, and builds the shader lowering tool. About a minute.\n\n`build` does everything else. It creates a build folder **beside** your dump (`\u003Cdump folder>_native`; `--out` names\nanother place), and goes through these stages. If it stops or you stop it, run it again and it continues where it was.\n\n| Stage | What happens | Time on my M4 |\n|---|---|---|\n| extract | your ExeFS copied, the RomFS files packed into one image (6 to 7 GB) | seconds |\n| rewrite | the game's three code modules rewritten so Apple's kernel can run them (nxnative's `patch_nso.py`) | 20 s |\n| host | the Mac host compiled with this game's profile | 15 s |\n| corpus, lower, package | 4,012 shader programs found in the game files, lowered, packaged with their tables | 25 s |\n| chain | the Metal compile of every shader for the Mac and the phone | 30 to 45 min |\n| outputs | the Mac app, the IPA, or the Xcode project | 1 to 3 min |\n\nOutputs land in `\u003Cbuild folder>\u002Fout\u002F`:\n\n- `Pokemon Pokopia.app`: the Mac app. Double-click it, nxnative's settings window comes up (handheld or docked mode,\n  frame rate, upscaling), press Play. macOS asks once whether to open it (right-click → Open), because it cannot be\n  notarized: it maps the game's code as executable, which Apple's hardened runtime does not allow. Saves and logs go to\n  `~\u002FLibrary\u002FApplication Support\u002Fnxnative\u002F0400A3A01EE4C000\u002F` and `~\u002FLibrary\u002FLogs\u002Fnxnative\u002F`. The game files inside the\n  app are APFS clones of the image, so the app does not cost you another 6 GB on the same disk.\n- `PokemonPokopia-unsigned.ipa`: the iPhone app without the game files (they go to the phone separately, once; it takes\n  three minutes over USB). Or, with `--xcode --team-id`, an Xcode project to sign with your team. Again,\n  [docs\u002FIPHONE.md](docs\u002FIPHONE.md).\n\nUse `--no-ios` if you only want the Mac: it halves the compile. `python3.12 nxs2.py run \"\u003Cbuild folder>\"` plays straight\nfrom the build folder in a window, which is handy while you are fiddling with things.\n\n**The app icon.** Out of the box the apps get the blank default icon, because the game's own icon isn't part of a dump.\n`python3.12 nxs2.py icon \"\u003Cbuild folder>\"` makes one from your game: on a Mac it starts the game on a copy of your save,\ntakes a picture of the title screen and cuts the Pokopia logo out of it. It needs a save that is past the game's opening\n(play a little with `nxs2.py run` or the Mac app first, or point it at one with `--save \u003Cfolder>`). If you prefer, give\nit a screenshot of the title screen from your Switch 2 (Capture button):\n`nxs2.py icon \"\u003Cbuild folder>\" title.jpg`. Then build again with the same command; it only repacks the apps.\n\n## Windows: play on your PC\n\nNew in 1.1.0. The \"for Windows PCs\" download recompiles the game for your PC from your dump: our own recompiler turns the\ngame's arm64 code into x86-64 (through LLVM), and our own runtime runs it, with the Switch services ported from nxnative,\nthe graphics replayed on Vulkan and SDL3 for the window, input and sound. No emulator. As on the Mac, nothing of the game\nis in the download; the recompiled game and its shaders are made on your PC and stay in your build folder.\n\nYou need Windows 10 or 11 (64-bit) with an AVX2 CPU (2013 or newer), a Vulkan 1.3 graphics card, about 12 GB of disk,\nPython 3.12–3.14 with `lz4 fonttools pillow` (not 3.15 yet, see [Common problems](#common-problems)), the .NET 10 runtime and git. No compiler and no installer: the download brings\nits own tools. Then:\n\n```\npython nxs2.py setup --no-ios\npython nxs2.py build \"C:\\path\\to\\your dump folder\" --windows\n```\n\n(or the window: **Setup**, then **Build** with \"Windows: play on this PC\" ticked). It took 20 minutes on my PC (longer on a smaller one), most of it\nthe recompile, at idle priority. Then double-click `\u003Cbuild folder>\\out\\Play Pokopia \u003Cversion>.cmd`. Keyboard and mouse\nas on the Mac below, controllers as Switch controllers. Your save lives in `%APPDATA%\\Pokopia Native\\\u003Cversion>\\save`;\n**Import save…** in the window (or `nxs2.py import-save`) brings the one you have from Eden, the phone or the Mac. The\nfirst start draws a few things late while the game's run-time shaders are translated once. Everything else, including\nthe save and the controller check: [docs\u002FWINDOWS.md](docs\u002FWINDOWS.md).\n\n## No Mac? Windows builds the iPhone app\n\nA Windows PC can build the iPhone IPA (not the Mac app, and it cannot run the game: the game's code needs an Apple chip).\nIt uses the tools nxnative's Windows port put together: Apple's own Metal compiler for Windows for the shaders, LLVM with\nthe iPhone SDK for the app. The same window and the same commands, `--ipa` only. What to install and how to get the SDK\nis in [docs\u002FWINDOWS.md](docs\u002FWINDOWS.md). Signing still needs a paid team; the window signs on Windows too, with your\ncertificate (.p12) and development profile (**Sign IPA**, see docs\u002FWINDOWS.md).\n\nI tested the whole Windows route on my iPhone: built and signed on my PC, it plays like the Mac-built app. The one\ndifference is that a PC cannot run the game, so it cannot record the shaders the game makes while it runs (next\nsection). Your first run on the phone does that: the title screen is black apart from its text until you have played a\nfew minutes, pulled the recordings over and refreshed once. docs\u002FWINDOWS.md has the exact steps.\n\n## Playing together (Link Play)\n\nNew in 1.1.0. The game's **Link Play → Local connection** works between our builds: Windows, Mac and iPhone in any mix,\nup to four players, at home or over the internet. It never touches Nintendo's servers. (**\"Online connection\"** in the\nsame menu is Nintendo's own service: here it just goes back to the menu. Always pick **Local connection**.)\n\nBefore you start: every device runs **the same pokopia-native version**, every player has **their own save**, and the\nhost has reached the point in the game where Link Play opens.\n\n**On the same Wi-Fi**\n\n- **iPhone and Mac:** in the launcher (the settings shown before the game starts) turn on **Link Play on this network**\n  and allow local network access when asked. With the switch off, the game's Link Play does nothing.\n- **Windows:** start the game as usual; the window that opens first asks how you want to play: pick **Link Play with\n  players on this network**. When Windows Firewall asks, allow **Private networks**, and make sure your network is Private:\n  Settings → Network & internet → your connection → Network profile type: **Private**. On a Public network Windows keeps\n  the other devices out.\n- In the game: **Link Play → Local connection**. One player hosts; the others look for towns, and the host's appears in a\n  few seconds.\n\n**Over the internet** (tested: a PC hosting at home, an iPhone visiting on mobile data)\n\n1. **The host's router** must let visitors in: forward port **47600, TCP and UDP**, to the computer that hosts (the\n   router's \"Port forwarding\", \"NAT\" or \"NAT\u002FGaming\" page; check it points at the right device).\n2. **The host** needs a room code, a 16-character password for the session:\n   - **Windows:** pick **Host over the internet** in the window before the game starts. The next window shows your room\n     code with a **Copy** button.\n   - **Mac:** in the launcher turn on Link Play on this network and **Internet play**, leave Room code empty and start the\n     game once: the log (`~\u002FLibrary\u002FLogs\u002Fnxnative`) says \"this session's room code is …\". Type it into **Room code** to\n     keep it.\n   - Give the visitors the room code and your internet address (search \"what is my IP\" on the host's network).\n3. **The visitors:**\n   - **iPhone and Mac:** turn on Link Play on this network, type the host's internet address into **Join address**, turn on\n     **Internet play** and type the room code.\n   - **Windows:** pick **Visit a host over the internet** in the window before the game starts, and type the address and\n     the code.\n4. In the game: **Link Play → Local connection**, then look for towns.\n\n**Interact everywhere** (experimental, new in 1.2.0)\n\nOutside Palette Town the game puts everyone in a Link Play session in Spectator Mode: certain moves and items can't be used,\nand visitors can't build. **Interact everywhere** lifts that: in every town, a session gets the rules Palette Town has with\nSpectator Mode off, so visitors can water, pick up and place things, and build alongside the host.\n\n- Turn it on **on every device**: iPhone and Mac: the launcher's **Interact everywhere** (under Link Play); Windows: the\n  **Interact everywhere (experimental)** box in the window before the game starts. A device with it on only sees hosts that\n  have it on too.\n- The game still shows its own words: the host's settings show Spectator Mode On (greyed out), and the visitor is told everyone\n  will be restricted. The session is not restricted.\n- As in any Link Play visit, the town and its progress (challenges, building) belong to the host, and what a visitor picks up\n  goes home with them.\n- It is experimental: keep a copy of your save before a long session.\n\nGood to know:\n\n- **Internet play must match on every device.** With Internet play on, a device only sees hosts that have it on too\n  (with the same room code). For players on the same Wi-Fi, turn **Internet play off** everywhere; otherwise the game\n  says the destination cannot be found.\n- The iPhone app reads its settings when it starts. After changing them, **close the app completely** (swipe it away in\n  the app switcher) and open it again.\n- Every connection must prove the room code, and every message is protected against changes, but the traffic **is not\n  encrypted**. Remove the port forward when you are done hosting.\n- **No access to the router?** An app like Tailscale (free for personal use, on Windows, Mac and iPhone) puts your\n  devices on one private network across the internet, encrypted, with no port forwarding: install it on both devices,\n  then use the host's Tailscale address (100.x.y.z) as the Join address, with Internet play and a room code. (Not tested\n  yet; tell me how it goes.)\n- Something not working? The logs say what happened, in the lines about `coop` (Windows: the folder its console window\n  names; Mac: `~\u002FLibrary\u002FLogs\u002Fnxnative`; iPhone: the Files app → On My iPhone → the app → `log.txt`).\n\n## The shaders, and what \"refresh\" is for (read this too)\n\nHere is the one thing about this port that is not just \"build and play\", and I want to explain it properly so nobody\nthinks their build is broken.\n\nA Switch 2 game ships its shaders compiled for the Switch 2's GPU. They have to be translated for Metal, and that\ntranslation cannot happen on the fly on a Mac or a phone with this chain; it is done ahead of time, on the Mac, during\nthe build. That is the 30 to 45 minute stage. The build finds **every shader in the game's files**, 4,012 programs,\nand translates all of them. So far so good.\n\nBut Pokopia also **builds some shaders itself while it runs**. They are not in the game files anywhere; the game makes\nthem on the fly, apparently as it needs them. I know of **140** of these so far on 1.0.5, from the opening, the character\ncreator and the first area, and 2.0.1 makes **14 more** of its own (154 in all). A fresh build cannot contain them, because there is nothing to take them from until the game has\nrun. When the game asks for one that your build does not have, that draw is skipped: the game keeps running, but that\none effect or object is not drawn. Nothing crashes. Be warned though: the title screen itself uses about 20 of them, so\non the very first launch it is **black apart from the version number and \"Settings\"**. The music plays and A still\nworks. That is this, not a broken build, and it is gone after the first refresh.\n\nWhat the build does about it: the apps **record** every such shader the moment the game makes it (they have\n`DM_NVN_SHDUMP` on by default). Then you run\n\n```bash\npython3.12 nxs2.py refresh \"\u003Cbuild folder>\"\n```\n\nwhich finds the recordings, translates the new shaders (a couple of minutes, not another hour), and rebuilds whatever\noutputs your build folder has: the app, the IPA, the Xcode project. The Mac app's recordings are found by itself. The\niPhone's have to be pulled off the phone first with `tools\u002Fphone_pull.py` (two commands, in the iPhone doc). Then\nreinstall and carry on. Repeat when you reach new places and notice something missing. In my experience, after the\nopening and the first area you have the lot.\n\nThe build tells you where you stand: `shaders: 3813 from the game files; 0 of the 140 known run-time shaders` right\nafter the first build, and after a refresh with a full set of recordings `140 of the 140` (on 2.0.1: `154 of the 154`).\nThe known list is `profile\u002F0400A3A01EE4C000\u002Fruntime_keys.tsv`; it holds hashes only, so you can see how far you are,\nand no code. The ones only 2.0.1 makes are marked there, so a 1.0.5 build is not counted short for them.\n\nIf you find run-time shaders beyond these, your refresh handles them exactly the same way. Tell me about them in the\nissues, with the count the build prints, so the list can grow. Do not attach the recordings; they are game code.\n\n## Controls: mouse look on the Mac, drag to look on the iPhone\n\nThe game only turns its camera with the right stick, so out of the box a mouse or a finger can only fake holding a stick,\nand that feels like a console. I wanted it to feel like a PC or a phone game, so the build now has real look controls:\n\n- **Mac:** click the game picture and the mouse is captured. Move it to look around; left click is A, right click is\n  B, the middle button resets the camera. **Esc** gives the mouse back. Keyboard: WASD moves, J K U I are A B X Y, Q E\n  are L R, Z C are ZL ZR, Return is + and Tab is −. (On Windows these keys can be changed in the Controls tab of the\n  window before the game starts, docs\u002FWINDOWS.md; the Mac and the iPhone keep this layout.)\n- **iPhone:** drag anywhere on the right half of the screen that isn't a button, and the camera follows your finger.\n\n**Sensitivity and invert** are in the app's launcher under Controls (\"Look sensitivity\", \"Invert look up and down\"),\nor in `env.txt` as `DM_LOOK_SCALE` (1.0 = default) and `DM_LOOK_INVERT_Y=1`.\n\nHow it works, because it's not just \"mouse = stick\": faking the stick felt laggy, since Pokopia's stick tops out at\n110° per second and ignores anything below about half tilt. So the app found where the game keeps its camera's angle in\nmemory and sets it directly, every frame, right before the game draws. Moving the mouse or your finger a given amount\nturns the camera by exactly that amount (measured to a hundredth of a degree), with no speed limit, no smoothing and no\ndrift after you stop. Touches and mouse moves are time-stamped, so every frame gets an even share of the movement and a\nsteady pan stays steady. If the game ever takes the camera over, the app falls back to steering the stick for that\nmoment.\n\n## Phone settings and heat\n\nThe app reads `Documents\u002Fenv.txt` on the phone at start, one `KEY=VALUE` per line, and the build writes sensible defaults.\nThe ones worth knowing:\n\n| Switch | What it does |\n|---|---|\n| `DM_FPS=30` | frame-rate cap. 30 is the build's default and what the Switch 2 does in handheld for this game. 60 runs hotter. |\n| `DM_OPMODE=0` | handheld mode (default). `1` is docked: the game picks its higher resolution. |\n| `DM_RENDER_SCALE=0.8` | render at a fraction of the game's resolution, 0.5 to 1.0. Cooler phone, softer picture. |\n| `DM_TOUCH_AUTORUN=1` | the touch stick makes you run when pushed to its edge. My addition; I like it. |\n| `DM_LOOK_SCALE=1.5` | look sensitivity for drags (and the Mac's mouse), as a multiple of the default. Same as the launcher's slider. |\n| `DM_LOOK_INVERT_Y=1` | drag up to look down. |\n| `DM_SHOW_FPS=1` | frame counter on screen. |\n\nThe phone gets hot. At 30 fps mine reaches iOS's \"serious\" thermal state after about six minutes of play and stays\nwarm. `DM_RENDER_SCALE=0.8` is the first thing to try if that bothers you.\n\n## How this works, for the curious\n\n- The host is [nxnative](https:\u002F\u002Fgithub.com\u002Fseedds\u002Fnxnative), a project that runs Switch games natively on Apple\n  systems: it rewrites the game's executable so the Apple kernel accepts it, provides the Switch OS services the game\n  calls, and maps NVN (the Switch's graphics API) onto Metal. It did not know the Switch 2 at all. My changes teach it\n  the Switch 2 side of things: the newer SDK's system calls and services, the NVN2 entry points and texture layouts, the\n  Switch 2 shader format, and a translator fix or two. They are one patch against a pinned nxnative commit\n  ([host\u002FUPSTREAM.md](host\u002FUPSTREAM.md)).\n- Switch 2 shaders are a newer GPU instruction set than nxnative's shader chain understands. The\n  [Eden-NS2](https:\u002F\u002Fgithub.com\u002F0x2593\u002FEden-NS2) emulator has a decoder for them that lowers them to the older\n  instruction set, and `ampere-lower\u002F` here is a standalone build of exactly that piece, so the rest of nxnative's chain\n  (the Ryujinx translator, SPIRV-Cross, Apple's Metal compiler) can take over. While getting the picture to match the\n  console I found four bugs in that decoder (wrong colours, missing sun and cloud shadows, a crash); they are in a pull\n  request to Eden-NS2, and this tool carries the fixed code.\n- `profile\u002F0400A3A01EE4C000\u002F` is the game's recipe: identity and build IDs, the memory layout the game needs (it wants\n  11 GB), where in the files the shaders are, a handful of hand-made translation answers, the known run-time shader\n  keys, and the entitlements. Numbers and hashes; no game content.\n\n## Problems\n\n- Every stage writes its full output to `\u003Cbuild folder>\u002Flogs\u002F\u003Cstage>.log`. `nxs2.py -v` shows it live.\n- `nxs2.py status \"\u003Cbuild folder>\"` says what the folder has and what it still lacks.\n- A different Xcode than the one nxnative's lock names (27.2) is reported, not refused: the build uses your Metal\n  compiler and keeps its libraries apart. Mine is 27.0 and it is fine.\n- `[RED] shader \u003Ckey> is not in the shader map` in a run log is a run-time shader, see above, not a fault.\n- Ask in the [Discord](https:\u002F\u002Fdiscord.gg\u002FAj9GqxZj8V), or open an issue with the stage, the last lines of its log and your\n  Mac\u002FXcode versions. Never attach game files, build folders or recordings.\n\n## Licences and credits\n\nEverything here is MIT except `ampere-lower\u002F`, which is Eden-NS2 code and stays GPL-3.0-or-later (its own `LICENSE` and\n`NOTICE.md` are in that folder). The Windows download's prebuilt tools carry LLVM, SDL3, astc-encoder, bc7enc_rdo and\nSPIRV-Tools under their own licences, listed in its `windows\u002Fbin\u002FTHIRD-PARTY-NOTICES.txt`. The nxnative and Ryujinx code that `host\u002F` modifies and builds keeps their MIT notices,\nreproduced in [host\u002FNOTICE.md](host\u002FNOTICE.md). [LEGAL.md](LEGAL.md) is the full statement of what this repository\ncontains and never will, what the tool does not do (no decryption, no keys), and the trademark note: Pokémon and\nPokémon Pokopia belong to their owners, this is an independent fan project with no affiliation to Nintendo, The Pokémon\nCompany or Koei Tecmo, and the screenshots above are my own captures from my phone.\n\nThanks to the people behind [nxnative](https:\u002F\u002Fgithub.com\u002Fseedds\u002Fnxnative) and everything it is built from (d2r-mobile,\nRyujinx, SPIRV-Cross, glslang, Capstone, lz4, fontTools, XcodeGen), and to [Eden-NS2](https:\u002F\u002Fgithub.com\u002F0x2593\u002FEden-NS2)\nfor the Switch 2 shader work. I did this port with a lot of help from an AI assistant (Claude), over a couple of very\nlong weeks, with Switch 2 footage of the game as the reference for every picture.\n\nAnd once more, because it matters: your own copy, your own dump, your own build. Please do not share game files.\n","这是一个将《Pokémon Pokopia》（Nintendo Switch 2 游戏）从用户本地游戏镜像（dump）构建为原生跨平台应用的工具集，支持在 Windows、macOS（Apple Silicon）和 iOS（iPhone）设备上直接运行，无需模拟器。核心功能包括：基于 Metal（macOS\u002FiOS）和 DirectX\u002FVulkan（Windows）的原生图形渲染、跨设备存档同步、本地局域网及互联网联机对战（Link Play），所有构建过程在用户本地完成，不上传任何游戏数据。适用于拥有合法游戏镜像、希望在非任天堂硬件上获得低延迟、高保真体验的玩家，尤其适合多设备协同游玩场景。",2,"2026-11-10 04:32:34","CREATED_QUERY"]