Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ Under each game: the IPA's size, and "60 fps with 1.2.0" where the game runs at
<td align="center" valign="top" width="33%"><img src="docs/images/mario-rabbids-sparks-of-hope.jpg" width="256" alt="Mario + Rabbids Sparks of Hope"><br>Mario + Rabbids Sparks of Hope<br><sub>~9.8 GB</sub></td>
<td align="center" valign="top" width="33%"><img src="docs/images/xenoblade-chronicles-3.jpg" width="256" alt="Xenoblade Chronicles 3"><br>Xenoblade Chronicles 3<br><sub>~19.2 GB</sub></td>
</tr>
<tr>
<td align="center" valign="top" width="33%"><img src="docs/images/return-of-the-obra-dinn.png" width="256" alt="Return of the Obra Dinn"><br>Return of the Obra Dinn<br><sub>~2.1 GB</sub></td>
</table>

## Pack an IPA
Expand Down
52 changes: 52 additions & 0 deletions dm/games/010032E00E6E2000/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Return of the Obra Dinn (`010032E00E6E2000`)

Base game 1.0.0 (v0), SDK 8.2.1. Unity 2017.4.28f1 IL2CPP with FMOD on NVN. Modules `main`,
`subsdk0` (the movie module) and `sdk`. No host change was needed and no rewriter cuts are
registered for this game.

On the Mac: the save-slot menu, the opening briefing letter and the first-person deck scene,
at 60 fps (frame time p50 16.66 ms, GPU p50 3.49 ms), with audio; no crash and no dropped frames
over a 40-second run. Two render pipelines fail to build at startup and their draws are skipped;
see [Open](#open).

## What it needs

| Setting | Where | Why |
|---|---|---|
| `modules main subsdk0 sdk` | [`game.tsv`](game.tsv) | `main` imports from all three; `subsdk0` is NintendoSDK_movie |
| `sys_resource 0x0` | [`game.tsv`](game.tsv) | the NPDM declares 0 MB of system resource: `IsVirtualAddressMemoryEnabled` is false, so no heap check runs |
| `mem_reserve 0x100000000`, `mem_alias 0x10000000`, `mem_stack 0x10000000`, `app_pool 0xCD500000` | [`game.tsv`](game.tsv) | `main` sets a heap of at most the pool − 64 MB: a 3328 MB heap region |
| `shader_groups /Data/=data` | [`game.tsv`](game.tsv) | the shaders are Shader objects in `Data/*.assets`, `data.unity3d` and the UnityFS bundles |
| `romfs_marker Data/sharedassets1.assets` | [`game.tsv`](game.tsv) | the RomFS is a normal folder tree |

## Files

- `Data/Resources/unity default resources` and `unity_builtin_extra` are serialized files with no
type trees, and the game ships no bundle carrying a Shader tree of the same hash to borrow, so the
profile relies on the Unity 2017.4 Shader layout in `dm/gfx/tools/unityfs.py`.
- 273 RomFS files, 1.95 GB, 13 UnityFS bundles.

## Shaders

- 1,260 shaders, split from the UnityFS bundles and `data.unity3d`. The game has no PC version to
pair against, so `shader_pairs.tsv` holds a single vertex/pixel pair and most vertex shaders are
translated without a known partner.

## Memory

- Resident footprint stayed between 950 MB and 1.2 GB over the runs; `mem_used` is 0x4600000 after
the rewrite.

## Open

Two pipelines fail to build, once each at startup, and their draws are skipped:

```
failed to create render pipeline (vertex fc0fe6645a7a8a0a_b fragment 55b351df8df20311_b):
Fragment input(s) `user(locn1)` mismatching vertex shader output type(s) or not written by vertex shader
failed to create render pipeline (vertex 4f00dcc565bde774_b fragment 7deb26f61143a68c_b): (same)
```

Everything visible renders correctly around them. Not investigated further yet.

Not tested: iPhone (no IPA built), and no `regress.py` route, so no `smoke.tsv`.
1 change: 1 addition & 0 deletions dm/games/010032E00E6E2000/bf_want.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# generated
39 changes: 39 additions & 0 deletions dm/games/010032E00E6E2000/game.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Provisional game profile (generated by scripts/build_ipa_from_nsp.py from the survey with dm/games/profile_guess.py, not checked by hand)
# Return of the Obra Dinn, SDK 8, survey /Volumes/2Tb SSD/Roms/Switch/Return of the Obra Dinn/010032E00E6E2000_survey/survey.md

# ---- Identity ----
title_id 010032E00E6E2000
program_id 010032E00E6E2000

# ---- App ----
name Return of the Obra Dinn
ipa ReturnOfTheObraDinn.ipa
app_category public.app-category.games

# ---- Versions ----
build v0 1.0.0 main=46d86b5382b4a94ebec12454cc43ab83 subsdk0=60c6edbbfcebd4176cc301d5d9cb5a6f sdk=5fd4f531c1195e9e5510c9e73f22cd39
package v0
shader_versions v0

# ---- Files ----
# every module main imports from
modules main subsdk0 sdk
romfs_marker Data/sharedassets1.assets
zip_store .assets:.dat:.resource:.ress:.metallib

# ---- Memory ----
# main sets a heap of at most the pool − 64 MB: a 3328 MB heap region
mem_reserve 0x100000000
mem_alias 0x10000000
mem_stack 0x10000000
app_pool 0xCD500000
# the NPDM declares 0 MB of system resource: IsVirtualAddressMemoryEnabled is false, as on Horizon (Big Brain Academy: Brain vs. Brain sets a heap only then)
sys_resource 0x0

# ---- Shader split ----
shader_groups /Data/=data
shader_note Return of the Obra Dinn shaders (provisional profile)

# ---- After the rewrite ----
# used memory for the current rewritten modules, at least the default 64 MB
mem_used 0x4600000
2 changes: 2 additions & 0 deletions dm/games/010032E00E6E2000/pso_manifest.tsv
Original file line number Diff line number Diff line change
@@ -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).
1 change: 1 addition & 0 deletions dm/games/010032E00E6E2000/pso_pairs.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# kind: evidence vertex / pixel shader pairs of agl program variations (BAHS) that shader_pairs.tsv does not hold, for vertex output padding and the pipeline prebuild (generated by dm/gfx/tools/shader_split.py, do not edit): vertex key <TAB> pixel key
1 change: 1 addition & 0 deletions dm/games/010032E00E6E2000/shader_facts.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# 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
Loading
Loading