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

Closed
Calvix2k wants to merge 5 commits from upstream-pr/1798 into main
Calvix2k commented 2026-11-24 22:46:12 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Calvix2k on 2026-11-24T22:46:12Z.


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).

<!-- greyfinch-sync:Marvisak/VIctory:issue:5481597716 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1798). Originally posted by [Calvix2k](https://github.com/Calvix2k) on 2026-11-24T22:46:12Z. --- 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).
catminou4 commented 2026-11-24 23:03:37 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-24T23:03:37Z.

Review: COMMENTED


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.

<!-- greyfinch-sync:Marvisak/VIctory:review:6048803468 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1798#pullrequestreview-6048803468). Originally posted by [catminou4](https://github.com/catminou4) on 2026-11-24T23:03:37Z. **Review:** COMMENTED --- 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.
Calvix2k commented 2026-11-25 01:08:16 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Calvix2k on 2026-11-25T00:42:59Z.


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.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7148800705 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1798#issuecomment-7148800705). Originally posted by [Calvix2k](https://github.com/Calvix2k) on 2026-11-25T00:42:59Z. --- 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.
Marvisak commented 2026-11-25 07:03:13 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T06:24:55Z.


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

<!-- greyfinch-sync:Marvisak/VIctory:comment:7154766157 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1798#issuecomment-7154766157). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T06:24:55Z. --- <!-- 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)_
Calvix2k commented 2026-11-26 18:56:43 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Calvix2k on 2026-11-26T18:56:43Z.


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.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7201022800 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1798#issuecomment-7201022800). Originally posted by [Calvix2k](https://github.com/Calvix2k) on 2026-11-26T18:56:43Z. --- 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

Sign in to join this conversation.
No reviewers
No labels
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.

Reference
Marvisak/VIctory!1797
No description provided.