Repository navigation
Breath of the Wild: a Game memory slider on the Mac (Default, then 4 to 12 GB) - #2284
Open
dontpokethebear3893 wants to merge 3 commits into
Open
dontpokethebear3893 wants to merge 3 commits into
dontpokethebear3893 wants to merge 3 commits into
Conversation
…fault then 4 to 12 GB) The game's nninitStartup asks for a fixed 3.05 GB heap whatever the application pool. Two stubs (patches.py, main+0x71c and main+0xc617c0) take the heap and the root arena from the state page (+0x310 / +0x318) and declare the GAME_HEAP capability, which offers the Mac launcher's Game memory slider. The host reads DM_MEMORY_GB when the game starts (hle_svc.c mem_sizes): an application pool of that many GB in place of the profile's app_pool when larger, the reservation grown by as much; loader.c writes the heap (the pool less 512 MB) only when the player raised it. At Default, on iOS and for other games nothing changes. No build option or profile key. The slider stops at 12 GB: at 16 GB on an M5 Max the GPU locked up twice within 80 s and WindowServer, waiting on it, was restarted by the watchdog; 12 GB ran without errors (one windowed run from a save outdoors, 11.5 GB heap). Front-ends: new: launcher.json ranges may carry unit (shown after the number instead of a percentage) and first (the label of the lowest value); settings.tsv conditions may join conditions with & Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 11, 2026
…ider # Conflicts: # dm/host/loader.c
Brings the branch up to date with main (fixes for the t_save_sync cloud device check and the clang-tidy fixture findings, among others) and resolves the conflicts with it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
Breath of the Wild's
nninitStartup(main+0x710) asks for a fixed 3.05 GB heap, whatever the application pool. That is enough at the Switch's 1080p, but not for a larger picture: at 5K the game's own heap returned null for a 328 MB request.This adds a Game memory slider to the Mac launcher (Performance). It starts at Default, the game's own size (3.2 GB), and goes up in steps of 2 GB to 12 GB. The build process is unchanged: no build option, no new profile key.
patches.py): two stubs take the heap (main+0x71c) and the framework's root arena (main+0xc617c0) from the state page (+0x310 / +0x318), and keep the game's own sizes when the host writes 0. They declare theGAME_HEAPcapability, which is what offers the slider.hle_svc.cmem_sizesreadsDM_MEMORY_GBwhen the game starts. A larger value replaces the profile'sapp_pool, and the address space reservation grows by the same amount, so the layout around the heap stays.loader.cwrites the heap (the pool less 512 MB for the modules) only when the player raised the pool.settings.tsvhas the row, shown withfixups:GAME_HEAP&platform:mac;settings.pynow accepts&between conditions.unit(shown after the number instead of a percentage) andfirst(the label of its lowest value). The shared Swift model uses both, so the slider reads Default (3.2 GB), 4 GB … 12 GB.Front ends
Front-ends: new:
launcher.jsonranges may carryunitandfirst(optional, schema 1;docs/frontends.md,docs/launcher.schema.json). A front end that does not know them shows the number as before.Checked
Tests:
make -C dm/host/tests GAME=01007EF00011E000 runpasses.make -k -C dm/gfx/tests GAME=01007EF00011E000 runpasses exceptcheck_t_dlss_scaler("nothing else keeps them alive"), which fails the same way onmain(01de04f).dm/tools/teststest_launcher_settings(with a new check: the row on the Mac with the capability only, in GB, its first stop the game's own size) andtest_nsp_mac_apppass.The launcher's labels: the shared model (
LauncherSettings.swift) compiled against the built app'slauncher.json:2.00counts as the default, and a saved16.00is not accepted.Games run: Breath of the Wild 1.9.0 (01007EF00011E000), from a save outdoors on the Great Plateau:
[RED]lines.application pool 12.00 GBandgame heap 11.50 GB. The world loaded, 60 fps held, and there were no[RED]lines and no GPU errors.gpuEventreports (firmware-detected lockup, the game's process blamed) 80 s and 98 s in. WindowServer's main thread waited on the GPU for 40 s and the watchdog restarted it. The cause is not found, so the slider stops at 12.Devices and OS: Apple M5 Max (48 GB), macOS 27.2.1.
Not checked: the 4–10 GB stops, a longer session at 12 GB, 12 GB in fullscreen, an output above 1080p with it (the Output resolution change is separate), Macs with less memory, and other games.
After the rebase on
main(6a6a018):make -C dm/host/tests GAME=01007EF00011E000 run,check_t_feedbackandcheck_t_reorder_chain(dm/gfx/tests) pass.dm/tools/testspasses:test_docs,test_patches,test_game_profile,test_env_switches,test_launcher_settings,test_settings,test_nsp_mac_app,test_fps_target,test_player_env,test_lint_candtest_gfx_tests_makefile.dm/ios/teststest_launcher_storagepasses.lint_python.py --against origin/mainreports one new finding,dm/gfx/tools/dmsh_entry.py:7(F401, an unused import).mainitself reports the same one, and this change does not touch that file.Docs
dm/games/01007EF00011E000/README.md, Memory on the Mac),docs/settings.md(Game memory), the switch indocs/env_switches.tsv, and the new fields indocs/frontends.mdanddocs/launcher.schema.json;python3 dm/tools/docs_symptoms.pyanddocs_patches.pywere run🤖 Generated with Claude Code