Repository navigation
mvgl.py: read MVGL archives with 24-byte data entries (The Hundred Line) - #751
Open
buinghia98 wants to merge 1 commit into
Open
buinghia98 wants to merge 1 commit into
buinghia98 wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Commit:
tools: mvgl.py reads MVGL archives with 24-byte data entriesBase: upstream
main@0766fc9(Peanuts Native 0.1.8 + catalog update).Dependencies: none. The Hundred Line profile PR (PR B) depends on this PR.
Issue
The Hundred Line -Last Defense Academy- (
010093C0215B4000) keeps its shaders in Media.Vision's MVGL archives (*.nx64.mvgl). The shader split found only the shaders inmain(178). It found no shader in the archives. Without them, the game cannot get a full shader library.Feature description
mvgl.pydid not identify these archives as the 64-bit layout, because the tables do not end at the data start with 16-byte entries.data_entry: it finds the entry size from the point where the tables end. It tries 16 first, then 24.wideaccepts both sizes.Archivereads the entries with that size.test_reader_24inpeanuts/tests/test_mvgl_wide.py.dmsh_*, chain headers,dmsh_chain.lock).mvgl.pyonly reads archives for the split. The libraries of other games do not change.Test results
Split and pack (Windows PC, The Hundred Line 1.2.1):
shader_split.pyfinds 7,204 shaders (4,779 pixel, 2,425 vertex): 7,026 from the archives and 178 frommain. No[RED]line. The conflict table is empty.spirv-val --target-env vulkan1.3.PC tests on this branch:
test_mvgl_wide.py: 6 of 7 pass, including the newtest_reader_24.test_readerhas an error on Windows only: the test cannot delete its temporary archive while it is open (PermissionErrorWinError 32). It fails the same way on the clean base0766fc9.mvgl.py liston the game'sapp_0.nx64.mvgltables: 64,274 entries, 16,810 of themshad. On the clean base, the same command gives 1 entry.upstream-update.sh --check origin/main: passed.check-publish.sh origin/main: clean.gen_runtime_profile.py check-all,docs_patches.py --check,docs_symptoms.py --check,env_switches.py --check,advanced_switches.py --check,check-runtime-profile.sh,check-profiles.sh: all pass.test_game_profile.py,test_docs.py,test_android_frame_rate_caps.py: pass.0766fc9too (not caused by this PR):test_fpslocker_rows.py,test_fpslocker_plan.py: the Windows MinGW compiler cannot build them (-fsanitize=undefined: noubsanlibrary; a 16 KB alignment is too large for the object format).test_android_frame_rate_games.py: EA SPORTS FC 27 (0100C49025D3E000) does not offer 45 fps.make -C dm/host/tests). They need clang and AddressSanitizer, which this Windows PC does not have. This PR does not change C code.test_reader(its error is in the cleanup only) and bytest_reader_24, which checks thatdata_entrygives 16 for a 16-byte archive.Files changed
dm/gfx/tools/mvgl.py(3 hunks,PEANUTSmarkers)peanuts/tests/test_mvgl_wide.py(test_reader_24)peanuts/UPSTREAM-EDITS.md(one entry)3 files. No binary files.