Commit Graph

5 Commits

Author SHA1 Message Date
65d927b61a rpf9dump: write every output under a temporary name and rename it into place
make_game.py takes ttpf manifest.json and audio_manifest.json as proof that
a step finished, and every exporter skips a file that already exists. Both
were written in place, so a stopped run or a full disk could leave:

- a truncated manifest, after which make_game.py skips that texture pool
  or the audio banks on every later run, or
- a truncated .dds / .obj / .xma.wav under its final name, kept forever
  because the next run sees it exists.

All outputs (ttpf DDS + manifest, audio_manifest.json, XMA2 .xma.wav,
model .obj, embedded and dictionary .dds) now go through Util.WriteAtomic:
written to <path>.partial, then File.Move'd over the final name; the
temporary is removed on failure, and a stale one from a stopped run is
deleted first (WriteXmaWave opens its target with FileMode.CreateNew).
The models manifest already worked this way.

Util moves to its own file so tests/Rpf9DumpDiagnostics can link it; the
diagnostics program gains four checks for WriteAtomic.

AI-assisted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 23:22:35 +03:00
58cb83df2c Report model decode failure reasons in rpf9dump 2026-11-22 01:35:55 +08:00
1da3c7d2aa Audio: XMA2 streams via rpf9dump xma + ffmpeg (all 1,818 decode)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 22:32:47 -05:00
0082ad5365 rpf9dump: stream manifests (levels.rpf ran out of memory); docs: wave64 and mesh-shader findings
Rows held lazy projections that kept every decoded model alive; 149,811 models on levels.rpf exhausted
memory at the final serialization. Rows are now written as they are produced, to a .partial file renamed
when complete. Design notes record that most shaders are wave64 (32-wide subgroups on NVIDIA) and that
mesh shaders are NGG wave64 with the merged-shader SGPR layout.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 19:04:06 -05:00
db0dc8bd5e Initial commit: Leonida, build-it-yourself PC port groundwork
Shader pipeline (carve, FSSM unpack, gfx1013 disassembly, RDNA2 to SPIR-V),
asset export via rpf9-explorer's Core (submodule), PE loader and shim
skeleton, and make_game.py, which builds from the user's own copy of the game.
No game data, keys or executables are included.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 15:22:16 -05:00