Skip to content

v4.0.0

Latest

Choose a tag to compare

@primetime43 primetime43 released this 26 May 01:07
· 1 commit to main since this release
b3d7248

Major release: Wii and MW2 PC support, full menu file parsing, and a unified save pipeline.

Platform Support Expansion

Wii (WaW) — New

  • Full decompress/parse/rebuild support for WaW Wii FastFiles (single zlib stream, 56-byte BE zone header)
  • Wii uses the PC-style asset enum (no shader asset slots) but big-endian byte order — handled correctly throughout the pipeline
  • Round-trips raw files and localized strings via ZoneBuilder (rebuild path)

MW2 PC — New

  • Full decompress/recompress support for MW2 PC FastFiles
  • Signed retail files: implemented IW4 authed-chunks format (8 KB chunks in groups of 257 with SHA-256 master block hashes, RSA-2048 signature)
  • Unsigned variant supported for save (signed input → unsigned output, since IW's RSA private key isn't available)
  • 56-byte zone header (matches Wii layout but little-endian), 9-byte preamble
  • MW2 PC raw file format (16-byte LE header, no 20-byte first-rawfile variant)
  • Vertex MemAlloc = 0 verified against retail (patch_mp.zone, mp_rust_load.zone)
  • New docs: docs/MW2_PC_FastFile_Format.md

WaW PC — New

  • Decompress/parse/rebuild support for WaW PC (single zlib stream, 52-byte LE header)
  • Read-only menu parsing for PC zones via Cod5MenuDeserializer with isPC mode (288-byte menuDef_t vs console's 312-byte)
  • New docs: docs/PC_WaW_FastFile_Format.md, docs/Wii_WaW_FastFile_Format.md

MW2 Xbox 360 Signed

  • Implemented signed FastFile decompression (same IW4 authed-chunks format as MW2 PC, just with the full 25-byte DB_Header so the stream starts at 0x25)
  • Shared decoder parameterized on stream-start offset (0x15 PC / 0x25 Xbox 360)
  • Distinguishes signed MW2 Xbox 360 from block-format MW2 PS3 (same magic + version)

WaW PS3 ui.ff

  • Support for Treyarch's 0x0000-prefixed raw blocks (next 64 KB stored uncompressed — used to skip wasted work on already-compressed payloads like Bink video, packed audio, DDS)
  • Without this fix, retail ui.ff decompressed to ~1.8 MB instead of its full ~50 MB

Menu File Support — New

  • Menus tab in the editor (renamed from "Menu Files") with per-menu inspection
  • Two backends:
    • Cod5MenuDeserializer for WaW (struct-fit byte scanner — finds 95/95 inline menus on PS3 ui.ff)
    • Iw4MenuDeserializer for MW2 (OAT-style walker that recurses into items[])
  • Surfaces per-menu rect, 5 colors, item count, and inline window name as editable values
  • Multi-menu files render as a tree (name (N menus) with one child per parsed menu, label from extracted window name)
  • Honors Treyarch's three pointer conventions: null, 0xFFFFFFFF inline placeholder, and high-bit-set pre-link resolved pointers

Unified Save Pipeline

  • FastFileSaveService — canonical zone→FF save entry point shared by every GUI and the CLI
  • ZoneSaveService for high-level save orchestration
  • Removed per-game FastFileHandler stubs (CoD4/CoD5/MW2) — all logic moved into FastFileLib
  • Every save logs through LogService so format-mismatch bugs are diagnosable from logs
  • Fixed the "version -2097086464" PC ui.ff save regression (caused by GUIs calling Compiler.Compile / FastFileProcessor.Recompress directly)

Cross-Platform Conversion

  • FastFileConverter rewritten with two modes:
    • In-place (Convert()) — PS3 ↔ Xbox 360 only (same BE, same 52-byte layout). Now correctly refuses cross-layout (52-byte ↔ 56-byte) and cross-endianness inputs rather than producing corrupt output.
    • Rebuild (ConvertUsingBaseZone()) — used for anything → PC, anything → Wii, or MW2 PS3 ↔ MW2 PC
  • Asset type IDs remapped through PS3 as the canonical enum (Xbox 360 drops vertexshader; CoD4/WaW PC drops both shaders; MW2 PC adds vertexdecl; Wii uses PC enum)
  • Source asset types that don't exist on the target emit a warning instead of writing a malformed entry
  • Per-zone MemAlloc preservation: PC and Wii MemAlloc values are now preserved verbatim when re-packing the same platform (cross-platform falls back to platform defaults, since console magic isn't a valid PC/Wii value)

FastFileLib Enhancements

  • RawFileScanner — canonical rawfile locator across all game/platform combos. Handles CoD4/WaW 12-byte (BE on console, LE on PC), MW2 console 16/20-byte BE, and MW2 PC 16-byte LE headers with inline zlib decompression
  • ZoneBuilder — platform-aware (PS3/Xbox 360/PC/Wii) with correct header sizes (48/52/56), endianness, and asset type IDs; per-zone MemAlloc preservation via .WithBlockSizeTemp() / .WithBlockSizeVertex()
  • ZoneHeaderIO (replaces ZoneFileIO) and new helpers: ZoneAssetPool, ReadZoneMemAlloc
  • All endian helpers centralized in FastFileConstants — no more ad-hoc BE/LE math in GUI code
  • TryDecompress non-throwing variant for graceful error handling
  • Game-specific helpers now require explicit platform flags (isXbox360, isPC, isWii) — closes the "PS3-default-on-PC" bug class

Tools

FastFileCLI — New

  • Command-line tool (ffcli) for FastFile/zone operations
  • xUnit test suite (45 tests, ~800 ms, no external assets required)

FastFile Editor

  • Single unified "Open FastFile" menu with auto-detection (removed CoD4/WaW/MW2 dropdown)
  • Async FastFile loader with progress reporting and drag/drop
  • File Report viewer (closes #60)
  • Advanced weapon editor with full field support
  • Logging tab (closes #39) for diagnostic output
  • In-place raw file growth (closes #14) — no more zone rebuild required for content that fits within the new allocation
  • Inline file filter on raw files tree
  • .cfg raw files highlighted in Teal in the tree

FastFileExtractor

  • Renamed from FastFileToolGUI

Save / Save As

  • Save As refactored to copy after normal Save (no more temp files left behind)
  • Raw file text encoding changed from ASCII to UTF-8

Fixes

  • PC ui.ff "version -2097086464" save regression — caused by direct Compiler.Compile calls bypassing the platform-aware path
  • WaW PS3 ui.ff truncation (1.8 MB vs full 50 MB) — 0x0000 raw block handling
  • WaW PC menuDef_t parsed as console layout (312 bytes) instead of PC layout (288 bytes)
  • Menu decompiler endianness handling on PC zones
  • Raw file extraction endianness — now correctly handles BE on console / LE on PC
  • Localized text encoding switched to Latin-1 to preserve high-byte characters in retail strings
  • Cross-endianness in-place conversions no longer produce corrupted output (refused with a clear error)
  • MW2 PS3 / PC asset table entry format standardization for mod files (fixes #56)
  • Zone game/platform auto-detection now peeks zone bytes when MemAlloc magic is ambiguous (fixes MW2 PC patch_mp.zone detection with non-magic per-zone MemAlloc 0x020C)

Code Quality

  • Removed ZonePatcher (replaced by RawFileScanner + ZoneBuilder in-place expansion via RawFileService.IncreaseSize)
  • Removed IFastFileHandler + per-game handler stubs + factory layer (all logic was just FastFileProcessor.Decompress)
  • Editor's RawFileParser reduced to a thin shim over FastFileLib.RawFileScanner
  • MemoryStream used in place of List<byte> for accurate progress reporting
  • GitHub Actions: build-versioning moved into CI; nullables enabled across the workflow

Full Changelog: v3.1.0...v4.0.0

Credits

@primetime43 code changes

Shoutout to Fixed Username @FixedUsername for extensively testing PS3 for me!