Files
seeddsandv0lumehi 92fc2f2711 Build and ship offline Metal pipeline archives (#226)
Compile eligible shader-pair bases on the Mac with metal-tt, package one
archive per selected iPhone GPU, and use a matching bundle before falling
back to on-device preparation. Carry the profile depth mode through packing
and include the pulling libraries required by the bundled bases.

Integrate PR #226 with four confirmed fixes: validate archive container
bounds before invoking Metal; require at least one actual successful bundle
probe; hash consumed library bytes into offline cache keys; and emit device
remainder lists for constant-only plans instead of aborting packaging.
Keep game measurements in the game note and document the general findings.

Validation on current main: 52 real Metal bundle checks, 57 archive checks,
79 prewarm checks on each pipeline path, 73 Python regressions covering
offline tools, packaging, documentation and chain checks, and compilation
of all 133 iOS source files. No new iPhone gameplay validation. The archive guard validates
container structure, not private Metal payloads.

Co-authored-by: v0lumehi <aljic.zijad@gmail.com>
2026-10-26 10:52:50 +08:00

2.6 KiB

1# Game profile of Big Brain Academy: Brain vs. Brain (Switch, update 1.2.0). Plays on the Mac and on the iPhone
2# Format: see dm/games/README.md
3# NintendoWare Bezel Engine 1.56, SDK 11.4.3: nearly all of RomFS is in Bezel Engine archives (.bea, zstd entries); the shaders are BNSH in their .bfsha entries (the engine's own in System.nx.bea),
4# in the layouts' archive shaders and in main (shader_split.py bea_members)
5# ---- Identity ----
6title_id0100620012D6E000
7program_id0100620012D6E000
8# ---- App ----
9# 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)
10nameBig Brain Academy: Brain vs. Brain
11ipaBigBrainAcademyBrainVsBrain.ipa
12app_categorypublic.app-category.puzzle-games
13# ---- Versions ----
14buildv1310721.2.0main=bfed48f22df30be71b4eeae5b0373a9fsubsdk0=4dd097b435891c5e0e15a65dbe47124fsubsdk1=507f19d1240d09d00992248e8a0fd77esdk=2d369d9999e3e10e665106f840ffff9b
15packagev131072
16shader_versionsv131072
17# ---- Files ----
18# load order as on Horizon: main, subsdk*, sdk (subsdk0 = GLSLC, subsdk1 = NintendoSDK_movie)
19modulesmain subsdk0 subsdk1 sdk
20romfs_markerArchive/Permanent~01Boot.nx.bea
21zip_store.bea:.bfstm:.mp4:.metallib
22# ---- Memory ----
23# The NPDM declares no system resource, so IsVirtualAddressMemoryEnabled must be false: nninitStartup (main+0x5b6984) then sets a heap of pool − used memory (2 MB aligned) and hands it
24# to StandardAllocator; with virtual address memory it asks for a 60 GB address region instead. The 4 GB layout with a 3328 MB heap region: SetHeapSize asks for 3.14 GB.
25# Within it the game creates 1.5 GB of NVN memory pools in its first 25 s (about 1.3 GB resident at the title on the Mac)
26sys_resource0
27mem_reserve0x100000000
28mem_alias0x10000000
29mem_stack0x10000000
30app_pool0xCD500000
31# ---- Shader split (shader_split.py; BNSH in the Bezel Engine archives, bea_members) ----
32# the engine's own resources (System.nx.bea) go to system, the game's archives to archive
33shader_groups/System.nx.bea/=system /Archive/=archive
34shader_noteBig Brain Academy: Brain vs. Brain shaders
35# ---- Mode ----
36# Handheld, the game reads the touch screen (menus, every activity, Party's two-player touch battles); docked it does not. Handheld Normal draws 1280x720,
37# handheld with Boost 1920x1080 (the window crop goes from 1280x720 to 1920x1080 once the game sees Boost)
38op_modehandheld
39perf_modeboost
40# the NVN depth mode the game sets (nvnDeviceSetDepthMode near = 0): the pipeline archive made offline holds the main0_z vertex entries (dm/gfx/tools/pso_offline.py)
41depth_modezero