Commit Graph

25 Commits

Author SHA1 Message Date
ea90aabfc4 Merge pull request #1022 from klikso/carry/old-10040-bink-index-validate
OLD-10040: bink_index: validate frame offsets within each stored stream
2026-11-28 22:52:45 +01:00
8d686309b0 Merge main into integration/boot-combined (RT-BOOT-COMBINED)
Conflict in runtime/shims/d3d12_xs_device.cpp, proxy_copy_descriptors_simple:
keep this branch's copy_null_rtv_marks call and main's fsdraw::enabled()
gate for the descriptor-copy diagnostic.

tools/rdna2spirv.py merged without a textual conflict, but #1662 on main
calls restore_dot4_inline_sel in the exact re-anchoring path, which this
branch had deleted. The merge puts main's function back so that call
resolves; the next commits reconcile it with the dot4 op_sel rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 21:49:53 -05:00
10642c66bf docs: verify movie archive padding and trailer totals
AI-assisted (Codex).
2026-11-25 19:19:58 +07:00
f0611b752f Remove the title's executable addresses #984 brought in; read them from the environment
#984 (273b3bdf9) put RVAs and file offsets of the retail executable into code, docs and scripts.
The code paths that need one now read it from an environment variable and are off when it is
unset; the docs and examples say the location is measured locally.

- runtime/src/main.cpp: the hang-watchdog kick takes its trap and kick RVAs from
  LEONIDA_TITLE_WATCHDOG_KICK="<trap RVA>,<kick RVA>" (hex), still only when the trap
  instruction is at the first one. Unset, the watchdog stays armed, as before by default;
  LEONIDA_TITLE_WATCHDOG=1 keeps it armed, and LEONIDA_TITLE_WATCHDOG=0 without the RVAs says
  once that it needs them. The LEONIDA_PEEK example uses placeholders.
- runtime/shims/startup_trace.h: the transient-pool dump fires at the int3 that
  LEONIDA_POOL_DIAG_AT names (`<module>+0x<offset>`, as the trace prints it), off when unset.
- scripts/windows-boot/boot.ps1: LEONIDA_PEEK's default comes from LEONIDA_GAME_STATE_RVA and
  LEONIDA_SESSION_STATE_RVA (no peek when unset), and the RESULT digest matches those values;
  the examples and README use placeholders.
- runtime/README.md documents LEONIDA_TITLE_WATCHDOG_KICK and LEONIDA_POOL_DIAG_AT.
- docs/fspx.md, docs/d3d12_vulkan.md, docs/movies.md, docs/embedded_shaders.md and a comment in
  runtime/shims/d3d12_xs_alloc_size.h drop the addresses and offsets.

This follows the same change on the earlier integration branch (#1495).
2026-11-25 01:00:37 -05:00
273b3bdf9d [integration] Linux/Proton and native Windows: boot through the story load (RT-PROTON-STORY-LOAD)
One squashed commit of a fork that was developed on a Linux/Proton machine and
tested on two native Windows machines. On all of them the retail 1.0.2.1
package now launches, shows its launch movie, first-run pages and landing
prompt, runs the story load to its end with the loading slideshow drawing its
artwork, and enters the world phase. A first world frame is not verified yet.
docs/linux_proton.md has the setup, a healthy boot's timeline, the machines
and where it stops.

Runtime: frames in the title's own window; DirectStorage pinned reads,
page-list scatter/gather, BCPack and unshuffle with a locally generated
predictor file; pooled, device-local and deferred image backing for streamed
and placed textures; enhanced barriers into LAYOUT_UNDEFINED; a bindless table
that degrades instead of refusing a submission; a descriptor hash finalizer
(off until a library carries it); directly indexed heap offsets for compute
dispatches and VS/PS/GS draws; title buffer windows outside a fragmented
arena; opt-in device-local copies of streamed buffer views; write-fault
retries under the tracker lock, shared trackers and write-watched title memory
for native Windows; device-loss, compute-input and memory probes.

Translator: loop bounds at structured exits, the eight FidelityFX programs
that use a packed-dot form the disassembler skips, buffer bounds modes per
view kind, a compaction option, the hash finalizer option.

Tools and scripts: Linux boot scripts (Wine/Proton, no network), a Windows
boot script, the paired compute translation script.

No game data. AI-assisted (Claude Code and Codex agents), reviewed and booted
by people on the machines named in docs/linux_proton.md.

Co-authored-by: Plaaasma <47513553+Plaaasma@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-24 11:42:12 -06:00
77df8717a7 bink_index: validate frame offsets within each stored stream
AI-assisted (Codex).
2026-11-24 17:41:54 +00:00
5074124359 docs/movies: keep one Audio association bullet (EGEN-MOVIES-AUDIO-DUP) (#6593)
Squash-merged after diff review of PR #6593
2026-11-23 11:20:47 -06:00
004620ec56 Merge pull request #4567 from bobcatchris
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	docs/movies.md
2026-11-22 23:16:01 -05:00
ceb83bc994 Merge pull request #4062 from JavierBlanco23
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	docs/movies.md
2026-11-22 23:10:57 -05:00
5f78851c86 Merge pull request #4053 from mrp1no
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:10:50 -05:00
d255c5ad0a Merge pull request #4049 from JavierBlanco23
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	docs/movies.md
2026-11-22 23:10:48 -05:00
73c7b8d15a Merge pull request #4035 from Alex Collini
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:10:38 -05:00
3faaeb8e0b Merge main 2d3369a4 into #4035
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-23 04:54:23 +01:00
11a1f88c07 docs(runtime tests): tighten the Bink second-machine wording and link the notes 2026-11-22 21:41:05 -06:00
3a4bac0373 bink_abi_test: say which BINKSUMMARY bytes are written, not a struct size (review)
@Flyander's review: the highest changed byte bounds the extent, not the
bytes written or the structure's size. With two sentinels a written byte
always differs from one of them, so the test now records every byte that
kept the sentinel in both calls and checks that none below the extent did:
on all 515 streams BinkGetSummary writes every byte of +0x00..+0x8F and
none after. docs/movies.md and the test notes say that, and that the
declared structure may have padding past +0x8F; the source link in the
ABI subsection now points at the .cpp, with the notes linked beside it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 00:44:21 +01:00
907f613b2a docs/movies: scope BinkGetTrackData summary to measured frames (0, 1, sampled 2) 2026-11-23 00:31:58 +01:00
ae16572a96 docs/movies: verify BinkOpenTrack/BinkGetTrackData across all 229 audio tracks (ASSET-323) 2026-11-23 00:12:39 +01:00
245a761c6e docs/movies.md: the Bink2Scarlett ABI measured over the archive (ASSET-324)
A new "ABI over the archive" subsection gives the HBINK fields (width
+0x00, height +0x04, frames +0x08, current frame +0x0c, playback rate
+0x14/+0x18, audio tracks +0x38) and the BINKSUMMARY ones (144 bytes;
width +0x28, height +0x2c, file rate +0x34/+0x38, playback rate
+0x3c/+0x40, frames +0x48), each matched on all 515 streams, and the
return values: BinkDoFrame and BinkCopyToBuffer 0 on every call, BinkWait
0 before the first frame and 1 when called before the next is due.
Section 5's ABI bullet and the decode-evidence bullets now point there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 00:09:32 +01:00
5984a0d981 docs/movies: record full 515-stream Bink2Scarlett decode check (ASSET-328) 2026-11-23 00:08:29 +01:00
93cb49a099 rpf: review nits; the ImHex pattern names +12 trailer_size
movies.md says the bink_index counts for movies.rpf are derived, not a rerun, and names the 8 undecided
archives; rpf.md's small-block entropy wording; bink_index drops a redundant max().

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 00:02:12 +01:00
03a3558ef4 rpf: the last u32 +12 bytes of an RPF9 are a trailer; movies.rpf's 22,812 tail bytes are zeros plus it (ASSET-318)
In movies.rpf the 22,812 bytes after the last Bink stream are 3,884 zeros up to a 4 KiB boundary and then
exactly the header's u32 +12 (18,928) bytes to EOF. Over the package's 22 RPF9 archives the same holds in 14
(10 page-aligned after zero padding, 4 found by walking 16-byte-aligned zlib streams to the end); the other 8
end in a non-zlib file and can't be checked without the TOC. None contradicts it. bink_index.py counts the
trailer as rpf_trailer instead of unread.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:57:08 +01:00
4a9c4a17ca docs/movies.md: say what bink_audio_test asserts and how PCM was counted
Review of #3563: the test checks that the maximum size covers the
header's (not equality), and checks whole 16-bit samples only when a
track returned PCM; it does not fail on a track that returns none. The
229 of 229 tracks with PCM come from the byte count each run prints.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 22:34:17 +00:00
93c07ecc9e docs/movies.md: all 515 Bink streams and all 229 audio tracks decode through the package's DLL
Section 5 still listed "whether all 515 streams are playable" as
unknown (nine decoded, 506 only header-validated) and said
BinkOpenTrack/BinkGetTrackData were not called successfully.

bink_decode_test, run on every stream of movies.rpf in turn, exits 0 on
515 of 515 (BinkOpen, frames 0 and 1). bink_audio_test, run per track
with LEONIDA_AUDIO_FRAMES=60, passes on all 229 tracks of the 196
streams that have audio, each returning PCM. Measured at main 16282101
and f847748c. Counts only; no frame was viewed and nothing is compared
with a reference, which the page now says.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 20:56:13 +00:00
c9650fe70b tools: name Bink 2 streams from the mount lists
The RPF9 TOC is encrypted, but each pack's CDataFileMgr__ContentChangeSetDef
mount list names its videos, and the archive stores them in the list's
lowercase-path order. bink_names.py aligns the sorted list with the streams
from bink_index.py (a monotone DP that may skip list entries held by other
packs), scores header facts (resolution hints, portrait snapmatic, family
siblings sharing a shape), and labels each row verified / anchored /
bracketed / positional. Mount lists are read from an archive or an
rpf9_carve.py directory through gamedata_index, so a list split over two
zlib streams stays whole.

On 1.0.2.1 it names all 797 streams in movies.rpf, story000.rpf,
story000_restofworld.rpf and core_restofworld.rpf. Tests are synthetic.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 12:03:33 +01:00
f980852e23 movies: index Bink 2 streams and document the container 2026-11-21 18:14:41 +00:00