HLE: skip the title's Bink movies on request (VICTORY_SKIP_BINK) #613

Closed
C-GDev wants to merge 1 commit from upstream-pr/613 into main
C-GDev commented 2026-11-25 03:15:20 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by C-GDev on 2026-11-25T03:15:20Z.


Adds an opt-in switch that skips the title's Bink movies (the startup intro). Unset, nothing changes.

  • VICTORY_SKIP_BINK=1: skips movies that play once (logos, intro)
  • VICTORY_SKIP_BINK=all: skips looping ones too (menu backgrounds stay dark)

Idea from XCL's merged PR xcl-dev/xcl#1053 (its XCL_SKIP_BINK part only). XCL is GPL-2.0-only, so no code is taken from it; this is written anew for VIctory's loader.

How

The title's own Bink2Scarlett.dll still loads and opens every movie. When the switch is on, the title's imports of the exports a player loop calls on an open movie (BinkWait, BinkShouldSkip, BinkDoFrame, BinkDoFrameAsync[Multi|Wait], BinkNextFrame, BinkGoto, BinkClose) are bound to wrappers (SkipMovies, a resolver around WithTitleDlls). On the first such call for a movie, its looping flag is read (so a BinkSetWillLoop after opening counts). If the movie is skipped, it is put on its last frame and nothing more is decoded, so the title's own end-of-movie check ends it at once. Other movies and every other export go straight to the DLL. The wrappers pass all four argument registers through unchanged, so they don't depend on each export's exact signature.

What is in it

  • crates/victory-hle/src/bink.rs: the wrappers, the resolver, and two unit tests (mode parsing; a fake Bink DLL: a one-shot movie is skipped and the DLL is not called, a looping one plays, all skips it, close reaches the DLL)
  • apps/victory/src/run.rs: SkipMovies around the title resolver, for imports bound at start and for DLLs the title loads later (+2 lines)
  • README.md: the switch

Tested

Windows 11 (26200), AMD RX 9070 XT (driver 32.0.32029.2010), Intel Core Ultra 5 250K Plus, Rust 1.98.1, release build of this branch (75fe122), Series X profile.

  • cargo test --workspace: 507 passed, 0 failed, 8 ignored
  • cargo clippy --workspace --all-targets --all-features --locked -- -D warnings: clean
  • cargo clippy --workspace --all-targets --locked -- -D warnings: fails on placed_filler_twins (dead code in victory-gpu/src/resource.rs), which is already on main and is why main's CI is red. Not touched here.
  • In game, VICTORY_SKIP_BINK=1: the intro is skipped (watched on screen). The log shows the one movie opened in the run being skipped. Its fields read back sensibly, which checks the struct layout:
    Bink movie width=3840 height=2160 frames=450 looping=false skip=true
  • Same build without the switch, for comparison: both runs ended at about 81 s with the same access violation in the AMD driver's compiler (amdxc64.dll+0x861b9f), so that crash is on main with this GPU and not from this change.

Not tested

  • How much startup time this saves. I found no log marker for the end of the intro, so it isn't measured. The movie is 450 frames.
  • VICTORY_SKIP_BINK=all: the run reached no looping movie
  • Bink exports looked up with GetProcAddress (this title imports them statically, so they aren't wrapped)
  • NVIDIA and Intel GPUs, the Series S profile
  • Whether this works around #103 (crash during the intro video)

AI use

Claude Code with Claude Opus 5.5 wrote the code, the tests and this description and ran the checks above. I watched the in-game run.

<!-- greyfinch-sync:fxceless/victory-fork:issue:5484470175 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/613). Originally posted by [C-GDev](https://github.com/C-GDev) on 2026-11-25T03:15:20Z. --- Adds an opt-in switch that skips the title's Bink movies (the startup intro). Unset, nothing changes. - `VICTORY_SKIP_BINK=1`: skips movies that play once (logos, intro) - `VICTORY_SKIP_BINK=all`: skips looping ones too (menu backgrounds stay dark) Idea from XCL's merged PR [xcl-dev/xcl#1053](https://github.com/xcl-dev/xcl/pull/1053) (its `XCL_SKIP_BINK` part only). XCL is GPL-2.0-only, so no code is taken from it; this is written anew for VIctory's loader. ## How The title's own `Bink2Scarlett.dll` still loads and opens every movie. When the switch is on, the title's imports of the exports a player loop calls on an open movie (`BinkWait`, `BinkShouldSkip`, `BinkDoFrame`, `BinkDoFrameAsync[Multi|Wait]`, `BinkNextFrame`, `BinkGoto`, `BinkClose`) are bound to wrappers (`SkipMovies`, a resolver around `WithTitleDlls`). On the first such call for a movie, its looping flag is read (so a `BinkSetWillLoop` after opening counts). If the movie is skipped, it is put on its last frame and nothing more is decoded, so the title's own end-of-movie check ends it at once. Other movies and every other export go straight to the DLL. The wrappers pass all four argument registers through unchanged, so they don't depend on each export's exact signature. ## What is in it - `crates/victory-hle/src/bink.rs`: the wrappers, the resolver, and two unit tests (mode parsing; a fake Bink DLL: a one-shot movie is skipped and the DLL is not called, a looping one plays, `all` skips it, close reaches the DLL) - `apps/victory/src/run.rs`: `SkipMovies` around the title resolver, for imports bound at start and for DLLs the title loads later (+2 lines) - `README.md`: the switch ## Tested Windows 11 (26200), AMD RX 9070 XT (driver 32.0.32029.2010), Intel Core Ultra 5 250K Plus, Rust 1.98.1, release build of this branch (`75fe122`), Series X profile. - `cargo test --workspace`: 507 passed, 0 failed, 8 ignored - `cargo clippy --workspace --all-targets --all-features --locked -- -D warnings`: clean - `cargo clippy --workspace --all-targets --locked -- -D warnings`: fails on `placed_filler_twins` (dead code in `victory-gpu/src/resource.rs`), which is already on `main` and is why `main`'s CI is red. Not touched here. - In game, `VICTORY_SKIP_BINK=1`: the intro is skipped (watched on screen). The log shows the one movie opened in the run being skipped. Its fields read back sensibly, which checks the struct layout: `Bink movie width=3840 height=2160 frames=450 looping=false skip=true` - Same build without the switch, for comparison: both runs ended at about 81 s with the same access violation in the AMD driver's compiler (`amdxc64.dll+0x861b9f`), so that crash is on `main` with this GPU and not from this change. ## Not tested - How much startup time this saves. I found no log marker for the end of the intro, so it isn't measured. The movie is 450 frames. - `VICTORY_SKIP_BINK=all`: the run reached no looping movie - Bink exports looked up with `GetProcAddress` (this title imports them statically, so they aren't wrapped) - NVIDIA and Intel GPUs, the Series S profile - Whether this works around #103 (crash during the intro video) ## AI use Claude Code with Claude Opus 5.5 wrote the code, the tests and this description and ran the checks above. I watched the in-game run.
MamaLeVrai commented 2026-11-25 11:10:42 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by MamaLeVrai on 2026-11-25T10:59:24Z.


Test report on real hardware: AMD RX 6950 XT (RDNA2), Windows 11, Rust 1.98.1, with a GPU present. I merged this PR's head 75fe122 into main f85101b in a throwaway tree (no conflict). cargo clippy --workspace --all-targets --locked -- -D warnings fails with exactly the errors main itself has on this machine (placed_filler_twins, depth_written, a sort; PR #841 fixes them); with --all-features it fails with the same number of errors as main (4). This PR adds none and removes none. cargo test --workspace --locked: run 1: one failure, run 2: 557 passed, 0 failed, 11 ignored (main alone: 555 passed). The failure is indirect::tests::warp_budget_saturates_without_wraparound_and_preserves_draw_fields, which fails on main itself most runs here (PR #849 fixes its assertion; see issue #850). The title was not run, so this says nothing about in-game effect. No game data.

AI-assisted (Claude Code); no game data.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7160439187 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/613#issuecomment-7160439187). Originally posted by [MamaLeVrai](https://github.com/MamaLeVrai) on 2026-11-25T10:59:24Z. --- Test report on real hardware: AMD RX 6950 XT (RDNA2), Windows 11, Rust 1.98.1, with a GPU present. I merged this PR's head `75fe122` into `main` `f85101b` in a throwaway tree (no conflict). `cargo clippy --workspace --all-targets --locked -- -D warnings` fails with exactly the errors `main` itself has on this machine (`placed_filler_twins`, `depth_written`, a sort; PR #841 fixes them); with `--all-features` it fails with the same number of errors as `main` (4). This PR adds none and removes none. `cargo test --workspace --locked`: run 1: one failure, run 2: 557 passed, 0 failed, 11 ignored (`main` alone: 555 passed). The failure is `indirect::tests::warp_budget_saturates_without_wraparound_and_preserves_draw_fields`, which fails on `main` itself most runs here (PR #849 fixes its assertion; see issue #850). The title was not run, so this says nothing about in-game effect. No game data. AI-assisted (Claude Code); no game data.

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
fxceless/victory-fork!613
No description provided.