run: boot a separated exe/dump layout from the dump #1798

Closed
github-bot wants to merge 5 commits from github-bot/gh-1798 into main AGit
Owner

@⁠Calvix2k on GitHub · 2026-11-24 22:46 UTC · original
Calvix2k:codex/boot-separated-layout-1553 → main · +117 −29 · 4 files · 5 commits · closed without merging

Fixes #1553.

Summary

victory run looked for MicrosoftGame.config, the package's G: drive and the title's own DLLs only beside the executable. When the title's exe sits apart from the dump (separate exe folder, game data elsewhere), that left TitleID 0, no package drive, and 72 unbound imports; the title then hit its breakpoint in XSystemGetConsoleId or crashed on a zero handle from BinkOpenWithOptions.

  • Use the configured game_dir as the content directory when it exists; read MicrosoftGame.config from beside the exe first, then from the content directory, and mount G: there.
  • load_title_dlls/load_title_dll take the title DLL folders in search order; run passes the exe folder, then game_dir. The title DLLs and the ones a title loads itself (Bink2, XboxBvhBuilder, the FidelityFX loader and upscaler, libHttpClient) are mapped and initialised as Windows would.

No change for the normal layout where the exe is inside the dump.

Verification

On a Ryzen 7 5800X / Radeon RX 7800 XT, Windows 10, with the exe at E:\GTA6_1.0.21_Cyberleek_exe and the dump at E:\Torrent\GTA6.Xbox.v1.0.2.1-CYBERLEEK:

  • main 70564ae: crash 0x80000003 at XSystemGetConsoleId, TitleID 00000000.
  • with this branch: title 7952987A; all four title DLLs load (bound …: 0 missing each, 72 title, 0 missing for the exe); appdata0/common/movies/shaders/anim/data/levels/navmeshes/packs/textures/audio/script.rpf open from G:; the run reaches the host D3D12 device, window, frame loop and the world's ttdb_* load.
  • The Agility SDK runtime (PR #175) then removes the Windows 10 root-signature refusals; the next stop is a commit limit on 32 GB (os error 1455), unrelated to this change.

cargo build --release -p victory --locked and cargo xtask policy pass. New loader test: a_title_dll_is_found_in_a_later_folder; load_probe and title_dlls pass. No automated test for the CLI's path setup (needs the user's directory layout).

**@⁠Calvix2k** on GitHub · 2026-11-24 22:46 UTC · [original](https://github.com/Marvisak/VIctory/pull/1798) `Calvix2k:codex/boot-separated-layout-1553` → `main` · +117 −29 · 4 files · 5 commits · closed without merging Fixes #1553. ## Summary `victory run` looked for `MicrosoftGame.config`, the package's `G:` drive and the title's own DLLs only beside the executable. When the title's exe sits apart from the dump (separate exe folder, game data elsewhere), that left **TitleID 0**, no package drive, and **72 unbound imports**; the title then hit its breakpoint in `XSystemGetConsoleId` or crashed on a zero handle from `BinkOpenWithOptions`. - Use the configured `game_dir` as the content directory when it exists; read `MicrosoftGame.config` from beside the exe first, then from the content directory, and mount `G:` there. - `load_title_dlls`/`load_title_dll` take the title DLL folders in search order; `run` passes the exe folder, then `game_dir`. The title DLLs and the ones a title loads itself (`Bink2`, `XboxBvhBuilder`, the FidelityFX loader and upscaler, libHttpClient) are mapped and initialised as Windows would. No change for the normal layout where the exe is inside the dump. ## Verification On a Ryzen 7 5800X / Radeon RX 7800 XT, Windows 10, with the exe at `E:\GTA6_1.0.21_Cyberleek_exe` and the dump at `E:\Torrent\GTA6.Xbox.v1.0.2.1-CYBERLEEK`: - `main` `70564ae`: crash `0x80000003` at `XSystemGetConsoleId`, `TitleID 00000000`. - with this branch: `title 7952987A`; all four title DLLs load (`bound …: 0 missing` each, `72 title, 0 missing` for the exe); `appdata0/common/movies/shaders/anim/data/levels/navmeshes/packs/textures/audio/script.rpf` open from `G:`; the run reaches the host D3D12 device, window, frame loop and the world's `ttdb_*` load. - The Agility SDK runtime (PR #175) then removes the Windows 10 root-signature refusals; the next stop is a commit limit on 32 GB (`os error 1455`), unrelated to this change. `cargo build --release -p victory --locked` and `cargo xtask policy` pass. New loader test: `a_title_dll_is_found_in_a_later_folder`; `load_probe` and `title_dlls` pass. No automated test for the CLI's path setup (needs the user's directory layout).
run looked for MicrosoftGame.config and mounted the package's G: drive
only beside the executable. When the title's exe sits apart from the dump
(as with a separate exe folder and data folder), that left TitleID 0 and
no package drive; XSystemGetConsoleId then hit the title's breakpoint.

Fall back to the configured game_dir for the manifest and mount G: there.
On a Ryzen 5800X / RX 7800 XT, main crashed with TitleID 00000000; with
this change the run boots as 7952987A, opens appdata0/common/movies/
shaders/... from G: and reaches the GPU/window path.

Fixes #1553.
The exe of a separated exe/dump layout has no DLLs beside it: Bink2,
XboxBvhBuilder, the FidelityFX loader and libHttpClient live with the dump.
Searching only the exe folder left all 72 of their imports to the
unimplemented policy, and a bound zero handle crashed the title.

load_title_dlls/load_title_dll now take search folders in order; run passes
the exe folder first, then the configured game_dir. The manifest and G:
fallback of the previous commit use the same content directory.

With this, the run reports 0 missing imports, loads all four title DLLs and
reaches the world-data load (ttdb terrain/maps/interiors).
`content_dir` used the configured `game_dir` whenever one was set, so
running any exe mounted `G:` on another title's package and searched its
DLLs second. Use the configured directory only when the exe's own folder is
not a package (no manifest beside it), and test both layouts.
`check_startup_archive` ran on the exe's folder before `content_dir` was
computed, so a separated layout still stopped at "Cannot read startup
archive" when the archive sits in the dump. Compute the package folder
first and check the archive there.
The failed run crashed inside the victory-gpu test binary with an access
violation before its first test printed; this branch only touches
apps/victory/src/run.rs.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:44:57 +00:00
Author
Owner

@⁠Calvix2k on GitHub · 2026-11-25 00:42 UTC · original

Rebased onto main 4118f33 (the only conflict was main's earlier title_dir/startup-archive block; the manifest/G: fallback keeps using it). load_probe + title_dlls 4/4, cargo check/clippy on victory, and cargo xtask policy (182 files) pass.

**@⁠Calvix2k** on GitHub · 2026-11-25 00:42 UTC · [original](https://github.com/Marvisak/VIctory/pull/1798#issuecomment-7148800705) Rebased onto main 4118f33 (the only conflict was main's earlier title_dir/startup-archive block; the manifest/G: fallback keeps using it). load_probe + title_dlls 4/4, cargo check/clippy on victory, and cargo xtask policy (182 files) pass.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 06:24 UTC · original · edited 2026-11-25 22:23 UTC

Automated triage for the maintainers.

Needs rebase. This PR no longer merges cleanly into main: main has moved since the last triage, and the branch now conflicts in crates/victory-loader/tests/load_probe.rs. It will be reviewed again once it is rebased onto current main.

Previous verdict for this head: merge candidate.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 06:24 UTC · [original](https://github.com/Marvisak/VIctory/pull/1798#issuecomment-7154766157) · edited 2026-11-25 22:23 UTC <!-- victory-triage v1 head=faff582f01eee60e22d7a0b7d9c49e95b3cd57ac verdict=needs-rebase at=2026-11-25T22:27:00Z --> Automated triage for the maintainers. **Needs rebase.** This PR no longer merges cleanly into `main`: `main` has moved since the last triage, and the branch now conflicts in `crates/victory-loader/tests/load_probe.rs`. It will be reviewed again once it is rebased onto current `main`. Previous verdict for this head: merge candidate. --- _Generated by [Claude Code](https://claude.ai/code)_
github-bot closed this pull request 2026-11-26 18:58:35 +00:00
Author
Owner

@⁠catminou4 on GitHub · 2026-11-24 23:03 UTC · original · reviewed

Static review only: apps/Windows-only (CLI/run paths) — nothing compiles on macOS; source review of the diff.

Boot a separated exe/dump layout from the dump: run.rs + loader changes for split install layouts. Windows-only.

**@⁠catminou4** on GitHub · 2026-11-24 23:03 UTC · [original](https://github.com/Marvisak/VIctory/pull/1798#pullrequestreview-6048803468) · **reviewed** Static review only: apps/Windows-only (CLI/run paths) — nothing compiles on macOS; source review of the diff. Boot a separated exe/dump layout from the dump: run.rs + loader changes for split install layouts. Windows-only.
Author
Owner

@⁠Calvix2k on GitHub · 2026-11-26 18:56 UTC · original

Closing this in favour of #3336, which keeps the evidence (TitleID 0, 72 unbound imports, XSystemGetConsoleId, zero handle in BinkOpenWithOptions) without changing the loader signature.

Reason: this PR makes load_title_dlls take a list of title folders, while main has since settled on a single title_dir plus a cache_dir. The observation is worth keeping; the API change is not mine to force, especially as the more likely users of it can also keep the executable beside the data.

If the maintainers pick the search-order option in #3336, the diff here is the shape it would take (17 lines: dirs.0 from &Path to &[&Path] in four places) and I am happy to redo it against the current signature.

**@⁠Calvix2k** on GitHub · 2026-11-26 18:56 UTC · [original](https://github.com/Marvisak/VIctory/pull/1798#issuecomment-7201022800) Closing this in favour of #3336, which keeps the evidence (TitleID 0, 72 unbound imports, `XSystemGetConsoleId`, zero handle in `BinkOpenWithOptions`) without changing the loader signature. Reason: this PR makes `load_title_dlls` take a list of title folders, while main has since settled on a single `title_dir` plus a `cache_dir`. The observation is worth keeping; the API change is not mine to force, especially as the more likely users of it can also keep the executable beside the data. If the maintainers pick the search-order option in #3336, the diff here is the shape it would take (17 lines: `dirs.0` from `&Path` to `&[&Path]` in four places) and I am happy to redo it against the current signature.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!1798
No description provided.