Files
seedds 3a993fa3fe Subsystem references and a symptom index: the failure catalogue of docs/agents/03-bringup.md and the per-title material of docs/agents/04-graphics.md (section 1's container list, section 6 and its "Seen in <game>" subsections) move into docs/reference/, one heading per mechanism: rewriter.md, memory.md, threads.md, services.md, movies.md, audio.md, frame-rate.md, nvn-objects.md, rendering.md (with the Vulkan and OpenGL layers), shaders.md and game-state.md, indexed by docs/reference/README.md. Each entry gives the symptom, the cause, the fix (file and function), the games it was found on (linked to their notes in dm/games/<id>/README.md) and any check, caveat or later change; one mechanism met on several games is one entry. docs/agents/symptoms.md lists every entry's symptom (an assertion, a [RED] line, an abort or crash site, a visible result) with a link to it, 350 lines, generated from the Symptom bullets. 03 keeps the loop and reading the log, and its Failure catalogue section now points to the references, the index and where a new finding goes; 04 keeps sections 1-5 and 7 (the container list is shaders.md's Containers by engine), and section 6 says where each kind of finding is. Facts in the old sections about one game only were checked against that game's note, where they already were. Statements the code no longer matches are marked as history beside the current value (movie output slots: MD_NOUT 64, MD_NOUT_AAC 32, MD_NOUT_VIDEO 16; APP_POOL is the profile key app_pool; Engage's layout is 5 / 4.375 GB; inline uniform updates are deferred by default; scaled copies are drawn), and Tears of the Kingdom joins the node-area entry's build list (issue #70). The game notes, docs/agents/README.md, 02 and 05 link to the exact entries, and so do the comments in nvn_mtl.m (nvnTextureCompare) and hle_audio.c (the RemoteIO buffer) and the provisional-profile note in profile_guess.py. 03 goes from 29,600 to 470 words, 04 from 34,400 to 3,500. Checked: every backticked span, module address, issue / PR number and 16-digit hash of AGENTS.md, development.md, dm/games/README.md and docs/agents/01-05 at 6a06877 (4,600 items) still appears in the repository's Markdown (the same five file patterns as before appear as the full names they stood for), every relative link and heading anchor in the repository's Markdown resolves, and the tool tests pass (the four that need capstone or lz4 in the T7 venv)
2026-10-25 12:31:58 +08:00

5.0 KiB
Raw Permalink Blame History

Brain Memory Training Academy (0100F5D01DA3A000)

Base game 1.0.0 (v0), SDK 16.2.4. Unity 2022.3.5f1 IL2CPP with FMOD on NVN. Modules main, subsdk0 (the movie module) and sdk; the sdk is Unicorn Overlord 1.05's build (010069401ADB8000). Plays on the iPhone. On the Mac: the title, the controls screen, the level select and the levels with their Level Complete / Level Failed screens, at 60 fps with real sound and saves, no red line; about 0.75 GB resident, flat over 20 minutes.

What it needs

Setting Where Why
Node area cut 1 GB → 62 MB dm/tools/sdk_patches.py, sdk build 12f16103… (the constructor AddressRegionManagerC2 at sdk+0x134768; the movs at +0x134778 and +0x13480c) StandardAllocator::Initialize aborted in nninitStartup; see Memory
5 GB guest layout: mem_reserve 0x140000000, mem_alias 0x118000000, mem_stack 0x10000000, app_pool 0x40000000 game.tsv Ace Attorney Investigations Collection's layout (010005501E68C000): a 1 GB pool and the 5 GB block (256 MB in front + 4.375 GB alias region + 256 MB stack region + 128 MB heap region)
shader_groups /Resources/=engine /Data/=data game.tsv engine built-ins (Resources/: unity default resources, unity_builtin_extra) go to engine, the player's serialized files to data
No pad_layout (the 2D default) game.tsv controller only; see Input

Memory

  • The NPDM declares 16 MB of system resource, so IsVirtualAddressMemoryEnabled is true: nninitStartup (main+0x73ad60) hands application pool − used memory to StandardAllocator as virtual address memory and never calls SetMemoryHeapSize, as in Ace Attorney Investigations Collection.
  • Resolved: an nn::diag abort at sdk+0x126490 (StandardAllocator::Initialize, called from nninitStartup at main+0x73adcc); the NSP script's heap check reported "the host stopped before nnMain". The sdk build is Unicorn Overlord's, whose NPDM declares no system resource, so it never needed the cut; Unicorn Overlord runs the same with it. The constructor takes it at +0x134778 / +0x13480c.
  • Measured with probes on VammManager::AllocateAddressRegion's success path (sdk+0x1348b8: x21 size, x22 address) and FreeAddressRegion (sdk+0x135100): StandardAllocator takes 960 MB at +64 MB (it ends at +1.0 GB), and Unity's own regions (main+0x11bb4cc) hold about 0.54 GB more. Over four minutes of level loads the live regions end at +2.0 to +2.1 GB of the 4.375 GB alias region. In 20 minutes the mapped high-water mark stopped at +2.51 GB (about 4 minutes in), at most 0.5 GB mapped, about 0.75 GB resident on the Mac. The bring-up run (five minutes of level loads) had the high-water mark at +2.25 GB.
  • With this layout the game boots to its title in 5 s with no red line.

Input

  • Controller only (stick or D-pad, A, B, +): the game never reads the touch screen, so it stays docked at 1920x1080 and the virtual gamepad starts in the 2D layout.

Files and shaders

  • 496 stage shaders in the player's serialized files (Data/*.assets, Data/Resources) and main: 439 engine built-ins, 46 of the game's, 11 of the player's in main, and the built-in VR blit's geometry shader, which does not build.
  • Resolved: the split stopped with "no bundle has a Shader type tree of the same hash to borrow". There are only Data/*.assets, level* and the two engine files in Data/Resources, none with type trees, and no bundle. The Shader type hash there (ea424a5f…) is the one in Ace Attorney Investigations Collection's bundles (2022.3.17f1): the same layout. unityfs.py now carries that layout written out (KNOWN_TREES: about 30 structs; tree_from_layout builds the tree a file with type trees would have), and the split's second pass gives it to the stripped files when no bundle lent a tree of that hash.
  • It calls GetSharedFontAddress without importing ScalableFontEngineHelper::Decode, so the host gives it the TTF itself (font_skip, see Patrick's Parabox).

Mac routes

  • DM_KEYS="f400:A,f700:A,f1000:A,f1200:Right,f1300:A" starts a new game, enters level 1 and clears it (Level Complete at about frame 1,350).

Found on this game

General changes first needed here; each applies to every game:

Open

  • The built-in VR blit's geometry shader does not build.
  • game.tsv has no sys_resource row, so the host reports its default, 32 MB (game.py, hle_svc.c), where the NPDM declares 16 MB.