Commit Graph

17 Commits

Author SHA1 Message Date
6da607c096 scripts: --help on the Python and shell entry points
check_no_game_data.py read `--help` as a path and answered "cannot read --help", exit 2, in the tool every
contributor is told to run; it now prints the usage text it already carries and exits 0. play-linux.sh and
run_wine_session.sh print their usage before any environment check, where they used to answer with an error
(and play-linux.sh's no-argument case still prints the same usage, on stderr, exit 2).

run_game_wine.sh's one-line Usage line names the required --shaders, which its Inputs section already listed.

A test per script fails on main's copies and passes here.
2026-12-01 10:29:39 +01:00
f459c7e015 Merge pull request #1024 from djrolfes/djrolfes/check-game-data-explicit-paths
check_no_game_data: reject invalid explicit paths (CHECK-NO-GAME-DATA-EXPLICIT-PATHS)
2026-11-28 20:35:08 +01:00
4895588a93 check_no_game_data: refuse invalid explicitly named inputs
Keep default git-list skips, but require regular files for explicit path arguments. Report missing paths, stat errors and non-regular entries with exit 2, without following symlinks or opening FIFOs. Continue scanning siblings and preserve match exit-1 precedence.

Synthetic regressions: 15 scanner tests and 3 workflow tests pass; full semantic suite 6165 tests with no failed files. Claimed as CHECK-NO-GAME-DATA-EXPLICIT-PATHS in issue #14. AI-assisted.
2026-11-25 20:35:27 +01:00
7dcca92ce2 fix(check-no-game-data): inspect legacy V7 tar archives
Recognize checksum-valid legacy tar headers without a ustar marker, while retaining the existing handling of damaged modern tar archives. Add synthetic CLI regressions for raw, compressed and nested archives, clean text, and non-archive controls.

AI-assisted: OpenAI Codex
2026-11-25 20:05:51 +05:00
39879ce0fd Merge main into RT-PROTON-STORY-LOAD (#984)
Merges main at 1154976d4 into the integration branch at 273b3bdf9 (merge base ece4ba5b3). 42 files conflicted;
this commit is the resolution only. Build and test repairs follow in their own commits.

Rule of resolution: where both sides added different things, both stay; where both made the same change in two
forms, main's reviewed form stays and whatever #984's form did in addition is carried into it; where the two
changed the same code for different purposes, both purposes are kept.

Xbox proxy code (runtime/shims/d3d12_xs_device.cpp, d3d12_xs_device.h, d3d12_xs.cpp, d3d12_xs_alloc_size.h,
d3d12_xs_desc_clean.h, registry.cpp):
- d3d12_xs_device.cpp is #984's file with main's differing pieces ported in: env_slot and the configurable device
  routes, XboxQueueSlotRoutes, PresentationHandler / set_presentation_handler, the console caller rule for device
  slots 61 and 74 (#383, #385), route_xbox_device_slot, slot 81 as GetFrameStatisticsX, create_host_device, the
  console-form rule for slots 25 and 56, the console list IID of #359, and the forms of queue slot 18 (#403) and
  list slot 139 (#396).
- Kept from #984: the list proxy with handle translation, queue slots 16/17 as Signal/Wait, the fence's
  completed-value mirror, the shared FrameTokenSource, PresentX through queue_present_x when no handler is
  attached (slot 30, or 32 on a queue detected as the newer layout), slots 27/53/55/57/70/71/133, the wider
  pc_resource_desc, S_OK for queue slots past the PC table.
- Dropped: #984's GetFrameEventsX and LEONIDA_XS_FRAME_EVENTS_SLOT, its second-word rule for slot 61, its
  undetected-layout rule for queue slot 18, its list IID mapping to GraphicsCommandList6; main's copy of the base
  list proxy, its null-view slot 70 and its refusing slot 133.

Proxy tests (runtime/test/xs_proxy_mock_test.cpp, device_proxy_test.cpp, queue_proxy_test.cpp):
- Checks of both sides, each run once; main's forms of the render-target size and layout checks with #984's extra
  cases added; main's --env-slots-74 and #984's --env-slots-70.
- Adapted to the merged code: the queue tail answers S_OK, slot 73 answers an unknown IID with the list proxy,
  the queue slot 18 case installs a console caller. Dropped: #984's slot 81 GetFrameEventsX cases.

D3D12/Vulkan layer (runtime/shims/d3d12_com.cpp, d3d12_vulkan_device.cpp, runtime/src/command_list.h,
frame_pacer.h, shader_library.h, vulkan_backend.h, vulkan_replay.h, runtime/test/command_list_test.cpp,
d3d12_close_parity_test.cpp, d3d12_execute_indirect_validation_test.cpp, replay_texture_barrier_test.cpp,
vk_pipeline_check.cpp, vk_test_device.h):
- Resource::create_texture: #984's title images (deferred placed, pending streamed, title pool) and main's
  ordinary textures (#1413 shared blocks, #1364 staging fallback) are exclusive branches chosen by the texture's
  origin, so both pools run on disjoint sets of textures.
- frame_pacer.h is main's pacer (#402) with #984's FrameTokenSource as the token counter.
- main's forms kept for ExecuteIndirect (#1066, #377), the barrier into LAYOUT_UNDEFINED (#1055), the B4G4R4A4
  stand-in, per-face stencil masks, the unaligned tile staging (#528) and the device-lost flag (#980).
- shader_library.h: main's block inflate; #984's `bulk` parameter now defaults to true so main's callers keep it.
- Dropped: #984's B8G8R8A8 stand-in for B4G4R4A4 targets, its refusal of separate stencil masks, its zero-count
  refusal in ExecuteIndirect, its wider UNDEFINED -> UNDEFINED release and the test case for it.

Other shims (runtime/shims/dstorage.cpp, file_system.cpp, gameinput.cpp, xgameruntime_offline.cpp,
runtime/test/xgameruntime_offline_test.cpp, xmem_test.cpp):
- ReadFile and DirectStorage reads: #984's pinned kernel_writes read, then main's touch_pages retry on
  ERROR_NOACCESS. main's rt::fs::read_file is folded into #984's read_file.
- gameinput: main's strict LEONIDA_INPUT_SCRIPT parser with #984's rsup/rsdown entries.
- Speech synthesis: main's one silent voice and handle checks; #984's accept-anything form dropped.

Build, tools, docs (runtime/CMakeLists.txt, runtime/cmake/translator_deps.cmake, scripts/build_runtime.ps1,
make_game.py, tools/rdna2spirv.py, shader_disasm.py, shader_ir.py, shader_library.py,
runtime/test/shaders/cs_imgload_tfe.asm, cs_imgload_d16_tfe.asm, docs/README.md, boot.md, d3d12_vulkan.md,
runtime/README.md):
- Unions of the test, target and source lists; spirv_loop_guard.py added to translator_deps.cmake.
- rdna2spirv.py: main's DPP compare rule (#957), SMEM vcc base (#647) and widen_wave64_masks (#1021); #984's
  restore_skipped_instructions and restore_dot4_inline_sel. #984's duplicate widen_wave64_valu_masks dropped.
- shader_disasm.py and shader_ir.py: main's structure with #984's one-line-per-dword llvm-mc input and wave flags.
- shader_library.py: main's structure with #984's --compute-hashes and per-state compute variants.

One file that did not conflict is changed here: tools/rdna2_decode.py. Git kept both sides' decoders for a VOPC
compare with a DPP operand, and #984's narrower one shadowed main's; it is main's file again.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-24 19:38:04 -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
074e53069f check_no_game_data: exit 2 when git cannot list the files (CHECK-NO-GAME-DATA-GIT-ERROR)
Outside a repository, or with git missing from PATH, the default mode died with a traceback and exit 1,
which is the "game data found" code. It now prints one line naming git and the error, and exits 2.
Tests cover a missing git, a folder outside any repository, and the unchanged results inside a repository.
2026-11-24 16:11:40 +01:00
0aedf6a72a Merge remote-tracking branch 'origin/pr/8958' 2026-11-23 17:41:03 -05:00
0121666d83 check_no_game_data: catch the player's saves and world_build's LPK1 packs
docs/saves.md says never to commit or attach real saves, but a save
under another name passed the check: none of its three containers was
among the magics. Neither was the staging pack world_build.py writes,
which holds positions, normals, UVs and indices of the game's models.

- JSAV story save ("JSAV" at 0)
- ASAV save record, profile and settings ("ASAV" at 0)
- SLAYER1 packed save ("SLAYER1\0" at 0)
- LPK1 world staging pack ("LPK1" at 0, world_build.py _write_pack)

No tracked file in the repository starts with any of them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 22:52:48 +03:00
8d460a57f9 check_no_game_data: report an unreadable file as one stderr line and exit 2, not a traceback
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-23 20:50:57 +01:00
8d85654bd0 check_no_game_data: match the MoVE, SKEL_ and SCRP containers (EGEN-NOGAMEDATA-ANIM-MAGICS) (#6782)
Squash-merged after diff review of PR #6782 - check_no_game_data: match the MoVE, SKEL_ and SCRP containers (EGEN-NOGAMEDATA-ANIM-MAGICS)
2026-11-23 09:58:12 -06:00
9b13eeade7 check_no_game_data: catch PSIN/PAMH/MHIU/SPS1/SGD5/RDS5/AWC/YSC containers (#6311)
Squash-merged after review of PR #6311 - check_no_game_data: catch PSIN/PAMH/MHIU/SPS1/SGD5/RDS5/AWC/YSC containers
2026-11-23 08:06:49 -06:00
fce5ca5b06 check_no_game_data: look inside zip, tar, gzip, bzip2 and xz files
Archives are opened with the standard library and every member is
classified like a tracked file, up to three levels deep, under a
decompression budget (64 MiB expanded, 10,000 members). Formats the
standard library can't open (7-Zip, Zstandard, RAR) and archives that
can't be read are reported as unchecked rather than passed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 04:45:47 +01:00
6fde08a9bd Merge pull request #3076 from Eng-Meshari 2026-11-22 17:00:32 -05:00
dac28e6b19 Fix what the round-42 merges broke (tests and docs)
- shader_disasm: prune stale listings against every input, not the --skip-existing remainder (a resumed run
  deleted every listing it had just reused).
- progress_dashboard: a drive-letter path is never inside the repository off Windows (it printed user names);
  its own read_text helper is read_utf8, so the encoding check does not take it for pathlib's.
- Translator tests follow this round's rules: desc_lookup's BroadcastFirst in the typed-load condition walker;
  resinfo sizes are 0 past the last level and a 2D depth word is 0 (SHADER-388); SHADER-315 constant folding in
  the perm and i16 tests; #2089's structured wave64 emulation.
- test_semantic_translator_use: 57 oracle-only files merged before it are DEBT; test_spirv_tools_required is
  allowed (CI meta-test).
- Test fixes: image_fuzz fake writes the programs, preflight follows c506d00c's loader hint rule, feature_scan
  reads the first line of a pytest-decorated message, w64_graphics wording.
- docs: rows merged again in design.md, README.md, d3d12_vulkan.md; GameInput table rebuilt from #3172's rows;
  orphan rows in models.md and embedded_shaders.md; repeated bullets; anchors; a flag not on main.
- Repo rules: stdout guard on 14 programs; LF writes; csv lineterminator in bink_play.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 16:14:54 -05:00
f9ccf445f1 fix(no-game-data): read the PE signature wherever e_lfanew points 2026-11-22 23:11:01 +03:00
6be9e8b670 Add script to check for game data signatures in files
This script checks for files that start with game data signatures and lists them. It reads the first bytes of each file to match against known magic numbers.
2026-11-22 22:12:54 +03:00