HLE: skip the title's Bink movies on request (VICTORY_SKIP_BINK, play.ps1 -SkipIntro) #402

Open
github-bot wants to merge 1 commit from github-bot/gh-402 into main AGit
Owner

@⁠Jesper-Andersson on GitHub · 2026-11-27 00:17 UTC · original
Jesper-Andersson:worktree-skip-bink → main · +366 −0 · 5 files · 1 commits · open

Every test run starts with the logos and the intro movie (450 frames), and on slower cards that is long before the menus. There is no way to skip them. This is a port of fxceless/victory-fork#613 (code, tests and design by its author, in their words "idea from xcl-dev/xcl#1053, no code taken from it"); both repositories are GPL-3.0.

Change

  • crates/victory-hle/src/bink.rs (from #613, unchanged): the title's own Bink2Scarlett.dll still loads and opens every movie. With the switch, 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; a skipped movie 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.
  • apps/victory/src/run.rs: SkipMovies around the resolver for the imports bound at start and for DLLs the title loads later.
  • scripts/play.ps1: -SkipIntro sets VICTORY_SKIP_BINK=1.
  • README.md: the switch, in "Other switches".
  • Switch: VICTORY_SKIP_BINK=1 skips the movies that play once (logos, intro); all the looping ones too (menu backgrounds stay dark). Unset or 0: nothing changes.

Where it does nothing

  • Without the switch every import resolves as before (wrap_with returns the address unchanged; tested).
  • Exports looked up with GetProcAddress are not wrapped (this title imports them).
  • A second Bink DLL keeps its own exports (logged).

Measured

RTX 2070 SUPER 8 GB (driver 621.14), Ryzen 7 5800X, 32 GB, Windows 11, diag build, scripts\play.ps1 defaults, Series S + DLSS (#203 merged locally for DLSS). Measured with this change on main 126acb3, before it was rebased onto 014d52d; the code is the same.

without -SkipIntro
start to the menus (DLSS: started) 2 min 43 s 32 s
movies skipped (Bink movie ... skip=true lines) 0 3 (3840×2160 450 frames, 2560×1440 84 frames, 1920×1080 450 frames)

One run each. Known: a short bright green flash where the intro is skipped, most likely the title drawing the movie's never-decoded (all-zero YUV) frame once before its end-of-movie check.

Checks

  • On main 014d52d: cargo test -p victory-hle --lib --locked bink: 2 passed (mode_values, skips_movies_and_passes_the_rest_through); cargo check -p victory --locked: ok
  • cargo clippy -p victory-hle --lib --tests --locked: nothing in bink.rs. With -D warnings it doesn't get through main itself, for reasons outside this change (victory-gpu list.rs totals never used, watch.rs needless &mut, victory-loader descriptor_sites.rs transmutes in tests).
  • cargo xtask policy: ok (pre-commit hook)
  • In game: one run with -SkipIntro to the menus (above), no crash. Also built and run, with the switch off, on 014d52d + #203: the intro plays as before.

Not checked

  • VICTORY_SKIP_BINK=all.
  • Series X profile, AMD.
  • fxceless/victory-fork#613 (the original). No upstream PR or issue covers skipping movies.
  • #40 (RX 7900 XT crash in BinkWait/BinkGoto during the opening cutscene): with VICTORY_SKIP_BINK=1 a skipped movie's BinkWait/BinkGoto don't reach the DLL, so this may be a workaround there. Not tested: the crash is on AMD and doesn't happen on this PC.

This change was made with AI assistance (Claude Code).

**@⁠Jesper-Andersson** on GitHub · 2026-11-27 00:17 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/pull/402) `Jesper-Andersson:worktree-skip-bink` → `main` · +366 −0 · 5 files · 1 commits · open Every test run starts with the logos and the intro movie (450 frames), and on slower cards that is long before the menus. There is no way to skip them. This is a port of fxceless/victory-fork#613 (code, tests and design by its author, in their words "idea from xcl-dev/xcl#1053, no code taken from it"); both repositories are GPL-3.0. ## Change - `crates/victory-hle/src/bink.rs` (from #613, unchanged): the title's own `Bink2Scarlett.dll` still loads and opens every movie. With the switch, 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; a skipped movie 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. - `apps/victory/src/run.rs`: `SkipMovies` around the resolver for the imports bound at start and for DLLs the title loads later. - `scripts/play.ps1`: `-SkipIntro` sets `VICTORY_SKIP_BINK=1`. - `README.md`: the switch, in "Other switches". - Switch: `VICTORY_SKIP_BINK=1` skips the movies that play once (logos, intro); `all` the looping ones too (menu backgrounds stay dark). Unset or `0`: nothing changes. ## Where it does nothing - Without the switch every import resolves as before (`wrap_with` returns the address unchanged; tested). - Exports looked up with `GetProcAddress` are not wrapped (this title imports them). - A second Bink DLL keeps its own exports (logged). ## Measured RTX 2070 SUPER 8 GB (driver 621.14), Ryzen 7 5800X, 32 GB, Windows 11, diag build, `scripts\play.ps1` defaults, Series S + DLSS (#203 merged locally for DLSS). Measured with this change on main `126acb3`, before it was rebased onto `014d52d`; the code is the same. | | without | `-SkipIntro` | |---|---|---| | start to the menus (`DLSS: started`) | 2 min 43 s | 32 s | | movies skipped (`Bink movie ... skip=true` lines) | 0 | 3 (3840×2160 450 frames, 2560×1440 84 frames, 1920×1080 450 frames) | One run each. Known: a short bright green flash where the intro is skipped, most likely the title drawing the movie's never-decoded (all-zero YUV) frame once before its end-of-movie check. ## Checks - On main `014d52d`: `cargo test -p victory-hle --lib --locked bink`: 2 passed (`mode_values`, `skips_movies_and_passes_the_rest_through`); `cargo check -p victory --locked`: ok - `cargo clippy -p victory-hle --lib --tests --locked`: nothing in `bink.rs`. With `-D warnings` it doesn't get through main itself, for reasons outside this change (`victory-gpu` `list.rs` `totals` never used, `watch.rs` needless `&mut`, `victory-loader` `descriptor_sites.rs` transmutes in tests). - `cargo xtask policy`: ok (pre-commit hook) - In game: one run with `-SkipIntro` to the menus (above), no crash. Also built and run, with the switch off, on `014d52d` + #203: the intro plays as before. ## Not checked - `VICTORY_SKIP_BINK=all`. - Series X profile, AMD. ## Related - fxceless/victory-fork#613 (the original). No upstream PR or issue covers skipping movies. - #40 (RX 7900 XT crash in `BinkWait`/`BinkGoto` during the opening cutscene): with `VICTORY_SKIP_BINK=1` a skipped movie's `BinkWait`/`BinkGoto` don't reach the DLL, so this may be a workaround there. Not tested: the crash is on AMD and doesn't happen on this PC. This change was made with AI assistance (Claude Code).
With VICTORY_SKIP_BINK=1 the title's imports of its Bink player's exports
that a player loop calls on an open movie are bound to wrappers: a movie
that plays once is put on its last frame before its first one is shown and
nothing more is decoded, so the title's own end-of-movie check ends it at
once. `all` skips looping movies too. Unset: every import as before.

Port of fxceless/victory-fork#613 (bink.rs unchanged).

This change was made with AI assistance (Claude Code).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 00:56:40 +00:00
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/402/head:github-bot/gh-402'
git switch 'github-bot/gh-402'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-402'
git switch 'github-bot/gh-402'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-402'
git switch 'github-bot/gh-402'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-402'
git switch 'main'
git merge --squash 'github-bot/gh-402'
git switch 'main'
git merge --ff-only 'github-bot/gh-402'
git switch 'main'
git merge 'github-bot/gh-402'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.