Repository navigation
Super Smash Bros. Ultimate 13.0.1 renders docked at 2560x1440 with the launcher's Resolution (DM_RENDER_SIZE) - #2233
Open
axl-devhub wants to merge 2 commits into
Open
axl-devhub wants to merge 2 commits into
axl-devhub wants to merge 2 commits into
Conversation
…e launcher's Resolution (DM_RENDER_SIZE): 25 stubs read the size from the state page, and the host scales the framebuffer and viewport records of the game's pipeline data where it reads them The game makes its render targets once at boot, from constants spread over its render setup (the target configuration, the screen size and its event, the window crop, object defaults, the width-to-index choice, the viewport scale's two divisors, the UI factor). Each site's stub (patches.py, main b9b166df…) takes its value from the state page and keeps the game's own words while the page holds 0. The other targets and the passes' viewports take their sizes from the loaded pipeline data: hle_render_size.c scales a record that follows the screen (not square, 16x8 to 1920x1080) once, at the two places the game reads them (OBS_RENDER_RECORD, OBS_RENDER_VIEWPORT). After MacNativeGames' games/ssbu port (MIT), whose notes name the sites at 13.0.2's addresses; each was checked again on 13.0.1 by disassembly. 13.0.1 is registered as a build for its stubs; its tables still come from the derived profile. 13.0.2 and 13.0.5 hold the same words at other addresses and were not run, so they have no stubs and the host refuses the setting there. Handheld keeps the game's size. The setting is the Resolution row PR seedds#1849 and PR seedds#2021 propose under the same name (DM_RENDER_SIZE, 0 = the game's own), here with the one size this game was checked at. Checked: MacBook Pro M5 Pro, macOS 27.0.1, a Mac app of 13.0.1 built from this commit (chain bc8830d4ba5a), a copy of a save, scripted A presses: 6,300 frames into a timed fight at DM_RENDER_SIZE=2560x1440, WindowCrop 2560x1440, framebuffer records 42 scaled, 23 kept and viewport records 243 scaled, 14 kept at the last log line (logged every 32), no red line, on-screen p99 16.67 ms in the settled windows, GPU p50 2.5-2.9 ms. test_patches (every stub runs the words it replaced with the page at 0), test_docs, test_env_switches, test_launcher_settings; make -C dm/host/tests run; lint_c tidy has no finding in the files touched. regress.py not run: the profile has no route, and the change is inert without the setting on this one build. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L61DN3B5QRpmGGhJXsPmZo
…s and narrows the stub's last branch, so ruff and pyright have no new finding (the one left, dmsh_entry.py's unused import, is main's) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L61DN3B5QRpmGGhJXsPmZo
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
Super Smash Bros. Ultimate renders docked at 1920x1080. On a Mac with GPU time to spare (GPU p50 under 3 ms a frame in a fight on an M5 Pro) a larger picture is the obvious use of it. This adds 2560x1440 for 13.0.1, chosen in the launcher as Resolution (
DM_RENDER_SIZE=2560x1440), docked only, read at start.The game makes its render targets once at boot, and the size is not one constant:
patches.py,mainb9b166df…): the target configuration, the screen size and its event, the window crop, object defaults, the width-to-index choice, the two divisors of the viewport scale and the three places that pick the UI's factor. Each reads the state page and keeps the game's own words while it holds 0, so 1080p runs what it ran before.hle_render_size.c, gatesOBS_RENDER_RECORD/OBS_RENDER_VIEWPORT): the other targets and the passes' viewports take their sizes from the loaded pipeline data. A record that is not square and from 16x8 to 1920x1080 follows the screen, and is scaled once where the game reads it. Squares (shadows, reflections, portraits) and the small helpers keep their size.The sites come from MacNativeGames'
games/ssbuport (MIT), whose notes give them at 13.0.2's addresses; each was found again on 13.0.1 and checked by disassembly.This is a build-keyed, game-specific change: I found no general rule, since the sizes are literals in the game's own code. The host refuses the setting on any other build with a red line.
The setting's name
#1849 (Hades II) and #2021 (Ocarina of Time) propose a launcher row Resolution under the same switch,
DM_RENDER_SIZE, with0for the game's own size. This uses the same name and the same0, with the one size checked here. The three rows will need to become one; I kept this one small so that is easy, whichever lands first. This PR does not use the state page field (+0x38) those two add: its stubs read +0xa0 / +0xa8, which the host writes for this build only.Checked
MacBook Pro M5 Pro (20-core GPU), macOS 27.0.1, a Mac app of 13.0.1 built from this commit on
a77c0ee8(chainbc8830d4ba5a), a copy of a save, scripted input:WindowCropEarlier, on
04811a63with the same code: the menus, the fighter select and timed fights at both sizes, about 0.6 % of frames dropped at 2K against 0.5 % at 1080p, load screens included.test_patches.py: with the page at 0, every stub runs the words it replaced, adrp pages included, and returns right after.test_docs.py,test_env_switches.py,test_launcher_settings.py,test_nsp_chain.pypass;make -C dm/host/tests runpasses;lint_c.py tidyhas no finding in the files touched (its two pairs above the baseline are indm/gfx/tests, as on main).docs_patches.pygets aHOST_BINDINGrow for the host's build check.Not checked
regress.py check: the profile has no route, and without the setting on this one build nothing changes (no chain or shared host path is touched).🤖 Generated with Claude Code
https://claude.ai/code/session_01L61DN3B5QRpmGGhJXsPmZo