Repository navigation
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
Cod5MenuDeserializerwithisPCmode (288-bytemenuDef_tvs 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_Headerso the stream starts at0x25) - Shared decoder parameterized on stream-start offset (
0x15PC /0x25Xbox 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.ffdecompressed 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:
Cod5MenuDeserializerfor WaW (struct-fit byte scanner — finds 95/95 inline menus on PS3 ui.ff)Iw4MenuDeserializerfor MW2 (OAT-style walker that recurses intoitems[])
- 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,
0xFFFFFFFFinline 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 CLIZoneSaveServicefor high-level save orchestration- Removed per-game
FastFileHandlerstubs (CoD4/CoD5/MW2) — all logic moved intoFastFileLib - Every save logs through
LogServiceso format-mismatch bugs are diagnosable from logs - Fixed the "version
-2097086464" PC ui.ff save regression (caused by GUIs callingCompiler.Compile/FastFileProcessor.Recompressdirectly)
Cross-Platform Conversion
FastFileConverterrewritten 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
- In-place (
- 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 decompressionZoneBuilder— 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(replacesZoneFileIO) and new helpers:ZoneAssetPool,ReadZoneMemAlloc- All endian helpers centralized in
FastFileConstants— no more ad-hoc BE/LE math in GUI code TryDecompressnon-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
.cfgraw 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 directCompiler.Compilecalls bypassing the platform-aware path - WaW PS3 ui.ff truncation (1.8 MB vs full 50 MB) —
0x0000raw block handling - WaW PC
menuDef_tparsed 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.zonedetection with non-magic per-zone MemAlloc0x020C)
Code Quality
- Removed
ZonePatcher(replaced byRawFileScanner+ZoneBuilderin-place expansion viaRawFileService.IncreaseSize) - Removed
IFastFileHandler+ per-game handler stubs + factory layer (all logic was justFastFileProcessor.Decompress) - Editor's
RawFileParserreduced to a thin shim overFastFileLib.RawFileScanner MemoryStreamused in place ofList<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!