Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
2af56c5
Unreal Engine 5.6 Switch 2 shader records (SF_GLSL_SWITCH2)
uncraftablexd Nov 5, 2026
eb40054
shader: Ampere instructions and fixes from Orbitals, PRAGMATA and Don…
uncraftablexd Nov 5, 2026
8ff8fc3
shader: compute threads that exit before a barrier keep taking part i…
uncraftablexd Nov 5, 2026
455b6ea
dmsh_build: scalar storage-buffer loads keep their index
uncraftablexd Nov 5, 2026
ca227f5
shader: NVN2 compute c0 with two push blocks; push-constant storage b…
uncraftablexd Nov 5, 2026
8b4707b
Shader build: a simdgroup-scope fence after each threadgroup store
uncraftablexd Nov 5, 2026
5362d0f
host: GPU watchdog; the shaders of a stuck or failed submission are n…
uncraftablexd Nov 5, 2026
319ebe3
host: clamp GPU-written indirect dispatch counts
uncraftablexd Nov 5, 2026
61745aa
hid: the controller applet disconnects controllers past its maximum
uncraftablexd Nov 5, 2026
070f700
NVN2: fence and acquire syncs cover only their own queue's work
uncraftablexd Nov 5, 2026
888c4f2
NVN: 32-bit integer buffer and linear textures get the format-view us…
uncraftablexd Nov 5, 2026
ee62cc2
host: report a SyncWait that times out
uncraftablexd Nov 5, 2026
6120968
GameChat: nn::chat::Initialize answers success
uncraftablexd Nov 5, 2026
add19a4
nvn: Metal host work for Orbitals and Donkey Kong Bananza (feedback s…
uncraftablexd Nov 5, 2026
0c833c7
mac: display link rescue after the window is visible; fullscreen on a…
uncraftablexd Nov 5, 2026
1bfde97
host: NVN2 builder getters, ListFrameHistory, H.264 parameter sets, h…
uncraftablexd Nov 5, 2026
5baf078
host: a copy into a block encoder's integer texture in a CPU_NO_ACCES…
uncraftablexd Nov 5, 2026
b6f59ac
Pipelines with integer bits in float colour outputs are built whole, …
uncraftablexd Nov 5, 2026
4ac6b10
Translator binaries and chain 74287e9f3a31
uncraftablexd Nov 6, 2026
c432a5a
Orbitals (040004F027560000, Switch 2 v327680): game profile, note, ga…
uncraftablexd Nov 5, 2026
c762655
Reference entries for the Orbitals bring-up
uncraftablexd Nov 5, 2026
6c43f01
t_thermal checks the cap with its own 60 fps target, not the profile's
uncraftablexd Nov 4, 2026
16c42ab
shader: LDC .IS / .ISL with Ra = RZ, FMNMX.NAN, and PRAGMATA's LDC.64…
uncraftablexd Nov 5, 2026
0b636dd
Deferred writes: a register written again starts its shadow from the …
uncraftablexd Nov 5, 2026
1138f81
Mesh stage: find the kernel's stage memory after the loop guard's cou…
uncraftablexd Nov 5, 2026
00ba624
Mesh stage storage buffers: the hull stage's c0 table (0x210) for a m…
uncraftablexd Nov 5, 2026
bcd9f67
shader_split: RE Engine KPKA 4.2 packages and Switch 2 SDF shader def…
uncraftablexd Nov 5, 2026
297a8f0
shader: Ampere SURED.MAX.U64 / MIN.U64 as Metal 64-bit texture atomics
uncraftablexd Nov 5, 2026
db821a7
Emit integer add, subtract and multiply on uint so overflow wraps
uncraftablexd Nov 5, 2026
dd9cfbf
Build matchers accept the wrapping spelling of integer add and multiply
uncraftablexd Nov 5, 2026
9d7e39c
Keep a loop exit's subgroup block in the iteration that left the loop
uncraftablexd Nov 5, 2026
62d2889
Mesh stage memory: room for per-primitive system values, primitive bl…
uncraftablexd Nov 5, 2026
206d25b
Mesh stage: hand the per-primitive id to Metal as the primitive's [[p…
uncraftablexd Nov 5, 2026
eca874d
shader_split: read the NVN2 shaders in RE Engine's OCIO colour manage…
uncraftablexd Nov 5, 2026
7ff20b2
Ampere I2F: the immediate form has no byte select
uncraftablexd Nov 5, 2026
3c5c595
dmsh_build: one-lane subgroups for domain shaders too
uncraftablexd Nov 5, 2026
d1faa2a
Ampere ISBERD: .O reads of the stage output area in task and mesh sha…
uncraftablexd Nov 5, 2026
512993a
Ampere SUATOM.CAS (0x595, bindless 0x396)
uncraftablexd Nov 5, 2026
1b7b50a
Barycentric coordinates: attributes 0x3a8 (no perspective) and 0x3b4
uncraftablexd Nov 5, 2026
a526344
Ampere IPA.OFFSET: interpolation at an offset from the pixel centre
uncraftablexd Nov 5, 2026
8a08103
Tests for the PRAGMATA translator fixes
uncraftablexd Nov 5, 2026
e9ba2af
NVN2 sample position table: signed offsets from the pixel centre
uncraftablexd Nov 5, 2026
62e66d5
DrawMeshTasksIndirect: draw it, converting the GPU-written record bef…
uncraftablexd Nov 5, 2026
1a84fe8
Integer entry point for pixel shaders that write integer bits through…
uncraftablexd Nov 5, 2026
a9ddbd8
NVN2 push constants: the block word picks the block (compute block 1,…
uncraftablexd Nov 5, 2026
9414f12
Loop guard: a loop with a barrier counts its own iterations
uncraftablexd Nov 5, 2026
80a5c33
MEMBAR becomes a device-scope fence, not a threadgroup barrier
uncraftablexd Nov 5, 2026
c5ac943
Float slots on integer textures get a float view of the same bytes (D…
uncraftablexd Nov 5, 2026
a384ea5
Send loads through the memory pool table when a phi source of their a…
uncraftablexd Nov 5, 2026
72d9ac1
Bind buffers in sparse pools through their physical pages
uncraftablexd Nov 5, 2026
8f3dc1a
Sparse pools: bind buffers in several physical pieces through their m…
uncraftablexd Nov 5, 2026
2774e4c
docs: regenerate the symptom index
uncraftablexd Nov 5, 2026
7273f25
shader: one handle read 2D and 2D array declares the array; the 2D re…
uncraftablexd Nov 5, 2026
b31cece
Reference entries for the PRAGMATA bring-up
uncraftablexd Nov 5, 2026
de855e3
PRAGMATA (0400C76024710000): game note
uncraftablexd Nov 5, 2026
7540af7
Translator binaries and chain 7bdd33b7caf2
uncraftablexd Nov 6, 2026
8651e68
Host memory safety: no page or pool-table change under live GPU work …
uncraftablexd Nov 5, 2026
b93d4d5
Swizzled textures are deswizzled on the CPU by default; DM_NVN_DESWZ_…
uncraftablexd Nov 5, 2026
d227b45
DM_NVN_BREADCRUMB: name the dispatch in flight at the first command-b…
uncraftablexd Nov 5, 2026
dbb3531
DrawMeshTasksIndirect: read each proven record type from workgroup 0,…
uncraftablexd Nov 5, 2026
9f9dcdb
PRAGMATA (0400C76024710000): status after the tower ring; open issues
uncraftablexd Nov 5, 2026
39f0553
Residency: a removed allocation lives until its removal is committed
uncraftablexd Nov 5, 2026
32b60a9
Pool entries: drain the autorelease pool where they are made
uncraftablexd Nov 5, 2026
8a1c3a6
Sparse pools: keep 8 physical-run lookups per thread
uncraftablexd Nov 6, 2026
7ec2c66
Profile key fb_pool_dread: texture-pool shaders as depth readers, per…
uncraftablexd Nov 6, 2026
3f0b70f
nvn: read CPU-rewritten read-only storage from one copy per frame
uncraftablexd Nov 6, 2026
87da298
0x80d: Kirby's guard band cull and PRAGMATA's CSMTEST both translate
uncraftablexd Nov 6, 2026
267cec1
Ampere ALU: SETP pairs on their accumulator, IMAD's B, directed round…
uncraftablexd Nov 6, 2026
7340444
Ampere ALU: IADD3's carry predicates, PLOP3's second result, POPC / F…
uncraftablexd Nov 6, 2026
00f144b
Fix Ocarina of Time foliage jitter by preserving live shader inputs
uncraftablexd Nov 6, 2026
8eb9bac
Translator: PIXLD.COVMASK reads the pixel's coverage mask
uncraftablexd Nov 6, 2026
7eb4181
Diagnostic loop guard: loops that run out name themselves
uncraftablexd Nov 6, 2026
8ff901a
Diagnostic loop guard: pool-table miss reports, GMEM_POISON, the frag…
uncraftablexd Nov 6, 2026
0c6feb4
dmsh_dsl: the data_sized_loop analysis in the build's tools
uncraftablexd Nov 6, 2026
a5f4bbb
Automatic loop guard: data-sized loops report through the debug buffe…
uncraftablexd Nov 6, 2026
3c5d636
Host: the loop guard's buffer for library shaders with automatic sites
uncraftablexd Nov 6, 2026
ae52c66
dmsh_dsl / dmsh_loopdiag: no new lint findings
uncraftablexd Nov 6, 2026
3341821
Translator binaries and chain 29cc394f89fe
uncraftablexd Nov 6, 2026
af568a4
DM_MSL_OVERRIDE: load a side-built shader library from a plain folder
uncraftablexd Nov 6, 2026
59e4680
Mesh shaders that also write their vertices as records no longer over…
uncraftablexd Nov 6, 2026
4221b93
test_dmsh_hmma: the LDSM row address in either multiply spelling
uncraftablexd Nov 6, 2026
996be04
Translator binaries and chain bab9601ce9cf
uncraftablexd Nov 6, 2026
e31d682
MUFU.SIN and MUFU.COS of a large number of turns keep their fraction …
lunks Nov 4, 2026
1fd3301
Translator binaries and chain 916e8d674d87
uncraftablexd Nov 6, 2026
2c479a2
Large pools: a pool-table segment takes the buffer of a lookup chunk …
seedds Nov 7, 2026
b06ea7b
Large pools: one buffer over the whole pool once its chunks and segme…
seedds Nov 7, 2026
fbeacf8
Large pools: a grown pool keeps its whole-pool buffer as a wide entry…
seedds Nov 7, 2026
9e103a6
docs: large pools held twice in the residency set (memory.md), PRAGMA…
seedds Nov 7, 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
95 changes: 50 additions & 45 deletions README.md

Large diffs are not rendered by default.

69 changes: 69 additions & 0 deletions dm/games/040004F027560000/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Orbitals (`040004F027560000`)

A Switch 2 game: v327680, SDK 21.4.2 built for the Switch 2 (`Ounce`), NVN2 (Ampere shaders). Unreal Engine 5.6.1 with Niagara particles and GPUScene instance culling, Wwise 2024.1, Bink movies. Modules `main`, `subsdk0` (movies) and `sdk`. A co-op game for two players, played split-screen. **Plays on the Mac**: from the title through the lobby, the character select and the intro cutscene into the first area and stage 2, both players driven, at the game's own 30 fps. No IPA has been built.

## What it needs

SDK 21's audio, which came with Star Fox (#1259): Wwise 2024.1 uses SDK 21's queued `HardwareOpusDecoderManager` and `nn::audio` OutputStream ([SDK 21's hardware Opus decoder manager](../../../docs/reference/audio.md#sdk-21s-hardware-opus-decoder-manager), [SDK 21's OutputStream on a virtual output device](../../../docs/reference/audio.md#sdk-21s-outputstream-on-a-virtual-output-device)). Without them the game aborts at boot (`nn::diag abort: Result 0xe15`, sdk+0x322660). With them it plays to stage 2 with sound: 0 underruns after the first seconds.


| Setting | Where | Why |
|---|---|---|
| `mem_alias 0x1000000000`, `mem_reserve 0x1028000000`, `mem_stack 0x10000000`, `app_pool 0xCD500000` | [`game.tsv`](game.tsv) | Unreal's 62 GB address region in `nninitStartup` and FMallocBinned3's 37 GB of it: a 64 GB alias region on the Mac ([memory](../../../docs/reference/memory.md)) |
| `sys_resource 0x1400000` | `game.tsv` | the NPDM declares 20 MB, so virtual address memory is on |
| `zip_store .bk2:.pak:.ttf:.txt:.ucas:.utoc:.metallib` | `game.tsv` | the RomFS's files are compressed already |
| `shader_groups ShaderArchive-Global-=global ShaderArchive-=game` | `game.tsv` | the engine's global shaders and the game's material shaders |
| `draw_barriers game` | `game.tsv` | Unreal orders its own passes with NVN barriers; full barriers serialised about 54 full-screen passes a frame (15 -> 18 fps at the character select) |
| `enc_thread on` | `game.tsv` | the 3D scenes draw about 10,000 times a frame |
| `fps_target 30` | `game.tsv` | the game's own rate, which the Switch 2 holds; see [Frame rate](#frame-rate) |

## Files

- A dump folder (`exefs/`, `romfs/`, no NACP, so the app takes its name from the profile): a RomFS of 9.86 GB, 53 files. `Orbitals/Content/Paks/Orbitals-Switch2.{utoc,ucas}` (the 6.8 GB IoStore container), `Orbitals-Switch2.pak`, `global.{utoc,ucas}`, 35 Bink movies.
- `main` build `84dc546cd0896d09582f02293c4edbce`, `sdk` `daa31832ca979cdfbe07b3b09488d8e0`, `subsdk0` `caf9437bacb2aa161d837d5886f19ae8`.

## Shaders

- 23,432 in [`shader_map.tsv`](shader_map.tsv) (3,415 compute, 3,556 vertex, 16,459 pixel, 2 geometry), from the two IoStore shader libraries `ShaderArchive-{Global,Orbitals}-SF_GLSL_SWITCH2-SP_GLSL_SWITCH2` (Oodle). All 23,432 translate (current; checked with this tree's translator on 2026-11-05).
- Shader keys map to Unreal shader names: a key's `#UE<n>` in `shader_map.tsv` is line n of the archive's `.usf|` strings. For example `a958e514cc3f4431` is `FBuildInstanceIdBufferAndCommandsFromPrimitiveIdsCs`, `d032ce5090303e01` the GPU radix sort's downsweep, `e97d65cf4844ecdb` the player ship's base pass (`M_Cel_Base_PlayerShip`), `2dab9fff04ddd58a` the homing missile's thruster mesh.
- The prewarm seed list, [`pso_manifest.tsv`](pso_manifest.tsv) (3,078 lines: 1,344 shaders, 1,523 render pipelines, 211 compute pipelines), is the Mac's device list of the play sessions of 2026-11-04.

## Rendering

- Frame time in stage 2 with both players flying and firing: 33.3 ms at 30 fps, GPU about 21 ms, submit and present about 10 ms (M4 Pro, 2026-11-04 and 2026-11-05).
- What the Switch 2 shows was checked against a published co-op walkthrough (YouTube `-a5HMPJueu8`, chapter 2 at 944 s): the stage 2 start matches, with the vertical light columns on the right.
- One `[RED]` line a run: `vertex attribute format 0x27 (8 / 8-bit integer) feeds a float input`, converted on the CPU, with no visible effect.

## Frame rate

- **Current:** the game's own 30 fps. Its config sets `t.MaxFPS 30` and `rhi.SyncInterval 2`. The Switch 2 holds an even 30 here: in a 60 fps capture of it, 173 of 182 frames are 33.3 ms apart.
- On the Mac at 30: 1,198 of 1,199 presents are two refreshes apart, and the power line reads 30.0 fps.
- 60 is possible: the rewriter finds both variables by name (`t.MaxFPS` at `main+0x9cd50d0`, `rhi.SyncInterval` at `main+0x9b87290`, in main's fixups) and `hle_fpslock.c` writes 60 and interval 1. Unlocked, the M4 Pro gave 55-59 fps with missed refreshes and the game ran at 0.92 of real time, so the profile keeps 30.

## Driving it on the Mac

Both players are needed: `DM_CTL` lines `p2:<keys>` drive player 2. Pressing `A` then `p2:A` every 0.7 s from 3 s goes through the logos, the title, the menu (PLAY LOCAL), the lobby (each player joins with A; START is B) and CONTINUE; gameplay starts about 60 s after boot from a save at stage 2. The character select takes Left, A, `p2:Right`, `p2:A`. In the intro cutscene both players hold B at the same time to skip it. Set `DM_FOCUS_KEEP=1` for scripted runs.

## Open

- The engagement scene in stage 2 is darker than on the Switch 2: the asteroids and the drone show as silhouettes.
- The game reports itself as a trial (Friend's Pass); the local co-op path is not gated by it.
- An IPA: the 64 GB alias region is over iOS's limit.
- Not checked: game speed at 60 over a fixed route, memory over a long session.

## Found on this game

- [Unreal Engine 5.6 Switch 2 shader records](../../../docs/reference/shaders.md#unreal-engine-56-switch-2-shader-records): the shader split.
- [VOTEU writes the uniform predicate](../../../docs/reference/shaders.md#voteu-writes-the-uniform-predicate): flat purple and cyan blobs at the ships (the thruster meshes read the wrong particles).
- [Warp-synchronous shared memory without a barrier](../../../docs/reference/shaders.md#warp-synchronous-shared-memory-without-a-barrier): broken Niagara beams and one-frame view flashes.
- [Integer bits in a float colour output in a specialized Metal 4 pipeline](../../../docs/reference/rendering.md#integer-bits-in-a-float-colour-output-in-a-specialized-metal-4-pipeline): the player ship dark while engaging, loading dark then popping in.
- [32-bit integer buffer and linear textures re-created every frame](../../../docs/reference/rendering.md#32-bit-integer-buffer-and-linear-textures-re-created-every-frame): a texture upgrade every frame.
- [A rescue's display link is made only once the window is visible](../../../docs/reference/frame-rate.md#a-rescues-display-link-is-made-only-once-the-window-is-visible).
- [Ampere instructions of Unreal Engine 5.6's Switch 2 shaders](../../../docs/reference/shaders.md#ampere-instructions-of-unreal-engine-56s-switch-2-shaders): 19,720 of 23,432 shaders left out at first; black backgrounds.
- [A scalar storage-buffer load that lost its index](../../../docs/reference/shaders.md#a-scalar-storage-buffer-load-that-lost-its-index): the title's black 3D background.
- [Compute threads that return before a barrier](../../../docs/reference/shaders.md#compute-threads-that-return-before-a-barrier): GPU hangs.
- [NVN2 compute `c0` with two push blocks](../../../docs/reference/shaders.md#nvn2-compute-c0-with-two-push-blocks).
- [The GPU watchdog and GPU-written dispatch counts](../../../docs/reference/nvn-objects.md#the-gpu-watchdog-and-gpu-written-dispatch-counts).
- [NVN2 fence and acquire syncs cover their own queue](../../../docs/reference/nvn-objects.md#nvn2-fence-and-acquire-syncs-cover-their-own-queue).
- [More controllers than the controller applet's maximum](../../../docs/reference/services.md#more-controllers-than-the-controller-applets-maximum): the lobby reopened the applet forever.
- [Unreal Engine 5.6's Switch 2 platform layer at start](../../../docs/reference/services.md#unreal-engine-56s-switch-2-platform-layer-at-start): the abort after `nn::chat::Initialize`, and three frames then a wait in `FFrameEndSync`.
1 change: 1 addition & 0 deletions dm/games/040004F027560000/bf_want.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# generated
51 changes: 51 additions & 0 deletions dm/games/040004F027560000/game.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Orbitals (Switch 2, v327680). Plays on the Mac: see README.md
# Unreal Engine 5.6.1, SDK 21.4.2 built for the Switch 2 (Ounce), NVN2 (Ampere shaders), Wwise 2024.1; modules main + subsdk0 (movie) + sdk. A two-player co-op game.
# Packed from a dump folder (no NACP in it, so the app takes the name below). Shaders: Unreal's IoStore shader libraries (ShaderArchive-*-SF_GLSL_SWITCH2), Oodle.

# ---- Identity ----
title_id 040004F027560000
program_id 040004F027560000

# ---- App ----
name Orbitals
ipa Orbitals.ipa
app_category public.app-category.action-games

# ---- Versions ----
build v327680 v327680 main=84dc546cd0896d09582f02293c4edbce subsdk0=caf9437bacb2aa161d837d5886f19ae8 sdk=daa31832ca979cdfbe07b3b09488d8e0
package v327680
shader_versions v327680

# ---- Files ----
# every module main imports from
modules main subsdk0 sdk
romfs_marker Orbitals/Content/Paks/Orbitals-Switch2.ucas
zip_store .bk2:.pak:.ttf:.txt:.ucas:.utoc:.metallib

# ---- Memory ----
# Unreal: nninitStartup reserves a 62 GB address region and its FMallocBinned3 takes 37 GB of it, so a 64 GB alias region on the Mac. The rewriter cuts the allocator in any Unreal 4 / 5 main
# (dm/tools/ue_malloc.py) and gives the region what the alias region has room for (dm/tools/ue_region.py), as Octopath Traveler 0's profile (docs/reference/memory.md). In its first 15 s
# in nnMain the game's regions reach alias +63.00 GB (what it takes later in play is not measured)
mem_reserve 0x1028000000
mem_alias 0x1000000000
mem_stack 0x10000000
app_pool 0xCD500000
# the NPDM declares 20 MB of system resource
sys_resource 0x1400000

# ---- Shader split ----
# the decoded shader code archives: the engine's global shaders and the game's material shaders
shader_groups ShaderArchive-Global-=global ShaderArchive-=game
shader_note Orbitals shaders

# ---- Graphics ----
# Unreal issues its own NVN barriers, so its passes order themselves: full barriers between passes serialised about 54 full-screen passes a frame at the character select (15 -> 18 fps there,
# no visual change). nvn_mtl.m barrier_game; DM_NVN_BARRIER overrides
draw_barriers game
# Metal encoding on its own thread: the game's frame is bound by the submitting thread (about 10,000 draws a frame in the 3D scenes)
enc_thread on

# ---- Frame rate ----
# The game's own 30 fps: its config sets t.MaxFPS 30 and rhi.SyncInterval 2. The Switch 2 holds an even 30 here (a 60 fps capture of it: 173 of 182 frames 33.3 ms apart). With the cap
# at 30 the Mac (M4 Pro) gives 1198 of 1199 presents two refreshes apart; unlocked to 60 (the rewriter finds both variables by name, hle_fpslock.c) it gave 55-59 fps with missed vsyncs
fps_target 30
Loading
Loading