Difference between revisions of "FastFiles and Zone files (BO1)"

From COD Engine Research
Jump to: navigation, search
(Zone File)
m (Header)
 
Line 66: Line 66:
 
{
 
{
 
   int size;
 
   int size;
   int unknown;
+
   int externalSize;
 
   int blockSize[MAX_XFILE_COUNT];
 
   int blockSize[MAX_XFILE_COUNT];
 
};
 
};
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
 
=== Asset List ===
 
=== Asset List ===
 
<syntaxhighlight lang="cpp">
 
<syntaxhighlight lang="cpp">

Latest revision as of 06:34, 12 January 2015

FastFile Structure

struct DB_Header
{
  char magic[8]; // "IWff0100"
  int version;
};
 
struct DB_AuthSignature
{
  char bytes[256];
};
 
struct DB_AuthHeader
{
  int unknown;
  char magic[8]; // "PHEEBs71"
  int reserved;
  char fastfileName[32];
  DB_AuthSignature signedSubheaderHash;
};

Encryption & Compression

PS3

After the zone is created, it is split into blocks. The first block is the 0x28 byte XFile header . After that, each block is 0x7FC0 bytes. Each block is first compressed using best zlib compression and encrypted using salsa20.

Salsa20 Keys

PS3

0x0C, 0x99, 0xB3, 0xDD, 
0xB8, 0xD6, 0xD0, 0x84, 
0x5D, 0x11, 0x47, 0xE4, 
0x70, 0xF2, 0x8A, 0x8B, 
0xF2, 0xAE, 0x69, 0xA8, 
0xA9, 0xF5, 0x34, 0x76, 
0x7B, 0x54, 0xE9, 0x18,
0x0F, 0xF5, 0x53, 0x70

XBOX 360

0x1a, 0xc1, 0xd1, 0x2d, 
0x52, 0x7c, 0x59, 0xb4, 
0x0e, 0xca, 0x61, 0x91, 
0x20, 0xff, 0x82, 0x17, 
0xcc, 0xff, 0x09, 0xcd, 
0x16, 0x89, 0x6f, 0x81, 
0xb8, 0x29, 0xc7, 0xf5, 
0x27, 0x93, 0x40, 0x5d

Zone File

Header

enum
{
  XFILE_BLOCK_TEMP 		= 0,
  XFILE_BLOCK_RUNTIME 		= 1,
  XFILE_BLOCK_LARGE_RUNTIME 	= 2,
  XFILE_BLOCK_PHYSICAL_RUNTIME 	= 3,
  XFILE_BLOCK_VIRTUAL 		= 4,
  XFILE_BLOCK_LARGE 		= 5,
  XFILE_BLOCK_PHYSICAL 		= 6,
  MAX_XFILE_COUNT
};
 
struct XFile
{
  int size;
  int externalSize;
  int blockSize[MAX_XFILE_COUNT];
};

Asset List

struct XAsset
{
  XAssetType type;
  XAssetHeader * header;
};
 
struct ScriptStringList
{
  int count;
  const char **strings;
};
 
struct XAssetList
{
  ScriptStringList stringList;
  int assetCount;
  XAsset *assets;
};