Skip to content

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

Open
C-GDev wants to merge 1 commit into
fxceless:mainfrom
C-GDev:bink-intro-skip
Open

C-GDev wants to merge 1 commit into
fxceless:mainfrom
C-GDev:bink-intro-skip

Conversation

@C-GDev

@C-GDev C-GDev commented Nov 25, 2026

Copy link
Copy Markdown

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 Unable to play intro video #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.

VICTORY_SKIP_BINK=1 skips the movies that play once (the intro);
VICTORY_SKIP_BINK=all also the looping ones. Unset, nothing changes.

The title's own Bink DLL still opens each movie. The exports a player
loop calls on an open movie (BinkWait, BinkDoFrame*, BinkNextFrame,
BinkGoto, BinkShouldSkip, BinkClose) are bound to wrappers; on the first
of these calls for a movie that is skipped, the movie is put on its last
frame, and from then on nothing is decoded, so the title's own
end-of-movie check ends it at once. Whether a movie loops is read from
its open flags at that first call, after any BinkSetWillLoop.

In a run of the title with VICTORY_SKIP_BINK=1, the one movie it opened
(3840x2160, 450 frames, not looping) was skipped.

The idea comes from XCL PR fxceless#1053 (xcl-dev/xcl); the code is written anew
for VIctory's loader.

Assisted-by: Claude Code (Claude Opus 5.5)
@MamaLeVrai

Copy link
Copy Markdown

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants