Apply published_mode(out_file) to temporary listing before atomic replacement,
and restore write permission (0o600) before unlinking in finally block
when replace fails, preventing Windows PermissionError [WinError 5] and
stranded temporary files.
agent: yes
AI-assisted: yes
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>
A planned <out>/<stem>.s that names an input (a foo.s given with --out at its
own folder, the default ../disasm of a file already in disasm/, FOO.S where
case is ignored, a hard link) replaced the input with its own listing, or with
--skip-existing was counted as a finished listing. A folder where a listing
goes failed per shader inside the worker pool. Both are now one ERROR line,
exit 1, before llvm-mc is probed or --out is created. Path comparison reuses
tools/report_paths.py.
Tests: 7 new cases in tests/test_shader_disasm.py (26 OK; 6 of them fail with
main's tool). Synthetic inputs only, no game files. AI-assisted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Eleven tools treated a nonexistent input folder as a failed run (1). They now print one ERROR line and return 2, while real read failures keep exit 1. image_query_probe imports the hardware oracle only for a GPU run, so --help stays prompt. A table-driven subprocess test covers all eleven; existing expectations are updated.
Blobs can end with s_endpgm, a dword count N, N dwords of data and a closing s_endpgm. The data was disassembled as code, so llvm-mc reported invalid words.
A terminator byte pattern spanning metadata words can look like a clean one-instruction shader. Search for a dword-aligned instruction before decoding the fallback range.
os.makedirs raised FileExistsError with a traceback when --out named an
existing file. Report it before any work and leave the file alone.
Synthetic regression test.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
disasm() ignored llvm-mc's exit status, so a shader whose disassembly stopped
partway (llvm-mc printed some lines, then exited 1) was written out and
counted as clean. A nonzero exit now discards the output and the shader is
reported as failed, with llvm-mc's error.
A run in which no shader produced a listing (every one "no s_endpgm") exited
0, and make_game.py writes disasm.done on exit 0. It now exits 1 naming the
source folder.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A blob shorter than 0xC4 bytes made code_range read the code offset past the end and raise struct.error. The
error came out of ex.map and stopped the whole run, so make_game.py failed at the same blob on every rerun.
Such a blob now goes to the s_endpgm scan like any other header miss and is counted as "scan failed" or
"no s_endpgm".
--jobs and --limit now must be at least 1 (--jobs 0 made ThreadPoolExecutor raise, --limit -1 dropped the
last file). A source with no .fssm files, or one that doesn't exist, ends with an ERROR line instead of an
IndexError or FileNotFoundError traceback.
Tests: tests/test_shader_disasm.py, with a fake llvm-mc (no GPU, no game data).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The official Windows LLVM build ships no llvm-mc.exe and has no AMDGPU
target, which is what issue #7 ran into. A tool that existed but could
not disassemble produced empty output, so shader_disasm.py counted 0
invalid words, wrote an empty .s per shader and reported every one as
"clean"; make_game.py then translated nothing.
Probe one s_endpgm before the run and stop with the tool's own error.
Empty per-shader output is now "failed" and exits 1, never "clean".
LLVM_MC may be a whole command line, so Windows can call WSL's llvm-mc:
set LLVM_MC=wsl -d Ubuntu -e /usr/lib/llvm-21/bin/llvm-mc
make_game.py accepts the same form in preflight and need(); README and
design.md now state the real requirement. New tests cover a missing
tool, a missing AMDGPU target, empty output and the success path.