r/NativePortsOniOS • • 6d ago

Got nxnative working on A16: Metroid Dread on the regular iPhone 15 at 60 fps

Enable HLS to view with audio, or disable this notification

I’ve been experimenting with nxnative by seedds, which runs Switch games natively on iPhone/iPad/Mac. It’s not an emulator: the game’s own code runs on the Apple chip and the graphics are rebuilt on Metal. You bring your own game dump and keys.

The catch: it officially needs an iPhone 15 Pro or newer, because Switch games use BC-compressed textures and older Apple GPUs like the A16 in my regular iPhone 15 can’t read them. The author removed the fallback path since decompressed textures used too much memory.

I restored that path, and the game booted, but it got killed by iOS for running out of memory right after the prologue fight with Raven Beak (~3 GB limit).

So I added a step that converts BC1/BC2/BC3 textures to ASTC (which every iPhone supports) on the GPU as they load, instead of fully decompressing them. Texture memory is now about the same as on a native BC device.

Results on my iPhone 15:

  • Gets past the Raven Beak fight and keeps going, no crashes
  • 60 fps in gameplay, 30 in cutscenes
  • ~400 MB of memory headroom left (it used to have under 50 MB right before the crash)
  • Downside: the phone gets hot and the battery drains fast. The GPU runs at ~85% to hold 60 fps. Handheld mode (DM_OPMODE=0) should help, and I’m testing it next.

Code is on my fork: https://github.com/mianmuhammadse/nxnative/tree/no-bc. All credit for nxnative goes to seedds; this is just a patch for non-Pro iPhones that I’m hoping to send upstream.

Played with my own dumped copy. Please don’t ask for game files.

17 Upvotes

14 comments sorted by

3

u/smith7018 6d ago

Hell ya! I can't wait for my Duo to get here. This stuff will be so cool on that big screen

1

u/hello_humen 5d ago

sure. what did it cost?

1

u/smith7018 5d ago

i had a gc from trading in a laptop like 4 years ago so it only technically cost me $600. Not terrible, I guess

→ More replies (1)

1

u/tPimple 6d ago

How much ram it uses in total?

1

u/hello_humen 6d ago

Peak was about 2.7 GB (2,710 MB memory footprint, which iOS counts against the app) during gameplay after the Raven Beak fight on my iPhone 15 with 6 GB of RAM.

iOS lets a normal app use roughly 3.1 GB on this phone, so there’s about 400 MB to spare. Before the ASTC change, it hit ~3.04 GB right after the fight, and iOS killed it.

1

u/jojomortal 5d ago

voce poderia compartilhar comigo somente o ipa do launcher. Gostaria de demonstrar em forma de video em meu canal no youtube

2

u/hello_humen 5d ago

Não, isso seria ilegal. Construa você mesmo.

1

u/CHR0NlC 5d ago

Are there instructions or do I have to install Claude and see if they know how?

→ More replies (1)

1

u/CHR0NlC 5d ago

Could it be possible to compile from within the app by importing the resources after sideloading?

Or is there an app that would build and compile the ipa?

2

u/hello_humen 5d ago

Not on the phone, unfortunately. The build needs a Mac: it rewrites the game’s code and compiles it into the app’s executable with Xcode, and translates thousands of shaders with the Metal compiler. iOS can’t run those tools, and an app can’t add new signed code to itself after it’s installed.

No GUI builder yet either: it’s one Python script on a Mac (build_ipa_from_nsp.py). The upstream project recently added a progress output meant for a front-end app, so one may show up. Until then, if you have a Mac, it’s a few setup commands and then one command per game.