
- Title ID
- 010036E00FB20000
- Tested build
- 1.0.0 (base)
- Nintendo SDK
- 10.4.1
- Engine
- Capcom's MT Framework
- Graphics API
- NVN
Build this game
Keep [010036E00FB20000] in your file names, put the base game, update and DLC in one folder and run the script. Follow the build guide, then the sideloading guide. Needs an iPhone 15 Pro or newer, or an M1 iPad or later.
Technical notes
The project's own record of bringing this game up: what its profile needs and why, what was found and what is still open.
Base game 1.0.0 (v0), with its DLC 010036E00FB21001. SDK 10.4.1. Capcom's MT Framework on NVN. Modules main, subsdk0 (the SDK's movie module, NintendoSDK_movie, whose extractor runs natively while the host decodes the H.264 movies with VideoToolbox) and sdk; subsdk0 and sdk are the same builds as Advance Wars 1+2: Re-Boot Camp's (0100300012F2A000). Plays on the iPhone; 30 fps, as the game paces itself.
What it needs
| Setting | Where | Why |
|---|---|---|
tex_flush_upload on, tex_dirty_upload on |
game.tsv |
the CPU copies every texture into a CPU-cached pool after creating it and never flushes; with tex_flush_upload alone the screen stayed black. See Rendering |
4 GB layout: mem_reserve 0x100000000, mem_alias 0x10000000, mem_stack 0x10000000, app_pool 0xCD500000 |
game.tsv |
the NPDM declares no system resource (META +0x14 = 0): nninitStartup sets a heap of the pool − 64 MB (3.14 GB); main's bss is 9.2 MB |
| Node area cut 1 GB → 62 MB, 4 MB / 32 MB / 1 GB alignment → 2 MB (SDK 20's) | dm/tools/sdk_patches.py SDK-wide rules, sdk build d9add76f… |
the SDK-wide rules' cuts; made for Advance Wars 1+2: Re-Boot Camp, which shares the build. This game has no virtual address memory and never makes an address region |
pad_layout not set (the default simple, 2D) |
game.tsv |
the gamepad starts in the 2D layout (the player-facing README lists it among the games that do) |
depth_mode zero |
game.tsv |
the game sets the near = 0 depth mode, so the pipeline bases made before it runs (the NSP script's Mac prebuild, and a pipeline archive made offline for the iPhone when one is built with DM_PSO_GPUS) take its vertex shaders' main0_z entries (the host itself follows the mode the game sets) |
Rendering
- Upper-left window origin, depth mode near = 0, a 1920x1080 RGBA8 swapchain; the game asks for present interval 1 and paces itself at 30 fps. Mario's binding layout (combined textures at
0x20 + 8 × slot, slots 0–2). - Resolved: black screen at boot, with the draws of a dialog box in the pass dump (sampling 256x256 and 1024x256 textures of format 0x4d). No texture had been uploaded from guest memory (
packaged textures: first uploads 0), andDM_NVN_TEXINFO=1024x256showed storage that already held data at first use (226,555 of 262,144 bytes non-zero): no packaged layout, block-linear, in a 1000 MBCPU_CACHED | GPU_CACHED | COMPRESSIBLEpool (flags 0xa4). A log of the pool flushes, texture creations and file reads (temporary lines underDM_NVN_LOG) showed how they are filled: every.texis read into staging buffers (512 KBReadFiles, none into the pool), and the CPU copies the texels into the texture's storage afternvnTextureInitialize, with nonvnMemoryPoolFlushMappedRangeover them and noWriteTexels; only the four linear 1024x64 text textures are flushed, every frame.mainhas no cache maintenance instruction at all, so there is no flush for the host to take as the signal. Withtex_dirty_uploada registered texture whose pages the CPU writes after creation is uploaded at its first use (as for FINAL FANTASY TACTICS - The Ivalice Chronicles, 010038B015560000). - Resolved: court-record pictures black, or showing the previous item (reported on the Japanese release,
0100D7F00FB1A000, GitHub issue #568). Some BC1 images are written into their storage beforenvnTextureInitialize, whichtex_dirty_uploaddoes not see: the court record's evidence and profile pictures, and the chapter title cards. For the next item, the game writes the new picture into the same storage and builds a new texture object over it. These are now CPU-written at first use: Block-compressed storage the CPU wrote before first use. Nobody has checked yet whether the Western release shows the court-record problem.
Services
- Resolved: the first boot crashed in
oe::DisableAlbumImageTakenNotification(a null read atsdk+0x338070, the first call innnMain,main+0x6b188c: the SDK asks am through the applet proxy the host never made). - The import list against the hooks (
nso_syms.py, thenmain's undefinednn::symbols noHLE_FORCEnames) gave the rest before they were met:oe::IsInStoreDemoModeEnabled(no);vi::ListDisplays(one display, "Default"; the game lists 10 into a stack buffer and does not read them,main+0x808f08);fs::RenameDirectory(asRenameFile);account::StoreSaveDataThumbnailImage/DeleteSaveDataThumbnailImage(nothing kept);- the
ec::ShowShop…overloads without anApplicationId(the calling application's own pages); friends::StartFacedFriendRequest/StartSendingFriendRequest(fail);ngc::ProfanityFilter::MaskProfanityWordsInText(int *, char *, uint32_t),SetMaskModeandFinalize, which this game calls by name rather than through the vtable.
- The touch-screen states (
GetTouchScreenState<16>) were already hooked by a macro the import table does not see. - Two NVN calls were red stubs:
nvnDeviceSetIntermediateShaderCacheandnvnCommandBufferDiscardColor(a discarded target is undefined, so keeping its content is correct). After that it ran its frame loop at 30 fps; the black screen it showed was its textures (above). - Add-on content: index 1 (
DLC.dlcp); the game reports it found and added to Special Contents.
Files and shaders
- Everything is under
nativeNXx64/: 447 ARC archives (*.arc, 17,910 files; version 7, one zlib stream per file) of models (.mod/.mrl), textures (.tex), scripts and messages (.gmd), beside loose.textextures, Opus / ADPCM sound and 24 H.264.mp4movies (shader_split.pymtarc_members; 01).romfs_markerisnativeNXx64/sa/NX_64/root.arc. - Shaders: 460 (230 vertex, 230 pixel) in the engine's one shader package,
sc\NX_64\root(SPK\0, type hash0x02358e1a) innativeNXx64/sa/NX_64/root.arc(shader_split.pymtspk_shaders). All build and every binding decodes. The package's own vertex / pixel combinations are not read, so the vertex shaders are paired with the single-stage cover.CustomShaderPackage.mfx(MFX\0, the effect descriptions) holds no shader code, and neithermainnor any other ARC entry does.
Status on the Mac
- The first-boot notices (the DLC found, auto-save), the title and its Options, a new game of The Great Ace Attorney: Adventures, the opening movie, the first episode's opening scenes and its trial, at 30 fps with sound and saves; about 1.1 GB resident, flat over 14 minutes (1.07 GB in the first episode's holding cell).
Mac routes
DM_KEYS="f700:A*1000/24"(A every 24 frames) goes through the notices, the title and a new game into the opening movie; the first episode's dialogue starts at about frame 6,000 and its trial at about 20,000.
Found on this game
General host changes first needed here; each applies to every game:
- CPU-written textures with no flush (
tex_dirty_upload): CPU writes with no flush, caught by page protection, key in dm/games/README.md. - Block-compressed textures written before their first use: Block-compressed storage the CPU wrote before first use.
- The MT Framework ARC and SPK readers (
mtarc_members,mtspk_shaders): SPK shader package in an MT Framework ARC. - SDK 10 calls found from the import list,
nvnDeviceSetIntermediateShaderCacheandnvnCommandBufferDiscardColor: services.md, NVN calls that were red stubs.
These notes are republished from the nxnative repository under its MIT license (license and attribution). The original, which may be newer, is the game's notes on GitHub. This site hosts no game files.