Understanding Frostbite’s file formats, archives, and data organization
Frostbite is EA’s proprietary game engine used across many titles including Battlefield, FIFA, Madden, and Dragon Age. Understanding its file structure is essential for modding with Frosty Toolsuite.
Catalogs are archive collections that store game assets.Catalog Structure:
CAS Files (Content Addressable Storage)
CAS files contain the actual compressed asset data. Each catalog has multiple CAS files (cas_01.cas, cas_02.cas, etc.).Data Storage:
Assets stored by SHA1 hash
Compressed using ZLIB, LZ4, OODLE, or ZSTD
May be encrypted (requires decryption keys)
Supports delta patching
CAT Files (Catalog Index)
CAT files index the contents of CAS archives:
public class CatResourceEntry{ public Sha1 Sha1; // Asset identifier public uint Offset; // Offset in CAS file public uint Size; // Compressed size public int ArchiveIndex; // Which CAS file public bool IsEncrypted; // Encryption flag public uint EncryptedSize; // Size when encrypted public string KeyId; // Encryption key ID}
The ResourceManager uses CAT files to locate assets in CAS archives (ResourceManager.cs:246).
Patch Entries
Patches use delta compression:
public class CatPatchEntry{ public Sha1 Sha1; // Patched asset hash public Sha1 BaseSha1; // Original asset hash public Sha1 DeltaSha1; // Delta data hash}
The engine applies delta to base to get the patched asset (ResourceManager.cs:127).
public interface IDeobfuscator{ void Deobfuscate(byte[] buffer, long offset, long size);}// Game-specific deobfuscatorspublic class NullDeobfuscator : IDeobfuscator{ public void Deobfuscate(byte[] buffer, long offset, long size) { }}
The ProfilesLibrary specifies which deobfuscator to use per game.
public uint Base { get; private set; } // Base game versionpublic uint Head { get; private set; } // Current patched version// Read from layout.tocBase = patchLayout.GetValue<uint>("base");Head = patchLayout.GetValue<uint>("head");
From FileSystem.cs:84.
When a new patch is detected, Frosty invalidates its cache and rebuilds the asset index. This ensures compatibility but requires a full reload.