Port Sea of Stars 2.0.59001 at 60 fps
Unity 2021.3.25f1 on SDK 16.2.0 (the sdk build of Super Mario Bros. Wonder 1.0.0). The sdk build takes the node-area cut and SDK 20's 2 MB region alignment: Unity's N MB + 252 KB regions each took the next size class's slot, which exhausted the 4.375 GB alias region after about six minutes. Profile with a 1.5 GB pool, note, games table row, README gallery entry and reference entry.
This commit is contained in:
1 parent
2e655b79bf
commit
ce9b30b010
16 files changed
+6048
-12
No files matched your search
@@ -1,6 +1,6 @@
|
||||
# Notes for agents
|
||||
|
||||
- This repository runs Nintendo Switch games natively on Apple platforms: the game's own code runs, rewritten only where Apple's kernel requires it (`dm/tools/patch_nso.py`), on a host that answers Horizon's SVCs and the SDK's services (`dm/host`) and implements NVN, Vulkan and NVIDIA's desktop OpenGL on Metal (`dm/gfx/nvn`, `dm/gfx/vk`, `dm/gfx/gl`). Sixty-nine games are playable, each tested on the Mac or the iPhone (a Mac gameplay test is enough to count); the [games table](dm/games/README.md#games) lists each with its build, SDK, engine and graphics API, and links its note, `dm/games/<id>/README.md`: what its profile needs and why, what was found on it, how to drive it on the Mac, what is open. [README.md](README.md) is the player-facing page (games, packing, playing); [docs/development.md](docs/development.md) has the internals, the script's options, building by hand, prewarm lists and power.
|
||||
- This repository runs Nintendo Switch games natively on Apple platforms: the game's own code runs, rewritten only where Apple's kernel requires it (`dm/tools/patch_nso.py`), on a host that answers Horizon's SVCs and the SDK's services (`dm/host`) and implements NVN, Vulkan and NVIDIA's desktop OpenGL on Metal (`dm/gfx/nvn`, `dm/gfx/vk`, `dm/gfx/gl`). Seventy games are playable, each tested on the Mac or the iPhone (a Mac gameplay test is enough to count); the [games table](dm/games/README.md#games) lists each with its build, SDK, engine and graphics API, and links its note, `dm/games/<id>/README.md`: what its profile needs and why, what was found on it, how to drive it on the Mac, what is open. [README.md](README.md) is the player-facing page (games, packing, playing); [docs/development.md](docs/development.md) has the internals, the script's options, building by hand, prewarm lists and power.
|
||||
- Where to start:
|
||||
|
||||
| Task | Read first |
|
||||
|
||||
@@ -130,20 +130,21 @@ Under each game: the IPA's size, and "60 fps with 1.2.0" where the game runs at
|
||||
<tr>
|
||||
<td align="center" valign="top" width="33%"><img src="docs/images/rhythm-heaven-groove.jpg" width="256" alt="Rhythm Heaven Groove"><br>Rhythm Heaven Groove<br><sub>~3 GB</sub></td>
|
||||
<td align="center" valign="top" width="33%"><img src="docs/images/romance-of-the-three-kingdoms-8-remake.jpg" width="256" alt="ROMANCE OF THE THREE KINGDOMS 8 REMAKE"><br>ROMANCE OF THE THREE KINGDOMS 8 REMAKE<br><sub>~16.8 GB · controller only</sub></td>
|
||||
<td align="center" valign="top" width="33%"><img src="docs/images/stardew-valley.jpg" width="256" alt="Stardew Valley"><br>Stardew Valley<br><sub>~0.6 GB</sub></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top" width="33%"><img src="docs/images/steins-gate-reboot.jpg" width="256" alt="STEINS;GATE RE:BOOT"><br>STEINS;GATE RE:BOOT<br><sub>~6 GB</sub></td>
|
||||
<td align="center" valign="top" width="33%"><img src="docs/images/super-smash-bros-ultimate.jpg" width="256" alt="Super Smash Bros. Ultimate"><br>Super Smash Bros. Ultimate<br><sub>~17.5 GB · offline</sub></td>
|
||||
<td align="center" valign="top" width="33%"><img src="docs/images/taiko-risshiden-v-dx.jpg" width="256" alt="Taiko Risshiden V DX"><br>Taiko Risshiden V DX<br><sub>~3.3 GB · Japanese · played by touch</sub></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top" width="33%"><img src="docs/images/unicorn-overlord.jpg" width="256" alt="Unicorn Overlord"><br>Unicorn Overlord<br><sub>~4 GB</sub></td>
|
||||
<td align="center" valign="top" width="33%"><img src="docs/images/nier-automata.png" width="256" alt="NieR:Automata The End of YoRHa Edition"><br>NieR:Automata The End of YoRHa Edition<br><sub>~10.9 GB · 60 fps with 1.0.3</sub></td>
|
||||
<td align="center" valign="top" width="33%"><img src="docs/images/zelda-echoes-of-wisdom.jpg" width="256" alt="The Legend of Zelda: Echoes of Wisdom"><br>The Legend of Zelda: Echoes of Wisdom<br><sub>~7.8 GB</sub></td>
|
||||
<td align="center" valign="top" width="33%"><img src="docs/images/sea-of-stars.jpg" width="256" alt="Sea of Stars"><br>Sea of Stars<br><sub>~5.1 GB</sub></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top" width="33%"><img src="docs/images/shin-megami-tensei-v-vengeance.jpg" width="256" alt="SHIN MEGAMI TENSEI V: Vengeance"><br>SHIN MEGAMI TENSEI V: Vengeance<br><sub>~14.6 GB · 60 fps with 1.0.3</sub></td>
|
||||
<td align="center" valign="top" width="33%"><img src="docs/images/stardew-valley.jpg" width="256" alt="Stardew Valley"><br>Stardew Valley<br><sub>~0.6 GB</sub></td>
|
||||
<td align="center" valign="top" width="33%"><img src="docs/images/steins-gate-reboot.jpg" width="256" alt="STEINS;GATE RE:BOOT"><br>STEINS;GATE RE:BOOT<br><sub>~6 GB</sub></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top" width="33%"><img src="docs/images/super-smash-bros-ultimate.jpg" width="256" alt="Super Smash Bros. Ultimate"><br>Super Smash Bros. Ultimate<br><sub>~17.5 GB · offline</sub></td>
|
||||
<td align="center" valign="top" width="33%"><img src="docs/images/taiko-risshiden-v-dx.jpg" width="256" alt="Taiko Risshiden V DX"><br>Taiko Risshiden V DX<br><sub>~3.3 GB · Japanese · played by touch</sub></td>
|
||||
<td align="center" valign="top" width="33%"><img src="docs/images/unicorn-overlord.jpg" width="256" alt="Unicorn Overlord"><br>Unicorn Overlord<br><sub>~4 GB</sub></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top" width="33%"><img src="docs/images/nier-automata.png" width="256" alt="NieR:Automata The End of YoRHa Edition"><br>NieR:Automata The End of YoRHa Edition<br><sub>~10.9 GB · 60 fps with 1.0.3</sub></td>
|
||||
<td align="center" valign="top" width="33%"><img src="docs/images/zelda-echoes-of-wisdom.jpg" width="256" alt="The Legend of Zelda: Echoes of Wisdom"><br>The Legend of Zelda: Echoes of Wisdom<br><sub>~7.8 GB</sub></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
# Sea of Stars (`01008C0016544000`)
|
||||
|
||||
Update 2.0.59001 (v786432) over the base game, SDK 16.2.0. Unity 2021.3.25f1 IL2CPP with Wwise on NVN. Modules `main`, `subsdk0` (NintendoSDK_movie) and `sdk`; the `sdk` is the build of Super Mario Bros. Wonder 1.0.0 / 1.0.1 ([010015100B514000](../010015100B514000/README.md)). The DLC NSP is a licence only. Plays on the Mac at 60 fps, as on the Switch: the logos, the title, a new game (leader and difficulty choice), the Great Archives framing, the Mooncradle prologue's dialogue, walking, climbing and its scene changes, saving and continuing. An unsigned IPA is built; iOS is untested.
|
||||
|
||||
## What it needs
|
||||
|
||||
| Setting | Where | Why |
|
||||
|---|---|---|
|
||||
| Node area 1 GB → 62 MB | `dm/tools/sdk_patches.py`, `sdk` build `3053b229…`, `sdk+0x134728` / `+0x1347bc` | `StandardAllocator::Initialize` aborted before `nnMain`; see [Memory](#memory) |
|
||||
| Region alignment 4 MB / 32 MB / 1 GB → 2 MB (SDK 20's) | `sdk_patches.py`, the same build, `sdk+0x134914` / `+0x13491c` / `+0x134920` | Unity's regions took twice their size in address space; see [Memory](#memory) |
|
||||
| `sys_resource 0x1000000` | [`game.tsv`](game.tsv) | the NPDM's 16 MB of system resource: virtual address memory |
|
||||
| 5 GB guest layout: `mem_reserve 0x140000000`, `mem_alias 0x118000000`, `mem_stack 0x10000000` | `game.tsv` | Ace Attorney Investigations Collection's layout ([010005501E68C000](../010005501E68C000/README.md)) |
|
||||
| `app_pool 0x60000000` (1.5 GB) | `game.tsv` | with the hardware pool Unity got no address region; see [Memory](#memory) |
|
||||
| `pad_layout full` | `game.tsv` | the 3D layout (D-pad, right stick) |
|
||||
|
||||
No code of the game is cut. The game asks for present interval 1, so it needs no frame-rate key.
|
||||
|
||||
## Memory
|
||||
|
||||
- **Resolved: `nn::diag` abort before `nnMain`.** `nninitStartup` (`main+0x8b66a0`) gives application pool − used memory to `StandardAllocator::Initialize(nullptr, size)` (`sdk+0x126380`, abort at `+0x126440`), and its 1 GB-aligned region did not fit after the SDK's 1 GB node area. The `AddressRegionManager` constructor (`sdk+0x134718`) is Brain Memory Training Academy's; its two `mov w8/w9, #0x3fe00000` take the 62 MB cut ([The SDK's address-region node area](../../../docs/reference/memory.md#the-sdks-address-region-node-area)). Mario Wonder 1.0.0 / 1.0.1 ship this `sdk` too, and Mario allocates address regions (361 in its first 100 s). With both cuts, Mario 1.0.0 boots to its title on the Mac and runs five minutes; its only red lines were graphics ones (four pipeline-prebuild link failures and `SetRenderEnableConditional`).
|
||||
- **Resolved: a write at NULL + 0x3fffe0 about six minutes in, with the hardware pool** (`main+0x48b770`, Unity's `ALLOC_CACHEOBJECTS_THREAD` allocator in x19). Unity's virtual allocator got no address region: the alias region's high-water mark was +4.26 GB of 4.375 GB with 1.26 GB mapped. With a 64 GB alias region the same route reaches +6.0 GB with 1.77 GB mapped: StandardAllocator's 3.06 GB region from +1 GB commits about 0.7 GB, and Unity's own regions follow it.
|
||||
- A 1.5 GB pool (StandardAllocator reserves 1.44 GB, about twice what it commits) ran 25 minutes without a crash, but still reached +4.26 GB. Region probes found the cause in the SDK's size-class alignment: Unity's N MB + 252 KB requests each take the next size class's slot, 0.86 GB of gaps among 2.59 GB of live regions ([Size-class alignment doubles Unity's regions](../../../docs/reference/memory.md#size-class-alignment-doubles-unitys-regions)). With SDK 20's 2 MB alignment cut into this build, the same live regions end at +3.24 GB, and a 20-minute session keeps the high-water mark at +3.0 GB.
|
||||
- **Current:** about 2.5 GB resident and 1.13 GB of Metal allocations on the Mac in the Mooncradle prologue (2,449 → 2,466 MB resident from 3 to 13 minutes).
|
||||
|
||||
## Files and shaders
|
||||
|
||||
- RomFS: 2,243 files, 4.93 GB; 1,126 UnityFS bundles (1.64 GB), Wwise banks and 688 streams, 17 MP4 cinematics, all under `Data/StreamingAssets`.
|
||||
- 3,898 shaders: 1,901 vertex, 1,905 pixel, 91 compute and one geometry shader. 3,887 come from `Data/`, 11 are the player's GLSLC outputs in `main`. All built for the Mac with no failure, and no run met a shader missing from the map.
|
||||
|
||||
## Frame rate
|
||||
|
||||
- **Current:** 60 fps on the Mac (frame time p50 16.6 ms; p95 about 20 ms as the median of the 300-frame windows of a 40-minute session, with other jobs on the Mac; CPU about 0.9 W on an M4 Pro). The game asks for present interval 1; no key is needed.
|
||||
- With other jobs' windows over the game window, macOS stops the display link and nearly every frame is discarded (`on-screen … dropped 281`), so screenshots never come; `DM_PRESENT_LINK=0` presents without it for scripted runs.
|
||||
|
||||
## Audio
|
||||
|
||||
- Wwise through two `AudioOut`s (one opened at boot from `main+0x8b63f0`, one by the sound engine from `main+0x1850070`, which polls instead of waiting on a release event). No underrun in 20 minutes; `DM_AUDIO_DUMP` holds the title music from about 30 s.
|
||||
- In the 40-minute session, the host's audio watchdog logged six `[RED] audio #…: the device has not called back for 209–223 ms`, all 12 to 17.5 minutes in, while the IPA build compiled iOS shaders and packed on the same Mac. It restarted the AudioUnit each time, and the game kept presenting frames. The same Core Audio callback stalls are open on [Pokémon Brilliant Diamond](../0100000011D90000/README.md#testing).
|
||||
|
||||
## Mac routes
|
||||
|
||||
- Build with `scripts/build_ipa_from_nsp.py <NSP folder> -k <prod.keys> --platform mac`; its last line runs the game.
|
||||
- From a fresh save, through `DM_CTL`: `Plus` at the title (about 45 s after boot), `A` (New Game), `A`, `A`, `Left`, `A` (Zale leads), `A` (Adventure), then `A` every 1.5 s through the Great Archives and the Mooncradle dialogue (about 3 minutes) to the camp, where the player has control.
|
||||
- The camp: the save pedestal is at its west end, the path south leads to the Mooncradle cliff, whose climbing holds lead back to the pedestal.
|
||||
|
||||
## Testing
|
||||
|
||||
- 2026-10-26, Mac: boot, logos, title, a new game, the leader and difficulty choices, the Great Archives and Mooncradle prologue dialogue, walking, climbing, three scene changes, saving to slot 1 and continuing from the title, over a 40-minute session and four shorter ones. The only red lines were the audio watchdog's under the IPA build's load ([Audio](#audio)).
|
||||
- No battle was reached (the prologue's camp has no enemy), and no cinematic MP4 has played yet.
|
||||
|
||||
## Open
|
||||
|
||||
- Battles and the MP4 cinematics are untested.
|
||||
- iOS: the unsigned IPA (`SeaOfStars.ipa`, 5.1 GB, 5,454,467,672 bytes, with the fps counter; 3,898 iOS shader libraries) is untested on a device.
|
||||
|
||||
## Found on this game
|
||||
|
||||
- The SDK 16.2.0 instance of [the SDK's address-region node area](../../../docs/reference/memory.md#the-sdks-address-region-node-area).
|
||||
- [Size-class alignment doubles Unity's regions](../../../docs/reference/memory.md#size-class-alignment-doubles-unitys-regions).
|
||||
@@ -0,0 +1 @@
|
||||
# generated
|
||||
|
@@ -0,0 +1,47 @@
|
||||
# Game profile of Sea of Stars (Switch, update 2.0.59001 = v786432). Plays on the Mac
|
||||
# Format: see dm/games/README.md
|
||||
# Unity 2021.3.25f1 (IL2CPP) with Wwise, SDK 16.2.0 (its sdk is Super Mario Bros. Wonder 1.0.0's build); subsdk0 is the movie module (the cinematics are MP4s in StreamingAssets).
|
||||
# The shaders are Unity's Shader and ComputeShader objects in the player's serialized files and the 1,126 bundles in StreamingAssets, read by unityfs.py (3,887 of the 3,898; 11 are the player's
|
||||
# GLSLC outputs in main); no run met a shader missing from the map.
|
||||
# The game asks for present interval 1 and runs at 60 fps as on the Switch
|
||||
|
||||
# ---- Identity ----
|
||||
title_id 01008C0016544000
|
||||
program_id 01008C0016544000
|
||||
|
||||
# ---- App ----
|
||||
# Game name: only a label for profile listings and the Mac window title; the iOS app name is the game name in the base NSP, and the bundle ID comes from the base game title ID (build_ipa.sh / NSP script)
|
||||
name Sea of Stars
|
||||
ipa SeaOfStars.ipa
|
||||
app_category public.app-category.games
|
||||
|
||||
# ---- Versions ----
|
||||
build v786432 2.0.59001 main=1399a83376b1b1c2e5756fbdf7491956 subsdk0=ff0149d0b5e882b87c2f06a981302b13 sdk=3053b22935e32ddf15ef81997603e5c2
|
||||
package v786432
|
||||
shader_versions v786432
|
||||
|
||||
# ---- Files ----
|
||||
# load order as on Horizon: main, subsdk*, sdk (subsdk0 = NintendoSDK_movie)
|
||||
modules main subsdk0 sdk
|
||||
romfs_marker Data/globalgamemanagers
|
||||
zip_store .assets:.bnk:.bundle:.dat:.json:.mp4:.png:.ress:.wem:.xml:.metallib
|
||||
|
||||
# ---- Memory ----
|
||||
# The NPDM declares 16 MB of system resource, so IsVirtualAddressMemoryEnabled is true: nninitStartup (main+0x8b66a0) hands application pool − used memory to StandardAllocator as one
|
||||
# address region and never calls SetMemoryHeapSize. The sdk build takes the node area cut and the 2 MB region alignment of SDK 20 (dm/tools/sdk_patches.py). The 5 GB block of Ace Attorney
|
||||
# Investigations Collection (256 MB in front + 4.375 GB alias region + 256 MB stack region + 128 MB heap region) with a 1.5 GB pool: StandardAllocator reserves 1.44 GB and commits about
|
||||
# 0.7 GB in the prologue (measured with a 64 GB alias region); Unity's own regions hold about 1.15 GB more. With the hardware pool (3.2 GB) Unity got no region within 6 minutes
|
||||
# (a write at NULL + 0x3fffe0); with the 1.5 GB pool and the cut the alias region's high-water mark stays at +3.0 GB over 20 minutes, 2.6 GB of it in live regions
|
||||
sys_resource 0x1000000
|
||||
mem_reserve 0x140000000
|
||||
mem_alias 0x118000000
|
||||
mem_stack 0x10000000
|
||||
app_pool 0x60000000
|
||||
|
||||
# ---- Input ----
|
||||
pad_layout full
|
||||
|
||||
# ---- Shader split (shader_split.py; Unity Shader objects, read by unityfs.py) ----
|
||||
# everything is under Data/: the player's serialized files and the StreamingAssets bundles
|
||||
shader_groups /Data/=data
|
||||
shader_note Sea of Stars shaders
|
||||
|
@@ -0,0 +1,2 @@
|
||||
# Prewarm seed list (shipped in the app, next to shader_map.tsv). Rows: S<TAB>shader key<TAB>stage / R<TAB>render pipeline key (pso_skey hex) / C<TAB>compute shader key.
|
||||
# Provisional profile: empty until recorded on the Mac (DM_PSO_MANIFEST=off DM_PSO_RECORD).
|
||||
|
@@ -0,0 +1 @@
|
||||
# kind: evidence vertex / pixel shader pairs of agl program variations (BAHS) that shader_pairs.tsv does not hold, for the pipeline prebuild only (generated by dm/gfx/tools/shader_split.py, do not edit): vertex key <TAB> pixel key
|
||||
|
@@ -0,0 +1,92 @@
|
||||
# Answer table for translation queries (generated by dm/gfx/tools/shader_split.py, do not edit): key <TAB> fact JSON. This game has no PC version to pair with: only the thread group / shared memory of compute shaders (taken from the control section); other queries get the translator defaults
|
||||
01398097c9e4a973 {"local":[1024,1,1],"shared":0}
|
||||
0682782f64ba10b7 {"local":[64,1,1],"shared":0}
|
||||
0aa49e37e3542cb6 {"local":[32,32,1],"shared":0}
|
||||
0b0f5f717727c7d3 {"local":[32,32,1],"shared":0}
|
||||
0c484845783e9592 {"local":[64,1,1],"shared":0}
|
||||
0fbc23f600ac509a {"local":[1,360,1],"shared":5856}
|
||||
16fe98afe7b6bbd1 {"local":[32,32,1],"shared":0}
|
||||
186ac5594ee12549 {"local":[64,1,1],"shared":0}
|
||||
1ad37e4e031668a6 {"local":[64,1,1],"shared":0}
|
||||
1bc63d86290c21aa {"local":[32,32,1],"shared":0}
|
||||
1be0aa81f4ed7335 {"local":[8,8,8],"shared":0}
|
||||
1e6e05fc54de2351 {"local":[64,1,1],"shared":1024}
|
||||
1f1fc2dec063ae67 {"local":[64,1,1],"shared":0}
|
||||
1ff47a1be8517c40 {"local":[64,1,1],"shared":0}
|
||||
23ab2cb743e68709 {"local":[64,1,1],"shared":0}
|
||||
25e7cf40ef56229c {"local":[32,32,1],"shared":0}
|
||||
2691fee937a7a591 {"local":[32,32,1],"shared":0}
|
||||
26d2b6d460df2cf9 {"local":[32,32,1],"shared":0}
|
||||
27facbaacd47d58d {"local":[64,1,1],"shared":0}
|
||||
32fdfcb71e663ebf {"local":[64,1,1],"shared":0}
|
||||
35c316950f9114e4 {"local":[4,4,4],"shared":0}
|
||||
365348fe1ab76072 {"local":[1024,1,1],"shared":32768}
|
||||
388f420c9ed490ea {"local":[256,1,1],"shared":8192}
|
||||
39774ebc06a50b9b {"local":[32,32,1],"shared":0}
|
||||
3bc3079300a73ac2 {"local":[64,1,1],"shared":0}
|
||||
3c0c16d5efe74538 {"local":[64,1,1],"shared":0}
|
||||
3e76710af2bc16b8 {"local":[64,1,1],"shared":0}
|
||||
4237dede4278927f {"local":[64,1,1],"shared":0}
|
||||
4317537b74888ded {"local":[64,1,1],"shared":0}
|
||||
45dc06ad504d926c {"local":[32,32,1],"shared":0}
|
||||
4834bbf5b1f1a4f5 {"local":[64,1,1],"shared":0}
|
||||
4971dc491a14a589 {"local":[32,32,1],"shared":0}
|
||||
4c07cf3906742d27 {"local":[64,1,1],"shared":0}
|
||||
4db16d2739973836 {"local":[64,1,1],"shared":0}
|
||||
4e6152f99f756c57 {"local":[32,32,1],"shared":0}
|
||||
4ea426389e5e0db1 {"local":[64,1,1],"shared":0}
|
||||
4ee3369f5ffb02f0 {"local":[64,1,1],"shared":0}
|
||||
512a31c3f4687a40 {"local":[64,1,1],"shared":0}
|
||||
552bbc8ffc2459e4 {"local":[4,4,4],"shared":0}
|
||||
561a9025971ce518 {"local":[64,1,1],"shared":0}
|
||||
590a4116df909813 {"local":[64,1,1],"shared":0}
|
||||
5b4818e15481b13c {"local":[64,1,1],"shared":0}
|
||||
5f130d5c373d11ab {"local":[64,1,1],"shared":0}
|
||||
6083d70ecf7a269b {"local":[64,1,1],"shared":0}
|
||||
67301fa4e81a7913 {"local":[64,1,1],"shared":0}
|
||||
6dcf33ad07108c06 {"local":[64,1,1],"shared":0}
|
||||
70ee069df43e7562 {"local":[1024,1,1],"shared":32768}
|
||||
75fc2acc91414349 {"local":[64,1,1],"shared":0}
|
||||
7b0147f3cd3cfb18 {"local":[64,1,1],"shared":0}
|
||||
7f772fed275d9c31 {"local":[32,32,1],"shared":0}
|
||||
7fca6c3e55d82372 {"local":[32,32,1],"shared":0}
|
||||
814fd9314a1fb010 {"local":[256,1,1],"shared":0}
|
||||
86c0f0251798138f {"local":[64,1,1],"shared":0}
|
||||
896b9ba7367b8f08 {"local":[64,1,1],"shared":0}
|
||||
8c1aa40b52db8e49 {"local":[640,1,1],"shared":10336}
|
||||
8c42620da9761222 {"local":[1024,1,1],"shared":32768}
|
||||
8d0d7a65098c851b {"local":[64,1,1],"shared":0}
|
||||
93cba607fc3a5495 {"local":[64,1,1],"shared":0}
|
||||
9480fab8c567ca77 {"local":[64,1,1],"shared":1024}
|
||||
a2986888c5a217c7 {"local":[8,8,1],"shared":0}
|
||||
a4b9d89db18ad23f {"local":[64,1,1],"shared":0}
|
||||
a723a4df6f0afa99 {"local":[256,1,1],"shared":8192}
|
||||
a7777124e2389808 {"local":[64,1,1],"shared":0}
|
||||
a79fe6d8542e7277 {"local":[32,32,1],"shared":0}
|
||||
aa77a208d63e0afc {"local":[4,4,4],"shared":768}
|
||||
aee381143ee78baf {"local":[64,1,1],"shared":0}
|
||||
b2314b69b48522d4 {"local":[64,1,1],"shared":0}
|
||||
b3e69a14f374209c {"local":[32,32,1],"shared":0}
|
||||
b76dea19a82ee4ab {"local":[32,32,1],"shared":0}
|
||||
bad6621f9045da81 {"local":[64,1,1],"shared":0}
|
||||
bb6375b698fb3604 {"local":[1024,1,1],"shared":32768}
|
||||
bc43fdcdbefa395f {"local":[8,8,1],"shared":0}
|
||||
cb2082aeb5d960db {"local":[64,1,1],"shared":0}
|
||||
cb2b5c5341fc0161 {"local":[64,1,1],"shared":0}
|
||||
ce2863a4b396aae6 {"local":[4,4,4],"shared":0}
|
||||
d1408b24700d7f39 {"local":[64,1,1],"shared":0}
|
||||
d1568b462550ec26 {"local":[64,1,1],"shared":0}
|
||||
d223a156fa1c04b6 {"local":[64,1,1],"shared":0}
|
||||
d2676233bb93d463 {"local":[64,1,1],"shared":0}
|
||||
d48fd811c52959c3 {"local":[64,1,1],"shared":0}
|
||||
d50be1885dd1635e {"local":[64,1,1],"shared":0}
|
||||
d8c6cc3a735f47eb {"local":[64,1,1],"shared":0}
|
||||
db84b792218d0450 {"local":[64,1,1],"shared":0}
|
||||
e38f41b5e3cecbd2 {"local":[64,1,1],"shared":0}
|
||||
e41787e043c1c39e {"local":[64,1,1],"shared":0}
|
||||
e51163994feb7674 {"local":[8,8,1],"shared":0}
|
||||
eaf618467603f288 {"local":[64,1,1],"shared":0}
|
||||
ee3d650fb0e6b7b0 {"local":[32,32,1],"shared":0}
|
||||
fd62890863e2c251 {"local":[64,1,1],"shared":0}
|
||||
fde0f6bba46755df {"local":[64,1,1],"shared":0}
|
||||
fdf6ae9dc697fab9 {"local":[64,1,1],"shared":0}
|
||||
|
Can't render this file because it contains an unexpected character in line 2 and column 19.
|
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,2 @@
|
||||
# kind: evidence control-section key conflict rulings: empty
|
||||
dm_ctl_sha16 chosen_pc class candidates records
|
||||
|
File diff suppressed because it is too large.
Load diff
@@ -93,6 +93,7 @@ One row per profile; the notes are each profile's `README.md`.
|
||||
| [Raging Loop](010020400E1C2000/README.md) | `010020400E1C2000` | 1.0.0 (base) | 7.3.2 | Unity 2018.3.10f1 IL2CPP | NVN |
|
||||
| [Rhythm Heaven Groove](0100D9F01D474000/README.md) | `0100D9F01D474000` | 1.0.0 (base) | 21.4.0 | Nintendo's own 2D engine | NVN |
|
||||
| [ROMANCE OF THE THREE KINGDOMS 8 REMAKE](0100C2A01A730000/README.md) | `0100C2A01A730000` | 1.1.3 | 17.5.3 | Koei Tecmo's KTGL | NVN |
|
||||
| [Sea of Stars](01008C0016544000/README.md) | `01008C0016544000` | 2.0.59001 | 16.2.0 | Unity 2021.3.25f1 IL2CPP | NVN |
|
||||
| [SHIN MEGAMI TENSEI V: Vengeance](010069C01AB82000/README.md) | `010069C01AB82000` | 1.0.3 | 15.3.2 | Unreal Engine 4.27 | NVN |
|
||||
| [STEINS;GATE RE:BOOT](01008BC024FDE000/README.md) | `01008BC024FDE000` | 1.0.3 | 20.5.17 | M2's ADV engine | NVN |
|
||||
| [Stardew Valley](0100E65002BB8000/README.md) | `0100E65002BB8000` | 1.6.15.13 | 20.5.27 | MonoGame (C# → C++ by BRUTE) | NVN |
|
||||
|
||||
@@ -31,6 +31,21 @@ CUTS = {
|
||||
(0x134778, '08fca752', '087ca052', 'AddressRegionManager constructor: node area limit mov w8,#0x3fe00000 → mov w8,#0x3e00000'),
|
||||
(0x13480c, '09fca752', '097ca052', 'AddressRegionManager constructor: length of the node area registered as an occupied region mov w9,#0x3fe00000 → mov w9,#0x3e00000'),
|
||||
],
|
||||
# Sea of Stars 2.0.59001 (v786432) sdk (SDK 16.2.0, the build of Super Mario Bros. Wonder 1.0.0 / 1.0.1): the same node area cut. nninitStartup (main+0x8b66a0) calls
|
||||
# StandardAllocator::Initialize(nullptr, pool − used) with virtual address memory, which aborted at sdk+0x126440 (Initialize+0xc0). The constructor is Brain Memory Training Academy's
|
||||
# at sdk+0x134718 (limit = alias start + 0x3fe00000 at +0x28, a unit heap of 0x30-byte nodes, the area then registered as occupied at +0x1347bc).
|
||||
# VammManager::AllocateAddressRegion's placement (sdk+0x1348b0) aligns a region by its size: 64 KB under 2 MB, 2 MB under 4 MB, 4 MB under 32 MB, 32 MB under 1 GB, else 1 GB, and starts
|
||||
# the next region at that alignment past a 4 KB guard. Unity 2021.3's virtual allocator (main+0x48deb0 → main+0x12e12c0) reserves N MB + 252 KB and aligns its blocks to 256 KB itself, so each
|
||||
# of its 94 regions of 16.25 MB took a 20 MB slot and each 4.25 MB one an 8 MB slot: measured in the prologue, 2.59 GB of live regions with 0.86 GB of gaps between them, the alias region's
|
||||
# high-water mark at +4.26 GB of 4.375 GB with a 1.5 GB pool (with the hardware pool Unity got no region and wrote at NULL + 0x3fffe0, main+0x48b770). SDK 20 aligns regions to 64 KB or 2 MB
|
||||
# only (FINAL FANTASY RESONANCE's build, below); these three classes take its 2 MB
|
||||
'3053b22935e32ddf15ef81997603e5c2': [
|
||||
(0x134728, '08fca752', '087ca052', 'AddressRegionManager constructor: node area limit mov w8,#0x3fe00000 → mov w8,#0x3e00000'),
|
||||
(0x1347bc, '09fca752', '097ca052', 'AddressRegionManager constructor: length of the node area registered as an occupied region mov w9,#0x3fe00000 → mov w9,#0x3e00000'),
|
||||
(0x134914, '0b40a052', '0b04a052', 'AllocateAddressRegion: alignment of regions from 32 MB to 1 GB mov w11,#0x2000000 → mov w11,#0x200000 (2 MB, as SDK 20)'),
|
||||
(0x13491c, '0a00a852', '0a04a052', 'AllocateAddressRegion: alignment of regions of 1 GB and more mov w10,#0x40000000 → mov w10,#0x200000 (2 MB, as SDK 20)'),
|
||||
(0x134920, '0808a052', '0804a052', 'AllocateAddressRegion: alignment of regions from 4 MB to 32 MB mov w8,#0x400000 → mov w8,#0x200000 (2 MB, as SDK 20)'),
|
||||
],
|
||||
# Patrick's Parabox 1.0.1 (v65536) sdk (SDK 13.3.7, Unity 2020.3.30f1): the same node area cut. nninitStartup (main+0x1cd010) calls StandardAllocator::Initialize(nullptr, pool − used) with virtual
|
||||
# address memory, which aborted at its CentralHeap::Init (sdk+0x324dec). The constructor is at sdk+0x37c3a0 (limit = alias start + 0x3fe00000 at +0x28, a unit heap of 0x30-byte nodes, the area then
|
||||
# registered as occupied at +0x37c44c)
|
||||
|
||||
@@ -48,6 +48,7 @@ One line per symptom in the [subsystem references](../reference/): what you see
|
||||
- the first `AllocateAddressRegion` fails with 0x1803; `StandardAllocator::Initialize` aborts in `nninitStartup` (an `nn::diag` abort; the NSP script's heap check reports "the host stopped before nnMain"); the alias region fills in minutes; regions a game reserves later fail (Size-aligned regions exhaust the alias address space, The movie player's own StandardAllocator). → [The SDK's address-region node area](../reference/memory.md#the-sdks-address-region-node-area)
|
||||
- a null-based write minutes into play, at the pool size minus 0x20 (Engage: a write to `NULL + 0x1fffe0`, `addr=0x1fffe0` at `main+0x9a4664`); NULL index pointers written on several job threads at once (`main+0xdb0ad4`, `0xdaea58`, `0xdadb5c`), with 32-bit mesh indices turning up inside texture objects. → [Size-aligned regions exhaust the alias address space](../reference/memory.md#size-aligned-regions-exhaust-the-alias-address-space)
|
||||
- a cut engine region still does not fit; two large regions lose up to 1 GB each to alignment, depending on where `mmap` put the guest block (Absolum); the region comes 0.69 GB past the 1 GB node area, at the next 1 GB boundary (Paper Mario: The Thousand-Year Door). → [1 GB alignment of regions of 1 GB and more](../reference/memory.md#1-gb-alignment-of-regions-of-1-gb-and-more)
|
||||
- a write at NULL + 0x3fffe0 (a 4 MB pool − 0x20) at `main+0x48b770`, about six minutes into the prologue, with Unity's `ALLOC_CACHEOBJECTS_THREAD` allocator in x19; the `[mem]` high-water mark at +4.26 GB of the 4.375 GB alias region while 1.26 GB is mapped (Sea of Stars). → [Size-class alignment doubles Unity's regions](../reference/memory.md#size-class-alignment-doubles-unitys-regions)
|
||||
- nothing aborts at startup as with Unity 2022.3, but the provisional profile gave a 1 GB block and a 256 MB alias region while Unity maps 1.5 GB in the first room. → [Unity 6 takes its memory with no StandardAllocator and no heap](../reference/memory.md#unity-6-takes-its-memory-with-no-standardallocator-and-no-heap)
|
||||
- `nn::diag` abort from `StandardAllocator::Initialize` long after `nninitStartup`, right after the first Vulkan query pool (`sdk+0x12dad0` ← `main+0x62c52c`). → [The movie player's own StandardAllocator](../reference/memory.md#the-movie-players-own-standardallocator)
|
||||
- `StandardAllocator::Initialize` aborts in `nninitStartup` (Pokémon Legends: Z-A: `main+0x1b2e690`); `nn::diag` abort at `sdk+0x11ff34` (`StandardAllocator::Initialize`) in `nninitStartup`, SDK 15.3.2, called from `main+0x31370c` (Paper Mario: The Thousand-Year Door). → [StandardAllocators over 12 to 62 GB of address space](../reference/memory.md#standardallocators-over-12-to-62-gb-of-address-space)
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 223 KiB |
@@ -67,6 +67,7 @@ The guest address space, heaps, pools, virtual address memory and the allocators
|
||||
- [Fire Emblem Engage](../../dm/games/0100A6301214E000/README.md): the two `mov w8/w9, #0x3fe00000` in the constructor → 62 MB; without it the alias region ran out of address space minutes into play ([Size-aligned regions exhaust the alias address space](#size-aligned-regions-exhaust-the-alias-address-space)).
|
||||
- [Ace Attorney Investigations Collection](../../dm/games/010005501E68C000/README.md) (Unity 2022.3, SDK 17.5.3): `StandardAllocator::Initialize` aborts in `nninitStartup` on SDK 17, then the alias region fills in minutes; the same node area as Engage's SDK; the constructor is at `sdk+0x139458` on that build and takes the same cut.
|
||||
- [Brain Memory Training Academy](../../dm/games/0100F5D01DA3A000/README.md) (Unity 2022.3.5f1, SDK 16.2.4): `nn::diag` abort at `sdk+0x126490`, `StandardAllocator::Initialize`, called from `nninitStartup` at `main+0x73adcc`. Its `nninitStartup` is Ace Attorney's: `Initialize(nullptr, pool − used)` with virtual address memory and no `SetMemoryHeapSize`. The `sdk` build is Unicorn Overlord's, whose NPDM declares no system resource, so it never needed the cut; the constructor (`AddressRegionManagerC2`, `sdk+0x134768`) takes it at `+0x134778` / `+0x13480c`.
|
||||
- [Sea of Stars](../../dm/games/01008C0016544000/README.md) (Unity 2021.3.25f1, SDK 16.2.0, the `sdk` build of Super Mario Bros. Wonder 1.0.0): `nn::diag` abort at `sdk+0x126440`, `StandardAllocator::Initialize`, called from `nninitStartup` at `main+0x8b6710`; the heap check reports "the host stopped before nnMain". Brain Memory Training Academy's constructor at `sdk+0x134718` takes the cut at `+0x134728` / `+0x1347bc`, beside the [region alignment cut](#size-class-alignment-doubles-unitys-regions).
|
||||
- [Patrick's Parabox](../../dm/games/0100E44016C22000/README.md) (Unity 2020.3.30f1, SDK 13.3.7): `StandardAllocator::Initialize` at `sdk+0x324dec`, called from `nninitStartup` at `main+0x1cd080`; the same `nninitStartup` and the same cut, on this build's constructor (`sdk+0x37c3a0`: `+0x37c3b0` / `+0x37c44c`).
|
||||
- [Advance Wars 1+2: Re-Boot Camp](../../dm/games/0100300012F2A000/README.md) (Unity 2020.2.1f3, SDK 10.4.1): `StandardAllocator::Initialize` at `sdk+0x2edf90`, called from `nninitStartup` at `main+0x365310`; the heap check reports "the host stopped before nnMain"; the same `nninitStartup`. The `sdk` build is The Great Ace Attorney Chronicles', which has no virtual address memory; its constructor (`sdk+0x340e90`) has the `orr` form (`e8230b32` at `+0x340ea0`, `e9230b32` at `+0x340f3c`).
|
||||
- [Pikmin 4](../../dm/games/0100B7C00933A000/README.md) (SDK 10.4.8): the build's AddressRegionManager is the 10.4.1 build's at the same offsets and takes the same three cuts (node area and alignment).
|
||||
@@ -105,6 +106,13 @@ The guest address space, heaps, pools, virtual address memory and the allocators
|
||||
- [Pikmin 4](../../dm/games/0100B7C00933A000/README.md) (SDK 10.4.8): the 10.4.1 build's offsets.
|
||||
- **Note:** FINAL FANTASY RESONANCE's SDK 20.5.17 build aligns regions of 2 MB and more to 2 MB only (`VammManager::AllocateAddressRegion`, `sdk+0x145e00`), so it needs no alignment cut.
|
||||
|
||||
### Size-class alignment doubles Unity's regions
|
||||
|
||||
- **Symptom:** a write at NULL + 0x3fffe0 (a 4 MB pool − 0x20) at `main+0x48b770`, about six minutes into the prologue, with Unity's `ALLOC_CACHEOBJECTS_THREAD` allocator in x19; the `[mem]` high-water mark at +4.26 GB of the 4.375 GB alias region while 1.26 GB is mapped (Sea of Stars).
|
||||
- **Cause:** before SDK 20, `VammManager::AllocateAddressRegion` aligns a region by its size (64 KB under 2 MB, 2 MB under 4 MB, 4 MB under 32 MB, 32 MB under 1 GB, else 1 GB) and starts the next one at that alignment past a 4 KB guard. Unity 2021.3's virtual allocator (`main+0x48deb0` → `main+0x12e12c0`) asks for N MB + 252 KB and aligns its blocks to 256 KB itself, so every region spills just past a size class: a 16.25 MB region takes a 20 MB slot, a 4.25 MB one an 8 MB slot, a 32.5 MB one 64 MB. Measured with probes on the success path (`sdk+0x134868`: x21 size, x22 address) and on `FreeAddressRegion` (`sdk+0x1350cc`: x1 address): 94 regions of 16.25 MB, 35 of 4.25 MB and 15 of 2.25 MB among 167 live regions holding 2.59 GB, with 0.86 GB of gaps between them, ending at +4.22 GB. On a Switch the alias region is 64 GB.
|
||||
- **Fix:** a cut on that `sdk` build gives the 4 MB, 32 MB and 1 GB classes SDK 20's 2 MB (`sdk_patches.py`). The same route then ends its live regions (2.59 GB) at +3.24 GB with 0.58 GB of gaps, and the high-water mark stays at +3.0 GB over 20 minutes.
|
||||
- **Found on:** [Sea of Stars](../../dm/games/01008C0016544000/README.md) (SDK 16.2.0: `sdk+0x134914`, `+0x13491c`, `+0x134920`), beside the node-area cut and a 1.5 GB pool.
|
||||
|
||||
### Unity 6 takes its memory with no StandardAllocator and no heap
|
||||
|
||||
- **Symptom:** nothing aborts at startup as with Unity 2022.3, but the provisional profile gave a 1 GB block and a 256 MB alias region while Unity maps 1.5 GB in the first room.
|
||||
|
||||
Reference in new issue
Block a user