Commit Graph

13 Commits

Author SHA1 Message Date
9a118b856c pe_shader_containers: sequence container stems sequentially across multi-image extract
When multiple PE images are passed with --extract, each image previously
invoked extract() starting from index 0. Unnamed containers (
ame=None)
in subsequent images collided on container_00, resulting in duplicate

ame keys in the output index.json.

Thread start_index=len(index) through multi-image extraction so stems
and index entries remain unique, and use strerror on write failures.
2026-11-25 13:57:24 +03:00
2d6da27846 pe_shader_containers: stage --json so a write failure keeps the previous report
Publish through a temp file + replace so a mid-write OSError leaves any prior complete JSON intact.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-25 13:57:24 +03: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
6c8eb8221e pe_shader_containers: read shader stage from PSV0 and document game_scarlett_master.exe's 10 embedded shaders (RT-5) (#6840)
Squash-merged after diff review of PR #6840 - pe_shader_containers: read shader stage from PSV0 and document game_scarlett_master.exe's 10 embedded shaders (RT-5)
2026-11-23 09:36:48 -06:00
0764999f6a Keep the PE shader extraction index from overwriting an input image 2026-11-22 23:42:32 +01:00
4ce1c16170 Merge pull request #2433 from bbareth 2026-11-22 13:15:17 -05:00
3611ec705e pe_shader_containers: keep existing outputs when suffixes collide 2026-11-22 18:02:43 +01:00
ea18a18b93 pe_shader_containers: refuse report paths that overwrite an input
--json was written over whatever path it named after the scan, so
--json <image> replaced one of the input PE images (a synthetic image
with one DXBC container reproduced it: 52 bytes became a 356-byte JSON
array), --json missing/dir/report.json raised FileNotFoundError,
--json at the extract index silently replaced it, and --extract <file>
raised FileExistsError from os.makedirs. Guard the report paths the way
the other tools do (normcase+realpath, os.path.samefile fallback),
create the --json parent folder, and report write failures as one
ERROR line with exit 2.
2026-11-22 23:40:54 +08:00
cd5896af9e tests: fix the seeded fuzz range at size 4 2026-11-22 11:36:00 -03:00
649e9d356b tests: seeded fuzz for the DXBC scanner (review suggestion)
2000 random buffers with a planted DXBC magic: parse_container raises only
ContainerError and inspect never raises.
2026-11-22 11:35:44 -03:00
850d9e6ae7 style: ruff check and format on the new container tool 2026-11-22 11:34:05 -03:00
c626aaea34 tests: drop the unused container chunk helper 2026-11-22 11:34:05 -03:00
ce5380a65e Tools: inventory the DXBC shader containers embedded in PE images
Scans a binary for DXBC containers, validates the chunk table (sorted, aligned,
inside the declared total, last chunk ending at it), reads the ILDN module name
and reports whether each carries an XBCH console record, an FSPX program or an
LLVM bitcode blob. --extract writes the containers and an index.json the FSM
translator reads; nothing is extracted unless asked for. Synthetic tests build
the containers by hand.
2026-11-22 11:34:05 -03:00