Repository navigation
Conversation
FINAL FANTASY CRYSTAL CHRONICLES Remastered Edition (Unity 2018.4.2f1) draws its maps and effects with programs outside Unity's Shader objects: the TextAsset shader.switch.vfxsb in Data/resources.assets holds 1,160 whole GLSLC outputs (1,207 distinct shaders); without them its terrain drew with black holes. unityfs.text_assets reads TextAsset names and bytes without a type tree (the tables now parsed by _tables, shared with serialized_objects); unity_text_glslc passes those holding the GLSLC magic to glslc_shaders. Files without the magic are not decoded, so other games' tables are unchanged. Documented in docs/reference/shaders.md; test_unity_text_glslc.py covers it with a synthetic serialized file. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…tAsset reads (#203, #238) #203 as submitted stopped the shader split of Tears of the Kingdom with a TypeError: its 1,202 Cave/.../C.crbin.<hash>/*.quad files are a 4-byte hash (the one in their folder name), then a zstd frame, so they pass the gate, and on the length mismatch the error path took len() of None. The PR checked Wonder and Yoshi only; of the RomFS of 39 games on hand, only those files have a frame at +4. - unsized: a frame whose header records a size other than the prefix is not such a container and is read as it is, without decompressing it (frame_size). A frame that records none (Kirby's LZ4 frames) must decompress to exactly the prefix's size: the whole output is compared, where the PR's max_length cut a longer frame at the prefix and let it pass. - The dictionary handling is shared with unzs (zs_dict_id, unzs_dict). A dictionary ZDICTS does not have is still reported, not fatal, as in the PR: the ID may be any bytes after a magic at +4. - unityfs.text_assets: an object shorter than the two length fields, or one whose name padding leaves no room for the script's length, is left out instead of reading past its end (struct.error, which stopped the split). Checked: - Kirby and the Forgotten Land (base and update 1.1.0): 121 shaders before, 27,288 after (27,302 with the update), no [RED] line. 5,121 zstd frames record their size, equal to the prefix; 2,080 + 354 LZ4 frames record none and decompress to the prefix's size. The PR's "383 in lyt/" is 378. - Tears of the Kingdom: the full split exits 1 with #203 alone; with this commit its package and tables are byte-identical to main's, no [RED] line. - main's split and this branch's give byte-identical packages and tables on Monster Train 2, Ace Attorney Investigations Collection, AI: THE SOMNIUM FILES, nirvanA Initiative, BALL x PIT, Advance Wars 1+2, Brain Memory Training Academy (Unity 2017.4 to 6000) and Super Mario Bros. Wonder. - New test_size_prefixed_frames.py; test_unity_text_glslc.py covers short objects (fails on #238's unityfs.py). All of dm/tools/tests pass. - Not checked here: FINAL FANTASY CRYSTAL CHRONICLES (#238's game) is not on hand; Kirby has not been run.
|
Thank you, this is on main as 1c857ca, with a small follow-up in eb858ec: Checked here: main's split and this one give byte-identical packages and tables on the seven Unity games on hand (Unity 2017.4 to 6000: Monster Train 2, Ace Attorney Investigations Collection, both AI: THE SOMNIUM FILES, BALL x PIT, Advance Wars 1+2, Brain Memory Training Academy). FINAL FANTASY CRYSTAL CHRONICLES Remastered Edition is not on hand, so the gain itself is checked only by your runs. Could you run main's |
|
Thanks! I built FINAL FANTASY CRYSTAL CHRONICLES Remastered Edition 1.0.3 for the Mac from main (ce9b30b), with #285's profile and main's tables (through DM_GAMES_DIR):
Separately, on macOS 27.0.1 (M2 Pro): starts on one saved pipeline archive (17 files: 13 with a vertex layout, so compaction runs, plus 3 new bases) crash in the first flush: |
|
Follow-up on the pipeline-archive crash: with main's tip (1402ded, the host built from #285's branch) the same archive no longer crashes — 0 of 5 starts, each opening its 17 files, writing a new file and compacting the 13 old ones, the flush that crashed 11 of 13 starts with the ce9b30b host. So 1402ded's "archive build folders never taken at a recapture" looks like the fix; one thing I can't explain is that a ce9b30b host with e72991d's nvn_mtl.m hunk reverted still crashed 2 of 3. The archive copy is still here if you want it. |
…tAsset reads (seedds#203, seedds#238) seedds#203 as submitted stopped the shader split of Tears of the Kingdom with a TypeError: its 1,202 Cave/.../C.crbin.<hash>/*.quad files are a 4-byte hash (the one in their folder name), then a zstd frame, so they pass the gate, and on the length mismatch the error path took len() of None. The PR checked Wonder and Yoshi only; of the RomFS of 39 games on hand, only those files have a frame at +4. - unsized: a frame whose header records a size other than the prefix is not such a container and is read as it is, without decompressing it (frame_size). A frame that records none (Kirby's LZ4 frames) must decompress to exactly the prefix's size: the whole output is compared, where the PR's max_length cut a longer frame at the prefix and let it pass. - The dictionary handling is shared with unzs (zs_dict_id, unzs_dict). A dictionary ZDICTS does not have is still reported, not fatal, as in the PR: the ID may be any bytes after a magic at +4. - unityfs.text_assets: an object shorter than the two length fields, or one whose name padding leaves no room for the script's length, is left out instead of reading past its end (struct.error, which stopped the split). Checked: - Kirby and the Forgotten Land (base and update 1.1.0): 121 shaders before, 27,288 after (27,302 with the update), no [RED] line. 5,121 zstd frames record their size, equal to the prefix; 2,080 + 354 LZ4 frames record none and decompress to the prefix's size. The PR's "383 in lyt/" is 378. - Tears of the Kingdom: the full split exits 1 with seedds#203 alone; with this commit its package and tables are byte-identical to main's, no [RED] line. - main's split and this branch's give byte-identical packages and tables on Monster Train 2, Ace Attorney Investigations Collection, AI: THE SOMNIUM FILES, nirvanA Initiative, BALL x PIT, Advance Wars 1+2, Brain Memory Training Academy (Unity 2017.4 to 6000) and Super Mario Bros. Wonder. - New test_size_prefixed_frames.py; test_unity_text_glslc.py covers short objects (fails on seedds#238's unityfs.py). All of dm/tools/tests pass. - Not checked here: FINAL FANTASY CRYSTAL CHRONICLES (seedds#238's game) is not on hand; Kirby has not been run.
FINAL FANTASY CRYSTAL CHRONICLES Remastered Edition (Unity 2018.4.2f1 IL2CPP, SDK 8.2.1) drew its terrain with black holes, and the log listed about 57 shader keys "not in the shader map". The shaders were not in any Unity
Shaderobject: the game keeps 1,160 whole GLSLC outputs (1,207 distinct shaders) of its own in the TextAssetshader.switch.vfxsbinData/resources.assets, which it hands to NVN itself.shader_split.pyread onlyShaderandComputeShaderobjects, and its fallback for loose GLSLC outputs skips Unity files.unityfs.text_assetsreads each TextAsset's name and bytes without a type tree (the object starts withm_Nameandm_Scriptin every Unity version these tools read). The header and object-table parsing moves out ofserialized_objectsinto_tables, shared by both;serialized_objectsbehaves as before.unity_text_glslc, called fromunity_shaders, decodes a file's TextAssets only when the file holds the GLSLC magic, and passes those that do toglslc_shaders, which keeps only outputs that pass its own checks. A Unity file without such a TextAsset is not decoded further, so other games' tables are unchanged.docs/reference/shaders.md, "GLSLC outputs in a Unity TextAsset".Checked
main(9a56ecf): the host unit tests; every test indm/tools/tests,dm/ios/testsanddm/gfx/tests;dmhostfor Super Mario Bros. Wonder (NVN), Hades (Vulkan) and Digimon Story Cyber Sleuth (GL); the iOS compile check.test_unity_text_glslc.py, a synthetic serialized file with one TextAsset holding a GLSLC output and one without (no game data).[RED]"not in the shader map" lines went from 86 to 0 in four Mac runs of 60 to 220 s, and the terrain draws whole.Not checked
ComputeShaderobjects are still skipped with the existing[RED]line; no run asked for one.One of three independent PRs from the same bring-up; they touch separate code and can land in any order.
🤖 Generated with Claude Code