r/decomps • • 9d ago

Preview Ocarina of Time Remake running on 4th gen Apple TV (2GB RAM Limit)

Took a little bit of effort customizing nxnative work for Mac / iPhone, but it is possible to get Ocarina of Time remake working on the new Apple TV (A19 processor with 8GB of RAM and 128GB storage, but tvOS apps are limited to only 2GB). Will put codex's changes in a comment since it required some unique changes that Macs and iPhones don't need.

2.7k Upvotes

209 comments sorted by

View all comments

71

u/balthierwings 9d ago • Diamonds are Forever Bravo Heartwarming

Directly from codex, will look to put up a PR for nxnative in a day or two if the maintainers want to accept tvOS platform changes:

  • Native tvOS port: built the app and Metal shaders for tvOS, added the TV icon, and fixed Siri Remote focus/navigation in the launcher.

  • Larger virtual address space: enabled extended virtual addressing so the game could reserve its required 12.5 GiB address range. That doesn’t grant more physical RAM.

  • Lower rendering resolution: configured handheld mode, dynamic resolution, a 30 fps target, and 640 × 360 scene rendering, followed by higher-resolution composition.

  • Smaller depth textures: patched the TV-specific game copy to reduce 12,288-square → 3,072-square and 4,096-square → 1,024-square depth buffers. This saved roughly 300 MiB.

  • Lower texture detail: omitted the two highest-resolution mip levels for eligible compressed textures—typically one-quarter the width and height.

  • Less retained graphics memory: reduced upload staging blocks from 32 to 8 MiB, upload batches from 128 to 16 MiB, released large completed scratch buffers, and disabled render-target heap recycling. Limited command allocators to two, balancing memory against performance.

  • Faster cleanup after camera changes: reduced obsolete render-target retention from three seconds to one, checking every 100 ms. The measured Saria transition peak fell from 2,086 to 1,886 MiB.

  • Movie playback fixes: used the original decoded movie frames instead of the expensive enhancement path, added decoder recovery after suspension, and disabled bulk pipeline prebuilding to reduce startup load.

8

u/systemhost 8d ago

Now this is what I call recompilation!

I'm sure this was a tremendous amount of time and effort even with AI and while the user base will be comparatively miniscule, it's a significant achievement and you should be very proud of everything you've accomplished.

Most people would've given up or refused to even try because "It's impossible with these hardware/software limitations" but not you... you knew once decompiled you could rebuild it to make it possible with just a few compromises here and there.

I was eagerly awaiting the 4th gen box release because I really hoped and expected they'd finally address features like DTS support and such but sadly they did not, just added more compute, memory, AI and a huge price hike.

But being able to play many of my favorite games on the new Apple TV would certainly help justify the $300 ask.