From b2e300a1ed3cd8d038ec7e2533276119cb7cfd16 Mon Sep 17 00:00:00 2001 From: buinghia98 Date: Thu, 26 Nov 2026 01:18:20 +0700 Subject: [PATCH] tools: mvgl.py reads MVGL archives with 24-byte data entries The Hundred Line -Last Defense Academy- (010093C0215B4000) keeps its shaders in MVGL archives of the 64-bit layout, but each data entry is 24 bytes (u64 offset, u64 length, u64 stored length), not 16 as in Digimon Story Time Stranger. The reader did not take these archives as the 64-bit layout, so the shader split found only the 179 shaders in main. data_entry now tells the entry size by where the tables end, 16 first, so Digimon's archives read as before. The split of The Hundred Line 1.2.1 finds 7,204 shaders (7,026 from the archives), and all 9,060 Vulkan modules pass spirv-val. test_reader_24 covers the new layout. --- dm/gfx/tools/mvgl.py | 15 ++++++++++++--- peanuts/UPSTREAM-EDITS.md | 9 +++++++++ peanuts/tests/test_mvgl_wide.py | 18 +++++++++++++++--- 3 files changed, 36 insertions(+), 6 deletions(-) diff --git a/dm/gfx/tools/mvgl.py b/dm/gfx/tools/mvgl.py index ea9bf3a61..3b38f82b7 100644 --- a/dm/gfx/tools/mvgl.py +++ b/dm/gfx/tools/mvgl.py @@ -54,7 +54,15 @@ def doboz(b): # A file whose stored length is below its length is one LZ4 block (not doboz). The layout is told by its tables ending exactly at the data start. def wide(h): nt, nn, nd, start, size = struct.unpack_from('