Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
2261a38
File pages under a buffer joining the residency set are wired by mloc…
seedds Nov 9, 2026
bfa1214
Where Metal's working set is under 8 GB, textures in GPU-only memory …
seedds Nov 9, 2026
3db7eb5
The power line names the threads that make clock waits, with their pr…
seedds Nov 9, 2026
aa82d4c
Ocarina of Time's note: the M1 iPad holds 20 fps at the Great Deku Tr…
seedds Nov 9, 2026
e0209b5
The present takes the shape of the game's crop: a crop whose width / …
seedds Nov 9, 2026
cf623ee
screen_aspect any: a profile's stubs follow any window or screen shap…
seedds Nov 9, 2026
021300a
Probe diagnostics for values the game caches: float arguments, a scan…
seedds Nov 9, 2026
d97bed7
Ocarina of Time fills any window or screen shape, live while playing:…
seedds Nov 9, 2026
a8fe89b
Ocarina of Time's HUD takes the output's shape at its own pixel size …
seedds Nov 9, 2026
2f2c543
Docs for any screen shape: Ocarina of Time's Screen shape section, th…
seedds Nov 9, 2026
6f4c427
file_wire keeps its list when growing it fails: the range it cannot r…
seedds Nov 9, 2026
1c92e40
A shader-code pool's own address keeps it out of the raw pool table: …
seedds Nov 9, 2026
66867a7
OoT3 2b: the frame step calls the GPU slowed only against a reference…
seedds Nov 6, 2026
fb9f13b
OoT5 A-4: a movie the player reads one picture per game frame follows…
seedds Nov 7, 2026
c855a8c
The frame step's GPU reference also matches compute dispatches, so Oc…
seedds Nov 9, 2026
d845268
Docs: Ocarina of Time plays on an iPhone 17 (27-30 fps in Kokiri Fore…
seedds Nov 9, 2026
0e303a6
iOS: a Rotation setting (Automatic, Landscape, Portrait) on the setti…
seedds Nov 9, 2026
e5bc342
iOS: upright, a game that renders any shape fills the space above the…
seedds Nov 9, 2026
7bfa426
screen_aspect any: upright, the vertical angle is held to a square pi…
seedds Nov 9, 2026
c4aae7a
iOS: Portrait layout, Full screen by default: upright, a game that re…
seedds Nov 10, 2026
e0f33bd
screen_aspect any: the shape line no longer adds "screen shape 16:9" …
seedds Nov 10, 2026
2e35fa7
Docs: portrait play on the iPhone (Rotation, Portrait layout, the upr…
seedds Nov 10, 2026
adb6431
OoT-iPhone A-2: a submission's end hands its records to the encode th…
seedds Nov 9, 2026
e73aaac
Frame step: late frames with the GPU idle do not step up, and a longe…
uncraftablexd Nov 9, 2026
1a273e8
OoT-iPhone B-2: frames late at a 30 fps cap's hold 2 are shown at the…
seedds Nov 9, 2026
99a52c8
OoT-iPhone B-3: the frame step's log lines name the cap, the longest …
seedds Nov 9, 2026
4850da5
OoT-iPhone B-2: the 60 Hz link that shows a 30 fps cap's late frames …
seedds Nov 9, 2026
3a625e5
OoT-iPhone B-1: why a 30 fps cap's late frames left a 66.7 ms gap abo…
seedds Nov 9, 2026
47412a7
OoT-iPhone B-3: the game-time line counts the switches to the next vs…
seedds Nov 9, 2026
2fa00c2
OoT-iPhone A (merge): the 20 graphics tests that build nvn_mtl.m and …
seedds Nov 10, 2026
1d91b35
OoT-iPhone B-1: the iPhone's numbers with late frames at the next vsy…
seedds Nov 10, 2026
d17df17
OoT-iPhone A-2 docs: the iPhone 17 frame's profile, the fix's A/B, an…
seedds Nov 10, 2026
f0e390e
DM_NVN_GPUPROF_GEOM=1 stamps each render pass where its vertex and me…
seedds Nov 8, 2026
0ca0186
OoT-iPhone A-1: DM_NVN_GPUPROF logs the host's CPU timeline beside a …
seedds Nov 9, 2026
e66db18
OoT-iPhone A-1 docs: the game note's iPhone 17 table names DM_NVN_GPU…
seedds Nov 10, 2026
3a181b6
test_env_switches passes again: DM_NVN_SUB_DRAIN has its row, and thr…
seedds Nov 10, 2026
1eac389
OoT-iPhone: test_oot_aspect's camera and shape helpers take a float c…
seedds Nov 10, 2026
8a8fb0b
OoT-iPhone: the Python lint baseline drops test_gpuprof.py's unused o…
seedds Nov 10, 2026
ed769e9
OoT-iPhone B-4: Ocarina of Time's smoke route, so regress.py check bo…
seedds Nov 10, 2026
4283410
Ocarina of Time's output-size stub keeps the size it hands the setter…
seedds Nov 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dm/games/01006F8002326000/patches.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,5 +233,5 @@ def screen_shape(ctx):
BINDING = [
{'what': "screen shape: the sizes, the view, the layouts' projection and their edge widgets (DM_SCREEN_ASPECT)", 'now': 'build', 'goal': 'game', 'purpose': 'rendering',
'why': "the output size is the host's, but where the game takes its sizes, its cameras and its layouts are this build's code",
'blocked': 'the stubs have no function-matched form yet'},
'blocked': "the stubs have no function-matched form yet (Ocarina of Time's screen-shape stubs, function-matched others of its frame-step rule, are the model)"},
]
58 changes: 57 additions & 1 deletion dm/games/0400486024DEC000/README.md

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions dm/games/0400486024DEC000/game.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ shader_note Ocarina of Time shaders
fps_target 60

# ---- Graphics ----
# Screen shape (patches.py, README "Screen shape"): the picture takes the window's or the screen's shape, any from 0.25 to 6, portrait included, and follows it while
# the game runs (DM_SCREEN_ASPECT, auto by default): wider shows more at the sides, taller more above and below; the HUD keeps its size
screen_aspect any
draw_barriers game
# As Tears of the Kingdom: the terrain's height, blend and hole maps are written by the CPU into textures after they are created. Without these keys they stay zero: holes in the ground and the wrong materials
tex_flush_upload on
Expand Down
158 changes: 156 additions & 2 deletions dm/games/0400486024DEC000/patches.py

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions dm/games/0400486024DEC000/smoke.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Empty save to the title: the pipeline prepare of a cold start (265 s for 14,748 pipelines on an M4 in quick mode, no game frame meanwhile), the logos, then the title
# with its movie (compute-heavy: the frame step and the movie clock at work). No input. quick has no prebuild, so it pays the prepare too; the full mode prebuilds first.
save new
keys
secs 400
quick 400
reach 900@360
window 340 50
shots 350,385
hang 30
1 change: 1 addition & 0 deletions dm/games/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ One row per profile; the notes are each profile's `README.md`.
| `device_api` | Optional, decided by the SDK version without it: the NVN API version `major.minor` that `nvnDeviceGetInteger` reports, 55.15 for SDK 11 and later (what Mario requires) and 53.313 for SDK 10 and older (`hle_nvn.c` `nvn_api`). Games check it and skip creating their device on a mismatch: Super Mario 3D World + Bowser's Fury (SDK 10) requires major 53 and minor ≥ 313. No profile sets it. `DM_NVN_API` overrides. Not part of the shader chain version (only `shader_*` keys are) |
| `depth_mode` | `gl` (the default, NVN's near = −w) or `zero` (near = 0): the depth mode the game sets with `nvnDeviceSetDepthMode`, for the pipeline bases made before the game runs: the [pipeline archive made offline](../../docs/development.md#the-pipeline-archive-made-offline) for the iPhone (`main0` or `main0_z` vertex entries; built for a game with `pso_mtl4 on` or with `DM_PSO_GPUS`) and the NSP script's Mac prebuild (`DM_PSO_PREBUILD_DEPTH`). The host itself follows the mode the game sets; a wrong value only costs the device its own prebuild. The heap and address region checks of a provisional or derived profile set it when their boot reaches the game's call; without that call they leave it, as no call means unknown, not GL. Keep the key when the profile moves into `dm/games`: it is no shader input. Great Ace Attorney Chronicles, 13 Sentinels (both releases), Big Brain Academy, Link's Awakening, Engage, ASTRAL CHAIN, Luigi's Mansion 3 and Octopath Traveler 0 set `zero` |
| `render_base` | The 3D views' base size, docked then handheld (`1600x900 1280x720`): what `DM_RENDER_SCALE` scales. `settings.py` writes it into the render scale's row of `launcher.json` as `base`, so a front end can show the setting in pixels. Only for a game with a render scale stub, and only a size its note documents. The slider's top is the stub's largest scale, which the rewriter writes as `RENDER_SCALE` in the fixups table (1.0, or 3.0 for Hades II, whose stub also raises its 1280x720) |
| `screen_aspect` | `off` (the default), `on` or `any`: the profile's stubs render the game in the screen's shape (`DM_SCREEN_ASPECT`, launcher setting *Picture shape*; `game.py` `DM_GAME_SCREEN_ASPECT` 0 / 1 / 2). `on` (Breath of the Wild, Animal Crossing: New Horizons): taller than 16:9 only, 1.3 to 1.77, set at the start; the host gives the game a taller output and layout size (`loader.c`, state +0x48..+0x9c). `any` (Ocarina of Time): any shape from 0.25 to 6, portrait included, followed while the game runs: the loader writes the ratio, size factors, a change count and the camera's multipliers (state +0xa0..+0xc8, `loader.c` `screen_any_write`) and the stubs scale the game's own output size, camera and HUD; the present shows the game's crop in its own shape |
| `op_mode` | The operation mode the game sees at start: `console` (the default, docked) or `handheld`. Super Mario Galaxy and Captain Toad: Treasure Tracker use `handheld`: docked, their pointer is the Joy-Con gyro, which the host does not have; handheld, it is the touch screen, which the iPhone front end feeds with the touches no gamepad control takes (in the 3D layout, outside the right third of the screen, which is the right stick; `DmGamepad.m`). Handheld also renders at 720p. `DM_OPMODE=0` / `1` overrides, also from `Documents/env.txt` |
| `perf_mode` | `follow` (the default): the performance mode follows the operation mode (Boost docked, Normal handheld); `boost`: Boost whatever the operation mode (`hle_oe.c`), a combination a Switch 1 never reports, so a profile choice. Rhythm Heaven Groove plays handheld with Boost: docked means a TV to the game, which then asks for a latency calibration, and only Boost gives its 1920x1080 draw size (handheld Normal draws 1280x720) |
| `pad_layout` | The iPhone virtual gamepad's layout on first launch: `simple` (the default) = 2D (left stick, A/B/X/Y, shoulders, − / +), `full` = 3D (adds a D-pad, a right stick and L3 / R3; the right stick is not drawn: a touch landing in the right third of the screen on no control holds it, centred where it lands), `touch` = Tap (no control but the layout button: every touch goes to the game's touch screen; needs `op_mode handheld`, Balatro). The layout button at the top centre goes to the next layout in game (Tap only in handheld mode) and the app remembers the player's choice (`DmGamepad.m`) |
Expand Down
2 changes: 1 addition & 1 deletion dm/games/game.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ def header_one(g):
f'#define DM_GAME_LAUNCH_PARAM {q(g.get("launch_param", ""))}', # what oe::TryPopLaunchParameter hands over once (hle_oe.c; a program another program of the application launches: Super Mario 3D All-Stars)
f'#define DM_GAME_MEM_MAP_LIMIT {int(mml == "on")}',
f'#define DM_GAME_STDALLOC_CAP {int(g.get("stdalloc_cap", "0"), 0):#x}ull', # StandardAllocator's address space with virtual address memory (hle_svc.c); 0 = what the alias region has room for
f'#define DM_GAME_SCREEN_ASPECT {("off", "on").index(g.get("screen_aspect", "off"))}', # stubs that follow a screen taller than 16:9 (DM_SCREEN_ASPECT): off / on
f'#define DM_GAME_SCREEN_ASPECT {("off", "on", "any").index(g.get("screen_aspect", "off"))}', # stubs that follow the screen's shape (DM_SCREEN_ASPECT): off / on (taller than 16:9, set at the start) / any (any shape from 0.25 to 6, followed while the game runs)
f'#define DM_GAME_DISPLAY_VERSIONS {vers}',
f'#define DM_GAME_PRESENT_DISPLAY {int(pi == "display")}',
f'#define DM_GAME_CORE_PREEMPT {int(cp == "on")}',
Expand Down
2 changes: 1 addition & 1 deletion dm/games/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def offered(v, n): # value=label?cond&cond: an option only some games or platf
if need not in table: sys.exit(f'settings.tsv:{n}: needs names a variable no row sets: {m["needs"]}')
can = table[need]
if can is not None and want not in can: sys.exit(f'settings.tsv:{n}: needs a value {need} never takes: {want} (it takes {", ".join(sorted(can))})')
if not shown(cond, n): continue
if not all(shown(c, n) for c in cond.split('&')): continue # every condition of <cond>&<cond>
s = {'env': var, 'kind': kind, 'section': section, 'label': label, 'note': note, 'default': value(default, n), **m}
if var == 'DM_RENDER_SCALE' and base: s['base'] = base # the render scale in pixels, for the console mode chosen
if kind == 'choice':
Expand Down
7 changes: 5 additions & 2 deletions dm/games/settings.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# default a value (a toggle's: 1 on, 0 off); DM_GAME_<NAME>: the host's own default from the game profile (game_profile.h, game.py); build:<VAR>: the IPA build's setting (build_ipa.sh)
# <ios>|<mac> selects the platform's default before resolving a profile macro or build variable
# shown always; DM_GAME_<NAME>!=<value> or ==<value>; fixups:<KEY>: main's rewriter table has that key (a stub in the game's build, patch_nso.py); languages>1 (more than one to pick, so also when the control data lists none); gfxapi:<API>: the packer's GFXAPI;
# platform:<ios | mac>: the app's platform (SETTINGS_PLATFORM, ios when unset), for a switch only that platform's front end reads
# platform:<ios | mac>: the app's platform (SETTINGS_PLATFORM, ios when unset), for a switch only that platform's front end reads; <cond>&<cond>: all of them
# section Game, Controls or Performance: a heading on the single settings screen. Rows appear in table order within each section
# Reset to tested defaults clears all launcher choices; values fixed by an env file stay
# label, note the setting's name and the line under it (may be empty; only for a setting with a cost: latency, memory, heat)
Expand All @@ -23,14 +23,17 @@ DM_UPSCALER choice game=Game's own,metalfx=MetalFX game DM_GAME_UPSCALER_N!=0 Ga
DM_LANG choice languages build:DM_LANG languages>1 Game Game language level=basic
DM_FULLSCREEN choice 0=Window,1=Fullscreen 0 platform:mac Game Display mode level=basic
DM_PICTURE_FIT choice fit=Fit,fill=Fill fit platform:ios Game Picture Fill crops the game's 16:9 picture to cover the screen. Health bars, subtitles or maps near the edges can be cut off. A full-screen picture without cropping needs a patch for each game.
DM_ROTATION choice auto=Automatic,landscape=Landscape,portrait=Portrait auto platform:ios Game Rotation
DM_PORTRAIT_LAYOUT choice full=Full screen,split=Picture above controls full DM_GAME_SCREEN_ASPECT==2&platform:ios Game Portrait layout
DM_SHOW_FPS toggle - build:DM_SHOW_FPS platform:ios Game Frame-rate counter
DM_TOUCH_HAPTICS toggle - 1 platform:ios Controls Touch feedback
DM_RUMBLE toggle - 1 always Controls Game rumble level=basic
DM_RUMBLE_GAIN range 0:3:0.1 1.0 always Controls Rumble strength needs=DM_RUMBLE=1
DM_RUMBLE_MIN range 0:0.9:0.05 0 always Controls Rumble cutoff
DM_PAD_PRESS_TO_JOIN toggle - 0 always Controls Press a button to join
DM_SW2 toggle - 0 platform:mac Controls Switch 2 controllers Plays Joy-Con 2 and Pro Controller 2 over Bluetooth: hold Sync on one during the game to pair it. macOS asks once for Bluetooth access.
DM_SCREEN_ASPECT choice auto=Match screen?platform:ios,1.43=iPhone Duo screen (1.43:1),0=16:9 (Switch) auto|0 DM_GAME_SCREEN_ASPECT!=0 Game Picture shape Renders about a quarter more pixels: a little slower and warmer.
DM_SCREEN_ASPECT choice auto=Match screen?platform:ios,1.43=iPhone Duo screen (1.43:1),0=16:9 (Switch) auto|0 DM_GAME_SCREEN_ASPECT==1 Game Picture shape Renders about a quarter more pixels: a little slower and warmer.
DM_SCREEN_ASPECT choice auto=Match screen?platform:ios,auto=Match window?platform:mac,1.777=16:9 (Switch) auto DM_GAME_SCREEN_ASPECT==2 Game Picture shape Match fills the screen or the window, wider or taller, with no bars: the picture shows more at the sides or above and below. 16:9 shows the Switch picture.
DM_PRESENT_SNAP toggle - DM_GAME_PRESENT_SNAP gfxapi:nvn Performance Frame buffering Up to one frame more display latency.
DM_PSO_MTL4 toggle - DM_GAME_PSO_MTL4|1 gfxapi:nvn Performance Metal 4 pipelines Keeps a pipeline archive; uses more memory.
DM_PSO_PREBUILD toggle - 1 gfxapi:nvn Performance Pipeline prebuild The first start waits a few minutes for it, once. needs=DM_PSO_MTL4=1
Expand Down
Loading
Loading