Category:FastFiles: Difference between revisions

From COD Engine Research
No edit summary
 
(21 intermediate revisions by 4 users not shown)
Line 1: Line 1:
FastFiles are the CoD engine's way of storing Zone files. FastFiles (FFs) almost always have some sort of RSA2048 signature, a zlib compression along the way, and then on later CoDs some encryption. The Zones are a library of [[:Category:Assets|assets]]. Every FF in every CoD game starts the same way...
FastFiles are the CoD engine's way of storing Zone files. FastFiles (FFs) almost always have some sort of RSA2048 signature, a zlib compression along the way, and then on later CoDs some encryption. The Zones are a library of [[:Category:Assets|assets]]. Every FF in every CoD game starts the same way...
struct DB_AuthHeader
{| class="wikitable"
{
|-
  char magic[8];
! Name !! Offset !! Type !! Description
  int version;
|-
}
| Magic || 0x0 || char[8] || "IWffu100" for unsigned fastfiles, "IWff0100" for signed fastfiles, "TAff0100" for treyarch's Black Ops 2 fastfile, and "S1ff0100" for Sledgehammer Advanced Warfare fastfiles.
So by reading the version of the input FF, you can tell what system and game the FF is from.
|-
| Version || 0x8 || int || See below.
|}
So by reading the version of the input FF, you can tell what system and game the FF is from. Note that pre-alpha versions of Call of Duty 4 are missing the version integer, and must be handled specially. Also keep in mind that the Quantum of Solace FFs are missing the magic in the struct above.  


{| class="wikitable"
{| class="wikitable"
| ||'''CoD4'''||'''WaW'''||'''MW2'''||'''BO1'''||'''MW3'''||'''BO2'''||'''Ghosts'''||'''CoD: Online'''
| XFILE_VERSION || '''007:QoS''' ||'''CoD4'''||'''WaW'''||'''MW2'''||'''BO1'''||'''MW3'''||'''BO2'''||'''Ghosts'''||'''CoD: Online'''||'''Advanced Warfare'''||'''BO3 Beta'''||'''BO3'''
|-
|-
|Xbox 360||0x1||0x183||0x10D||0x1D9||0x70||0x92||0x22E||n/a
|Xbox 360||0x1D6||0x1||0x183||0x10D||0x1D9||0x70||0x92||0x22E||n/a||0x72E||n/a||0x253
|-
|-
|Playstation 3||0x1||0x183||0x10D||0x1D9||0x70||0x92||0x22E||n/a
|Playstation 3||0x1D6||0x1||0x183||0x10D||0x1D9||0x70||0x92||0x22E||n/a||0x72E||n/a||0x25E
|-
|-
|Wii||0x1A2||0x19B||n/a||0x1DD||0x6B||n/a||n/a||n/a
|Wii/Wii-U||0x1D2||0x1A2||0x19B||n/a||0x1DD||0x6B||0x94||0x22E||n/a||n/a||n/a||n/a
|-
|-
|PC||0x5||0x183||0x114||0x1D9||0x1||0x93||n/a||0x13C
|PC||0x1D6||0x5||0x183||0x114||0x1D9||0x1||0x93||0x135||0x13C||0x72E||0x1FB||n/a
|}
|}
== Pointers in Zone Files ==
Infinity Ward implemented their own way of loading data that can already be found earlier in the zone file. What should be an address in memory is instead stored either as -1, -2, or as an offset. If the pointer is -1 or -2, than the data follows, typically in order. If the pointer is not -1 or -2, the first 4 bits (or 3 bits in BO2) are extracted and used as an index for the g_streamBlocks array. The other bits are the offset and is added to the data pointer in g_streamBlocks. The offset is only correct after the zone file has been loaded in memory. This is because some data is relocated (aligned) which changes the size of the zone. Some differences:
* strings are aligned by 4 bytes
* asset headers are stored in pools
* sound, image, and shader programs are stored in pools
* zone header is removed

Latest revision as of 06:32, 1 November 2015

FastFiles are the CoD engine's way of storing Zone files. FastFiles (FFs) almost always have some sort of RSA2048 signature, a zlib compression along the way, and then on later CoDs some encryption. The Zones are a library of assets. Every FF in every CoD game starts the same way...

Name Offset Type Description
Magic 0x0 char[8] "IWffu100" for unsigned fastfiles, "IWff0100" for signed fastfiles, "TAff0100" for treyarch's Black Ops 2 fastfile, and "S1ff0100" for Sledgehammer Advanced Warfare fastfiles.
Version 0x8 int See below.

So by reading the version of the input FF, you can tell what system and game the FF is from. Note that pre-alpha versions of Call of Duty 4 are missing the version integer, and must be handled specially. Also keep in mind that the Quantum of Solace FFs are missing the magic in the struct above.

XFILE_VERSION 007:QoS CoD4 WaW MW2 BO1 MW3 BO2 Ghosts CoD: Online Advanced Warfare BO3 Beta BO3
Xbox 360 0x1D6 0x1 0x183 0x10D 0x1D9 0x70 0x92 0x22E n/a 0x72E n/a 0x253
Playstation 3 0x1D6 0x1 0x183 0x10D 0x1D9 0x70 0x92 0x22E n/a 0x72E n/a 0x25E
Wii/Wii-U 0x1D2 0x1A2 0x19B n/a 0x1DD 0x6B 0x94 0x22E n/a n/a n/a n/a
PC 0x1D6 0x5 0x183 0x114 0x1D9 0x1 0x93 0x135 0x13C 0x72E 0x1FB n/a

Pointers in Zone Files

Infinity Ward implemented their own way of loading data that can already be found earlier in the zone file. What should be an address in memory is instead stored either as -1, -2, or as an offset. If the pointer is -1 or -2, than the data follows, typically in order. If the pointer is not -1 or -2, the first 4 bits (or 3 bits in BO2) are extracted and used as an index for the g_streamBlocks array. The other bits are the offset and is added to the data pointer in g_streamBlocks. The offset is only correct after the zone file has been loaded in memory. This is because some data is relocated (aligned) which changes the size of the zone. Some differences:

  • strings are aligned by 4 bytes
  • asset headers are stored in pools
  • sound, image, and shader programs are stored in pools
  • zone header is removed

Pages in category "FastFiles"

The following 4 pages are in this category, out of 4 total.