Skip to content

Add a Trails beyond the Horizon 1.0.6 profile and P3A shader reader - #580

Open
tapionallanaire wants to merge 1 commit into
igawa6:mainfrom
tapionallanaire:pr/horizon-rebase-20261125
Open

tapionallanaire wants to merge 1 commit into
igawa6:mainfrom
tapionallanaire:pr/horizon-rebase-20261125

Conversation

@tapionallanaire

Copy link
Copy Markdown
Contributor

Supersedes #223, rebased onto main (0.1.7).

What and why

Add the v131072 profile for 01007B102141A000. The updated executables and base RomFS must be read together: 10,302 shader keys are in indexed P3A members, versus 18 in main. The reader seeks to named NVN members without decoding unrelated assets. The profile also provides a 16 GiB alias region for the 13.01 GiB startup reservation, independently of the heap.

What changed in the rebase

  • Cherry-picked onto 719d4f7b (0.1.7). Conflicts were only in index files, resolved by keeping both sides: the games table row (sorted before Trails in the Sky 1st Chapter, which main added), the peanuts/UPSTREAM-EDITS.md section (appended after main's), and the five peanuts/upstream-unmarked.txt rows. shader_split.py merged cleanly beside the readers main added since (VFS3, DRPF, MVGL).
  • game.tsv already uses the keys and layout of main's profiles (compared with Trails in the Sky 1st Chapter's); no key changes were needed.
  • The shader tables are the PR's original splitter output, unchanged: regenerating them needs the game dump. The current profile and reader tests accept them (below).
  • The note now records the build facts (patch CNMT, base build ID), the shader and memory derivations, and the hardware checkpoints listed below.

Checked

On this rebased branch:

  • test_split_p3a.py: a synthetic raw-LZ4 P3A recovers the NVN stage and reports a truncated member as unreadable.
  • The Python suite (python -m unittest discover -s dm/tools/tests), compared with the same run on plain main: 1,581 tests on this branch against 1,580 on main. The failing and erroring tests are the same 215 on both (this run was on Windows: macOS-only tools, links to a missing .github/README.md, DM_GAMES_DIR paths with a drive letter), and the new P3A test passes.

From the earlier tree (#223's head and a later tree), not repeated on 0.1.7:

  • All 10,320 unique map keys translated and all 27,588 SPIR-V modules passed spirv-val (Vulkan 1.3); 1,488 vertex/pixel pairs and 36 compute facts validated.
  • AYN Thor, Turnip v27.0.0-R1, Add a Trails beyond the Horizon 1.0.6 profile and P3A shader reader #223's head: New Game reached the Elder Wyvern battle and Attack reduced its HP from 4,873, but readable frames alternated with large red, yellow and white rectangles. Two runs logged ui_basic_p.nvn (b1d413be3527ef40) reading unregistered texture IDs 310/311 at bindings 257/259.
  • AYN Odin 2, Turnip v27.0.0-R1: with this profile the opening showed overlapping colored glyphs above a black area. On the same device, driver, game and shader library, a tree that also carried the executing-queue descriptor-pool fix (sent with the Trails through Daybreak II PR) and other renderer changes showed no glyphs or rectangles in the inspected opening scenes, and a fresh English New Game on Normal reached the Elder Wyvern Command Battle: Attack took the enemy from 4,873/4,873 to 4,458/4,873 and the next party member became active. That comparison does not isolate one fix, and the rest of the battle, free movement, save/load and sustained performance were not checked.

Not checked on this branch: an APK build, Prepare, any device run. The release roster is unchanged.

Docs

  • The profile note and its games-table row; the UPSTREAM-EDITS.md entry. The symptom index is current.
  • Source and metadata only; no game or shader bytes, keys, binaries, prewarm captures, chain lock or chain headers.

Read indexed NVN members from the merged RomFS and reserve sufficient alias space for the startup arena. Keep release selection unchanged pending rendering and input checks.
@igawa6

igawa6 commented Nov 24, 2026

Copy link
Copy Markdown
Owner

Thanks for this, and for the P3A reader. Reading only the indexed .nvn members is the right way to handle these archives.

We're holding it for now:

  • It depends on the descriptor-pool fix. By your own runs, this profile draws large colored rectangles and broken glyphs unless the descriptor-pool fix from Bring up Trails through Daybreak II 1.0.0 on Android #581 is also applied. We've asked for that fix as its own PR, to be tested on release games. This profile follows once the fix is in.
  • The reader looks safe to land. It only runs on the PH3ARCV magic, and no profile on main reads a .p3a today, so no other game's tables change.

When you rebase onto the current main (0.1.8), please resolve the conflicts in peanuts/UPSTREAM-EDITS.md and peanuts/upstream-unmarked.txt (index files only). After the pool fix lands, a run on the 0.1.8 runtime with a pack built from the current chain would tell us whether the rectangles are gone with that fix alone.

@igawa6 igawa6 added the new-game Requests and reports for adding games or game profiles label Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-game Requests and reports for adding games or game profiles

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants