Skip to content

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
seedds:mainfrom
axl-devhub:smash-render-size
Open

axl-devhub wants to merge 2 commits into
seedds:mainfrom
axl-devhub:smash-render-size

Conversation

@axl-devhub

Copy link
Copy Markdown

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:

  • 25 stubs (patches.py, main b9b166df…): 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.
  • Framebuffer and viewport records (hle_render_size.c, gates OBS_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/ssbu port (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, with 0 for the game's own size. This uses the same name and the same 0, 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 (chain bc8830d4ba5a), a copy of a save, scripted input:

2560x1440
WindowCrop 2560x1440
frames 6,300, into a timed fight
red lines / FATAL 0 / 0
on-screen p99, settled windows 16.67 ms
GPU p50 2.5-2.9 ms
records at the last log line framebuffer 42 scaled / 23 kept, viewport 243 scaled / 14 kept

Earlier, on 04811a63 with 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.py pass; make -C dm/host/tests run passes; lint_c.py tidy has no finding in the files touched (its two pairs above the baseline are in dm/gfx/tests, as on main).
  • docs_patches.py gets a HOST_BINDING row 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).
  • 13.0.2 and 13.0.5: the same words at other addresses, not run here, so no stubs.
  • Handheld (keeps the game's size by design), iOS, long sessions, online or 8-player fights, memory on a 16 GB Mac.

🤖 Generated with Claude Code

https://claude.ai/code/session_01L61DN3B5QRpmGGhJXsPmZo

…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
@github-actions github-actions Bot added host The Horizon host: SVCs, services, threads, memory (dm/host) rewriter The NSO rewriter and per-build patches tools Tools and scripts (dm/tools, scripts) docs Documentation game: 01006A800016E000 Super Smash Bros. Ultimate labels Nov 10, 2026
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation game: 01006A800016E000 Super Smash Bros. Ultimate host The Horizon host: SVCs, services, threads, memory (dm/host) rewriter The NSO rewriter and per-build patches tools Tools and scripts (dm/tools, scripts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant