Skip to content

Fast-boot: opt-in Bink intro skip, frame interval override, device type and TTS mute env vars - #1053

Merged
raylitebull merged 1 commit into
xcl-dev:mainfrom
raylitebull:bringup/skip-intro-fast-boot
Nov 24, 2026
Merged

raylitebull merged 1 commit into
xcl-dev:mainfrom
raylitebull:bringup/skip-intro-fast-boot

Conversation

@raylitebull

@raylitebull raylitebull commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

Adds optional, strictly opt-in fast-boot and unattended testing environment variables cleanly on top of main (zero behavior change when unset).

Note: These controls are opt-in debugging/bringup switches and may require extra testing across additional titles (especially titles with custom Bink 2 playback state machines, frame-paced physics/UI timers, or Series S / lockhart memory layouts).

What is in it

  • XCL_SKIP_BINK=1 (all to also skip looping movies) (crates/xcl/src/hle/bink.rs, crates/xcl/src/resolver.rs): when enabled, still maps the title's own bink2*.dll (preserving BinkGetFrameBuffersInfo, BinkRegisterFrameBuffers, memory callbacks, and BinkClose), while wrapping playback-advancement exports (BinkOpen*, BinkClose, BinkWait, BinkShouldSkip, BinkNextFrame, BinkDoFrame*, BinkGoto) to fast-advance FrameNum and LastFrameNum to Frames without decoding frames. Non-looping intro/logo movies finish on their first tick; looping movies (BINKWILLLOOP, bit 7 of OpenFlags) forward to the real DLL unless XCL_SKIP_BINK=all.
  • XCL_FRAME_INTERVAL_US=<us|0|uncapped> (crates/xcl/src/hle/d3d12x/frame.rs): optional override for the console frame clock requested via SetFrameIntervalX. Positive values clamp the clock interval to min(requested, override) (floor 1000 µs, disabling the TIME_CRITICAL spin loop at <= 2000 µs); 0 / uncapped / off lets WaitFrameEventX issue monotonic tokens immediately with real QPC origins without waking the clock thread.
  • XCL_DEVICE_TYPE=<anaconda|lockhart> (crates/xcl/src/config.rs, crates/xcl/src/launcher.rs, crates/xcl/src/host.rs): in-memory override for device_type (accepting anaconda/series x/xsx/x and lockhart/series s/xss/s) applied before Config::resolve, cascading into is_series_s(), title_memory, title_memory_mb (8192 vs 13824 MiB), XSystemGetDeviceType, kernelx::console_mode, and texture::console_pipes without modifying xcl.toml.
  • XCL_MUTE_TTS=1 (crates/xcl/src/hle/xgameruntime/api.rs): routes QueryApiImpl(XACCESSIBILITY, ...) to XCL's built-in xcl_xaccessibility_object() (keeping closed-caption and high-contrast APIs working while returning E_NOTIMPL for speech synthesis), silencing Windows TTS during unattended runs.
  • Unit tests covering BinkHeader ABI offsets, Bink skip modes and loop-flag handling, frame-interval override parsing/clamping, XCL_DEVICE_TYPE override resolution, and XCL_MUTE_TTS parsing.

Tested

  • Hardware: AMD Radeon RX 9070 XT (16191 MiB VRAM), 13th Gen Intel Core i5-13600KF, rustc 1.99.1 (58cf8f9c3 2026-10-13), debug (cargo test) and release (cargo build --release -p xcl).
  • cargo test --workspace -- --test-threads=4: 744 passed, 0 failed, 41 ignored (0 failures across lib unit tests, e2e, console_dlls_e2e, console_shaders, disasm_e2e, rpf_e2e, sparse_reinit, texture_states, xg_oracle).
  • Live retail title (game_scarlett_master.exe) 70 s controlled runs (XCL_NETWORK=0, XCL_MUTE_TTS=1, XCL_PRESS_A_AT=14,16,18,20,22,24, isolated XCL_DATA_ROOT, warm DXIL cache):
    • Baseline (opt-in vars unset): reached post-intro screen at 38.1 s, reached 12,000th shader at 69.1 s (12,453 shaders by 70 s), clean exit 0x0.
    • XCL_SKIP_BINK=1: intercepted and skipped the 3840x2160 450-frame 30 fps intro movie (~15.0 s) at 16.5 s, reached post-intro screen at 22.1 s (-16.0 s), reached 12,000th shader at 53.4 s (-15.7 s), finished all 19,207 shaders at 63.5 s, and entered active DirectStorage world streaming at 64.1 s with zero crashes/hangs (exit 0x0).
    • XCL_SKIP_BINK=1 + XCL_FRAME_INTERVAL_US=0: pushed early startup up to ~524 fps (4,725 frames presented in 70 s), reached post-intro at 18.0 s, 12,000th shader at 51.1 s (-18.0 s vs baseline), 19,000th shader at 62.3 s, clean exit 0x0.
    • XCL_MUTE_TTS=1: confirmed XAccessibility: XCL (XCL_MUTE_TTS=1 – speech synthesis muted) and XSpeechSynthesizerCreate -> E_NOTIMPL without errors.
    • XCL_DEVICE_TYPE=lockhart: confirmed title detected Lockhart (8192 MiB budget, TileHeap: 3977 Mb) without editing xcl.toml.

Regression run

main:

xcl-smoke v1
commit: 384f7f7f8c79fa4d4dee59336d650a4021af4c7e
gpu: AMD Radeon RX 9070 XT
title: Game Assets
seconds: 60
exit: 0x0
frames shown: 1066 (PresentX 1108)
presents per 2 s (last 3): 60 61 62
device removals: 0
crashes: 0
peak commit: 14725 MB

PR:

xcl-smoke v1
commit: 4f4db6452875984c003623ec8aef9f7e54df5ed9
gpu: AMD Radeon RX 9070 XT
title: Game Assets
seconds: 60
exit: 0x0
frames shown: 1604 (PresentX 1605)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14827 MB

Not tested

  • Extra testing is recommended on other Bink 2 titles (e.g., titles that inspect additional BINK fields, rely on audio-synced movie callbacks, or play looping intro/transition movies where XCL_SKIP_BINK=all vs 1 may behave differently).
  • Titles sensitive to uncapped WaitFrameEventX / GetFrameStatisticsX deltas under XCL_FRAME_INTERVAL_US=0 (positive intervals like 8333 or 4167 are safer if a title assumes non-zero frame deltas).
  • Full Series S (XCL_DEVICE_TYPE=lockhart) world boot: on the retail title, Lockhart mode triggers synchronous sparse heap commits during System Init that currently exceed the title's 30 s init watchdog (~32.7 s), so further Lockhart-specific memory/boot testing is needed separately.
  • NVIDIA and Intel GPUs.

AI use

  • Google Antigravity (Gemini): inspected boot logs and PE import/export tables, implemented the opt-in Bink/frame-clock/device-type/TTS hooks and unit tests, and ran the workspace tests and live smoke benchmarks.

@fromthemoonx

Copy link
Copy Markdown

NVIDIA run, since Not tested lists NVIDIA, with each new variable tried on XCL's own test title.

Tested

  • NVIDIA GeForce RTX 3060 12 GB (32-lane waves), driver 32.0.16.1088; AMD Ryzen 7 5700X; native Windows 11 Pro 26H2 (build 26300.9974), Graphics Tools (D3D12 debug layer) installed; rustc 1.100.0 stable-x86_64-pc-windows-msvc; DXC 1.9.2602.17; debug

  • Exact head 4f4db6452875984c003623ec8aef9f7e54df5ed9 (on its base 384f7f7): cargo build --workspace, then cargo test --workspace --no-fail-fast -- --test-threads=4: 744 passed, 0 failed, 41 ignored (lib 701 / 0 / 21). All seven new tests passed: device_type_override_cascades_into_resolve, bink_header_abi_offsets, mode_and_dll_matching, fast_advance_respects_loop_flag_and_mode, wrap_only_intercepts_known_exports_when_enabled, interval_override_parsing_and_clamping, parse_mute_tts_values.

  • The seven new tests together, 10 runs with --test-threads=8: 10 of 10 passed. Several of them read environment variables, so I ran them in parallel on purpose. The whole lib, 5 runs: 5 of 5.

  • Merged onto current main 47efa2e (no conflict): 748 passed, 0 failed, 41 ignored

  • xcl run of the e2e test title (tests/testtitle, -- --hello), merged tree, one run per setting:

    setting result XCL's log
    none done, failures: 0 frame interval 16667 µs
    XCL_FRAME_INTERVAL_US=0 done, failures: 0 16667 µs requested (XCL_FRAME_INTERVAL_US=0 – uncapped …)
    XCL_FRAME_INTERVAL_US=8333 done, failures: 0 16667 µs requested → 8333 µs effective
    XCL_MUTE_TTS=1 done, failures: 0
    XCL_SKIP_BINK=1 done, failures: 0 (the test title has no Bink, so this only shows it does no harm)
    XCL_DEVICE_TYPE=lockhart, or "series s" done, failures: 1 console: Xbox Series S (lockhart) (title memory 8192 MiB …)
    all four together done, failures: 1

    The one failure under Series S is [FAIL] kernelx: GetConsoleType / XSystemGetDeviceType: device type = 6, a test-title check that expects a Series X. main with device_type = "lockhart" in the title's xcl.toml fails that same check (failures: 1). So the override behaves exactly like the existing setting, and the failure is not from this PR.

  • D3D12 debug layer: the test title's XCL_D3D12_DEBUG=1 run logs the same set of debug-layer errors and warnings on the merged tree as on main.

  • SKIPPED (no wave64 on this adapter): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware

Not tested

  • The Bink skip on a real movie, the frame override's effect on a game's timing, and TTS muting with Narrator speech: no retail title here, and the test title uses none of them. Release build.

AI use

  • Claude Code (Claude Opus 5.5) ran the builds, tests and test-title runs on the machine above and wrote this report from the output.

@Royalflamejlh

Copy link
Copy Markdown
Contributor

Linux (Wine + vkd3d-proton) + NVIDIA test of XCL_SKIP_BINK=1 from 4f4db64, on a retail title: the intro film after the account screen was skipped in 2 of 2 runs and everything after it came 10 to 14 s sooner; with the switch unset the run was as on main. I did not test the other switches.

Setup: Fedora 44 (kernel 7.2.9), Wine 11.21 Staging (Wayland driver), vkd3d-proton 3.1 with the relaxed-vtable patch from #175 and a local dxil-spirv patch. RTX 4070 12 GB (driver 615.71.09), Ryzen 9 9950X3D, 64 GB RAM. Release, cross-compiled to x86_64-pc-windows-gnu (rustc 1.98.0), XCL_NETWORK=0, XCL_PSO_PRELOAD=0. Retail title 1.0.2.1, the first-run screens completed once and no story progress, one A press at 44.8 s through XCL_PRESS_AT, 75 s runs, a frame dumped every 30 presents. 4f4db64 merged onto main 67a3735 + #684 (e56dbc3) without conflicts.

Tested

  • cargo test --release -p xcl --lib for bink, device_type_override and interval under Wine, on the merge: 7 passed, 0 failed.
unset, 1 run XCL_SKIP_BINK=1, run 1 / 2
Bink: skipping movie lines 0 1 / 1 (at 45.3 s: 3840x2160, 450 frames, 30 fps, 15.0 s, flags 0xc04445a)
after the press at 44.8 s the film from 47 s to 55 s, the logo from 57 s to 61 s two or three black frame dumps, 46 s to 48 s
first loading picture 62.5 s 49.7 s / 49.7 s
burst of pipeline creation ([SHADER] lines) 60 s to 70 s 50 s to 60 s / 50 s to 55 s
first 2 s with over 5,000 DirectStorage requests after the first loading picture 72 s 62 s / 58 s
frames presented in 75 s 1608 1595 / 1591

No fault in any of the three. The account screen was up from 12 s to 13 s in all three, so the switch does not change what comes before the press.

Read

  • bink.rs:183 (fast_advance): the one movie this title opens on this path is not a looping one, so the default mode is enough for it; all was not needed and not tried. The logo screen that follows the film with the switch unset did not show with it on, and nothing in the log says why; the loading pictures came straight after the black frames.
  • The diff also changes WaitFrameEventX in frame.rs for XCL_FRAME_INTERVAL_US. With that variable unset the old wait is kept as the else branch, and the unset run above behaved like main (the burst at 60 s to 70 s, as in our runs of main tonight).

Not tested: XCL_SKIP_BINK=all, XCL_FRAME_INTERVAL_US, XCL_DEVICE_TYPE and the other switches of this change; a first boot without saves; past 75 s; the rest of the test suite; other titles.

AI use: Claude Code (Claude Fable 5.2) read the diff, built the tree, ran the title three times with XCL_PRESS_AT, measured the frame dumps and wrote this report.

@raylitebull
raylitebull merged commit f5136a6 into xcl-dev:main Nov 24, 2026
3 checks passed
anoyarou added a commit to anoyarou/xcl that referenced this pull request Nov 25, 2026
, xcl-dev#1876, xcl-dev#1866)

Brings main to full parity with upstream/main (62265d3):
- xcl-dev#1005: skip VirtualQuery on committed coherent UMA windows in cpu_writes and kernelx
- xcl-dev#1053: opt-in fast-boot env vars (Bink intro skip, frame interval override, device type, TTS mute)
- xcl-dev#1876: float v_cmpx through xcl-dev#1426 lowering keeps lanes outside EXEC out
- xcl-dev#1866: track SCC of mixed mask and number operations

Conflict in crates/xcl/src/hle/xgameruntime/api.rs resolved by keeping both the
in-process Wine XAsync path and upstream's XCL_MUTE_TTS XAccessibility path.

Assisted-by: Antigravity (Gemini 4)
gustavsi added a commit to gustavsi/xcl that referenced this pull request Nov 25, 2026
Pulls in xcl-dev#1836 (graphics and two-pass PSO disk cache + lazy MS/GS + shader build coalescing), xcl-dev#1930 (DXIL CSE across discard), xcl-dev#1900, xcl-dev#1005, xcl-dev#1053, xcl-dev#1864, xcl-dev#1866, xcl-dev#1869, xcl-dev#1876, and xcl-dev#1898 while keeping our RDNA4 MSAA clamp (xcl-dev#1908), wave64 graphics Direct DXIL guard (xcl-dev#1913), atomic writable-range tracking, static-sampler cache keys, and 4M-group indirect dispatch clamp.
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.

3 participants