Series 1.0.2.1: the package's archives are checked before the title runs (port of Marvisak/VIctory#12, and more) #1217
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!1217
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1217"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@kibagami-nc on GitHub · 2026-11-28 15:45 UTC · original
kibagami-nc:port/startup-archive-check→main· +256 −1 · 2 files · 3 commits · merged 2026-11-29 08:16 UTCWhat happens
At its start, the title opens
appdata0.rpfbeside its executable, and sets up its package mounts with it (packroot:/,packcache:/config). If the file is missing, or another file is in its place, a mount step fails. The title then stops at its own breakpoint at+0x2237178, before any window, and nothing names the cause.mercuryVM's static reading of that function and the reproduction are in Marvisak/VIctory#8. There, removing only
appdata0.rpffrom a package gave the same breakpoint and registers. Upstream fixed it in Marvisak/VIctory#12, merged after this fork's base, so it was never here. (Since #68, main identifies the 1.0.2.1 executable inKNOWN_BUILDS, as "Xbox Series master", for its upscaler patches. This PR adds its archives to that entry.)The change
Ported from Marvisak/VIctory a3acc87 (Peter Bonanni):
crates/victory-game/src/lib.rs:KnownBuildgainsstartup_archive(appdata0.rpffor main's 1.0.2.1 entry). File names are small interoperability constants, whichdocs/asset-policy.mdallows.apps/victory/src/run.rs: before executing that build (victory play,run --execute),check_startup_archivereads the archive's first four bytes. If the file is missing, unreadable, shorter than that, or not RPF9 (9FPR), the start stops with an error that names the file and says to restore it from the package..rpfbeside the executable and under itspackfolder. All 22 of Series 1.0.2.1's are RPF9 (counted by superboynick in Marvisak/VIctory#12), so one that doesn't start with9FPRis damaged. Those are named, relative to the folder, and the start stops.--set VICTORY_ARCHIVE_CHECK=0starts anyway.pack/story000_restofworld/story000_restofworld.rpfat the right size with its first 16 MiB zeroed. The title trapped at+0x29defb1one to four minutes into the start, and replacing the damaged files ended it. #1250 here has that trap..ttpf).KNOWN_BUILDS, and each must be there by its name. A missing one is named, along with any file beside it whose name begins as its own and ends in.rpf, for example "appdata0.rpf (there is appdata0 (1).rpf: rename it if it is that archive)". This runs before the header checks, andVICTORY_ARCHIVE_CHECK=0skips both.+0x2237178with the registers of a missingappdata0.rpf. Some of its archives had been saved as… (1).rpf, a download's second copy, which the title never opens. Renaming them fixed it.runwithout--executegets no check;What it covers here, and what not
It names the cause for a missing or replaced archive. #1190 and #1102 stop in the same package-mount code (
+0x2237178, and+0x2237320under the same+0x2236dae), but theirappdata0.rpfhas the right size. If its header is right too, this check passes and they still stop. Their cause is being narrowed down there, and this only takes one possible cause off the list at once.Confirmed in #1255: the stop came from the layout.
victory.exeandgame_scarlett_master.exewere at the root of the game folder, and the whole package (withappdata0.rpf) one folder deeper.G:maps to the executable's folder, so the game's first lookup missed, with the same registers as a removedappdata0.rpf(rax = rbx = rcx = 0,rdx = 0x66). Moving the executables in with the package fixed it. This check names that case before the start: "cannot read the startup archive …ppdata0.rpf".Update from #1102: the archive was its cause. Their
appdata0.rpf(SHA-256F08AD8B2…) has the right size and stops the game in the mounts. A copy from another source (D9D4D2DD…) gets past them and opens six more archives. So a wrong copy of the same size passes this header check. Catching that would take a known hash of the archive, which I have not added: one report is not enough to say which copy is the 1.0.2.1 one.Tests
Rebased on main
32ecacf, which now has its ownKNOWN_BUILDSentry for 1.0.2.1 (#68).run::startup_archive_tests::the_startup_archive_is_checked_before_the_title_runs:identifygives main's "Xbox Series master" entry withappdata0.rpffor the hash, in any case;run::startup_archive_tests::damaged_archives_of_the_package_are_named:.rpfbeside the executable and one underpackare named, along with a 2-byte one;.ttpf, abackupfolder and a text file are not looked at;run::startup_archive_tests::missing_archives_are_named_with_their_look_alikes:appdata0 (1).rpfandlevels(2).rpfbeside them, the three are named with their look-alikes;cargo test -p victory --locked(rebased on main32ecacf): 31 + 2 passed.cargo test -p victory-game --locked: passed.-p victory -p victory-game --all-targets -D warnings, default and--all-features): clean. That is with main's three findings allowed (let_and_return,manual_is_multiple_of,some_filter), which #665 fixes.Not run with the game. Without the game's executable here, the check can't be reached end to end; the test calls it directly.
No game files, dumps or extracted data are included.
Series 1.0.2.1: the startup archive is checked before the title runs (port of Marvisak/VIctory#12)to Series 1.0.2.1: the package's archives are checked before the title runs (port of Marvisak/VIctory#12, and more)b0b21b8bedtofdedfff9de