

<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.zeroy.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Daevius</id>
	<title>COD Modding &amp; Mapping Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.zeroy.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Daevius"/>
	<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Special:Contributions/Daevius"/>
	<updated>2026-04-30T08:04:20Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7189</id>
		<title>Call of Duty 4: FastFile Format</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7189"/>
		<updated>2009-12-08T23:15:43Z</updated>

		<summary type="html">&lt;p&gt;Daevius: /* 00 00 00 06 (image) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Under Construction Small.png‎]] &#039;&#039;&#039;*** Article and investigation in early progress ***&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Preface ==&lt;br /&gt;
&lt;br /&gt;
Be aware, FF files are little endian, so swap those bytes &#039;round!&lt;br /&gt;
&lt;br /&gt;
The data block types (also called &amp;quot;index identifier&amp;quot;) are written in big endian in this article, e.g. 00 00 00 1F is actually 1F 00 00 00 in ff, although ints and floats in the examples are kept little endian!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The global file layout starts with a header. After which you get a string list (model tag names, animation notetracks, maybe more; not always present). Followed by an index list. This list gives information about the rest of the file, which is a concatenation of compiled files (reinterpreted and linked data generated from source files like d3dbsp and stringtables, hereinafter referred to as data blocks).&lt;br /&gt;
&lt;br /&gt;
* Header&lt;br /&gt;
* String list index&lt;br /&gt;
* String list&lt;br /&gt;
* Data block index&lt;br /&gt;
* Data blocks&lt;br /&gt;
&lt;br /&gt;
Each file is separated by the separation key: 0xFFFFFFFF. But be aware, each file itself can also contain such a sequence which is not meant to be the separation key! So it is necessary to understand each data type in the FF file.&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;(Note: not up to date and not generalized)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Byte 0-3: decompressed fastfile size minus 44 (0x2C)&lt;br /&gt;
*Byte 4-7: about the total size of referenced data, e.g. the required memory for IWI textures if material files are in the ff&lt;br /&gt;
*Byte 8-11: &#039;&#039;unknown&#039;&#039;, might be a flag&lt;br /&gt;
*Byte 12-23: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 24-27: somehow related to ff size?&lt;br /&gt;
*Byte 28-43: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 44-47: equal to number of entries in &amp;quot;1st index&amp;quot; and amount of (model tag/joint/notetrack) strings (times 4 for index length)&lt;br /&gt;
*Byte 48-51: separator? (FF FF FF FF)&lt;br /&gt;
*Byte 52-55: number of records* (&amp;quot;2nd index&amp;quot;, times 8 for index length)&lt;br /&gt;
*Byte 56-63: separator? (FF FF FF FF FF FF FF FF)&lt;br /&gt;
*Byte 64-x: string list (xmodelsurfs?) --&amp;gt; not always, depends on the content (required offsets are in the FF header)*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; under re-investigation &amp;lt;!-- If a file was missing on ff compile, it does not count but the error message is added to the end of the file. There are usually more index entries than the number of records in the header. The given number of records is not equal to the entries in the assetinfo or assetlist file, it&#039;s usually higher. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: smallest possible fastfile (mod.ff) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
29 00 00 00  decompressed fastfile size minus 44 &lt;br /&gt;
00 00 00 00  &lt;br /&gt;
1C 00 00 00  unknown&lt;br /&gt;
&lt;br /&gt;
00 00 00 00 00 00 00 00 00 00 00 00&lt;br /&gt;
&lt;br /&gt;
0D 00 00 00  data size in memory (?)&lt;br /&gt;
&lt;br /&gt;
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00&lt;br /&gt;
&lt;br /&gt;
01 00 00 00  one index entry&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF 1F 00 00 00  a rawfile&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  index end&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  start separator&lt;br /&gt;
00 00 00 00  rawfile length (empty, no errors occured during compilation)&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
6D 6F 64 00  fastfile name as rawfile name&lt;br /&gt;
         00  rawfile string (empty)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: mp_backlot_load.ff ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Contains:&#039;&#039;&#039;&lt;br /&gt;
*2x shaders &lt;br /&gt;
*3x materials&lt;br /&gt;
*(1x fastfile name)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Materials:&lt;br /&gt;
# $victorybackdrop - mile_high_victory_screen.iwi (699,092 bytes)&lt;br /&gt;
# $defeatbackdrop - (none)&lt;br /&gt;
# $levelbriefing - loadscreen_mp_backlot.iwi (524,316 bytes)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start of file and header]&lt;br /&gt;
&lt;br /&gt;
71 03 00 00  Decompressed file size - 44 (hex: 371 + 2C = 39D; dec: 881 + 44 = 925)&lt;br /&gt;
&lt;br /&gt;
B8 AA 12 00  Size of both IWI&#039;s the materials in FF point to - 56 (2x28, 28 bytes = IWI header)&lt;br /&gt;
             0x12AAB8          = 1,223,352&lt;br /&gt;
             699,092 + 524,316 = 1,223,408&lt;br /&gt;
             difference:                56&lt;br /&gt;
&lt;br /&gt;
A4 00 00 00  Might be a flag&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
E5 00 00 00  Size of fastfile in memory (that is at least without header and separators, and maybe more)&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
&lt;br /&gt;
-----------  [end of header] (44 bytes), [start of index]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  Unknown, is sometimes FF FF FF FF&lt;br /&gt;
&lt;br /&gt;
06 00 00 00  Number of records in index (6)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  05 00 00 00  1st: shader&lt;br /&gt;
FF FF FF FF  05 00 00 00  2nd: shader&lt;br /&gt;
FF FF FF FF  04 00 00 00  3rd: material&lt;br /&gt;
FF FF FF FF  04 00 00 00  4th: material&lt;br /&gt;
FF FF FF FF  04 00 00 00  5th: material&lt;br /&gt;
FF FF FF FF  1F 00 00 00  6th: rawfile&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  end separator (the following FF FF FF FF is the start seperator of the next data block!)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of index]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Index ==&lt;br /&gt;
&lt;br /&gt;
Starts with an int telling the number of dword couples. Such a couple is composed of 2 ints:&lt;br /&gt;
&lt;br /&gt;
4 byte offset (FF FF FF FF = -1, meaning right after the previous block?)&amp;lt;br&amp;gt;&lt;br /&gt;
4 byte identifier (data block type)&lt;br /&gt;
&lt;br /&gt;
Separator (FF FF FF FF) after last couple&lt;br /&gt;
&lt;br /&gt;
=== Types ===&lt;br /&gt;
&lt;br /&gt;
* 00 00 00 01 - physpreset&lt;br /&gt;
* 00 00 00 02 - xanim&lt;br /&gt;
* 00 00 00 03 - xmodel&lt;br /&gt;
* 00 00 00 04 - material&lt;br /&gt;
* 00 00 00 05 - shader / techset&lt;br /&gt;
* 00 00 00 06 - image?&lt;br /&gt;
* 00 00 00 07 - soundalias (+audio data)&lt;br /&gt;
* 00 00 00 0B - map_ents (d3dbsp)&lt;br /&gt;
* 00 00 00 0C - related to col_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 0E - related to game_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 10 - related to col_map_mp / gfx_map (d3dbsp)&lt;br /&gt;
* 00 00 00 13 - font&lt;br /&gt;
* 00 00 00 14 - menu&lt;br /&gt;
* 00 00 00 16 - localized string asset&lt;br /&gt;
* 00 00 00 17 - physpreset??&lt;br /&gt;
* 00 00 00 19 - fx&lt;br /&gt;
* 00 00 00 1F - raw file&lt;br /&gt;
* 00 00 00 20 - stringtable (comma separated list)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Content ==&lt;br /&gt;
&lt;br /&gt;
Since there is a FF FF FF FF separator in front of every block and none at the very end (after last 1F-block), we can assume that each block has a start separation and no end separation. Thus, any FF FF FF FFs you find after data blocks are actually the start separators of the next block. This means the index end separator is rather FFFFFFFF than FFFFFFFFFFFFFFFF!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 04 (material) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
&lt;br /&gt;
00 2B 01 01  First 4 bytes seem to be 4 (unsigned) char&#039;s.&lt;br /&gt;
             1st byte is so far always 0x00 (perhaps it&#039;s a short together with the second byte).&lt;br /&gt;
             2nd byte so far either 0x2B or 0x00, I think this is a length.&lt;br /&gt;
             3rd byte so far 0x01, when 0x00 (all 4) the content is only a number of 0x00&#039;s, then the filename (0x00 termination)&lt;br /&gt;
             4th byte either 0x00 or 0x01. Can be a length or a bool.&lt;br /&gt;
             Then 0x10 bytes of more header.&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
00           When fourth byte is 01, there&#039;s a 0x00 following?             &lt;br /&gt;
             Then there&#039;s garbage (0xFF) and some shorts it looks of length in the second byte.&lt;br /&gt;
             Then more information...&lt;br /&gt;
02 00 0E E0  Often ends with this&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 05 (shader) ===&lt;br /&gt;
&lt;br /&gt;
A shader consists of 3 levels. One, the top level, consists of a header (with a name inside). Then the next level is a pack of shaders, it has a header, shaders and at the end a name. Then the bottom level is the shader itself, it has a header (containing a name of the source file and the length of the data) and the raw shader data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
&lt;br /&gt;
             36 pointers (0x90 bytes) (bytes 0x19 up to 0x22 say if we get any content at all?)&lt;br /&gt;
?? ?? .. 00  Then techset file name (0x00 termination) if pointer is 0xFFFFFFFF?&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader pack]&lt;br /&gt;
&lt;br /&gt;
             pointer&lt;br /&gt;
             1 dword of some character-length options / flags?&lt;br /&gt;
             3 pointers&lt;br /&gt;
             1 dword of some character-length sizes&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
             0x64 bytes of some short length options / flags? If the second pointer above is 0xFFFFFFFF&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader]&lt;br /&gt;
&lt;br /&gt;
             pointer, if not 0xFFFFFFFF, no filename is further on&lt;br /&gt;
             pointer, often 00 00 00 00&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
?? ?? 00 00  2 shorts, first short multiplied by 4 gives the length of the shader, second is a flag?&lt;br /&gt;
?? ?? .. 00  String if first pointer is 0xFFFFFFFF, 0x00 terminated (name of shader source file)&lt;br /&gt;
             Raw shader file (except the first 4 bytes, which, in the shader file, denotes the length of the file)&lt;br /&gt;
FF FF 00 00  which ends with this (always?)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shaders (go back to [start of shader]) or shaders have ended&lt;br /&gt;
&lt;br /&gt;
             Variable length of &#039;stuff&#039; (technique commands?)&lt;br /&gt;
41 10 AB A0  which ends with this (always?)&lt;br /&gt;
?? ?? .. 00  String, 0x00 terminated (technique file name)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader pack]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shader packs (go back to [start of shader pack]) or shader packs have ended&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 06 (image) ===&lt;br /&gt;
&lt;br /&gt;
Stores some information about the specified IWI in fastfile. Does not include the actual image data.&lt;br /&gt;
Length is 52 bytes + IWI name (+1 for string termination).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
&lt;br /&gt;
03 00 00 00&lt;br /&gt;
FE FF FF FF  separator?&lt;br /&gt;
00 00 00 00&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
70 55 01 00  IWI size minus 28 (0x1C)&lt;br /&gt;
70 55 01 00  same&lt;br /&gt;
&lt;br /&gt;
00 01 00 01&lt;br /&gt;
01 00 03 00&lt;br /&gt;
FF FF FF FF  separator?&lt;br /&gt;
&lt;br /&gt;
73 70 .. 00  IWI name without file extension (string + termination, variable size)&lt;br /&gt;
&lt;br /&gt;
00 00 00 01&lt;br /&gt;
00 01 01 00&lt;br /&gt;
&lt;br /&gt;
44 58 54 35 00 00 00 00  fixed size char[] for type? (here: DXT5....)&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 16 (localized string asset) ===&lt;br /&gt;
&lt;br /&gt;
A localized string asset consists of an alias name and a translated string. During compilation, it takes the given alias name (REFERENCE) from *.str file and prepands the *.str file&#039;s name in upper-case plus an underscore. Example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;example.str&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;VERSION             &amp;quot;1&amp;quot;&lt;br /&gt;
CONFIG              &amp;quot;C:\trees\cod3\cod3\bin\StringEd.cfg&amp;quot;&lt;br /&gt;
FILENOTES           &amp;quot;&amp;quot;&lt;br /&gt;
//--------------------------------&lt;br /&gt;
&lt;br /&gt;
REFERENCE           MARINES_NAME&lt;br /&gt;
LANG_ENGLISH        &amp;quot;US Airforce&amp;quot;&lt;br /&gt;
&lt;br /&gt;
//--------------------------------&lt;br /&gt;
ENDMARKER&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;mod.ff&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ÿÿÿÿ&lt;br /&gt;
ÿÿÿÿ&lt;br /&gt;
EXAMPLE_MARINES_NAME.&lt;br /&gt;
US Airforce.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Length is 8 bytes + string sizes (string count = 0-2, depends on the first two ints).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  either pointer or FFFFFFFF if the string wasn&#039;t used before&lt;br /&gt;
FF FF FF FF  same. If two pointers are used here, then no strings will follow.&lt;br /&gt;
55 53 .. 00  alias name for the localized&lt;br /&gt;
53 54 .. 00  actual localized string&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 1F (rawfile) ===&lt;br /&gt;
&lt;br /&gt;
A rawfile. Often a rawfile named right after the fastfile&#039;s name is implicitly added. It contains the errors thrown when it was compiling / linking.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
&lt;br /&gt;
64 00 00 00  Length of the file&#039;s content (example: decimal 100; does not count the string termination!)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
&lt;br /&gt;
6D 6F 64 00  File name or if it&#039;s the last 1F-block FastFile name (example: mod.)&lt;br /&gt;
?? ?? .. 00  Plain text content of length above (string, terminated by 0x00)&lt;br /&gt;
&lt;br /&gt;
-----------  [block end OR even end of file]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 20 (stringtable) === &lt;br /&gt;
&lt;br /&gt;
A compiled stringtable (comma separated list, *.csv). Even values are stored as strings.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
&lt;br /&gt;
05 00 00 00  (int) columns&lt;br /&gt;
02 00 00 00  (int) rows&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
?? ?? .. 00  filename (path/*.csv) + string termination (0x00)&lt;br /&gt;
&lt;br /&gt;
-----------  [table cell description]&lt;br /&gt;
&lt;br /&gt;
?? ?? ?? ??  columns * rows integers (5 * 2 * 4 = 40 bytes in total, 5 * 2 = 10 cells)&lt;br /&gt;
             FF FF FF FF - if the string wasn&#039;t used before and follows after the cell description&lt;br /&gt;
             ?? ?? ?? 4? - if an identical string was already used (in another csv). It is some kind of memory offset (pointer). Base address calculation not figured out yet (0x40000072 ?)&lt;br /&gt;
&lt;br /&gt;
-----------  [cell content / strings]&lt;br /&gt;
&lt;br /&gt;
?? ?? .. 00  string + termination (0x00)&lt;br /&gt;
             Number of strings = amount of FF FF FF FFs in table cell description&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[User:CoDEmanX|CoDEmanX]] 01:45, 8 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
--[[User:Daevius|Daevius]] 23:00, 8 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Technical Reference]]&lt;br /&gt;
[[Category:File formats]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- outdated investigations below&lt;br /&gt;
&lt;br /&gt;
=== Shaders ===&lt;br /&gt;
&lt;br /&gt;
05 00 00 00 or&lt;br /&gt;
04 00 00 00&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
9F 00 00 00  size after filename&lt;br /&gt;
&lt;br /&gt;
filename ended with 0x00&lt;br /&gt;
&lt;br /&gt;
(size * 4) bytes of shader data, seems to end with FF FF 00 00&lt;br /&gt;
might contain more data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
filename starts with &#039;,&#039;&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Daevius</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7188</id>
		<title>Call of Duty 4: FastFile Format</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7188"/>
		<updated>2009-12-08T23:15:32Z</updated>

		<summary type="html">&lt;p&gt;Daevius: /* 00 00 00 16 (localized string asset) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Under Construction Small.png‎]] &#039;&#039;&#039;*** Article and investigation in early progress ***&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Preface ==&lt;br /&gt;
&lt;br /&gt;
Be aware, FF files are little endian, so swap those bytes &#039;round!&lt;br /&gt;
&lt;br /&gt;
The data block types (also called &amp;quot;index identifier&amp;quot;) are written in big endian in this article, e.g. 00 00 00 1F is actually 1F 00 00 00 in ff, although ints and floats in the examples are kept little endian!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The global file layout starts with a header. After which you get a string list (model tag names, animation notetracks, maybe more; not always present). Followed by an index list. This list gives information about the rest of the file, which is a concatenation of compiled files (reinterpreted and linked data generated from source files like d3dbsp and stringtables, hereinafter referred to as data blocks).&lt;br /&gt;
&lt;br /&gt;
* Header&lt;br /&gt;
* String list index&lt;br /&gt;
* String list&lt;br /&gt;
* Data block index&lt;br /&gt;
* Data blocks&lt;br /&gt;
&lt;br /&gt;
Each file is separated by the separation key: 0xFFFFFFFF. But be aware, each file itself can also contain such a sequence which is not meant to be the separation key! So it is necessary to understand each data type in the FF file.&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;(Note: not up to date and not generalized)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Byte 0-3: decompressed fastfile size minus 44 (0x2C)&lt;br /&gt;
*Byte 4-7: about the total size of referenced data, e.g. the required memory for IWI textures if material files are in the ff&lt;br /&gt;
*Byte 8-11: &#039;&#039;unknown&#039;&#039;, might be a flag&lt;br /&gt;
*Byte 12-23: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 24-27: somehow related to ff size?&lt;br /&gt;
*Byte 28-43: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 44-47: equal to number of entries in &amp;quot;1st index&amp;quot; and amount of (model tag/joint/notetrack) strings (times 4 for index length)&lt;br /&gt;
*Byte 48-51: separator? (FF FF FF FF)&lt;br /&gt;
*Byte 52-55: number of records* (&amp;quot;2nd index&amp;quot;, times 8 for index length)&lt;br /&gt;
*Byte 56-63: separator? (FF FF FF FF FF FF FF FF)&lt;br /&gt;
*Byte 64-x: string list (xmodelsurfs?) --&amp;gt; not always, depends on the content (required offsets are in the FF header)*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; under re-investigation &amp;lt;!-- If a file was missing on ff compile, it does not count but the error message is added to the end of the file. There are usually more index entries than the number of records in the header. The given number of records is not equal to the entries in the assetinfo or assetlist file, it&#039;s usually higher. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: smallest possible fastfile (mod.ff) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
29 00 00 00  decompressed fastfile size minus 44 &lt;br /&gt;
00 00 00 00  &lt;br /&gt;
1C 00 00 00  unknown&lt;br /&gt;
&lt;br /&gt;
00 00 00 00 00 00 00 00 00 00 00 00&lt;br /&gt;
&lt;br /&gt;
0D 00 00 00  data size in memory (?)&lt;br /&gt;
&lt;br /&gt;
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00&lt;br /&gt;
&lt;br /&gt;
01 00 00 00  one index entry&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF 1F 00 00 00  a rawfile&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  index end&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  start separator&lt;br /&gt;
00 00 00 00  rawfile length (empty, no errors occured during compilation)&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
6D 6F 64 00  fastfile name as rawfile name&lt;br /&gt;
         00  rawfile string (empty)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: mp_backlot_load.ff ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Contains:&#039;&#039;&#039;&lt;br /&gt;
*2x shaders &lt;br /&gt;
*3x materials&lt;br /&gt;
*(1x fastfile name)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Materials:&lt;br /&gt;
# $victorybackdrop - mile_high_victory_screen.iwi (699,092 bytes)&lt;br /&gt;
# $defeatbackdrop - (none)&lt;br /&gt;
# $levelbriefing - loadscreen_mp_backlot.iwi (524,316 bytes)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start of file and header]&lt;br /&gt;
&lt;br /&gt;
71 03 00 00  Decompressed file size - 44 (hex: 371 + 2C = 39D; dec: 881 + 44 = 925)&lt;br /&gt;
&lt;br /&gt;
B8 AA 12 00  Size of both IWI&#039;s the materials in FF point to - 56 (2x28, 28 bytes = IWI header)&lt;br /&gt;
             0x12AAB8          = 1,223,352&lt;br /&gt;
             699,092 + 524,316 = 1,223,408&lt;br /&gt;
             difference:                56&lt;br /&gt;
&lt;br /&gt;
A4 00 00 00  Might be a flag&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
E5 00 00 00  Size of fastfile in memory (that is at least without header and separators, and maybe more)&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
&lt;br /&gt;
-----------  [end of header] (44 bytes), [start of index]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  Unknown, is sometimes FF FF FF FF&lt;br /&gt;
&lt;br /&gt;
06 00 00 00  Number of records in index (6)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  05 00 00 00  1st: shader&lt;br /&gt;
FF FF FF FF  05 00 00 00  2nd: shader&lt;br /&gt;
FF FF FF FF  04 00 00 00  3rd: material&lt;br /&gt;
FF FF FF FF  04 00 00 00  4th: material&lt;br /&gt;
FF FF FF FF  04 00 00 00  5th: material&lt;br /&gt;
FF FF FF FF  1F 00 00 00  6th: rawfile&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  end separator (the following FF FF FF FF is the start seperator of the next data block!)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of index]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Index ==&lt;br /&gt;
&lt;br /&gt;
Starts with an int telling the number of dword couples. Such a couple is composed of 2 ints:&lt;br /&gt;
&lt;br /&gt;
4 byte offset (FF FF FF FF = -1, meaning right after the previous block?)&amp;lt;br&amp;gt;&lt;br /&gt;
4 byte identifier (data block type)&lt;br /&gt;
&lt;br /&gt;
Separator (FF FF FF FF) after last couple&lt;br /&gt;
&lt;br /&gt;
=== Types ===&lt;br /&gt;
&lt;br /&gt;
* 00 00 00 01 - physpreset&lt;br /&gt;
* 00 00 00 02 - xanim&lt;br /&gt;
* 00 00 00 03 - xmodel&lt;br /&gt;
* 00 00 00 04 - material&lt;br /&gt;
* 00 00 00 05 - shader / techset&lt;br /&gt;
* 00 00 00 06 - image?&lt;br /&gt;
* 00 00 00 07 - soundalias (+audio data)&lt;br /&gt;
* 00 00 00 0B - map_ents (d3dbsp)&lt;br /&gt;
* 00 00 00 0C - related to col_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 0E - related to game_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 10 - related to col_map_mp / gfx_map (d3dbsp)&lt;br /&gt;
* 00 00 00 13 - font&lt;br /&gt;
* 00 00 00 14 - menu&lt;br /&gt;
* 00 00 00 16 - localized string asset&lt;br /&gt;
* 00 00 00 17 - physpreset??&lt;br /&gt;
* 00 00 00 19 - fx&lt;br /&gt;
* 00 00 00 1F - raw file&lt;br /&gt;
* 00 00 00 20 - stringtable (comma separated list)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Content ==&lt;br /&gt;
&lt;br /&gt;
Since there is a FF FF FF FF separator in front of every block and none at the very end (after last 1F-block), we can assume that each block has a start separation and no end separation. Thus, any FF FF FF FFs you find after data blocks are actually the start separators of the next block. This means the index end separator is rather FFFFFFFF than FFFFFFFFFFFFFFFF!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 04 (material) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
&lt;br /&gt;
00 2B 01 01  First 4 bytes seem to be 4 (unsigned) char&#039;s.&lt;br /&gt;
             1st byte is so far always 0x00 (perhaps it&#039;s a short together with the second byte).&lt;br /&gt;
             2nd byte so far either 0x2B or 0x00, I think this is a length.&lt;br /&gt;
             3rd byte so far 0x01, when 0x00 (all 4) the content is only a number of 0x00&#039;s, then the filename (0x00 termination)&lt;br /&gt;
             4th byte either 0x00 or 0x01. Can be a length or a bool.&lt;br /&gt;
             Then 0x10 bytes of more header.&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
00           When fourth byte is 01, there&#039;s a 0x00 following?             &lt;br /&gt;
             Then there&#039;s garbage (0xFF) and some shorts it looks of length in the second byte.&lt;br /&gt;
             Then more information...&lt;br /&gt;
02 00 0E E0  Often ends with this&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 05 (shader) ===&lt;br /&gt;
&lt;br /&gt;
A shader consists of 3 levels. One, the top level, consists of a header (with a name inside). Then the next level is a pack of shaders, it has a header, shaders and at the end a name. Then the bottom level is the shader itself, it has a header (containing a name of the source file and the length of the data) and the raw shader data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
&lt;br /&gt;
             36 pointers (0x90 bytes) (bytes 0x19 up to 0x22 say if we get any content at all?)&lt;br /&gt;
?? ?? .. 00  Then techset file name (0x00 termination) if pointer is 0xFFFFFFFF?&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader pack]&lt;br /&gt;
&lt;br /&gt;
             pointer&lt;br /&gt;
             1 dword of some character-length options / flags?&lt;br /&gt;
             3 pointers&lt;br /&gt;
             1 dword of some character-length sizes&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
             0x64 bytes of some short length options / flags? If the second pointer above is 0xFFFFFFFF&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader]&lt;br /&gt;
&lt;br /&gt;
             pointer, if not 0xFFFFFFFF, no filename is further on&lt;br /&gt;
             pointer, often 00 00 00 00&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
?? ?? 00 00  2 shorts, first short multiplied by 4 gives the length of the shader, second is a flag?&lt;br /&gt;
?? ?? .. 00  String if first pointer is 0xFFFFFFFF, 0x00 terminated (name of shader source file)&lt;br /&gt;
             Raw shader file (except the first 4 bytes, which, in the shader file, denotes the length of the file)&lt;br /&gt;
FF FF 00 00  which ends with this (always?)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shaders (go back to [start of shader]) or shaders have ended&lt;br /&gt;
&lt;br /&gt;
             Variable length of &#039;stuff&#039; (technique commands?)&lt;br /&gt;
41 10 AB A0  which ends with this (always?)&lt;br /&gt;
?? ?? .. 00  String, 0x00 terminated (technique file name)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader pack]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shader packs (go back to [start of shader pack]) or shader packs have ended&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 06 (image) ===&lt;br /&gt;
&lt;br /&gt;
Stores some information about the specified IWI in fastfile. Does not include the actual image data.&lt;br /&gt;
Length is 52 bytes + IWI name (+1 for string termination).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
             Note: obviously no start separator&lt;br /&gt;
03 00 00 00&lt;br /&gt;
FE FF FF FF  separator?&lt;br /&gt;
00 00 00 00&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
70 55 01 00  IWI size minus 28 (0x1C)&lt;br /&gt;
70 55 01 00  same&lt;br /&gt;
&lt;br /&gt;
00 01 00 01&lt;br /&gt;
01 00 03 00&lt;br /&gt;
FF FF FF FF  separator?&lt;br /&gt;
&lt;br /&gt;
73 70 .. 00  IWI name without file extension (string + termination, variable size)&lt;br /&gt;
&lt;br /&gt;
00 00 00 01&lt;br /&gt;
00 01 01 00&lt;br /&gt;
&lt;br /&gt;
44 58 54 35 00 00 00 00  fixed size char[] for type? (here: DXT5....)&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 16 (localized string asset) ===&lt;br /&gt;
&lt;br /&gt;
A localized string asset consists of an alias name and a translated string. During compilation, it takes the given alias name (REFERENCE) from *.str file and prepands the *.str file&#039;s name in upper-case plus an underscore. Example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;example.str&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;VERSION             &amp;quot;1&amp;quot;&lt;br /&gt;
CONFIG              &amp;quot;C:\trees\cod3\cod3\bin\StringEd.cfg&amp;quot;&lt;br /&gt;
FILENOTES           &amp;quot;&amp;quot;&lt;br /&gt;
//--------------------------------&lt;br /&gt;
&lt;br /&gt;
REFERENCE           MARINES_NAME&lt;br /&gt;
LANG_ENGLISH        &amp;quot;US Airforce&amp;quot;&lt;br /&gt;
&lt;br /&gt;
//--------------------------------&lt;br /&gt;
ENDMARKER&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;mod.ff&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ÿÿÿÿ&lt;br /&gt;
ÿÿÿÿ&lt;br /&gt;
EXAMPLE_MARINES_NAME.&lt;br /&gt;
US Airforce.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Length is 8 bytes + string sizes (string count = 0-2, depends on the first two ints).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  either pointer or FFFFFFFF if the string wasn&#039;t used before&lt;br /&gt;
FF FF FF FF  same. If two pointers are used here, then no strings will follow.&lt;br /&gt;
55 53 .. 00  alias name for the localized&lt;br /&gt;
53 54 .. 00  actual localized string&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 1F (rawfile) ===&lt;br /&gt;
&lt;br /&gt;
A rawfile. Often a rawfile named right after the fastfile&#039;s name is implicitly added. It contains the errors thrown when it was compiling / linking.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
&lt;br /&gt;
64 00 00 00  Length of the file&#039;s content (example: decimal 100; does not count the string termination!)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
&lt;br /&gt;
6D 6F 64 00  File name or if it&#039;s the last 1F-block FastFile name (example: mod.)&lt;br /&gt;
?? ?? .. 00  Plain text content of length above (string, terminated by 0x00)&lt;br /&gt;
&lt;br /&gt;
-----------  [block end OR even end of file]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 20 (stringtable) === &lt;br /&gt;
&lt;br /&gt;
A compiled stringtable (comma separated list, *.csv). Even values are stored as strings.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
&lt;br /&gt;
05 00 00 00  (int) columns&lt;br /&gt;
02 00 00 00  (int) rows&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
?? ?? .. 00  filename (path/*.csv) + string termination (0x00)&lt;br /&gt;
&lt;br /&gt;
-----------  [table cell description]&lt;br /&gt;
&lt;br /&gt;
?? ?? ?? ??  columns * rows integers (5 * 2 * 4 = 40 bytes in total, 5 * 2 = 10 cells)&lt;br /&gt;
             FF FF FF FF - if the string wasn&#039;t used before and follows after the cell description&lt;br /&gt;
             ?? ?? ?? 4? - if an identical string was already used (in another csv). It is some kind of memory offset (pointer). Base address calculation not figured out yet (0x40000072 ?)&lt;br /&gt;
&lt;br /&gt;
-----------  [cell content / strings]&lt;br /&gt;
&lt;br /&gt;
?? ?? .. 00  string + termination (0x00)&lt;br /&gt;
             Number of strings = amount of FF FF FF FFs in table cell description&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[User:CoDEmanX|CoDEmanX]] 01:45, 8 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
--[[User:Daevius|Daevius]] 23:00, 8 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Technical Reference]]&lt;br /&gt;
[[Category:File formats]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- outdated investigations below&lt;br /&gt;
&lt;br /&gt;
=== Shaders ===&lt;br /&gt;
&lt;br /&gt;
05 00 00 00 or&lt;br /&gt;
04 00 00 00&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
9F 00 00 00  size after filename&lt;br /&gt;
&lt;br /&gt;
filename ended with 0x00&lt;br /&gt;
&lt;br /&gt;
(size * 4) bytes of shader data, seems to end with FF FF 00 00&lt;br /&gt;
might contain more data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
filename starts with &#039;,&#039;&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Daevius</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7187</id>
		<title>Call of Duty 4: FastFile Format</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7187"/>
		<updated>2009-12-08T23:15:07Z</updated>

		<summary type="html">&lt;p&gt;Daevius: /* 00 00 00 20 (stringtable) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Under Construction Small.png‎]] &#039;&#039;&#039;*** Article and investigation in early progress ***&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Preface ==&lt;br /&gt;
&lt;br /&gt;
Be aware, FF files are little endian, so swap those bytes &#039;round!&lt;br /&gt;
&lt;br /&gt;
The data block types (also called &amp;quot;index identifier&amp;quot;) are written in big endian in this article, e.g. 00 00 00 1F is actually 1F 00 00 00 in ff, although ints and floats in the examples are kept little endian!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The global file layout starts with a header. After which you get a string list (model tag names, animation notetracks, maybe more; not always present). Followed by an index list. This list gives information about the rest of the file, which is a concatenation of compiled files (reinterpreted and linked data generated from source files like d3dbsp and stringtables, hereinafter referred to as data blocks).&lt;br /&gt;
&lt;br /&gt;
* Header&lt;br /&gt;
* String list index&lt;br /&gt;
* String list&lt;br /&gt;
* Data block index&lt;br /&gt;
* Data blocks&lt;br /&gt;
&lt;br /&gt;
Each file is separated by the separation key: 0xFFFFFFFF. But be aware, each file itself can also contain such a sequence which is not meant to be the separation key! So it is necessary to understand each data type in the FF file.&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;(Note: not up to date and not generalized)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Byte 0-3: decompressed fastfile size minus 44 (0x2C)&lt;br /&gt;
*Byte 4-7: about the total size of referenced data, e.g. the required memory for IWI textures if material files are in the ff&lt;br /&gt;
*Byte 8-11: &#039;&#039;unknown&#039;&#039;, might be a flag&lt;br /&gt;
*Byte 12-23: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 24-27: somehow related to ff size?&lt;br /&gt;
*Byte 28-43: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 44-47: equal to number of entries in &amp;quot;1st index&amp;quot; and amount of (model tag/joint/notetrack) strings (times 4 for index length)&lt;br /&gt;
*Byte 48-51: separator? (FF FF FF FF)&lt;br /&gt;
*Byte 52-55: number of records* (&amp;quot;2nd index&amp;quot;, times 8 for index length)&lt;br /&gt;
*Byte 56-63: separator? (FF FF FF FF FF FF FF FF)&lt;br /&gt;
*Byte 64-x: string list (xmodelsurfs?) --&amp;gt; not always, depends on the content (required offsets are in the FF header)*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; under re-investigation &amp;lt;!-- If a file was missing on ff compile, it does not count but the error message is added to the end of the file. There are usually more index entries than the number of records in the header. The given number of records is not equal to the entries in the assetinfo or assetlist file, it&#039;s usually higher. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: smallest possible fastfile (mod.ff) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
29 00 00 00  decompressed fastfile size minus 44 &lt;br /&gt;
00 00 00 00  &lt;br /&gt;
1C 00 00 00  unknown&lt;br /&gt;
&lt;br /&gt;
00 00 00 00 00 00 00 00 00 00 00 00&lt;br /&gt;
&lt;br /&gt;
0D 00 00 00  data size in memory (?)&lt;br /&gt;
&lt;br /&gt;
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00&lt;br /&gt;
&lt;br /&gt;
01 00 00 00  one index entry&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF 1F 00 00 00  a rawfile&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  index end&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  start separator&lt;br /&gt;
00 00 00 00  rawfile length (empty, no errors occured during compilation)&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
6D 6F 64 00  fastfile name as rawfile name&lt;br /&gt;
         00  rawfile string (empty)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: mp_backlot_load.ff ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Contains:&#039;&#039;&#039;&lt;br /&gt;
*2x shaders &lt;br /&gt;
*3x materials&lt;br /&gt;
*(1x fastfile name)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Materials:&lt;br /&gt;
# $victorybackdrop - mile_high_victory_screen.iwi (699,092 bytes)&lt;br /&gt;
# $defeatbackdrop - (none)&lt;br /&gt;
# $levelbriefing - loadscreen_mp_backlot.iwi (524,316 bytes)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start of file and header]&lt;br /&gt;
&lt;br /&gt;
71 03 00 00  Decompressed file size - 44 (hex: 371 + 2C = 39D; dec: 881 + 44 = 925)&lt;br /&gt;
&lt;br /&gt;
B8 AA 12 00  Size of both IWI&#039;s the materials in FF point to - 56 (2x28, 28 bytes = IWI header)&lt;br /&gt;
             0x12AAB8          = 1,223,352&lt;br /&gt;
             699,092 + 524,316 = 1,223,408&lt;br /&gt;
             difference:                56&lt;br /&gt;
&lt;br /&gt;
A4 00 00 00  Might be a flag&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
E5 00 00 00  Size of fastfile in memory (that is at least without header and separators, and maybe more)&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
&lt;br /&gt;
-----------  [end of header] (44 bytes), [start of index]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  Unknown, is sometimes FF FF FF FF&lt;br /&gt;
&lt;br /&gt;
06 00 00 00  Number of records in index (6)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  05 00 00 00  1st: shader&lt;br /&gt;
FF FF FF FF  05 00 00 00  2nd: shader&lt;br /&gt;
FF FF FF FF  04 00 00 00  3rd: material&lt;br /&gt;
FF FF FF FF  04 00 00 00  4th: material&lt;br /&gt;
FF FF FF FF  04 00 00 00  5th: material&lt;br /&gt;
FF FF FF FF  1F 00 00 00  6th: rawfile&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  end separator (the following FF FF FF FF is the start seperator of the next data block!)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of index]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Index ==&lt;br /&gt;
&lt;br /&gt;
Starts with an int telling the number of dword couples. Such a couple is composed of 2 ints:&lt;br /&gt;
&lt;br /&gt;
4 byte offset (FF FF FF FF = -1, meaning right after the previous block?)&amp;lt;br&amp;gt;&lt;br /&gt;
4 byte identifier (data block type)&lt;br /&gt;
&lt;br /&gt;
Separator (FF FF FF FF) after last couple&lt;br /&gt;
&lt;br /&gt;
=== Types ===&lt;br /&gt;
&lt;br /&gt;
* 00 00 00 01 - physpreset&lt;br /&gt;
* 00 00 00 02 - xanim&lt;br /&gt;
* 00 00 00 03 - xmodel&lt;br /&gt;
* 00 00 00 04 - material&lt;br /&gt;
* 00 00 00 05 - shader / techset&lt;br /&gt;
* 00 00 00 06 - image?&lt;br /&gt;
* 00 00 00 07 - soundalias (+audio data)&lt;br /&gt;
* 00 00 00 0B - map_ents (d3dbsp)&lt;br /&gt;
* 00 00 00 0C - related to col_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 0E - related to game_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 10 - related to col_map_mp / gfx_map (d3dbsp)&lt;br /&gt;
* 00 00 00 13 - font&lt;br /&gt;
* 00 00 00 14 - menu&lt;br /&gt;
* 00 00 00 16 - localized string asset&lt;br /&gt;
* 00 00 00 17 - physpreset??&lt;br /&gt;
* 00 00 00 19 - fx&lt;br /&gt;
* 00 00 00 1F - raw file&lt;br /&gt;
* 00 00 00 20 - stringtable (comma separated list)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Content ==&lt;br /&gt;
&lt;br /&gt;
Since there is a FF FF FF FF separator in front of every block and none at the very end (after last 1F-block), we can assume that each block has a start separation and no end separation. Thus, any FF FF FF FFs you find after data blocks are actually the start separators of the next block. This means the index end separator is rather FFFFFFFF than FFFFFFFFFFFFFFFF!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 04 (material) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
&lt;br /&gt;
00 2B 01 01  First 4 bytes seem to be 4 (unsigned) char&#039;s.&lt;br /&gt;
             1st byte is so far always 0x00 (perhaps it&#039;s a short together with the second byte).&lt;br /&gt;
             2nd byte so far either 0x2B or 0x00, I think this is a length.&lt;br /&gt;
             3rd byte so far 0x01, when 0x00 (all 4) the content is only a number of 0x00&#039;s, then the filename (0x00 termination)&lt;br /&gt;
             4th byte either 0x00 or 0x01. Can be a length or a bool.&lt;br /&gt;
             Then 0x10 bytes of more header.&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
00           When fourth byte is 01, there&#039;s a 0x00 following?             &lt;br /&gt;
             Then there&#039;s garbage (0xFF) and some shorts it looks of length in the second byte.&lt;br /&gt;
             Then more information...&lt;br /&gt;
02 00 0E E0  Often ends with this&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 05 (shader) ===&lt;br /&gt;
&lt;br /&gt;
A shader consists of 3 levels. One, the top level, consists of a header (with a name inside). Then the next level is a pack of shaders, it has a header, shaders and at the end a name. Then the bottom level is the shader itself, it has a header (containing a name of the source file and the length of the data) and the raw shader data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
&lt;br /&gt;
             36 pointers (0x90 bytes) (bytes 0x19 up to 0x22 say if we get any content at all?)&lt;br /&gt;
?? ?? .. 00  Then techset file name (0x00 termination) if pointer is 0xFFFFFFFF?&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader pack]&lt;br /&gt;
&lt;br /&gt;
             pointer&lt;br /&gt;
             1 dword of some character-length options / flags?&lt;br /&gt;
             3 pointers&lt;br /&gt;
             1 dword of some character-length sizes&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
             0x64 bytes of some short length options / flags? If the second pointer above is 0xFFFFFFFF&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader]&lt;br /&gt;
&lt;br /&gt;
             pointer, if not 0xFFFFFFFF, no filename is further on&lt;br /&gt;
             pointer, often 00 00 00 00&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
?? ?? 00 00  2 shorts, first short multiplied by 4 gives the length of the shader, second is a flag?&lt;br /&gt;
?? ?? .. 00  String if first pointer is 0xFFFFFFFF, 0x00 terminated (name of shader source file)&lt;br /&gt;
             Raw shader file (except the first 4 bytes, which, in the shader file, denotes the length of the file)&lt;br /&gt;
FF FF 00 00  which ends with this (always?)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shaders (go back to [start of shader]) or shaders have ended&lt;br /&gt;
&lt;br /&gt;
             Variable length of &#039;stuff&#039; (technique commands?)&lt;br /&gt;
41 10 AB A0  which ends with this (always?)&lt;br /&gt;
?? ?? .. 00  String, 0x00 terminated (technique file name)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader pack]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shader packs (go back to [start of shader pack]) or shader packs have ended&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 06 (image) ===&lt;br /&gt;
&lt;br /&gt;
Stores some information about the specified IWI in fastfile. Does not include the actual image data.&lt;br /&gt;
Length is 52 bytes + IWI name (+1 for string termination).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
             Note: obviously no start separator&lt;br /&gt;
03 00 00 00&lt;br /&gt;
FE FF FF FF  separator?&lt;br /&gt;
00 00 00 00&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
70 55 01 00  IWI size minus 28 (0x1C)&lt;br /&gt;
70 55 01 00  same&lt;br /&gt;
&lt;br /&gt;
00 01 00 01&lt;br /&gt;
01 00 03 00&lt;br /&gt;
FF FF FF FF  separator?&lt;br /&gt;
&lt;br /&gt;
73 70 .. 00  IWI name without file extension (string + termination, variable size)&lt;br /&gt;
&lt;br /&gt;
00 00 00 01&lt;br /&gt;
00 01 01 00&lt;br /&gt;
&lt;br /&gt;
44 58 54 35 00 00 00 00  fixed size char[] for type? (here: DXT5....)&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 16 (localized string asset) ===&lt;br /&gt;
&lt;br /&gt;
A localized string asset consists of an alias name and a translated string. During compilation, it takes the given alias name (REFERENCE) from *.str file and prepands the *.str file&#039;s name in upper-case plus an underscore. Example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;example.str&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;VERSION             &amp;quot;1&amp;quot;&lt;br /&gt;
CONFIG              &amp;quot;C:\trees\cod3\cod3\bin\StringEd.cfg&amp;quot;&lt;br /&gt;
FILENOTES           &amp;quot;&amp;quot;&lt;br /&gt;
//--------------------------------&lt;br /&gt;
&lt;br /&gt;
REFERENCE           MARINES_NAME&lt;br /&gt;
LANG_ENGLISH        &amp;quot;US Airforce&amp;quot;&lt;br /&gt;
&lt;br /&gt;
//--------------------------------&lt;br /&gt;
ENDMARKER&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;mod.ff&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ÿÿÿÿ&lt;br /&gt;
ÿÿÿÿ&lt;br /&gt;
EXAMPLE_MARINES_NAME.&lt;br /&gt;
US Airforce.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Length is 8 bytes + string sizes (string count = 0-2, depends on the first two ints).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
             Note: no start separator!&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  either pointer or FFFFFFFF if the string wasn&#039;t used before&lt;br /&gt;
FF FF FF FF  same. If two pointers are used here, then no strings will follow.&lt;br /&gt;
55 53 .. 00  alias name for the localized&lt;br /&gt;
53 54 .. 00  actual localized string&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 1F (rawfile) ===&lt;br /&gt;
&lt;br /&gt;
A rawfile. Often a rawfile named right after the fastfile&#039;s name is implicitly added. It contains the errors thrown when it was compiling / linking.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
&lt;br /&gt;
64 00 00 00  Length of the file&#039;s content (example: decimal 100; does not count the string termination!)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
&lt;br /&gt;
6D 6F 64 00  File name or if it&#039;s the last 1F-block FastFile name (example: mod.)&lt;br /&gt;
?? ?? .. 00  Plain text content of length above (string, terminated by 0x00)&lt;br /&gt;
&lt;br /&gt;
-----------  [block end OR even end of file]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 20 (stringtable) === &lt;br /&gt;
&lt;br /&gt;
A compiled stringtable (comma separated list, *.csv). Even values are stored as strings.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
&lt;br /&gt;
05 00 00 00  (int) columns&lt;br /&gt;
02 00 00 00  (int) rows&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
?? ?? .. 00  filename (path/*.csv) + string termination (0x00)&lt;br /&gt;
&lt;br /&gt;
-----------  [table cell description]&lt;br /&gt;
&lt;br /&gt;
?? ?? ?? ??  columns * rows integers (5 * 2 * 4 = 40 bytes in total, 5 * 2 = 10 cells)&lt;br /&gt;
             FF FF FF FF - if the string wasn&#039;t used before and follows after the cell description&lt;br /&gt;
             ?? ?? ?? 4? - if an identical string was already used (in another csv). It is some kind of memory offset (pointer). Base address calculation not figured out yet (0x40000072 ?)&lt;br /&gt;
&lt;br /&gt;
-----------  [cell content / strings]&lt;br /&gt;
&lt;br /&gt;
?? ?? .. 00  string + termination (0x00)&lt;br /&gt;
             Number of strings = amount of FF FF FF FFs in table cell description&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[User:CoDEmanX|CoDEmanX]] 01:45, 8 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
--[[User:Daevius|Daevius]] 23:00, 8 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Technical Reference]]&lt;br /&gt;
[[Category:File formats]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- outdated investigations below&lt;br /&gt;
&lt;br /&gt;
=== Shaders ===&lt;br /&gt;
&lt;br /&gt;
05 00 00 00 or&lt;br /&gt;
04 00 00 00&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
9F 00 00 00  size after filename&lt;br /&gt;
&lt;br /&gt;
filename ended with 0x00&lt;br /&gt;
&lt;br /&gt;
(size * 4) bytes of shader data, seems to end with FF FF 00 00&lt;br /&gt;
might contain more data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
filename starts with &#039;,&#039;&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Daevius</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7186</id>
		<title>Call of Duty 4: FastFile Format</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7186"/>
		<updated>2009-12-08T23:05:02Z</updated>

		<summary type="html">&lt;p&gt;Daevius: /* 00 00 00 1F (rawfile) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Under Construction Small.png‎]] &#039;&#039;&#039;*** Article and investigation in early progress ***&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Preface ==&lt;br /&gt;
&lt;br /&gt;
Be aware, FF files are little endian, so swap those bytes &#039;round!&lt;br /&gt;
&lt;br /&gt;
The data block types (also called &amp;quot;index identifier&amp;quot;) are written in big endian in this article, e.g. 00 00 00 1F is actually 1F 00 00 00 in ff, although ints and floats in the examples are kept little endian!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The global file layout starts with a header. After which you get a string list (model tag names, animation notetracks, maybe more; not always present). Followed by an index list. This list gives information about the rest of the file, which is a concatenation of compiled files (reinterpreted and linked data generated from source files like d3dbsp and stringtables, hereinafter referred to as data blocks).&lt;br /&gt;
&lt;br /&gt;
* Header&lt;br /&gt;
* String list index&lt;br /&gt;
* String list&lt;br /&gt;
* Data block index&lt;br /&gt;
* Data blocks&lt;br /&gt;
&lt;br /&gt;
Each file is separated by the separation key: 0xFFFFFFFF. But be aware, each file itself can also contain such a sequence which is not meant to be the separation key! So it is necessary to understand each data type in the FF file.&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;(Note: not up to date and not generalized)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Byte 0-3: decompressed fastfile size minus 44 (0x2C)&lt;br /&gt;
*Byte 4-7: about the total size of referenced data, e.g. the required memory for IWI textures if material files are in the ff&lt;br /&gt;
*Byte 8-11: &#039;&#039;unknown&#039;&#039;, might be a flag&lt;br /&gt;
*Byte 12-23: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 24-27: somehow related to ff size?&lt;br /&gt;
*Byte 28-43: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 44-47: equal to number of entries in &amp;quot;1st index&amp;quot; and amount of (model tag/joint/notetrack) strings (times 4 for index length)&lt;br /&gt;
*Byte 48-51: separator? (FF FF FF FF)&lt;br /&gt;
*Byte 52-55: number of records* (&amp;quot;2nd index&amp;quot;, times 8 for index length)&lt;br /&gt;
*Byte 56-63: separator? (FF FF FF FF FF FF FF FF)&lt;br /&gt;
*Byte 64-x: string list (xmodelsurfs?) --&amp;gt; not always, depends on the content (required offsets are in the FF header)*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; under re-investigation &amp;lt;!-- If a file was missing on ff compile, it does not count but the error message is added to the end of the file. There are usually more index entries than the number of records in the header. The given number of records is not equal to the entries in the assetinfo or assetlist file, it&#039;s usually higher. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: smallest possible fastfile (mod.ff) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
29 00 00 00  decompressed fastfile size minus 44 &lt;br /&gt;
00 00 00 00  &lt;br /&gt;
1C 00 00 00  unknown&lt;br /&gt;
&lt;br /&gt;
00 00 00 00 00 00 00 00 00 00 00 00&lt;br /&gt;
&lt;br /&gt;
0D 00 00 00  data size in memory (?)&lt;br /&gt;
&lt;br /&gt;
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00&lt;br /&gt;
&lt;br /&gt;
01 00 00 00  one index entry&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF 1F 00 00 00  a rawfile&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  index end&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  start separator&lt;br /&gt;
00 00 00 00  rawfile length (empty, no errors occured during compilation)&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
6D 6F 64 00  fastfile name as rawfile name&lt;br /&gt;
         00  rawfile string (empty)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: mp_backlot_load.ff ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Contains:&#039;&#039;&#039;&lt;br /&gt;
*2x shaders &lt;br /&gt;
*3x materials&lt;br /&gt;
*(1x fastfile name)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Materials:&lt;br /&gt;
# $victorybackdrop - mile_high_victory_screen.iwi (699,092 bytes)&lt;br /&gt;
# $defeatbackdrop - (none)&lt;br /&gt;
# $levelbriefing - loadscreen_mp_backlot.iwi (524,316 bytes)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start of file and header]&lt;br /&gt;
&lt;br /&gt;
71 03 00 00  Decompressed file size - 44 (hex: 371 + 2C = 39D; dec: 881 + 44 = 925)&lt;br /&gt;
&lt;br /&gt;
B8 AA 12 00  Size of both IWI&#039;s the materials in FF point to - 56 (2x28, 28 bytes = IWI header)&lt;br /&gt;
             0x12AAB8          = 1,223,352&lt;br /&gt;
             699,092 + 524,316 = 1,223,408&lt;br /&gt;
             difference:                56&lt;br /&gt;
&lt;br /&gt;
A4 00 00 00  Might be a flag&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
E5 00 00 00  Size of fastfile in memory (that is at least without header and separators, and maybe more)&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
&lt;br /&gt;
-----------  [end of header] (44 bytes), [start of index]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  Unknown, is sometimes FF FF FF FF&lt;br /&gt;
&lt;br /&gt;
06 00 00 00  Number of records in index (6)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  05 00 00 00  1st: shader&lt;br /&gt;
FF FF FF FF  05 00 00 00  2nd: shader&lt;br /&gt;
FF FF FF FF  04 00 00 00  3rd: material&lt;br /&gt;
FF FF FF FF  04 00 00 00  4th: material&lt;br /&gt;
FF FF FF FF  04 00 00 00  5th: material&lt;br /&gt;
FF FF FF FF  1F 00 00 00  6th: rawfile&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  end separator (the following FF FF FF FF is the start seperator of the next data block!)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of index]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Index ==&lt;br /&gt;
&lt;br /&gt;
Starts with an int telling the number of dword couples. Such a couple is composed of 2 ints:&lt;br /&gt;
&lt;br /&gt;
4 byte offset (FF FF FF FF = -1, meaning right after the previous block?)&amp;lt;br&amp;gt;&lt;br /&gt;
4 byte identifier (data block type)&lt;br /&gt;
&lt;br /&gt;
Separator (FF FF FF FF) after last couple&lt;br /&gt;
&lt;br /&gt;
=== Types ===&lt;br /&gt;
&lt;br /&gt;
* 00 00 00 01 - physpreset&lt;br /&gt;
* 00 00 00 02 - xanim&lt;br /&gt;
* 00 00 00 03 - xmodel&lt;br /&gt;
* 00 00 00 04 - material&lt;br /&gt;
* 00 00 00 05 - shader / techset&lt;br /&gt;
* 00 00 00 06 - image?&lt;br /&gt;
* 00 00 00 07 - soundalias (+audio data)&lt;br /&gt;
* 00 00 00 0B - map_ents (d3dbsp)&lt;br /&gt;
* 00 00 00 0C - related to col_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 0E - related to game_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 10 - related to col_map_mp / gfx_map (d3dbsp)&lt;br /&gt;
* 00 00 00 13 - font&lt;br /&gt;
* 00 00 00 14 - menu&lt;br /&gt;
* 00 00 00 16 - localized string asset&lt;br /&gt;
* 00 00 00 17 - physpreset??&lt;br /&gt;
* 00 00 00 19 - fx&lt;br /&gt;
* 00 00 00 1F - raw file&lt;br /&gt;
* 00 00 00 20 - stringtable (comma separated list)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Content ==&lt;br /&gt;
&lt;br /&gt;
Since there is a FF FF FF FF separator in front of every block and none at the very end (after last 1F-block), we can assume that each block has a start separation and no end separation. Thus, any FF FF FF FFs you find after data blocks are actually the start separators of the next block. This means the index end separator is rather FFFFFFFF than FFFFFFFFFFFFFFFF!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 04 (material) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
&lt;br /&gt;
00 2B 01 01  First 4 bytes seem to be 4 (unsigned) char&#039;s.&lt;br /&gt;
             1st byte is so far always 0x00 (perhaps it&#039;s a short together with the second byte).&lt;br /&gt;
             2nd byte so far either 0x2B or 0x00, I think this is a length.&lt;br /&gt;
             3rd byte so far 0x01, when 0x00 (all 4) the content is only a number of 0x00&#039;s, then the filename (0x00 termination)&lt;br /&gt;
             4th byte either 0x00 or 0x01. Can be a length or a bool.&lt;br /&gt;
             Then 0x10 bytes of more header.&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
00           When fourth byte is 01, there&#039;s a 0x00 following?             &lt;br /&gt;
             Then there&#039;s garbage (0xFF) and some shorts it looks of length in the second byte.&lt;br /&gt;
             Then more information...&lt;br /&gt;
02 00 0E E0  Often ends with this&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 05 (shader) ===&lt;br /&gt;
&lt;br /&gt;
A shader consists of 3 levels. One, the top level, consists of a header (with a name inside). Then the next level is a pack of shaders, it has a header, shaders and at the end a name. Then the bottom level is the shader itself, it has a header (containing a name of the source file and the length of the data) and the raw shader data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
&lt;br /&gt;
             36 pointers (0x90 bytes) (bytes 0x19 up to 0x22 say if we get any content at all?)&lt;br /&gt;
?? ?? .. 00  Then techset file name (0x00 termination) if pointer is 0xFFFFFFFF?&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader pack]&lt;br /&gt;
&lt;br /&gt;
             pointer&lt;br /&gt;
             1 dword of some character-length options / flags?&lt;br /&gt;
             3 pointers&lt;br /&gt;
             1 dword of some character-length sizes&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
             0x64 bytes of some short length options / flags? If the second pointer above is 0xFFFFFFFF&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader]&lt;br /&gt;
&lt;br /&gt;
             pointer, if not 0xFFFFFFFF, no filename is further on&lt;br /&gt;
             pointer, often 00 00 00 00&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
?? ?? 00 00  2 shorts, first short multiplied by 4 gives the length of the shader, second is a flag?&lt;br /&gt;
?? ?? .. 00  String if first pointer is 0xFFFFFFFF, 0x00 terminated (name of shader source file)&lt;br /&gt;
             Raw shader file (except the first 4 bytes, which, in the shader file, denotes the length of the file)&lt;br /&gt;
FF FF 00 00  which ends with this (always?)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shaders (go back to [start of shader]) or shaders have ended&lt;br /&gt;
&lt;br /&gt;
             Variable length of &#039;stuff&#039; (technique commands?)&lt;br /&gt;
41 10 AB A0  which ends with this (always?)&lt;br /&gt;
?? ?? .. 00  String, 0x00 terminated (technique file name)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader pack]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shader packs (go back to [start of shader pack]) or shader packs have ended&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 06 (image) ===&lt;br /&gt;
&lt;br /&gt;
Stores some information about the specified IWI in fastfile. Does not include the actual image data.&lt;br /&gt;
Length is 52 bytes + IWI name (+1 for string termination).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
             Note: obviously no start separator&lt;br /&gt;
03 00 00 00&lt;br /&gt;
FE FF FF FF  separator?&lt;br /&gt;
00 00 00 00&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
70 55 01 00  IWI size minus 28 (0x1C)&lt;br /&gt;
70 55 01 00  same&lt;br /&gt;
&lt;br /&gt;
00 01 00 01&lt;br /&gt;
01 00 03 00&lt;br /&gt;
FF FF FF FF  separator?&lt;br /&gt;
&lt;br /&gt;
73 70 .. 00  IWI name without file extension (string + termination, variable size)&lt;br /&gt;
&lt;br /&gt;
00 00 00 01&lt;br /&gt;
00 01 01 00&lt;br /&gt;
&lt;br /&gt;
44 58 54 35 00 00 00 00  fixed size char[] for type? (here: DXT5....)&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 16 (localized string asset) ===&lt;br /&gt;
&lt;br /&gt;
A localized string asset consists of an alias name and a translated string. During compilation, it takes the given alias name (REFERENCE) from *.str file and prepands the *.str file&#039;s name in upper-case plus an underscore. Example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;example.str&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;VERSION             &amp;quot;1&amp;quot;&lt;br /&gt;
CONFIG              &amp;quot;C:\trees\cod3\cod3\bin\StringEd.cfg&amp;quot;&lt;br /&gt;
FILENOTES           &amp;quot;&amp;quot;&lt;br /&gt;
//--------------------------------&lt;br /&gt;
&lt;br /&gt;
REFERENCE           MARINES_NAME&lt;br /&gt;
LANG_ENGLISH        &amp;quot;US Airforce&amp;quot;&lt;br /&gt;
&lt;br /&gt;
//--------------------------------&lt;br /&gt;
ENDMARKER&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;mod.ff&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ÿÿÿÿ&lt;br /&gt;
ÿÿÿÿ&lt;br /&gt;
EXAMPLE_MARINES_NAME.&lt;br /&gt;
US Airforce.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Length is 8 bytes + string sizes (string count = 0-2, depends on the first two ints).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
             Note: no start separator!&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  either pointer or FFFFFFFF if the string wasn&#039;t used before&lt;br /&gt;
FF FF FF FF  same. If two pointers are used here, then no strings will follow.&lt;br /&gt;
55 53 .. 00  alias name for the localized&lt;br /&gt;
53 54 .. 00  actual localized string&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 1F (rawfile) ===&lt;br /&gt;
&lt;br /&gt;
A rawfile. Often a rawfile named right after the fastfile&#039;s name is implicitly added. It contains the errors thrown when it was compiling / linking.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
&lt;br /&gt;
64 00 00 00  Length of the file&#039;s content (example: decimal 100; does not count the string termination!)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
&lt;br /&gt;
6D 6F 64 00  File name or if it&#039;s the last 1F-block FastFile name (example: mod.)&lt;br /&gt;
?? ?? .. 00  Plain text content of length above (string, terminated by 0x00)&lt;br /&gt;
&lt;br /&gt;
-----------  [block end OR even end of file]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 20 (stringtable) === &lt;br /&gt;
&lt;br /&gt;
A compiled stringtable (comma separated list, *.csv). Even values are stored as strings.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  start separation&lt;br /&gt;
&lt;br /&gt;
05 00 00 00  (int) columns&lt;br /&gt;
02 00 00 00  (int) rows&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
?? ?? .. 00  filename (path/*.csv) + string termination (0x00)&lt;br /&gt;
&lt;br /&gt;
-----------  [table cell description]&lt;br /&gt;
&lt;br /&gt;
?? ?? ?? ??  columns * rows integers (5 * 2 * 4 = 40 bytes in total, 5 * 2 = 10 cells)&lt;br /&gt;
             FF FF FF FF - if the string wasn&#039;t used before and follows after the cell description&lt;br /&gt;
             ?? ?? ?? 4? - if an identical string was already used (in another csv). It is some kind of memory offset (pointer). Base address calculation not figured out yet (0x40000072 ?)&lt;br /&gt;
&lt;br /&gt;
-----------  [cell content / strings]&lt;br /&gt;
&lt;br /&gt;
?? ?? .. 00  string + termination (0x00)&lt;br /&gt;
             Number of strings = amount of FF FF FF FFs in table cell description&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[User:CoDEmanX|CoDEmanX]] 01:45, 8 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
--[[User:Daevius|Daevius]] 23:00, 8 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Technical Reference]]&lt;br /&gt;
[[Category:File formats]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- outdated investigations below&lt;br /&gt;
&lt;br /&gt;
=== Shaders ===&lt;br /&gt;
&lt;br /&gt;
05 00 00 00 or&lt;br /&gt;
04 00 00 00&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
9F 00 00 00  size after filename&lt;br /&gt;
&lt;br /&gt;
filename ended with 0x00&lt;br /&gt;
&lt;br /&gt;
(size * 4) bytes of shader data, seems to end with FF FF 00 00&lt;br /&gt;
might contain more data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
filename starts with &#039;,&#039;&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Daevius</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7185</id>
		<title>Call of Duty 4: FastFile Format</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7185"/>
		<updated>2009-12-08T23:04:42Z</updated>

		<summary type="html">&lt;p&gt;Daevius: /* 00 00 00 04 (material) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Under Construction Small.png‎]] &#039;&#039;&#039;*** Article and investigation in early progress ***&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Preface ==&lt;br /&gt;
&lt;br /&gt;
Be aware, FF files are little endian, so swap those bytes &#039;round!&lt;br /&gt;
&lt;br /&gt;
The data block types (also called &amp;quot;index identifier&amp;quot;) are written in big endian in this article, e.g. 00 00 00 1F is actually 1F 00 00 00 in ff, although ints and floats in the examples are kept little endian!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The global file layout starts with a header. After which you get a string list (model tag names, animation notetracks, maybe more; not always present). Followed by an index list. This list gives information about the rest of the file, which is a concatenation of compiled files (reinterpreted and linked data generated from source files like d3dbsp and stringtables, hereinafter referred to as data blocks).&lt;br /&gt;
&lt;br /&gt;
* Header&lt;br /&gt;
* String list index&lt;br /&gt;
* String list&lt;br /&gt;
* Data block index&lt;br /&gt;
* Data blocks&lt;br /&gt;
&lt;br /&gt;
Each file is separated by the separation key: 0xFFFFFFFF. But be aware, each file itself can also contain such a sequence which is not meant to be the separation key! So it is necessary to understand each data type in the FF file.&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;(Note: not up to date and not generalized)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Byte 0-3: decompressed fastfile size minus 44 (0x2C)&lt;br /&gt;
*Byte 4-7: about the total size of referenced data, e.g. the required memory for IWI textures if material files are in the ff&lt;br /&gt;
*Byte 8-11: &#039;&#039;unknown&#039;&#039;, might be a flag&lt;br /&gt;
*Byte 12-23: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 24-27: somehow related to ff size?&lt;br /&gt;
*Byte 28-43: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 44-47: equal to number of entries in &amp;quot;1st index&amp;quot; and amount of (model tag/joint/notetrack) strings (times 4 for index length)&lt;br /&gt;
*Byte 48-51: separator? (FF FF FF FF)&lt;br /&gt;
*Byte 52-55: number of records* (&amp;quot;2nd index&amp;quot;, times 8 for index length)&lt;br /&gt;
*Byte 56-63: separator? (FF FF FF FF FF FF FF FF)&lt;br /&gt;
*Byte 64-x: string list (xmodelsurfs?) --&amp;gt; not always, depends on the content (required offsets are in the FF header)*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; under re-investigation &amp;lt;!-- If a file was missing on ff compile, it does not count but the error message is added to the end of the file. There are usually more index entries than the number of records in the header. The given number of records is not equal to the entries in the assetinfo or assetlist file, it&#039;s usually higher. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: smallest possible fastfile (mod.ff) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
29 00 00 00  decompressed fastfile size minus 44 &lt;br /&gt;
00 00 00 00  &lt;br /&gt;
1C 00 00 00  unknown&lt;br /&gt;
&lt;br /&gt;
00 00 00 00 00 00 00 00 00 00 00 00&lt;br /&gt;
&lt;br /&gt;
0D 00 00 00  data size in memory (?)&lt;br /&gt;
&lt;br /&gt;
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00&lt;br /&gt;
&lt;br /&gt;
01 00 00 00  one index entry&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF 1F 00 00 00  a rawfile&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  index end&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  start separator&lt;br /&gt;
00 00 00 00  rawfile length (empty, no errors occured during compilation)&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
6D 6F 64 00  fastfile name as rawfile name&lt;br /&gt;
         00  rawfile string (empty)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: mp_backlot_load.ff ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Contains:&#039;&#039;&#039;&lt;br /&gt;
*2x shaders &lt;br /&gt;
*3x materials&lt;br /&gt;
*(1x fastfile name)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Materials:&lt;br /&gt;
# $victorybackdrop - mile_high_victory_screen.iwi (699,092 bytes)&lt;br /&gt;
# $defeatbackdrop - (none)&lt;br /&gt;
# $levelbriefing - loadscreen_mp_backlot.iwi (524,316 bytes)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start of file and header]&lt;br /&gt;
&lt;br /&gt;
71 03 00 00  Decompressed file size - 44 (hex: 371 + 2C = 39D; dec: 881 + 44 = 925)&lt;br /&gt;
&lt;br /&gt;
B8 AA 12 00  Size of both IWI&#039;s the materials in FF point to - 56 (2x28, 28 bytes = IWI header)&lt;br /&gt;
             0x12AAB8          = 1,223,352&lt;br /&gt;
             699,092 + 524,316 = 1,223,408&lt;br /&gt;
             difference:                56&lt;br /&gt;
&lt;br /&gt;
A4 00 00 00  Might be a flag&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
E5 00 00 00  Size of fastfile in memory (that is at least without header and separators, and maybe more)&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
&lt;br /&gt;
-----------  [end of header] (44 bytes), [start of index]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  Unknown, is sometimes FF FF FF FF&lt;br /&gt;
&lt;br /&gt;
06 00 00 00  Number of records in index (6)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  05 00 00 00  1st: shader&lt;br /&gt;
FF FF FF FF  05 00 00 00  2nd: shader&lt;br /&gt;
FF FF FF FF  04 00 00 00  3rd: material&lt;br /&gt;
FF FF FF FF  04 00 00 00  4th: material&lt;br /&gt;
FF FF FF FF  04 00 00 00  5th: material&lt;br /&gt;
FF FF FF FF  1F 00 00 00  6th: rawfile&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  end separator (the following FF FF FF FF is the start seperator of the next data block!)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of index]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Index ==&lt;br /&gt;
&lt;br /&gt;
Starts with an int telling the number of dword couples. Such a couple is composed of 2 ints:&lt;br /&gt;
&lt;br /&gt;
4 byte offset (FF FF FF FF = -1, meaning right after the previous block?)&amp;lt;br&amp;gt;&lt;br /&gt;
4 byte identifier (data block type)&lt;br /&gt;
&lt;br /&gt;
Separator (FF FF FF FF) after last couple&lt;br /&gt;
&lt;br /&gt;
=== Types ===&lt;br /&gt;
&lt;br /&gt;
* 00 00 00 01 - physpreset&lt;br /&gt;
* 00 00 00 02 - xanim&lt;br /&gt;
* 00 00 00 03 - xmodel&lt;br /&gt;
* 00 00 00 04 - material&lt;br /&gt;
* 00 00 00 05 - shader / techset&lt;br /&gt;
* 00 00 00 06 - image?&lt;br /&gt;
* 00 00 00 07 - soundalias (+audio data)&lt;br /&gt;
* 00 00 00 0B - map_ents (d3dbsp)&lt;br /&gt;
* 00 00 00 0C - related to col_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 0E - related to game_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 10 - related to col_map_mp / gfx_map (d3dbsp)&lt;br /&gt;
* 00 00 00 13 - font&lt;br /&gt;
* 00 00 00 14 - menu&lt;br /&gt;
* 00 00 00 16 - localized string asset&lt;br /&gt;
* 00 00 00 17 - physpreset??&lt;br /&gt;
* 00 00 00 19 - fx&lt;br /&gt;
* 00 00 00 1F - raw file&lt;br /&gt;
* 00 00 00 20 - stringtable (comma separated list)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Content ==&lt;br /&gt;
&lt;br /&gt;
Since there is a FF FF FF FF separator in front of every block and none at the very end (after last 1F-block), we can assume that each block has a start separation and no end separation. Thus, any FF FF FF FFs you find after data blocks are actually the start separators of the next block. This means the index end separator is rather FFFFFFFF than FFFFFFFFFFFFFFFF!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 04 (material) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
&lt;br /&gt;
00 2B 01 01  First 4 bytes seem to be 4 (unsigned) char&#039;s.&lt;br /&gt;
             1st byte is so far always 0x00 (perhaps it&#039;s a short together with the second byte).&lt;br /&gt;
             2nd byte so far either 0x2B or 0x00, I think this is a length.&lt;br /&gt;
             3rd byte so far 0x01, when 0x00 (all 4) the content is only a number of 0x00&#039;s, then the filename (0x00 termination)&lt;br /&gt;
             4th byte either 0x00 or 0x01. Can be a length or a bool.&lt;br /&gt;
             Then 0x10 bytes of more header.&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
00           When fourth byte is 01, there&#039;s a 0x00 following?             &lt;br /&gt;
             Then there&#039;s garbage (0xFF) and some shorts it looks of length in the second byte.&lt;br /&gt;
             Then more information...&lt;br /&gt;
02 00 0E E0  Often ends with this&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 05 (shader) ===&lt;br /&gt;
&lt;br /&gt;
A shader consists of 3 levels. One, the top level, consists of a header (with a name inside). Then the next level is a pack of shaders, it has a header, shaders and at the end a name. Then the bottom level is the shader itself, it has a header (containing a name of the source file and the length of the data) and the raw shader data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
&lt;br /&gt;
             36 pointers (0x90 bytes) (bytes 0x19 up to 0x22 say if we get any content at all?)&lt;br /&gt;
?? ?? .. 00  Then techset file name (0x00 termination) if pointer is 0xFFFFFFFF?&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader pack]&lt;br /&gt;
&lt;br /&gt;
             pointer&lt;br /&gt;
             1 dword of some character-length options / flags?&lt;br /&gt;
             3 pointers&lt;br /&gt;
             1 dword of some character-length sizes&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
             0x64 bytes of some short length options / flags? If the second pointer above is 0xFFFFFFFF&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader]&lt;br /&gt;
&lt;br /&gt;
             pointer, if not 0xFFFFFFFF, no filename is further on&lt;br /&gt;
             pointer, often 00 00 00 00&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
?? ?? 00 00  2 shorts, first short multiplied by 4 gives the length of the shader, second is a flag?&lt;br /&gt;
?? ?? .. 00  String if first pointer is 0xFFFFFFFF, 0x00 terminated (name of shader source file)&lt;br /&gt;
             Raw shader file (except the first 4 bytes, which, in the shader file, denotes the length of the file)&lt;br /&gt;
FF FF 00 00  which ends with this (always?)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shaders (go back to [start of shader]) or shaders have ended&lt;br /&gt;
&lt;br /&gt;
             Variable length of &#039;stuff&#039; (technique commands?)&lt;br /&gt;
41 10 AB A0  which ends with this (always?)&lt;br /&gt;
?? ?? .. 00  String, 0x00 terminated (technique file name)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader pack]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shader packs (go back to [start of shader pack]) or shader packs have ended&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 06 (image) ===&lt;br /&gt;
&lt;br /&gt;
Stores some information about the specified IWI in fastfile. Does not include the actual image data.&lt;br /&gt;
Length is 52 bytes + IWI name (+1 for string termination).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
             Note: obviously no start separator&lt;br /&gt;
03 00 00 00&lt;br /&gt;
FE FF FF FF  separator?&lt;br /&gt;
00 00 00 00&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
70 55 01 00  IWI size minus 28 (0x1C)&lt;br /&gt;
70 55 01 00  same&lt;br /&gt;
&lt;br /&gt;
00 01 00 01&lt;br /&gt;
01 00 03 00&lt;br /&gt;
FF FF FF FF  separator?&lt;br /&gt;
&lt;br /&gt;
73 70 .. 00  IWI name without file extension (string + termination, variable size)&lt;br /&gt;
&lt;br /&gt;
00 00 00 01&lt;br /&gt;
00 01 01 00&lt;br /&gt;
&lt;br /&gt;
44 58 54 35 00 00 00 00  fixed size char[] for type? (here: DXT5....)&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 16 (localized string asset) ===&lt;br /&gt;
&lt;br /&gt;
A localized string asset consists of an alias name and a translated string. During compilation, it takes the given alias name (REFERENCE) from *.str file and prepands the *.str file&#039;s name in upper-case plus an underscore. Example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;example.str&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;VERSION             &amp;quot;1&amp;quot;&lt;br /&gt;
CONFIG              &amp;quot;C:\trees\cod3\cod3\bin\StringEd.cfg&amp;quot;&lt;br /&gt;
FILENOTES           &amp;quot;&amp;quot;&lt;br /&gt;
//--------------------------------&lt;br /&gt;
&lt;br /&gt;
REFERENCE           MARINES_NAME&lt;br /&gt;
LANG_ENGLISH        &amp;quot;US Airforce&amp;quot;&lt;br /&gt;
&lt;br /&gt;
//--------------------------------&lt;br /&gt;
ENDMARKER&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;mod.ff&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ÿÿÿÿ&lt;br /&gt;
ÿÿÿÿ&lt;br /&gt;
EXAMPLE_MARINES_NAME.&lt;br /&gt;
US Airforce.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Length is 8 bytes + string sizes (string count = 0-2, depends on the first two ints).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
             Note: no start separator!&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  either pointer or FFFFFFFF if the string wasn&#039;t used before&lt;br /&gt;
FF FF FF FF  same. If two pointers are used here, then no strings will follow.&lt;br /&gt;
55 53 .. 00  alias name for the localized&lt;br /&gt;
53 54 .. 00  actual localized string&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 1F (rawfile) ===&lt;br /&gt;
&lt;br /&gt;
A rawfile. Often a rawfile named right after the fastfile&#039;s name is implicitly added. It contains the errors thrown when it was compiling / linking.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  Start separation&lt;br /&gt;
&lt;br /&gt;
64 00 00 00  Length of the file&#039;s content (example: decimal 100; does not count the string termination!)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
&lt;br /&gt;
6D 6F 64 00  File name or if it&#039;s the last 1F-block FastFile name (example: mod.)&lt;br /&gt;
?? ?? .. 00  Plain text content of length above (string, terminated by 0x00)&lt;br /&gt;
&lt;br /&gt;
-----------  [block end OR even end of file]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 20 (stringtable) === &lt;br /&gt;
&lt;br /&gt;
A compiled stringtable (comma separated list, *.csv). Even values are stored as strings.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  start separation&lt;br /&gt;
&lt;br /&gt;
05 00 00 00  (int) columns&lt;br /&gt;
02 00 00 00  (int) rows&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
?? ?? .. 00  filename (path/*.csv) + string termination (0x00)&lt;br /&gt;
&lt;br /&gt;
-----------  [table cell description]&lt;br /&gt;
&lt;br /&gt;
?? ?? ?? ??  columns * rows integers (5 * 2 * 4 = 40 bytes in total, 5 * 2 = 10 cells)&lt;br /&gt;
             FF FF FF FF - if the string wasn&#039;t used before and follows after the cell description&lt;br /&gt;
             ?? ?? ?? 4? - if an identical string was already used (in another csv). It is some kind of memory offset (pointer). Base address calculation not figured out yet (0x40000072 ?)&lt;br /&gt;
&lt;br /&gt;
-----------  [cell content / strings]&lt;br /&gt;
&lt;br /&gt;
?? ?? .. 00  string + termination (0x00)&lt;br /&gt;
             Number of strings = amount of FF FF FF FFs in table cell description&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[User:CoDEmanX|CoDEmanX]] 01:45, 8 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
--[[User:Daevius|Daevius]] 23:00, 8 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Technical Reference]]&lt;br /&gt;
[[Category:File formats]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- outdated investigations below&lt;br /&gt;
&lt;br /&gt;
=== Shaders ===&lt;br /&gt;
&lt;br /&gt;
05 00 00 00 or&lt;br /&gt;
04 00 00 00&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
9F 00 00 00  size after filename&lt;br /&gt;
&lt;br /&gt;
filename ended with 0x00&lt;br /&gt;
&lt;br /&gt;
(size * 4) bytes of shader data, seems to end with FF FF 00 00&lt;br /&gt;
might contain more data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
filename starts with &#039;,&#039;&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Daevius</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7184</id>
		<title>Call of Duty 4: FastFile Format</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7184"/>
		<updated>2009-12-08T23:04:33Z</updated>

		<summary type="html">&lt;p&gt;Daevius: /* 00 00 00 05 (shader) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Under Construction Small.png‎]] &#039;&#039;&#039;*** Article and investigation in early progress ***&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Preface ==&lt;br /&gt;
&lt;br /&gt;
Be aware, FF files are little endian, so swap those bytes &#039;round!&lt;br /&gt;
&lt;br /&gt;
The data block types (also called &amp;quot;index identifier&amp;quot;) are written in big endian in this article, e.g. 00 00 00 1F is actually 1F 00 00 00 in ff, although ints and floats in the examples are kept little endian!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The global file layout starts with a header. After which you get a string list (model tag names, animation notetracks, maybe more; not always present). Followed by an index list. This list gives information about the rest of the file, which is a concatenation of compiled files (reinterpreted and linked data generated from source files like d3dbsp and stringtables, hereinafter referred to as data blocks).&lt;br /&gt;
&lt;br /&gt;
* Header&lt;br /&gt;
* String list index&lt;br /&gt;
* String list&lt;br /&gt;
* Data block index&lt;br /&gt;
* Data blocks&lt;br /&gt;
&lt;br /&gt;
Each file is separated by the separation key: 0xFFFFFFFF. But be aware, each file itself can also contain such a sequence which is not meant to be the separation key! So it is necessary to understand each data type in the FF file.&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;(Note: not up to date and not generalized)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Byte 0-3: decompressed fastfile size minus 44 (0x2C)&lt;br /&gt;
*Byte 4-7: about the total size of referenced data, e.g. the required memory for IWI textures if material files are in the ff&lt;br /&gt;
*Byte 8-11: &#039;&#039;unknown&#039;&#039;, might be a flag&lt;br /&gt;
*Byte 12-23: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 24-27: somehow related to ff size?&lt;br /&gt;
*Byte 28-43: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 44-47: equal to number of entries in &amp;quot;1st index&amp;quot; and amount of (model tag/joint/notetrack) strings (times 4 for index length)&lt;br /&gt;
*Byte 48-51: separator? (FF FF FF FF)&lt;br /&gt;
*Byte 52-55: number of records* (&amp;quot;2nd index&amp;quot;, times 8 for index length)&lt;br /&gt;
*Byte 56-63: separator? (FF FF FF FF FF FF FF FF)&lt;br /&gt;
*Byte 64-x: string list (xmodelsurfs?) --&amp;gt; not always, depends on the content (required offsets are in the FF header)*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; under re-investigation &amp;lt;!-- If a file was missing on ff compile, it does not count but the error message is added to the end of the file. There are usually more index entries than the number of records in the header. The given number of records is not equal to the entries in the assetinfo or assetlist file, it&#039;s usually higher. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: smallest possible fastfile (mod.ff) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
29 00 00 00  decompressed fastfile size minus 44 &lt;br /&gt;
00 00 00 00  &lt;br /&gt;
1C 00 00 00  unknown&lt;br /&gt;
&lt;br /&gt;
00 00 00 00 00 00 00 00 00 00 00 00&lt;br /&gt;
&lt;br /&gt;
0D 00 00 00  data size in memory (?)&lt;br /&gt;
&lt;br /&gt;
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00&lt;br /&gt;
&lt;br /&gt;
01 00 00 00  one index entry&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF 1F 00 00 00  a rawfile&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  index end&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  start separator&lt;br /&gt;
00 00 00 00  rawfile length (empty, no errors occured during compilation)&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
6D 6F 64 00  fastfile name as rawfile name&lt;br /&gt;
         00  rawfile string (empty)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: mp_backlot_load.ff ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Contains:&#039;&#039;&#039;&lt;br /&gt;
*2x shaders &lt;br /&gt;
*3x materials&lt;br /&gt;
*(1x fastfile name)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Materials:&lt;br /&gt;
# $victorybackdrop - mile_high_victory_screen.iwi (699,092 bytes)&lt;br /&gt;
# $defeatbackdrop - (none)&lt;br /&gt;
# $levelbriefing - loadscreen_mp_backlot.iwi (524,316 bytes)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start of file and header]&lt;br /&gt;
&lt;br /&gt;
71 03 00 00  Decompressed file size - 44 (hex: 371 + 2C = 39D; dec: 881 + 44 = 925)&lt;br /&gt;
&lt;br /&gt;
B8 AA 12 00  Size of both IWI&#039;s the materials in FF point to - 56 (2x28, 28 bytes = IWI header)&lt;br /&gt;
             0x12AAB8          = 1,223,352&lt;br /&gt;
             699,092 + 524,316 = 1,223,408&lt;br /&gt;
             difference:                56&lt;br /&gt;
&lt;br /&gt;
A4 00 00 00  Might be a flag&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
E5 00 00 00  Size of fastfile in memory (that is at least without header and separators, and maybe more)&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
&lt;br /&gt;
-----------  [end of header] (44 bytes), [start of index]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  Unknown, is sometimes FF FF FF FF&lt;br /&gt;
&lt;br /&gt;
06 00 00 00  Number of records in index (6)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  05 00 00 00  1st: shader&lt;br /&gt;
FF FF FF FF  05 00 00 00  2nd: shader&lt;br /&gt;
FF FF FF FF  04 00 00 00  3rd: material&lt;br /&gt;
FF FF FF FF  04 00 00 00  4th: material&lt;br /&gt;
FF FF FF FF  04 00 00 00  5th: material&lt;br /&gt;
FF FF FF FF  1F 00 00 00  6th: rawfile&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  end separator (the following FF FF FF FF is the start seperator of the next data block!)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of index]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Index ==&lt;br /&gt;
&lt;br /&gt;
Starts with an int telling the number of dword couples. Such a couple is composed of 2 ints:&lt;br /&gt;
&lt;br /&gt;
4 byte offset (FF FF FF FF = -1, meaning right after the previous block?)&amp;lt;br&amp;gt;&lt;br /&gt;
4 byte identifier (data block type)&lt;br /&gt;
&lt;br /&gt;
Separator (FF FF FF FF) after last couple&lt;br /&gt;
&lt;br /&gt;
=== Types ===&lt;br /&gt;
&lt;br /&gt;
* 00 00 00 01 - physpreset&lt;br /&gt;
* 00 00 00 02 - xanim&lt;br /&gt;
* 00 00 00 03 - xmodel&lt;br /&gt;
* 00 00 00 04 - material&lt;br /&gt;
* 00 00 00 05 - shader / techset&lt;br /&gt;
* 00 00 00 06 - image?&lt;br /&gt;
* 00 00 00 07 - soundalias (+audio data)&lt;br /&gt;
* 00 00 00 0B - map_ents (d3dbsp)&lt;br /&gt;
* 00 00 00 0C - related to col_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 0E - related to game_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 10 - related to col_map_mp / gfx_map (d3dbsp)&lt;br /&gt;
* 00 00 00 13 - font&lt;br /&gt;
* 00 00 00 14 - menu&lt;br /&gt;
* 00 00 00 16 - localized string asset&lt;br /&gt;
* 00 00 00 17 - physpreset??&lt;br /&gt;
* 00 00 00 19 - fx&lt;br /&gt;
* 00 00 00 1F - raw file&lt;br /&gt;
* 00 00 00 20 - stringtable (comma separated list)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Content ==&lt;br /&gt;
&lt;br /&gt;
Since there is a FF FF FF FF separator in front of every block and none at the very end (after last 1F-block), we can assume that each block has a start separation and no end separation. Thus, any FF FF FF FFs you find after data blocks are actually the start separators of the next block. This means the index end separator is rather FFFFFFFF than FFFFFFFFFFFFFFFF!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 04 (material) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  start separation&lt;br /&gt;
&lt;br /&gt;
00 2B 01 01  First 4 bytes seem to be 4 (unsigned) char&#039;s.&lt;br /&gt;
             1st byte is so far always 0x00 (perhaps it&#039;s a short together with the second byte).&lt;br /&gt;
             2nd byte so far either 0x2B or 0x00, I think this is a length.&lt;br /&gt;
             3rd byte so far 0x01, when 0x00 (all 4) the content is only a number of 0x00&#039;s, then the filename (0x00 termination)&lt;br /&gt;
             4th byte either 0x00 or 0x01. Can be a length or a bool.&lt;br /&gt;
             Then 0x10 bytes of more header.&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
00           When fourth byte is 01, there&#039;s a 0x00 following?             &lt;br /&gt;
             Then there&#039;s garbage (0xFF) and some shorts it looks of length in the second byte.&lt;br /&gt;
             Then more information...&lt;br /&gt;
02 00 0E E0  Often ends with this&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 05 (shader) ===&lt;br /&gt;
&lt;br /&gt;
A shader consists of 3 levels. One, the top level, consists of a header (with a name inside). Then the next level is a pack of shaders, it has a header, shaders and at the end a name. Then the bottom level is the shader itself, it has a header (containing a name of the source file and the length of the data) and the raw shader data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
&lt;br /&gt;
             36 pointers (0x90 bytes) (bytes 0x19 up to 0x22 say if we get any content at all?)&lt;br /&gt;
?? ?? .. 00  Then techset file name (0x00 termination) if pointer is 0xFFFFFFFF?&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader pack]&lt;br /&gt;
&lt;br /&gt;
             pointer&lt;br /&gt;
             1 dword of some character-length options / flags?&lt;br /&gt;
             3 pointers&lt;br /&gt;
             1 dword of some character-length sizes&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
             0x64 bytes of some short length options / flags? If the second pointer above is 0xFFFFFFFF&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader]&lt;br /&gt;
&lt;br /&gt;
             pointer, if not 0xFFFFFFFF, no filename is further on&lt;br /&gt;
             pointer, often 00 00 00 00&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
?? ?? 00 00  2 shorts, first short multiplied by 4 gives the length of the shader, second is a flag?&lt;br /&gt;
?? ?? .. 00  String if first pointer is 0xFFFFFFFF, 0x00 terminated (name of shader source file)&lt;br /&gt;
             Raw shader file (except the first 4 bytes, which, in the shader file, denotes the length of the file)&lt;br /&gt;
FF FF 00 00  which ends with this (always?)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shaders (go back to [start of shader]) or shaders have ended&lt;br /&gt;
&lt;br /&gt;
             Variable length of &#039;stuff&#039; (technique commands?)&lt;br /&gt;
41 10 AB A0  which ends with this (always?)&lt;br /&gt;
?? ?? .. 00  String, 0x00 terminated (technique file name)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader pack]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shader packs (go back to [start of shader pack]) or shader packs have ended&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 06 (image) ===&lt;br /&gt;
&lt;br /&gt;
Stores some information about the specified IWI in fastfile. Does not include the actual image data.&lt;br /&gt;
Length is 52 bytes + IWI name (+1 for string termination).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
             Note: obviously no start separator&lt;br /&gt;
03 00 00 00&lt;br /&gt;
FE FF FF FF  separator?&lt;br /&gt;
00 00 00 00&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
70 55 01 00  IWI size minus 28 (0x1C)&lt;br /&gt;
70 55 01 00  same&lt;br /&gt;
&lt;br /&gt;
00 01 00 01&lt;br /&gt;
01 00 03 00&lt;br /&gt;
FF FF FF FF  separator?&lt;br /&gt;
&lt;br /&gt;
73 70 .. 00  IWI name without file extension (string + termination, variable size)&lt;br /&gt;
&lt;br /&gt;
00 00 00 01&lt;br /&gt;
00 01 01 00&lt;br /&gt;
&lt;br /&gt;
44 58 54 35 00 00 00 00  fixed size char[] for type? (here: DXT5....)&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 16 (localized string asset) ===&lt;br /&gt;
&lt;br /&gt;
A localized string asset consists of an alias name and a translated string. During compilation, it takes the given alias name (REFERENCE) from *.str file and prepands the *.str file&#039;s name in upper-case plus an underscore. Example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;example.str&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;VERSION             &amp;quot;1&amp;quot;&lt;br /&gt;
CONFIG              &amp;quot;C:\trees\cod3\cod3\bin\StringEd.cfg&amp;quot;&lt;br /&gt;
FILENOTES           &amp;quot;&amp;quot;&lt;br /&gt;
//--------------------------------&lt;br /&gt;
&lt;br /&gt;
REFERENCE           MARINES_NAME&lt;br /&gt;
LANG_ENGLISH        &amp;quot;US Airforce&amp;quot;&lt;br /&gt;
&lt;br /&gt;
//--------------------------------&lt;br /&gt;
ENDMARKER&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;mod.ff&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ÿÿÿÿ&lt;br /&gt;
ÿÿÿÿ&lt;br /&gt;
EXAMPLE_MARINES_NAME.&lt;br /&gt;
US Airforce.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Length is 8 bytes + string sizes (string count = 0-2, depends on the first two ints).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
             Note: no start separator!&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  either pointer or FFFFFFFF if the string wasn&#039;t used before&lt;br /&gt;
FF FF FF FF  same. If two pointers are used here, then no strings will follow.&lt;br /&gt;
55 53 .. 00  alias name for the localized&lt;br /&gt;
53 54 .. 00  actual localized string&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 1F (rawfile) ===&lt;br /&gt;
&lt;br /&gt;
A rawfile. Often a rawfile named right after the fastfile&#039;s name is implicitly added. It contains the errors thrown when it was compiling / linking.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  Start separation&lt;br /&gt;
&lt;br /&gt;
64 00 00 00  Length of the file&#039;s content (example: decimal 100; does not count the string termination!)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
&lt;br /&gt;
6D 6F 64 00  File name or if it&#039;s the last 1F-block FastFile name (example: mod.)&lt;br /&gt;
?? ?? .. 00  Plain text content of length above (string, terminated by 0x00)&lt;br /&gt;
&lt;br /&gt;
-----------  [block end OR even end of file]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 20 (stringtable) === &lt;br /&gt;
&lt;br /&gt;
A compiled stringtable (comma separated list, *.csv). Even values are stored as strings.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  start separation&lt;br /&gt;
&lt;br /&gt;
05 00 00 00  (int) columns&lt;br /&gt;
02 00 00 00  (int) rows&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
?? ?? .. 00  filename (path/*.csv) + string termination (0x00)&lt;br /&gt;
&lt;br /&gt;
-----------  [table cell description]&lt;br /&gt;
&lt;br /&gt;
?? ?? ?? ??  columns * rows integers (5 * 2 * 4 = 40 bytes in total, 5 * 2 = 10 cells)&lt;br /&gt;
             FF FF FF FF - if the string wasn&#039;t used before and follows after the cell description&lt;br /&gt;
             ?? ?? ?? 4? - if an identical string was already used (in another csv). It is some kind of memory offset (pointer). Base address calculation not figured out yet (0x40000072 ?)&lt;br /&gt;
&lt;br /&gt;
-----------  [cell content / strings]&lt;br /&gt;
&lt;br /&gt;
?? ?? .. 00  string + termination (0x00)&lt;br /&gt;
             Number of strings = amount of FF FF FF FFs in table cell description&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[User:CoDEmanX|CoDEmanX]] 01:45, 8 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
--[[User:Daevius|Daevius]] 23:00, 8 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Technical Reference]]&lt;br /&gt;
[[Category:File formats]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- outdated investigations below&lt;br /&gt;
&lt;br /&gt;
=== Shaders ===&lt;br /&gt;
&lt;br /&gt;
05 00 00 00 or&lt;br /&gt;
04 00 00 00&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
9F 00 00 00  size after filename&lt;br /&gt;
&lt;br /&gt;
filename ended with 0x00&lt;br /&gt;
&lt;br /&gt;
(size * 4) bytes of shader data, seems to end with FF FF 00 00&lt;br /&gt;
might contain more data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
filename starts with &#039;,&#039;&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Daevius</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7183</id>
		<title>Call of Duty 4: FastFile Format</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7183"/>
		<updated>2009-12-08T23:00:28Z</updated>

		<summary type="html">&lt;p&gt;Daevius: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Under Construction Small.png‎]] &#039;&#039;&#039;*** Article and investigation in early progress ***&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Preface ==&lt;br /&gt;
&lt;br /&gt;
Be aware, FF files are little endian, so swap those bytes &#039;round!&lt;br /&gt;
&lt;br /&gt;
The data block types (also called &amp;quot;index identifier&amp;quot;) are written in big endian in this article, e.g. 00 00 00 1F is actually 1F 00 00 00 in ff, although ints and floats in the examples are kept little endian!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The global file layout starts with a header. After which you get a string list (model tag names, animation notetracks, maybe more; not always present). Followed by an index list. This list gives information about the rest of the file, which is a concatenation of compiled files (reinterpreted and linked data generated from source files like d3dbsp and stringtables, hereinafter referred to as data blocks).&lt;br /&gt;
&lt;br /&gt;
* Header&lt;br /&gt;
* String list index&lt;br /&gt;
* String list&lt;br /&gt;
* Data block index&lt;br /&gt;
* Data blocks&lt;br /&gt;
&lt;br /&gt;
Each file is separated by the separation key: 0xFFFFFFFF. But be aware, each file itself can also contain such a sequence which is not meant to be the separation key! So it is necessary to understand each data type in the FF file.&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;(Note: not up to date and not generalized)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Byte 0-3: decompressed fastfile size minus 44 (0x2C)&lt;br /&gt;
*Byte 4-7: about the total size of referenced data, e.g. the required memory for IWI textures if material files are in the ff&lt;br /&gt;
*Byte 8-11: &#039;&#039;unknown&#039;&#039;, might be a flag&lt;br /&gt;
*Byte 12-23: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 24-27: somehow related to ff size?&lt;br /&gt;
*Byte 28-43: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 44-47: equal to number of entries in &amp;quot;1st index&amp;quot; and amount of (model tag/joint/notetrack) strings (times 4 for index length)&lt;br /&gt;
*Byte 48-51: separator? (FF FF FF FF)&lt;br /&gt;
*Byte 52-55: number of records* (&amp;quot;2nd index&amp;quot;, times 8 for index length)&lt;br /&gt;
*Byte 56-63: separator? (FF FF FF FF FF FF FF FF)&lt;br /&gt;
*Byte 64-x: string list (xmodelsurfs?) --&amp;gt; not always, depends on the content (required offsets are in the FF header)*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; under re-investigation &amp;lt;!-- If a file was missing on ff compile, it does not count but the error message is added to the end of the file. There are usually more index entries than the number of records in the header. The given number of records is not equal to the entries in the assetinfo or assetlist file, it&#039;s usually higher. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: smallest possible fastfile (mod.ff) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
29 00 00 00  decompressed fastfile size minus 44 &lt;br /&gt;
00 00 00 00  &lt;br /&gt;
1C 00 00 00  unknown&lt;br /&gt;
&lt;br /&gt;
00 00 00 00 00 00 00 00 00 00 00 00&lt;br /&gt;
&lt;br /&gt;
0D 00 00 00  data size in memory (?)&lt;br /&gt;
&lt;br /&gt;
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00&lt;br /&gt;
&lt;br /&gt;
01 00 00 00  one index entry&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF 1F 00 00 00  a rawfile&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  index end&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  start separator&lt;br /&gt;
00 00 00 00  rawfile length (empty, no errors occured during compilation)&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
6D 6F 64 00  fastfile name as rawfile name&lt;br /&gt;
         00  rawfile string (empty)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: mp_backlot_load.ff ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Contains:&#039;&#039;&#039;&lt;br /&gt;
*2x shaders &lt;br /&gt;
*3x materials&lt;br /&gt;
*(1x fastfile name)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Materials:&lt;br /&gt;
# $victorybackdrop - mile_high_victory_screen.iwi (699,092 bytes)&lt;br /&gt;
# $defeatbackdrop - (none)&lt;br /&gt;
# $levelbriefing - loadscreen_mp_backlot.iwi (524,316 bytes)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start of file and header]&lt;br /&gt;
&lt;br /&gt;
71 03 00 00  Decompressed file size - 44 (hex: 371 + 2C = 39D; dec: 881 + 44 = 925)&lt;br /&gt;
&lt;br /&gt;
B8 AA 12 00  Size of both IWI&#039;s the materials in FF point to - 56 (2x28, 28 bytes = IWI header)&lt;br /&gt;
             0x12AAB8          = 1,223,352&lt;br /&gt;
             699,092 + 524,316 = 1,223,408&lt;br /&gt;
             difference:                56&lt;br /&gt;
&lt;br /&gt;
A4 00 00 00  Might be a flag&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
E5 00 00 00  Size of fastfile in memory (that is at least without header and separators, and maybe more)&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
&lt;br /&gt;
-----------  [end of header] (44 bytes), [start of index]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  Unknown, is sometimes FF FF FF FF&lt;br /&gt;
&lt;br /&gt;
06 00 00 00  Number of records in index (6)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  05 00 00 00  1st: shader&lt;br /&gt;
FF FF FF FF  05 00 00 00  2nd: shader&lt;br /&gt;
FF FF FF FF  04 00 00 00  3rd: material&lt;br /&gt;
FF FF FF FF  04 00 00 00  4th: material&lt;br /&gt;
FF FF FF FF  04 00 00 00  5th: material&lt;br /&gt;
FF FF FF FF  1F 00 00 00  6th: rawfile&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  end separator (the following FF FF FF FF is the start seperator of the next data block!)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of index]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Index ==&lt;br /&gt;
&lt;br /&gt;
Starts with an int telling the number of dword couples. Such a couple is composed of 2 ints:&lt;br /&gt;
&lt;br /&gt;
4 byte offset (FF FF FF FF = -1, meaning right after the previous block?)&amp;lt;br&amp;gt;&lt;br /&gt;
4 byte identifier (data block type)&lt;br /&gt;
&lt;br /&gt;
Separator (FF FF FF FF) after last couple&lt;br /&gt;
&lt;br /&gt;
=== Types ===&lt;br /&gt;
&lt;br /&gt;
* 00 00 00 01 - physpreset&lt;br /&gt;
* 00 00 00 02 - xanim&lt;br /&gt;
* 00 00 00 03 - xmodel&lt;br /&gt;
* 00 00 00 04 - material&lt;br /&gt;
* 00 00 00 05 - shader / techset&lt;br /&gt;
* 00 00 00 06 - image?&lt;br /&gt;
* 00 00 00 07 - soundalias (+audio data)&lt;br /&gt;
* 00 00 00 0B - map_ents (d3dbsp)&lt;br /&gt;
* 00 00 00 0C - related to col_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 0E - related to game_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 10 - related to col_map_mp / gfx_map (d3dbsp)&lt;br /&gt;
* 00 00 00 13 - font&lt;br /&gt;
* 00 00 00 14 - menu&lt;br /&gt;
* 00 00 00 16 - localized string asset&lt;br /&gt;
* 00 00 00 17 - physpreset??&lt;br /&gt;
* 00 00 00 19 - fx&lt;br /&gt;
* 00 00 00 1F - raw file&lt;br /&gt;
* 00 00 00 20 - stringtable (comma separated list)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Content ==&lt;br /&gt;
&lt;br /&gt;
Since there is a FF FF FF FF separator in front of every block and none at the very end (after last 1F-block), we can assume that each block has a start separation and no end separation. Thus, any FF FF FF FFs you find after data blocks are actually the start separators of the next block. This means the index end separator is rather FFFFFFFF than FFFFFFFFFFFFFFFF!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 04 (material) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  start separation&lt;br /&gt;
&lt;br /&gt;
00 2B 01 01  First 4 bytes seem to be 4 (unsigned) char&#039;s.&lt;br /&gt;
             1st byte is so far always 0x00 (perhaps it&#039;s a short together with the second byte).&lt;br /&gt;
             2nd byte so far either 0x2B or 0x00, I think this is a length.&lt;br /&gt;
             3rd byte so far 0x01, when 0x00 (all 4) the content is only a number of 0x00&#039;s, then the filename (0x00 termination)&lt;br /&gt;
             4th byte either 0x00 or 0x01. Can be a length or a bool.&lt;br /&gt;
             Then 0x10 bytes of more header.&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
00           When fourth byte is 01, there&#039;s a 0x00 following?             &lt;br /&gt;
             Then there&#039;s garbage (0xFF) and some shorts it looks of length in the second byte.&lt;br /&gt;
             Then more information...&lt;br /&gt;
02 00 0E E0  Often ends with this&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 05 (shader) ===&lt;br /&gt;
&lt;br /&gt;
A shader consists of 3 levels. One, the top level, consists of a header (with a name inside). Then the next level is a pack of shaders, it has a header, shaders and at the end a name. Then the bottom level is the shader itself, it has a header (containing a name of the source file and the length of the data) and the raw shader data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  Start separation&lt;br /&gt;
&lt;br /&gt;
             36 pointers (0x90 bytes) (bytes 0x19 up to 0x22 say if we get any content at all?)&lt;br /&gt;
?? ?? .. 00  Then techset file name (0x00 termination) if pointer is 0xFFFFFFFF?&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader pack]&lt;br /&gt;
&lt;br /&gt;
             pointer&lt;br /&gt;
             1 dword of some character-length options / flags?&lt;br /&gt;
             3 pointers&lt;br /&gt;
             1 dword of some character-length sizes&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
             0x64 bytes of some short length options / flags? If the second pointer above is 0xFFFFFFFF&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader]&lt;br /&gt;
&lt;br /&gt;
             pointer, if not 0xFFFFFFFF, no filename is further on&lt;br /&gt;
             pointer, often 00 00 00 00&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
?? ?? 00 00  2 shorts, first short multiplied by 4 gives the length of the shader, second is a flag?&lt;br /&gt;
?? ?? .. 00  String if first pointer is 0xFFFFFFFF, 0x00 terminated (name of shader source file)&lt;br /&gt;
             Raw shader file (except the first 4 bytes, which, in the shader file, denotes the length of the file)&lt;br /&gt;
FF FF 00 00  which ends with this (always?)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shaders (go back to [start of shader]) or shaders have ended&lt;br /&gt;
&lt;br /&gt;
             Variable length of &#039;stuff&#039; (technique commands?)&lt;br /&gt;
41 10 AB A0  which ends with this (always?)&lt;br /&gt;
?? ?? .. 00  String, 0x00 terminated (technique file name)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader pack]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shader packs (go back to [start of shader pack]) or shader packs have ended&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 06 (image) ===&lt;br /&gt;
&lt;br /&gt;
Stores some information about the specified IWI in fastfile. Does not include the actual image data.&lt;br /&gt;
Length is 52 bytes + IWI name (+1 for string termination).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
             Note: obviously no start separator&lt;br /&gt;
03 00 00 00&lt;br /&gt;
FE FF FF FF  separator?&lt;br /&gt;
00 00 00 00&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
70 55 01 00  IWI size minus 28 (0x1C)&lt;br /&gt;
70 55 01 00  same&lt;br /&gt;
&lt;br /&gt;
00 01 00 01&lt;br /&gt;
01 00 03 00&lt;br /&gt;
FF FF FF FF  separator?&lt;br /&gt;
&lt;br /&gt;
73 70 .. 00  IWI name without file extension (string + termination, variable size)&lt;br /&gt;
&lt;br /&gt;
00 00 00 01&lt;br /&gt;
00 01 01 00&lt;br /&gt;
&lt;br /&gt;
44 58 54 35 00 00 00 00  fixed size char[] for type? (here: DXT5....)&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 16 (localized string asset) ===&lt;br /&gt;
&lt;br /&gt;
A localized string asset consists of an alias name and a translated string. During compilation, it takes the given alias name (REFERENCE) from *.str file and prepands the *.str file&#039;s name in upper-case plus an underscore. Example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;example.str&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;VERSION             &amp;quot;1&amp;quot;&lt;br /&gt;
CONFIG              &amp;quot;C:\trees\cod3\cod3\bin\StringEd.cfg&amp;quot;&lt;br /&gt;
FILENOTES           &amp;quot;&amp;quot;&lt;br /&gt;
//--------------------------------&lt;br /&gt;
&lt;br /&gt;
REFERENCE           MARINES_NAME&lt;br /&gt;
LANG_ENGLISH        &amp;quot;US Airforce&amp;quot;&lt;br /&gt;
&lt;br /&gt;
//--------------------------------&lt;br /&gt;
ENDMARKER&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;mod.ff&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ÿÿÿÿ&lt;br /&gt;
ÿÿÿÿ&lt;br /&gt;
EXAMPLE_MARINES_NAME.&lt;br /&gt;
US Airforce.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Length is 8 bytes + string sizes (string count = 0-2, depends on the first two ints).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
             Note: no start separator!&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  either pointer or FFFFFFFF if the string wasn&#039;t used before&lt;br /&gt;
FF FF FF FF  same. If two pointers are used here, then no strings will follow.&lt;br /&gt;
55 53 .. 00  alias name for the localized&lt;br /&gt;
53 54 .. 00  actual localized string&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 1F (rawfile) ===&lt;br /&gt;
&lt;br /&gt;
A rawfile. Often a rawfile named right after the fastfile&#039;s name is implicitly added. It contains the errors thrown when it was compiling / linking.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  Start separation&lt;br /&gt;
&lt;br /&gt;
64 00 00 00  Length of the file&#039;s content (example: decimal 100; does not count the string termination!)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
&lt;br /&gt;
6D 6F 64 00  File name or if it&#039;s the last 1F-block FastFile name (example: mod.)&lt;br /&gt;
?? ?? .. 00  Plain text content of length above (string, terminated by 0x00)&lt;br /&gt;
&lt;br /&gt;
-----------  [block end OR even end of file]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 20 (stringtable) === &lt;br /&gt;
&lt;br /&gt;
A compiled stringtable (comma separated list, *.csv). Even values are stored as strings.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  start separation&lt;br /&gt;
&lt;br /&gt;
05 00 00 00  (int) columns&lt;br /&gt;
02 00 00 00  (int) rows&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
?? ?? .. 00  filename (path/*.csv) + string termination (0x00)&lt;br /&gt;
&lt;br /&gt;
-----------  [table cell description]&lt;br /&gt;
&lt;br /&gt;
?? ?? ?? ??  columns * rows integers (5 * 2 * 4 = 40 bytes in total, 5 * 2 = 10 cells)&lt;br /&gt;
             FF FF FF FF - if the string wasn&#039;t used before and follows after the cell description&lt;br /&gt;
             ?? ?? ?? 4? - if an identical string was already used (in another csv). It is some kind of memory offset (pointer). Base address calculation not figured out yet (0x40000072 ?)&lt;br /&gt;
&lt;br /&gt;
-----------  [cell content / strings]&lt;br /&gt;
&lt;br /&gt;
?? ?? .. 00  string + termination (0x00)&lt;br /&gt;
             Number of strings = amount of FF FF FF FFs in table cell description&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[User:CoDEmanX|CoDEmanX]] 01:45, 8 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
--[[User:Daevius|Daevius]] 23:00, 8 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Technical Reference]]&lt;br /&gt;
[[Category:File formats]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- outdated investigations below&lt;br /&gt;
&lt;br /&gt;
=== Shaders ===&lt;br /&gt;
&lt;br /&gt;
05 00 00 00 or&lt;br /&gt;
04 00 00 00&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
9F 00 00 00  size after filename&lt;br /&gt;
&lt;br /&gt;
filename ended with 0x00&lt;br /&gt;
&lt;br /&gt;
(size * 4) bytes of shader data, seems to end with FF FF 00 00&lt;br /&gt;
might contain more data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
filename starts with &#039;,&#039;&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Daevius</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7182</id>
		<title>Call of Duty 4: FastFile Format</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7182"/>
		<updated>2009-12-08T20:19:27Z</updated>

		<summary type="html">&lt;p&gt;Daevius: /* 00 00 00 05 (shader) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Under Construction Small.png‎]] &#039;&#039;&#039;*** Article and investigation in early progress ***&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Preface ==&lt;br /&gt;
&lt;br /&gt;
Be aware, FF files are little endian, so swap those bytes &#039;round!&lt;br /&gt;
&lt;br /&gt;
The data block types (also called &amp;quot;index identifier&amp;quot;) are written in big endian in this article, e.g. 00 00 00 1F is actually 1F 00 00 00 in ff, although ints and floats in the examples are kept little endian!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The global file layout starts with a header. After which you get a string list (model tag names, animation notetracks, maybe more; not always present). Followed by an index list. This list gives information about the rest of the file, which is a concatenation of compiled files (reinterpreted and linked data generated from source files like d3dbsp and stringtables, hereinafter referred to as data blocks).&lt;br /&gt;
&lt;br /&gt;
* Header&lt;br /&gt;
* String list index&lt;br /&gt;
* String list&lt;br /&gt;
* Data block index&lt;br /&gt;
* Data blocks&lt;br /&gt;
&lt;br /&gt;
Each file is separated by the separation key: 0xFFFFFFFF. But be aware, each file itself can also contain such a sequence which is not meant to be the separation key! So it is necessary to understand each data type in the FF file.&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;(Note: not up to date and not generalized)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Byte 0-3: decompressed fastfile size minus 44 (0x2C)&lt;br /&gt;
*Byte 4-7: about the total size of referenced data, e.g. the required memory for IWI textures if material files are in the ff&lt;br /&gt;
*Byte 8-11: &#039;&#039;unknown&#039;&#039;, might be a flag&lt;br /&gt;
*Byte 12-23: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 24-27: somehow related to ff size?&lt;br /&gt;
*Byte 28-43: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 44-47: equal to number of entries in &amp;quot;1st index&amp;quot; and amount of (model tag/joint/notetrack) strings (times 4 for index length)&lt;br /&gt;
*Byte 48-51: separator? (FF FF FF FF)&lt;br /&gt;
*Byte 52-55: number of records* (&amp;quot;2nd index&amp;quot;, times 8 for index length)&lt;br /&gt;
*Byte 56-63: separator? (FF FF FF FF FF FF FF FF)&lt;br /&gt;
*Byte 64-x: string list (xmodelsurfs?) --&amp;gt; not always, depends on the content (required offsets are in the FF header)*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; under re-investigation &amp;lt;!-- If a file was missing on ff compile, it does not count but the error message is added to the end of the file. There are usually more index entries than the number of records in the header. The given number of records is not equal to the entries in the assetinfo or assetlist file, it&#039;s usually higher. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: smallest possible fastfile (mod.ff) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
29 00 00 00  decompressed fastfile size minus 44 &lt;br /&gt;
00 00 00 00  &lt;br /&gt;
1C 00 00 00  unknown&lt;br /&gt;
&lt;br /&gt;
00 00 00 00 00 00 00 00 00 00 00 00&lt;br /&gt;
&lt;br /&gt;
0D 00 00 00  data size in memory (?)&lt;br /&gt;
&lt;br /&gt;
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00&lt;br /&gt;
&lt;br /&gt;
01 00 00 00  one index entry&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF 1F 00 00 00  a rawfile&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  index end&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  start separator&lt;br /&gt;
00 00 00 00  rawfile length (empty, no errors occured during compilation)&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
6D 6F 64 00  fastfile name as rawfile name&lt;br /&gt;
         00  rawfile string (empty)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: mp_backlot_load.ff ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Contains:&#039;&#039;&#039;&lt;br /&gt;
*2x shaders &lt;br /&gt;
*3x materials&lt;br /&gt;
*(1x fastfile name)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Materials:&lt;br /&gt;
# $victorybackdrop - mile_high_victory_screen.iwi (699,092 bytes)&lt;br /&gt;
# $defeatbackdrop - (none)&lt;br /&gt;
# $levelbriefing - loadscreen_mp_backlot.iwi (524,316 bytes)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start of file and header]&lt;br /&gt;
&lt;br /&gt;
71 03 00 00  Decompressed file size - 44 (hex: 371 + 2C = 39D; dec: 881 + 44 = 925)&lt;br /&gt;
&lt;br /&gt;
B8 AA 12 00  Size of both IWI&#039;s the materials in FF point to - 56 (2x28, 28 bytes = IWI header)&lt;br /&gt;
             0x12AAB8          = 1,223,352&lt;br /&gt;
             699,092 + 524,316 = 1,223,408&lt;br /&gt;
             difference:                56&lt;br /&gt;
&lt;br /&gt;
A4 00 00 00  Might be a flag&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
E5 00 00 00  Size of fastfile in memory (that is at least without header and separators, and maybe more)&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
&lt;br /&gt;
-----------  [end of header] (44 bytes), [start of index]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  Unknown, is sometimes FF FF FF FF&lt;br /&gt;
&lt;br /&gt;
06 00 00 00  Number of records in index (6)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  05 00 00 00  1st: shader&lt;br /&gt;
FF FF FF FF  05 00 00 00  2nd: shader&lt;br /&gt;
FF FF FF FF  04 00 00 00  3rd: material&lt;br /&gt;
FF FF FF FF  04 00 00 00  4th: material&lt;br /&gt;
FF FF FF FF  04 00 00 00  5th: material&lt;br /&gt;
FF FF FF FF  1F 00 00 00  6th: rawfile&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  end separator (the following FF FF FF FF is the start seperator of the next data block!)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of index]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Index ==&lt;br /&gt;
&lt;br /&gt;
Starts with an int telling the number of dword couples. Such a couple is composed of 2 ints:&lt;br /&gt;
&lt;br /&gt;
4 byte offset (FF FF FF FF = -1, meaning right after the previous block?)&amp;lt;br&amp;gt;&lt;br /&gt;
4 byte identifier (data block type)&lt;br /&gt;
&lt;br /&gt;
Separator (FF FF FF FF) after last couple&lt;br /&gt;
&lt;br /&gt;
=== Types ===&lt;br /&gt;
&lt;br /&gt;
* 00 00 00 01 - physpreset&lt;br /&gt;
* 00 00 00 02 - xanim&lt;br /&gt;
* 00 00 00 03 - xmodel&lt;br /&gt;
* 00 00 00 04 - material&lt;br /&gt;
* 00 00 00 05 - shader / techset&lt;br /&gt;
* 00 00 00 06 - image?&lt;br /&gt;
* 00 00 00 07 - soundalias (+audio data)&lt;br /&gt;
* 00 00 00 0B - map_ents (d3dbsp)&lt;br /&gt;
* 00 00 00 0C - related to col_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 0E - related to game_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 10 - related to col_map_mp / gfx_map (d3dbsp)&lt;br /&gt;
* 00 00 00 13 - font&lt;br /&gt;
* 00 00 00 14 - menu&lt;br /&gt;
* 00 00 00 16 - localized string asset&lt;br /&gt;
* 00 00 00 17 - physpreset??&lt;br /&gt;
* 00 00 00 19 - fx&lt;br /&gt;
* 00 00 00 1F - raw file&lt;br /&gt;
* 00 00 00 20 - stringtable (comma separated list)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Content ==&lt;br /&gt;
&lt;br /&gt;
Since there is a FF FF FF FF separator in front of every block and none at the very end (after last 1F-block), we can assume that each block has a start separation and no end separation. Thus, any FF FF FF FFs you find after data blocks are actually the start separators of the next block. This means the index end separator is rather FFFFFFFF than FFFFFFFFFFFFFFFF!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 04 (material) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  start separation&lt;br /&gt;
&lt;br /&gt;
00 2B 01 01  First 4 bytes seem to be 4 (unsigned) char&#039;s.&lt;br /&gt;
             1st byte is so far always 0x00 (perhaps it&#039;s a short together with the second byte).&lt;br /&gt;
             2nd byte so far either 0x2B or 0x00, I think this is a length.&lt;br /&gt;
             3rd byte so far 0x01, when 0x00 (all 4) the content is only a number of 0x00&#039;s, then the filename (0x00 termination)&lt;br /&gt;
             4th byte either 0x00 or 0x01. Can be a length or a bool.&lt;br /&gt;
             Then 0x10 bytes of more header.&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
00           When fourth byte is 01, there&#039;s a 0x00 following?             &lt;br /&gt;
             Then there&#039;s garbage (0xFF) and some shorts it looks of length in the second byte.&lt;br /&gt;
             Then more information...&lt;br /&gt;
02 00 0E E0  Often ends with this&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 05 (shader) ===&lt;br /&gt;
&lt;br /&gt;
A shader consists of 3 levels. One, the top level, consists of a header (with a name inside). Then the next level is a pack of shaders, it has a header, shaders and at the end a name. Then the bottom level is the shader itself, it has a header (containing a name of the source file and the length of the data) and the raw shader data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  Start separation&lt;br /&gt;
&lt;br /&gt;
             36 pointers (0x90 bytes) (bytes 0x19 up to 0x22 say if we get any content at all?)&lt;br /&gt;
?? ?? .. 00  Then techset file name (0x00 termination) if pointer is 0xFFFFFFFF?&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader pack]&lt;br /&gt;
&lt;br /&gt;
             pointer&lt;br /&gt;
             1 dword of some character-length options / flags?&lt;br /&gt;
             3 pointers&lt;br /&gt;
             1 dword of some character-length sizes&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
             0x64 bytes of some short length options / flags? If the second pointer above is 0xFFFFFFFF&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader]&lt;br /&gt;
&lt;br /&gt;
             pointer, if not 0xFFFFFFFF, no filename is further on&lt;br /&gt;
             pointer, often 00 00 00 00&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
?? ?? 00 00  2 shorts, first short multiplied by 4 gives the length of the shader, second is a flag?&lt;br /&gt;
?? ?? .. 00  String if first pointer is 0xFFFFFFFF, 0x00 terminated (name of shader source file)&lt;br /&gt;
             Raw shader file (except the first 4 bytes, which, in the shader file, denotes the length of the file)&lt;br /&gt;
FF FF 00 00  which ends with this (always?)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shaders (go back to [start of shader]) or shaders have ended&lt;br /&gt;
&lt;br /&gt;
             Variable length of &#039;stuff&#039; (technique commands?)&lt;br /&gt;
41 10 AB A0  which ends with this (always?)&lt;br /&gt;
?? ?? .. 00  String, 0x00 terminated (technique file name)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader pack]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shader packs (go back to [start of shader pack]) or shader packs have ended&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 06 (image) ===&lt;br /&gt;
&lt;br /&gt;
Stores some information about the specified IWI in fastfile. Does not include the actual image data.&lt;br /&gt;
Length is 52 bytes + IWI name (+1 for string termination).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
             Note: obviously no start separator&lt;br /&gt;
03 00 00 00&lt;br /&gt;
FE FF FF FF  separator?&lt;br /&gt;
00 00 00 00&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
70 55 01 00  IWI size minus 28 (0x1C)&lt;br /&gt;
70 55 01 00  same&lt;br /&gt;
&lt;br /&gt;
00 01 00 01&lt;br /&gt;
01 00 03 00&lt;br /&gt;
FF FF FF FF  separator?&lt;br /&gt;
&lt;br /&gt;
73 70 .. 00  IWI name without file extension (string + termination, variable size)&lt;br /&gt;
&lt;br /&gt;
00 00 00 01&lt;br /&gt;
00 01 01 00&lt;br /&gt;
&lt;br /&gt;
44 58 54 35 00 00 00 00  fixed size char[] for type? (here: DXT5....)&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 16 (localized string asset) ===&lt;br /&gt;
&lt;br /&gt;
A localized string asset consists of an alias name and a translated string. During compilation, it takes the given alias name (REFERENCE) from *.str file and prepands the *.str file&#039;s name in upper-case plus an underscore. Example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;example.str&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;VERSION             &amp;quot;1&amp;quot;&lt;br /&gt;
CONFIG              &amp;quot;C:\trees\cod3\cod3\bin\StringEd.cfg&amp;quot;&lt;br /&gt;
FILENOTES           &amp;quot;&amp;quot;&lt;br /&gt;
//--------------------------------&lt;br /&gt;
&lt;br /&gt;
REFERENCE           MARINES_NAME&lt;br /&gt;
LANG_ENGLISH        &amp;quot;US Airforce&amp;quot;&lt;br /&gt;
&lt;br /&gt;
//--------------------------------&lt;br /&gt;
ENDMARKER&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;mod.ff&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ÿÿÿÿ&lt;br /&gt;
ÿÿÿÿ&lt;br /&gt;
EXAMPLE_MARINES_NAME.&lt;br /&gt;
US Airforce.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Length is 8 bytes + string sizes (string count = 0-2, depends on the first two ints).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
             Note: no start separator!&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  either pointer or FFFFFFFF if the string wasn&#039;t used before&lt;br /&gt;
FF FF FF FF  same. If two pointers are used here, then no strings will follow.&lt;br /&gt;
55 53 .. 00  alias name for the localized&lt;br /&gt;
53 54 .. 00  actual localized string&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 1F (rawfile) ===&lt;br /&gt;
&lt;br /&gt;
A rawfile. Often a rawfile named right after the fastfile&#039;s name is implicitly added. It contains the errors thrown when it was compiling / linking.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  Start separation&lt;br /&gt;
&lt;br /&gt;
64 00 00 00  Length of the file&#039;s content (example: decimal 100; does not count the string termination!)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
&lt;br /&gt;
6D 6F 64 00  File name or if it&#039;s the last 1F-block FastFile name (example: mod.)&lt;br /&gt;
?? ?? .. 00  Plain text content of length above (string, terminated by 0x00)&lt;br /&gt;
&lt;br /&gt;
-----------  [block end OR even end of file]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 20 (stringtable) === &lt;br /&gt;
&lt;br /&gt;
A compiled stringtable (comma separated list, *.csv). Even values are stored as strings.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  start separation&lt;br /&gt;
&lt;br /&gt;
05 00 00 00  (int) columns&lt;br /&gt;
02 00 00 00  (int) rows&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
?? ?? .. 00  filename (path/*.csv) + string termination (0x00)&lt;br /&gt;
&lt;br /&gt;
-----------  [table cell description]&lt;br /&gt;
&lt;br /&gt;
?? ?? ?? ??  columns * rows integers (5 * 2 * 4 = 40 bytes in total, 5 * 2 = 10 cells)&lt;br /&gt;
             FF FF FF FF - if the string wasn&#039;t used before and follows after the cell description&lt;br /&gt;
             ?? ?? ?? 4? - if an identical string was already used (in another csv). It is some kind of memory offset (pointer). Base address calculation not figured out yet (0x40000072 ?)&lt;br /&gt;
&lt;br /&gt;
-----------  [cell content / strings]&lt;br /&gt;
&lt;br /&gt;
?? ?? .. 00  string + termination (0x00)&lt;br /&gt;
             Number of strings = amount of FF FF FF FFs in table cell description&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[User:CoDEmanX|CoDEmanX]] 01:45, 8 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
--[[User:Daevius|Daevius]] 14:24, 5 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Technical Reference]]&lt;br /&gt;
[[Category:File formats]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- outdated investigations below&lt;br /&gt;
&lt;br /&gt;
=== Shaders ===&lt;br /&gt;
&lt;br /&gt;
05 00 00 00 or&lt;br /&gt;
04 00 00 00&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
9F 00 00 00  size after filename&lt;br /&gt;
&lt;br /&gt;
filename ended with 0x00&lt;br /&gt;
&lt;br /&gt;
(size * 4) bytes of shader data, seems to end with FF FF 00 00&lt;br /&gt;
might contain more data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
filename starts with &#039;,&#039;&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Daevius</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7181</id>
		<title>Call of Duty 4: FastFile Format</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7181"/>
		<updated>2009-12-08T20:17:37Z</updated>

		<summary type="html">&lt;p&gt;Daevius: /* 00 00 00 05 (shader) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Under Construction Small.png‎]] &#039;&#039;&#039;*** Article and investigation in early progress ***&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Preface ==&lt;br /&gt;
&lt;br /&gt;
Be aware, FF files are little endian, so swap those bytes &#039;round!&lt;br /&gt;
&lt;br /&gt;
The data block types (also called &amp;quot;index identifier&amp;quot;) are written in big endian in this article, e.g. 00 00 00 1F is actually 1F 00 00 00 in ff, although ints and floats in the examples are kept little endian!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The global file layout starts with a header. After which you get a string list (model tag names, animation notetracks, maybe more; not always present). Followed by an index list. This list gives information about the rest of the file, which is a concatenation of compiled files (reinterpreted and linked data generated from source files like d3dbsp and stringtables, hereinafter referred to as data blocks).&lt;br /&gt;
&lt;br /&gt;
* Header&lt;br /&gt;
* String list index&lt;br /&gt;
* String list&lt;br /&gt;
* Data block index&lt;br /&gt;
* Data blocks&lt;br /&gt;
&lt;br /&gt;
Each file is separated by the separation key: 0xFFFFFFFF. But be aware, each file itself can also contain such a sequence which is not meant to be the separation key! So it is necessary to understand each data type in the FF file.&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;(Note: not up to date and not generalized)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Byte 0-3: decompressed fastfile size minus 44 (0x2C)&lt;br /&gt;
*Byte 4-7: about the total size of referenced data, e.g. the required memory for IWI textures if material files are in the ff&lt;br /&gt;
*Byte 8-11: &#039;&#039;unknown&#039;&#039;, might be a flag&lt;br /&gt;
*Byte 12-23: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 24-27: somehow related to ff size?&lt;br /&gt;
*Byte 28-43: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 44-47: equal to number of entries in &amp;quot;1st index&amp;quot; and amount of (model tag/joint/notetrack) strings (times 4 for index length)&lt;br /&gt;
*Byte 48-51: separator? (FF FF FF FF)&lt;br /&gt;
*Byte 52-55: number of records* (&amp;quot;2nd index&amp;quot;, times 8 for index length)&lt;br /&gt;
*Byte 56-63: separator? (FF FF FF FF FF FF FF FF)&lt;br /&gt;
*Byte 64-x: string list (xmodelsurfs?) --&amp;gt; not always, depends on the content (required offsets are in the FF header)*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; under re-investigation &amp;lt;!-- If a file was missing on ff compile, it does not count but the error message is added to the end of the file. There are usually more index entries than the number of records in the header. The given number of records is not equal to the entries in the assetinfo or assetlist file, it&#039;s usually higher. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: smallest possible fastfile (mod.ff) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
29 00 00 00  decompressed fastfile size minus 44 &lt;br /&gt;
00 00 00 00  &lt;br /&gt;
1C 00 00 00  unknown&lt;br /&gt;
&lt;br /&gt;
00 00 00 00 00 00 00 00 00 00 00 00&lt;br /&gt;
&lt;br /&gt;
0D 00 00 00  data size in memory (?)&lt;br /&gt;
&lt;br /&gt;
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00&lt;br /&gt;
&lt;br /&gt;
01 00 00 00  one index entry&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF 1F 00 00 00  a rawfile&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  index end&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  start separator&lt;br /&gt;
00 00 00 00  rawfile length (empty, no errors occured during compilation)&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
6D 6F 64 00  fastfile name as rawfile name&lt;br /&gt;
         00  rawfile string (empty)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: mp_backlot_load.ff ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Contains:&#039;&#039;&#039;&lt;br /&gt;
*2x shaders &lt;br /&gt;
*3x materials&lt;br /&gt;
*(1x fastfile name)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Materials:&lt;br /&gt;
# $victorybackdrop - mile_high_victory_screen.iwi (699,092 bytes)&lt;br /&gt;
# $defeatbackdrop - (none)&lt;br /&gt;
# $levelbriefing - loadscreen_mp_backlot.iwi (524,316 bytes)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start of file and header]&lt;br /&gt;
&lt;br /&gt;
71 03 00 00  Decompressed file size - 44 (hex: 371 + 2C = 39D; dec: 881 + 44 = 925)&lt;br /&gt;
&lt;br /&gt;
B8 AA 12 00  Size of both IWI&#039;s the materials in FF point to - 56 (2x28, 28 bytes = IWI header)&lt;br /&gt;
             0x12AAB8          = 1,223,352&lt;br /&gt;
             699,092 + 524,316 = 1,223,408&lt;br /&gt;
             difference:                56&lt;br /&gt;
&lt;br /&gt;
A4 00 00 00  Might be a flag&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
E5 00 00 00  Size of fastfile in memory (that is at least without header and separators, and maybe more)&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
&lt;br /&gt;
-----------  [end of header] (44 bytes), [start of index]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  Unknown, is sometimes FF FF FF FF&lt;br /&gt;
&lt;br /&gt;
06 00 00 00  Number of records in index (6)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  05 00 00 00  1st: shader&lt;br /&gt;
FF FF FF FF  05 00 00 00  2nd: shader&lt;br /&gt;
FF FF FF FF  04 00 00 00  3rd: material&lt;br /&gt;
FF FF FF FF  04 00 00 00  4th: material&lt;br /&gt;
FF FF FF FF  04 00 00 00  5th: material&lt;br /&gt;
FF FF FF FF  1F 00 00 00  6th: rawfile&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  end separator (the following FF FF FF FF is the start seperator of the next data block!)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of index]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Index ==&lt;br /&gt;
&lt;br /&gt;
Starts with an int telling the number of dword couples. Such a couple is composed of 2 ints:&lt;br /&gt;
&lt;br /&gt;
4 byte offset (FF FF FF FF = -1, meaning right after the previous block?)&amp;lt;br&amp;gt;&lt;br /&gt;
4 byte identifier (data block type)&lt;br /&gt;
&lt;br /&gt;
Separator (FF FF FF FF) after last couple&lt;br /&gt;
&lt;br /&gt;
=== Types ===&lt;br /&gt;
&lt;br /&gt;
* 00 00 00 01 - physpreset&lt;br /&gt;
* 00 00 00 02 - xanim&lt;br /&gt;
* 00 00 00 03 - xmodel&lt;br /&gt;
* 00 00 00 04 - material&lt;br /&gt;
* 00 00 00 05 - shader / techset&lt;br /&gt;
* 00 00 00 06 - image?&lt;br /&gt;
* 00 00 00 07 - soundalias (+audio data)&lt;br /&gt;
* 00 00 00 0B - map_ents (d3dbsp)&lt;br /&gt;
* 00 00 00 0C - related to col_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 0E - related to game_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 10 - related to col_map_mp / gfx_map (d3dbsp)&lt;br /&gt;
* 00 00 00 13 - font&lt;br /&gt;
* 00 00 00 14 - menu&lt;br /&gt;
* 00 00 00 16 - localized string asset&lt;br /&gt;
* 00 00 00 17 - physpreset??&lt;br /&gt;
* 00 00 00 19 - fx&lt;br /&gt;
* 00 00 00 1F - raw file&lt;br /&gt;
* 00 00 00 20 - stringtable (comma separated list)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Content ==&lt;br /&gt;
&lt;br /&gt;
Since there is a FF FF FF FF separator in front of every block and none at the very end (after last 1F-block), we can assume that each block has a start separation and no end separation. Thus, any FF FF FF FFs you find after data blocks are actually the start separators of the next block. This means the index end separator is rather FFFFFFFF than FFFFFFFFFFFFFFFF!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 04 (material) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  start separation&lt;br /&gt;
&lt;br /&gt;
00 2B 01 01  First 4 bytes seem to be 4 (unsigned) char&#039;s.&lt;br /&gt;
             1st byte is so far always 0x00 (perhaps it&#039;s a short together with the second byte).&lt;br /&gt;
             2nd byte so far either 0x2B or 0x00, I think this is a length.&lt;br /&gt;
             3rd byte so far 0x01, when 0x00 (all 4) the content is only a number of 0x00&#039;s, then the filename (0x00 termination)&lt;br /&gt;
             4th byte either 0x00 or 0x01. Can be a length or a bool.&lt;br /&gt;
             Then 0x10 bytes of more header.&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
00           When fourth byte is 01, there&#039;s a 0x00 following?             &lt;br /&gt;
             Then there&#039;s garbage (0xFF) and some shorts it looks of length in the second byte.&lt;br /&gt;
             Then more information...&lt;br /&gt;
02 00 0E E0  Often ends with this&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 05 (shader) ===&lt;br /&gt;
&lt;br /&gt;
A shader consists of 3 levels. One, the top level, consists of a header (with a name inside). Then the next level is a pack of shaders, it has a header, shaders and at the end a name. Then the bottom level is the shader itself, it has a header (containing a name of the source file and the length of the data) and the raw shader data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  Start separation&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--00 00 00 00  0x18 bytes of 0x00&lt;br /&gt;
FF FF FF FF  Or 0x00000000 (if no content further on)&lt;br /&gt;
00 00 00 00  0x74 bytes which are often 0x00--&amp;gt;&lt;br /&gt;
             36 pointers (0x90 bytes)&lt;br /&gt;
?? ?? .. 00  Then techset file name (0x00 termination) if pointer is 0xFFFFFFFF?&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader pack]&lt;br /&gt;
&lt;br /&gt;
             pointer&lt;br /&gt;
             1 dword of some character-length options / flags?&lt;br /&gt;
             3 pointers&lt;br /&gt;
             1 dword of some character-length sizes&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
             0x64 bytes of some short length options / flags? If the second pointer above is 0xFFFFFFFF&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader]&lt;br /&gt;
&lt;br /&gt;
             pointer, if not 0xFFFFFFFF, no filename is further on&lt;br /&gt;
             pointer, often 00 00 00 00&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
?? ?? 00 00  2 shorts, first short multiplied by 4 gives the length of the shader, second is a flag?&lt;br /&gt;
?? ?? .. 00  String if first pointer is 0xFFFFFFFF, 0x00 terminated (name of shader source file)&lt;br /&gt;
             Raw shader file (except the first 4 bytes, which, in the shader file, denotes the length of the file)&lt;br /&gt;
FF FF 00 00  which ends with this (always?)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shaders (go back to [start of shader]) or shaders have ended&lt;br /&gt;
&lt;br /&gt;
             Variable length of &#039;stuff&#039; (technique commands?)&lt;br /&gt;
41 10 AB A0  which ends with this (always?)&lt;br /&gt;
?? ?? .. 00  String, 0x00 terminated (technique file name)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader pack]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shader packs (go back to [start of shader pack]) or shader packs have ended&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 06 (image) ===&lt;br /&gt;
&lt;br /&gt;
Stores some information about the specified IWI in fastfile. Does not include the actual image data.&lt;br /&gt;
Length is 52 bytes + IWI name (+1 for string termination).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
             Note: obviously no start separator&lt;br /&gt;
03 00 00 00&lt;br /&gt;
FE FF FF FF  separator?&lt;br /&gt;
00 00 00 00&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
70 55 01 00  IWI size minus 28 (0x1C)&lt;br /&gt;
70 55 01 00  same&lt;br /&gt;
&lt;br /&gt;
00 01 00 01&lt;br /&gt;
01 00 03 00&lt;br /&gt;
FF FF FF FF  separator?&lt;br /&gt;
&lt;br /&gt;
73 70 .. 00  IWI name without file extension (string + termination, variable size)&lt;br /&gt;
&lt;br /&gt;
00 00 00 01&lt;br /&gt;
00 01 01 00&lt;br /&gt;
&lt;br /&gt;
44 58 54 35 00 00 00 00  fixed size char[] for type? (here: DXT5....)&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 16 (localized string asset) ===&lt;br /&gt;
&lt;br /&gt;
A localized string asset consists of an alias name and a translated string. During compilation, it takes the given alias name (REFERENCE) from *.str file and prepands the *.str file&#039;s name in upper-case plus an underscore. Example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;example.str&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;VERSION             &amp;quot;1&amp;quot;&lt;br /&gt;
CONFIG              &amp;quot;C:\trees\cod3\cod3\bin\StringEd.cfg&amp;quot;&lt;br /&gt;
FILENOTES           &amp;quot;&amp;quot;&lt;br /&gt;
//--------------------------------&lt;br /&gt;
&lt;br /&gt;
REFERENCE           MARINES_NAME&lt;br /&gt;
LANG_ENGLISH        &amp;quot;US Airforce&amp;quot;&lt;br /&gt;
&lt;br /&gt;
//--------------------------------&lt;br /&gt;
ENDMARKER&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;mod.ff&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ÿÿÿÿ&lt;br /&gt;
ÿÿÿÿ&lt;br /&gt;
EXAMPLE_MARINES_NAME.&lt;br /&gt;
US Airforce.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Length is 8 bytes + string sizes (string count = 0-2, depends on the first two ints).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
             Note: no start separator!&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  either pointer or FFFFFFFF if the string wasn&#039;t used before&lt;br /&gt;
FF FF FF FF  same. If two pointers are used here, then no strings will follow.&lt;br /&gt;
55 53 .. 00  alias name for the localized&lt;br /&gt;
53 54 .. 00  actual localized string&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 1F (rawfile) ===&lt;br /&gt;
&lt;br /&gt;
A rawfile. Often a rawfile named right after the fastfile&#039;s name is implicitly added. It contains the errors thrown when it was compiling / linking.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  Start separation&lt;br /&gt;
&lt;br /&gt;
64 00 00 00  Length of the file&#039;s content (example: decimal 100; does not count the string termination!)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
&lt;br /&gt;
6D 6F 64 00  File name or if it&#039;s the last 1F-block FastFile name (example: mod.)&lt;br /&gt;
?? ?? .. 00  Plain text content of length above (string, terminated by 0x00)&lt;br /&gt;
&lt;br /&gt;
-----------  [block end OR even end of file]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 20 (stringtable) === &lt;br /&gt;
&lt;br /&gt;
A compiled stringtable (comma separated list, *.csv). Even values are stored as strings.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  start separation&lt;br /&gt;
&lt;br /&gt;
05 00 00 00  (int) columns&lt;br /&gt;
02 00 00 00  (int) rows&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
?? ?? .. 00  filename (path/*.csv) + string termination (0x00)&lt;br /&gt;
&lt;br /&gt;
-----------  [table cell description]&lt;br /&gt;
&lt;br /&gt;
?? ?? ?? ??  columns * rows integers (5 * 2 * 4 = 40 bytes in total, 5 * 2 = 10 cells)&lt;br /&gt;
             FF FF FF FF - if the string wasn&#039;t used before and follows after the cell description&lt;br /&gt;
             ?? ?? ?? 4? - if an identical string was already used (in another csv). It is some kind of memory offset (pointer). Base address calculation not figured out yet (0x40000072 ?)&lt;br /&gt;
&lt;br /&gt;
-----------  [cell content / strings]&lt;br /&gt;
&lt;br /&gt;
?? ?? .. 00  string + termination (0x00)&lt;br /&gt;
             Number of strings = amount of FF FF FF FFs in table cell description&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[User:CoDEmanX|CoDEmanX]] 01:45, 8 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
--[[User:Daevius|Daevius]] 14:24, 5 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Technical Reference]]&lt;br /&gt;
[[Category:File formats]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- outdated investigations below&lt;br /&gt;
&lt;br /&gt;
=== Shaders ===&lt;br /&gt;
&lt;br /&gt;
05 00 00 00 or&lt;br /&gt;
04 00 00 00&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
9F 00 00 00  size after filename&lt;br /&gt;
&lt;br /&gt;
filename ended with 0x00&lt;br /&gt;
&lt;br /&gt;
(size * 4) bytes of shader data, seems to end with FF FF 00 00&lt;br /&gt;
might contain more data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
filename starts with &#039;,&#039;&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Daevius</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7180</id>
		<title>Call of Duty 4: FastFile Format</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7180"/>
		<updated>2009-12-08T20:07:21Z</updated>

		<summary type="html">&lt;p&gt;Daevius: /* 00 00 00 05 (shader) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Under Construction Small.png‎]] &#039;&#039;&#039;*** Article and investigation in early progress ***&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Preface ==&lt;br /&gt;
&lt;br /&gt;
Be aware, FF files are little endian, so swap those bytes &#039;round!&lt;br /&gt;
&lt;br /&gt;
The data block types (also called &amp;quot;index identifier&amp;quot;) are written in big endian in this article, e.g. 00 00 00 1F is actually 1F 00 00 00 in ff, although ints and floats in the examples are kept little endian!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The global file layout starts with a header. After which you get a string list (model tag names, animation notetracks, maybe more; not always present). Followed by an index list. This list gives information about the rest of the file, which is a concatenation of compiled files (reinterpreted and linked data generated from source files like d3dbsp and stringtables, hereinafter referred to as data blocks).&lt;br /&gt;
&lt;br /&gt;
* Header&lt;br /&gt;
* String list index&lt;br /&gt;
* String list&lt;br /&gt;
* Data block index&lt;br /&gt;
* Data blocks&lt;br /&gt;
&lt;br /&gt;
Each file is separated by the separation key: 0xFFFFFFFF. But be aware, each file itself can also contain such a sequence which is not meant to be the separation key! So it is necessary to understand each data type in the FF file.&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;(Note: not up to date and not generalized)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Byte 0-3: decompressed fastfile size minus 44 (0x2C)&lt;br /&gt;
*Byte 4-7: about the total size of referenced data, e.g. the required memory for IWI textures if material files are in the ff&lt;br /&gt;
*Byte 8-11: &#039;&#039;unknown&#039;&#039;, might be a flag&lt;br /&gt;
*Byte 12-23: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 24-27: somehow related to ff size?&lt;br /&gt;
*Byte 28-43: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 44-47: equal to number of entries in &amp;quot;1st index&amp;quot; and amount of (model tag/joint/notetrack) strings (times 4 for index length)&lt;br /&gt;
*Byte 48-51: separator? (FF FF FF FF)&lt;br /&gt;
*Byte 52-55: number of records* (&amp;quot;2nd index&amp;quot;, times 8 for index length)&lt;br /&gt;
*Byte 56-63: separator? (FF FF FF FF FF FF FF FF)&lt;br /&gt;
*Byte 64-x: string list (xmodelsurfs?) --&amp;gt; not always, depends on the content (required offsets are in the FF header)*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; under re-investigation &amp;lt;!-- If a file was missing on ff compile, it does not count but the error message is added to the end of the file. There are usually more index entries than the number of records in the header. The given number of records is not equal to the entries in the assetinfo or assetlist file, it&#039;s usually higher. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: smallest possible fastfile (mod.ff) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
29 00 00 00  decompressed fastfile size minus 44 &lt;br /&gt;
00 00 00 00  &lt;br /&gt;
1C 00 00 00  unknown&lt;br /&gt;
&lt;br /&gt;
00 00 00 00 00 00 00 00 00 00 00 00&lt;br /&gt;
&lt;br /&gt;
0D 00 00 00  data size in memory (?)&lt;br /&gt;
&lt;br /&gt;
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00&lt;br /&gt;
&lt;br /&gt;
01 00 00 00  one index entry&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF 1F 00 00 00  a rawfile&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  index end&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  start separator&lt;br /&gt;
00 00 00 00  rawfile length (empty, no errors occured during compilation)&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
6D 6F 64 00  fastfile name as rawfile name&lt;br /&gt;
         00  rawfile string (empty)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: mp_backlot_load.ff ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Contains:&#039;&#039;&#039;&lt;br /&gt;
*2x shaders &lt;br /&gt;
*3x materials&lt;br /&gt;
*(1x fastfile name)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Materials:&lt;br /&gt;
# $victorybackdrop - mile_high_victory_screen.iwi (699,092 bytes)&lt;br /&gt;
# $defeatbackdrop - (none)&lt;br /&gt;
# $levelbriefing - loadscreen_mp_backlot.iwi (524,316 bytes)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start of file and header]&lt;br /&gt;
&lt;br /&gt;
71 03 00 00  Decompressed file size - 44 (hex: 371 + 2C = 39D; dec: 881 + 44 = 925)&lt;br /&gt;
&lt;br /&gt;
B8 AA 12 00  Size of both IWI&#039;s the materials in FF point to - 56 (2x28, 28 bytes = IWI header)&lt;br /&gt;
             0x12AAB8          = 1,223,352&lt;br /&gt;
             699,092 + 524,316 = 1,223,408&lt;br /&gt;
             difference:                56&lt;br /&gt;
&lt;br /&gt;
A4 00 00 00  Might be a flag&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
E5 00 00 00  Size of fastfile in memory (that is at least without header and separators, and maybe more)&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
&lt;br /&gt;
-----------  [end of header] (44 bytes), [start of index]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  Unknown, is sometimes FF FF FF FF&lt;br /&gt;
&lt;br /&gt;
06 00 00 00  Number of records in index (6)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  05 00 00 00  1st: shader&lt;br /&gt;
FF FF FF FF  05 00 00 00  2nd: shader&lt;br /&gt;
FF FF FF FF  04 00 00 00  3rd: material&lt;br /&gt;
FF FF FF FF  04 00 00 00  4th: material&lt;br /&gt;
FF FF FF FF  04 00 00 00  5th: material&lt;br /&gt;
FF FF FF FF  1F 00 00 00  6th: rawfile&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  end separator (the following FF FF FF FF is the start seperator of the next data block!)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of index]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Index ==&lt;br /&gt;
&lt;br /&gt;
Starts with an int telling the number of dword couples. Such a couple is composed of 2 ints:&lt;br /&gt;
&lt;br /&gt;
4 byte offset (FF FF FF FF = -1, meaning right after the previous block?)&amp;lt;br&amp;gt;&lt;br /&gt;
4 byte identifier (data block type)&lt;br /&gt;
&lt;br /&gt;
Separator (FF FF FF FF) after last couple&lt;br /&gt;
&lt;br /&gt;
=== Types ===&lt;br /&gt;
&lt;br /&gt;
* 00 00 00 01 - physpreset&lt;br /&gt;
* 00 00 00 02 - xanim&lt;br /&gt;
* 00 00 00 03 - xmodel&lt;br /&gt;
* 00 00 00 04 - material&lt;br /&gt;
* 00 00 00 05 - shader / techset&lt;br /&gt;
* 00 00 00 06 - image?&lt;br /&gt;
* 00 00 00 07 - soundalias (+audio data)&lt;br /&gt;
* 00 00 00 0B - map_ents (d3dbsp)&lt;br /&gt;
* 00 00 00 0C - related to col_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 0E - related to game_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 10 - related to col_map_mp / gfx_map (d3dbsp)&lt;br /&gt;
* 00 00 00 13 - font&lt;br /&gt;
* 00 00 00 14 - menu&lt;br /&gt;
* 00 00 00 16 - localized string asset&lt;br /&gt;
* 00 00 00 17 - physpreset??&lt;br /&gt;
* 00 00 00 19 - fx&lt;br /&gt;
* 00 00 00 1F - raw file&lt;br /&gt;
* 00 00 00 20 - stringtable (comma separated list)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Content ==&lt;br /&gt;
&lt;br /&gt;
Since there is a FF FF FF FF separator in front of every block and none at the very end (after last 1F-block), we can assume that each block has a start separation and no end separation. Thus, any FF FF FF FFs you find after data blocks are actually the start separators of the next block. This means the index end separator is rather FFFFFFFF than FFFFFFFFFFFFFFFF!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 04 (material) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  start separation&lt;br /&gt;
&lt;br /&gt;
00 2B 01 01  First 4 bytes seem to be 4 (unsigned) char&#039;s.&lt;br /&gt;
             1st byte is so far always 0x00 (perhaps it&#039;s a short together with the second byte).&lt;br /&gt;
             2nd byte so far either 0x2B or 0x00, I think this is a length.&lt;br /&gt;
             3rd byte so far 0x01, when 0x00 (all 4) the content is only a number of 0x00&#039;s, then the filename (0x00 termination)&lt;br /&gt;
             4th byte either 0x00 or 0x01. Can be a length or a bool.&lt;br /&gt;
             Then 0x10 bytes of more header.&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
00           When fourth byte is 01, there&#039;s a 0x00 following?             &lt;br /&gt;
             Then there&#039;s garbage (0xFF) and some shorts it looks of length in the second byte.&lt;br /&gt;
             Then more information...&lt;br /&gt;
02 00 0E E0  Often ends with this&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 05 (shader) ===&lt;br /&gt;
&lt;br /&gt;
A shader consists of 3 levels. One, the top level, consists of a header (with a name inside). Then the next level is a pack of shaders, it has a header, shaders and at the end a name. Then the bottom level is the shader itself, it has a header (containing a name of the source file and the length of the data) and the raw shader data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  Start separation&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  0x18 bytes of 0x00&lt;br /&gt;
FF FF FF FF  Or 0x00000000 (if no content further on)&lt;br /&gt;
00 00 00 00  0x74 bytes which are often 0x00&lt;br /&gt;
?? ?? .. 00  Then techset file name (0x00 termination) if pointer is 0xFFFFFFFF?&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader pack]&lt;br /&gt;
&lt;br /&gt;
             pointer&lt;br /&gt;
             1 dword of some character-length options / flags?&lt;br /&gt;
             3 pointers&lt;br /&gt;
             1 dword of some character-length sizes&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
             0x64 bytes of some short length options / flags? If the second pointer above is 0xFFFFFFFF&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader]&lt;br /&gt;
&lt;br /&gt;
             pointer, if not 0xFFFFFFFF, no filename is further on&lt;br /&gt;
             pointer, often 00 00 00 00&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
?? ?? 00 00  2 shorts, first short multiplied by 4 gives the length of the shader, second is a flag?&lt;br /&gt;
?? ?? .. 00  String if first pointer is 0xFFFFFFFF, 0x00 terminated (name of shader source file)&lt;br /&gt;
             Raw shader file (except the first 4 bytes, which, in the shader file, denotes the length of the file)&lt;br /&gt;
FF FF 00 00  which ends with this (always?)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shaders (go back to [start of shader]) or shaders have ended&lt;br /&gt;
&lt;br /&gt;
             Variable length of &#039;stuff&#039; (technique commands?)&lt;br /&gt;
41 10 AB A0  which ends with this (always?)&lt;br /&gt;
?? ?? .. 00  String, 0x00 terminated (technique file name)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader pack]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shader packs (go back to [start of shader pack]) or shader packs have ended&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 06 (image) ===&lt;br /&gt;
&lt;br /&gt;
Stores some information about the specified IWI in fastfile. Does not include the actual image data.&lt;br /&gt;
Length is 52 bytes + IWI name (+1 for string termination).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
             Note: obviously no start separator&lt;br /&gt;
03 00 00 00&lt;br /&gt;
FE FF FF FF  separator?&lt;br /&gt;
00 00 00 00&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
70 55 01 00  IWI size minus 28 (0x1C)&lt;br /&gt;
70 55 01 00  same&lt;br /&gt;
&lt;br /&gt;
00 01 00 01&lt;br /&gt;
01 00 03 00&lt;br /&gt;
FF FF FF FF  separator?&lt;br /&gt;
&lt;br /&gt;
73 70 .. 00  IWI name without file extension (string + termination, variable size)&lt;br /&gt;
&lt;br /&gt;
00 00 00 01&lt;br /&gt;
00 01 01 00&lt;br /&gt;
&lt;br /&gt;
44 58 54 35 00 00 00 00  fixed size char[] for type? (here: DXT5....)&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 16 (localized string asset) ===&lt;br /&gt;
&lt;br /&gt;
A localized string asset consists of an alias name and a translated string. During compilation, it takes the given alias name (REFERENCE) from *.str file and prepands the *.str file&#039;s name in upper-case plus an underscore. Example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;example.str&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;VERSION             &amp;quot;1&amp;quot;&lt;br /&gt;
CONFIG              &amp;quot;C:\trees\cod3\cod3\bin\StringEd.cfg&amp;quot;&lt;br /&gt;
FILENOTES           &amp;quot;&amp;quot;&lt;br /&gt;
//--------------------------------&lt;br /&gt;
&lt;br /&gt;
REFERENCE           MARINES_NAME&lt;br /&gt;
LANG_ENGLISH        &amp;quot;US Airforce&amp;quot;&lt;br /&gt;
&lt;br /&gt;
//--------------------------------&lt;br /&gt;
ENDMARKER&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;mod.ff&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ÿÿÿÿ&lt;br /&gt;
ÿÿÿÿ&lt;br /&gt;
EXAMPLE_MARINES_NAME.&lt;br /&gt;
US Airforce.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Length is 8 bytes + string sizes (string count = 0-2, depends on the first two ints).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
             Note: no start separator!&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  either pointer or FFFFFFFF if the string wasn&#039;t used before&lt;br /&gt;
FF FF FF FF  same. If two pointers are used here, then no strings will follow.&lt;br /&gt;
55 53 .. 00  alias name for the localized&lt;br /&gt;
53 54 .. 00  actual localized string&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 1F (rawfile) ===&lt;br /&gt;
&lt;br /&gt;
A rawfile. Often a rawfile named right after the fastfile&#039;s name is implicitly added. It contains the errors thrown when it was compiling / linking.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  Start separation&lt;br /&gt;
&lt;br /&gt;
64 00 00 00  Length of the file&#039;s content (example: decimal 100; does not count the string termination!)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
&lt;br /&gt;
6D 6F 64 00  File name or if it&#039;s the last 1F-block FastFile name (example: mod.)&lt;br /&gt;
?? ?? .. 00  Plain text content of length above (string, terminated by 0x00)&lt;br /&gt;
&lt;br /&gt;
-----------  [block end OR even end of file]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 20 (stringtable) === &lt;br /&gt;
&lt;br /&gt;
A compiled stringtable (comma separated list, *.csv). Even values are stored as strings.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  start separation&lt;br /&gt;
&lt;br /&gt;
05 00 00 00  (int) columns&lt;br /&gt;
02 00 00 00  (int) rows&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
?? ?? .. 00  filename (path/*.csv) + string termination (0x00)&lt;br /&gt;
&lt;br /&gt;
-----------  [table cell description]&lt;br /&gt;
&lt;br /&gt;
?? ?? ?? ??  columns * rows integers (5 * 2 * 4 = 40 bytes in total, 5 * 2 = 10 cells)&lt;br /&gt;
             FF FF FF FF - if the string wasn&#039;t used before and follows after the cell description&lt;br /&gt;
             ?? ?? ?? 4? - if an identical string was already used (in another csv). It is some kind of memory offset (pointer). Base address calculation not figured out yet (0x40000072 ?)&lt;br /&gt;
&lt;br /&gt;
-----------  [cell content / strings]&lt;br /&gt;
&lt;br /&gt;
?? ?? .. 00  string + termination (0x00)&lt;br /&gt;
             Number of strings = amount of FF FF FF FFs in table cell description&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[User:CoDEmanX|CoDEmanX]] 01:45, 8 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
--[[User:Daevius|Daevius]] 14:24, 5 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Technical Reference]]&lt;br /&gt;
[[Category:File formats]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- outdated investigations below&lt;br /&gt;
&lt;br /&gt;
=== Shaders ===&lt;br /&gt;
&lt;br /&gt;
05 00 00 00 or&lt;br /&gt;
04 00 00 00&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
9F 00 00 00  size after filename&lt;br /&gt;
&lt;br /&gt;
filename ended with 0x00&lt;br /&gt;
&lt;br /&gt;
(size * 4) bytes of shader data, seems to end with FF FF 00 00&lt;br /&gt;
might contain more data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
filename starts with &#039;,&#039;&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Daevius</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7179</id>
		<title>Call of Duty 4: FastFile Format</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7179"/>
		<updated>2009-12-08T20:06:01Z</updated>

		<summary type="html">&lt;p&gt;Daevius: /* 00 00 00 05 (shader) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Under Construction Small.png‎]] &#039;&#039;&#039;*** Article and investigation in early progress ***&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Preface ==&lt;br /&gt;
&lt;br /&gt;
Be aware, FF files are little endian, so swap those bytes &#039;round!&lt;br /&gt;
&lt;br /&gt;
The data block types (also called &amp;quot;index identifier&amp;quot;) are written in big endian in this article, e.g. 00 00 00 1F is actually 1F 00 00 00 in ff, although ints and floats in the examples are kept little endian!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The global file layout starts with a header. After which you get a string list (model tag names, animation notetracks, maybe more; not always present). Followed by an index list. This list gives information about the rest of the file, which is a concatenation of compiled files (reinterpreted and linked data generated from source files like d3dbsp and stringtables, hereinafter referred to as data blocks).&lt;br /&gt;
&lt;br /&gt;
* Header&lt;br /&gt;
* String list index&lt;br /&gt;
* String list&lt;br /&gt;
* Data block index&lt;br /&gt;
* Data blocks&lt;br /&gt;
&lt;br /&gt;
Each file is separated by the separation key: 0xFFFFFFFF. But be aware, each file itself can also contain such a sequence which is not meant to be the separation key! So it is necessary to understand each data type in the FF file.&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;(Note: not up to date and not generalized)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Byte 0-3: decompressed fastfile size minus 44 (0x2C)&lt;br /&gt;
*Byte 4-7: about the total size of referenced data, e.g. the required memory for IWI textures if material files are in the ff&lt;br /&gt;
*Byte 8-11: &#039;&#039;unknown&#039;&#039;, might be a flag&lt;br /&gt;
*Byte 12-23: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 24-27: somehow related to ff size?&lt;br /&gt;
*Byte 28-43: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 44-47: equal to number of entries in &amp;quot;1st index&amp;quot; and amount of (model tag/joint/notetrack) strings (times 4 for index length)&lt;br /&gt;
*Byte 48-51: separator? (FF FF FF FF)&lt;br /&gt;
*Byte 52-55: number of records* (&amp;quot;2nd index&amp;quot;, times 8 for index length)&lt;br /&gt;
*Byte 56-63: separator? (FF FF FF FF FF FF FF FF)&lt;br /&gt;
*Byte 64-x: string list (xmodelsurfs?) --&amp;gt; not always, depends on the content (required offsets are in the FF header)*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; under re-investigation &amp;lt;!-- If a file was missing on ff compile, it does not count but the error message is added to the end of the file. There are usually more index entries than the number of records in the header. The given number of records is not equal to the entries in the assetinfo or assetlist file, it&#039;s usually higher. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: smallest possible fastfile (mod.ff) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
29 00 00 00  decompressed fastfile size minus 44 &lt;br /&gt;
00 00 00 00  &lt;br /&gt;
1C 00 00 00  unknown&lt;br /&gt;
&lt;br /&gt;
00 00 00 00 00 00 00 00 00 00 00 00&lt;br /&gt;
&lt;br /&gt;
0D 00 00 00  data size in memory (?)&lt;br /&gt;
&lt;br /&gt;
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00&lt;br /&gt;
&lt;br /&gt;
01 00 00 00  one index entry&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF 1F 00 00 00  a rawfile&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  index end&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  start separator&lt;br /&gt;
00 00 00 00  rawfile length (empty, no errors occured during compilation)&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
6D 6F 64 00  fastfile name as rawfile name&lt;br /&gt;
         00  rawfile string (empty)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: mp_backlot_load.ff ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Contains:&#039;&#039;&#039;&lt;br /&gt;
*2x shaders &lt;br /&gt;
*3x materials&lt;br /&gt;
*(1x fastfile name)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Materials:&lt;br /&gt;
# $victorybackdrop - mile_high_victory_screen.iwi (699,092 bytes)&lt;br /&gt;
# $defeatbackdrop - (none)&lt;br /&gt;
# $levelbriefing - loadscreen_mp_backlot.iwi (524,316 bytes)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start of file and header]&lt;br /&gt;
&lt;br /&gt;
71 03 00 00  Decompressed file size - 44 (hex: 371 + 2C = 39D; dec: 881 + 44 = 925)&lt;br /&gt;
&lt;br /&gt;
B8 AA 12 00  Size of both IWI&#039;s the materials in FF point to - 56 (2x28, 28 bytes = IWI header)&lt;br /&gt;
             0x12AAB8          = 1,223,352&lt;br /&gt;
             699,092 + 524,316 = 1,223,408&lt;br /&gt;
             difference:                56&lt;br /&gt;
&lt;br /&gt;
A4 00 00 00  Might be a flag&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
E5 00 00 00  Size of fastfile in memory (that is at least without header and separators, and maybe more)&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
&lt;br /&gt;
-----------  [end of header] (44 bytes), [start of index]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  Unknown, is sometimes FF FF FF FF&lt;br /&gt;
&lt;br /&gt;
06 00 00 00  Number of records in index (6)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  05 00 00 00  1st: shader&lt;br /&gt;
FF FF FF FF  05 00 00 00  2nd: shader&lt;br /&gt;
FF FF FF FF  04 00 00 00  3rd: material&lt;br /&gt;
FF FF FF FF  04 00 00 00  4th: material&lt;br /&gt;
FF FF FF FF  04 00 00 00  5th: material&lt;br /&gt;
FF FF FF FF  1F 00 00 00  6th: rawfile&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  end separator (the following FF FF FF FF is the start seperator of the next data block!)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of index]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Index ==&lt;br /&gt;
&lt;br /&gt;
Starts with an int telling the number of dword couples. Such a couple is composed of 2 ints:&lt;br /&gt;
&lt;br /&gt;
4 byte offset (FF FF FF FF = -1, meaning right after the previous block?)&amp;lt;br&amp;gt;&lt;br /&gt;
4 byte identifier (data block type)&lt;br /&gt;
&lt;br /&gt;
Separator (FF FF FF FF) after last couple&lt;br /&gt;
&lt;br /&gt;
=== Types ===&lt;br /&gt;
&lt;br /&gt;
* 00 00 00 01 - physpreset&lt;br /&gt;
* 00 00 00 02 - xanim&lt;br /&gt;
* 00 00 00 03 - xmodel&lt;br /&gt;
* 00 00 00 04 - material&lt;br /&gt;
* 00 00 00 05 - shader / techset&lt;br /&gt;
* 00 00 00 06 - image?&lt;br /&gt;
* 00 00 00 07 - soundalias (+audio data)&lt;br /&gt;
* 00 00 00 0B - map_ents (d3dbsp)&lt;br /&gt;
* 00 00 00 0C - related to col_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 0E - related to game_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 10 - related to col_map_mp / gfx_map (d3dbsp)&lt;br /&gt;
* 00 00 00 13 - font&lt;br /&gt;
* 00 00 00 14 - menu&lt;br /&gt;
* 00 00 00 16 - localized string asset&lt;br /&gt;
* 00 00 00 17 - physpreset??&lt;br /&gt;
* 00 00 00 19 - fx&lt;br /&gt;
* 00 00 00 1F - raw file&lt;br /&gt;
* 00 00 00 20 - stringtable (comma separated list)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Content ==&lt;br /&gt;
&lt;br /&gt;
Since there is a FF FF FF FF separator in front of every block and none at the very end (after last 1F-block), we can assume that each block has a start separation and no end separation. Thus, any FF FF FF FFs you find after data blocks are actually the start separators of the next block. This means the index end separator is rather FFFFFFFF than FFFFFFFFFFFFFFFF!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 04 (material) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  start separation&lt;br /&gt;
&lt;br /&gt;
00 2B 01 01  First 4 bytes seem to be 4 (unsigned) char&#039;s.&lt;br /&gt;
             1st byte is so far always 0x00 (perhaps it&#039;s a short together with the second byte).&lt;br /&gt;
             2nd byte so far either 0x2B or 0x00, I think this is a length.&lt;br /&gt;
             3rd byte so far 0x01, when 0x00 (all 4) the content is only a number of 0x00&#039;s, then the filename (0x00 termination)&lt;br /&gt;
             4th byte either 0x00 or 0x01. Can be a length or a bool.&lt;br /&gt;
             Then 0x10 bytes of more header.&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
00           When fourth byte is 01, there&#039;s a 0x00 following?             &lt;br /&gt;
             Then there&#039;s garbage (0xFF) and some shorts it looks of length in the second byte.&lt;br /&gt;
             Then more information...&lt;br /&gt;
02 00 0E E0  Often ends with this&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 05 (shader) ===&lt;br /&gt;
&lt;br /&gt;
A shader consists of 3 levels. One, the top level, consists of a header (with a name inside). Then the next level is a pack of shaders, it has a header, shaders and at the end a name. Then the bottom level is the shader itself, it has a header (containing a name of the source file and the length of the data) and the raw shader data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  Start separation&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  pointer&lt;br /&gt;
00 00 00 00  0x18 bytes of 0x00&lt;br /&gt;
FF FF FF FF  Or 0x00000000 (if no content further on)&lt;br /&gt;
00 00 00 00  0x74 bytes which are often 0x00&lt;br /&gt;
?? ?? .. 00  Then techset file name (0x00 termination) if pointer is 0xFFFFFFFF?&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader pack]&lt;br /&gt;
&lt;br /&gt;
             pointer&lt;br /&gt;
             1 dword of some character-length options / flags?&lt;br /&gt;
             3 pointers&lt;br /&gt;
             1 dword of some character-length sizes&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
             0x64 bytes of some short length options / flags? If the second pointer above is 0xFFFFFFFF&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader]&lt;br /&gt;
&lt;br /&gt;
             pointer, if not 0xFFFFFFFF, no filename is further on&lt;br /&gt;
             pointer, often 00 00 00 00&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
?? ?? 00 00  2 shorts, first short multiplied by 4 gives the length of the shader, second is a flag?&lt;br /&gt;
?? ?? .. 00  String if first pointer is 0xFFFFFFFF, 0x00 terminated (name of shader source file)&lt;br /&gt;
             Raw shader file (except the first 4 bytes, which, in the shader file, denotes the length of the file)&lt;br /&gt;
FF FF 00 00  which ends with this (always?)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shaders (go back to [start of shader]) or shaders have ended&lt;br /&gt;
&lt;br /&gt;
             Variable length of &#039;stuff&#039; (technique commands?)&lt;br /&gt;
41 10 AB A0  which ends with this (always?)&lt;br /&gt;
?? ?? .. 00  String, 0x00 terminated (technique file name)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader pack]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shader packs (go back to [start of shader pack]) or shader packs have ended&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 06 (image) ===&lt;br /&gt;
&lt;br /&gt;
Stores some information about the specified IWI in fastfile. Does not include the actual image data.&lt;br /&gt;
Length is 52 bytes + IWI name (+1 for string termination).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
             Note: obviously no start separator&lt;br /&gt;
03 00 00 00&lt;br /&gt;
FE FF FF FF  separator?&lt;br /&gt;
00 00 00 00&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
70 55 01 00  IWI size minus 28 (0x1C)&lt;br /&gt;
70 55 01 00  same&lt;br /&gt;
&lt;br /&gt;
00 01 00 01&lt;br /&gt;
01 00 03 00&lt;br /&gt;
FF FF FF FF  separator?&lt;br /&gt;
&lt;br /&gt;
73 70 .. 00  IWI name without file extension (string + termination, variable size)&lt;br /&gt;
&lt;br /&gt;
00 00 00 01&lt;br /&gt;
00 01 01 00&lt;br /&gt;
&lt;br /&gt;
44 58 54 35 00 00 00 00  fixed size char[] for type? (here: DXT5....)&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 16 (localized string asset) ===&lt;br /&gt;
&lt;br /&gt;
A localized string asset consists of an alias name and a translated string. During compilation, it takes the given alias name (REFERENCE) from *.str file and prepands the *.str file&#039;s name in upper-case plus an underscore. Example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;example.str&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;VERSION             &amp;quot;1&amp;quot;&lt;br /&gt;
CONFIG              &amp;quot;C:\trees\cod3\cod3\bin\StringEd.cfg&amp;quot;&lt;br /&gt;
FILENOTES           &amp;quot;&amp;quot;&lt;br /&gt;
//--------------------------------&lt;br /&gt;
&lt;br /&gt;
REFERENCE           MARINES_NAME&lt;br /&gt;
LANG_ENGLISH        &amp;quot;US Airforce&amp;quot;&lt;br /&gt;
&lt;br /&gt;
//--------------------------------&lt;br /&gt;
ENDMARKER&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;mod.ff&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ÿÿÿÿ&lt;br /&gt;
ÿÿÿÿ&lt;br /&gt;
EXAMPLE_MARINES_NAME.&lt;br /&gt;
US Airforce.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Length is 8 bytes + string sizes (string count = 0-2, depends on the first two ints).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
             Note: no start separator!&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  either pointer or FFFFFFFF if the string wasn&#039;t used before&lt;br /&gt;
FF FF FF FF  same. If two pointers are used here, then no strings will follow.&lt;br /&gt;
55 53 .. 00  alias name for the localized&lt;br /&gt;
53 54 .. 00  actual localized string&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 1F (rawfile) ===&lt;br /&gt;
&lt;br /&gt;
A rawfile. Often a rawfile named right after the fastfile&#039;s name is implicitly added. It contains the errors thrown when it was compiling / linking.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  Start separation&lt;br /&gt;
&lt;br /&gt;
64 00 00 00  Length of the file&#039;s content (example: decimal 100; does not count the string termination!)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
&lt;br /&gt;
6D 6F 64 00  File name or if it&#039;s the last 1F-block FastFile name (example: mod.)&lt;br /&gt;
?? ?? .. 00  Plain text content of length above (string, terminated by 0x00)&lt;br /&gt;
&lt;br /&gt;
-----------  [block end OR even end of file]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 20 (stringtable) === &lt;br /&gt;
&lt;br /&gt;
A compiled stringtable (comma separated list, *.csv). Even values are stored as strings.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  start separation&lt;br /&gt;
&lt;br /&gt;
05 00 00 00  (int) columns&lt;br /&gt;
02 00 00 00  (int) rows&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
?? ?? .. 00  filename (path/*.csv) + string termination (0x00)&lt;br /&gt;
&lt;br /&gt;
-----------  [table cell description]&lt;br /&gt;
&lt;br /&gt;
?? ?? ?? ??  columns * rows integers (5 * 2 * 4 = 40 bytes in total, 5 * 2 = 10 cells)&lt;br /&gt;
             FF FF FF FF - if the string wasn&#039;t used before and follows after the cell description&lt;br /&gt;
             ?? ?? ?? 4? - if an identical string was already used (in another csv). It is some kind of memory offset (pointer). Base address calculation not figured out yet (0x40000072 ?)&lt;br /&gt;
&lt;br /&gt;
-----------  [cell content / strings]&lt;br /&gt;
&lt;br /&gt;
?? ?? .. 00  string + termination (0x00)&lt;br /&gt;
             Number of strings = amount of FF FF FF FFs in table cell description&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[User:CoDEmanX|CoDEmanX]] 01:45, 8 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
--[[User:Daevius|Daevius]] 14:24, 5 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Technical Reference]]&lt;br /&gt;
[[Category:File formats]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- outdated investigations below&lt;br /&gt;
&lt;br /&gt;
=== Shaders ===&lt;br /&gt;
&lt;br /&gt;
05 00 00 00 or&lt;br /&gt;
04 00 00 00&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
9F 00 00 00  size after filename&lt;br /&gt;
&lt;br /&gt;
filename ended with 0x00&lt;br /&gt;
&lt;br /&gt;
(size * 4) bytes of shader data, seems to end with FF FF 00 00&lt;br /&gt;
might contain more data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
filename starts with &#039;,&#039;&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Daevius</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7178</id>
		<title>Call of Duty 4: FastFile Format</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7178"/>
		<updated>2009-12-08T19:55:24Z</updated>

		<summary type="html">&lt;p&gt;Daevius: /* 00 00 00 05 (shader) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Under Construction Small.png‎]] &#039;&#039;&#039;*** Article and investigation in early progress ***&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Preface ==&lt;br /&gt;
&lt;br /&gt;
Be aware, FF files are little endian, so swap those bytes &#039;round!&lt;br /&gt;
&lt;br /&gt;
The data block types (also called &amp;quot;index identifier&amp;quot;) are written in big endian in this article, e.g. 00 00 00 1F is actually 1F 00 00 00 in ff, although ints and floats in the examples are kept little endian!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The global file layout starts with a header. After which you get a string list (model tag names, animation notetracks, maybe more; not always present). Followed by an index list. This list gives information about the rest of the file, which is a concatenation of compiled files (reinterpreted and linked data generated from source files like d3dbsp and stringtables, hereinafter referred to as data blocks).&lt;br /&gt;
&lt;br /&gt;
* Header&lt;br /&gt;
* String list index&lt;br /&gt;
* String list&lt;br /&gt;
* Data block index&lt;br /&gt;
* Data blocks&lt;br /&gt;
&lt;br /&gt;
Each file is separated by the separation key: 0xFFFFFFFF. But be aware, each file itself can also contain such a sequence which is not meant to be the separation key! So it is necessary to understand each data type in the FF file.&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;(Note: not up to date and not generalized)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Byte 0-3: decompressed fastfile size minus 44 (0x2C)&lt;br /&gt;
*Byte 4-7: about the total size of referenced data, e.g. the required memory for IWI textures if material files are in the ff&lt;br /&gt;
*Byte 8-11: &#039;&#039;unknown&#039;&#039;, might be a flag&lt;br /&gt;
*Byte 12-23: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 24-27: somehow related to ff size?&lt;br /&gt;
*Byte 28-43: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 44-47: equal to number of entries in &amp;quot;1st index&amp;quot; and amount of (model tag/joint/notetrack) strings (times 4 for index length)&lt;br /&gt;
*Byte 48-51: separator? (FF FF FF FF)&lt;br /&gt;
*Byte 52-55: number of records* (&amp;quot;2nd index&amp;quot;, times 8 for index length)&lt;br /&gt;
*Byte 56-63: separator? (FF FF FF FF FF FF FF FF)&lt;br /&gt;
*Byte 64-x: string list (xmodelsurfs?) --&amp;gt; not always, depends on the content (required offsets are in the FF header)*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; under re-investigation &amp;lt;!-- If a file was missing on ff compile, it does not count but the error message is added to the end of the file. There are usually more index entries than the number of records in the header. The given number of records is not equal to the entries in the assetinfo or assetlist file, it&#039;s usually higher. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: smallest possible fastfile (mod.ff) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
29 00 00 00  decompressed fastfile size minus 44 &lt;br /&gt;
00 00 00 00  &lt;br /&gt;
1C 00 00 00  unknown&lt;br /&gt;
&lt;br /&gt;
00 00 00 00 00 00 00 00 00 00 00 00&lt;br /&gt;
&lt;br /&gt;
0D 00 00 00  data size in memory (?)&lt;br /&gt;
&lt;br /&gt;
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00&lt;br /&gt;
&lt;br /&gt;
01 00 00 00  one index entry&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF 1F 00 00 00  a rawfile&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  index end&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  start separator&lt;br /&gt;
00 00 00 00  rawfile length (empty, no errors occured during compilation)&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
6D 6F 64 00  fastfile name as rawfile name&lt;br /&gt;
         00  rawfile string (empty)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: mp_backlot_load.ff ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Contains:&#039;&#039;&#039;&lt;br /&gt;
*2x shaders &lt;br /&gt;
*3x materials&lt;br /&gt;
*(1x fastfile name)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Materials:&lt;br /&gt;
# $victorybackdrop - mile_high_victory_screen.iwi (699,092 bytes)&lt;br /&gt;
# $defeatbackdrop - (none)&lt;br /&gt;
# $levelbriefing - loadscreen_mp_backlot.iwi (524,316 bytes)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start of file and header]&lt;br /&gt;
&lt;br /&gt;
71 03 00 00  Decompressed file size - 44 (hex: 371 + 2C = 39D; dec: 881 + 44 = 925)&lt;br /&gt;
&lt;br /&gt;
B8 AA 12 00  Size of both IWI&#039;s the materials in FF point to - 56 (2x28, 28 bytes = IWI header)&lt;br /&gt;
             0x12AAB8          = 1,223,352&lt;br /&gt;
             699,092 + 524,316 = 1,223,408&lt;br /&gt;
             difference:                56&lt;br /&gt;
&lt;br /&gt;
A4 00 00 00  Might be a flag&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
E5 00 00 00  Size of fastfile in memory (that is at least without header and separators, and maybe more)&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
&lt;br /&gt;
-----------  [end of header] (44 bytes), [start of index]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  Unknown, is sometimes FF FF FF FF&lt;br /&gt;
&lt;br /&gt;
06 00 00 00  Number of records in index (6)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  05 00 00 00  1st: shader&lt;br /&gt;
FF FF FF FF  05 00 00 00  2nd: shader&lt;br /&gt;
FF FF FF FF  04 00 00 00  3rd: material&lt;br /&gt;
FF FF FF FF  04 00 00 00  4th: material&lt;br /&gt;
FF FF FF FF  04 00 00 00  5th: material&lt;br /&gt;
FF FF FF FF  1F 00 00 00  6th: rawfile&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  end separator (the following FF FF FF FF is the start seperator of the next data block!)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of index]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Index ==&lt;br /&gt;
&lt;br /&gt;
Starts with an int telling the number of dword couples. Such a couple is composed of 2 ints:&lt;br /&gt;
&lt;br /&gt;
4 byte offset (FF FF FF FF = -1, meaning right after the previous block?)&amp;lt;br&amp;gt;&lt;br /&gt;
4 byte identifier (data block type)&lt;br /&gt;
&lt;br /&gt;
Separator (FF FF FF FF) after last couple&lt;br /&gt;
&lt;br /&gt;
=== Types ===&lt;br /&gt;
&lt;br /&gt;
* 00 00 00 01 - physpreset&lt;br /&gt;
* 00 00 00 02 - xanim&lt;br /&gt;
* 00 00 00 03 - xmodel&lt;br /&gt;
* 00 00 00 04 - material&lt;br /&gt;
* 00 00 00 05 - shader / techset&lt;br /&gt;
* 00 00 00 06 - image?&lt;br /&gt;
* 00 00 00 07 - soundalias (+audio data)&lt;br /&gt;
* 00 00 00 0B - map_ents (d3dbsp)&lt;br /&gt;
* 00 00 00 0C - related to col_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 0E - related to game_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 10 - related to col_map_mp / gfx_map (d3dbsp)&lt;br /&gt;
* 00 00 00 13 - font&lt;br /&gt;
* 00 00 00 14 - menu&lt;br /&gt;
* 00 00 00 16 - localized string asset&lt;br /&gt;
* 00 00 00 17 - physpreset??&lt;br /&gt;
* 00 00 00 19 - fx&lt;br /&gt;
* 00 00 00 1F - raw file&lt;br /&gt;
* 00 00 00 20 - stringtable (comma separated list)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Content ==&lt;br /&gt;
&lt;br /&gt;
Since there is a FF FF FF FF separator in front of every block and none at the very end (after last 1F-block), we can assume that each block has a start separation and no end separation. Thus, any FF FF FF FFs you find after data blocks are actually the start separators of the next block. This means the index end separator is rather FFFFFFFF than FFFFFFFFFFFFFFFF!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 04 (material) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  start separation&lt;br /&gt;
&lt;br /&gt;
00 2B 01 01  First 4 bytes seem to be 4 (unsigned) char&#039;s.&lt;br /&gt;
             1st byte is so far always 0x00 (perhaps it&#039;s a short together with the second byte).&lt;br /&gt;
             2nd byte so far either 0x2B or 0x00, I think this is a length.&lt;br /&gt;
             3rd byte so far 0x01, when 0x00 (all 4) the content is only a number of 0x00&#039;s, then the filename (0x00 termination)&lt;br /&gt;
             4th byte either 0x00 or 0x01. Can be a length or a bool.&lt;br /&gt;
             Then 0x10 bytes of more header.&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
00           When fourth byte is 01, there&#039;s a 0x00 following?             &lt;br /&gt;
             Then there&#039;s garbage (0xFF) and some shorts it looks of length in the second byte.&lt;br /&gt;
             Then more information...&lt;br /&gt;
02 00 0E E0  Often ends with this&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 05 (shader) ===&lt;br /&gt;
&lt;br /&gt;
A shader consists of 3 levels. One, the top level, consists of a header (with a name inside). Then the next level is a pack of shaders, it has a header, shaders and at the end a name. Then the bottom level is the shader itself, it has a header (containing a name of the source file and the length of the data) and the raw shader data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  Start separation&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  pointer&lt;br /&gt;
00 00 00 00  0x18 bytes of 0x00&lt;br /&gt;
FF FF FF FF  Or 0x00000000 (if no content further on)&lt;br /&gt;
00 00 00 00  0x74 bytes which are often 0x00&lt;br /&gt;
?? ?? .. 00  Then techset file name (0x00 termination) if pointer is 0xFFFFFFFF?&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader pack]&lt;br /&gt;
&lt;br /&gt;
             pointer&lt;br /&gt;
             1 dword of some character-length options / flags?&lt;br /&gt;
             3 pointers&lt;br /&gt;
             1 dword of some character-length sizes&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
             0x64 bytes of some short length options / flags? For the first 05 entry? Or if the references above are 0xFFFFFFFF?&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader]&lt;br /&gt;
&lt;br /&gt;
             pointer, if not FF FF FF FF, no filename is further on&lt;br /&gt;
             pointer, often 00 00 00 00&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
?? ?? 00 00  2 shorts, first short multiplied by 4 gives the length of the shader, second is a flag?&lt;br /&gt;
?? ?? .. 00  String if first pointer is FF FF FF FF, 0x00 terminated (name of shader source file)&lt;br /&gt;
             Raw shader file (except the first 4 bytes, which, in the shader file, denotes the length of the file)&lt;br /&gt;
FF FF 00 00  which ends with this (always?)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shaders (go back to [start of shader]) or shaders have ended&lt;br /&gt;
&lt;br /&gt;
             Variable length of &#039;stuff&#039; (technique commands?)&lt;br /&gt;
41 10 AB A0  which ends with this (always?)&lt;br /&gt;
?? ?? .. 00  String, 0x00 terminated (technique file name)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader pack]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shader packs (go back to [start of shader pack]) or shader packs have ended&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 06 (image) ===&lt;br /&gt;
&lt;br /&gt;
Stores some information about the specified IWI in fastfile. Does not include the actual image data.&lt;br /&gt;
Length is 52 bytes + IWI name (+1 for string termination).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
             Note: obviously no start separator&lt;br /&gt;
03 00 00 00&lt;br /&gt;
FE FF FF FF  separator?&lt;br /&gt;
00 00 00 00&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
70 55 01 00  IWI size minus 28 (0x1C)&lt;br /&gt;
70 55 01 00  same&lt;br /&gt;
&lt;br /&gt;
00 01 00 01&lt;br /&gt;
01 00 03 00&lt;br /&gt;
FF FF FF FF  separator?&lt;br /&gt;
&lt;br /&gt;
73 70 .. 00  IWI name without file extension (string + termination, variable size)&lt;br /&gt;
&lt;br /&gt;
00 00 00 01&lt;br /&gt;
00 01 01 00&lt;br /&gt;
&lt;br /&gt;
44 58 54 35 00 00 00 00  fixed size char[] for type? (here: DXT5....)&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 16 (localized string asset) ===&lt;br /&gt;
&lt;br /&gt;
A localized string asset consists of an alias name and a translated string. During compilation, it takes the given alias name (REFERENCE) from *.str file and prepands the *.str file&#039;s name in upper-case plus an underscore. Example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;example.str&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;VERSION             &amp;quot;1&amp;quot;&lt;br /&gt;
CONFIG              &amp;quot;C:\trees\cod3\cod3\bin\StringEd.cfg&amp;quot;&lt;br /&gt;
FILENOTES           &amp;quot;&amp;quot;&lt;br /&gt;
//--------------------------------&lt;br /&gt;
&lt;br /&gt;
REFERENCE           MARINES_NAME&lt;br /&gt;
LANG_ENGLISH        &amp;quot;US Airforce&amp;quot;&lt;br /&gt;
&lt;br /&gt;
//--------------------------------&lt;br /&gt;
ENDMARKER&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;mod.ff&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ÿÿÿÿ&lt;br /&gt;
ÿÿÿÿ&lt;br /&gt;
EXAMPLE_MARINES_NAME.&lt;br /&gt;
US Airforce.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Length is 8 bytes + string sizes (string count = 0-2, depends on the first two ints).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
             Note: no start separator!&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  either pointer or FFFFFFFF if the string wasn&#039;t used before&lt;br /&gt;
FF FF FF FF  same. If two pointers are used here, then no strings will follow.&lt;br /&gt;
55 53 .. 00  alias name for the localized&lt;br /&gt;
53 54 .. 00  actual localized string&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 1F (rawfile) ===&lt;br /&gt;
&lt;br /&gt;
A rawfile. Often a rawfile named right after the fastfile&#039;s name is implicitly added. It contains the errors thrown when it was compiling / linking.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  Start separation&lt;br /&gt;
&lt;br /&gt;
64 00 00 00  Length of the file&#039;s content (example: decimal 100; does not count the string termination!)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
&lt;br /&gt;
6D 6F 64 00  File name or if it&#039;s the last 1F-block FastFile name (example: mod.)&lt;br /&gt;
?? ?? .. 00  Plain text content of length above (string, terminated by 0x00)&lt;br /&gt;
&lt;br /&gt;
-----------  [block end OR even end of file]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 20 (stringtable) === &lt;br /&gt;
&lt;br /&gt;
A compiled stringtable (comma separated list, *.csv). Even values are stored as strings.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  start separation&lt;br /&gt;
&lt;br /&gt;
05 00 00 00  (int) columns&lt;br /&gt;
02 00 00 00  (int) rows&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
?? ?? .. 00  filename (path/*.csv) + string termination (0x00)&lt;br /&gt;
&lt;br /&gt;
-----------  [table cell description]&lt;br /&gt;
&lt;br /&gt;
?? ?? ?? ??  columns * rows integers (5 * 2 * 4 = 40 bytes in total, 5 * 2 = 10 cells)&lt;br /&gt;
             FF FF FF FF - if the string wasn&#039;t used before and follows after the cell description&lt;br /&gt;
             ?? ?? ?? 4? - if an identical string was already used (in another csv). It is some kind of memory offset (pointer). Base address calculation not figured out yet (0x40000072 ?)&lt;br /&gt;
&lt;br /&gt;
-----------  [cell content / strings]&lt;br /&gt;
&lt;br /&gt;
?? ?? .. 00  string + termination (0x00)&lt;br /&gt;
             Number of strings = amount of FF FF FF FFs in table cell description&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[User:CoDEmanX|CoDEmanX]] 01:45, 8 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
--[[User:Daevius|Daevius]] 14:24, 5 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Technical Reference]]&lt;br /&gt;
[[Category:File formats]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- outdated investigations below&lt;br /&gt;
&lt;br /&gt;
=== Shaders ===&lt;br /&gt;
&lt;br /&gt;
05 00 00 00 or&lt;br /&gt;
04 00 00 00&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
9F 00 00 00  size after filename&lt;br /&gt;
&lt;br /&gt;
filename ended with 0x00&lt;br /&gt;
&lt;br /&gt;
(size * 4) bytes of shader data, seems to end with FF FF 00 00&lt;br /&gt;
might contain more data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
filename starts with &#039;,&#039;&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Daevius</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7177</id>
		<title>Call of Duty 4: FastFile Format</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7177"/>
		<updated>2009-12-08T19:52:32Z</updated>

		<summary type="html">&lt;p&gt;Daevius: /* 00 00 00 05 (shader) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Under Construction Small.png‎]] &#039;&#039;&#039;*** Article and investigation in early progress ***&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Preface ==&lt;br /&gt;
&lt;br /&gt;
Be aware, FF files are little endian, so swap those bytes &#039;round!&lt;br /&gt;
&lt;br /&gt;
The data block types (also called &amp;quot;index identifier&amp;quot;) are written in big endian in this article, e.g. 00 00 00 1F is actually 1F 00 00 00 in ff, although ints and floats in the examples are kept little endian!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The global file layout starts with a header. After which you get a string list (model tag names, animation notetracks, maybe more; not always present). Followed by an index list. This list gives information about the rest of the file, which is a concatenation of compiled files (reinterpreted and linked data generated from source files like d3dbsp and stringtables, hereinafter referred to as data blocks).&lt;br /&gt;
&lt;br /&gt;
* Header&lt;br /&gt;
* String list index&lt;br /&gt;
* String list&lt;br /&gt;
* Data block index&lt;br /&gt;
* Data blocks&lt;br /&gt;
&lt;br /&gt;
Each file is separated by the separation key: 0xFFFFFFFF. But be aware, each file itself can also contain such a sequence which is not meant to be the separation key! So it is necessary to understand each data type in the FF file.&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;(Note: not up to date and not generalized)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
*Byte 0-3: decompressed fastfile size minus 44 (0x2C)&lt;br /&gt;
*Byte 4-7: about the total size of referenced data, e.g. the required memory for IWI textures if material files are in the ff&lt;br /&gt;
*Byte 8-11: &#039;&#039;unknown&#039;&#039;, might be a flag&lt;br /&gt;
*Byte 12-23: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 24-27: somehow related to ff size?&lt;br /&gt;
*Byte 28-43: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 44-47: equal to number of entries in &amp;quot;1st index&amp;quot; and amount of (model tag/joint/notetrack) strings (times 4 for index length)&lt;br /&gt;
*Byte 48-51: separator? (FF FF FF FF)&lt;br /&gt;
*Byte 52-55: number of records* (&amp;quot;2nd index&amp;quot;, times 8 for index length)&lt;br /&gt;
*Byte 56-63: separator? (FF FF FF FF FF FF FF FF)&lt;br /&gt;
*Byte 64-x: string list (xmodelsurfs?) --&amp;gt; not always, depends on the content (required offsets are in the FF header)*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; under re-investigation &amp;lt;!-- If a file was missing on ff compile, it does not count but the error message is added to the end of the file. There are usually more index entries than the number of records in the header. The given number of records is not equal to the entries in the assetinfo or assetlist file, it&#039;s usually higher. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: smallest possible fastfile (mod.ff) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
29 00 00 00  decompressed fastfile size minus 44 &lt;br /&gt;
00 00 00 00  &lt;br /&gt;
1C 00 00 00  unknown&lt;br /&gt;
&lt;br /&gt;
00 00 00 00 00 00 00 00 00 00 00 00&lt;br /&gt;
&lt;br /&gt;
0D 00 00 00  data size in memory (?)&lt;br /&gt;
&lt;br /&gt;
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00&lt;br /&gt;
&lt;br /&gt;
01 00 00 00  one index entry&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF 1F 00 00 00  a rawfile&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  index end&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  start separator&lt;br /&gt;
00 00 00 00  rawfile length (empty, no errors occured during compilation)&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
6D 6F 64 00  fastfile name as rawfile name&lt;br /&gt;
         00  rawfile string (empty)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: mp_backlot_load.ff ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Contains:&#039;&#039;&#039;&lt;br /&gt;
*2x shaders &lt;br /&gt;
*3x materials&lt;br /&gt;
*(1x fastfile name)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Materials:&lt;br /&gt;
# $victorybackdrop - mile_high_victory_screen.iwi (699,092 bytes)&lt;br /&gt;
# $defeatbackdrop - (none)&lt;br /&gt;
# $levelbriefing - loadscreen_mp_backlot.iwi (524,316 bytes)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start of file and header]&lt;br /&gt;
&lt;br /&gt;
71 03 00 00  Decompressed file size - 44 (hex: 371 + 2C = 39D; dec: 881 + 44 = 925)&lt;br /&gt;
&lt;br /&gt;
B8 AA 12 00  Size of both IWI&#039;s the materials in FF point to - 56 (2x28, 28 bytes = IWI header)&lt;br /&gt;
             0x12AAB8          = 1,223,352&lt;br /&gt;
             699,092 + 524,316 = 1,223,408&lt;br /&gt;
             difference:                56&lt;br /&gt;
&lt;br /&gt;
A4 00 00 00  Might be a flag&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
E5 00 00 00  Size of fastfile in memory (that is at least without header and separators, and maybe more)&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
&lt;br /&gt;
-----------  [end of header] (44 bytes), [start of index]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  Unknown, is sometimes FF FF FF FF&lt;br /&gt;
&lt;br /&gt;
06 00 00 00  Number of records in index (6)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  05 00 00 00  1st: shader&lt;br /&gt;
FF FF FF FF  05 00 00 00  2nd: shader&lt;br /&gt;
FF FF FF FF  04 00 00 00  3rd: material&lt;br /&gt;
FF FF FF FF  04 00 00 00  4th: material&lt;br /&gt;
FF FF FF FF  04 00 00 00  5th: material&lt;br /&gt;
FF FF FF FF  1F 00 00 00  6th: rawfile&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  end separator (the following FF FF FF FF is the start seperator of the next data block!)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of index]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Index ==&lt;br /&gt;
&lt;br /&gt;
Starts with an int telling the number of dword couples. Such a couple is composed of 2 ints:&lt;br /&gt;
&lt;br /&gt;
4 byte offset (FF FF FF FF = -1, meaning right after the previous block?)&amp;lt;br&amp;gt;&lt;br /&gt;
4 byte identifier (data block type)&lt;br /&gt;
&lt;br /&gt;
Separator (FF FF FF FF) after last couple&lt;br /&gt;
&lt;br /&gt;
=== Types ===&lt;br /&gt;
&lt;br /&gt;
* 00 00 00 01 - physpreset&lt;br /&gt;
* 00 00 00 02 - xanim&lt;br /&gt;
* 00 00 00 03 - xmodel&lt;br /&gt;
* 00 00 00 04 - material&lt;br /&gt;
* 00 00 00 05 - shader / techset&lt;br /&gt;
* 00 00 00 06 - image?&lt;br /&gt;
* 00 00 00 07 - soundalias (+audio data)&lt;br /&gt;
* 00 00 00 0B - map_ents (d3dbsp)&lt;br /&gt;
* 00 00 00 0C - related to col_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 0E - related to game_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 10 - related to col_map_mp / gfx_map (d3dbsp)&lt;br /&gt;
* 00 00 00 13 - font&lt;br /&gt;
* 00 00 00 14 - menu&lt;br /&gt;
* 00 00 00 16 - localized string asset&lt;br /&gt;
* 00 00 00 17 - physpreset??&lt;br /&gt;
* 00 00 00 19 - fx&lt;br /&gt;
* 00 00 00 1F - raw file&lt;br /&gt;
* 00 00 00 20 - stringtable (comma separated list)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Content ==&lt;br /&gt;
&lt;br /&gt;
Since there is a FF FF FF FF separator in front of every block and none at the very end (after last 1F-block), we can assume that each block has a start separation and no end separation. Thus, any FF FF FF FFs you find after data blocks are actually the start separators of the next block. This means the index end separator is rather FFFFFFFF than FFFFFFFFFFFFFFFF!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 04 (material) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  start separation&lt;br /&gt;
&lt;br /&gt;
00 2B 01 01  First 4 bytes seem to be 4 (unsigned) char&#039;s.&lt;br /&gt;
             1st byte is so far always 0x00 (perhaps it&#039;s a short together with the second byte).&lt;br /&gt;
             2nd byte so far either 0x2B or 0x00, I think this is a length.&lt;br /&gt;
             3rd byte so far 0x01, when 0x00 (all 4) the content is only a number of 0x00&#039;s, then the filename (0x00 termination)&lt;br /&gt;
             4th byte either 0x00 or 0x01. Can be a length or a bool.&lt;br /&gt;
             Then 0x10 bytes of more header.&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
00           When fourth byte is 01, there&#039;s a 0x00 following?             &lt;br /&gt;
             Then there&#039;s garbage (0xFF) and some shorts it looks of length in the second byte.&lt;br /&gt;
             Then more information...&lt;br /&gt;
02 00 0E E0  Often ends with this&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 05 (shader) ===&lt;br /&gt;
&lt;br /&gt;
A shader consists of 3 levels. One, the top level, consists of a header (with a name inside). Then the next level is a pack of shaders, it has a header, shaders and at the end a name. Then the bottom level is the shader itself, it has a header (containing a name of the source file and the length of the data) and the raw shader data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  Start separation&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  ID/reference? First is always 0xFFFFFFFF, later on you can also see 0x??????40&lt;br /&gt;
00 00 00 00  0x18 bytes of 0x00&lt;br /&gt;
FF FF FF FF  Or 0x00000000 (if no content further on)&lt;br /&gt;
00 00 00 00  0x74 bytes which are often 0x00&lt;br /&gt;
?? ?? .. 00  Then techset file name (0x00 termination) if fist dword is 0xFFFFFFFF?&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader pack]&lt;br /&gt;
&lt;br /&gt;
             1 dword of ID/reference?&lt;br /&gt;
             1 dword of some character-length options / flags?&lt;br /&gt;
             3 dwords of ID/references?&lt;br /&gt;
             1 dword of some character-length sizes&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
             0x64 bytes of some short length options / flags? For the first 05 entry? Or if the references above are 0xFFFFFFFF?&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader]&lt;br /&gt;
&lt;br /&gt;
             1 pointer, if not FF FF FF FF, no filename is further on&lt;br /&gt;
             1 pointer, often 00 00 00 00&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
?? ?? 00 00  2 shorts, first short multiplied by 4 gives the length of the shader, second is a flag?&lt;br /&gt;
?? ?? .. 00  String if first pointer is FF FF FF FF, 0x00 terminated (name of shader source file)&lt;br /&gt;
             Raw shader file (except the first 4 bytes, which, in the shader file, denotes the length of the file)&lt;br /&gt;
FF FF 00 00  which ends with this (always?)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shaders (go back to [start of shader]) or shaders have ended&lt;br /&gt;
&lt;br /&gt;
             Variable length of &#039;stuff&#039; (&#039;technique&#039; commands?)&lt;br /&gt;
41 10 AB A0  which ends with this (always?)&lt;br /&gt;
?? ?? .. 00  String, 0x00 terminated (technique file name)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader pack]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shader packs (go back to [start of shader pack]) or shader packs have ended&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 06 (image) ===&lt;br /&gt;
&lt;br /&gt;
Stores some information about the specified IWI in fastfile. Does not include the actual image data.&lt;br /&gt;
Length is 52 bytes + IWI name (+1 for string termination).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
             Note: obviously no start separator&lt;br /&gt;
03 00 00 00&lt;br /&gt;
FE FF FF FF  separator?&lt;br /&gt;
00 00 00 00&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
70 55 01 00  IWI size minus 28 (0x1C)&lt;br /&gt;
70 55 01 00  same&lt;br /&gt;
&lt;br /&gt;
00 01 00 01&lt;br /&gt;
01 00 03 00&lt;br /&gt;
FF FF FF FF  separator?&lt;br /&gt;
&lt;br /&gt;
73 70 .. 00  IWI name without file extension (string + termination, variable size)&lt;br /&gt;
&lt;br /&gt;
00 00 00 01&lt;br /&gt;
00 01 01 00&lt;br /&gt;
&lt;br /&gt;
44 58 54 35 00 00 00 00  fixed size char[] for type? (here: DXT5....)&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 16 (localized string asset) ===&lt;br /&gt;
&lt;br /&gt;
A localized string asset consists of an alias name and a translated string. During compilation, it takes the given alias name (REFERENCE) from *.str file and prepands the *.str file&#039;s name in upper-case plus an underscore. Example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;example.str&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;VERSION             &amp;quot;1&amp;quot;&lt;br /&gt;
CONFIG              &amp;quot;C:\trees\cod3\cod3\bin\StringEd.cfg&amp;quot;&lt;br /&gt;
FILENOTES           &amp;quot;&amp;quot;&lt;br /&gt;
//--------------------------------&lt;br /&gt;
&lt;br /&gt;
REFERENCE           MARINES_NAME&lt;br /&gt;
LANG_ENGLISH        &amp;quot;US Airforce&amp;quot;&lt;br /&gt;
&lt;br /&gt;
//--------------------------------&lt;br /&gt;
ENDMARKER&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;mod.ff&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ÿÿÿÿ&lt;br /&gt;
ÿÿÿÿ&lt;br /&gt;
EXAMPLE_MARINES_NAME.&lt;br /&gt;
US Airforce.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Length is 8 bytes + string sizes (string count = 0-2, depends on the first two ints).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
             Note: no start separator!&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  either pointer or FFFFFFFF if the string wasn&#039;t used before&lt;br /&gt;
FF FF FF FF  same. If two pointers are used here, then no strings will follow.&lt;br /&gt;
55 53 .. 00  alias name for the localized&lt;br /&gt;
53 54 .. 00  actual localized string&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 1F (rawfile) ===&lt;br /&gt;
&lt;br /&gt;
A rawfile. Often a rawfile named right after the fastfile&#039;s name is implicitly added. It contains the errors thrown when it was compiling / linking.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  Start separation&lt;br /&gt;
&lt;br /&gt;
64 00 00 00  Length of the file&#039;s content (example: decimal 100; does not count the string termination!)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
&lt;br /&gt;
6D 6F 64 00  File name or if it&#039;s the last 1F-block FastFile name (example: mod.)&lt;br /&gt;
?? ?? .. 00  Plain text content of length above (string, terminated by 0x00)&lt;br /&gt;
&lt;br /&gt;
-----------  [block end OR even end of file]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 20 (stringtable) === &lt;br /&gt;
&lt;br /&gt;
A compiled stringtable (comma separated list, *.csv). Even values are stored as strings.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [block start]&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  start separation&lt;br /&gt;
&lt;br /&gt;
05 00 00 00  (int) columns&lt;br /&gt;
02 00 00 00  (int) rows&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
?? ?? .. 00  filename (path/*.csv) + string termination (0x00)&lt;br /&gt;
&lt;br /&gt;
-----------  [table cell description]&lt;br /&gt;
&lt;br /&gt;
?? ?? ?? ??  columns * rows integers (5 * 2 * 4 = 40 bytes in total, 5 * 2 = 10 cells)&lt;br /&gt;
             FF FF FF FF - if the string wasn&#039;t used before and follows after the cell description&lt;br /&gt;
             ?? ?? ?? 4? - if an identical string was already used (in another csv). It is some kind of memory offset (pointer). Base address calculation not figured out yet (0x40000072 ?)&lt;br /&gt;
&lt;br /&gt;
-----------  [cell content / strings]&lt;br /&gt;
&lt;br /&gt;
?? ?? .. 00  string + termination (0x00)&lt;br /&gt;
             Number of strings = amount of FF FF FF FFs in table cell description&lt;br /&gt;
&lt;br /&gt;
-----------  [block end]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[User:CoDEmanX|CoDEmanX]] 01:45, 8 December 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
--[[User:Daevius|Daevius]] 14:24, 5 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Technical Reference]]&lt;br /&gt;
[[Category:File formats]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- outdated investigations below&lt;br /&gt;
&lt;br /&gt;
=== Shaders ===&lt;br /&gt;
&lt;br /&gt;
05 00 00 00 or&lt;br /&gt;
04 00 00 00&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
9F 00 00 00  size after filename&lt;br /&gt;
&lt;br /&gt;
filename ended with 0x00&lt;br /&gt;
&lt;br /&gt;
(size * 4) bytes of shader data, seems to end with FF FF 00 00&lt;br /&gt;
might contain more data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
filename starts with &#039;,&#039;&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Daevius</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7152</id>
		<title>Call of Duty 4: FastFile Format</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7152"/>
		<updated>2009-11-09T14:49:13Z</updated>

		<summary type="html">&lt;p&gt;Daevius: /* 00 00 00 05 (shader) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Under Construction Small.png‎]] &#039;&#039;&#039;*** Article and investigation in early progress ***&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Preface ==&lt;br /&gt;
&lt;br /&gt;
Be aware, FF files are little endian, so swap those bytes &#039;round!&lt;br /&gt;
&lt;br /&gt;
The global file layout starts with a header. After which you get a list a model tag names, after which you get an index list. This list gives information about the rest of the file, which is a concatenation of files, most of which are reinterpreted. Each file is separated by the separation key: 0xFFFFFFFF. But be aware, each file itself can also contain such a sequence which is not meant to be the separation key! So it is necessary to understand each data type in the FF file.&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
&lt;br /&gt;
*Byte 0-3: decompressed fastfile size minus 44 (0x2C)&lt;br /&gt;
*Byte 4-7: about the total size of referenced data, e.g. the required memory for IWI textures if material files are in the ff&lt;br /&gt;
*Byte 8-11: &#039;&#039;unknown&#039;&#039;, might be a flag&lt;br /&gt;
*Byte 12-23: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 24-27: somehow related to ff size?&lt;br /&gt;
*Byte 28-43: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 44-47: equal to number of entries in &amp;quot;1st index&amp;quot; and amount of (model tag/joint/notetrack) strings (times 4 for index length)&lt;br /&gt;
*Byte 48-51: separator? (FF FF FF FF)&lt;br /&gt;
*Byte 52-55: number of records* (&amp;quot;2nd index&amp;quot;, times 8 for index length)&lt;br /&gt;
*Byte 56-63: separator? (FF FF FF FF FF FF FF FF)&lt;br /&gt;
*Byte 64-x: string list (xmodelsurfs?) --&amp;gt; not always, depends on the content (required offsets are in the FF header)*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; under re-investigation &amp;lt;!-- If a file was missing on ff compile, it does not count but the error message is added to the end of the file. There are usually more index entries than the number of records in the header. The given number of records is not equal to the entries in the assetinfo or assetlist file, it&#039;s usually higher. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: mp_backlot_load.ff ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Contains:&#039;&#039;&#039;&lt;br /&gt;
*2x shaders &lt;br /&gt;
*3x materials&lt;br /&gt;
*(1x fastfile name)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Materials:&lt;br /&gt;
# $victorybackdrop - mile_high_victory_screen.iwi (699,092 bytes)&lt;br /&gt;
# $defeatbackdrop - (none)&lt;br /&gt;
# $levelbriefing - loadscreen_mp_backlot.iwi (524,316 bytes)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start of file and header]&lt;br /&gt;
&lt;br /&gt;
71 03 00 00  Decompressed file size - 44 (hex: 371 + 2C = 39D; dec: 881 + 44 = 925)&lt;br /&gt;
&lt;br /&gt;
B8 AA 12 00  Size of both IWI&#039;s the materials in FF point to - 56 (2x28, 28 bytes = IWI header)&lt;br /&gt;
             0x12AAB8          = 1,223,352&lt;br /&gt;
             699,092 + 524,316 = 1,223,408&lt;br /&gt;
             difference:                56&lt;br /&gt;
&lt;br /&gt;
A4 00 00 00  Might be a flag&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
E5 00 00 00  Size of fastfile in memory (that is at least without header and separators, and maybe more)&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
&lt;br /&gt;
-----------  [end of header] (44 bytes), [start of index]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  Unknown, is sometimes FF FF FF FF&lt;br /&gt;
&lt;br /&gt;
06 00 00 00  Number of records in index (6)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  05 00 00 00  1st: shader&lt;br /&gt;
FF FF FF FF  05 00 00 00  2nd: shader&lt;br /&gt;
FF FF FF FF  04 00 00 00  3rd: material&lt;br /&gt;
FF FF FF FF  04 00 00 00  4th: material&lt;br /&gt;
FF FF FF FF  04 00 00 00  5th: material&lt;br /&gt;
FF FF FF FF  1F 00 00 00  6th: rawfile&lt;br /&gt;
&lt;br /&gt;
-----------  [end of index]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Index ==&lt;br /&gt;
&lt;br /&gt;
4 byte identifier (fastfile entry type), 4 byte offset (FF FF FF FF = -1, meaning right after the previous block?)&lt;br /&gt;
&lt;br /&gt;
Separator (FF FF FF FF) after last 4-byte couple + 00 00 00 00 ?&lt;br /&gt;
&lt;br /&gt;
=== Types ===&lt;br /&gt;
&lt;br /&gt;
* 00 00 00 01 - physpreset&lt;br /&gt;
* 00 00 00 02 - xanim&lt;br /&gt;
* 00 00 00 03 - xmodel&lt;br /&gt;
* 00 00 00 04 - material&lt;br /&gt;
* 00 00 00 05 - shader / techset&lt;br /&gt;
* 00 00 00 06 - image?&lt;br /&gt;
* 00 00 00 0B - map_ents (d3dbsp)&lt;br /&gt;
* 00 00 00 0C - related to col_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 0E - related to game_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 10 - related to col_map_mp / gfx_map (d3dbsp)&lt;br /&gt;
* 00 00 00 13 - font&lt;br /&gt;
* 00 00 00 14 - menu&lt;br /&gt;
* 00 00 00 16 - localized string asset&lt;br /&gt;
* 00 00 00 17 - physpreset??&lt;br /&gt;
* 00 00 00 19 - fx&lt;br /&gt;
* 00 00 00 1F - raw file&lt;br /&gt;
* 00 00 00 20 - stringtable (comma separated list)&lt;br /&gt;
&lt;br /&gt;
== Content ==&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 04 ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 2B 01 01  First 4 bytes seem to be 4 (unsigned) char&#039;s.&lt;br /&gt;
             1st byte is so far always 0x00 (perhaps it&#039;s a short together with the second byte).&lt;br /&gt;
             2nd byte so far either 0x2B or 0x00, I think this is a length.&lt;br /&gt;
             3rd byte so far 0x01, when 0x00 (all 4) the content is only a number of 0x00&#039;s, then the filename (0x00 termination)&lt;br /&gt;
             4th byte either 0x00 or 0x01. Can be a length or a bool.&lt;br /&gt;
             Then 0x10 bytes of more header.&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
00           When fourth byte is 01, there&#039;s a 0x00 following?             &lt;br /&gt;
             Then there&#039;s garbage (0xFF) and some shorts it looks of length in the second byte.&lt;br /&gt;
             Then more information...&lt;br /&gt;
02 00 0E E0  Often ends with this&lt;br /&gt;
&lt;br /&gt;
-----------  [end separation]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 05 (shader) ===&lt;br /&gt;
&lt;br /&gt;
A shader consists of 3 levels. One, the top level, consists of a header (with a name inside). Then the next level is a pack of shaders, it has a header, shaders and at the end a name. Then the bottom level is the shader itself, it has a header (containing a name of the source file and the length of the data) and the raw shader data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start separation]&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  ID/reference? First is always 0xFFFFFFFF, later on you can also see 0x??????40&lt;br /&gt;
00 00 00 00  0x18 bytes of 0x00&lt;br /&gt;
FF FF FF FF  Or 0x00000000 (if no content further on)&lt;br /&gt;
00 00 00 00  0x74 bytes which are often 0x00&lt;br /&gt;
?? ?? .. 00  Then techset file name (0x00 termination) if fist dword is 0xFFFFFFFF?&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader pack]&lt;br /&gt;
&lt;br /&gt;
             1 dword of ID/reference?&lt;br /&gt;
             1 dword of some character-length options / flags?&lt;br /&gt;
             3 dwords of ID/references?&lt;br /&gt;
             1 dword of some character-length sizes&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
             0x64 bytes of some short length options / flags? For the first 05 entry? Or if the references above are 0xFFFFFFFF?&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader]&lt;br /&gt;
&lt;br /&gt;
             2 dwords of references&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
?? ?? 00 00  2 shorts, first short multiplied by 4 gives the length of the shader, second is a flag? When set no string follows?&lt;br /&gt;
?? ?? .. 00  String if previous second short is 00 00, 0x00 terminated (name of shader source file)&lt;br /&gt;
             Raw shader file (except the first 4 bytes, which, in the shader file, denotes the length of the file)&lt;br /&gt;
FF FF 00 00  which ends with this (always?)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shaders (go back to [start of shader]) or shaders have ended&lt;br /&gt;
&lt;br /&gt;
             Variable length of &#039;stuff&#039;&lt;br /&gt;
41 10 AB A0  which ends with this (always?)&lt;br /&gt;
?? ?? .. 00  String, 0x00 terminated (technique file name)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader pack]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shader packs (go back to [start of shader pack]) or shader packs have ended&lt;br /&gt;
&lt;br /&gt;
-----------  [end separation]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 1F (rawfile) ===&lt;br /&gt;
&lt;br /&gt;
A rawfile. Often a rawfile named right after the fastfile&#039;s name is implicitly added. It contains the errors thrown when it was compiling / linking.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start separation]&lt;br /&gt;
&lt;br /&gt;
64 00 00 00  Length of the file&#039;s content (example: decimal 100; does not count the string termination!)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
&lt;br /&gt;
6D 6F 64 00  File name or if it&#039;s the last 1F-block FastFile name (example: mod.)&lt;br /&gt;
?? ?? .. 00  Plain text content of length above (string, terminated by 0x00)&lt;br /&gt;
&lt;br /&gt;
-----------  [end separation OR end of file]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--[[User:CoDEmanX|CoDEmanX]] 22:09, 4 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
--[[User:Daevius|Daevius]] 14:24, 5 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- outdated investigations below&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1F 00 00 00 FF FF FF FF  rawfile (plaintext)&lt;br /&gt;
05 00 00 00 FF FF FF FF  shader&lt;br /&gt;
03 00 00 00 FF FF FF FF  related to xmodel&lt;br /&gt;
1F 00 00 00 FF FF FF FF  xmodel data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
4A 06 00 00              rawfile length&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
6D 61 70 73 2F 6D 70 2F  filename:&lt;br /&gt;
5F 72 65 70 75 6C 73 65  maps/mp/_repulse.gsc&lt;br /&gt;
2E 67 73 63 00           followed by plaintext:&lt;br /&gt;
69 6E 69 74 28 29 0D 0A  init()..&lt;br /&gt;
7B 0D 0A 09 74 68 72 65  {...thre&lt;br /&gt;
61 64 20 70 6C 61 79 65  ad playe&lt;br /&gt;
72 63 6F 6E 6E 65 63 74  rconnect&lt;br /&gt;
28 29 3B 0D 0A ...       ();..}.&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
...                      shader (binary data)&lt;br /&gt;
&lt;br /&gt;
...                      xmodel related data&lt;br /&gt;
&lt;br /&gt;
...                      xmodel data (similar to original xmodel file, but nonetheless different)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Shaders ===&lt;br /&gt;
&lt;br /&gt;
05 00 00 00 or&lt;br /&gt;
04 00 00 00&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
9F 00 00 00  size after filename&lt;br /&gt;
&lt;br /&gt;
filename ended with 0x00&lt;br /&gt;
&lt;br /&gt;
(size * 4) bytes of shader data, seems to end with FF FF 00 00&lt;br /&gt;
might contain more data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
filename starts with &#039;,&#039;&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Technical Reference]]&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Daevius</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7151</id>
		<title>Call of Duty 4: FastFile Format</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7151"/>
		<updated>2009-11-09T14:04:07Z</updated>

		<summary type="html">&lt;p&gt;Daevius: /* Example: mp_backlot_load.ff */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Under Construction Small.png‎]] &#039;&#039;&#039;*** Article and investigation in early progress ***&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Preface ==&lt;br /&gt;
&lt;br /&gt;
Be aware, FF files are little endian, so swap those bytes &#039;round!&lt;br /&gt;
&lt;br /&gt;
The global file layout starts with a header. After which you get a list a model tag names, after which you get an index list. This list gives information about the rest of the file, which is a concatenation of files, most of which are reinterpreted. Each file is separated by the separation key: 0xFFFFFFFF. But be aware, each file itself can also contain such a sequence which is not meant to be the separation key! So it is necessary to understand each data type in the FF file.&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
&lt;br /&gt;
*Byte 0-3: decompressed fastfile size minus 44 (0x2C)&lt;br /&gt;
*Byte 4-7: about the total size of referenced data, e.g. the required memory for IWI textures if material files are in the ff&lt;br /&gt;
*Byte 8-11: &#039;&#039;unknown&#039;&#039;, might be a flag&lt;br /&gt;
*Byte 12-23: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 24-27: somehow related to ff size?&lt;br /&gt;
*Byte 28-43: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 44-47: equal to number of entries in &amp;quot;1st index&amp;quot; and amount of (model tag/joint/notetrack) strings (times 4 for index length)&lt;br /&gt;
*Byte 48-51: separator? (FF FF FF FF)&lt;br /&gt;
*Byte 52-55: number of records* (&amp;quot;2nd index&amp;quot;, times 8 for index length)&lt;br /&gt;
*Byte 56-63: separator? (FF FF FF FF FF FF FF FF)&lt;br /&gt;
*Byte 64-x: string list (xmodelsurfs?) --&amp;gt; not always, depends on the content (required offsets are in the FF header)*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; under re-investigation &amp;lt;!-- If a file was missing on ff compile, it does not count but the error message is added to the end of the file. There are usually more index entries than the number of records in the header. The given number of records is not equal to the entries in the assetinfo or assetlist file, it&#039;s usually higher. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: mp_backlot_load.ff ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Contains:&#039;&#039;&#039;&lt;br /&gt;
*2x shaders &lt;br /&gt;
*3x materials&lt;br /&gt;
*(1x fastfile name)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Materials:&lt;br /&gt;
# $victorybackdrop - mile_high_victory_screen.iwi (699,092 bytes)&lt;br /&gt;
# $defeatbackdrop - (none)&lt;br /&gt;
# $levelbriefing - loadscreen_mp_backlot.iwi (524,316 bytes)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start of file and header]&lt;br /&gt;
&lt;br /&gt;
71 03 00 00  Decompressed file size - 44 (hex: 371 + 2C = 39D; dec: 881 + 44 = 925)&lt;br /&gt;
&lt;br /&gt;
B8 AA 12 00  Size of both IWI&#039;s the materials in FF point to - 56 (2x28, 28 bytes = IWI header)&lt;br /&gt;
             0x12AAB8          = 1,223,352&lt;br /&gt;
             699,092 + 524,316 = 1,223,408&lt;br /&gt;
             difference:                56&lt;br /&gt;
&lt;br /&gt;
A4 00 00 00  Might be a flag&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
E5 00 00 00  Size of fastfile in memory (that is at least without header and separators, and maybe more)&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
&lt;br /&gt;
-----------  [end of header] (44 bytes), [start of index]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  Unknown, is sometimes FF FF FF FF&lt;br /&gt;
&lt;br /&gt;
06 00 00 00  Number of records in index (6)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  05 00 00 00  1st: shader&lt;br /&gt;
FF FF FF FF  05 00 00 00  2nd: shader&lt;br /&gt;
FF FF FF FF  04 00 00 00  3rd: material&lt;br /&gt;
FF FF FF FF  04 00 00 00  4th: material&lt;br /&gt;
FF FF FF FF  04 00 00 00  5th: material&lt;br /&gt;
FF FF FF FF  1F 00 00 00  6th: rawfile&lt;br /&gt;
&lt;br /&gt;
-----------  [end of index]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Index ==&lt;br /&gt;
&lt;br /&gt;
4 byte identifier (fastfile entry type), 4 byte offset (FF FF FF FF = -1, meaning right after the previous block?)&lt;br /&gt;
&lt;br /&gt;
Separator (FF FF FF FF) after last 4-byte couple + 00 00 00 00 ?&lt;br /&gt;
&lt;br /&gt;
=== Types ===&lt;br /&gt;
&lt;br /&gt;
* 00 00 00 01 - physpreset&lt;br /&gt;
* 00 00 00 02 - xanim&lt;br /&gt;
* 00 00 00 03 - xmodel&lt;br /&gt;
* 00 00 00 04 - material&lt;br /&gt;
* 00 00 00 05 - shader / techset&lt;br /&gt;
* 00 00 00 06 - image?&lt;br /&gt;
* 00 00 00 0B - map_ents (d3dbsp)&lt;br /&gt;
* 00 00 00 0C - related to col_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 0E - related to game_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 10 - related to col_map_mp / gfx_map (d3dbsp)&lt;br /&gt;
* 00 00 00 13 - font&lt;br /&gt;
* 00 00 00 14 - menu&lt;br /&gt;
* 00 00 00 16 - localized string asset&lt;br /&gt;
* 00 00 00 17 - physpreset??&lt;br /&gt;
* 00 00 00 19 - fx&lt;br /&gt;
* 00 00 00 1F - raw file&lt;br /&gt;
* 00 00 00 20 - stringtable (comma separated list)&lt;br /&gt;
&lt;br /&gt;
== Content ==&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 04 ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 2B 01 01  First 4 bytes seem to be 4 (unsigned) char&#039;s.&lt;br /&gt;
             1st byte is so far always 0x00 (perhaps it&#039;s a short together with the second byte).&lt;br /&gt;
             2nd byte so far either 0x2B or 0x00, I think this is a length.&lt;br /&gt;
             3rd byte so far 0x01, when 0x00 (all 4) the content is only a number of 0x00&#039;s, then the filename (0x00 termination)&lt;br /&gt;
             4th byte either 0x00 or 0x01. Can be a length or a bool.&lt;br /&gt;
             Then 0x10 bytes of more header.&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
00           When fourth byte is 01, there&#039;s a 0x00 following?             &lt;br /&gt;
             Then there&#039;s garbage (0xFF) and some shorts it looks of length in the second byte.&lt;br /&gt;
             Then more information...&lt;br /&gt;
02 00 0E E0  Often ends with this&lt;br /&gt;
&lt;br /&gt;
-----------  [end separation]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 05 (shader) ===&lt;br /&gt;
&lt;br /&gt;
A shader consists of 3 levels. One, the top level, consists of a header (with a name inside). Then the next level is a pack of shaders, it has a header, shaders and at the end a name. Then the bottom level is the shader itself, it has a header (containing a name of the source file and the length of the data) and the raw shader data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  0x24 dwords of 0x00000000 and sometimes 0xFFFFFFFF (looks like 3x 0x30 in length)&lt;br /&gt;
?? ?? .. 00  Then techset file name (0x00 termination)&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader pack]&lt;br /&gt;
&lt;br /&gt;
             1 dword of reference?&lt;br /&gt;
             1 dword of some character-length options / flags?&lt;br /&gt;
             3 dwords of references?&lt;br /&gt;
             1 dword of some character-length sizes&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
             0x64 bytes of some short length options / flags? For the first 05 entry? Or if the references above are 0xFFFFFFFF?&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader]&lt;br /&gt;
&lt;br /&gt;
             2 dwords of references&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
?? ?? 00 00  2 shorts, first short multiplied by 4 gives the length of the shader, second is a flag? When set no string follows?&lt;br /&gt;
?? ?? .. 00  String if previous second short is 00 00, 0x00 terminated (name of shader source file)&lt;br /&gt;
             Raw shader file (except the first 4 bytes, which, in the shader file, denotes the length of the file)&lt;br /&gt;
FF FF 00 00  which ends with this (always?)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shaders (go back to [start of shader]) or shaders have ended&lt;br /&gt;
&lt;br /&gt;
             Variable length of &#039;stuff&#039;, looks like it&#039;s of length of the &#039;character-length sizes&#039; added to each other in the header of a shader pack multiplied by 8&lt;br /&gt;
?? ?? .. 00  String, 0x00 terminated (technique file name)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader pack]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shader packs (go back to [start of shader pack]) or shader packs have ended&lt;br /&gt;
&lt;br /&gt;
-----------  [end separation]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 1F (rawfile) ===&lt;br /&gt;
&lt;br /&gt;
A rawfile. Often a rawfile named right after the fastfile&#039;s name is implicitly added. It contains the errors thrown when it was compiling / linking.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start separation]&lt;br /&gt;
&lt;br /&gt;
64 00 00 00  Length of the file&#039;s content (example: decimal 100; does not count the string termination!)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
&lt;br /&gt;
6D 6F 64 00  File name or if it&#039;s the last 1F-block FastFile name (example: mod.)&lt;br /&gt;
?? ?? .. 00  Plain text content of length above (string, terminated by 0x00)&lt;br /&gt;
&lt;br /&gt;
-----------  [end separation OR end of file]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--[[User:CoDEmanX|CoDEmanX]] 22:09, 4 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
--[[User:Daevius|Daevius]] 14:24, 5 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- outdated investigations below&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1F 00 00 00 FF FF FF FF  rawfile (plaintext)&lt;br /&gt;
05 00 00 00 FF FF FF FF  shader&lt;br /&gt;
03 00 00 00 FF FF FF FF  related to xmodel&lt;br /&gt;
1F 00 00 00 FF FF FF FF  xmodel data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
4A 06 00 00              rawfile length&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
6D 61 70 73 2F 6D 70 2F  filename:&lt;br /&gt;
5F 72 65 70 75 6C 73 65  maps/mp/_repulse.gsc&lt;br /&gt;
2E 67 73 63 00           followed by plaintext:&lt;br /&gt;
69 6E 69 74 28 29 0D 0A  init()..&lt;br /&gt;
7B 0D 0A 09 74 68 72 65  {...thre&lt;br /&gt;
61 64 20 70 6C 61 79 65  ad playe&lt;br /&gt;
72 63 6F 6E 6E 65 63 74  rconnect&lt;br /&gt;
28 29 3B 0D 0A ...       ();..}.&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
...                      shader (binary data)&lt;br /&gt;
&lt;br /&gt;
...                      xmodel related data&lt;br /&gt;
&lt;br /&gt;
...                      xmodel data (similar to original xmodel file, but nonetheless different)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Shaders ===&lt;br /&gt;
&lt;br /&gt;
05 00 00 00 or&lt;br /&gt;
04 00 00 00&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
9F 00 00 00  size after filename&lt;br /&gt;
&lt;br /&gt;
filename ended with 0x00&lt;br /&gt;
&lt;br /&gt;
(size * 4) bytes of shader data, seems to end with FF FF 00 00&lt;br /&gt;
might contain more data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
filename starts with &#039;,&#039;&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Technical Reference]]&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Daevius</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7150</id>
		<title>Call of Duty 4: FastFile Format</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7150"/>
		<updated>2009-11-08T14:50:52Z</updated>

		<summary type="html">&lt;p&gt;Daevius: /* 00 00 00 05 (shader) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Under Construction Small.png‎]] &#039;&#039;&#039;*** Article and investigation in early progress ***&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Preface ==&lt;br /&gt;
&lt;br /&gt;
Be aware, FF files are little endian, so swap those bytes &#039;round!&lt;br /&gt;
&lt;br /&gt;
The global file layout starts with a header. After which you get a list a model tag names, after which you get an index list. This list gives information about the rest of the file, which is a concatenation of files, most of which are reinterpreted. Each file is separated by the separation key: 0xFFFFFFFF. But be aware, each file itself can also contain such a sequence which is not meant to be the separation key! So it is necessary to understand each data type in the FF file.&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
&lt;br /&gt;
*Byte 0-3: decompressed fastfile size minus 44 (0x2C)&lt;br /&gt;
*Byte 4-7: about the total size of referenced data, e.g. the required memory for IWI textures if material files are in the ff&lt;br /&gt;
*Byte 8-11: &#039;&#039;unknown&#039;&#039;, might be a flag&lt;br /&gt;
*Byte 12-23: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 24-27: somehow related to ff size?&lt;br /&gt;
*Byte 28-43: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 44-47: equal to number of entries in &amp;quot;1st index&amp;quot; and amount of (model tag/joint/notetrack) strings (times 4 for index length)&lt;br /&gt;
*Byte 48-51: separator? (FF FF FF FF)&lt;br /&gt;
*Byte 52-55: number of records* (&amp;quot;2nd index&amp;quot;, times 8 for index length)&lt;br /&gt;
*Byte 56-63: separator? (FF FF FF FF FF FF FF FF)&lt;br /&gt;
*Byte 64-x: string list (xmodelsurfs?) --&amp;gt; not always, depends on the content (required offsets are in the FF header)*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; under re-investigation &amp;lt;!-- If a file was missing on ff compile, it does not count but the error message is added to the end of the file. There are usually more index entries than the number of records in the header. The given number of records is not equal to the entries in the assetinfo or assetlist file, it&#039;s usually higher. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: mp_backlot_load.ff ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Contains:&#039;&#039;&#039;&lt;br /&gt;
*2x shaders &lt;br /&gt;
*3x materials&lt;br /&gt;
*(1x fastfile name)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Materials:&lt;br /&gt;
# $victorybackdrop - mile_high_victory_screen.iwi (699,092 bytes)&lt;br /&gt;
# $defeatbackdrop - (none)&lt;br /&gt;
# $levelbriefing - loadscreen_mp_backlot.iwi (524,316 bytes)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start of file and header]&lt;br /&gt;
&lt;br /&gt;
71 03 00 00  Decompressed file size - 44 (hex: 371 + 2C = 39D; dec: 881 + 44 = 925)&lt;br /&gt;
&lt;br /&gt;
B8 AA 12 00  Size of both IWI&#039;s the materials in FF point to - 56 (2x28, 28 bytes = IWI header)&lt;br /&gt;
             0x12AAB8          = 1,223,352&lt;br /&gt;
             699,092 + 524,316 = 1,223,408&lt;br /&gt;
             difference:                56&lt;br /&gt;
&lt;br /&gt;
A4 00 00 00  Might be a flag&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
E5 00 00 00  Size of fastfile in memory (that is at least without header and separators, and maybe more)&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
&lt;br /&gt;
-----------  [end of header] (44 bytes), [start of index]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  Unknown, is sometimes FF FF FF FF&lt;br /&gt;
&lt;br /&gt;
06 00 00 00  Number of records in index (6)&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
&lt;br /&gt;
05 00 00 00  FF FF FF FF  1st: shader&lt;br /&gt;
05 00 00 00  FF FF FF FF  2nd: shader&lt;br /&gt;
04 00 00 00  FF FF FF FF  3rd: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  4th: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  5th: material&lt;br /&gt;
1F 00 00 00  FF FF FF FF  6th: rawfile&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
&lt;br /&gt;
-----------  [end of index]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Index ==&lt;br /&gt;
&lt;br /&gt;
4 byte identifier (fastfile entry type), 4 byte offset (FF FF FF FF = -1, meaning right after the previous block?)&lt;br /&gt;
&lt;br /&gt;
Separator (FF FF FF FF) after last 4-byte couple + 00 00 00 00 ?&lt;br /&gt;
&lt;br /&gt;
=== Types ===&lt;br /&gt;
&lt;br /&gt;
* 00 00 00 01 - physpreset&lt;br /&gt;
* 00 00 00 02 - xanim&lt;br /&gt;
* 00 00 00 03 - xmodel&lt;br /&gt;
* 00 00 00 04 - material&lt;br /&gt;
* 00 00 00 05 - shader / techset&lt;br /&gt;
* 00 00 00 06 - image?&lt;br /&gt;
* 00 00 00 0B - map_ents (d3dbsp)&lt;br /&gt;
* 00 00 00 0C - related to col_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 0E - related to game_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 10 - related to col_map_mp / gfx_map (d3dbsp)&lt;br /&gt;
* 00 00 00 13 - font&lt;br /&gt;
* 00 00 00 14 - menu&lt;br /&gt;
* 00 00 00 16 - localized string asset&lt;br /&gt;
* 00 00 00 17 - physpreset??&lt;br /&gt;
* 00 00 00 19 - fx&lt;br /&gt;
* 00 00 00 1F - raw file&lt;br /&gt;
* 00 00 00 20 - stringtable (comma separated list)&lt;br /&gt;
&lt;br /&gt;
== Content ==&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 04 ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 2B 01 01  First 4 bytes seem to be 4 (unsigned) char&#039;s.&lt;br /&gt;
             1st byte is so far always 0x00 (perhaps it&#039;s a short together with the second byte).&lt;br /&gt;
             2nd byte so far either 0x2B or 0x00, I think this is a length.&lt;br /&gt;
             3rd byte so far 0x01, when 0x00 (all 4) the content is only a number of 0x00&#039;s, then the filename (0x00 termination)&lt;br /&gt;
             4th byte either 0x00 or 0x01. Can be a length or a bool.&lt;br /&gt;
             Then 0x10 bytes of more header.&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
00           When fourth byte is 01, there&#039;s a 0x00 following?             &lt;br /&gt;
             Then there&#039;s garbage (0xFF) and some shorts it looks of length in the second byte.&lt;br /&gt;
             Then more information...&lt;br /&gt;
02 00 0E E0  Often ends with this&lt;br /&gt;
&lt;br /&gt;
-----------  [end separation]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 05 (shader) ===&lt;br /&gt;
&lt;br /&gt;
A shader consists of 3 levels. One, the top level, consists of a header (with a name inside). Then the next level is a pack of shaders, it has a header, shaders and at the end a name. Then the bottom level is the shader itself, it has a header (containing a name of the source file and the length of the data) and the raw shader data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  0x24 dwords of 0x00000000 and sometimes 0xFFFFFFFF (looks like 3x 0x30 in length)&lt;br /&gt;
?? ?? .. 00  Then techset file name (0x00 termination)&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader pack]&lt;br /&gt;
&lt;br /&gt;
             1 dword of reference?&lt;br /&gt;
             1 dword of some character-length options / flags?&lt;br /&gt;
             3 dwords of references?&lt;br /&gt;
             1 dword of some character-length sizes&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
             0x64 bytes of some short length options / flags? For the first 05 entry? Or if the references above are 0xFFFFFFFF?&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader]&lt;br /&gt;
&lt;br /&gt;
             2 dwords of references&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
?? ?? 00 00  2 shorts, first short multiplied by 4 gives the length of the shader, second is a flag? When set no string follows?&lt;br /&gt;
?? ?? .. 00  String if previous second short is 00 00, 0x00 terminated (name of shader source file)&lt;br /&gt;
             Raw shader file (except the first 4 bytes, which, in the shader file, denotes the length of the file)&lt;br /&gt;
FF FF 00 00  which ends with this (always?)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shaders (go back to [start of shader]) or shaders have ended&lt;br /&gt;
&lt;br /&gt;
             Variable length of &#039;stuff&#039;, looks like it&#039;s of length of the &#039;character-length sizes&#039; added to each other in the header of a shader pack multiplied by 8&lt;br /&gt;
?? ?? .. 00  String, 0x00 terminated (technique file name)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader pack]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shader packs (go back to [start of shader pack]) or shader packs have ended&lt;br /&gt;
&lt;br /&gt;
-----------  [end separation]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 1F (rawfile) ===&lt;br /&gt;
&lt;br /&gt;
A rawfile. Often a rawfile named right after the fastfile&#039;s name is implicitly added. It contains the errors thrown when it was compiling / linking.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start separation]&lt;br /&gt;
&lt;br /&gt;
64 00 00 00  Length of the file&#039;s content (example: decimal 100; does not count the string termination!)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
&lt;br /&gt;
6D 6F 64 00  File name or if it&#039;s the last 1F-block FastFile name (example: mod.)&lt;br /&gt;
?? ?? .. 00  Plain text content of length above (string, terminated by 0x00)&lt;br /&gt;
&lt;br /&gt;
-----------  [end separation OR end of file]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--[[User:CoDEmanX|CoDEmanX]] 22:09, 4 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
--[[User:Daevius|Daevius]] 14:24, 5 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- outdated investigations below&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1F 00 00 00 FF FF FF FF  rawfile (plaintext)&lt;br /&gt;
05 00 00 00 FF FF FF FF  shader&lt;br /&gt;
03 00 00 00 FF FF FF FF  related to xmodel&lt;br /&gt;
1F 00 00 00 FF FF FF FF  xmodel data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
4A 06 00 00              rawfile length&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
6D 61 70 73 2F 6D 70 2F  filename:&lt;br /&gt;
5F 72 65 70 75 6C 73 65  maps/mp/_repulse.gsc&lt;br /&gt;
2E 67 73 63 00           followed by plaintext:&lt;br /&gt;
69 6E 69 74 28 29 0D 0A  init()..&lt;br /&gt;
7B 0D 0A 09 74 68 72 65  {...thre&lt;br /&gt;
61 64 20 70 6C 61 79 65  ad playe&lt;br /&gt;
72 63 6F 6E 6E 65 63 74  rconnect&lt;br /&gt;
28 29 3B 0D 0A ...       ();..}.&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
...                      shader (binary data)&lt;br /&gt;
&lt;br /&gt;
...                      xmodel related data&lt;br /&gt;
&lt;br /&gt;
...                      xmodel data (similar to original xmodel file, but nonetheless different)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Shaders ===&lt;br /&gt;
&lt;br /&gt;
05 00 00 00 or&lt;br /&gt;
04 00 00 00&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
9F 00 00 00  size after filename&lt;br /&gt;
&lt;br /&gt;
filename ended with 0x00&lt;br /&gt;
&lt;br /&gt;
(size * 4) bytes of shader data, seems to end with FF FF 00 00&lt;br /&gt;
might contain more data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
filename starts with &#039;,&#039;&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Technical Reference]]&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Daevius</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7148</id>
		<title>Call of Duty 4: FastFile Format</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7148"/>
		<updated>2009-11-08T14:40:52Z</updated>

		<summary type="html">&lt;p&gt;Daevius: /* 00 00 00 05 (shader) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Under Construction Small.png‎]] &#039;&#039;&#039;*** Article and investigation in early progress ***&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Preface ==&lt;br /&gt;
&lt;br /&gt;
Be aware, FF files are little endian, so swap those bytes &#039;round!&lt;br /&gt;
&lt;br /&gt;
The global file layout starts with a header. After which you get a list a model tag names, after which you get an index list. This list gives information about the rest of the file, which is a concatenation of files, most of which are reinterpreted. Each file is separated by the separation key: 0xFFFFFFFF. But be aware, each file itself can also contain such a sequence which is not meant to be the separation key! So it is necessary to understand each data type in the FF file.&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
&lt;br /&gt;
*Byte 0-3: decompressed fastfile size minus 44 (0x2C)&lt;br /&gt;
*Byte 4-7: about the total size of referenced data, e.g. the required memory for IWI textures if material files are in the ff&lt;br /&gt;
*Byte 8-11: &#039;&#039;unknown&#039;&#039;, might be a flag&lt;br /&gt;
*Byte 12-23: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 24-27: somehow related to ff size?&lt;br /&gt;
*Byte 28-43: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 44-47: equal to number of entries in &amp;quot;1st index&amp;quot; and amount of (model tag/joint/notetrack) strings (times 4 for index length)&lt;br /&gt;
*Byte 48-51: separator? (FF FF FF FF)&lt;br /&gt;
*Byte 52-55: number of records* (&amp;quot;2nd index&amp;quot;, times 8 for index length)&lt;br /&gt;
*Byte 56-63: separator? (FF FF FF FF FF FF FF FF)&lt;br /&gt;
*Byte 64-x: string list (xmodelsurfs?) --&amp;gt; not always, depends on the content (required offsets are in the FF header)*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; under re-investigation &amp;lt;!-- If a file was missing on ff compile, it does not count but the error message is added to the end of the file. There are usually more index entries than the number of records in the header. The given number of records is not equal to the entries in the assetinfo or assetlist file, it&#039;s usually higher. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: mp_backlot_load.ff ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Contains:&#039;&#039;&#039;&lt;br /&gt;
*2x shaders &lt;br /&gt;
*3x materials&lt;br /&gt;
*(1x fastfile name)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Materials:&lt;br /&gt;
# $victorybackdrop - mile_high_victory_screen.iwi (699,092 bytes)&lt;br /&gt;
# $defeatbackdrop - (none)&lt;br /&gt;
# $levelbriefing - loadscreen_mp_backlot.iwi (524,316 bytes)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start of file and header]&lt;br /&gt;
&lt;br /&gt;
71 03 00 00  Decompressed file size - 44 (hex: 371 + 2C = 39D; dec: 881 + 44 = 925)&lt;br /&gt;
&lt;br /&gt;
B8 AA 12 00  Size of both IWI&#039;s the materials in FF point to - 56 (2x28, 28 bytes = IWI header)&lt;br /&gt;
             0x12AAB8          = 1,223,352&lt;br /&gt;
             699,092 + 524,316 = 1,223,408&lt;br /&gt;
             difference:                56&lt;br /&gt;
&lt;br /&gt;
A4 00 00 00  Might be a flag&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
E5 00 00 00  Size of fastfile in memory (that is at least without header and separators, and maybe more)&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
&lt;br /&gt;
-----------  [end of header] (44 bytes), [start of index]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  Unknown, is sometimes FF FF FF FF&lt;br /&gt;
&lt;br /&gt;
06 00 00 00  Number of records in index (6)&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
&lt;br /&gt;
05 00 00 00  FF FF FF FF  1st: shader&lt;br /&gt;
05 00 00 00  FF FF FF FF  2nd: shader&lt;br /&gt;
04 00 00 00  FF FF FF FF  3rd: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  4th: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  5th: material&lt;br /&gt;
1F 00 00 00  FF FF FF FF  6th: rawfile&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
&lt;br /&gt;
-----------  [end of index]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Index ==&lt;br /&gt;
&lt;br /&gt;
4 byte identifier (fastfile entry type), 4 byte offset (FF FF FF FF = -1, meaning right after the previous block?)&lt;br /&gt;
&lt;br /&gt;
Separator (FF FF FF FF) after last 4-byte couple + 00 00 00 00 ?&lt;br /&gt;
&lt;br /&gt;
=== Types ===&lt;br /&gt;
&lt;br /&gt;
* 00 00 00 01 - physpreset&lt;br /&gt;
* 00 00 00 02 - xanim&lt;br /&gt;
* 00 00 00 03 - xmodel&lt;br /&gt;
* 00 00 00 04 - material&lt;br /&gt;
* 00 00 00 05 - shader / techset&lt;br /&gt;
* 00 00 00 06 - image?&lt;br /&gt;
* 00 00 00 0B - map_ents (d3dbsp)&lt;br /&gt;
* 00 00 00 0C - related to col_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 0E - related to game_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 10 - related to col_map_mp / gfx_map (d3dbsp)&lt;br /&gt;
* 00 00 00 13 - font&lt;br /&gt;
* 00 00 00 14 - menu&lt;br /&gt;
* 00 00 00 16 - localized string asset&lt;br /&gt;
* 00 00 00 17 - physpreset??&lt;br /&gt;
* 00 00 00 19 - fx&lt;br /&gt;
* 00 00 00 1F - raw file&lt;br /&gt;
* 00 00 00 20 - stringtable (comma separated list)&lt;br /&gt;
&lt;br /&gt;
== Content ==&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 04 ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 2B 01 01  First 4 bytes seem to be 4 (unsigned) char&#039;s.&lt;br /&gt;
             1st byte is so far always 0x00 (perhaps it&#039;s a short together with the second byte).&lt;br /&gt;
             2nd byte so far either 0x2B or 0x00, I think this is a length.&lt;br /&gt;
             3rd byte so far 0x01, when 0x00 (all 4) the content is only a number of 0x00&#039;s, then the filename (0x00 termination)&lt;br /&gt;
             4th byte either 0x00 or 0x01. Can be a length or a bool.&lt;br /&gt;
             Then 0x10 bytes of more header.&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
00           When fourth byte is 01, there&#039;s a 0x00 following?             &lt;br /&gt;
             Then there&#039;s garbage (0xFF) and some shorts it looks of length in the second byte.&lt;br /&gt;
             Then more information...&lt;br /&gt;
02 00 0E E0  Often ends with this&lt;br /&gt;
&lt;br /&gt;
-----------  [end separation]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 05 (shader) ===&lt;br /&gt;
&lt;br /&gt;
A shader consists of 3 levels. One, the top level, consists of a header (with a name inside). Then the next level is a pack of shaders, it has a header, shaders and at the end a name. Then the bottom level is the shader itself, it has a header (containing a name of the source file and the length of the data) and the raw shader data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  0x24 dwords of 0x00000000 and sometimes 0xFFFFFFFF (looks like 3x 0x30 in length)&lt;br /&gt;
?? ?? .. 00  Then techset file name (0x00 termination)&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader pack]&lt;br /&gt;
&lt;br /&gt;
             1 dword of reference?&lt;br /&gt;
             1 dword of some character-length options / flags?&lt;br /&gt;
             3 dwords of references?&lt;br /&gt;
             1 dword of some character-length sizes&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
             0x64 bytes of some short length options / flags? For the first 05 entry? Or if the references above are 0xFFFFFFFF?&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader]&lt;br /&gt;
&lt;br /&gt;
             2 dwords of references&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
?? ?? 00 00  2 shorts, first short multiplied by 4 gives the length of the shader, second is a flag? When set no string follows?&lt;br /&gt;
?? ?? .. 00  String if previous second short is 00 00, 0x00 terminated (name of source file)&lt;br /&gt;
             Raw shader file (except the first 4 bytes, which, in the shader file, denotes the length of the file)&lt;br /&gt;
FF FF 00 00  which ends with this (always?)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shaders (go back to [start of shader]) or shaders have ended&lt;br /&gt;
&lt;br /&gt;
             Variable length of &#039;stuff&#039;, looks like it&#039;s of length of the &#039;character-length sizes&#039; added to each other in the header of a shader pack multiplied by 8&lt;br /&gt;
?? ?? .. 00  String, 0x00 terminated (probably in-game usage name)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader pack]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shader packs (go back to [start of shader pack]) or shader packs have ended&lt;br /&gt;
&lt;br /&gt;
-----------  [end separation]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 1F (rawfile) ===&lt;br /&gt;
&lt;br /&gt;
A rawfile. Often a rawfile named right after the fastfile&#039;s name is implicitly added. It contains the errors thrown when it was compiling / linking.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start separation]&lt;br /&gt;
&lt;br /&gt;
64 00 00 00  Length of the file&#039;s content (example: decimal 100; does not count the string termination!)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
&lt;br /&gt;
6D 6F 64 00  File name or if it&#039;s the last 1F-block FastFile name (example: mod.)&lt;br /&gt;
?? ?? .. 00  Plain text content of length above (string, terminated by 0x00)&lt;br /&gt;
&lt;br /&gt;
-----------  [end separation OR end of file]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--[[User:CoDEmanX|CoDEmanX]] 22:09, 4 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
--[[User:Daevius|Daevius]] 14:24, 5 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- outdated investigations below&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1F 00 00 00 FF FF FF FF  rawfile (plaintext)&lt;br /&gt;
05 00 00 00 FF FF FF FF  shader&lt;br /&gt;
03 00 00 00 FF FF FF FF  related to xmodel&lt;br /&gt;
1F 00 00 00 FF FF FF FF  xmodel data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
4A 06 00 00              rawfile length&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
6D 61 70 73 2F 6D 70 2F  filename:&lt;br /&gt;
5F 72 65 70 75 6C 73 65  maps/mp/_repulse.gsc&lt;br /&gt;
2E 67 73 63 00           followed by plaintext:&lt;br /&gt;
69 6E 69 74 28 29 0D 0A  init()..&lt;br /&gt;
7B 0D 0A 09 74 68 72 65  {...thre&lt;br /&gt;
61 64 20 70 6C 61 79 65  ad playe&lt;br /&gt;
72 63 6F 6E 6E 65 63 74  rconnect&lt;br /&gt;
28 29 3B 0D 0A ...       ();..}.&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
...                      shader (binary data)&lt;br /&gt;
&lt;br /&gt;
...                      xmodel related data&lt;br /&gt;
&lt;br /&gt;
...                      xmodel data (similar to original xmodel file, but nonetheless different)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Shaders ===&lt;br /&gt;
&lt;br /&gt;
05 00 00 00 or&lt;br /&gt;
04 00 00 00&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
9F 00 00 00  size after filename&lt;br /&gt;
&lt;br /&gt;
filename ended with 0x00&lt;br /&gt;
&lt;br /&gt;
(size * 4) bytes of shader data, seems to end with FF FF 00 00&lt;br /&gt;
might contain more data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
filename starts with &#039;,&#039;&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Technical Reference]]&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Daevius</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7145</id>
		<title>Call of Duty 4: FastFile Format</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7145"/>
		<updated>2009-11-08T14:25:23Z</updated>

		<summary type="html">&lt;p&gt;Daevius: /* 00 00 00 05 (shader) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Under Construction Small.png‎]] &#039;&#039;&#039;*** Article and investigation in early progress ***&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Preface ==&lt;br /&gt;
&lt;br /&gt;
Be aware, FF files are little endian, so swap those bytes &#039;round!&lt;br /&gt;
&lt;br /&gt;
The global file layout starts with a header. After which you get a list a model tag names, after which you get an index list. This list gives information about the rest of the file, which is a concatenation of files, most of which are reinterpreted. Each file is separated by the separation key: 0xFFFFFFFF. But be aware, each file itself can also contain such a sequence which is not meant to be the separation key! So it is necessary to understand each data type in the FF file.&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
&lt;br /&gt;
*Byte 0-3: decompressed fastfile size minus 44 (0x2C)&lt;br /&gt;
*Byte 4-7: about the total size of referenced data, e.g. the required memory for IWI textures if material files are in the ff&lt;br /&gt;
*Byte 8-11: &#039;&#039;unknown&#039;&#039;, might be a flag&lt;br /&gt;
*Byte 12-23: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 24-27: somehow related to ff size?&lt;br /&gt;
*Byte 28-43: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 44-47: equal to number of entries in &amp;quot;1st index&amp;quot; and amount of (model tag/joint/notetrack) strings (times 4 for index length)&lt;br /&gt;
*Byte 48-51: separator? (FF FF FF FF)&lt;br /&gt;
*Byte 52-55: number of records* (&amp;quot;2nd index&amp;quot;, times 8 for index length)&lt;br /&gt;
*Byte 56-63: separator? (FF FF FF FF FF FF FF FF)&lt;br /&gt;
*Byte 64-x: string list (xmodelsurfs?) --&amp;gt; not always, depends on the content (required offsets are in the FF header)*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; under re-investigation &amp;lt;!-- If a file was missing on ff compile, it does not count but the error message is added to the end of the file. There are usually more index entries than the number of records in the header. The given number of records is not equal to the entries in the assetinfo or assetlist file, it&#039;s usually higher. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: mp_backlot_load.ff ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Contains:&#039;&#039;&#039;&lt;br /&gt;
*2x shaders &lt;br /&gt;
*3x materials&lt;br /&gt;
*(1x fastfile name)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Materials:&lt;br /&gt;
# $victorybackdrop - mile_high_victory_screen.iwi (699,092 bytes)&lt;br /&gt;
# $defeatbackdrop - (none)&lt;br /&gt;
# $levelbriefing - loadscreen_mp_backlot.iwi (524,316 bytes)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start of file and header]&lt;br /&gt;
&lt;br /&gt;
71 03 00 00  Decompressed file size - 44 (hex: 371 + 2C = 39D; dec: 881 + 44 = 925)&lt;br /&gt;
&lt;br /&gt;
B8 AA 12 00  Size of both IWI&#039;s the materials in FF point to - 56 (2x28, 28 bytes = IWI header)&lt;br /&gt;
             0x12AAB8          = 1,223,352&lt;br /&gt;
             699,092 + 524,316 = 1,223,408&lt;br /&gt;
             difference:                56&lt;br /&gt;
&lt;br /&gt;
A4 00 00 00  Might be a flag&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
E5 00 00 00  Size of fastfile in memory (that is at least without header and separators, and maybe more)&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
&lt;br /&gt;
-----------  [end of header] (44 bytes), [start of index]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  Unknown, is sometimes FF FF FF FF&lt;br /&gt;
&lt;br /&gt;
06 00 00 00  Number of records in index (6)&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
&lt;br /&gt;
05 00 00 00  FF FF FF FF  1st: shader&lt;br /&gt;
05 00 00 00  FF FF FF FF  2nd: shader&lt;br /&gt;
04 00 00 00  FF FF FF FF  3rd: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  4th: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  5th: material&lt;br /&gt;
1F 00 00 00  FF FF FF FF  6th: rawfile&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
&lt;br /&gt;
-----------  [end of index]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Index ==&lt;br /&gt;
&lt;br /&gt;
4 byte identifier (fastfile entry type), 4 byte offset (FF FF FF FF = -1, meaning right after the previous block?)&lt;br /&gt;
&lt;br /&gt;
Separator (FF FF FF FF) after last 4-byte couple + 00 00 00 00 ?&lt;br /&gt;
&lt;br /&gt;
=== Types ===&lt;br /&gt;
&lt;br /&gt;
* 00 00 00 01 - physpreset&lt;br /&gt;
* 00 00 00 02 - xanim&lt;br /&gt;
* 00 00 00 03 - xmodel&lt;br /&gt;
* 00 00 00 04 - material&lt;br /&gt;
* 00 00 00 05 - shader / techset&lt;br /&gt;
* 00 00 00 06 - image?&lt;br /&gt;
* 00 00 00 0B - map_ents (d3dbsp)&lt;br /&gt;
* 00 00 00 0C - related to col_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 0E - related to game_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 10 - related to col_map_mp / gfx_map (d3dbsp)&lt;br /&gt;
* 00 00 00 13 - font&lt;br /&gt;
* 00 00 00 14 - menu&lt;br /&gt;
* 00 00 00 16 - localized string asset&lt;br /&gt;
* 00 00 00 17 - physpreset??&lt;br /&gt;
* 00 00 00 19 - fx&lt;br /&gt;
* 00 00 00 1F - raw file&lt;br /&gt;
* 00 00 00 20 - stringtable (comma separated list)&lt;br /&gt;
&lt;br /&gt;
== Content ==&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 04 ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 2B 01 01  First 4 bytes seem to be 4 (unsigned) char&#039;s.&lt;br /&gt;
             1st byte is so far always 0x00 (perhaps it&#039;s a short together with the second byte).&lt;br /&gt;
             2nd byte so far either 0x2B or 0x00, I think this is a length.&lt;br /&gt;
             3rd byte so far 0x01, when 0x00 (all 4) the content is only a number of 0x00&#039;s, then the filename (0x00 termination)&lt;br /&gt;
             4th byte either 0x00 or 0x01. Can be a length or a bool.&lt;br /&gt;
             Then 0x10 bytes of more header.&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
00           When fourth byte is 01, there&#039;s a 0x00 following?             &lt;br /&gt;
             Then there&#039;s garbage (0xFF) and some shorts it looks of length in the second byte.&lt;br /&gt;
             Then more information...&lt;br /&gt;
02 00 0E E0  Often ends with this&lt;br /&gt;
&lt;br /&gt;
-----------  [end separation]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 05 (shader) ===&lt;br /&gt;
&lt;br /&gt;
A shader consists of 3 levels. One, the top level, consists of a header (with a name inside). Then the next level is a pack of shaders, it has a header, shaders and at the end a name. Then the bottom level is the shader itself, it has a header (containing a name of the source file and the length of the data) and the raw shader data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  0x24 dwords of 0x00000000 and sometimes 0xFFFFFFFF (looks like 3x 0x30 in length)&lt;br /&gt;
?? ?? .. 00  Then (file) name (0x00 termination)&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader pack]&lt;br /&gt;
&lt;br /&gt;
             1 dword of reference?&lt;br /&gt;
             1 dword of some character-length options / flags?&lt;br /&gt;
             3 dwords of references?&lt;br /&gt;
             1 dword of some character-length sizes&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
             0x64 bytes of some short length options / flags? For the first 05 entry? Or if the references above are 0xFFFFFFFF?&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader]&lt;br /&gt;
&lt;br /&gt;
             2 dwords of references&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
?? ?? 00 00  2 shorts, first short multiplied by 4 gives the length of the shader, second is a flag? When set no string follows?&lt;br /&gt;
?? ?? .. 00  String if previous second short is 00 00, 0x00 terminated (name of source file)&lt;br /&gt;
             Raw shader file (except the first 4 bytes, which, in the shader file, denotes the length of the file)&lt;br /&gt;
FF FF 00 00  which ends with this (always?)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shaders (go back to [start of shader]) or shaders have ended&lt;br /&gt;
&lt;br /&gt;
             Variable length of &#039;stuff&#039;, looks like it&#039;s of length of the &#039;character-length sizes&#039; added to each other in the header of a shader pack multiplied by 8&lt;br /&gt;
?? ?? .. 00  String, 0x00 terminated (probably in-game usage name)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader pack]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shader packs (go back to [start of shader pack]) or shader packs have ended&lt;br /&gt;
&lt;br /&gt;
-----------  [end separation]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 1F (rawfile) ===&lt;br /&gt;
&lt;br /&gt;
A rawfile. Often a rawfile named right after the fastfile&#039;s name is implicitly added. It contains the errors thrown when it was compiling / linking.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start separation]&lt;br /&gt;
&lt;br /&gt;
64 00 00 00  Length of the file&#039;s content (example: decimal 100; does not count the string termination!)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
&lt;br /&gt;
6D 6F 64 00  File name or if it&#039;s the last 1F-block FastFile name (example: mod.)&lt;br /&gt;
?? ?? .. 00  Plain text content of length above (string, terminated by 0x00)&lt;br /&gt;
&lt;br /&gt;
-----------  [end separation OR end of file]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--[[User:CoDEmanX|CoDEmanX]] 22:09, 4 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
--[[User:Daevius|Daevius]] 14:24, 5 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- outdated investigations below&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1F 00 00 00 FF FF FF FF  rawfile (plaintext)&lt;br /&gt;
05 00 00 00 FF FF FF FF  shader&lt;br /&gt;
03 00 00 00 FF FF FF FF  related to xmodel&lt;br /&gt;
1F 00 00 00 FF FF FF FF  xmodel data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
4A 06 00 00              rawfile length&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
6D 61 70 73 2F 6D 70 2F  filename:&lt;br /&gt;
5F 72 65 70 75 6C 73 65  maps/mp/_repulse.gsc&lt;br /&gt;
2E 67 73 63 00           followed by plaintext:&lt;br /&gt;
69 6E 69 74 28 29 0D 0A  init()..&lt;br /&gt;
7B 0D 0A 09 74 68 72 65  {...thre&lt;br /&gt;
61 64 20 70 6C 61 79 65  ad playe&lt;br /&gt;
72 63 6F 6E 6E 65 63 74  rconnect&lt;br /&gt;
28 29 3B 0D 0A ...       ();..}.&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
...                      shader (binary data)&lt;br /&gt;
&lt;br /&gt;
...                      xmodel related data&lt;br /&gt;
&lt;br /&gt;
...                      xmodel data (similar to original xmodel file, but nonetheless different)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Shaders ===&lt;br /&gt;
&lt;br /&gt;
05 00 00 00 or&lt;br /&gt;
04 00 00 00&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
9F 00 00 00  size after filename&lt;br /&gt;
&lt;br /&gt;
filename ended with 0x00&lt;br /&gt;
&lt;br /&gt;
(size * 4) bytes of shader data, seems to end with FF FF 00 00&lt;br /&gt;
might contain more data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
filename starts with &#039;,&#039;&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Technical Reference]]&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Daevius</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7144</id>
		<title>Call of Duty 4: FastFile Format</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7144"/>
		<updated>2009-11-08T14:07:51Z</updated>

		<summary type="html">&lt;p&gt;Daevius: /* 00 00 00 05 (shader) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Under Construction Small.png‎]] &#039;&#039;&#039;*** Article and investigation in early progress ***&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Preface ==&lt;br /&gt;
&lt;br /&gt;
Be aware, FF files are little endian, so swap those bytes &#039;round!&lt;br /&gt;
&lt;br /&gt;
The global file layout starts with a header. After which you get a list a model tag names, after which you get an index list. This list gives information about the rest of the file, which is a concatenation of files, most of which are reinterpreted. Each file is separated by the separation key: 0xFFFFFFFF. But be aware, each file itself can also contain such a sequence which is not meant to be the separation key! So it is necessary to understand each data type in the FF file.&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
&lt;br /&gt;
*Byte 0-3: decompressed fastfile size minus 44 (0x2C)&lt;br /&gt;
*Byte 4-7: about the total size of referenced data, e.g. the required memory for IWI textures if material files are in the ff&lt;br /&gt;
*Byte 8-11: &#039;&#039;unknown&#039;&#039;, might be a flag&lt;br /&gt;
*Byte 12-23: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 24-27: somehow related to ff size?&lt;br /&gt;
*Byte 28-43: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 44-47: equal to number of entries in &amp;quot;1st index&amp;quot; and amount of (model tag/joint/notetrack) strings (times 4 for index length)&lt;br /&gt;
*Byte 48-51: separator? (FF FF FF FF)&lt;br /&gt;
*Byte 52-55: number of records* (&amp;quot;2nd index&amp;quot;, times 8 for index length)&lt;br /&gt;
*Byte 56-63: separator? (FF FF FF FF FF FF FF FF)&lt;br /&gt;
*Byte 64-x: string list (xmodelsurfs?) --&amp;gt; not always, depends on the content (required offsets are in the FF header)*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; under re-investigation &amp;lt;!-- If a file was missing on ff compile, it does not count but the error message is added to the end of the file. There are usually more index entries than the number of records in the header. The given number of records is not equal to the entries in the assetinfo or assetlist file, it&#039;s usually higher. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: mp_backlot_load.ff ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Contains:&#039;&#039;&#039;&lt;br /&gt;
*2x shaders &lt;br /&gt;
*3x materials&lt;br /&gt;
*(1x fastfile name)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Materials:&lt;br /&gt;
# $victorybackdrop - mile_high_victory_screen.iwi (699,092 bytes)&lt;br /&gt;
# $defeatbackdrop - (none)&lt;br /&gt;
# $levelbriefing - loadscreen_mp_backlot.iwi (524,316 bytes)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start of file and header]&lt;br /&gt;
&lt;br /&gt;
71 03 00 00  Decompressed file size - 44 (hex: 371 + 2C = 39D; dec: 881 + 44 = 925)&lt;br /&gt;
&lt;br /&gt;
B8 AA 12 00  Size of both IWI&#039;s the materials in FF point to - 56 (2x28, 28 bytes = IWI header)&lt;br /&gt;
             0x12AAB8          = 1,223,352&lt;br /&gt;
             699,092 + 524,316 = 1,223,408&lt;br /&gt;
             difference:                56&lt;br /&gt;
&lt;br /&gt;
A4 00 00 00  Might be a flag&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
E5 00 00 00  Size of fastfile in memory (that is at least without header and separators, and maybe more)&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
&lt;br /&gt;
-----------  [end of header] (44 bytes), [start of index]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  Unknown, is sometimes FF FF FF FF&lt;br /&gt;
&lt;br /&gt;
06 00 00 00  Number of records in index (6)&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
&lt;br /&gt;
05 00 00 00  FF FF FF FF  1st: shader&lt;br /&gt;
05 00 00 00  FF FF FF FF  2nd: shader&lt;br /&gt;
04 00 00 00  FF FF FF FF  3rd: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  4th: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  5th: material&lt;br /&gt;
1F 00 00 00  FF FF FF FF  6th: rawfile&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
&lt;br /&gt;
-----------  [end of index]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Index ==&lt;br /&gt;
&lt;br /&gt;
4 byte identifier (fastfile entry type), 4 byte offset (FF FF FF FF = -1, meaning right after the previous block?)&lt;br /&gt;
&lt;br /&gt;
Separator (FF FF FF FF) after last 4-byte couple + 00 00 00 00 ?&lt;br /&gt;
&lt;br /&gt;
=== Types ===&lt;br /&gt;
&lt;br /&gt;
* 00 00 00 01 - physpreset&lt;br /&gt;
* 00 00 00 02 - xanim&lt;br /&gt;
* 00 00 00 03 - xmodel&lt;br /&gt;
* 00 00 00 04 - material&lt;br /&gt;
* 00 00 00 05 - shader / techset&lt;br /&gt;
* 00 00 00 06 - image?&lt;br /&gt;
* 00 00 00 0B - map_ents (d3dbsp)&lt;br /&gt;
* 00 00 00 0C - related to col_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 0E - related to game_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 10 - related to col_map_mp / gfx_map (d3dbsp)&lt;br /&gt;
* 00 00 00 13 - font&lt;br /&gt;
* 00 00 00 14 - menu&lt;br /&gt;
* 00 00 00 16 - localized string asset&lt;br /&gt;
* 00 00 00 17 - physpreset??&lt;br /&gt;
* 00 00 00 19 - fx&lt;br /&gt;
* 00 00 00 1F - raw file&lt;br /&gt;
* 00 00 00 20 - stringtable (comma separated list)&lt;br /&gt;
&lt;br /&gt;
== Content ==&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 04 ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 2B 01 01  First 4 bytes seem to be 4 (unsigned) char&#039;s.&lt;br /&gt;
             1st byte is so far always 0x00 (perhaps it&#039;s a short together with the second byte).&lt;br /&gt;
             2nd byte so far either 0x2B or 0x00, I think this is a length.&lt;br /&gt;
             3rd byte so far 0x01, when 0x00 (all 4) the content is only a number of 0x00&#039;s, then the filename (0x00 termination)&lt;br /&gt;
             4th byte either 0x00 or 0x01. Can be a length or a bool.&lt;br /&gt;
             Then 0x10 bytes of more header.&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
00           When fourth byte is 01, there&#039;s a 0x00 following?             &lt;br /&gt;
             Then there&#039;s garbage (0xFF) and some shorts it looks of length in the second byte.&lt;br /&gt;
             Then more information...&lt;br /&gt;
02 00 0E E0  Often ends with this&lt;br /&gt;
&lt;br /&gt;
-----------  [end separation]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 05 (shader) ===&lt;br /&gt;
&lt;br /&gt;
A shader consists of 3 levels. One, the top level, consists of a header (with a name inside). Then the next level is a pack of shaders, it has a header, shaders and at the end a name. Then the bottom level is the shader itself, it has a header (containing a name of the source file and the length of the data) and the raw shader data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  0x24 dwords of 0x00000000 and sometimes 0xFFFFFFFF (looks like 3x 0x30 in length)&lt;br /&gt;
?? ?? .. 00  Then (file) name (0x00 termination)&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader pack]&lt;br /&gt;
&lt;br /&gt;
             1 dword of reference?&lt;br /&gt;
             1 dword of some character-length options / flags?&lt;br /&gt;
             3 dwords of references?&lt;br /&gt;
             1 dword of some character-length sizes&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
             0x19 dwords of some short length options / flags? For the first 05 entry? Or if the references above are 0xFFFFFFFF?&lt;br /&gt;
FF FF FF FF  Separator for the first 05 entry? Or if the references above are 0xFFFFFFFF?&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader]&lt;br /&gt;
&lt;br /&gt;
             2 dwords of references&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
?? ?? 00 00  2 shorts, first short multiplied by 4 gives the length of the shader, second is a flag? When set no string follows?&lt;br /&gt;
?? ?? .. 00  String if previous second short is 00 00, 0x00 terminated (name of source file)&lt;br /&gt;
             Raw shader file (except the first 4 bytes, which, in the shader file, denotes the length of the file)&lt;br /&gt;
FF FF 00 00  which ends with this (always?)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shaders (go back to [start of shader]) or shaders have ended&lt;br /&gt;
&lt;br /&gt;
             Variable length of &#039;stuff&#039;, looks like it&#039;s of length of the &#039;character-length sizes&#039; added to each other in the header of a shader pack multiplied by 8&lt;br /&gt;
?? ?? .. 00  String, 0x00 terminated (probably in-game usage name)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader pack]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shader packs (go back to [start of shader pack]) or shader packs have ended&lt;br /&gt;
&lt;br /&gt;
-----------  [end separation]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 1F (rawfile) ===&lt;br /&gt;
&lt;br /&gt;
A rawfile. Often a rawfile named right after the fastfile&#039;s name is implicitly added. It contains the errors thrown when it was compiling / linking.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start separation]&lt;br /&gt;
&lt;br /&gt;
64 00 00 00  Length of the file&#039;s content (example: decimal 100; does not count the string termination!)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
&lt;br /&gt;
6D 6F 64 00  File name or if it&#039;s the last 1F-block FastFile name (example: mod.)&lt;br /&gt;
?? ?? .. 00  Plain text content of length above (string, terminated by 0x00)&lt;br /&gt;
&lt;br /&gt;
-----------  [end separation OR end of file]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--[[User:CoDEmanX|CoDEmanX]] 22:09, 4 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
--[[User:Daevius|Daevius]] 14:24, 5 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- outdated investigations below&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1F 00 00 00 FF FF FF FF  rawfile (plaintext)&lt;br /&gt;
05 00 00 00 FF FF FF FF  shader&lt;br /&gt;
03 00 00 00 FF FF FF FF  related to xmodel&lt;br /&gt;
1F 00 00 00 FF FF FF FF  xmodel data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
4A 06 00 00              rawfile length&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
6D 61 70 73 2F 6D 70 2F  filename:&lt;br /&gt;
5F 72 65 70 75 6C 73 65  maps/mp/_repulse.gsc&lt;br /&gt;
2E 67 73 63 00           followed by plaintext:&lt;br /&gt;
69 6E 69 74 28 29 0D 0A  init()..&lt;br /&gt;
7B 0D 0A 09 74 68 72 65  {...thre&lt;br /&gt;
61 64 20 70 6C 61 79 65  ad playe&lt;br /&gt;
72 63 6F 6E 6E 65 63 74  rconnect&lt;br /&gt;
28 29 3B 0D 0A ...       ();..}.&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
...                      shader (binary data)&lt;br /&gt;
&lt;br /&gt;
...                      xmodel related data&lt;br /&gt;
&lt;br /&gt;
...                      xmodel data (similar to original xmodel file, but nonetheless different)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Shaders ===&lt;br /&gt;
&lt;br /&gt;
05 00 00 00 or&lt;br /&gt;
04 00 00 00&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
9F 00 00 00  size after filename&lt;br /&gt;
&lt;br /&gt;
filename ended with 0x00&lt;br /&gt;
&lt;br /&gt;
(size * 4) bytes of shader data, seems to end with FF FF 00 00&lt;br /&gt;
might contain more data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
filename starts with &#039;,&#039;&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Technical Reference]]&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Daevius</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7143</id>
		<title>Call of Duty 4: FastFile Format</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7143"/>
		<updated>2009-11-08T13:37:17Z</updated>

		<summary type="html">&lt;p&gt;Daevius: /* 00 00 00 05 (shader) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Under Construction Small.png‎]] &#039;&#039;&#039;*** Article and investigation in early progress ***&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Preface ==&lt;br /&gt;
&lt;br /&gt;
Be aware, FF files are little endian, so swap those bytes &#039;round!&lt;br /&gt;
&lt;br /&gt;
The global file layout starts with a header. After which you get a list a model tag names, after which you get an index list. This list gives information about the rest of the file, which is a concatenation of files, most of which are reinterpreted. Each file is separated by the separation key: 0xFFFFFFFF. But be aware, each file itself can also contain such a sequence which is not meant to be the separation key! So it is necessary to understand each data type in the FF file.&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
&lt;br /&gt;
*Byte 0-3: decompressed fastfile size minus 44 (0x2C)&lt;br /&gt;
*Byte 4-7: about the total size of referenced data, e.g. the required memory for IWI textures if material files are in the ff&lt;br /&gt;
*Byte 8-11: &#039;&#039;unknown&#039;&#039;, might be a flag&lt;br /&gt;
*Byte 12-23: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 24-27: somehow related to ff size?&lt;br /&gt;
*Byte 28-43: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 44-47: equal to number of entries in &amp;quot;1st index&amp;quot; and amount of (model tag/joint/notetrack) strings (times 4 for index length)&lt;br /&gt;
*Byte 48-51: separator? (FF FF FF FF)&lt;br /&gt;
*Byte 52-55: number of records* (&amp;quot;2nd index&amp;quot;, times 8 for index length)&lt;br /&gt;
*Byte 56-63: separator? (FF FF FF FF FF FF FF FF)&lt;br /&gt;
*Byte 64-x: string list (xmodelsurfs?) --&amp;gt; not always, depends on the content (required offsets are in the FF header)*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; under re-investigation &amp;lt;!-- If a file was missing on ff compile, it does not count but the error message is added to the end of the file. There are usually more index entries than the number of records in the header. The given number of records is not equal to the entries in the assetinfo or assetlist file, it&#039;s usually higher. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: mp_backlot_load.ff ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Contains:&#039;&#039;&#039;&lt;br /&gt;
*2x shaders &lt;br /&gt;
*3x materials&lt;br /&gt;
*(1x fastfile name)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Materials:&lt;br /&gt;
# $victorybackdrop - mile_high_victory_screen.iwi (699,092 bytes)&lt;br /&gt;
# $defeatbackdrop - (none)&lt;br /&gt;
# $levelbriefing - loadscreen_mp_backlot.iwi (524,316 bytes)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start of file and header]&lt;br /&gt;
&lt;br /&gt;
71 03 00 00  Decompressed file size - 44 (hex: 371 + 2C = 39D; dec: 881 + 44 = 925)&lt;br /&gt;
&lt;br /&gt;
B8 AA 12 00  Size of both IWI&#039;s the materials in FF point to - 56 (2x28, 28 bytes = IWI header)&lt;br /&gt;
             0x12AAB8          = 1,223,352&lt;br /&gt;
             699,092 + 524,316 = 1,223,408&lt;br /&gt;
             difference:                56&lt;br /&gt;
&lt;br /&gt;
A4 00 00 00  Might be a flag&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
E5 00 00 00  Size of fastfile in memory (that is at least without header and separators, and maybe more)&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
&lt;br /&gt;
-----------  [end of header] (44 bytes), [start of index]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  Unknown, is sometimes FF FF FF FF&lt;br /&gt;
&lt;br /&gt;
06 00 00 00  Number of records in index (6)&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
&lt;br /&gt;
05 00 00 00  FF FF FF FF  1st: shader&lt;br /&gt;
05 00 00 00  FF FF FF FF  2nd: shader&lt;br /&gt;
04 00 00 00  FF FF FF FF  3rd: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  4th: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  5th: material&lt;br /&gt;
1F 00 00 00  FF FF FF FF  6th: rawfile&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
&lt;br /&gt;
-----------  [end of index]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Index ==&lt;br /&gt;
&lt;br /&gt;
4 byte identifier (fastfile entry type), 4 byte offset (FF FF FF FF = -1, meaning right after the previous block?)&lt;br /&gt;
&lt;br /&gt;
Separator (FF FF FF FF) after last 4-byte couple + 00 00 00 00 ?&lt;br /&gt;
&lt;br /&gt;
=== Types ===&lt;br /&gt;
&lt;br /&gt;
* 00 00 00 01 - physpreset&lt;br /&gt;
* 00 00 00 02 - xanim&lt;br /&gt;
* 00 00 00 03 - xmodel&lt;br /&gt;
* 00 00 00 04 - material&lt;br /&gt;
* 00 00 00 05 - shader / techset&lt;br /&gt;
* 00 00 00 06 - image?&lt;br /&gt;
* 00 00 00 0B - map_ents (d3dbsp)&lt;br /&gt;
* 00 00 00 0C - related to col_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 0E - related to game_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 10 - related to col_map_mp / gfx_map (d3dbsp)&lt;br /&gt;
* 00 00 00 13 - font&lt;br /&gt;
* 00 00 00 14 - menu&lt;br /&gt;
* 00 00 00 16 - localized string asset&lt;br /&gt;
* 00 00 00 17 - physpreset??&lt;br /&gt;
* 00 00 00 19 - fx&lt;br /&gt;
* 00 00 00 1F - raw file&lt;br /&gt;
* 00 00 00 20 - stringtable (comma separated list)&lt;br /&gt;
&lt;br /&gt;
== Content ==&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 04 ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 2B 01 01  First 4 bytes seem to be 4 (unsigned) char&#039;s.&lt;br /&gt;
             1st byte is so far always 0x00 (perhaps it&#039;s a short together with the second byte).&lt;br /&gt;
             2nd byte so far either 0x2B or 0x00, I think this is a length.&lt;br /&gt;
             3rd byte so far 0x01, when 0x00 (all 4) the content is only a number of 0x00&#039;s, then the filename (0x00 termination)&lt;br /&gt;
             4th byte either 0x00 or 0x01. Can be a length or a bool.&lt;br /&gt;
             Then 0x10 bytes of more header.&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
00           When fourth byte is 01, there&#039;s a 0x00 following?             &lt;br /&gt;
             Then there&#039;s garbage (0xFF) and some shorts it looks of length in the second byte.&lt;br /&gt;
             Then more information...&lt;br /&gt;
02 00 0E E0  Often ends with this&lt;br /&gt;
&lt;br /&gt;
-----------  [end separation]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 05 (shader) ===&lt;br /&gt;
&lt;br /&gt;
A shader consists of 3 levels. One, the top level, consists of a header (with a name inside). Then the next level is a pack of shaders, it has a header, shaders and at the end a name. Then the bottom level is the shader itself, it has a header (containing a name of the source file and the length of the data) and the raw shader data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  0x24 dwords of 0x00000000 and sometimes 0xFFFFFFFF (looks like 3x 0x30 in length)&lt;br /&gt;
?? ?? .. 00  Then (file) name (0x00 termination)&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader pack]&lt;br /&gt;
&lt;br /&gt;
             1 dword of reference? (sometimes 2)&lt;br /&gt;
             1 dword of some character length options / flags?&lt;br /&gt;
             3 dwords of references?&lt;br /&gt;
             1 dword of some character length options / flags?&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
             0x19 dwords of some short length options / flags? For the first 05 entry? Or if the references above are 0xFFFFFFFF?&lt;br /&gt;
FF FF FF FF  Separator for the first 05 entry? Or if the references above are 0xFFFFFFFF?&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader]&lt;br /&gt;
&lt;br /&gt;
             2 dwords of references&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
?? ?? 00 00  2 shorts, first short multiplied by 4 gives the length of the shader, second is a flag? When set no string follows?&lt;br /&gt;
?? ?? .. 00  String if previous second short is 00 00, 0x00 terminated (name of source file)&lt;br /&gt;
             Raw shader file (except the first 4 bytes, which, in the shader file, denotes the length of the file)&lt;br /&gt;
FF FF 00 00  which ends with this (always?)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shaders (go back to [start of shader]) or shaders have ended&lt;br /&gt;
&lt;br /&gt;
             Variable length of &#039;stuff&#039; (often 0x08 (last shader pack) or 0x64 in length)&lt;br /&gt;
?? ?? .. 00  String, 0x00 terminated (probably in-game usage name)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader pack]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shader packs (go back to [start of shader pack]) or shader packs have ended&lt;br /&gt;
&lt;br /&gt;
-----------  [end separation]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 1F (rawfile) ===&lt;br /&gt;
&lt;br /&gt;
A rawfile. Often a rawfile named right after the fastfile&#039;s name is implicitly added. It contains the errors thrown when it was compiling / linking.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start separation]&lt;br /&gt;
&lt;br /&gt;
64 00 00 00  Length of the file&#039;s content (example: decimal 100; does not count the string termination!)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
&lt;br /&gt;
6D 6F 64 00  File name or if it&#039;s the last 1F-block FastFile name (example: mod.)&lt;br /&gt;
?? ?? .. 00  Plain text content of length above (string, terminated by 0x00)&lt;br /&gt;
&lt;br /&gt;
-----------  [end separation OR end of file]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--[[User:CoDEmanX|CoDEmanX]] 22:09, 4 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
--[[User:Daevius|Daevius]] 14:24, 5 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- outdated investigations below&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1F 00 00 00 FF FF FF FF  rawfile (plaintext)&lt;br /&gt;
05 00 00 00 FF FF FF FF  shader&lt;br /&gt;
03 00 00 00 FF FF FF FF  related to xmodel&lt;br /&gt;
1F 00 00 00 FF FF FF FF  xmodel data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
4A 06 00 00              rawfile length&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
6D 61 70 73 2F 6D 70 2F  filename:&lt;br /&gt;
5F 72 65 70 75 6C 73 65  maps/mp/_repulse.gsc&lt;br /&gt;
2E 67 73 63 00           followed by plaintext:&lt;br /&gt;
69 6E 69 74 28 29 0D 0A  init()..&lt;br /&gt;
7B 0D 0A 09 74 68 72 65  {...thre&lt;br /&gt;
61 64 20 70 6C 61 79 65  ad playe&lt;br /&gt;
72 63 6F 6E 6E 65 63 74  rconnect&lt;br /&gt;
28 29 3B 0D 0A ...       ();..}.&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
...                      shader (binary data)&lt;br /&gt;
&lt;br /&gt;
...                      xmodel related data&lt;br /&gt;
&lt;br /&gt;
...                      xmodel data (similar to original xmodel file, but nonetheless different)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Shaders ===&lt;br /&gt;
&lt;br /&gt;
05 00 00 00 or&lt;br /&gt;
04 00 00 00&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
9F 00 00 00  size after filename&lt;br /&gt;
&lt;br /&gt;
filename ended with 0x00&lt;br /&gt;
&lt;br /&gt;
(size * 4) bytes of shader data, seems to end with FF FF 00 00&lt;br /&gt;
might contain more data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
filename starts with &#039;,&#039;&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Technical Reference]]&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Daevius</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7142</id>
		<title>Call of Duty 4: FastFile Format</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7142"/>
		<updated>2009-11-08T13:33:53Z</updated>

		<summary type="html">&lt;p&gt;Daevius: /* 00 00 00 05 (shader) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Under Construction Small.png‎]] &#039;&#039;&#039;*** Article and investigation in early progress ***&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Preface ==&lt;br /&gt;
&lt;br /&gt;
Be aware, FF files are little endian, so swap those bytes &#039;round!&lt;br /&gt;
&lt;br /&gt;
The global file layout starts with a header. After which you get a list a model tag names, after which you get an index list. This list gives information about the rest of the file, which is a concatenation of files, most of which are reinterpreted. Each file is separated by the separation key: 0xFFFFFFFF. But be aware, each file itself can also contain such a sequence which is not meant to be the separation key! So it is necessary to understand each data type in the FF file.&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
&lt;br /&gt;
*Byte 0-3: decompressed fastfile size minus 44 (0x2C)&lt;br /&gt;
*Byte 4-7: about the total size of referenced data, e.g. the required memory for IWI textures if material files are in the ff&lt;br /&gt;
*Byte 8-11: &#039;&#039;unknown&#039;&#039;, might be a flag&lt;br /&gt;
*Byte 12-23: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 24-27: somehow related to ff size?&lt;br /&gt;
*Byte 28-43: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 44-47: equal to number of entries in &amp;quot;1st index&amp;quot; and amount of (model tag/joint/notetrack) strings (times 4 for index length)&lt;br /&gt;
*Byte 48-51: separator? (FF FF FF FF)&lt;br /&gt;
*Byte 52-55: number of records* (&amp;quot;2nd index&amp;quot;, times 8 for index length)&lt;br /&gt;
*Byte 56-63: separator? (FF FF FF FF FF FF FF FF)&lt;br /&gt;
*Byte 64-x: string list (xmodelsurfs?) --&amp;gt; not always, depends on the content (required offsets are in the FF header)*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; under re-investigation &amp;lt;!-- If a file was missing on ff compile, it does not count but the error message is added to the end of the file. There are usually more index entries than the number of records in the header. The given number of records is not equal to the entries in the assetinfo or assetlist file, it&#039;s usually higher. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: mp_backlot_load.ff ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Contains:&#039;&#039;&#039;&lt;br /&gt;
*2x shaders &lt;br /&gt;
*3x materials&lt;br /&gt;
*(1x fastfile name)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Materials:&lt;br /&gt;
# $victorybackdrop - mile_high_victory_screen.iwi (699,092 bytes)&lt;br /&gt;
# $defeatbackdrop - (none)&lt;br /&gt;
# $levelbriefing - loadscreen_mp_backlot.iwi (524,316 bytes)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start of file and header]&lt;br /&gt;
&lt;br /&gt;
71 03 00 00  Decompressed file size - 44 (hex: 371 + 2C = 39D; dec: 881 + 44 = 925)&lt;br /&gt;
&lt;br /&gt;
B8 AA 12 00  Size of both IWI&#039;s the materials in FF point to - 56 (2x28, 28 bytes = IWI header)&lt;br /&gt;
             0x12AAB8          = 1,223,352&lt;br /&gt;
             699,092 + 524,316 = 1,223,408&lt;br /&gt;
             difference:                56&lt;br /&gt;
&lt;br /&gt;
A4 00 00 00  Might be a flag&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
E5 00 00 00  Size of fastfile in memory (that is at least without header and separators, and maybe more)&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
&lt;br /&gt;
-----------  [end of header] (44 bytes), [start of index]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  Unknown, is sometimes FF FF FF FF&lt;br /&gt;
&lt;br /&gt;
06 00 00 00  Number of records in index (6)&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
&lt;br /&gt;
05 00 00 00  FF FF FF FF  1st: shader&lt;br /&gt;
05 00 00 00  FF FF FF FF  2nd: shader&lt;br /&gt;
04 00 00 00  FF FF FF FF  3rd: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  4th: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  5th: material&lt;br /&gt;
1F 00 00 00  FF FF FF FF  6th: rawfile&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
&lt;br /&gt;
-----------  [end of index]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Index ==&lt;br /&gt;
&lt;br /&gt;
4 byte identifier (fastfile entry type), 4 byte offset (FF FF FF FF = -1, meaning right after the previous block?)&lt;br /&gt;
&lt;br /&gt;
Separator (FF FF FF FF) after last 4-byte couple + 00 00 00 00 ?&lt;br /&gt;
&lt;br /&gt;
=== Types ===&lt;br /&gt;
&lt;br /&gt;
* 00 00 00 01 - physpreset&lt;br /&gt;
* 00 00 00 02 - xanim&lt;br /&gt;
* 00 00 00 03 - xmodel&lt;br /&gt;
* 00 00 00 04 - material&lt;br /&gt;
* 00 00 00 05 - shader / techset&lt;br /&gt;
* 00 00 00 06 - image?&lt;br /&gt;
* 00 00 00 0B - map_ents (d3dbsp)&lt;br /&gt;
* 00 00 00 0C - related to col_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 0E - related to game_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 10 - related to col_map_mp / gfx_map (d3dbsp)&lt;br /&gt;
* 00 00 00 13 - font&lt;br /&gt;
* 00 00 00 14 - menu&lt;br /&gt;
* 00 00 00 16 - localized string asset&lt;br /&gt;
* 00 00 00 17 - physpreset??&lt;br /&gt;
* 00 00 00 19 - fx&lt;br /&gt;
* 00 00 00 1F - raw file&lt;br /&gt;
* 00 00 00 20 - stringtable (comma separated list)&lt;br /&gt;
&lt;br /&gt;
== Content ==&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 04 ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 2B 01 01  First 4 bytes seem to be 4 (unsigned) char&#039;s.&lt;br /&gt;
             1st byte is so far always 0x00 (perhaps it&#039;s a short together with the second byte).&lt;br /&gt;
             2nd byte so far either 0x2B or 0x00, I think this is a length.&lt;br /&gt;
             3rd byte so far 0x01, when 0x00 (all 4) the content is only a number of 0x00&#039;s, then the filename (0x00 termination)&lt;br /&gt;
             4th byte either 0x00 or 0x01. Can be a length or a bool.&lt;br /&gt;
             Then 0x10 bytes of more header.&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
00           When fourth byte is 01, there&#039;s a 0x00 following?             &lt;br /&gt;
             Then there&#039;s garbage (0xFF) and some shorts it looks of length in the second byte.&lt;br /&gt;
             Then more information...&lt;br /&gt;
02 00 0E E0  Often ends with this&lt;br /&gt;
&lt;br /&gt;
-----------  [end separation]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 05 (shader) ===&lt;br /&gt;
&lt;br /&gt;
A shader consists of 3 levels. One, the top level, consists of a header (with a name inside). Then the next level is a pack of shaders, it has a header, shaders and at the end a name. Then the bottom level is the shader itself, it has a header (containing a name of the source file and the length of the data) and the raw shader data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  0x24 dwords of 0x00000000 and sometimes 0xFFFFFFFF (looks like 3x 0x30 in length)&lt;br /&gt;
?? ?? .. 00  Then (file) name (0x00 termination)&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader pack]&lt;br /&gt;
&lt;br /&gt;
             1 dword of reference? (sometimes 2)&lt;br /&gt;
             1 dword of some character length options / flags?&lt;br /&gt;
             3 dwords of references?&lt;br /&gt;
             1 dword of some character length options / flags?&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
             0x19 dwords of some short length options / flags? For the first 05 entry? Or if the references above are 0xFFFFFFFF?&lt;br /&gt;
FF FF FF FF  Separator for the first 05 entry? Or if the references above are 0xFFFFFFFF?&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader]&lt;br /&gt;
&lt;br /&gt;
             2 dwords of references&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
?? ?? 00 00  2 shorts, first short multiplied by 4 gives the length of the shader, second is a flag? When set no string follows?&lt;br /&gt;
?? ?? .. 00  String if previous second short is 00 00, 0x00 terminated (name of source file)&lt;br /&gt;
             Raw shader file (except the first 4 bytes, which, in the shader file, denotes the length of the file)&lt;br /&gt;
FF FF 00 00  which ends with this (always?)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shaders (go back to [start of shader]) or shaders have ended&lt;br /&gt;
&lt;br /&gt;
             Variable length of &#039;stuff&#039;&lt;br /&gt;
?? ?? .. 00  String, 0x00 terminated (probably in-game usage name)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader pack]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shader packs (go back to [start of shader pack]) or shader packs have ended&lt;br /&gt;
&lt;br /&gt;
-----------  [end separation]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 1F (rawfile) ===&lt;br /&gt;
&lt;br /&gt;
A rawfile. Often a rawfile named right after the fastfile&#039;s name is implicitly added. It contains the errors thrown when it was compiling / linking.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start separation]&lt;br /&gt;
&lt;br /&gt;
64 00 00 00  Length of the file&#039;s content (example: decimal 100; does not count the string termination!)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
&lt;br /&gt;
6D 6F 64 00  File name or if it&#039;s the last 1F-block FastFile name (example: mod.)&lt;br /&gt;
?? ?? .. 00  Plain text content of length above (string, terminated by 0x00)&lt;br /&gt;
&lt;br /&gt;
-----------  [end separation OR end of file]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--[[User:CoDEmanX|CoDEmanX]] 22:09, 4 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
--[[User:Daevius|Daevius]] 14:24, 5 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- outdated investigations below&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1F 00 00 00 FF FF FF FF  rawfile (plaintext)&lt;br /&gt;
05 00 00 00 FF FF FF FF  shader&lt;br /&gt;
03 00 00 00 FF FF FF FF  related to xmodel&lt;br /&gt;
1F 00 00 00 FF FF FF FF  xmodel data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
4A 06 00 00              rawfile length&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
6D 61 70 73 2F 6D 70 2F  filename:&lt;br /&gt;
5F 72 65 70 75 6C 73 65  maps/mp/_repulse.gsc&lt;br /&gt;
2E 67 73 63 00           followed by plaintext:&lt;br /&gt;
69 6E 69 74 28 29 0D 0A  init()..&lt;br /&gt;
7B 0D 0A 09 74 68 72 65  {...thre&lt;br /&gt;
61 64 20 70 6C 61 79 65  ad playe&lt;br /&gt;
72 63 6F 6E 6E 65 63 74  rconnect&lt;br /&gt;
28 29 3B 0D 0A ...       ();..}.&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
...                      shader (binary data)&lt;br /&gt;
&lt;br /&gt;
...                      xmodel related data&lt;br /&gt;
&lt;br /&gt;
...                      xmodel data (similar to original xmodel file, but nonetheless different)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Shaders ===&lt;br /&gt;
&lt;br /&gt;
05 00 00 00 or&lt;br /&gt;
04 00 00 00&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
9F 00 00 00  size after filename&lt;br /&gt;
&lt;br /&gt;
filename ended with 0x00&lt;br /&gt;
&lt;br /&gt;
(size * 4) bytes of shader data, seems to end with FF FF 00 00&lt;br /&gt;
might contain more data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
filename starts with &#039;,&#039;&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Technical Reference]]&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Daevius</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7141</id>
		<title>Call of Duty 4: FastFile Format</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7141"/>
		<updated>2009-11-07T13:05:11Z</updated>

		<summary type="html">&lt;p&gt;Daevius: /* 00 00 00 05 (shader) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Under Construction Small.png‎]] &#039;&#039;&#039;*** Article and investigation in early progress ***&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Preface ==&lt;br /&gt;
&lt;br /&gt;
Be aware, FF files are little endian, so swap those bytes &#039;round!&lt;br /&gt;
&lt;br /&gt;
The global file layout starts with a header. After which you get a list a model tag names, after which you get an index list. This list gives information about the rest of the file, which is a concatenation of files, most of which are reinterpreted. Each file is separated by the separation key: 0xFFFFFFFF. But be aware, each file itself can also contain such a sequence which is not meant to be the separation key! So it is necessary to understand each data type in the FF file.&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
&lt;br /&gt;
*Byte 0-3: decompressed fastfile size minus 44 (0x2C)&lt;br /&gt;
*Byte 4-7: about the total size of referenced data, e.g. the required memory for IWI textures if material files are in the ff&lt;br /&gt;
*Byte 8-11: &#039;&#039;unknown&#039;&#039;, might be a flag&lt;br /&gt;
*Byte 12-23: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 24-27: somehow related to ff size?&lt;br /&gt;
*Byte 28-43: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 44-47: equal to number of entries in &amp;quot;1st index&amp;quot; and amount of (model tag/joint/notetrack) strings (times 4 for index length)&lt;br /&gt;
*Byte 48-51: separator? (FF FF FF FF)&lt;br /&gt;
*Byte 52-55: number of records* (&amp;quot;2nd index&amp;quot;, times 8 for index length)&lt;br /&gt;
*Byte 56-63: separator? (FF FF FF FF FF FF FF FF)&lt;br /&gt;
*Byte 64-x: string list (xmodelsurfs?) --&amp;gt; not always, depends on the content (required offsets are in the FF header)*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; under re-investigation &amp;lt;!-- If a file was missing on ff compile, it does not count but the error message is added to the end of the file. There are usually more index entries than the number of records in the header. The given number of records is not equal to the entries in the assetinfo or assetlist file, it&#039;s usually higher. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: mp_backlot_load.ff ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Contains:&#039;&#039;&#039;&lt;br /&gt;
*2x shaders &lt;br /&gt;
*3x materials&lt;br /&gt;
*(1x fastfile name)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Materials:&lt;br /&gt;
# $victorybackdrop - mile_high_victory_screen.iwi (699,092 bytes)&lt;br /&gt;
# $defeatbackdrop - (none)&lt;br /&gt;
# $levelbriefing - loadscreen_mp_backlot.iwi (524,316 bytes)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start of file and header]&lt;br /&gt;
&lt;br /&gt;
71 03 00 00  Decompressed file size - 44 (hex: 371 + 2C = 39D; dec: 881 + 44 = 925)&lt;br /&gt;
&lt;br /&gt;
B8 AA 12 00  Size of both IWI&#039;s the materials in FF point to - 56 (2x28, 28 bytes = IWI header)&lt;br /&gt;
             0x12AAB8          = 1,223,352&lt;br /&gt;
             699,092 + 524,316 = 1,223,408&lt;br /&gt;
             difference:                56&lt;br /&gt;
&lt;br /&gt;
A4 00 00 00  Might be a flag&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
E5 00 00 00  Size of fastfile in memory (that is at least without header and separators, and maybe more)&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
&lt;br /&gt;
-----------  [end of header] (44 bytes), [start of index]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  Unknown, is sometimes FF FF FF FF&lt;br /&gt;
&lt;br /&gt;
06 00 00 00  Number of records in index (6)&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
&lt;br /&gt;
05 00 00 00  FF FF FF FF  1st: shader&lt;br /&gt;
05 00 00 00  FF FF FF FF  2nd: shader&lt;br /&gt;
04 00 00 00  FF FF FF FF  3rd: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  4th: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  5th: material&lt;br /&gt;
1F 00 00 00  FF FF FF FF  6th: rawfile&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
&lt;br /&gt;
-----------  [end of index]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Index ==&lt;br /&gt;
&lt;br /&gt;
4 byte identifier (fastfile entry type), 4 byte offset (FF FF FF FF = -1, meaning right after the previous block?)&lt;br /&gt;
&lt;br /&gt;
Separator (FF FF FF FF) after last 4-byte couple + 00 00 00 00 ?&lt;br /&gt;
&lt;br /&gt;
=== Types ===&lt;br /&gt;
&lt;br /&gt;
* 00 00 00 01 - physpreset&lt;br /&gt;
* 00 00 00 02 - xanim&lt;br /&gt;
* 00 00 00 03 - xmodel&lt;br /&gt;
* 00 00 00 04 - material&lt;br /&gt;
* 00 00 00 05 - shader / techset&lt;br /&gt;
* 00 00 00 06 - image?&lt;br /&gt;
* 00 00 00 0B - map_ents (d3dbsp)&lt;br /&gt;
* 00 00 00 0C - related to col_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 0E - related to game_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 10 - related to col_map_mp / gfx_map (d3dbsp)&lt;br /&gt;
* 00 00 00 13 - font&lt;br /&gt;
* 00 00 00 14 - menu&lt;br /&gt;
* 00 00 00 16 - localized string asset&lt;br /&gt;
* 00 00 00 17 - physpreset??&lt;br /&gt;
* 00 00 00 19 - fx&lt;br /&gt;
* 00 00 00 1F - raw file&lt;br /&gt;
* 00 00 00 20 - stringtable (comma separated list)&lt;br /&gt;
&lt;br /&gt;
== Content ==&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 04 ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 2B 01 01  First 4 bytes seem to be 4 (unsigned) char&#039;s.&lt;br /&gt;
             1st byte is so far always 0x00 (perhaps it&#039;s a short together with the second byte).&lt;br /&gt;
             2nd byte so far either 0x2B or 0x00, I think this is a length.&lt;br /&gt;
             3rd byte so far 0x01, when 0x00 (all 4) the content is only a number of 0x00&#039;s, then the filename (0x00 termination)&lt;br /&gt;
             4th byte either 0x00 or 0x01. Can be a length or a bool.&lt;br /&gt;
             Then 0x10 bytes of more header.&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
00           When fourth byte is 01, there&#039;s a 0x00 following?             &lt;br /&gt;
             Then there&#039;s garbage (0xFF) and some shorts it looks of length in the second byte.&lt;br /&gt;
             Then more information...&lt;br /&gt;
02 00 0E E0  Often ends with this&lt;br /&gt;
&lt;br /&gt;
-----------  [end separation]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 05 (shader) ===&lt;br /&gt;
&lt;br /&gt;
A shader consists of 3 levels. One, the top level, consists of a header (with a name inside). Then the next level is a pack of shaders, it has a header, shaders and at the end a name. Then the bottom level is the shader itself, it has a header (containing a name of the source file and the length of the data) and the raw shader data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  0x24 dwords of 0x00000000 and sometimes 0xFFFFFFFF (looks like 3x 0x30 in length)&lt;br /&gt;
?? ?? .. 00  Then (file) name (0x00 termination)&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader pack]&lt;br /&gt;
&lt;br /&gt;
             1 dword of reference?&lt;br /&gt;
             1 dword of some character length options / flags?&lt;br /&gt;
             3 dwords of references?&lt;br /&gt;
             1 dword of some character length options / flags?&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
             0x19 dwords of some short length options / flags? For the first 05 entry? Or if the references above are 0xFFFFFFFF?&lt;br /&gt;
FF FF FF FF  Separator for the first 05 entry? Or if the references above are 0xFFFFFFFF?&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader]&lt;br /&gt;
&lt;br /&gt;
             2 dwords of references&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
?? ?? 00 00  2 shorts, first short multiplied by 4 gives the length of the shader, second is a flag? When set no string follows?&lt;br /&gt;
?? ?? .. 00  String if previous second short is 00 00, 0x00 terminated (name of source file)&lt;br /&gt;
             Raw shader file (except the first 4 bytes, which, in the shader file, denotes the length of the file)&lt;br /&gt;
FF FF 00 00  which ends with this (always?)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shaders (go back to [start of shader]) or shaders have ended&lt;br /&gt;
&lt;br /&gt;
             Variable length of &#039;stuff&#039;&lt;br /&gt;
?? ?? .. 00  String, 0x00 terminated (probably in-game usage name)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader pack]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shader packs (go back to [start of shader pack]) or shader packs have ended&lt;br /&gt;
&lt;br /&gt;
-----------  [end separation]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 1F (rawfile) ===&lt;br /&gt;
&lt;br /&gt;
A rawfile. Often a rawfile named right after the fastfile&#039;s name is implicitly added. It contains the errors thrown when it was compiling / linking.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start separation]&lt;br /&gt;
&lt;br /&gt;
64 00 00 00  Length of the file&#039;s content (example: decimal 100; does not count the string termination!)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
&lt;br /&gt;
6D 6F 64 00  File name or if it&#039;s the last 1F-block FastFile name (example: mod.)&lt;br /&gt;
?? ?? .. 00  Plain text content of length above (string, terminated by 0x00)&lt;br /&gt;
&lt;br /&gt;
-----------  [end separation OR end of file]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--[[User:CoDEmanX|CoDEmanX]] 22:09, 4 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
--[[User:Daevius|Daevius]] 14:24, 5 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- outdated investigations below&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1F 00 00 00 FF FF FF FF  rawfile (plaintext)&lt;br /&gt;
05 00 00 00 FF FF FF FF  shader&lt;br /&gt;
03 00 00 00 FF FF FF FF  related to xmodel&lt;br /&gt;
1F 00 00 00 FF FF FF FF  xmodel data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
4A 06 00 00              rawfile length&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
6D 61 70 73 2F 6D 70 2F  filename:&lt;br /&gt;
5F 72 65 70 75 6C 73 65  maps/mp/_repulse.gsc&lt;br /&gt;
2E 67 73 63 00           followed by plaintext:&lt;br /&gt;
69 6E 69 74 28 29 0D 0A  init()..&lt;br /&gt;
7B 0D 0A 09 74 68 72 65  {...thre&lt;br /&gt;
61 64 20 70 6C 61 79 65  ad playe&lt;br /&gt;
72 63 6F 6E 6E 65 63 74  rconnect&lt;br /&gt;
28 29 3B 0D 0A ...       ();..}.&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
...                      shader (binary data)&lt;br /&gt;
&lt;br /&gt;
...                      xmodel related data&lt;br /&gt;
&lt;br /&gt;
...                      xmodel data (similar to original xmodel file, but nonetheless different)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Shaders ===&lt;br /&gt;
&lt;br /&gt;
05 00 00 00 or&lt;br /&gt;
04 00 00 00&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
9F 00 00 00  size after filename&lt;br /&gt;
&lt;br /&gt;
filename ended with 0x00&lt;br /&gt;
&lt;br /&gt;
(size * 4) bytes of shader data, seems to end with FF FF 00 00&lt;br /&gt;
might contain more data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
filename starts with &#039;,&#039;&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Technical Reference]]&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Daevius</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7140</id>
		<title>Call of Duty 4: FastFile Format</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7140"/>
		<updated>2009-11-07T13:00:41Z</updated>

		<summary type="html">&lt;p&gt;Daevius: /* 00 00 00 05 (shader) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Under Construction Small.png‎]] &#039;&#039;&#039;*** Article and investigation in early progress ***&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Preface ==&lt;br /&gt;
&lt;br /&gt;
Be aware, FF files are little endian, so swap those bytes &#039;round!&lt;br /&gt;
&lt;br /&gt;
The global file layout starts with a header. After which you get a list a model tag names, after which you get an index list. This list gives information about the rest of the file, which is a concatenation of files, most of which are reinterpreted. Each file is separated by the separation key: 0xFFFFFFFF. But be aware, each file itself can also contain such a sequence which is not meant to be the separation key! So it is necessary to understand each data type in the FF file.&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
&lt;br /&gt;
*Byte 0-3: decompressed fastfile size minus 44 (0x2C)&lt;br /&gt;
*Byte 4-7: about the total size of referenced data, e.g. the required memory for IWI textures if material files are in the ff&lt;br /&gt;
*Byte 8-11: &#039;&#039;unknown&#039;&#039;, might be a flag&lt;br /&gt;
*Byte 12-23: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 24-27: somehow related to ff size?&lt;br /&gt;
*Byte 28-43: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 44-47: equal to number of entries in &amp;quot;1st index&amp;quot; and amount of (model tag/joint/notetrack) strings (times 4 for index length)&lt;br /&gt;
*Byte 48-51: separator? (FF FF FF FF)&lt;br /&gt;
*Byte 52-55: number of records* (&amp;quot;2nd index&amp;quot;, times 8 for index length)&lt;br /&gt;
*Byte 56-63: separator? (FF FF FF FF FF FF FF FF)&lt;br /&gt;
*Byte 64-x: string list (xmodelsurfs?) --&amp;gt; not always, depends on the content (required offsets are in the FF header)*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; under re-investigation &amp;lt;!-- If a file was missing on ff compile, it does not count but the error message is added to the end of the file. There are usually more index entries than the number of records in the header. The given number of records is not equal to the entries in the assetinfo or assetlist file, it&#039;s usually higher. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: mp_backlot_load.ff ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Contains:&#039;&#039;&#039;&lt;br /&gt;
*2x shaders &lt;br /&gt;
*3x materials&lt;br /&gt;
*(1x fastfile name)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Materials:&lt;br /&gt;
# $victorybackdrop - mile_high_victory_screen.iwi (699,092 bytes)&lt;br /&gt;
# $defeatbackdrop - (none)&lt;br /&gt;
# $levelbriefing - loadscreen_mp_backlot.iwi (524,316 bytes)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start of file and header]&lt;br /&gt;
&lt;br /&gt;
71 03 00 00  Decompressed file size - 44 (hex: 371 + 2C = 39D; dec: 881 + 44 = 925)&lt;br /&gt;
&lt;br /&gt;
B8 AA 12 00  Size of both IWI&#039;s the materials in FF point to - 56 (2x28, 28 bytes = IWI header)&lt;br /&gt;
             0x12AAB8          = 1,223,352&lt;br /&gt;
             699,092 + 524,316 = 1,223,408&lt;br /&gt;
             difference:                56&lt;br /&gt;
&lt;br /&gt;
A4 00 00 00  Might be a flag&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
E5 00 00 00  Size of fastfile in memory (that is at least without header and separators, and maybe more)&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
&lt;br /&gt;
-----------  [end of header] (44 bytes), [start of index]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  Unknown, is sometimes FF FF FF FF&lt;br /&gt;
&lt;br /&gt;
06 00 00 00  Number of records in index (6)&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
&lt;br /&gt;
05 00 00 00  FF FF FF FF  1st: shader&lt;br /&gt;
05 00 00 00  FF FF FF FF  2nd: shader&lt;br /&gt;
04 00 00 00  FF FF FF FF  3rd: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  4th: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  5th: material&lt;br /&gt;
1F 00 00 00  FF FF FF FF  6th: rawfile&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
&lt;br /&gt;
-----------  [end of index]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Index ==&lt;br /&gt;
&lt;br /&gt;
4 byte identifier (fastfile entry type), 4 byte offset (FF FF FF FF = -1, meaning right after the previous block?)&lt;br /&gt;
&lt;br /&gt;
Separator (FF FF FF FF) after last 4-byte couple + 00 00 00 00 ?&lt;br /&gt;
&lt;br /&gt;
=== Types ===&lt;br /&gt;
&lt;br /&gt;
* 00 00 00 01 - physpreset&lt;br /&gt;
* 00 00 00 02 - xanim&lt;br /&gt;
* 00 00 00 03 - xmodel&lt;br /&gt;
* 00 00 00 04 - material&lt;br /&gt;
* 00 00 00 05 - shader / techset&lt;br /&gt;
* 00 00 00 06 - image?&lt;br /&gt;
* 00 00 00 0B - map_ents (d3dbsp)&lt;br /&gt;
* 00 00 00 0C - related to col_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 0E - related to game_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 10 - related to col_map_mp / gfx_map (d3dbsp)&lt;br /&gt;
* 00 00 00 13 - font&lt;br /&gt;
* 00 00 00 14 - menu&lt;br /&gt;
* 00 00 00 16 - localized string asset&lt;br /&gt;
* 00 00 00 17 - physpreset??&lt;br /&gt;
* 00 00 00 19 - fx&lt;br /&gt;
* 00 00 00 1F - raw file&lt;br /&gt;
* 00 00 00 20 - stringtable (comma separated list)&lt;br /&gt;
&lt;br /&gt;
== Content ==&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 04 ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 2B 01 01  First 4 bytes seem to be 4 (unsigned) char&#039;s.&lt;br /&gt;
             1st byte is so far always 0x00 (perhaps it&#039;s a short together with the second byte).&lt;br /&gt;
             2nd byte so far either 0x2B or 0x00, I think this is a length.&lt;br /&gt;
             3rd byte so far 0x01, when 0x00 (all 4) the content is only a number of 0x00&#039;s, then the filename (0x00 termination)&lt;br /&gt;
             4th byte either 0x00 or 0x01. Can be a length or a bool.&lt;br /&gt;
             Then 0x10 bytes of more header.&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
00           When fourth byte is 01, there&#039;s a 0x00 following?             &lt;br /&gt;
             Then there&#039;s garbage (0xFF) and some shorts it looks of length in the second byte.&lt;br /&gt;
             Then more information...&lt;br /&gt;
02 00 0E E0  Often ends with this&lt;br /&gt;
&lt;br /&gt;
-----------  [end separation]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 05 (shader) ===&lt;br /&gt;
&lt;br /&gt;
A shader consists of 3 levels. One, the top level, consists of a header (with a name inside). Then the next level is a pack of shaders, it has a header, shaders and at the end a name. Then the bottom level is the shader itself, it has a header (containing a name of the source file and the length of the data) and the raw shader data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  0x24 dwords of 0x00000000 and sometimes 0xFFFFFFFF (looks like 3x 0x30 in length)&lt;br /&gt;
?? ?? .. 00  Then (file) name (0x00 termination)&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader pack]&lt;br /&gt;
&lt;br /&gt;
             1 dword of reference?&lt;br /&gt;
             1 dword of some character length options / flags?&lt;br /&gt;
             3 dwords of references?&lt;br /&gt;
             1 dword of some character length options / flags?&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
             0x19 dwords of some short length options / flags? for the first 05 entry?&lt;br /&gt;
FF FF FF FF  Separator for the first 05 entry?&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader]&lt;br /&gt;
&lt;br /&gt;
             2 dwords of references&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
?? ?? 00 00  2 shorts, first short multiplied by 4 gives the length of the shader, second is a flag? When set no string follows?&lt;br /&gt;
?? ?? .. 00  String if previous second short is 00 00, 0x00 terminated (name of source file)&lt;br /&gt;
             Raw shader file (except the first 4 bytes, which, in the shader file, denotes the length of the file)&lt;br /&gt;
FF FF 00 00  which ends with this (always?)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shaders (go back to [start of shader]) or shaders have ended&lt;br /&gt;
&lt;br /&gt;
             Variable length of &#039;stuff&#039;&lt;br /&gt;
?? ?? .. 00  String, 0x00 terminated (probably in-game usage name)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader pack]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shader packs (go back to [start of shader pack]) or shader packs have ended&lt;br /&gt;
&lt;br /&gt;
-----------  [end separation]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 1F (rawfile) ===&lt;br /&gt;
&lt;br /&gt;
A rawfile. Often a rawfile named right after the fastfile&#039;s name is implicitly added. It contains the errors thrown when it was compiling / linking.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start separation]&lt;br /&gt;
&lt;br /&gt;
64 00 00 00  Length of the file&#039;s content (example: decimal 100; does not count the string termination!)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
&lt;br /&gt;
6D 6F 64 00  File name or if it&#039;s the last 1F-block FastFile name (example: mod.)&lt;br /&gt;
?? ?? .. 00  Plain text content of length above (string, terminated by 0x00)&lt;br /&gt;
&lt;br /&gt;
-----------  [end separation OR end of file]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--[[User:CoDEmanX|CoDEmanX]] 22:09, 4 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
--[[User:Daevius|Daevius]] 14:24, 5 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- outdated investigations below&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1F 00 00 00 FF FF FF FF  rawfile (plaintext)&lt;br /&gt;
05 00 00 00 FF FF FF FF  shader&lt;br /&gt;
03 00 00 00 FF FF FF FF  related to xmodel&lt;br /&gt;
1F 00 00 00 FF FF FF FF  xmodel data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
4A 06 00 00              rawfile length&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
6D 61 70 73 2F 6D 70 2F  filename:&lt;br /&gt;
5F 72 65 70 75 6C 73 65  maps/mp/_repulse.gsc&lt;br /&gt;
2E 67 73 63 00           followed by plaintext:&lt;br /&gt;
69 6E 69 74 28 29 0D 0A  init()..&lt;br /&gt;
7B 0D 0A 09 74 68 72 65  {...thre&lt;br /&gt;
61 64 20 70 6C 61 79 65  ad playe&lt;br /&gt;
72 63 6F 6E 6E 65 63 74  rconnect&lt;br /&gt;
28 29 3B 0D 0A ...       ();..}.&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
...                      shader (binary data)&lt;br /&gt;
&lt;br /&gt;
...                      xmodel related data&lt;br /&gt;
&lt;br /&gt;
...                      xmodel data (similar to original xmodel file, but nonetheless different)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Shaders ===&lt;br /&gt;
&lt;br /&gt;
05 00 00 00 or&lt;br /&gt;
04 00 00 00&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
9F 00 00 00  size after filename&lt;br /&gt;
&lt;br /&gt;
filename ended with 0x00&lt;br /&gt;
&lt;br /&gt;
(size * 4) bytes of shader data, seems to end with FF FF 00 00&lt;br /&gt;
might contain more data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
filename starts with &#039;,&#039;&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Technical Reference]]&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Daevius</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7139</id>
		<title>Call of Duty 4: FastFile Format</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7139"/>
		<updated>2009-11-07T12:58:39Z</updated>

		<summary type="html">&lt;p&gt;Daevius: /* 00 00 00 05 (shader) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Under Construction Small.png‎]] &#039;&#039;&#039;*** Article and investigation in early progress ***&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Preface ==&lt;br /&gt;
&lt;br /&gt;
Be aware, FF files are little endian, so swap those bytes &#039;round!&lt;br /&gt;
&lt;br /&gt;
The global file layout starts with a header. After which you get a list a model tag names, after which you get an index list. This list gives information about the rest of the file, which is a concatenation of files, most of which are reinterpreted. Each file is separated by the separation key: 0xFFFFFFFF. But be aware, each file itself can also contain such a sequence which is not meant to be the separation key! So it is necessary to understand each data type in the FF file.&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
&lt;br /&gt;
*Byte 0-3: decompressed fastfile size minus 44 (0x2C)&lt;br /&gt;
*Byte 4-7: about the total size of referenced data, e.g. the required memory for IWI textures if material files are in the ff&lt;br /&gt;
*Byte 8-11: &#039;&#039;unknown&#039;&#039;, might be a flag&lt;br /&gt;
*Byte 12-23: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 24-27: somehow related to ff size?&lt;br /&gt;
*Byte 28-43: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 44-47: equal to number of entries in &amp;quot;1st index&amp;quot; and amount of (model tag/joint/notetrack) strings (times 4 for index length)&lt;br /&gt;
*Byte 48-51: separator? (FF FF FF FF)&lt;br /&gt;
*Byte 52-55: number of records* (&amp;quot;2nd index&amp;quot;, times 8 for index length)&lt;br /&gt;
*Byte 56-63: separator? (FF FF FF FF FF FF FF FF)&lt;br /&gt;
*Byte 64-x: string list (xmodelsurfs?) --&amp;gt; not always, depends on the content (required offsets are in the FF header)*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; under re-investigation &amp;lt;!-- If a file was missing on ff compile, it does not count but the error message is added to the end of the file. There are usually more index entries than the number of records in the header. The given number of records is not equal to the entries in the assetinfo or assetlist file, it&#039;s usually higher. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: mp_backlot_load.ff ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Contains:&#039;&#039;&#039;&lt;br /&gt;
*2x shaders &lt;br /&gt;
*3x materials&lt;br /&gt;
*(1x fastfile name)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Materials:&lt;br /&gt;
# $victorybackdrop - mile_high_victory_screen.iwi (699,092 bytes)&lt;br /&gt;
# $defeatbackdrop - (none)&lt;br /&gt;
# $levelbriefing - loadscreen_mp_backlot.iwi (524,316 bytes)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start of file and header]&lt;br /&gt;
&lt;br /&gt;
71 03 00 00  Decompressed file size - 44 (hex: 371 + 2C = 39D; dec: 881 + 44 = 925)&lt;br /&gt;
&lt;br /&gt;
B8 AA 12 00  Size of both IWI&#039;s the materials in FF point to - 56 (2x28, 28 bytes = IWI header)&lt;br /&gt;
             0x12AAB8          = 1,223,352&lt;br /&gt;
             699,092 + 524,316 = 1,223,408&lt;br /&gt;
             difference:                56&lt;br /&gt;
&lt;br /&gt;
A4 00 00 00  Might be a flag&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
E5 00 00 00  Size of fastfile in memory (that is at least without header and separators, and maybe more)&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
&lt;br /&gt;
-----------  [end of header] (44 bytes), [start of index]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  Unknown, is sometimes FF FF FF FF&lt;br /&gt;
&lt;br /&gt;
06 00 00 00  Number of records in index (6)&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
&lt;br /&gt;
05 00 00 00  FF FF FF FF  1st: shader&lt;br /&gt;
05 00 00 00  FF FF FF FF  2nd: shader&lt;br /&gt;
04 00 00 00  FF FF FF FF  3rd: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  4th: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  5th: material&lt;br /&gt;
1F 00 00 00  FF FF FF FF  6th: rawfile&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
&lt;br /&gt;
-----------  [end of index]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Index ==&lt;br /&gt;
&lt;br /&gt;
4 byte identifier (fastfile entry type), 4 byte offset (FF FF FF FF = -1, meaning right after the previous block?)&lt;br /&gt;
&lt;br /&gt;
Separator (FF FF FF FF) after last 4-byte couple + 00 00 00 00 ?&lt;br /&gt;
&lt;br /&gt;
=== Types ===&lt;br /&gt;
&lt;br /&gt;
* 00 00 00 01 - physpreset&lt;br /&gt;
* 00 00 00 02 - xanim&lt;br /&gt;
* 00 00 00 03 - xmodel&lt;br /&gt;
* 00 00 00 04 - material&lt;br /&gt;
* 00 00 00 05 - shader / techset&lt;br /&gt;
* 00 00 00 06 - image?&lt;br /&gt;
* 00 00 00 0B - map_ents (d3dbsp)&lt;br /&gt;
* 00 00 00 0C - related to col_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 0E - related to game_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 10 - related to col_map_mp / gfx_map (d3dbsp)&lt;br /&gt;
* 00 00 00 13 - font&lt;br /&gt;
* 00 00 00 14 - menu&lt;br /&gt;
* 00 00 00 16 - localized string asset&lt;br /&gt;
* 00 00 00 17 - physpreset??&lt;br /&gt;
* 00 00 00 19 - fx&lt;br /&gt;
* 00 00 00 1F - raw file&lt;br /&gt;
* 00 00 00 20 - stringtable (comma separated list)&lt;br /&gt;
&lt;br /&gt;
== Content ==&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 04 ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 2B 01 01  First 4 bytes seem to be 4 (unsigned) char&#039;s.&lt;br /&gt;
             1st byte is so far always 0x00 (perhaps it&#039;s a short together with the second byte).&lt;br /&gt;
             2nd byte so far either 0x2B or 0x00, I think this is a length.&lt;br /&gt;
             3rd byte so far 0x01, when 0x00 (all 4) the content is only a number of 0x00&#039;s, then the filename (0x00 termination)&lt;br /&gt;
             4th byte either 0x00 or 0x01. Can be a length or a bool.&lt;br /&gt;
             Then 0x10 bytes of more header.&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
00           When fourth byte is 01, there&#039;s a 0x00 following?             &lt;br /&gt;
             Then there&#039;s garbage (0xFF) and some shorts it looks of length in the second byte.&lt;br /&gt;
             Then more information...&lt;br /&gt;
02 00 0E E0  Often ends with this&lt;br /&gt;
&lt;br /&gt;
-----------  [end separation]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 05 (shader) ===&lt;br /&gt;
&lt;br /&gt;
A shader consists of 3 levels. One, the top level, consists of a header (with a name inside). Then the next level is a pack of shaders, it has a header, shaders and at the end a name. Then the bottom level is the shader itself, it has a header (containing a name of the source file and the length of the data) and the raw shader data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  0x24 dwords of 0x00000000 and sometimes 0xFFFFFFFF (looks like 3x 0x30 in length)&lt;br /&gt;
?? ?? .. 00  Then (file) name (0x00 termination)&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader pack]&lt;br /&gt;
&lt;br /&gt;
             1 dword of reference?&lt;br /&gt;
             1 dword of some character length options / flags?&lt;br /&gt;
             3 dwords of references?&lt;br /&gt;
             1 dword of some character length options / flags?&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
             0x19 dwords of some short length options / flags?&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader]&lt;br /&gt;
&lt;br /&gt;
             2 dwords of references&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
?? ?? 00 00  2 shorts, first short multiplied by 4 gives the length of the shader, second is a flag? When set no string follows?&lt;br /&gt;
?? ?? .. 00  String if previous second short is 00 00, 0x00 terminated (name of source file)&lt;br /&gt;
             Raw shader file (except the first 4 bytes, which, in the shader file, denotes the length of the file)&lt;br /&gt;
FF FF 00 00  which ends with this (always?)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shaders (go back to [start of shader]) or shaders have ended&lt;br /&gt;
&lt;br /&gt;
             Variable length of &#039;stuff&#039;&lt;br /&gt;
?? ?? .. 00  String, 0x00 terminated (probably in-game usage name)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader pack]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shader packs (go back to [start of shader pack]) or shader packs have ended&lt;br /&gt;
&lt;br /&gt;
-----------  [end separation]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 1F (rawfile) ===&lt;br /&gt;
&lt;br /&gt;
A rawfile. Often a rawfile named right after the fastfile&#039;s name is implicitly added. It contains the errors thrown when it was compiling / linking.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start separation]&lt;br /&gt;
&lt;br /&gt;
64 00 00 00  Length of the file&#039;s content (example: decimal 100; does not count the string termination!)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
&lt;br /&gt;
6D 6F 64 00  File name or if it&#039;s the last 1F-block FastFile name (example: mod.)&lt;br /&gt;
?? ?? .. 00  Plain text content of length above (string, terminated by 0x00)&lt;br /&gt;
&lt;br /&gt;
-----------  [end separation OR end of file]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--[[User:CoDEmanX|CoDEmanX]] 22:09, 4 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
--[[User:Daevius|Daevius]] 14:24, 5 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- outdated investigations below&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1F 00 00 00 FF FF FF FF  rawfile (plaintext)&lt;br /&gt;
05 00 00 00 FF FF FF FF  shader&lt;br /&gt;
03 00 00 00 FF FF FF FF  related to xmodel&lt;br /&gt;
1F 00 00 00 FF FF FF FF  xmodel data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
4A 06 00 00              rawfile length&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
6D 61 70 73 2F 6D 70 2F  filename:&lt;br /&gt;
5F 72 65 70 75 6C 73 65  maps/mp/_repulse.gsc&lt;br /&gt;
2E 67 73 63 00           followed by plaintext:&lt;br /&gt;
69 6E 69 74 28 29 0D 0A  init()..&lt;br /&gt;
7B 0D 0A 09 74 68 72 65  {...thre&lt;br /&gt;
61 64 20 70 6C 61 79 65  ad playe&lt;br /&gt;
72 63 6F 6E 6E 65 63 74  rconnect&lt;br /&gt;
28 29 3B 0D 0A ...       ();..}.&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
...                      shader (binary data)&lt;br /&gt;
&lt;br /&gt;
...                      xmodel related data&lt;br /&gt;
&lt;br /&gt;
...                      xmodel data (similar to original xmodel file, but nonetheless different)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Shaders ===&lt;br /&gt;
&lt;br /&gt;
05 00 00 00 or&lt;br /&gt;
04 00 00 00&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
9F 00 00 00  size after filename&lt;br /&gt;
&lt;br /&gt;
filename ended with 0x00&lt;br /&gt;
&lt;br /&gt;
(size * 4) bytes of shader data, seems to end with FF FF 00 00&lt;br /&gt;
might contain more data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
filename starts with &#039;,&#039;&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Technical Reference]]&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Daevius</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7138</id>
		<title>Call of Duty 4: FastFile Format</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7138"/>
		<updated>2009-11-07T12:54:16Z</updated>

		<summary type="html">&lt;p&gt;Daevius: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Under Construction Small.png‎]] &#039;&#039;&#039;*** Article and investigation in early progress ***&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Preface ==&lt;br /&gt;
&lt;br /&gt;
Be aware, FF files are little endian, so swap those bytes &#039;round!&lt;br /&gt;
&lt;br /&gt;
The global file layout starts with a header. After which you get a list a model tag names, after which you get an index list. This list gives information about the rest of the file, which is a concatenation of files, most of which are reinterpreted. Each file is separated by the separation key: 0xFFFFFFFF. But be aware, each file itself can also contain such a sequence which is not meant to be the separation key! So it is necessary to understand each data type in the FF file.&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
&lt;br /&gt;
*Byte 0-3: decompressed fastfile size minus 44 (0x2C)&lt;br /&gt;
*Byte 4-7: about the total size of referenced data, e.g. the required memory for IWI textures if material files are in the ff&lt;br /&gt;
*Byte 8-11: &#039;&#039;unknown&#039;&#039;, might be a flag&lt;br /&gt;
*Byte 12-23: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 24-27: somehow related to ff size?&lt;br /&gt;
*Byte 28-43: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 44-47: equal to number of entries in &amp;quot;1st index&amp;quot; and amount of (model tag/joint/notetrack) strings (times 4 for index length)&lt;br /&gt;
*Byte 48-51: separator? (FF FF FF FF)&lt;br /&gt;
*Byte 52-55: number of records* (&amp;quot;2nd index&amp;quot;, times 8 for index length)&lt;br /&gt;
*Byte 56-63: separator? (FF FF FF FF FF FF FF FF)&lt;br /&gt;
*Byte 64-x: string list (xmodelsurfs?) --&amp;gt; not always, depends on the content (required offsets are in the FF header)*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; under re-investigation &amp;lt;!-- If a file was missing on ff compile, it does not count but the error message is added to the end of the file. There are usually more index entries than the number of records in the header. The given number of records is not equal to the entries in the assetinfo or assetlist file, it&#039;s usually higher. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: mp_backlot_load.ff ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Contains:&#039;&#039;&#039;&lt;br /&gt;
*2x shaders &lt;br /&gt;
*3x materials&lt;br /&gt;
*(1x fastfile name)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Materials:&lt;br /&gt;
# $victorybackdrop - mile_high_victory_screen.iwi (699,092 bytes)&lt;br /&gt;
# $defeatbackdrop - (none)&lt;br /&gt;
# $levelbriefing - loadscreen_mp_backlot.iwi (524,316 bytes)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start of file and header]&lt;br /&gt;
&lt;br /&gt;
71 03 00 00  Decompressed file size - 44 (hex: 371 + 2C = 39D; dec: 881 + 44 = 925)&lt;br /&gt;
&lt;br /&gt;
B8 AA 12 00  Size of both IWI&#039;s the materials in FF point to - 56 (2x28, 28 bytes = IWI header)&lt;br /&gt;
             0x12AAB8          = 1,223,352&lt;br /&gt;
             699,092 + 524,316 = 1,223,408&lt;br /&gt;
             difference:                56&lt;br /&gt;
&lt;br /&gt;
A4 00 00 00  Might be a flag&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
E5 00 00 00  Size of fastfile in memory (that is at least without header and separators, and maybe more)&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
00 00 00 00  Unknown&lt;br /&gt;
&lt;br /&gt;
-----------  [end of header] (44 bytes), [start of index]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  Unknown, is sometimes FF FF FF FF&lt;br /&gt;
&lt;br /&gt;
06 00 00 00  Number of records in index (6)&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
&lt;br /&gt;
05 00 00 00  FF FF FF FF  1st: shader&lt;br /&gt;
05 00 00 00  FF FF FF FF  2nd: shader&lt;br /&gt;
04 00 00 00  FF FF FF FF  3rd: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  4th: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  5th: material&lt;br /&gt;
1F 00 00 00  FF FF FF FF  6th: rawfile&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
&lt;br /&gt;
-----------  [end of index]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Index ==&lt;br /&gt;
&lt;br /&gt;
4 byte identifier (fastfile entry type), 4 byte offset (FF FF FF FF = -1, meaning right after the previous block?)&lt;br /&gt;
&lt;br /&gt;
Separator (FF FF FF FF) after last 4-byte couple + 00 00 00 00 ?&lt;br /&gt;
&lt;br /&gt;
=== Types ===&lt;br /&gt;
&lt;br /&gt;
* 00 00 00 01 - physpreset&lt;br /&gt;
* 00 00 00 02 - xanim&lt;br /&gt;
* 00 00 00 03 - xmodel&lt;br /&gt;
* 00 00 00 04 - material&lt;br /&gt;
* 00 00 00 05 - shader / techset&lt;br /&gt;
* 00 00 00 06 - image?&lt;br /&gt;
* 00 00 00 0B - map_ents (d3dbsp)&lt;br /&gt;
* 00 00 00 0C - related to col_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 0E - related to game_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 10 - related to col_map_mp / gfx_map (d3dbsp)&lt;br /&gt;
* 00 00 00 13 - font&lt;br /&gt;
* 00 00 00 14 - menu&lt;br /&gt;
* 00 00 00 16 - localized string asset&lt;br /&gt;
* 00 00 00 17 - physpreset??&lt;br /&gt;
* 00 00 00 19 - fx&lt;br /&gt;
* 00 00 00 1F - raw file&lt;br /&gt;
* 00 00 00 20 - stringtable (comma separated list)&lt;br /&gt;
&lt;br /&gt;
== Content ==&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 04 ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 2B 01 01  First 4 bytes seem to be 4 (unsigned) char&#039;s.&lt;br /&gt;
             1st byte is so far always 0x00 (perhaps it&#039;s a short together with the second byte).&lt;br /&gt;
             2nd byte so far either 0x2B or 0x00, I think this is a length.&lt;br /&gt;
             3rd byte so far 0x01, when 0x00 (all 4) the content is only a number of 0x00&#039;s, then the filename (0x00 termination)&lt;br /&gt;
             4th byte either 0x00 or 0x01. Can be a length or a bool.&lt;br /&gt;
             Then 0x10 bytes of more header.&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
00           When fourth byte is 01, there&#039;s a 0x00 following?             &lt;br /&gt;
             Then there&#039;s garbage (0xFF) and some shorts it looks of length in the second byte.&lt;br /&gt;
             Then more information...&lt;br /&gt;
02 00 0E E0  Often ends with this&lt;br /&gt;
&lt;br /&gt;
-----------  [end separation]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 05 (shader) ===&lt;br /&gt;
&lt;br /&gt;
A shader consists of 3 levels. One, the top level, consists of a header (with a name inside). Then the next level is a pack of shaders, it has a header, shaders and at the end a name. Then the bottom level is the shader itself, it has a header (containing a name of the source file and the length of the data) and the raw shader data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  0x24 dwords of 0x00000000 and sometimes 0xFFFFFFFF (looks like 3x 0x30 in length)&lt;br /&gt;
?? ?? .. 00  Then (file) name (0x00 termination)&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader pack]&lt;br /&gt;
&lt;br /&gt;
             1 dword of reference?&lt;br /&gt;
             1 dword of some character length options / flags?&lt;br /&gt;
             3 dwords of references?&lt;br /&gt;
             1 dword of some character length options / flags?&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
             0x19 dwords of some short length options / flags?&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader]&lt;br /&gt;
&lt;br /&gt;
             2 dwords of references&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
?? ?? 00 00  2 shorts, first short multiplied by 4 gives the length of the shader, second is a flag? When set no string follows?&lt;br /&gt;
?? ?? .. 00  String if previous second short is 00 00, 0x00 terminated (name of source file)&lt;br /&gt;
             Raw shader file (except the first 4 bytes, which, in the shader file, denotes the length of the file)&lt;br /&gt;
FF FF 00 00  which ends with this (always?)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shaders (go back to [start of shader]) or shaders have ended&lt;br /&gt;
&lt;br /&gt;
             Variable length of &#039;stuff&#039;&lt;br /&gt;
?? ?? .. 00  String, 0x00 terminated (probably in-game usage name)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader pack]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shader packs (go back to [start of shader pack]) or shader packs have ended&lt;br /&gt;
&lt;br /&gt;
-----------  [end separation]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 1F (rawfile) ===&lt;br /&gt;
&lt;br /&gt;
A rawfile. Often a rawfile named right after the fastfile&#039;s name is implicitly added. It contains the errors thrown when it was compiling / linking.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start separation]&lt;br /&gt;
&lt;br /&gt;
64 00 00 00  Length of the file&#039;s content (example: decimal 100; does not count the string termination!)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
&lt;br /&gt;
6D 6F 64 00  File name or if it&#039;s the last 1F-block FastFile name (example: mod.)&lt;br /&gt;
?? ?? .. 00  Plain text content of length above (string, terminated by 0x00)&lt;br /&gt;
&lt;br /&gt;
-----------  [end separation OR end of file]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--[[User:CoDEmanX|CoDEmanX]] 22:09, 4 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
--[[User:Daevius|Daevius]] 14:24, 5 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- outdated investigations below&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1F 00 00 00 FF FF FF FF  rawfile (plaintext)&lt;br /&gt;
05 00 00 00 FF FF FF FF  shader&lt;br /&gt;
03 00 00 00 FF FF FF FF  related to xmodel&lt;br /&gt;
1F 00 00 00 FF FF FF FF  xmodel data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
4A 06 00 00              rawfile length&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
6D 61 70 73 2F 6D 70 2F  filename:&lt;br /&gt;
5F 72 65 70 75 6C 73 65  maps/mp/_repulse.gsc&lt;br /&gt;
2E 67 73 63 00           followed by plaintext:&lt;br /&gt;
69 6E 69 74 28 29 0D 0A  init()..&lt;br /&gt;
7B 0D 0A 09 74 68 72 65  {...thre&lt;br /&gt;
61 64 20 70 6C 61 79 65  ad playe&lt;br /&gt;
72 63 6F 6E 6E 65 63 74  rconnect&lt;br /&gt;
28 29 3B 0D 0A ...       ();..}.&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
...                      shader (binary data)&lt;br /&gt;
&lt;br /&gt;
...                      xmodel related data&lt;br /&gt;
&lt;br /&gt;
...                      xmodel data (similar to original xmodel file, but nonetheless different)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Shaders ===&lt;br /&gt;
&lt;br /&gt;
05 00 00 00 or&lt;br /&gt;
04 00 00 00&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
9F 00 00 00  size after filename&lt;br /&gt;
&lt;br /&gt;
filename ended with 0x00&lt;br /&gt;
&lt;br /&gt;
(size * 4) bytes of shader data, seems to end with FF FF 00 00&lt;br /&gt;
might contain more data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
filename starts with &#039;,&#039;&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Technical Reference]]&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Daevius</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7137</id>
		<title>Call of Duty 4: FastFile Format</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7137"/>
		<updated>2009-11-07T12:48:00Z</updated>

		<summary type="html">&lt;p&gt;Daevius: /* Example: mp_backlot_load.ff */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Under Construction Small.png‎]] &#039;&#039;&#039;*** Article and investigation in early progress ***&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Be aware, FF files are little endian, so swap those bytes &#039;round!&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
&lt;br /&gt;
*Byte 0-3: decompressed fastfile size minus 44 (0x2C)&lt;br /&gt;
*Byte 4-7: about the total size of referenced data, e.g. the required memory for IWI textures if material files are in the ff&lt;br /&gt;
*Byte 8-11: &#039;&#039;unknown&#039;&#039;, might be a flag&lt;br /&gt;
*Byte 12-23: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 24-27: somehow related to ff size?&lt;br /&gt;
*Byte 28-43: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 44-47: equal to number of entries in &amp;quot;1st index&amp;quot; and amount of (model tag/joint/notetrack) strings (times 4 for index length)&lt;br /&gt;
*Byte 48-51: separator? (FF FF FF FF)&lt;br /&gt;
*Byte 52-55: number of records* (&amp;quot;2nd index&amp;quot;, times 8 for index length)&lt;br /&gt;
*Byte 56-63: separator? (FF FF FF FF FF FF FF FF)&lt;br /&gt;
*Byte 64-x: string list (xmodelsurfs?) --&amp;gt; not always, depends on the content (required offsets are in the FF header)*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; under re-investigation &amp;lt;!-- If a file was missing on ff compile, it does not count but the error message is added to the end of the file. There are usually more index entries than the number of records in the header. The given number of records is not equal to the entries in the assetinfo or assetlist file, it&#039;s usually higher. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: mp_backlot_load.ff ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Contains:&#039;&#039;&#039;&lt;br /&gt;
*2x shaders &lt;br /&gt;
*3x materials&lt;br /&gt;
*(1x fastfile name)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Materials:&lt;br /&gt;
# $victorybackdrop - mile_high_victory_screen.iwi (699,092 bytes)&lt;br /&gt;
# $defeatbackdrop - (none)&lt;br /&gt;
# $levelbriefing - loadscreen_mp_backlot.iwi (524,316 bytes)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start of file and header]&lt;br /&gt;
&lt;br /&gt;
71 03 00 00  decompressed filesize - 44 (hex: 371 + 2C = 39D; dec: 881 + 44 = 925)&lt;br /&gt;
&lt;br /&gt;
B8 AA 12 00  size of both IWIs the materials in FF point to - 56 (2x28, 28 bytes = IWI header)&lt;br /&gt;
             0x12AAB8          = 1,223,352&lt;br /&gt;
             699,092 + 524,316 = 1,223,408&lt;br /&gt;
             difference:                56&lt;br /&gt;
&lt;br /&gt;
A4 00 00 00  might be a flag&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
E5 00 00 00  size of fastfile in memory (that is at least without header and separators, and maybe more)&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
&lt;br /&gt;
-----------  [end of header] (44 bytes), [start of index]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  unknown, is sometimes FF FF FF FF&lt;br /&gt;
&lt;br /&gt;
06 00 00 00  number of records in index (6)&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
&lt;br /&gt;
05 00 00 00  FF FF FF FF  1st: shader&lt;br /&gt;
05 00 00 00  FF FF FF FF  2nd: shader&lt;br /&gt;
04 00 00 00  FF FF FF FF  3rd: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  4th: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  5th: material&lt;br /&gt;
1F 00 00 00  FF FF FF FF  6th: rawfile&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
&lt;br /&gt;
-----------  [end of index]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Index ==&lt;br /&gt;
&lt;br /&gt;
4 byte identifier (fastfile entry type), 4 byte offset (FF FF FF FF = -1, meaning right after the previous block?)&lt;br /&gt;
&lt;br /&gt;
Separator (FF FF FF FF) after last 4-byte couple + 00 00 00 00 ?&lt;br /&gt;
&lt;br /&gt;
=== Types ===&lt;br /&gt;
&lt;br /&gt;
* 00 00 00 01 - physpreset&lt;br /&gt;
* 00 00 00 02 - xanim&lt;br /&gt;
* 00 00 00 03 - xmodel&lt;br /&gt;
* 00 00 00 04 - material&lt;br /&gt;
* 00 00 00 05 - shader / techset&lt;br /&gt;
* 00 00 00 06 - image?&lt;br /&gt;
* 00 00 00 0B - map_ents (d3dbsp)&lt;br /&gt;
* 00 00 00 0C - related to col_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 0E - related to game_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 10 - related to col_map_mp / gfx_map (d3dbsp)&lt;br /&gt;
* 00 00 00 13 - font&lt;br /&gt;
* 00 00 00 14 - menu&lt;br /&gt;
* 00 00 00 16 - localized string asset&lt;br /&gt;
* 00 00 00 17 - physpreset??&lt;br /&gt;
* 00 00 00 19 - fx&lt;br /&gt;
* 00 00 00 1F - raw file&lt;br /&gt;
* 00 00 00 20 - stringtable (comma separated list)&lt;br /&gt;
&lt;br /&gt;
== Content ==&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 04 ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 2B 01 01  First 4 bytes seem to be 4 (unsigned) char&#039;s.&lt;br /&gt;
             1st byte is so far always 0x00 (perhaps it&#039;s a short together with the second byte).&lt;br /&gt;
             2nd byte so far either 0x2B or 0x00, I think this is a length.&lt;br /&gt;
             3rd byte so far 0x01, when 0x00 (all 4) the content is only a number of 0x00&#039;s, then the filename (0x00 termination)&lt;br /&gt;
             4th byte either 0x00 or 0x01. Can be a length or a bool.&lt;br /&gt;
             Then 0x10 bytes of more header.&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
00           When fourth byte is 01, there&#039;s a 0x00 following?             &lt;br /&gt;
             Then there&#039;s garbage (0xFF) and some shorts it looks of length in the second byte.&lt;br /&gt;
             Then more information...&lt;br /&gt;
02 00 0E E0  Often ends with this&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [end separation]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 05 (shader) ===&lt;br /&gt;
&lt;br /&gt;
A shader consists of 3 levels. One, the top level, consists of a header (with a name inside). Then the next level is a pack of shaders, it has a header, shaders and at the end a name. Then the bottom level is the shader itself, it has a header (containing a name of the source file and the length of the data) and the raw shader data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  0x24 dwords of 0x00000000 and sometimes 0xFFFFFFFF (looks like 3x 0x30 in length)&lt;br /&gt;
?? ?? .. 00  Then (file) name (0x00 termination)&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader pack]&lt;br /&gt;
&lt;br /&gt;
             1 dword of reference?&lt;br /&gt;
             1 dword of some character length options / flags?&lt;br /&gt;
             3 dwords of references?&lt;br /&gt;
             1 dword of some character length options / flags?&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
             0x19 dwords of some short length options / flags?&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader]&lt;br /&gt;
&lt;br /&gt;
             2 dwords of references&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
?? ?? 00 00  2 shorts, first short multiplied by 4 gives the length of the shader, second is a flag? When set no string follows?&lt;br /&gt;
?? ?? .. 00  String if previous second short is 00 00, 0x00 terminated (name of source file)&lt;br /&gt;
             Raw shader file (except the first 4 bytes, which, in the shader file, denotes the length of the file)&lt;br /&gt;
FF FF 00 00  which ends with this (always?)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shaders (go back to [start of shader]) or shaders have ended&lt;br /&gt;
&lt;br /&gt;
             Variable length of &#039;stuff&#039;&lt;br /&gt;
?? ?? .. 00  String, 0x00 terminated (probably in-game usage name)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader pack]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shader packs (go back to [start of shader pack]) or shader packs have ended&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [end separation]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 1F (rawfile) ===&lt;br /&gt;
&lt;br /&gt;
A rawfile. Often a rawfile named right after the fastfile&#039;s name is implicitly added. It contains the errors thrown when it was compiling / linking.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
64 00 00 00  Length of the file&#039;s content (example: decimal 100; does not count the string termination!)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [separator]&lt;br /&gt;
&lt;br /&gt;
6D 6F 64 00  File name or if it&#039;s the last 1F-block FastFile name (example: mod.)&lt;br /&gt;
?? ?? .. 00  Plain text content of length above (string, terminated by 0x00)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [end separation OR end of file]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--[[User:CoDEmanX|CoDEmanX]] 22:09, 4 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
--[[User:Daevius|Daevius]] 14:24, 5 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- outdated investigations below&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1F 00 00 00 FF FF FF FF  rawfile (plaintext)&lt;br /&gt;
05 00 00 00 FF FF FF FF  shader&lt;br /&gt;
03 00 00 00 FF FF FF FF  related to xmodel&lt;br /&gt;
1F 00 00 00 FF FF FF FF  xmodel data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
4A 06 00 00              rawfile length&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
6D 61 70 73 2F 6D 70 2F  filename:&lt;br /&gt;
5F 72 65 70 75 6C 73 65  maps/mp/_repulse.gsc&lt;br /&gt;
2E 67 73 63 00           followed by plaintext:&lt;br /&gt;
69 6E 69 74 28 29 0D 0A  init()..&lt;br /&gt;
7B 0D 0A 09 74 68 72 65  {...thre&lt;br /&gt;
61 64 20 70 6C 61 79 65  ad playe&lt;br /&gt;
72 63 6F 6E 6E 65 63 74  rconnect&lt;br /&gt;
28 29 3B 0D 0A ...       ();..}.&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
...                      shader (binary data)&lt;br /&gt;
&lt;br /&gt;
...                      xmodel related data&lt;br /&gt;
&lt;br /&gt;
...                      xmodel data (similar to original xmodel file, but nonetheless different)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Shaders ===&lt;br /&gt;
&lt;br /&gt;
05 00 00 00 or&lt;br /&gt;
04 00 00 00&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
9F 00 00 00  size after filename&lt;br /&gt;
&lt;br /&gt;
filename ended with 0x00&lt;br /&gt;
&lt;br /&gt;
(size * 4) bytes of shader data, seems to end with FF FF 00 00&lt;br /&gt;
might contain more data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
filename starts with &#039;,&#039;&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Technical Reference]]&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Daevius</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7136</id>
		<title>Call of Duty 4: FastFile Format</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7136"/>
		<updated>2009-11-07T12:45:01Z</updated>

		<summary type="html">&lt;p&gt;Daevius: /* 00 00 00 05 (shader) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Under Construction Small.png‎]] &#039;&#039;&#039;*** Article and investigation in early progress ***&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Be aware, FF files are little endian, so swap those bytes &#039;round!&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
&lt;br /&gt;
*Byte 0-3: decompressed fastfile size minus 44 (0x2C)&lt;br /&gt;
*Byte 4-7: about the total size of referenced data, e.g. the required memory for IWI textures if material files are in the ff&lt;br /&gt;
*Byte 8-11: &#039;&#039;unknown&#039;&#039;, might be a flag&lt;br /&gt;
*Byte 12-23: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 24-27: somehow related to ff size?&lt;br /&gt;
*Byte 28-43: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 44-47: equal to number of entries in &amp;quot;1st index&amp;quot; and amount of (model tag/joint/notetrack) strings (times 4 for index length)&lt;br /&gt;
*Byte 48-51: separator? (FF FF FF FF)&lt;br /&gt;
*Byte 52-55: number of records* (&amp;quot;2nd index&amp;quot;, times 8 for index length)&lt;br /&gt;
*Byte 56-63: separator? (FF FF FF FF FF FF FF FF)&lt;br /&gt;
*Byte 64-x: string list (xmodelsurfs?) --&amp;gt; not always, depends on the content (required offsets are in the FF header)*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; under re-investigation &amp;lt;!-- If a file was missing on ff compile, it does not count but the error message is added to the end of the file. There are usually more index entries than the number of records in the header. The given number of records is not equal to the entries in the assetinfo or assetlist file, it&#039;s usually higher. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: mp_backlot_load.ff ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Contains:&#039;&#039;&#039;&lt;br /&gt;
*2x shaders &lt;br /&gt;
*3x materials&lt;br /&gt;
*(1x fastfile name)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Materials:&lt;br /&gt;
# $victorybackdrop - mile_high_victory_screen.iwi (699,092 bytes)&lt;br /&gt;
# $defeatbackdrop - (none)&lt;br /&gt;
# $levelbriefing - loadscreen_mp_backlot.iwi (524,316 bytes)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start of file and header]&lt;br /&gt;
&lt;br /&gt;
71 03 00 00  decompressed filesize - 44 (hex: 371 + 2C = 39D; dec: 881 + 44 = 925)&lt;br /&gt;
&lt;br /&gt;
B8 AA 12 00  size of both IWIs the materials in FF point to - 56 (2x28, 28 bytes = IWI header)&lt;br /&gt;
             0x12AAB8          = 1,223,352&lt;br /&gt;
             699,092 + 524,316 = 1,223,408&lt;br /&gt;
             difference:                56&lt;br /&gt;
&lt;br /&gt;
A4 00 00 00  might be a flag&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
E5 00 00 00  size of fastfile in memory (that is at least without header and separators, and maybe more)&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
&lt;br /&gt;
-----------  [end of header] (44 bytes), [start of index]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  unknown, is sometimes FF FF FF FF&lt;br /&gt;
&lt;br /&gt;
06 00 00 00  number of records in index (6)&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
&lt;br /&gt;
05 00 00 00  FF FF FF FF  1st: shader&lt;br /&gt;
05 00 00 00  FF FF FF FF  2nd: shader&lt;br /&gt;
04 00 00 00  FF FF FF FF  3rd: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  4th: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  5th: material&lt;br /&gt;
1F 00 00 00  FF FF FF FF  6th: ff name&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
&lt;br /&gt;
-----------  [end of index]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Index ==&lt;br /&gt;
&lt;br /&gt;
4 byte identifier (fastfile entry type), 4 byte offset (FF FF FF FF = -1, meaning right after the previous block?)&lt;br /&gt;
&lt;br /&gt;
Separator (FF FF FF FF) after last 4-byte couple + 00 00 00 00 ?&lt;br /&gt;
&lt;br /&gt;
=== Types ===&lt;br /&gt;
&lt;br /&gt;
* 00 00 00 01 - physpreset&lt;br /&gt;
* 00 00 00 02 - xanim&lt;br /&gt;
* 00 00 00 03 - xmodel&lt;br /&gt;
* 00 00 00 04 - material&lt;br /&gt;
* 00 00 00 05 - shader / techset&lt;br /&gt;
* 00 00 00 06 - image?&lt;br /&gt;
* 00 00 00 0B - map_ents (d3dbsp)&lt;br /&gt;
* 00 00 00 0C - related to col_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 0E - related to game_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 10 - related to col_map_mp / gfx_map (d3dbsp)&lt;br /&gt;
* 00 00 00 13 - font&lt;br /&gt;
* 00 00 00 14 - menu&lt;br /&gt;
* 00 00 00 16 - localized string asset&lt;br /&gt;
* 00 00 00 17 - physpreset??&lt;br /&gt;
* 00 00 00 19 - fx&lt;br /&gt;
* 00 00 00 1F - raw file&lt;br /&gt;
* 00 00 00 20 - stringtable (comma separated list)&lt;br /&gt;
&lt;br /&gt;
== Content ==&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 04 ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 2B 01 01  First 4 bytes seem to be 4 (unsigned) char&#039;s.&lt;br /&gt;
             1st byte is so far always 0x00 (perhaps it&#039;s a short together with the second byte).&lt;br /&gt;
             2nd byte so far either 0x2B or 0x00, I think this is a length.&lt;br /&gt;
             3rd byte so far 0x01, when 0x00 (all 4) the content is only a number of 0x00&#039;s, then the filename (0x00 termination)&lt;br /&gt;
             4th byte either 0x00 or 0x01. Can be a length or a bool.&lt;br /&gt;
             Then 0x10 bytes of more header.&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
00           When fourth byte is 01, there&#039;s a 0x00 following?             &lt;br /&gt;
             Then there&#039;s garbage (0xFF) and some shorts it looks of length in the second byte.&lt;br /&gt;
             Then more information...&lt;br /&gt;
02 00 0E E0  Often ends with this&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [end separation]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 05 (shader) ===&lt;br /&gt;
&lt;br /&gt;
A shader consists of 3 levels. One, the top level, consists of a header (with a name inside). Then the next level is a pack of shaders, it has a header, shaders and at the end a name. Then the bottom level is the shader itself, it has a header (containing a name of the source file and the length of the data) and the raw shader data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  0x24 dwords of 0x00000000 and sometimes 0xFFFFFFFF (looks like 3x 0x30 in length)&lt;br /&gt;
?? ?? .. 00  Then (file) name (0x00 termination)&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader pack]&lt;br /&gt;
&lt;br /&gt;
             1 dword of reference?&lt;br /&gt;
             1 dword of some character length options / flags?&lt;br /&gt;
             3 dwords of references?&lt;br /&gt;
             1 dword of some character length options / flags?&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
             0x19 dwords of some short length options / flags?&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader]&lt;br /&gt;
&lt;br /&gt;
             2 dwords of references&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
?? ?? 00 00  2 shorts, first short multiplied by 4 gives the length of the shader, second is a flag? When set no string follows?&lt;br /&gt;
?? ?? .. 00  String if previous second short is 00 00, 0x00 terminated (name of source file)&lt;br /&gt;
             Raw shader file (except the first 4 bytes, which, in the shader file, denotes the length of the file)&lt;br /&gt;
FF FF 00 00  which ends with this (always?)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shaders (go back to [start of shader]) or shaders have ended&lt;br /&gt;
&lt;br /&gt;
             Variable length of &#039;stuff&#039;&lt;br /&gt;
?? ?? .. 00  String, 0x00 terminated (probably in-game usage name)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader pack]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shader packs (go back to [start of shader pack]) or shader packs have ended&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [end separation]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 1F (rawfile) ===&lt;br /&gt;
&lt;br /&gt;
A rawfile. Often a rawfile named right after the fastfile&#039;s name is implicitly added. It contains the errors thrown when it was compiling / linking.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
64 00 00 00  Length of the file&#039;s content (example: decimal 100; does not count the string termination!)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [separator]&lt;br /&gt;
&lt;br /&gt;
6D 6F 64 00  File name or if it&#039;s the last 1F-block FastFile name (example: mod.)&lt;br /&gt;
?? ?? .. 00  Plain text content of length above (string, terminated by 0x00)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [end separation OR end of file]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--[[User:CoDEmanX|CoDEmanX]] 22:09, 4 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
--[[User:Daevius|Daevius]] 14:24, 5 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- outdated investigations below&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1F 00 00 00 FF FF FF FF  rawfile (plaintext)&lt;br /&gt;
05 00 00 00 FF FF FF FF  shader&lt;br /&gt;
03 00 00 00 FF FF FF FF  related to xmodel&lt;br /&gt;
1F 00 00 00 FF FF FF FF  xmodel data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
4A 06 00 00              rawfile length&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
6D 61 70 73 2F 6D 70 2F  filename:&lt;br /&gt;
5F 72 65 70 75 6C 73 65  maps/mp/_repulse.gsc&lt;br /&gt;
2E 67 73 63 00           followed by plaintext:&lt;br /&gt;
69 6E 69 74 28 29 0D 0A  init()..&lt;br /&gt;
7B 0D 0A 09 74 68 72 65  {...thre&lt;br /&gt;
61 64 20 70 6C 61 79 65  ad playe&lt;br /&gt;
72 63 6F 6E 6E 65 63 74  rconnect&lt;br /&gt;
28 29 3B 0D 0A ...       ();..}.&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
...                      shader (binary data)&lt;br /&gt;
&lt;br /&gt;
...                      xmodel related data&lt;br /&gt;
&lt;br /&gt;
...                      xmodel data (similar to original xmodel file, but nonetheless different)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Shaders ===&lt;br /&gt;
&lt;br /&gt;
05 00 00 00 or&lt;br /&gt;
04 00 00 00&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
9F 00 00 00  size after filename&lt;br /&gt;
&lt;br /&gt;
filename ended with 0x00&lt;br /&gt;
&lt;br /&gt;
(size * 4) bytes of shader data, seems to end with FF FF 00 00&lt;br /&gt;
might contain more data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
filename starts with &#039;,&#039;&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Technical Reference]]&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Daevius</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7135</id>
		<title>Call of Duty 4: FastFile Format</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7135"/>
		<updated>2009-11-07T12:43:49Z</updated>

		<summary type="html">&lt;p&gt;Daevius: /* 00 00 00 05 (shader) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Under Construction Small.png‎]] &#039;&#039;&#039;*** Article and investigation in early progress ***&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Be aware, FF files are little endian, so swap those bytes &#039;round!&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
&lt;br /&gt;
*Byte 0-3: decompressed fastfile size minus 44 (0x2C)&lt;br /&gt;
*Byte 4-7: about the total size of referenced data, e.g. the required memory for IWI textures if material files are in the ff&lt;br /&gt;
*Byte 8-11: &#039;&#039;unknown&#039;&#039;, might be a flag&lt;br /&gt;
*Byte 12-23: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 24-27: somehow related to ff size?&lt;br /&gt;
*Byte 28-43: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 44-47: equal to number of entries in &amp;quot;1st index&amp;quot; and amount of (model tag/joint/notetrack) strings (times 4 for index length)&lt;br /&gt;
*Byte 48-51: separator? (FF FF FF FF)&lt;br /&gt;
*Byte 52-55: number of records* (&amp;quot;2nd index&amp;quot;, times 8 for index length)&lt;br /&gt;
*Byte 56-63: separator? (FF FF FF FF FF FF FF FF)&lt;br /&gt;
*Byte 64-x: string list (xmodelsurfs?) --&amp;gt; not always, depends on the content (required offsets are in the FF header)*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; under re-investigation &amp;lt;!-- If a file was missing on ff compile, it does not count but the error message is added to the end of the file. There are usually more index entries than the number of records in the header. The given number of records is not equal to the entries in the assetinfo or assetlist file, it&#039;s usually higher. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: mp_backlot_load.ff ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Contains:&#039;&#039;&#039;&lt;br /&gt;
*2x shaders &lt;br /&gt;
*3x materials&lt;br /&gt;
*(1x fastfile name)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Materials:&lt;br /&gt;
# $victorybackdrop - mile_high_victory_screen.iwi (699,092 bytes)&lt;br /&gt;
# $defeatbackdrop - (none)&lt;br /&gt;
# $levelbriefing - loadscreen_mp_backlot.iwi (524,316 bytes)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start of file and header]&lt;br /&gt;
&lt;br /&gt;
71 03 00 00  decompressed filesize - 44 (hex: 371 + 2C = 39D; dec: 881 + 44 = 925)&lt;br /&gt;
&lt;br /&gt;
B8 AA 12 00  size of both IWIs the materials in FF point to - 56 (2x28, 28 bytes = IWI header)&lt;br /&gt;
             0x12AAB8          = 1,223,352&lt;br /&gt;
             699,092 + 524,316 = 1,223,408&lt;br /&gt;
             difference:                56&lt;br /&gt;
&lt;br /&gt;
A4 00 00 00  might be a flag&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
E5 00 00 00  size of fastfile in memory (that is at least without header and separators, and maybe more)&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
&lt;br /&gt;
-----------  [end of header] (44 bytes), [start of index]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  unknown, is sometimes FF FF FF FF&lt;br /&gt;
&lt;br /&gt;
06 00 00 00  number of records in index (6)&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
&lt;br /&gt;
05 00 00 00  FF FF FF FF  1st: shader&lt;br /&gt;
05 00 00 00  FF FF FF FF  2nd: shader&lt;br /&gt;
04 00 00 00  FF FF FF FF  3rd: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  4th: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  5th: material&lt;br /&gt;
1F 00 00 00  FF FF FF FF  6th: ff name&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
&lt;br /&gt;
-----------  [end of index]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Index ==&lt;br /&gt;
&lt;br /&gt;
4 byte identifier (fastfile entry type), 4 byte offset (FF FF FF FF = -1, meaning right after the previous block?)&lt;br /&gt;
&lt;br /&gt;
Separator (FF FF FF FF) after last 4-byte couple + 00 00 00 00 ?&lt;br /&gt;
&lt;br /&gt;
=== Types ===&lt;br /&gt;
&lt;br /&gt;
* 00 00 00 01 - physpreset&lt;br /&gt;
* 00 00 00 02 - xanim&lt;br /&gt;
* 00 00 00 03 - xmodel&lt;br /&gt;
* 00 00 00 04 - material&lt;br /&gt;
* 00 00 00 05 - shader / techset&lt;br /&gt;
* 00 00 00 06 - image?&lt;br /&gt;
* 00 00 00 0B - map_ents (d3dbsp)&lt;br /&gt;
* 00 00 00 0C - related to col_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 0E - related to game_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 10 - related to col_map_mp / gfx_map (d3dbsp)&lt;br /&gt;
* 00 00 00 13 - font&lt;br /&gt;
* 00 00 00 14 - menu&lt;br /&gt;
* 00 00 00 16 - localized string asset&lt;br /&gt;
* 00 00 00 17 - physpreset??&lt;br /&gt;
* 00 00 00 19 - fx&lt;br /&gt;
* 00 00 00 1F - raw file&lt;br /&gt;
* 00 00 00 20 - stringtable (comma separated list)&lt;br /&gt;
&lt;br /&gt;
== Content ==&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 04 ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 2B 01 01  First 4 bytes seem to be 4 (unsigned) char&#039;s.&lt;br /&gt;
             1st byte is so far always 0x00 (perhaps it&#039;s a short together with the second byte).&lt;br /&gt;
             2nd byte so far either 0x2B or 0x00, I think this is a length.&lt;br /&gt;
             3rd byte so far 0x01, when 0x00 (all 4) the content is only a number of 0x00&#039;s, then the filename (0x00 termination)&lt;br /&gt;
             4th byte either 0x00 or 0x01. Can be a length or a bool.&lt;br /&gt;
             Then 0x10 bytes of more header.&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
00           When fourth byte is 01, there&#039;s a 0x00 following?             &lt;br /&gt;
             Then there&#039;s garbage (0xFF) and some shorts it looks of length in the second byte.&lt;br /&gt;
             Then more information...&lt;br /&gt;
02 00 0E E0  Often ends with this&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [end separation]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 05 (shader) ===&lt;br /&gt;
&lt;br /&gt;
A shader consists of 3 levels. One, the top level, consists of a header (with a name inside). Then the next level is a pack of shaders, it has a header, shaders and at the end a name. Then the bottom level is the shader itself, it has a header (containing a name of the source file and the length of the data) and the raw shader data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  0x24 dwords of 0x00000000 and sometimes 0xFFFFFFFF (looks like 3x 0x30 in length)&lt;br /&gt;
?? ?? .. 00  Then (file) name (0x00 termination)&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader pack]&lt;br /&gt;
&lt;br /&gt;
             1 dword of reference?&lt;br /&gt;
             1 dword of some character length options / flags?&lt;br /&gt;
             3 dwords of references?&lt;br /&gt;
             1 dword of some character length options / flags?&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
             0x19 dwords of some short length options / flags?&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader]&lt;br /&gt;
&lt;br /&gt;
             2 dwords of references&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
?? ?? 00 00  2 shorts, first short multiplied by 4 gives the length of the shader, second is a flag? When set no string follows?&lt;br /&gt;
?? ?? .. 00  String if previous second short is 00 00, 0x00 terminated (name of source file)&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader data]   &lt;br /&gt;
&lt;br /&gt;
             Raw shader file (except the first 4 bytes, which, in the shader file, denotes the length of the file)&lt;br /&gt;
FF FF 00 00  which ends with this (always?)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader data]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shaders (go back to [start of shader]) or shaders have ended&lt;br /&gt;
&lt;br /&gt;
             Variable length of &#039;stuff&#039;&lt;br /&gt;
?? ?? .. 00  String, 0x00 terminated (probably in-game usage name)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader pack]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shader packs (go back to [start of shader pack]) or shader packs have ended&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [end separation]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 1F (rawfile) ===&lt;br /&gt;
&lt;br /&gt;
A rawfile. Often a rawfile named right after the fastfile&#039;s name is implicitly added. It contains the errors thrown when it was compiling / linking.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
64 00 00 00  Length of the file&#039;s content (example: decimal 100; does not count the string termination!)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [separator]&lt;br /&gt;
&lt;br /&gt;
6D 6F 64 00  File name or if it&#039;s the last 1F-block FastFile name (example: mod.)&lt;br /&gt;
?? ?? .. 00  Plain text content of length above (string, terminated by 0x00)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [end separation OR end of file]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--[[User:CoDEmanX|CoDEmanX]] 22:09, 4 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
--[[User:Daevius|Daevius]] 14:24, 5 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- outdated investigations below&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1F 00 00 00 FF FF FF FF  rawfile (plaintext)&lt;br /&gt;
05 00 00 00 FF FF FF FF  shader&lt;br /&gt;
03 00 00 00 FF FF FF FF  related to xmodel&lt;br /&gt;
1F 00 00 00 FF FF FF FF  xmodel data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
4A 06 00 00              rawfile length&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
6D 61 70 73 2F 6D 70 2F  filename:&lt;br /&gt;
5F 72 65 70 75 6C 73 65  maps/mp/_repulse.gsc&lt;br /&gt;
2E 67 73 63 00           followed by plaintext:&lt;br /&gt;
69 6E 69 74 28 29 0D 0A  init()..&lt;br /&gt;
7B 0D 0A 09 74 68 72 65  {...thre&lt;br /&gt;
61 64 20 70 6C 61 79 65  ad playe&lt;br /&gt;
72 63 6F 6E 6E 65 63 74  rconnect&lt;br /&gt;
28 29 3B 0D 0A ...       ();..}.&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
...                      shader (binary data)&lt;br /&gt;
&lt;br /&gt;
...                      xmodel related data&lt;br /&gt;
&lt;br /&gt;
...                      xmodel data (similar to original xmodel file, but nonetheless different)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Shaders ===&lt;br /&gt;
&lt;br /&gt;
05 00 00 00 or&lt;br /&gt;
04 00 00 00&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
9F 00 00 00  size after filename&lt;br /&gt;
&lt;br /&gt;
filename ended with 0x00&lt;br /&gt;
&lt;br /&gt;
(size * 4) bytes of shader data, seems to end with FF FF 00 00&lt;br /&gt;
might contain more data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
filename starts with &#039;,&#039;&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Technical Reference]]&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Daevius</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7134</id>
		<title>Call of Duty 4: FastFile Format</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7134"/>
		<updated>2009-11-07T12:34:25Z</updated>

		<summary type="html">&lt;p&gt;Daevius: /* 00 00 00 05 (shader) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Under Construction Small.png‎]] &#039;&#039;&#039;*** Article and investigation in early progress ***&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Be aware, FF files are little endian, so swap those bytes &#039;round!&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
&lt;br /&gt;
*Byte 0-3: decompressed fastfile size minus 44 (0x2C)&lt;br /&gt;
*Byte 4-7: about the total size of referenced data, e.g. the required memory for IWI textures if material files are in the ff&lt;br /&gt;
*Byte 8-11: &#039;&#039;unknown&#039;&#039;, might be a flag&lt;br /&gt;
*Byte 12-23: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 24-27: somehow related to ff size?&lt;br /&gt;
*Byte 28-43: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 44-47: equal to number of entries in &amp;quot;1st index&amp;quot; and amount of (model tag/joint/notetrack) strings (times 4 for index length)&lt;br /&gt;
*Byte 48-51: separator? (FF FF FF FF)&lt;br /&gt;
*Byte 52-55: number of records* (&amp;quot;2nd index&amp;quot;, times 8 for index length)&lt;br /&gt;
*Byte 56-63: separator? (FF FF FF FF FF FF FF FF)&lt;br /&gt;
*Byte 64-x: string list (xmodelsurfs?) --&amp;gt; not always, depends on the content (required offsets are in the FF header)*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; under re-investigation &amp;lt;!-- If a file was missing on ff compile, it does not count but the error message is added to the end of the file. There are usually more index entries than the number of records in the header. The given number of records is not equal to the entries in the assetinfo or assetlist file, it&#039;s usually higher. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: mp_backlot_load.ff ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Contains:&#039;&#039;&#039;&lt;br /&gt;
*2x shaders &lt;br /&gt;
*3x materials&lt;br /&gt;
*(1x fastfile name)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Materials:&lt;br /&gt;
# $victorybackdrop - mile_high_victory_screen.iwi (699,092 bytes)&lt;br /&gt;
# $defeatbackdrop - (none)&lt;br /&gt;
# $levelbriefing - loadscreen_mp_backlot.iwi (524,316 bytes)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start of file and header]&lt;br /&gt;
&lt;br /&gt;
71 03 00 00  decompressed filesize - 44 (hex: 371 + 2C = 39D; dec: 881 + 44 = 925)&lt;br /&gt;
&lt;br /&gt;
B8 AA 12 00  size of both IWIs the materials in FF point to - 56 (2x28, 28 bytes = IWI header)&lt;br /&gt;
             0x12AAB8          = 1,223,352&lt;br /&gt;
             699,092 + 524,316 = 1,223,408&lt;br /&gt;
             difference:                56&lt;br /&gt;
&lt;br /&gt;
A4 00 00 00  might be a flag&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
E5 00 00 00  size of fastfile in memory (that is at least without header and separators, and maybe more)&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
&lt;br /&gt;
-----------  [end of header] (44 bytes), [start of index]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  unknown, is sometimes FF FF FF FF&lt;br /&gt;
&lt;br /&gt;
06 00 00 00  number of records in index (6)&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
&lt;br /&gt;
05 00 00 00  FF FF FF FF  1st: shader&lt;br /&gt;
05 00 00 00  FF FF FF FF  2nd: shader&lt;br /&gt;
04 00 00 00  FF FF FF FF  3rd: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  4th: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  5th: material&lt;br /&gt;
1F 00 00 00  FF FF FF FF  6th: ff name&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
&lt;br /&gt;
-----------  [end of index]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Index ==&lt;br /&gt;
&lt;br /&gt;
4 byte identifier (fastfile entry type), 4 byte offset (FF FF FF FF = -1, meaning right after the previous block?)&lt;br /&gt;
&lt;br /&gt;
Separator (FF FF FF FF) after last 4-byte couple + 00 00 00 00 ?&lt;br /&gt;
&lt;br /&gt;
=== Types ===&lt;br /&gt;
&lt;br /&gt;
* 00 00 00 01 - physpreset&lt;br /&gt;
* 00 00 00 02 - xanim&lt;br /&gt;
* 00 00 00 03 - xmodel&lt;br /&gt;
* 00 00 00 04 - material&lt;br /&gt;
* 00 00 00 05 - shader / techset&lt;br /&gt;
* 00 00 00 06 - image?&lt;br /&gt;
* 00 00 00 0B - map_ents (d3dbsp)&lt;br /&gt;
* 00 00 00 0C - related to col_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 0E - related to game_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 10 - related to col_map_mp / gfx_map (d3dbsp)&lt;br /&gt;
* 00 00 00 13 - font&lt;br /&gt;
* 00 00 00 14 - menu&lt;br /&gt;
* 00 00 00 16 - localized string asset&lt;br /&gt;
* 00 00 00 17 - physpreset??&lt;br /&gt;
* 00 00 00 19 - fx&lt;br /&gt;
* 00 00 00 1F - raw file&lt;br /&gt;
* 00 00 00 20 - stringtable (comma separated list)&lt;br /&gt;
&lt;br /&gt;
== Content ==&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 04 ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 2B 01 01  First 4 bytes seem to be 4 (unsigned) char&#039;s.&lt;br /&gt;
             1st byte is so far always 0x00 (perhaps it&#039;s a short together with the second byte).&lt;br /&gt;
             2nd byte so far either 0x2B or 0x00, I think this is a length.&lt;br /&gt;
             3rd byte so far 0x01, when 0x00 (all 4) the content is only a number of 0x00&#039;s, then the filename (0x00 termination)&lt;br /&gt;
             4th byte either 0x00 or 0x01. Can be a length or a bool.&lt;br /&gt;
             Then 0x10 bytes of more header.&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
00           When fourth byte is 01, there&#039;s a 0x00 following?             &lt;br /&gt;
             Then there&#039;s garbage (0xFF) and some shorts it looks of length in the second byte.&lt;br /&gt;
             Then more information...&lt;br /&gt;
02 00 0E E0  Often ends with this&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [end separation]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 05 (shader) ===&lt;br /&gt;
&lt;br /&gt;
A shader consists of 3 levels. One, the top level, consists of a header (with a name inside). Then the next level is a pack of shaders, it has a header, shaders and at the end a name. Then the bottom level is the shader itself, it has a header (containing a name of the source file and the length of the data) and the raw shader data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  0x24 dwords of 0x00000000 and sometimes 0xFFFFFFFF (looks like 3x 0x30 in length)&lt;br /&gt;
?? ?? .. 00  Then (file) name (0x00 termination)&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader pack]&lt;br /&gt;
&lt;br /&gt;
             1 dword of reference?&lt;br /&gt;
             1 dword of some character length options / flags?&lt;br /&gt;
             3 dwords of references?&lt;br /&gt;
             1 dword of some character length options / flags?&lt;br /&gt;
             FF FF FF FF  Separator&lt;br /&gt;
             0x19 dwords of some short length options / flags?&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader]&lt;br /&gt;
&lt;br /&gt;
             2 dwords of references&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
?? ?? 00 00  2 shorts, first short multiplied by 4 gives the length of the shader, second is a flag? When set no string follows?&lt;br /&gt;
?? ?? .. 00  String if previous second short is 00 00, 0x00 terminated (name of source file)&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader data]   &lt;br /&gt;
&lt;br /&gt;
             Raw shader file (except the first 4 bytes, which, in the shader file, denotes the length of the file)&lt;br /&gt;
FF FF 00 00  which ends with this (always?)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader data]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shaders (go back to [start of shader]) or shaders have ended&lt;br /&gt;
&lt;br /&gt;
             Variable length of &#039;stuff&#039;&lt;br /&gt;
?? ?? .. 00  String, 0x00 terminated (probably in-game usage name)&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader pack]&lt;br /&gt;
&lt;br /&gt;
             Can either have more shader packs (go back to [start of shader pack]) or shader packs have ended&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [end separation]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 1F (rawfile) ===&lt;br /&gt;
&lt;br /&gt;
A rawfile. Often a rawfile named right after the fastfile&#039;s name is implicitly added. It contains the errors thrown when it was compiling / linking.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
64 00 00 00  Length of the file&#039;s content (example: decimal 100; does not count the string termination!)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [separator]&lt;br /&gt;
&lt;br /&gt;
6D 6F 64 00  File name or if it&#039;s the last 1F-block FastFile name (example: mod.)&lt;br /&gt;
?? ?? .. 00  Plain text content of length above (string, terminated by 0x00)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [end separation OR end of file]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--[[User:CoDEmanX|CoDEmanX]] 22:09, 4 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
--[[User:Daevius|Daevius]] 14:24, 5 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- outdated investigations below&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1F 00 00 00 FF FF FF FF  rawfile (plaintext)&lt;br /&gt;
05 00 00 00 FF FF FF FF  shader&lt;br /&gt;
03 00 00 00 FF FF FF FF  related to xmodel&lt;br /&gt;
1F 00 00 00 FF FF FF FF  xmodel data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
4A 06 00 00              rawfile length&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
6D 61 70 73 2F 6D 70 2F  filename:&lt;br /&gt;
5F 72 65 70 75 6C 73 65  maps/mp/_repulse.gsc&lt;br /&gt;
2E 67 73 63 00           followed by plaintext:&lt;br /&gt;
69 6E 69 74 28 29 0D 0A  init()..&lt;br /&gt;
7B 0D 0A 09 74 68 72 65  {...thre&lt;br /&gt;
61 64 20 70 6C 61 79 65  ad playe&lt;br /&gt;
72 63 6F 6E 6E 65 63 74  rconnect&lt;br /&gt;
28 29 3B 0D 0A ...       ();..}.&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
...                      shader (binary data)&lt;br /&gt;
&lt;br /&gt;
...                      xmodel related data&lt;br /&gt;
&lt;br /&gt;
...                      xmodel data (similar to original xmodel file, but nonetheless different)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Shaders ===&lt;br /&gt;
&lt;br /&gt;
05 00 00 00 or&lt;br /&gt;
04 00 00 00&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
9F 00 00 00  size after filename&lt;br /&gt;
&lt;br /&gt;
filename ended with 0x00&lt;br /&gt;
&lt;br /&gt;
(size * 4) bytes of shader data, seems to end with FF FF 00 00&lt;br /&gt;
might contain more data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
filename starts with &#039;,&#039;&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Technical Reference]]&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Daevius</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7132</id>
		<title>Call of Duty 4: FastFile Format</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7132"/>
		<updated>2009-11-05T21:23:08Z</updated>

		<summary type="html">&lt;p&gt;Daevius: /* 00 00 00 05 (shader) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Under Construction Small.png‎]] &#039;&#039;&#039;*** Article and investigation in early progress ***&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Be aware, FF files are little endian, so swap those bytes &#039;round!&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
&lt;br /&gt;
*Byte 0-3: decompressed fastfile size minus 44 (0x2C)&lt;br /&gt;
*Byte 4-7: about the total size of referenced data, e.g. the required memory for IWI textures if material files are in the ff&lt;br /&gt;
*Byte 8-11: &#039;&#039;unknown&#039;&#039;, might be a flag&lt;br /&gt;
*Byte 12-23: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 24-27: somehow related to ff size?&lt;br /&gt;
*Byte 28-43: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 44-47: equal to number of entries in &amp;quot;1st index&amp;quot; and amount of (model tag/joint/notetrack) strings (times 4 for index length)&lt;br /&gt;
*Byte 48-51: separator? (FF FF FF FF)&lt;br /&gt;
*Byte 52-55: number of records* (&amp;quot;2nd index&amp;quot;, times 8 for index length)&lt;br /&gt;
*Byte 56-63: separator? (FF FF FF FF FF FF FF FF)&lt;br /&gt;
*Byte 64-x: string list (xmodelsurfs?) --&amp;gt; not always, depends on the content (required offsets are in the FF header)*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; under re-investigation &amp;lt;!-- If a file was missing on ff compile, it does not count but the error message is added to the end of the file. There are usually more index entries than the number of records in the header. The given number of records is not equal to the entries in the assetinfo or assetlist file, it&#039;s usually higher. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: mp_backlot_load.ff ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Contains:&#039;&#039;&#039;&lt;br /&gt;
*2x shaders &lt;br /&gt;
*3x materials&lt;br /&gt;
*(1x fastfile name)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Materials:&lt;br /&gt;
# $victorybackdrop - mile_high_victory_screen.iwi (699,092 bytes)&lt;br /&gt;
# $defeatbackdrop - (none)&lt;br /&gt;
# $levelbriefing - loadscreen_mp_backlot.iwi (524,316 bytes)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start of file and header]&lt;br /&gt;
&lt;br /&gt;
71 03 00 00  decompressed filesize - 44 (hex: 371 + 2C = 39D; dec: 881 + 44 = 925)&lt;br /&gt;
&lt;br /&gt;
B8 AA 12 00  size of both IWIs the materials in FF point to - 56 (2x28, 28 bytes = IWI header)&lt;br /&gt;
             0x12AAB8          = 1,223,352&lt;br /&gt;
             699,092 + 524,316 = 1,223,408&lt;br /&gt;
             difference:                56&lt;br /&gt;
&lt;br /&gt;
A4 00 00 00  might be a flag&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
E5 00 00 00  size of fastfile in memory (that is at least without header and separators, and maybe more)&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
&lt;br /&gt;
-----------  [end of header] (44 bytes), [start of index]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  unknown, is sometimes FF FF FF FF&lt;br /&gt;
&lt;br /&gt;
06 00 00 00  number of records in index (6)&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
&lt;br /&gt;
05 00 00 00  FF FF FF FF  1st: shader&lt;br /&gt;
05 00 00 00  FF FF FF FF  2nd: shader&lt;br /&gt;
04 00 00 00  FF FF FF FF  3rd: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  4th: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  5th: material&lt;br /&gt;
1F 00 00 00  FF FF FF FF  6th: ff name&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
&lt;br /&gt;
-----------  [end of index]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Index ==&lt;br /&gt;
&lt;br /&gt;
4 byte identifier (fastfile entry type), 4 byte offset (FF FF FF FF = -1, meaning right after the previous block?)&lt;br /&gt;
&lt;br /&gt;
Separator (FF FF FF FF) after last 4-byte couple + 00 00 00 00 ?&lt;br /&gt;
&lt;br /&gt;
=== Types ===&lt;br /&gt;
&lt;br /&gt;
* 00 00 00 01 - physpreset&lt;br /&gt;
* 00 00 00 02 - xanim&lt;br /&gt;
* 00 00 00 03 - xmodel&lt;br /&gt;
* 00 00 00 04 - material&lt;br /&gt;
* 00 00 00 05 - shader / techset&lt;br /&gt;
* 00 00 00 06 - image?&lt;br /&gt;
* 00 00 00 0B - map_ents (d3dbsp)&lt;br /&gt;
* 00 00 00 0C - related to col_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 0E - related to game_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 10 - related to col_map_mp / gfx_map (d3dbsp)&lt;br /&gt;
* 00 00 00 13 - font&lt;br /&gt;
* 00 00 00 14 - menu&lt;br /&gt;
* 00 00 00 16 - localized string asset&lt;br /&gt;
* 00 00 00 17 - physpreset??&lt;br /&gt;
* 00 00 00 19 - fx&lt;br /&gt;
* 00 00 00 1F - raw file&lt;br /&gt;
* 00 00 00 20 - stringtable (comma separated list)&lt;br /&gt;
&lt;br /&gt;
== Content ==&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 04 ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 2B 01 01  First 4 bytes seem to be 4 (unsigned) char&#039;s.&lt;br /&gt;
             1st byte is so far always 0x00 (perhaps it&#039;s a short together with the second byte).&lt;br /&gt;
             2nd byte so far either 0x2B or 0x00, I think this is a length.&lt;br /&gt;
             3rd byte so far 0x01, when 0x00 (all 4) the content is only a number of 0x00&#039;s, then the filename (0x00 termination)&lt;br /&gt;
             4th byte either 0x00 or 0x01. Can be a length or a bool.&lt;br /&gt;
             Then 0x10 bytes of more header.&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
00           When fourth byte is 01, there&#039;s a 0x00 following?             &lt;br /&gt;
             Then there&#039;s garbage (0xFF) and some shorts it looks of length in the second byte.&lt;br /&gt;
             Then more information...&lt;br /&gt;
02 00 0E E0  Often ends with this&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [end separation]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 05 (shader) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  0x22 times 0x00000000 and sometimes 0xFFFFFFFF&lt;br /&gt;
?? ?? .. 00  Then (file) name (0x00 termination)    &lt;br /&gt;
             0x18 bytes of references (4 bytes per reference)?&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
             Variable length&lt;br /&gt;
&lt;br /&gt;
-----------  [start of shader data]&lt;br /&gt;
&lt;br /&gt;
             At least 2 dwords, something to do with references / offsets? (first entry had: FFFFFFFF00000000; second entry had: C100004000000000)&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
?? ?? 00 00  2 shorts, first short multiplied by 4 gives the length of the shader, second is a flag? When set no string follows?&lt;br /&gt;
?? ?? .. 00  String if previous second short is 00 00, 0x00 terminated.    &lt;br /&gt;
&lt;br /&gt;
             Raw shader file (except the first 4 bytes, which, in the shader file, denotes the length of the file)&lt;br /&gt;
FF FF 00 00  End of shader file (always?)&lt;br /&gt;
&lt;br /&gt;
             Can either have more shaders (go back to [start of shader data]) or shader data has ended&lt;br /&gt;
&lt;br /&gt;
-----------  [end of shader data]&lt;br /&gt;
&lt;br /&gt;
             0x18 bytes of more data&lt;br /&gt;
?? ?? .. 00  String, 0x00 terminated&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [end separation]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 1F (rawfile) ===&lt;br /&gt;
&lt;br /&gt;
A rawfile. Often a rawfile named right after the fastfile&#039;s name is implicitly added. It contains the errors thrown when it was compiling / linking.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
64 00 00 00  Length of the file&#039;s content (example: decimal 100; does not count the string termination!)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [separator]&lt;br /&gt;
&lt;br /&gt;
6D 6F 64 00  File name or if it&#039;s the last 1F-block FastFile name (example: mod.)&lt;br /&gt;
?? ?? .. 00  Plain text content of length above (string, terminated by 0x00)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [end separation OR end of file]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--[[User:CoDEmanX|CoDEmanX]] 22:09, 4 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
--[[User:Daevius|Daevius]] 14:24, 5 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- outdated investigations below&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1F 00 00 00 FF FF FF FF  rawfile (plaintext)&lt;br /&gt;
05 00 00 00 FF FF FF FF  shader&lt;br /&gt;
03 00 00 00 FF FF FF FF  related to xmodel&lt;br /&gt;
1F 00 00 00 FF FF FF FF  xmodel data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
4A 06 00 00              rawfile length&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
6D 61 70 73 2F 6D 70 2F  filename:&lt;br /&gt;
5F 72 65 70 75 6C 73 65  maps/mp/_repulse.gsc&lt;br /&gt;
2E 67 73 63 00           followed by plaintext:&lt;br /&gt;
69 6E 69 74 28 29 0D 0A  init()..&lt;br /&gt;
7B 0D 0A 09 74 68 72 65  {...thre&lt;br /&gt;
61 64 20 70 6C 61 79 65  ad playe&lt;br /&gt;
72 63 6F 6E 6E 65 63 74  rconnect&lt;br /&gt;
28 29 3B 0D 0A ...       ();..}.&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
...                      shader (binary data)&lt;br /&gt;
&lt;br /&gt;
...                      xmodel related data&lt;br /&gt;
&lt;br /&gt;
...                      xmodel data (similar to original xmodel file, but nonetheless different)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Shaders ===&lt;br /&gt;
&lt;br /&gt;
05 00 00 00 or&lt;br /&gt;
04 00 00 00&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
9F 00 00 00  size after filename&lt;br /&gt;
&lt;br /&gt;
filename ended with 0x00&lt;br /&gt;
&lt;br /&gt;
(size * 4) bytes of shader data, seems to end with FF FF 00 00&lt;br /&gt;
might contain more data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
filename starts with &#039;,&#039;&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Technical Reference]]&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Daevius</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7131</id>
		<title>Call of Duty 4: FastFile Format</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7131"/>
		<updated>2009-11-05T14:24:33Z</updated>

		<summary type="html">&lt;p&gt;Daevius: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Under Construction Small.png‎]] &#039;&#039;&#039;*** Article and investigation in early progress ***&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Be aware, FF files are little endian, so swap those bytes &#039;round!&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
&lt;br /&gt;
*Byte 0-3: decompressed fastfile size minus 44 (0x2C)&lt;br /&gt;
*Byte 4-7: about the total size of referenced data, e.g. the required memory for IWI textures if material files are in the ff&lt;br /&gt;
*Byte 8-11: &#039;&#039;unknown&#039;&#039;, might be a flag&lt;br /&gt;
*Byte 12-23: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 24-27: somehow related to ff size?&lt;br /&gt;
*Byte 28-43: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 44-47: equal to number of entries in &amp;quot;1st index&amp;quot; and amount of (model tag/joint/notetrack) strings (times 4 for index length)&lt;br /&gt;
*Byte 48-51: separator? (FF FF FF FF)&lt;br /&gt;
*Byte 52-55: number of records* (&amp;quot;2nd index&amp;quot;, times 8 for index length)&lt;br /&gt;
*Byte 56-63: separator? (FF FF FF FF FF FF FF FF)&lt;br /&gt;
*Byte 64-x: string list (xmodelsurfs?) --&amp;gt; not always, depends on the content (required offsets are in the FF header)*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; under re-investigation &amp;lt;!-- If a file was missing on ff compile, it does not count but the error message is added to the end of the file. There are usually more index entries than the number of records in the header. The given number of records is not equal to the entries in the assetinfo or assetlist file, it&#039;s usually higher. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: mp_backlot_load.ff ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Contains:&#039;&#039;&#039;&lt;br /&gt;
*2x shaders &lt;br /&gt;
*3x materials&lt;br /&gt;
*(1x fastfile name)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Materials:&lt;br /&gt;
# $victorybackdrop - mile_high_victory_screen.iwi (699,092 bytes)&lt;br /&gt;
# $defeatbackdrop - (none)&lt;br /&gt;
# $levelbriefing - loadscreen_mp_backlot.iwi (524,316 bytes)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start of file and header]&lt;br /&gt;
&lt;br /&gt;
71 03 00 00  decompressed filesize - 44 (hex: 371 + 2C = 39D; dec: 881 + 44 = 925)&lt;br /&gt;
&lt;br /&gt;
B8 AA 12 00  size of both IWIs the materials in FF point to - 56 (2x28, 28 bytes = IWI header)&lt;br /&gt;
             0x12AAB8          = 1,223,352&lt;br /&gt;
             699,092 + 524,316 = 1,223,408&lt;br /&gt;
             difference:                56&lt;br /&gt;
&lt;br /&gt;
A4 00 00 00  might be a flag&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
E5 00 00 00  size of fastfile in memory (that is at least without header and separators, and maybe more)&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
&lt;br /&gt;
-----------  [end of header] (44 bytes), [start of index]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  unknown, is sometimes FF FF FF FF&lt;br /&gt;
&lt;br /&gt;
06 00 00 00  number of records in index (6)&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
&lt;br /&gt;
05 00 00 00  FF FF FF FF  1st: shader&lt;br /&gt;
05 00 00 00  FF FF FF FF  2nd: shader&lt;br /&gt;
04 00 00 00  FF FF FF FF  3rd: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  4th: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  5th: material&lt;br /&gt;
1F 00 00 00  FF FF FF FF  6th: ff name&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
&lt;br /&gt;
-----------  [end of index]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Index ==&lt;br /&gt;
&lt;br /&gt;
4 byte identifier (fastfile entry type), 4 byte offset (FF FF FF FF = -1, meaning right after the previous block?)&lt;br /&gt;
&lt;br /&gt;
Separator (FF FF FF FF) after last 4-byte couple + 00 00 00 00 ?&lt;br /&gt;
&lt;br /&gt;
=== Types ===&lt;br /&gt;
&lt;br /&gt;
* 00 00 00 01 - physpreset&lt;br /&gt;
* 00 00 00 02 - xanim&lt;br /&gt;
* 00 00 00 03 - xmodel&lt;br /&gt;
* 00 00 00 04 - material&lt;br /&gt;
* 00 00 00 05 - shader / techset&lt;br /&gt;
* 00 00 00 06 - image?&lt;br /&gt;
* 00 00 00 0B - map_ents (d3dbsp)&lt;br /&gt;
* 00 00 00 0C - related to col_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 0E - related to game_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 10 - related to col_map_mp / gfx_map (d3dbsp)&lt;br /&gt;
* 00 00 00 13 - font&lt;br /&gt;
* 00 00 00 14 - menu&lt;br /&gt;
* 00 00 00 16 - localized string asset&lt;br /&gt;
* 00 00 00 17 - physpreset??&lt;br /&gt;
* 00 00 00 19 - fx&lt;br /&gt;
* 00 00 00 1F - raw file&lt;br /&gt;
* 00 00 00 20 - stringtable (comma separated list)&lt;br /&gt;
&lt;br /&gt;
== Content ==&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 04 ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 2B 01 01  First 4 bytes seem to be 4 (unsigned) char&#039;s.&lt;br /&gt;
             1st byte is so far always 0x00 (perhaps it&#039;s a short together with the second byte).&lt;br /&gt;
             2nd byte so far either 0x2B or 0x00, I think this is a length.&lt;br /&gt;
             3rd byte so far 0x01, when 0x00 (all 4) the content is only a number of 0x00&#039;s, then the filename (0x00 termination)&lt;br /&gt;
             4th byte either 0x00 or 0x01. Can be a length or a bool.&lt;br /&gt;
             Then 0x10 bytes of more header.&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
00           When fourth byte is 01, there&#039;s a 0x00 following?             &lt;br /&gt;
             Then there&#039;s garbage (0xFF) and some shorts it looks of length in the second byte.&lt;br /&gt;
             Then more information...&lt;br /&gt;
02 00 0E E0  Often ends with this&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [end separation]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 05 (shader) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  0x22 times 0x00000000 and sometimes 0xFFFFFFFF&lt;br /&gt;
?? ?? .. 00  Then (file) name (0x00 termination)    &lt;br /&gt;
             0x18 bytes of references (4 bytes per reference)?&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
             Variable length&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
?? ?? 00 00  2 shorts, first short multiplied by 4 gives the length of the shader, second is a flag? When set no string follows?&lt;br /&gt;
?? ?? .. 00  String if previous second short is 00 00, 0x00 terminated.    &lt;br /&gt;
&lt;br /&gt;
             Raw shader file (except the first 4 bytes, which, in the shader file, denotes the length of the file)&lt;br /&gt;
FF FF 00 00  End of shader file (always?)&lt;br /&gt;
             0x18 bytes of more data&lt;br /&gt;
?? ?? .. 00  String, 0x00 terminated&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [end separation]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 1F (rawfile) ===&lt;br /&gt;
&lt;br /&gt;
A rawfile. Often a rawfile named right after the fastfile&#039;s name is implicitly added. It contains the errors thrown when it was compiling / linking.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
64 00 00 00  Length of the file&#039;s content (example: decimal 100; does not count the string termination!)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [separator]&lt;br /&gt;
&lt;br /&gt;
6D 6F 64 00  File name or if it&#039;s the last 1F-block FastFile name (example: mod.)&lt;br /&gt;
?? ?? .. 00  Plain text content of length above (string, terminated by 0x00)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [end separation OR end of file]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--[[User:CoDEmanX|CoDEmanX]] 22:09, 4 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
--[[User:Daevius|Daevius]] 14:24, 5 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- outdated investigations below&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1F 00 00 00 FF FF FF FF  rawfile (plaintext)&lt;br /&gt;
05 00 00 00 FF FF FF FF  shader&lt;br /&gt;
03 00 00 00 FF FF FF FF  related to xmodel&lt;br /&gt;
1F 00 00 00 FF FF FF FF  xmodel data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
4A 06 00 00              rawfile length&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
6D 61 70 73 2F 6D 70 2F  filename:&lt;br /&gt;
5F 72 65 70 75 6C 73 65  maps/mp/_repulse.gsc&lt;br /&gt;
2E 67 73 63 00           followed by plaintext:&lt;br /&gt;
69 6E 69 74 28 29 0D 0A  init()..&lt;br /&gt;
7B 0D 0A 09 74 68 72 65  {...thre&lt;br /&gt;
61 64 20 70 6C 61 79 65  ad playe&lt;br /&gt;
72 63 6F 6E 6E 65 63 74  rconnect&lt;br /&gt;
28 29 3B 0D 0A ...       ();..}.&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
...                      shader (binary data)&lt;br /&gt;
&lt;br /&gt;
...                      xmodel related data&lt;br /&gt;
&lt;br /&gt;
...                      xmodel data (similar to original xmodel file, but nonetheless different)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Shaders ===&lt;br /&gt;
&lt;br /&gt;
05 00 00 00 or&lt;br /&gt;
04 00 00 00&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
9F 00 00 00  size after filename&lt;br /&gt;
&lt;br /&gt;
filename ended with 0x00&lt;br /&gt;
&lt;br /&gt;
(size * 4) bytes of shader data, seems to end with FF FF 00 00&lt;br /&gt;
might contain more data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
filename starts with &#039;,&#039;&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Technical Reference]]&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Daevius</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7130</id>
		<title>Call of Duty 4: FastFile Format</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7130"/>
		<updated>2009-11-05T14:23:52Z</updated>

		<summary type="html">&lt;p&gt;Daevius: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Under Construction Small.png‎]] &#039;&#039;&#039;*** Article and investigation in early progress ***&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Be aware, FF files are little endian, so swap those bytes &#039;round!&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
&lt;br /&gt;
*Byte 0-3: decompressed fastfile size minus 44 (0x2C)&lt;br /&gt;
*Byte 4-7: about the total size of referenced data, e.g. the required memory for IWI textures if material files are in the ff&lt;br /&gt;
*Byte 8-11: &#039;&#039;unknown&#039;&#039;, might be a flag&lt;br /&gt;
*Byte 12-23: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 24-27: somehow related to ff size?&lt;br /&gt;
*Byte 28-43: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 44-47: equal to number of entries in &amp;quot;1st index&amp;quot; and amount of (model tag/joint/notetrack) strings (times 4 for index length)&lt;br /&gt;
*Byte 48-51: separator? (FF FF FF FF)&lt;br /&gt;
*Byte 52-55: number of records* (&amp;quot;2nd index&amp;quot;, times 8 for index length)&lt;br /&gt;
*Byte 56-63: separator? (FF FF FF FF FF FF FF FF)&lt;br /&gt;
*Byte 64-x: string list (xmodelsurfs?) --&amp;gt; not always, depends on the content (required offsets are in the FF header)*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; under re-investigation &amp;lt;!-- If a file was missing on ff compile, it does not count but the error message is added to the end of the file. There are usually more index entries than the number of records in the header. The given number of records is not equal to the entries in the assetinfo or assetlist file, it&#039;s usually higher. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: mp_backlot_load.ff ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Contains:&#039;&#039;&#039;&lt;br /&gt;
*2x shaders &lt;br /&gt;
*3x materials&lt;br /&gt;
*(1x fastfile name)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Materials:&lt;br /&gt;
# $victorybackdrop - mile_high_victory_screen.iwi (699,092 bytes)&lt;br /&gt;
# $defeatbackdrop - (none)&lt;br /&gt;
# $levelbriefing - loadscreen_mp_backlot.iwi (524,316 bytes)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start of file and header]&lt;br /&gt;
&lt;br /&gt;
71 03 00 00  decompressed filesize - 44 (hex: 371 + 2C = 39D; dec: 881 + 44 = 925)&lt;br /&gt;
&lt;br /&gt;
B8 AA 12 00  size of both IWIs the materials in FF point to - 56 (2x28, 28 bytes = IWI header)&lt;br /&gt;
             0x12AAB8          = 1,223,352&lt;br /&gt;
             699,092 + 524,316 = 1,223,408&lt;br /&gt;
             difference:                56&lt;br /&gt;
&lt;br /&gt;
A4 00 00 00  might be a flag&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
E5 00 00 00  size of fastfile in memory (that is at least without header and separators, and maybe more)&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
&lt;br /&gt;
-----------  [end of header] (44 bytes), [start of index]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  unknown, is sometimes FF FF FF FF&lt;br /&gt;
&lt;br /&gt;
06 00 00 00  number of records in index (6)&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
&lt;br /&gt;
05 00 00 00  FF FF FF FF  1st: shader&lt;br /&gt;
05 00 00 00  FF FF FF FF  2nd: shader&lt;br /&gt;
04 00 00 00  FF FF FF FF  3rd: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  4th: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  5th: material&lt;br /&gt;
1F 00 00 00  FF FF FF FF  6th: ff name&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
&lt;br /&gt;
-----------  [end of index]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Index ==&lt;br /&gt;
&lt;br /&gt;
4 byte identifier (fastfile entry type), 4 byte offset (FF FF FF FF = -1, meaning right after the previous block?)&lt;br /&gt;
&lt;br /&gt;
Separator (FF FF FF FF) after last 4-byte couple + 00 00 00 00 ?&lt;br /&gt;
&lt;br /&gt;
=== Types ===&lt;br /&gt;
&lt;br /&gt;
* 00 00 00 01 - physpreset&lt;br /&gt;
* 00 00 00 02 - xanim&lt;br /&gt;
* 00 00 00 03 - xmodel&lt;br /&gt;
* 00 00 00 04 - material&lt;br /&gt;
* 00 00 00 05 - shader / techset&lt;br /&gt;
* 00 00 00 06 - image?&lt;br /&gt;
* 00 00 00 0B - map_ents (d3dbsp)&lt;br /&gt;
* 00 00 00 0C - related to col_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 0E - related to game_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 10 - related to col_map_mp / gfx_map (d3dbsp)&lt;br /&gt;
* 00 00 00 13 - font&lt;br /&gt;
* 00 00 00 14 - menu&lt;br /&gt;
* 00 00 00 16 - localized string asset&lt;br /&gt;
* 00 00 00 17 - physpreset??&lt;br /&gt;
* 00 00 00 19 - fx&lt;br /&gt;
* 00 00 00 1F - raw file&lt;br /&gt;
* 00 00 00 20 - stringtable (comma separated list)&lt;br /&gt;
&lt;br /&gt;
== Content ==&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 04 ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 2B 01 01  First 4 bytes seem to be 4 (unsigned) char&#039;s.&lt;br /&gt;
             1st byte is so far always 0x00 (perhaps it&#039;s a short together with the second byte).&lt;br /&gt;
             2nd byte so far either 0x2B or 0x00, I think this is a length.&lt;br /&gt;
             3rd byte so far 0x01, when 0x00 (all 4) the content is only a number of 0x00&#039;s, then the filename (0x00 termination)&lt;br /&gt;
             4th byte either 0x00 or 0x01. Can be a length or a bool.&lt;br /&gt;
             Then 0x10 bytes of more header.&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
00           When fourth byte is 01, there&#039;s a 0x00 following?             &lt;br /&gt;
             Then there&#039;s garbage (0xFF) and some shorts it looks of length in the second byte.&lt;br /&gt;
             Then more information...&lt;br /&gt;
02 00 0E E0  Often ends with this&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [end separation]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 05 (shader) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  0x22 times 0x00000000 and sometimes 0xFFFFFFFF&lt;br /&gt;
?? ?? .. 00  Then (file) name (0x00 termination)    &lt;br /&gt;
             0x18 bytes of references (4 bytes per reference)?&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
             Variable length&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
?? ?? 00 00  2 shorts, first short multiplied by 4 gives the length of the shader, second is a flag? When set no string follows?&lt;br /&gt;
?? ?? .. 00  String if previous second short is 00 00, 0x00 terminated.    &lt;br /&gt;
&lt;br /&gt;
             Raw shader file (except the first 4 bytes, which, in the shader file, denotes the length of the file)&lt;br /&gt;
FF FF 00 00  End of shader file (always?)&lt;br /&gt;
             0x18 bytes of more data&lt;br /&gt;
?? ?? .. 00  String, 0x00 terminated&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [end separation]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 1F (rawfile) ===&lt;br /&gt;
&lt;br /&gt;
A rawfile. Often a rawfile named right after the fastfile&#039;s name is implicitly added. It contains the errors thrown when it was compiling / linking.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
64 00 00 00  Length of the file&#039;s content (example: decimal 100; does not count the string termination!)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [separator]&lt;br /&gt;
&lt;br /&gt;
6D 6F 64 00  File name or if it&#039;s the last 1F-block FastFile name (example: mod.)&lt;br /&gt;
?? ?? .. 00  Plain text content of length above (string, terminated by 0x00)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [end separation OR end of file]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--[[User:CoDEmanX|CoDEmanX]] 22:09, 4 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
--[[User:Daevius|Daevius]] 14:32, 4 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- outdated investigations below&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1F 00 00 00 FF FF FF FF  rawfile (plaintext)&lt;br /&gt;
05 00 00 00 FF FF FF FF  shader&lt;br /&gt;
03 00 00 00 FF FF FF FF  related to xmodel&lt;br /&gt;
1F 00 00 00 FF FF FF FF  xmodel data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
4A 06 00 00              rawfile length&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
6D 61 70 73 2F 6D 70 2F  filename:&lt;br /&gt;
5F 72 65 70 75 6C 73 65  maps/mp/_repulse.gsc&lt;br /&gt;
2E 67 73 63 00           followed by plaintext:&lt;br /&gt;
69 6E 69 74 28 29 0D 0A  init()..&lt;br /&gt;
7B 0D 0A 09 74 68 72 65  {...thre&lt;br /&gt;
61 64 20 70 6C 61 79 65  ad playe&lt;br /&gt;
72 63 6F 6E 6E 65 63 74  rconnect&lt;br /&gt;
28 29 3B 0D 0A ...       ();..}.&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
...                      shader (binary data)&lt;br /&gt;
&lt;br /&gt;
...                      xmodel related data&lt;br /&gt;
&lt;br /&gt;
...                      xmodel data (similar to original xmodel file, but nonetheless different)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Shaders ===&lt;br /&gt;
&lt;br /&gt;
05 00 00 00 or&lt;br /&gt;
04 00 00 00&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
9F 00 00 00  size after filename&lt;br /&gt;
&lt;br /&gt;
filename ended with 0x00&lt;br /&gt;
&lt;br /&gt;
(size * 4) bytes of shader data, seems to end with FF FF 00 00&lt;br /&gt;
might contain more data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
filename starts with &#039;,&#039;&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Technical Reference]]&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Daevius</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7129</id>
		<title>Call of Duty 4: FastFile Format</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7129"/>
		<updated>2009-11-05T12:37:06Z</updated>

		<summary type="html">&lt;p&gt;Daevius: /* Example: mp_backlot_load.ff */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Under Construction Small.png‎]] &#039;&#039;&#039;*** Article and investigation in early progress ***&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Be aware, FF files are little endian, so swap those bytes &#039;round!&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
&lt;br /&gt;
*Byte 0-3: decompressed fastfile size minus 44 (0x2C)&lt;br /&gt;
*Byte 4-7: about the total size of referenced data, e.g. the required memory for IWI textures if material files are in the ff&lt;br /&gt;
*Byte 8-11: &#039;&#039;unknown&#039;&#039;, might be a flag&lt;br /&gt;
*Byte 12-23: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 24-27: somehow related to ff size?&lt;br /&gt;
*Byte 28-43: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 44-47: equal to number of entries in &amp;quot;1st index&amp;quot; and amount of (model tag/joint/notetrack) strings (times 4 for index length)&lt;br /&gt;
*Byte 48-51: separator? (FF FF FF FF)&lt;br /&gt;
*Byte 52-55: number of records* (&amp;quot;2nd index&amp;quot;, times 8 for index length)&lt;br /&gt;
*Byte 56-63: separator? (FF FF FF FF FF FF FF FF)&lt;br /&gt;
*Byte 64-x: string list (xmodelsurfs?) --&amp;gt; not always, depends on the content (required offsets are in the FF header)*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; under re-investigation &amp;lt;!-- If a file was missing on ff compile, it does not count but the error message is added to the end of the file. There are usually more index entries than the number of records in the header. The given number of records is not equal to the entries in the assetinfo or assetlist file, it&#039;s usually higher. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: mp_backlot_load.ff ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Contains:&#039;&#039;&#039;&lt;br /&gt;
*2x shaders &lt;br /&gt;
*3x materials&lt;br /&gt;
*(1x fastfile name)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Materials:&lt;br /&gt;
# $victorybackdrop - mile_high_victory_screen.iwi (699,092 bytes)&lt;br /&gt;
# $defeatbackdrop - (none)&lt;br /&gt;
# $levelbriefing - loadscreen_mp_backlot.iwi (524,316 bytes)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start of file and header]&lt;br /&gt;
&lt;br /&gt;
71 03 00 00  decompressed filesize - 44 (hex: 371 + 2C = 39D; dec: 881 + 44 = 925)&lt;br /&gt;
&lt;br /&gt;
B8 AA 12 00  size of both IWIs the materials in FF point to - 56 (2x28, 28 bytes = IWI header)&lt;br /&gt;
             0x12AAB8          = 1,223,352&lt;br /&gt;
             699,092 + 524,316 = 1,223,408&lt;br /&gt;
             difference:                56&lt;br /&gt;
&lt;br /&gt;
A4 00 00 00  might be a flag&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
E5 00 00 00  size of fastfile in memory (that is at least without header and separators, and maybe more)&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
&lt;br /&gt;
-----------  [end of header] (44 bytes), [start of index]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  unknown, is sometimes FF FF FF FF&lt;br /&gt;
&lt;br /&gt;
06 00 00 00  number of records in index (6)&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
&lt;br /&gt;
05 00 00 00  FF FF FF FF  1st: shader&lt;br /&gt;
05 00 00 00  FF FF FF FF  2nd: shader&lt;br /&gt;
04 00 00 00  FF FF FF FF  3rd: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  4th: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  5th: material&lt;br /&gt;
1F 00 00 00  FF FF FF FF  6th: ff name&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
&lt;br /&gt;
-----------  [end of index]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Index ==&lt;br /&gt;
&lt;br /&gt;
4 byte identifier (fastfile entry type), 4 byte offset (FF FF FF FF = -1, meaning right after the previous block?)&lt;br /&gt;
&lt;br /&gt;
Separator (FF FF FF FF) after last 4-byte couple + 00 00 00 00 ?&lt;br /&gt;
&lt;br /&gt;
=== Types ===&lt;br /&gt;
&lt;br /&gt;
* 00 00 00 01 - physpreset&lt;br /&gt;
* 00 00 00 02 - xanim&lt;br /&gt;
* 00 00 00 03 - xmodel&lt;br /&gt;
* 00 00 00 04 - material&lt;br /&gt;
* 00 00 00 05 - shader / techset&lt;br /&gt;
* 00 00 00 06 - image?&lt;br /&gt;
* 00 00 00 0B - map_ents (d3dbsp)&lt;br /&gt;
* 00 00 00 0C - related to col_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 0E - related to game_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 10 - related to col_map_mp / gfx_map (d3dbsp)&lt;br /&gt;
* 00 00 00 13 - font&lt;br /&gt;
* 00 00 00 14 - menu&lt;br /&gt;
* 00 00 00 16 - localized string asset&lt;br /&gt;
* 00 00 00 17 - physpreset??&lt;br /&gt;
* 00 00 00 19 - fx&lt;br /&gt;
* 00 00 00 1F - raw file&lt;br /&gt;
* 00 00 00 20 - stringtable (comma separated list)&lt;br /&gt;
&lt;br /&gt;
== Content ==&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 04 ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 2B 01 01  First 4 bytes seem to be 4 (unsigned) char&#039;s.&lt;br /&gt;
             1st byte is so far always 0x00 (perhaps it&#039;s a short together with the second byte).&lt;br /&gt;
             2nd byte so far either 0x2B or 0x00, I think this is a length.&lt;br /&gt;
             3rd byte so far 0x01, when 0x00 (all 4) the content is only a number of 0x00&#039;s, then the filename (0x00 termination)&lt;br /&gt;
             4th byte either 0x00 or 0x01. Can be a length or a bool.&lt;br /&gt;
             Then 0x10 bytes of more header.&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
00           When fourth byte is 01, there&#039;s a 0x00 following?             &lt;br /&gt;
             Then there&#039;s garbage (0xFF) and some shorts it looks of length in the second byte.&lt;br /&gt;
             Then more information...&lt;br /&gt;
02 00 0E E0  Often ends with this&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [end separation]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 05 ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  0x90 times 0x00&lt;br /&gt;
             Then filename (0x00 termination)             &lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [end separation]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 1F (rawfile) ===&lt;br /&gt;
&lt;br /&gt;
A rawfile. Often a rawfile named right after the fastfile&#039;s name is implicitly added. It contains the errors thrown when it was compiling / linking.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
64 00 00 00  Length of the file&#039;s content (example: decimal 100; does not count the string termination!)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [separator]&lt;br /&gt;
&lt;br /&gt;
6D 6F 64 00  File name or if it&#039;s the last 1F-block FastFile name (example: mod.)&lt;br /&gt;
?? ?? .. 00  Plain text content of length above (string, terminated by 0x00)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [end separation OR end of file]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--[[User:CoDEmanX|CoDEmanX]] 22:09, 4 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
--[[User:Daevius|Daevius]] 14:32, 4 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- outdated investigations below&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1F 00 00 00 FF FF FF FF  rawfile (plaintext)&lt;br /&gt;
05 00 00 00 FF FF FF FF  shader&lt;br /&gt;
03 00 00 00 FF FF FF FF  related to xmodel&lt;br /&gt;
1F 00 00 00 FF FF FF FF  xmodel data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
4A 06 00 00              rawfile length&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
6D 61 70 73 2F 6D 70 2F  filename:&lt;br /&gt;
5F 72 65 70 75 6C 73 65  maps/mp/_repulse.gsc&lt;br /&gt;
2E 67 73 63 00           followed by plaintext:&lt;br /&gt;
69 6E 69 74 28 29 0D 0A  init()..&lt;br /&gt;
7B 0D 0A 09 74 68 72 65  {...thre&lt;br /&gt;
61 64 20 70 6C 61 79 65  ad playe&lt;br /&gt;
72 63 6F 6E 6E 65 63 74  rconnect&lt;br /&gt;
28 29 3B 0D 0A ...       ();..}.&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
...                      shader (binary data)&lt;br /&gt;
&lt;br /&gt;
...                      xmodel related data&lt;br /&gt;
&lt;br /&gt;
...                      xmodel data (similar to original xmodel file, but nonetheless different)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Shaders ===&lt;br /&gt;
&lt;br /&gt;
05 00 00 00 or&lt;br /&gt;
04 00 00 00&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
9F 00 00 00  size after filename&lt;br /&gt;
&lt;br /&gt;
filename ended with 0x00&lt;br /&gt;
&lt;br /&gt;
(size * 4) bytes of shader data, seems to end with FF FF 00 00&lt;br /&gt;
might contain more data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
filename starts with &#039;,&#039;&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Technical Reference]]&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Daevius</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7128</id>
		<title>Call of Duty 4: FastFile Format</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7128"/>
		<updated>2009-11-05T12:07:30Z</updated>

		<summary type="html">&lt;p&gt;Daevius: /* 00 00 00 04 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Under Construction Small.png‎]] &#039;&#039;&#039;*** Article and investigation in early progress ***&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Be aware, FF files are little endian, so swap those bytes &#039;round!&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
&lt;br /&gt;
*Byte 0-3: decompressed fastfile size minus 44 (0x2C)&lt;br /&gt;
*Byte 4-7: about the total size of referenced data, e.g. the required memory for IWI textures if material files are in the ff&lt;br /&gt;
*Byte 8-11: &#039;&#039;unknown&#039;&#039;, might be a flag&lt;br /&gt;
*Byte 12-23: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 24-27: somehow related to ff size?&lt;br /&gt;
*Byte 28-43: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 44-47: equal to number of entries in &amp;quot;1st index&amp;quot; and amount of (model tag/joint/notetrack) strings (times 4 for index length)&lt;br /&gt;
*Byte 48-51: separator? (FF FF FF FF)&lt;br /&gt;
*Byte 52-55: number of records* (&amp;quot;2nd index&amp;quot;, times 8 for index length)&lt;br /&gt;
*Byte 56-63: separator? (FF FF FF FF FF FF FF FF)&lt;br /&gt;
*Byte 64-x: string list (xmodelsurfs?) --&amp;gt; not always, depends on the content (required offsets are in the FF header)*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; under re-investigation &amp;lt;!-- If a file was missing on ff compile, it does not count but the error message is added to the end of the file. There are usually more index entries than the number of records in the header. The given number of records is not equal to the entries in the assetinfo or assetlist file, it&#039;s usually higher. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: mp_backlot_load.ff ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Contains:&#039;&#039;&#039;&lt;br /&gt;
*2x shaders &lt;br /&gt;
*3x materials&lt;br /&gt;
*(1x fastfile name)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Materials:&lt;br /&gt;
# $victorybackdrop - mile_high_victory_screen.iwi (699,092 bytes)&lt;br /&gt;
# $defeatbackdrop - (none)&lt;br /&gt;
# $levelbriefing - loadscreen_mp_backlot.iwi (524,316 bytes)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start of file and header]&lt;br /&gt;
&lt;br /&gt;
71 03 00 00  decompressed filesize - 44 (hex: 371 + 2C = 39D; dec: 881 + 44 = 925)&lt;br /&gt;
&lt;br /&gt;
B8 AA 12 00  size of both IWIs the materials in FF point to - 56 (2x28, 28 bytes = IWI header)&lt;br /&gt;
             0x12AAB8          = 1,223,352&lt;br /&gt;
             699,092 + 524,316 = 1,223,408&lt;br /&gt;
             difference:                56&lt;br /&gt;
&lt;br /&gt;
A4 00 00 00  might be a flag&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
E5 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
&lt;br /&gt;
-----------  [end of header] (44 bytes), [start of index]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  unknown, is sometimes FF FF FF FF&lt;br /&gt;
&lt;br /&gt;
06 00 00 00  number of records in index (6)&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
&lt;br /&gt;
05 00 00 00  FF FF FF FF  1st: shader&lt;br /&gt;
05 00 00 00  FF FF FF FF  2nd: shader&lt;br /&gt;
04 00 00 00  FF FF FF FF  3rd: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  4th: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  5th: material&lt;br /&gt;
1F 00 00 00  FF FF FF FF  6th: ff name&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
&lt;br /&gt;
-----------  [end of index]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Index ==&lt;br /&gt;
&lt;br /&gt;
4 byte identifier (fastfile entry type), 4 byte offset (FF FF FF FF = -1, meaning right after the previous block?)&lt;br /&gt;
&lt;br /&gt;
Separator (FF FF FF FF) after last 4-byte couple + 00 00 00 00 ?&lt;br /&gt;
&lt;br /&gt;
=== Types ===&lt;br /&gt;
&lt;br /&gt;
* 00 00 00 01 - physpreset&lt;br /&gt;
* 00 00 00 02 - xanim&lt;br /&gt;
* 00 00 00 03 - xmodel&lt;br /&gt;
* 00 00 00 04 - material&lt;br /&gt;
* 00 00 00 05 - shader / techset&lt;br /&gt;
* 00 00 00 06 - image?&lt;br /&gt;
* 00 00 00 0B - map_ents (d3dbsp)&lt;br /&gt;
* 00 00 00 0C - related to col_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 0E - related to game_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 10 - related to col_map_mp / gfx_map (d3dbsp)&lt;br /&gt;
* 00 00 00 13 - font&lt;br /&gt;
* 00 00 00 14 - menu&lt;br /&gt;
* 00 00 00 16 - localized string asset&lt;br /&gt;
* 00 00 00 17 - physpreset??&lt;br /&gt;
* 00 00 00 19 - fx&lt;br /&gt;
* 00 00 00 1F - raw file&lt;br /&gt;
* 00 00 00 20 - stringtable (comma separated list)&lt;br /&gt;
&lt;br /&gt;
== Content ==&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 04 ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 2B 01 01  First 4 bytes seem to be 4 (unsigned) char&#039;s.&lt;br /&gt;
             1st byte is so far always 0x00 (perhaps it&#039;s a short together with the second byte).&lt;br /&gt;
             2nd byte so far either 0x2B or 0x00, I think this is a length.&lt;br /&gt;
             3rd byte so far 0x01, when 0x00 (all 4) the content is only a number of 0x00&#039;s, then the filename (0x00 termination)&lt;br /&gt;
             4th byte either 0x00 or 0x01. Can be a length or a bool.&lt;br /&gt;
             Then 0x10 bytes of more header.&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
00           When fourth byte is 01, there&#039;s a 0x00 following?             &lt;br /&gt;
             Then there&#039;s garbage (0xFF) and some shorts it looks of length in the second byte.&lt;br /&gt;
             Then more information...&lt;br /&gt;
02 00 0E E0  Often ends with this&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [end separation]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 05 ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  0x90 times 0x00&lt;br /&gt;
             Then filename (0x00 termination)             &lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [end separation]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 1F (rawfile) ===&lt;br /&gt;
&lt;br /&gt;
A rawfile. Often a rawfile named right after the fastfile&#039;s name is implicitly added. It contains the errors thrown when it was compiling / linking.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
64 00 00 00  Length of the file&#039;s content (example: decimal 100; does not count the string termination!)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [separator]&lt;br /&gt;
&lt;br /&gt;
6D 6F 64 00  File name or if it&#039;s the last 1F-block FastFile name (example: mod.)&lt;br /&gt;
?? ?? .. 00  Plain text content of length above (string, terminated by 0x00)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [end separation OR end of file]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--[[User:CoDEmanX|CoDEmanX]] 22:09, 4 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
--[[User:Daevius|Daevius]] 14:32, 4 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- outdated investigations below&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1F 00 00 00 FF FF FF FF  rawfile (plaintext)&lt;br /&gt;
05 00 00 00 FF FF FF FF  shader&lt;br /&gt;
03 00 00 00 FF FF FF FF  related to xmodel&lt;br /&gt;
1F 00 00 00 FF FF FF FF  xmodel data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
4A 06 00 00              rawfile length&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
6D 61 70 73 2F 6D 70 2F  filename:&lt;br /&gt;
5F 72 65 70 75 6C 73 65  maps/mp/_repulse.gsc&lt;br /&gt;
2E 67 73 63 00           followed by plaintext:&lt;br /&gt;
69 6E 69 74 28 29 0D 0A  init()..&lt;br /&gt;
7B 0D 0A 09 74 68 72 65  {...thre&lt;br /&gt;
61 64 20 70 6C 61 79 65  ad playe&lt;br /&gt;
72 63 6F 6E 6E 65 63 74  rconnect&lt;br /&gt;
28 29 3B 0D 0A ...       ();..}.&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
...                      shader (binary data)&lt;br /&gt;
&lt;br /&gt;
...                      xmodel related data&lt;br /&gt;
&lt;br /&gt;
...                      xmodel data (similar to original xmodel file, but nonetheless different)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Shaders ===&lt;br /&gt;
&lt;br /&gt;
05 00 00 00 or&lt;br /&gt;
04 00 00 00&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
9F 00 00 00  size after filename&lt;br /&gt;
&lt;br /&gt;
filename ended with 0x00&lt;br /&gt;
&lt;br /&gt;
(size * 4) bytes of shader data, seems to end with FF FF 00 00&lt;br /&gt;
might contain more data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
filename starts with &#039;,&#039;&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Technical Reference]]&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Daevius</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7127</id>
		<title>Call of Duty 4: FastFile Format</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7127"/>
		<updated>2009-11-05T11:45:35Z</updated>

		<summary type="html">&lt;p&gt;Daevius: /* Types */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Under Construction Small.png‎]] &#039;&#039;&#039;*** Article and investigation in early progress ***&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Be aware, FF files are little endian, so swap those bytes &#039;round!&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
&lt;br /&gt;
*Byte 0-3: decompressed fastfile size minus 44 (0x2C)&lt;br /&gt;
*Byte 4-7: about the total size of referenced data, e.g. the required memory for IWI textures if material files are in the ff&lt;br /&gt;
*Byte 8-11: &#039;&#039;unknown&#039;&#039;, might be a flag&lt;br /&gt;
*Byte 12-23: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 24-27: somehow related to ff size?&lt;br /&gt;
*Byte 28-43: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 44-47: equal to number of entries in &amp;quot;1st index&amp;quot; and amount of (model tag/joint/notetrack) strings (times 4 for index length)&lt;br /&gt;
*Byte 48-51: separator? (FF FF FF FF)&lt;br /&gt;
*Byte 52-55: number of records* (&amp;quot;2nd index&amp;quot;, times 8 for index length)&lt;br /&gt;
*Byte 56-63: separator? (FF FF FF FF FF FF FF FF)&lt;br /&gt;
*Byte 64-x: string list (xmodelsurfs?) --&amp;gt; not always, depends on the content (required offsets are in the FF header)*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; under re-investigation &amp;lt;!-- If a file was missing on ff compile, it does not count but the error message is added to the end of the file. There are usually more index entries than the number of records in the header. The given number of records is not equal to the entries in the assetinfo or assetlist file, it&#039;s usually higher. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: mp_backlot_load.ff ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Contains:&#039;&#039;&#039;&lt;br /&gt;
*2x shaders &lt;br /&gt;
*3x materials&lt;br /&gt;
*(1x fastfile name)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Materials:&lt;br /&gt;
# $victorybackdrop - mile_high_victory_screen.iwi (699,092 bytes)&lt;br /&gt;
# $defeatbackdrop - (none)&lt;br /&gt;
# $levelbriefing - loadscreen_mp_backlot.iwi (524,316 bytes)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start of file and header]&lt;br /&gt;
&lt;br /&gt;
71 03 00 00  decompressed filesize - 44 (hex: 371 + 2C = 39D; dec: 881 + 44 = 925)&lt;br /&gt;
&lt;br /&gt;
B8 AA 12 00  size of both IWIs the materials in FF point to - 56 (2x28, 28 bytes = IWI header)&lt;br /&gt;
             0x12AAB8          = 1,223,352&lt;br /&gt;
             699,092 + 524,316 = 1,223,408&lt;br /&gt;
             difference:                56&lt;br /&gt;
&lt;br /&gt;
A4 00 00 00  might be a flag&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
E5 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
&lt;br /&gt;
-----------  [end of header] (44 bytes), [start of index]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  unknown, is sometimes FF FF FF FF&lt;br /&gt;
&lt;br /&gt;
06 00 00 00  number of records in index (6)&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
&lt;br /&gt;
05 00 00 00  FF FF FF FF  1st: shader&lt;br /&gt;
05 00 00 00  FF FF FF FF  2nd: shader&lt;br /&gt;
04 00 00 00  FF FF FF FF  3rd: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  4th: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  5th: material&lt;br /&gt;
1F 00 00 00  FF FF FF FF  6th: ff name&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
&lt;br /&gt;
-----------  [end of index]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Index ==&lt;br /&gt;
&lt;br /&gt;
4 byte identifier (fastfile entry type), 4 byte offset (FF FF FF FF = -1, meaning right after the previous block?)&lt;br /&gt;
&lt;br /&gt;
Separator (FF FF FF FF) after last 4-byte couple + 00 00 00 00 ?&lt;br /&gt;
&lt;br /&gt;
=== Types ===&lt;br /&gt;
&lt;br /&gt;
* 00 00 00 01 - physpreset&lt;br /&gt;
* 00 00 00 02 - xanim&lt;br /&gt;
* 00 00 00 03 - xmodel&lt;br /&gt;
* 00 00 00 04 - material&lt;br /&gt;
* 00 00 00 05 - shader / techset&lt;br /&gt;
* 00 00 00 06 - image?&lt;br /&gt;
* 00 00 00 0B - map_ents (d3dbsp)&lt;br /&gt;
* 00 00 00 0C - related to col_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 0E - related to game_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 10 - related to col_map_mp / gfx_map (d3dbsp)&lt;br /&gt;
* 00 00 00 13 - font&lt;br /&gt;
* 00 00 00 14 - menu&lt;br /&gt;
* 00 00 00 16 - localized string asset&lt;br /&gt;
* 00 00 00 17 - physpreset??&lt;br /&gt;
* 00 00 00 19 - fx&lt;br /&gt;
* 00 00 00 1F - raw file&lt;br /&gt;
* 00 00 00 20 - stringtable (comma separated list)&lt;br /&gt;
&lt;br /&gt;
== Content ==&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 04 ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 2B 01 01  First 4 bytes seem to be 4 (unsigned) char&#039;s.&lt;br /&gt;
             1st byte is so far always 0x00 (perhaps it&#039;s a short together with the second byte).&lt;br /&gt;
             2nd byte so far either 0x2B or 0x00, I think this is a length.&lt;br /&gt;
             3rd byte so far 0x01, when 0x00 (all 4) the content is only a number of 0x00&#039;s, then the filename (0x00 termination)&lt;br /&gt;
             4th byte either 0x00 or 0x01. Can be a length or a bool.&lt;br /&gt;
             Then 0x10 bytes of more header.&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
00           When fourth byte is 01, there&#039;s a 0x00 following?             &lt;br /&gt;
             Then there&#039;s garbage (0xFF) and some shorts it looks of length in the second byte.&lt;br /&gt;
             Then more information...&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [end separation]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 05 ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  0x90 times 0x00&lt;br /&gt;
             Then filename (0x00 termination)             &lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [end separation]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 1F (rawfile) ===&lt;br /&gt;
&lt;br /&gt;
A rawfile. Often a rawfile named right after the fastfile&#039;s name is implicitly added. It contains the errors thrown when it was compiling / linking.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
64 00 00 00  Length of the file&#039;s content (example: decimal 100; does not count the string termination!)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [separator]&lt;br /&gt;
&lt;br /&gt;
6D 6F 64 00  File name or if it&#039;s the last 1F-block FastFile name (example: mod.)&lt;br /&gt;
?? ?? .. 00  Plain text content of length above (string, terminated by 0x00)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [end separation OR end of file]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--[[User:CoDEmanX|CoDEmanX]] 22:09, 4 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
--[[User:Daevius|Daevius]] 14:32, 4 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- outdated investigations below&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1F 00 00 00 FF FF FF FF  rawfile (plaintext)&lt;br /&gt;
05 00 00 00 FF FF FF FF  shader&lt;br /&gt;
03 00 00 00 FF FF FF FF  related to xmodel&lt;br /&gt;
1F 00 00 00 FF FF FF FF  xmodel data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
4A 06 00 00              rawfile length&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
6D 61 70 73 2F 6D 70 2F  filename:&lt;br /&gt;
5F 72 65 70 75 6C 73 65  maps/mp/_repulse.gsc&lt;br /&gt;
2E 67 73 63 00           followed by plaintext:&lt;br /&gt;
69 6E 69 74 28 29 0D 0A  init()..&lt;br /&gt;
7B 0D 0A 09 74 68 72 65  {...thre&lt;br /&gt;
61 64 20 70 6C 61 79 65  ad playe&lt;br /&gt;
72 63 6F 6E 6E 65 63 74  rconnect&lt;br /&gt;
28 29 3B 0D 0A ...       ();..}.&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
...                      shader (binary data)&lt;br /&gt;
&lt;br /&gt;
...                      xmodel related data&lt;br /&gt;
&lt;br /&gt;
...                      xmodel data (similar to original xmodel file, but nonetheless different)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Shaders ===&lt;br /&gt;
&lt;br /&gt;
05 00 00 00 or&lt;br /&gt;
04 00 00 00&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
9F 00 00 00  size after filename&lt;br /&gt;
&lt;br /&gt;
filename ended with 0x00&lt;br /&gt;
&lt;br /&gt;
(size * 4) bytes of shader data, seems to end with FF FF 00 00&lt;br /&gt;
might contain more data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
filename starts with &#039;,&#039;&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Technical Reference]]&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Daevius</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7126</id>
		<title>Call of Duty 4: FastFile Format</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7126"/>
		<updated>2009-11-05T11:45:11Z</updated>

		<summary type="html">&lt;p&gt;Daevius: /* 00 00 00 1F (rawfile) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Under Construction Small.png‎]] &#039;&#039;&#039;*** Article and investigation in early progress ***&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Be aware, FF files are little endian, so swap those bytes &#039;round!&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
&lt;br /&gt;
*Byte 0-3: decompressed fastfile size minus 44 (0x2C)&lt;br /&gt;
*Byte 4-7: about the total size of referenced data, e.g. the required memory for IWI textures if material files are in the ff&lt;br /&gt;
*Byte 8-11: &#039;&#039;unknown&#039;&#039;, might be a flag&lt;br /&gt;
*Byte 12-23: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 24-27: somehow related to ff size?&lt;br /&gt;
*Byte 28-43: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 44-47: equal to number of entries in &amp;quot;1st index&amp;quot; and amount of (model tag/joint/notetrack) strings (times 4 for index length)&lt;br /&gt;
*Byte 48-51: separator? (FF FF FF FF)&lt;br /&gt;
*Byte 52-55: number of records* (&amp;quot;2nd index&amp;quot;, times 8 for index length)&lt;br /&gt;
*Byte 56-63: separator? (FF FF FF FF FF FF FF FF)&lt;br /&gt;
*Byte 64-x: string list (xmodelsurfs?) --&amp;gt; not always, depends on the content (required offsets are in the FF header)*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; under re-investigation &amp;lt;!-- If a file was missing on ff compile, it does not count but the error message is added to the end of the file. There are usually more index entries than the number of records in the header. The given number of records is not equal to the entries in the assetinfo or assetlist file, it&#039;s usually higher. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: mp_backlot_load.ff ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Contains:&#039;&#039;&#039;&lt;br /&gt;
*2x shaders &lt;br /&gt;
*3x materials&lt;br /&gt;
*(1x fastfile name)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Materials:&lt;br /&gt;
# $victorybackdrop - mile_high_victory_screen.iwi (699,092 bytes)&lt;br /&gt;
# $defeatbackdrop - (none)&lt;br /&gt;
# $levelbriefing - loadscreen_mp_backlot.iwi (524,316 bytes)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start of file and header]&lt;br /&gt;
&lt;br /&gt;
71 03 00 00  decompressed filesize - 44 (hex: 371 + 2C = 39D; dec: 881 + 44 = 925)&lt;br /&gt;
&lt;br /&gt;
B8 AA 12 00  size of both IWIs the materials in FF point to - 56 (2x28, 28 bytes = IWI header)&lt;br /&gt;
             0x12AAB8          = 1,223,352&lt;br /&gt;
             699,092 + 524,316 = 1,223,408&lt;br /&gt;
             difference:                56&lt;br /&gt;
&lt;br /&gt;
A4 00 00 00  might be a flag&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
E5 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
&lt;br /&gt;
-----------  [end of header] (44 bytes), [start of index]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  unknown, is sometimes FF FF FF FF&lt;br /&gt;
&lt;br /&gt;
06 00 00 00  number of records in index (6)&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
&lt;br /&gt;
05 00 00 00  FF FF FF FF  1st: shader&lt;br /&gt;
05 00 00 00  FF FF FF FF  2nd: shader&lt;br /&gt;
04 00 00 00  FF FF FF FF  3rd: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  4th: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  5th: material&lt;br /&gt;
1F 00 00 00  FF FF FF FF  6th: ff name&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
&lt;br /&gt;
-----------  [end of index]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Index ==&lt;br /&gt;
&lt;br /&gt;
4 byte identifier (fastfile entry type), 4 byte offset (FF FF FF FF = -1, meaning right after the previous block?)&lt;br /&gt;
&lt;br /&gt;
Separator (FF FF FF FF) after last 4-byte couple + 00 00 00 00 ?&lt;br /&gt;
&lt;br /&gt;
=== Types ===&lt;br /&gt;
&lt;br /&gt;
* 00 00 00 01 - physpreset&lt;br /&gt;
* 00 00 00 02 - xanim&lt;br /&gt;
* 00 00 00 03 - xmodel&lt;br /&gt;
* 00 00 00 04 - material&lt;br /&gt;
* 00 00 00 05 - shader / techset&lt;br /&gt;
* 00 00 00 06 - image?&lt;br /&gt;
* 00 00 00 0B - map_ents (d3dbsp)&lt;br /&gt;
* 00 00 00 0C - related to col_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 0E - related to game_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 10 - related to col_map_mp / gfx_map (d3dbsp)&lt;br /&gt;
* 00 00 00 13 - font&lt;br /&gt;
* 00 00 00 14 - menu&lt;br /&gt;
* 00 00 00 16 - localized string asset&lt;br /&gt;
* 00 00 00 17 - physpreset??&lt;br /&gt;
* 00 00 00 19 - fx&lt;br /&gt;
* 00 00 00 1F - string / raw file / fastfile name&lt;br /&gt;
* 00 00 00 20 - stringtable (comma separated list)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Content ==&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 04 ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 2B 01 01  First 4 bytes seem to be 4 (unsigned) char&#039;s.&lt;br /&gt;
             1st byte is so far always 0x00 (perhaps it&#039;s a short together with the second byte).&lt;br /&gt;
             2nd byte so far either 0x2B or 0x00, I think this is a length.&lt;br /&gt;
             3rd byte so far 0x01, when 0x00 (all 4) the content is only a number of 0x00&#039;s, then the filename (0x00 termination)&lt;br /&gt;
             4th byte either 0x00 or 0x01. Can be a length or a bool.&lt;br /&gt;
             Then 0x10 bytes of more header.&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
00           When fourth byte is 01, there&#039;s a 0x00 following?             &lt;br /&gt;
             Then there&#039;s garbage (0xFF) and some shorts it looks of length in the second byte.&lt;br /&gt;
             Then more information...&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [end separation]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 05 ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  0x90 times 0x00&lt;br /&gt;
             Then filename (0x00 termination)             &lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [end separation]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 1F (rawfile) ===&lt;br /&gt;
&lt;br /&gt;
A rawfile. Often a rawfile named right after the fastfile&#039;s name is implicitly added. It contains the errors thrown when it was compiling / linking.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
64 00 00 00  Length of the file&#039;s content (example: decimal 100; does not count the string termination!)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [separator]&lt;br /&gt;
&lt;br /&gt;
6D 6F 64 00  File name or if it&#039;s the last 1F-block FastFile name (example: mod.)&lt;br /&gt;
?? ?? .. 00  Plain text content of length above (string, terminated by 0x00)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [end separation OR end of file]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--[[User:CoDEmanX|CoDEmanX]] 22:09, 4 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
--[[User:Daevius|Daevius]] 14:32, 4 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- outdated investigations below&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1F 00 00 00 FF FF FF FF  rawfile (plaintext)&lt;br /&gt;
05 00 00 00 FF FF FF FF  shader&lt;br /&gt;
03 00 00 00 FF FF FF FF  related to xmodel&lt;br /&gt;
1F 00 00 00 FF FF FF FF  xmodel data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
4A 06 00 00              rawfile length&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
6D 61 70 73 2F 6D 70 2F  filename:&lt;br /&gt;
5F 72 65 70 75 6C 73 65  maps/mp/_repulse.gsc&lt;br /&gt;
2E 67 73 63 00           followed by plaintext:&lt;br /&gt;
69 6E 69 74 28 29 0D 0A  init()..&lt;br /&gt;
7B 0D 0A 09 74 68 72 65  {...thre&lt;br /&gt;
61 64 20 70 6C 61 79 65  ad playe&lt;br /&gt;
72 63 6F 6E 6E 65 63 74  rconnect&lt;br /&gt;
28 29 3B 0D 0A ...       ();..}.&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
...                      shader (binary data)&lt;br /&gt;
&lt;br /&gt;
...                      xmodel related data&lt;br /&gt;
&lt;br /&gt;
...                      xmodel data (similar to original xmodel file, but nonetheless different)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Shaders ===&lt;br /&gt;
&lt;br /&gt;
05 00 00 00 or&lt;br /&gt;
04 00 00 00&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
9F 00 00 00  size after filename&lt;br /&gt;
&lt;br /&gt;
filename ended with 0x00&lt;br /&gt;
&lt;br /&gt;
(size * 4) bytes of shader data, seems to end with FF FF 00 00&lt;br /&gt;
might contain more data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
filename starts with &#039;,&#039;&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Technical Reference]]&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Daevius</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7125</id>
		<title>Call of Duty 4: FastFile Format</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7125"/>
		<updated>2009-11-05T11:44:58Z</updated>

		<summary type="html">&lt;p&gt;Daevius: /* 00 00 00 1F */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Under Construction Small.png‎]] &#039;&#039;&#039;*** Article and investigation in early progress ***&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Be aware, FF files are little endian, so swap those bytes &#039;round!&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
&lt;br /&gt;
*Byte 0-3: decompressed fastfile size minus 44 (0x2C)&lt;br /&gt;
*Byte 4-7: about the total size of referenced data, e.g. the required memory for IWI textures if material files are in the ff&lt;br /&gt;
*Byte 8-11: &#039;&#039;unknown&#039;&#039;, might be a flag&lt;br /&gt;
*Byte 12-23: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 24-27: somehow related to ff size?&lt;br /&gt;
*Byte 28-43: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 44-47: equal to number of entries in &amp;quot;1st index&amp;quot; and amount of (model tag/joint/notetrack) strings (times 4 for index length)&lt;br /&gt;
*Byte 48-51: separator? (FF FF FF FF)&lt;br /&gt;
*Byte 52-55: number of records* (&amp;quot;2nd index&amp;quot;, times 8 for index length)&lt;br /&gt;
*Byte 56-63: separator? (FF FF FF FF FF FF FF FF)&lt;br /&gt;
*Byte 64-x: string list (xmodelsurfs?) --&amp;gt; not always, depends on the content (required offsets are in the FF header)*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; under re-investigation &amp;lt;!-- If a file was missing on ff compile, it does not count but the error message is added to the end of the file. There are usually more index entries than the number of records in the header. The given number of records is not equal to the entries in the assetinfo or assetlist file, it&#039;s usually higher. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: mp_backlot_load.ff ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Contains:&#039;&#039;&#039;&lt;br /&gt;
*2x shaders &lt;br /&gt;
*3x materials&lt;br /&gt;
*(1x fastfile name)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Materials:&lt;br /&gt;
# $victorybackdrop - mile_high_victory_screen.iwi (699,092 bytes)&lt;br /&gt;
# $defeatbackdrop - (none)&lt;br /&gt;
# $levelbriefing - loadscreen_mp_backlot.iwi (524,316 bytes)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start of file and header]&lt;br /&gt;
&lt;br /&gt;
71 03 00 00  decompressed filesize - 44 (hex: 371 + 2C = 39D; dec: 881 + 44 = 925)&lt;br /&gt;
&lt;br /&gt;
B8 AA 12 00  size of both IWIs the materials in FF point to - 56 (2x28, 28 bytes = IWI header)&lt;br /&gt;
             0x12AAB8          = 1,223,352&lt;br /&gt;
             699,092 + 524,316 = 1,223,408&lt;br /&gt;
             difference:                56&lt;br /&gt;
&lt;br /&gt;
A4 00 00 00  might be a flag&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
E5 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
&lt;br /&gt;
-----------  [end of header] (44 bytes), [start of index]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  unknown, is sometimes FF FF FF FF&lt;br /&gt;
&lt;br /&gt;
06 00 00 00  number of records in index (6)&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
&lt;br /&gt;
05 00 00 00  FF FF FF FF  1st: shader&lt;br /&gt;
05 00 00 00  FF FF FF FF  2nd: shader&lt;br /&gt;
04 00 00 00  FF FF FF FF  3rd: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  4th: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  5th: material&lt;br /&gt;
1F 00 00 00  FF FF FF FF  6th: ff name&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
&lt;br /&gt;
-----------  [end of index]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Index ==&lt;br /&gt;
&lt;br /&gt;
4 byte identifier (fastfile entry type), 4 byte offset (FF FF FF FF = -1, meaning right after the previous block?)&lt;br /&gt;
&lt;br /&gt;
Separator (FF FF FF FF) after last 4-byte couple + 00 00 00 00 ?&lt;br /&gt;
&lt;br /&gt;
=== Types ===&lt;br /&gt;
&lt;br /&gt;
* 00 00 00 01 - physpreset&lt;br /&gt;
* 00 00 00 02 - xanim&lt;br /&gt;
* 00 00 00 03 - xmodel&lt;br /&gt;
* 00 00 00 04 - material&lt;br /&gt;
* 00 00 00 05 - shader / techset&lt;br /&gt;
* 00 00 00 06 - image?&lt;br /&gt;
* 00 00 00 0B - map_ents (d3dbsp)&lt;br /&gt;
* 00 00 00 0C - related to col_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 0E - related to game_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 10 - related to col_map_mp / gfx_map (d3dbsp)&lt;br /&gt;
* 00 00 00 13 - font&lt;br /&gt;
* 00 00 00 14 - menu&lt;br /&gt;
* 00 00 00 16 - localized string asset&lt;br /&gt;
* 00 00 00 17 - physpreset??&lt;br /&gt;
* 00 00 00 19 - fx&lt;br /&gt;
* 00 00 00 1F - string / raw file / fastfile name&lt;br /&gt;
* 00 00 00 20 - stringtable (comma separated list)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Content ==&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 04 ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 2B 01 01  First 4 bytes seem to be 4 (unsigned) char&#039;s.&lt;br /&gt;
             1st byte is so far always 0x00 (perhaps it&#039;s a short together with the second byte).&lt;br /&gt;
             2nd byte so far either 0x2B or 0x00, I think this is a length.&lt;br /&gt;
             3rd byte so far 0x01, when 0x00 (all 4) the content is only a number of 0x00&#039;s, then the filename (0x00 termination)&lt;br /&gt;
             4th byte either 0x00 or 0x01. Can be a length or a bool.&lt;br /&gt;
             Then 0x10 bytes of more header.&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
00           When fourth byte is 01, there&#039;s a 0x00 following?             &lt;br /&gt;
             Then there&#039;s garbage (0xFF) and some shorts it looks of length in the second byte.&lt;br /&gt;
             Then more information...&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [end separation]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 05 ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  0x90 times 0x00&lt;br /&gt;
             Then filename (0x00 termination)             &lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [end separation]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 1F (rawfile) ===&lt;br /&gt;
&lt;br /&gt;
A rawfile. Often a rawfile named right after the fastfile&#039;s name is implicitly added. It contains the errors thrown when it was compiling / linking.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
64 00 00 00  Length of the file&#039;s content (example: decimal 100; does not count the string termination!)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [separator]&lt;br /&gt;
&lt;br /&gt;
6D 6F 64 00  File name or if it&#039;s the last 1F-block FastFile name (example: mod.)&lt;br /&gt;
&lt;br /&gt;
?? ?? .. 00  Plain text content of length above (string, terminated by 0x00)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [end separation OR end of file]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--[[User:CoDEmanX|CoDEmanX]] 22:09, 4 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
--[[User:Daevius|Daevius]] 14:32, 4 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- outdated investigations below&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1F 00 00 00 FF FF FF FF  rawfile (plaintext)&lt;br /&gt;
05 00 00 00 FF FF FF FF  shader&lt;br /&gt;
03 00 00 00 FF FF FF FF  related to xmodel&lt;br /&gt;
1F 00 00 00 FF FF FF FF  xmodel data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
4A 06 00 00              rawfile length&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
6D 61 70 73 2F 6D 70 2F  filename:&lt;br /&gt;
5F 72 65 70 75 6C 73 65  maps/mp/_repulse.gsc&lt;br /&gt;
2E 67 73 63 00           followed by plaintext:&lt;br /&gt;
69 6E 69 74 28 29 0D 0A  init()..&lt;br /&gt;
7B 0D 0A 09 74 68 72 65  {...thre&lt;br /&gt;
61 64 20 70 6C 61 79 65  ad playe&lt;br /&gt;
72 63 6F 6E 6E 65 63 74  rconnect&lt;br /&gt;
28 29 3B 0D 0A ...       ();..}.&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
...                      shader (binary data)&lt;br /&gt;
&lt;br /&gt;
...                      xmodel related data&lt;br /&gt;
&lt;br /&gt;
...                      xmodel data (similar to original xmodel file, but nonetheless different)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Shaders ===&lt;br /&gt;
&lt;br /&gt;
05 00 00 00 or&lt;br /&gt;
04 00 00 00&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
9F 00 00 00  size after filename&lt;br /&gt;
&lt;br /&gt;
filename ended with 0x00&lt;br /&gt;
&lt;br /&gt;
(size * 4) bytes of shader data, seems to end with FF FF 00 00&lt;br /&gt;
might contain more data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
filename starts with &#039;,&#039;&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Technical Reference]]&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Daevius</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7124</id>
		<title>Call of Duty 4: FastFile Format</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7124"/>
		<updated>2009-11-05T11:30:43Z</updated>

		<summary type="html">&lt;p&gt;Daevius: /* 00 00 00 1F */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Under Construction Small.png‎]] &#039;&#039;&#039;*** Article and investigation in early progress ***&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Be aware, FF files are little endian, so swap those bytes &#039;round!&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
&lt;br /&gt;
*Byte 0-3: decompressed fastfile size minus 44 (0x2C)&lt;br /&gt;
*Byte 4-7: about the total size of referenced data, e.g. the required memory for IWI textures if material files are in the ff&lt;br /&gt;
*Byte 8-11: &#039;&#039;unknown&#039;&#039;, might be a flag&lt;br /&gt;
*Byte 12-23: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 24-27: somehow related to ff size?&lt;br /&gt;
*Byte 28-43: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 44-47: equal to number of entries in &amp;quot;1st index&amp;quot; and amount of (model tag/joint/notetrack) strings (times 4 for index length)&lt;br /&gt;
*Byte 48-51: separator? (FF FF FF FF)&lt;br /&gt;
*Byte 52-55: number of records* (&amp;quot;2nd index&amp;quot;, times 8 for index length)&lt;br /&gt;
*Byte 56-63: separator? (FF FF FF FF FF FF FF FF)&lt;br /&gt;
*Byte 64-x: string list (xmodelsurfs?) --&amp;gt; not always, depends on the content (required offsets are in the FF header)*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; under re-investigation &amp;lt;!-- If a file was missing on ff compile, it does not count but the error message is added to the end of the file. There are usually more index entries than the number of records in the header. The given number of records is not equal to the entries in the assetinfo or assetlist file, it&#039;s usually higher. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: mp_backlot_load.ff ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Contains:&#039;&#039;&#039;&lt;br /&gt;
*2x shaders &lt;br /&gt;
*3x materials&lt;br /&gt;
*(1x fastfile name)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Materials:&lt;br /&gt;
# $victorybackdrop - mile_high_victory_screen.iwi (699,092 bytes)&lt;br /&gt;
# $defeatbackdrop - (none)&lt;br /&gt;
# $levelbriefing - loadscreen_mp_backlot.iwi (524,316 bytes)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start of file and header]&lt;br /&gt;
&lt;br /&gt;
71 03 00 00  decompressed filesize - 44 (hex: 371 + 2C = 39D; dec: 881 + 44 = 925)&lt;br /&gt;
&lt;br /&gt;
B8 AA 12 00  size of both IWIs the materials in FF point to - 56 (2x28, 28 bytes = IWI header)&lt;br /&gt;
             0x12AAB8          = 1,223,352&lt;br /&gt;
             699,092 + 524,316 = 1,223,408&lt;br /&gt;
             difference:                56&lt;br /&gt;
&lt;br /&gt;
A4 00 00 00  might be a flag&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
E5 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
&lt;br /&gt;
-----------  [end of header] (44 bytes), [start of index]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  unknown, is sometimes FF FF FF FF&lt;br /&gt;
&lt;br /&gt;
06 00 00 00  number of records in index (6)&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
&lt;br /&gt;
05 00 00 00  FF FF FF FF  1st: shader&lt;br /&gt;
05 00 00 00  FF FF FF FF  2nd: shader&lt;br /&gt;
04 00 00 00  FF FF FF FF  3rd: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  4th: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  5th: material&lt;br /&gt;
1F 00 00 00  FF FF FF FF  6th: ff name&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
&lt;br /&gt;
-----------  [end of index]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Index ==&lt;br /&gt;
&lt;br /&gt;
4 byte identifier (fastfile entry type), 4 byte offset (FF FF FF FF = -1, meaning right after the previous block?)&lt;br /&gt;
&lt;br /&gt;
Separator (FF FF FF FF) after last 4-byte couple + 00 00 00 00 ?&lt;br /&gt;
&lt;br /&gt;
=== Types ===&lt;br /&gt;
&lt;br /&gt;
* 00 00 00 01 - physpreset&lt;br /&gt;
* 00 00 00 02 - xanim&lt;br /&gt;
* 00 00 00 03 - xmodel&lt;br /&gt;
* 00 00 00 04 - material&lt;br /&gt;
* 00 00 00 05 - shader / techset&lt;br /&gt;
* 00 00 00 06 - image?&lt;br /&gt;
* 00 00 00 0B - map_ents (d3dbsp)&lt;br /&gt;
* 00 00 00 0C - related to col_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 0E - related to game_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 10 - related to col_map_mp / gfx_map (d3dbsp)&lt;br /&gt;
* 00 00 00 13 - font&lt;br /&gt;
* 00 00 00 14 - menu&lt;br /&gt;
* 00 00 00 16 - localized string asset&lt;br /&gt;
* 00 00 00 17 - physpreset??&lt;br /&gt;
* 00 00 00 19 - fx&lt;br /&gt;
* 00 00 00 1F - string / raw file / fastfile name&lt;br /&gt;
* 00 00 00 20 - stringtable (comma separated list)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Content ==&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 04 ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 2B 01 01  First 4 bytes seem to be 4 (unsigned) char&#039;s.&lt;br /&gt;
             1st byte is so far always 0x00 (perhaps it&#039;s a short together with the second byte).&lt;br /&gt;
             2nd byte so far either 0x2B or 0x00, I think this is a length.&lt;br /&gt;
             3rd byte so far 0x01, when 0x00 (all 4) the content is only a number of 0x00&#039;s, then the filename (0x00 termination)&lt;br /&gt;
             4th byte either 0x00 or 0x01. Can be a length or a bool.&lt;br /&gt;
             Then 0x10 bytes of more header.&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
00           When fourth byte is 01, there&#039;s a 0x00 following?             &lt;br /&gt;
             Then there&#039;s garbage (0xFF) and some shorts it looks of length in the second byte.&lt;br /&gt;
             Then more information...&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [end separation]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 05 ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  0x90 times 0x00&lt;br /&gt;
             Then filename (0x00 termination)             &lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [end separation]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 1F ===&lt;br /&gt;
&lt;br /&gt;
Often at the end of a FastFile, also used for GSC scripts and other plaintext files. Compiled into FF by use of rawfile,PATH/FILE.EXT in zone file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
64 00 00 00  Length of the file&#039;s content (example: decimal 100; does not count the string termination!)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [separator]&lt;br /&gt;
&lt;br /&gt;
6D 6F 64 00  File name or if it&#039;s the last 1F-block FastFile name (example: mod.)&lt;br /&gt;
&lt;br /&gt;
?? ?? .. 00  Plain text content (string, terminated by 0x00),&lt;br /&gt;
             If at the end of the FF file, then it contains errors and warnings generated by the compiler/linker&lt;br /&gt;
             Else it&#039;s empty (thus only the string termination character)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--[[User:CoDEmanX|CoDEmanX]] 22:09, 4 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
--[[User:Daevius|Daevius]] 14:32, 4 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- outdated investigations below&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1F 00 00 00 FF FF FF FF  rawfile (plaintext)&lt;br /&gt;
05 00 00 00 FF FF FF FF  shader&lt;br /&gt;
03 00 00 00 FF FF FF FF  related to xmodel&lt;br /&gt;
1F 00 00 00 FF FF FF FF  xmodel data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
4A 06 00 00              rawfile length&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
6D 61 70 73 2F 6D 70 2F  filename:&lt;br /&gt;
5F 72 65 70 75 6C 73 65  maps/mp/_repulse.gsc&lt;br /&gt;
2E 67 73 63 00           followed by plaintext:&lt;br /&gt;
69 6E 69 74 28 29 0D 0A  init()..&lt;br /&gt;
7B 0D 0A 09 74 68 72 65  {...thre&lt;br /&gt;
61 64 20 70 6C 61 79 65  ad playe&lt;br /&gt;
72 63 6F 6E 6E 65 63 74  rconnect&lt;br /&gt;
28 29 3B 0D 0A ...       ();..}.&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
...                      shader (binary data)&lt;br /&gt;
&lt;br /&gt;
...                      xmodel related data&lt;br /&gt;
&lt;br /&gt;
...                      xmodel data (similar to original xmodel file, but nonetheless different)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Shaders ===&lt;br /&gt;
&lt;br /&gt;
05 00 00 00 or&lt;br /&gt;
04 00 00 00&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
9F 00 00 00  size after filename&lt;br /&gt;
&lt;br /&gt;
filename ended with 0x00&lt;br /&gt;
&lt;br /&gt;
(size * 4) bytes of shader data, seems to end with FF FF 00 00&lt;br /&gt;
might contain more data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
filename starts with &#039;,&#039;&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Technical Reference]]&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Daevius</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7123</id>
		<title>Call of Duty 4: FastFile Format</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7123"/>
		<updated>2009-11-05T11:30:21Z</updated>

		<summary type="html">&lt;p&gt;Daevius: /* 00 00 00 1F */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Under Construction Small.png‎]] &#039;&#039;&#039;*** Article and investigation in early progress ***&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Be aware, FF files are little endian, so swap those bytes &#039;round!&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
&lt;br /&gt;
*Byte 0-3: decompressed fastfile size minus 44 (0x2C)&lt;br /&gt;
*Byte 4-7: about the total size of referenced data, e.g. the required memory for IWI textures if material files are in the ff&lt;br /&gt;
*Byte 8-11: &#039;&#039;unknown&#039;&#039;, might be a flag&lt;br /&gt;
*Byte 12-23: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 24-27: somehow related to ff size?&lt;br /&gt;
*Byte 28-43: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 44-47: equal to number of entries in &amp;quot;1st index&amp;quot; and amount of (model tag/joint/notetrack) strings (times 4 for index length)&lt;br /&gt;
*Byte 48-51: separator? (FF FF FF FF)&lt;br /&gt;
*Byte 52-55: number of records* (&amp;quot;2nd index&amp;quot;, times 8 for index length)&lt;br /&gt;
*Byte 56-63: separator? (FF FF FF FF FF FF FF FF)&lt;br /&gt;
*Byte 64-x: string list (xmodelsurfs?) --&amp;gt; not always, depends on the content (required offsets are in the FF header)*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; under re-investigation &amp;lt;!-- If a file was missing on ff compile, it does not count but the error message is added to the end of the file. There are usually more index entries than the number of records in the header. The given number of records is not equal to the entries in the assetinfo or assetlist file, it&#039;s usually higher. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: mp_backlot_load.ff ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Contains:&#039;&#039;&#039;&lt;br /&gt;
*2x shaders &lt;br /&gt;
*3x materials&lt;br /&gt;
*(1x fastfile name)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Materials:&lt;br /&gt;
# $victorybackdrop - mile_high_victory_screen.iwi (699,092 bytes)&lt;br /&gt;
# $defeatbackdrop - (none)&lt;br /&gt;
# $levelbriefing - loadscreen_mp_backlot.iwi (524,316 bytes)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start of file and header]&lt;br /&gt;
&lt;br /&gt;
71 03 00 00  decompressed filesize - 44 (hex: 371 + 2C = 39D; dec: 881 + 44 = 925)&lt;br /&gt;
&lt;br /&gt;
B8 AA 12 00  size of both IWIs the materials in FF point to - 56 (2x28, 28 bytes = IWI header)&lt;br /&gt;
             0x12AAB8          = 1,223,352&lt;br /&gt;
             699,092 + 524,316 = 1,223,408&lt;br /&gt;
             difference:                56&lt;br /&gt;
&lt;br /&gt;
A4 00 00 00  might be a flag&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
E5 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
&lt;br /&gt;
-----------  [end of header] (44 bytes), [start of index]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  unknown, is sometimes FF FF FF FF&lt;br /&gt;
&lt;br /&gt;
06 00 00 00  number of records in index (6)&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
&lt;br /&gt;
05 00 00 00  FF FF FF FF  1st: shader&lt;br /&gt;
05 00 00 00  FF FF FF FF  2nd: shader&lt;br /&gt;
04 00 00 00  FF FF FF FF  3rd: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  4th: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  5th: material&lt;br /&gt;
1F 00 00 00  FF FF FF FF  6th: ff name&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
&lt;br /&gt;
-----------  [end of index]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Index ==&lt;br /&gt;
&lt;br /&gt;
4 byte identifier (fastfile entry type), 4 byte offset (FF FF FF FF = -1, meaning right after the previous block?)&lt;br /&gt;
&lt;br /&gt;
Separator (FF FF FF FF) after last 4-byte couple + 00 00 00 00 ?&lt;br /&gt;
&lt;br /&gt;
=== Types ===&lt;br /&gt;
&lt;br /&gt;
* 00 00 00 01 - physpreset&lt;br /&gt;
* 00 00 00 02 - xanim&lt;br /&gt;
* 00 00 00 03 - xmodel&lt;br /&gt;
* 00 00 00 04 - material&lt;br /&gt;
* 00 00 00 05 - shader / techset&lt;br /&gt;
* 00 00 00 06 - image?&lt;br /&gt;
* 00 00 00 0B - map_ents (d3dbsp)&lt;br /&gt;
* 00 00 00 0C - related to col_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 0E - related to game_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 10 - related to col_map_mp / gfx_map (d3dbsp)&lt;br /&gt;
* 00 00 00 13 - font&lt;br /&gt;
* 00 00 00 14 - menu&lt;br /&gt;
* 00 00 00 16 - localized string asset&lt;br /&gt;
* 00 00 00 17 - physpreset??&lt;br /&gt;
* 00 00 00 19 - fx&lt;br /&gt;
* 00 00 00 1F - string / raw file / fastfile name&lt;br /&gt;
* 00 00 00 20 - stringtable (comma separated list)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Content ==&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 04 ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 2B 01 01  First 4 bytes seem to be 4 (unsigned) char&#039;s.&lt;br /&gt;
             1st byte is so far always 0x00 (perhaps it&#039;s a short together with the second byte).&lt;br /&gt;
             2nd byte so far either 0x2B or 0x00, I think this is a length.&lt;br /&gt;
             3rd byte so far 0x01, when 0x00 (all 4) the content is only a number of 0x00&#039;s, then the filename (0x00 termination)&lt;br /&gt;
             4th byte either 0x00 or 0x01. Can be a length or a bool.&lt;br /&gt;
             Then 0x10 bytes of more header.&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
00           When fourth byte is 01, there&#039;s a 0x00 following?             &lt;br /&gt;
             Then there&#039;s garbage (0xFF) and some shorts it looks of length in the second byte.&lt;br /&gt;
             Then more information...&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [end separation]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 05 ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  0x90 times 0x00&lt;br /&gt;
             Then filename (0x00 termination)             &lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [end separation]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 1F ===&lt;br /&gt;
&lt;br /&gt;
Often at the end of a FastFile, also used for GSC scripts and other plaintext files. Compiled into FF by use of rawfile,PATH/FILE.EXT in zone file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
64 00 00 00  Length of the file&#039;s content (example: decimal 100; does not count the string termination!)&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [separator]&lt;br /&gt;
&lt;br /&gt;
6D 6F 64 00  file name or if it&#039;s the last 1F-block FastFile name (example: mod.)&lt;br /&gt;
&lt;br /&gt;
?? ?? .. 00  Plain text content (string, terminated by 0x00),&lt;br /&gt;
             If at the end of the FF file, then it contains errors and warnings generated by the compiler/linker&lt;br /&gt;
             Else it&#039;s empty (thus only the string termination character)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--[[User:CoDEmanX|CoDEmanX]] 22:09, 4 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
--[[User:Daevius|Daevius]] 14:32, 4 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- outdated investigations below&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1F 00 00 00 FF FF FF FF  rawfile (plaintext)&lt;br /&gt;
05 00 00 00 FF FF FF FF  shader&lt;br /&gt;
03 00 00 00 FF FF FF FF  related to xmodel&lt;br /&gt;
1F 00 00 00 FF FF FF FF  xmodel data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
4A 06 00 00              rawfile length&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
6D 61 70 73 2F 6D 70 2F  filename:&lt;br /&gt;
5F 72 65 70 75 6C 73 65  maps/mp/_repulse.gsc&lt;br /&gt;
2E 67 73 63 00           followed by plaintext:&lt;br /&gt;
69 6E 69 74 28 29 0D 0A  init()..&lt;br /&gt;
7B 0D 0A 09 74 68 72 65  {...thre&lt;br /&gt;
61 64 20 70 6C 61 79 65  ad playe&lt;br /&gt;
72 63 6F 6E 6E 65 63 74  rconnect&lt;br /&gt;
28 29 3B 0D 0A ...       ();..}.&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
...                      shader (binary data)&lt;br /&gt;
&lt;br /&gt;
...                      xmodel related data&lt;br /&gt;
&lt;br /&gt;
...                      xmodel data (similar to original xmodel file, but nonetheless different)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Shaders ===&lt;br /&gt;
&lt;br /&gt;
05 00 00 00 or&lt;br /&gt;
04 00 00 00&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
9F 00 00 00  size after filename&lt;br /&gt;
&lt;br /&gt;
filename ended with 0x00&lt;br /&gt;
&lt;br /&gt;
(size * 4) bytes of shader data, seems to end with FF FF 00 00&lt;br /&gt;
might contain more data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
filename starts with &#039;,&#039;&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Technical Reference]]&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Daevius</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7121</id>
		<title>Call of Duty 4: FastFile Format</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7121"/>
		<updated>2009-11-04T14:33:56Z</updated>

		<summary type="html">&lt;p&gt;Daevius: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Under Construction Small.png‎]] &#039;&#039;&#039;*** Article and investigation in early progress ***&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Be aware, FF files are little endian, so swap those bytes &#039;round!&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
&lt;br /&gt;
*Byte 0-3: decompressed fastfile size minus 44 (0x2C)&lt;br /&gt;
*Byte 4-7: about the total size of referenced data, e.g. the required memory for IWI textures if material files are in the ff&lt;br /&gt;
*Byte 8-11: &#039;&#039;unknown&#039;&#039;, might be a flag&lt;br /&gt;
*Byte 12-43: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 44-47: equal to number of entries in &amp;quot;1st index&amp;quot; and amount of (model tag/joint/notetrack) strings (times 4 for index length)&lt;br /&gt;
*Byte 48-51: separator? (FF FF FF FF)&lt;br /&gt;
*Byte 52-55: number of records* (&amp;quot;2nd index&amp;quot;, times 8 for index length)&lt;br /&gt;
*Byte 56-63: separator? (FF FF FF FF FF FF FF FF)&lt;br /&gt;
*Byte 64-x: string list (xmodelsurfs?) --&amp;gt; not always, depends on the content (required offsets are in the FF header)*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; under re-investigation &amp;lt;!-- If a file was missing on ff compile, it does not count but the error message is added to the end of the file. There are usually more index entries than the number of records in the header. The given number of records is not equal to the entries in the assetinfo or assetlist file, it&#039;s usually higher. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: mp_backlot_load.ff ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Contains:&#039;&#039;&#039;&lt;br /&gt;
*2x shaders &lt;br /&gt;
*3x materials&lt;br /&gt;
*(1x fastfile name)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Materials:&lt;br /&gt;
# $victorybackdrop - mile_high_victory_screen.iwi (699,092 bytes)&lt;br /&gt;
# $defeatbackdrop - (none)&lt;br /&gt;
# $levelbriefing - loadscreen_mp_backlot.iwi (524,316 bytes)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start of file and header]&lt;br /&gt;
&lt;br /&gt;
71 03 00 00  decompressed filesize - 44 (hex: 371 + 2C = 39D; dec: 881 + 44 = 925)&lt;br /&gt;
&lt;br /&gt;
B8 AA 12 00  size of both IWIs the materials in FF point to - 56 (2x28, 28 bytes = IWI header)&lt;br /&gt;
             0x12AAB8          = 1,223,352&lt;br /&gt;
             699,092 + 524,316 = 1,223,408&lt;br /&gt;
             difference:                56&lt;br /&gt;
&lt;br /&gt;
A4 00 00 00  might be a flag&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
E5 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
&lt;br /&gt;
-----------  [end of header] (44 bytes), [start of index]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  unknown, is sometimes FF FF FF FF&lt;br /&gt;
&lt;br /&gt;
06 00 00 00  number of records in index (6)&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
&lt;br /&gt;
05 00 00 00  FF FF FF FF  1st: shader&lt;br /&gt;
05 00 00 00  FF FF FF FF  2nd: shader&lt;br /&gt;
04 00 00 00  FF FF FF FF  3rd: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  4th: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  5th: material&lt;br /&gt;
1F 00 00 00  FF FF FF FF  6th: ff name&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
&lt;br /&gt;
-----------  [end of index]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Index ==&lt;br /&gt;
&lt;br /&gt;
4 byte identifier (fastfile entry type), 4 byte offset (FF FF FF FF = -1, meaning right after the previous block?)&lt;br /&gt;
&lt;br /&gt;
Separator (FF FF FF FF) after last 4-byte couple + 00 00 00 00 ?&lt;br /&gt;
&lt;br /&gt;
=== Types ===&lt;br /&gt;
&lt;br /&gt;
* 00 00 00 01 - physpreset&lt;br /&gt;
* 00 00 00 02 - xanim&lt;br /&gt;
* 00 00 00 03 - xmodel&lt;br /&gt;
* 00 00 00 04 - material&lt;br /&gt;
* 00 00 00 05 - shader / techset&lt;br /&gt;
* 00 00 00 06 - image?&lt;br /&gt;
* 00 00 00 0B - map_ents (d3dbsp)&lt;br /&gt;
* 00 00 00 0C - related to col_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 0E - related to game_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 10 - related to col_map_mp / gfx_map (d3dbsp)&lt;br /&gt;
* 00 00 00 13 - font&lt;br /&gt;
* 00 00 00 14 - menu&lt;br /&gt;
* 00 00 00 16 - localized string asset&lt;br /&gt;
* 00 00 00 17 - physpreset??&lt;br /&gt;
* 00 00 00 19 - fx&lt;br /&gt;
* 00 00 00 1F - string / raw file / fastfile name&lt;br /&gt;
* 00 00 00 20 - stringtable (comma separated list)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- under re-investigation, don&#039;t delete please!&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1F 00 00 00 FF FF FF FF  rawfile (plaintext)&lt;br /&gt;
05 00 00 00 FF FF FF FF  shader&lt;br /&gt;
03 00 00 00 FF FF FF FF  related to xmodel&lt;br /&gt;
1F 00 00 00 FF FF FF FF  xmodel data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
4A 06 00 00              rawfile length&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
6D 61 70 73 2F 6D 70 2F  filename:&lt;br /&gt;
5F 72 65 70 75 6C 73 65  maps/mp/_repulse.gsc&lt;br /&gt;
2E 67 73 63 00           followed by plaintext:&lt;br /&gt;
69 6E 69 74 28 29 0D 0A  init()..&lt;br /&gt;
7B 0D 0A 09 74 68 72 65  {...thre&lt;br /&gt;
61 64 20 70 6C 61 79 65  ad playe&lt;br /&gt;
72 63 6F 6E 6E 65 63 74  rconnect&lt;br /&gt;
28 29 3B 0D 0A ...       ();..}.&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
...                      shader (binary data)&lt;br /&gt;
&lt;br /&gt;
...                      xmodel related data&lt;br /&gt;
&lt;br /&gt;
...                      xmodel data (similar to original xmodel file, but nonetheless different)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Shaders ===&lt;br /&gt;
&lt;br /&gt;
50 00 00 00 or&lt;br /&gt;
40 00 00 00&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
9F 00 00 00  size after filename&lt;br /&gt;
&lt;br /&gt;
filename ended with 0x00&lt;br /&gt;
&lt;br /&gt;
(size * 4) bytes of shader data, seems to end with FF FF 00 00&lt;br /&gt;
might contain more data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
filename starts with &#039;,&#039;&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Content ==&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 04 ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 2B 01 01  First 4 bytes seem to be 4 (unsigned) char&#039;s.&lt;br /&gt;
             First byte is so far always 0x00 (perhaps it&#039;s a short together with the second byte).&lt;br /&gt;
             Second byte so far either 0x2B or 0x00, I think this is a length.&lt;br /&gt;
             Third byte so far 0x01, when 0x00 (all 4) the content is only a number of 0x00&#039;s, then the filename (0x00 termination)&lt;br /&gt;
             Fourth byte either 0x00 or 0x01. Can be a length or a bool.&lt;br /&gt;
             Then 0x10 bytes of more header.&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
00           When fourth byte is 01, there&#039;s a 0x00 following?             &lt;br /&gt;
             Then there&#039;s garbage (0xFF) and some shorts it looks of length in the second byte.&lt;br /&gt;
             Then more information...&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [end separation]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 05 ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  0x90 times 0x00&lt;br /&gt;
             Then filename (0x00 termination)             &lt;br /&gt;
&lt;br /&gt;
FF FF FF FF [end separation]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 1F ===&lt;br /&gt;
&lt;br /&gt;
Often at the end of the FF file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
             Then filename (0x00 termination)   &lt;br /&gt;
00           Another termination, of the FF file? Or padding?&lt;br /&gt;
&lt;br /&gt;
             [end of file]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--[[User:CoDEmanX|CoDEmanX]] 01:28, 4 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
--[[User:Daevius|Daevius]] 14:32, 4 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Technical Reference]]&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Daevius</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7120</id>
		<title>Call of Duty 4: FastFile Format</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7120"/>
		<updated>2009-11-04T14:32:42Z</updated>

		<summary type="html">&lt;p&gt;Daevius: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Under Construction Small.png‎]] &#039;&#039;&#039;*** Article and investigation in early progress ***&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
&lt;br /&gt;
*Byte 0-3: decompressed fastfile size minus 44 (0x2C)&lt;br /&gt;
*Byte 4-7: about the total size of referenced data, e.g. the required memory for IWI textures if material files are in the ff&lt;br /&gt;
*Byte 8-11: &#039;&#039;unknown&#039;&#039;, might be a flag&lt;br /&gt;
*Byte 12-43: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 44-47: equal to number of entries in &amp;quot;1st index&amp;quot; and amount of (model tag/joint/notetrack) strings (times 4 for index length)&lt;br /&gt;
*Byte 48-51: separator? (FF FF FF FF)&lt;br /&gt;
*Byte 52-55: number of records* (&amp;quot;2nd index&amp;quot;, times 8 for index length)&lt;br /&gt;
*Byte 56-63: separator? (FF FF FF FF FF FF FF FF)&lt;br /&gt;
*Byte 64-x: string list (xmodelsurfs?) --&amp;gt; not always, depends on the content (required offsets are in the FF header)*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; under re-investigation &amp;lt;!-- If a file was missing on ff compile, it does not count but the error message is added to the end of the file. There are usually more index entries than the number of records in the header. The given number of records is not equal to the entries in the assetinfo or assetlist file, it&#039;s usually higher. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: mp_backlot_load.ff ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Contains:&#039;&#039;&#039;&lt;br /&gt;
*2x shaders &lt;br /&gt;
*3x materials&lt;br /&gt;
*(1x fastfile name)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Materials:&lt;br /&gt;
# $victorybackdrop - mile_high_victory_screen.iwi (699,092 bytes)&lt;br /&gt;
# $defeatbackdrop - (none)&lt;br /&gt;
# $levelbriefing - loadscreen_mp_backlot.iwi (524,316 bytes)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start of file and header]&lt;br /&gt;
&lt;br /&gt;
71 03 00 00  decompressed filesize - 44 (hex: 371 + 2C = 39D; dec: 881 + 44 = 925)&lt;br /&gt;
&lt;br /&gt;
B8 AA 12 00  size of both IWIs the materials in FF point to - 56 (2x28, 28 bytes = IWI header)&lt;br /&gt;
             0x12AAB8          = 1,223,352&lt;br /&gt;
             699,092 + 524,316 = 1,223,408&lt;br /&gt;
             difference:                56&lt;br /&gt;
&lt;br /&gt;
A4 00 00 00  might be a flag&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
E5 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
&lt;br /&gt;
-----------  [end of header] (44 bytes), [start of index]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  unknown, is sometimes FF FF FF FF&lt;br /&gt;
&lt;br /&gt;
06 00 00 00  number of records in index (6)&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
&lt;br /&gt;
05 00 00 00  FF FF FF FF  1st: shader&lt;br /&gt;
05 00 00 00  FF FF FF FF  2nd: shader&lt;br /&gt;
04 00 00 00  FF FF FF FF  3rd: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  4th: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  5th: material&lt;br /&gt;
1F 00 00 00  FF FF FF FF  6th: ff name&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
&lt;br /&gt;
-----------  [end of index]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Index ==&lt;br /&gt;
&lt;br /&gt;
4 byte identifier (fastfile entry type), 4 byte offset (FF FF FF FF = -1, meaning right after the previous block?)&lt;br /&gt;
&lt;br /&gt;
Separator (FF FF FF FF) after last 4-byte couple + 00 00 00 00 ?&lt;br /&gt;
&lt;br /&gt;
=== Types ===&lt;br /&gt;
&lt;br /&gt;
* 00 00 00 01 - physpreset&lt;br /&gt;
* 00 00 00 02 - xanim&lt;br /&gt;
* 00 00 00 03 - xmodel&lt;br /&gt;
* 00 00 00 04 - material&lt;br /&gt;
* 00 00 00 05 - shader / techset&lt;br /&gt;
* 00 00 00 06 - image?&lt;br /&gt;
* 00 00 00 0B - map_ents (d3dbsp)&lt;br /&gt;
* 00 00 00 0C - related to col_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 0E - related to game_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 10 - related to col_map_mp / gfx_map (d3dbsp)&lt;br /&gt;
* 00 00 00 13 - font&lt;br /&gt;
* 00 00 00 14 - menu&lt;br /&gt;
* 00 00 00 16 - localized string asset&lt;br /&gt;
* 00 00 00 17 - physpreset??&lt;br /&gt;
* 00 00 00 19 - fx&lt;br /&gt;
* 00 00 00 1F - string / raw file / fastfile name&lt;br /&gt;
* 00 00 00 20 - stringtable (comma separated list)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- under re-investigation, don&#039;t delete please!&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1F 00 00 00 FF FF FF FF  rawfile (plaintext)&lt;br /&gt;
05 00 00 00 FF FF FF FF  shader&lt;br /&gt;
03 00 00 00 FF FF FF FF  related to xmodel&lt;br /&gt;
1F 00 00 00 FF FF FF FF  xmodel data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
4A 06 00 00              rawfile length&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
6D 61 70 73 2F 6D 70 2F  filename:&lt;br /&gt;
5F 72 65 70 75 6C 73 65  maps/mp/_repulse.gsc&lt;br /&gt;
2E 67 73 63 00           followed by plaintext:&lt;br /&gt;
69 6E 69 74 28 29 0D 0A  init()..&lt;br /&gt;
7B 0D 0A 09 74 68 72 65  {...thre&lt;br /&gt;
61 64 20 70 6C 61 79 65  ad playe&lt;br /&gt;
72 63 6F 6E 6E 65 63 74  rconnect&lt;br /&gt;
28 29 3B 0D 0A ...       ();..}.&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
...                      shader (binary data)&lt;br /&gt;
&lt;br /&gt;
...                      xmodel related data&lt;br /&gt;
&lt;br /&gt;
...                      xmodel data (similar to original xmodel file, but nonetheless different)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Shaders ===&lt;br /&gt;
&lt;br /&gt;
50 00 00 00 or&lt;br /&gt;
40 00 00 00&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
9F 00 00 00  size after filename&lt;br /&gt;
&lt;br /&gt;
filename ended with 0x00&lt;br /&gt;
&lt;br /&gt;
(size * 4) bytes of shader data, seems to end with FF FF 00 00&lt;br /&gt;
might contain more data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
filename starts with &#039;,&#039;&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Content ==&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 04 ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 2B 01 01  First 4 bytes seem to be 4 (unsigned) char&#039;s.&lt;br /&gt;
             First byte is so far always 0x00 (perhaps it&#039;s a short together with the second byte).&lt;br /&gt;
             Second byte so far either 0x2B or 0x00, I think this is a length.&lt;br /&gt;
             Third byte so far 0x01, when 0x00 (all 4) the content is only a number of 0x00&#039;s, then the filename (0x00 termination)&lt;br /&gt;
             Fourth byte either 0x00 or 0x01. Can be a length or a bool.&lt;br /&gt;
             Then 0x10 bytes of more header.&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
00           When fourth byte is 01, there&#039;s a 0x00 following?             &lt;br /&gt;
             Then there&#039;s garbage (0xFF) and some shorts it looks of length in the second byte.&lt;br /&gt;
             Then more information...&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [end separation]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 05 ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  0x90 times 0x00&lt;br /&gt;
             Then filename (0x00 termination)             &lt;br /&gt;
&lt;br /&gt;
FF FF FF FF [end separation]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 1F ===&lt;br /&gt;
&lt;br /&gt;
Often at the end of the FF file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
             Then filename (0x00 termination)   &lt;br /&gt;
00           Another termination, of the FF file? Or padding?&lt;br /&gt;
&lt;br /&gt;
             [end of file]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--[[User:CoDEmanX|CoDEmanX]] 01:28, 4 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
--[[User:Daevius|Daevius]] 14:32, 4 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Technical Reference]]&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Daevius</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7119</id>
		<title>Call of Duty 4: FastFile Format</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7119"/>
		<updated>2009-11-04T14:27:39Z</updated>

		<summary type="html">&lt;p&gt;Daevius: /* Example: mp_backlot_load.ff */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Under Construction Small.png‎]] &#039;&#039;&#039;*** Article and investigation in early progress ***&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
&lt;br /&gt;
*Byte 0-3: decompressed fastfile size minus 44 (0x2C)&lt;br /&gt;
*Byte 4-7: about the total size of referenced data, e.g. the required memory for IWI textures if material files are in the ff&lt;br /&gt;
*Byte 8-11: &#039;&#039;unknown&#039;&#039;, might be a flag&lt;br /&gt;
*Byte 12-43: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 44-47: equal to number of entries in &amp;quot;1st index&amp;quot; and amount of (model tag/joint/notetrack) strings (times 4 for index length)&lt;br /&gt;
*Byte 48-51: separator? (FF FF FF FF)&lt;br /&gt;
*Byte 52-55: number of records* (&amp;quot;2nd index&amp;quot;, times 8 for index length)&lt;br /&gt;
*Byte 56-63: separator? (FF FF FF FF FF FF FF FF)&lt;br /&gt;
*Byte 64-x: string list (xmodelsurfs?) --&amp;gt; not always, depends on the content (required offsets are in the FF header)*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; under re-investigation &amp;lt;!-- If a file was missing on ff compile, it does not count but the error message is added to the end of the file. There are usually more index entries than the number of records in the header. The given number of records is not equal to the entries in the assetinfo or assetlist file, it&#039;s usually higher. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: mp_backlot_load.ff ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Contains:&#039;&#039;&#039;&lt;br /&gt;
*2x shaders &lt;br /&gt;
*3x materials&lt;br /&gt;
*(1x fastfile name)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Materials:&lt;br /&gt;
# $victorybackdrop - mile_high_victory_screen.iwi (699,092 bytes)&lt;br /&gt;
# $defeatbackdrop - (none)&lt;br /&gt;
# $levelbriefing - loadscreen_mp_backlot.iwi (524,316 bytes)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start of file and header]&lt;br /&gt;
&lt;br /&gt;
71 03 00 00  decompressed filesize - 44 (hex: 371 + 2C = 39D; dec: 881 + 44 = 925)&lt;br /&gt;
&lt;br /&gt;
B8 AA 12 00  size of both IWIs the materials in FF point to - 56 (2x28, 28 bytes = IWI header)&lt;br /&gt;
             0x12AAB8          = 1,223,352&lt;br /&gt;
             699,092 + 524,316 = 1,223,408&lt;br /&gt;
             difference:                56&lt;br /&gt;
&lt;br /&gt;
A4 00 00 00  might be a flag&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
E5 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
00 00 00 00  unknown&lt;br /&gt;
&lt;br /&gt;
-----------  [end of header] (44 bytes), [start of index]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  unknown, is sometimes FF FF FF FF&lt;br /&gt;
&lt;br /&gt;
06 00 00 00  number of records in index (6)&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
&lt;br /&gt;
05 00 00 00  FF FF FF FF  1st: shader&lt;br /&gt;
05 00 00 00  FF FF FF FF  2nd: shader&lt;br /&gt;
04 00 00 00  FF FF FF FF  3rd: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  4th: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  5th: material&lt;br /&gt;
1F 00 00 00  FF FF FF FF  6th: ff name&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
&lt;br /&gt;
-----------  [end of index]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Index ==&lt;br /&gt;
&lt;br /&gt;
4 byte identifier (fastfile entry type), 4 byte offset (FF FF FF FF = -1, meaning right after the previous block?)&lt;br /&gt;
&lt;br /&gt;
Separator (FF FF FF FF) after last 4-byte couple + 00 00 00 00 ?&lt;br /&gt;
&lt;br /&gt;
=== Types ===&lt;br /&gt;
&lt;br /&gt;
* 00 00 00 01 - physpreset&lt;br /&gt;
* 00 00 00 02 - xanim&lt;br /&gt;
* 00 00 00 03 - xmodel&lt;br /&gt;
* 00 00 00 04 - material&lt;br /&gt;
* 00 00 00 05 - shader / techset&lt;br /&gt;
* 00 00 00 06 - image?&lt;br /&gt;
* 00 00 00 0B - map_ents (d3dbsp)&lt;br /&gt;
* 00 00 00 0C - related to col_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 0E - related to game_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 10 - related to col_map_mp / gfx_map (d3dbsp)&lt;br /&gt;
* 00 00 00 13 - font&lt;br /&gt;
* 00 00 00 14 - menu&lt;br /&gt;
* 00 00 00 16 - localized string asset&lt;br /&gt;
* 00 00 00 17 - physpreset??&lt;br /&gt;
* 00 00 00 19 - fx&lt;br /&gt;
* 00 00 00 1F - string / raw file / fastfile name&lt;br /&gt;
* 00 00 00 20 - stringtable (comma separated list)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- under re-investigation, don&#039;t delete please!&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1F 00 00 00 FF FF FF FF  rawfile (plaintext)&lt;br /&gt;
05 00 00 00 FF FF FF FF  shader&lt;br /&gt;
03 00 00 00 FF FF FF FF  related to xmodel&lt;br /&gt;
1F 00 00 00 FF FF FF FF  xmodel data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
4A 06 00 00              rawfile length&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
6D 61 70 73 2F 6D 70 2F  filename:&lt;br /&gt;
5F 72 65 70 75 6C 73 65  maps/mp/_repulse.gsc&lt;br /&gt;
2E 67 73 63 00           followed by plaintext:&lt;br /&gt;
69 6E 69 74 28 29 0D 0A  init()..&lt;br /&gt;
7B 0D 0A 09 74 68 72 65  {...thre&lt;br /&gt;
61 64 20 70 6C 61 79 65  ad playe&lt;br /&gt;
72 63 6F 6E 6E 65 63 74  rconnect&lt;br /&gt;
28 29 3B 0D 0A ...       ();..}.&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
...                      shader (binary data)&lt;br /&gt;
&lt;br /&gt;
...                      xmodel related data&lt;br /&gt;
&lt;br /&gt;
...                      xmodel data (similar to original xmodel file, but nonetheless different)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Shaders ===&lt;br /&gt;
&lt;br /&gt;
50 00 00 00 or&lt;br /&gt;
40 00 00 00&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
9F 00 00 00  size after filename&lt;br /&gt;
&lt;br /&gt;
filename ended with 0x00&lt;br /&gt;
&lt;br /&gt;
(size * 4) bytes of shader data, seems to end with FF FF 00 00&lt;br /&gt;
might contain more data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
filename starts with &#039;,&#039;&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Content ==&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 04 ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 2B 01 01  First 4 bytes seem to be 4 (unsigned) char&#039;s.&lt;br /&gt;
             First byte is so far always 0x00 (perhaps it&#039;s a short together with the second byte).&lt;br /&gt;
             Second byte so far either 0x2B or 0x00, I think this is a length.&lt;br /&gt;
             Third byte so far 0x01, when 0x00 (all 4) the content is only a number of 0x00&#039;s, then the filename (0x00 termination)&lt;br /&gt;
             Fourth byte either 0x00 or 0x01. Can be a length or a bool.&lt;br /&gt;
             Then 0x10 bytes of more header.&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
00           When fourth byte is 01, there&#039;s a 0x00 following?             &lt;br /&gt;
             Then there&#039;s garbage (0xFF) and some shorts it looks of length in the second byte.&lt;br /&gt;
             Then more information...&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [end separation]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 05 ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  0x90 times 0x00&lt;br /&gt;
             Then filename (0x00 termination)             &lt;br /&gt;
&lt;br /&gt;
FF FF FF FF [end separation]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 1F ===&lt;br /&gt;
&lt;br /&gt;
Often at the end of the FF file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
             Then filename (0x00 termination)   &lt;br /&gt;
00           Another termination, of the FF file? Or padding?&lt;br /&gt;
&lt;br /&gt;
             [end of file]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--[[User:CoDEmanX|CoDEmanX]] 01:28, 4 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
--[[User:Daevius|Daevius]] 23:59, 1 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Technical Reference]]&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Daevius</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7118</id>
		<title>Call of Duty 4: FastFile Format</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7118"/>
		<updated>2009-11-04T14:24:33Z</updated>

		<summary type="html">&lt;p&gt;Daevius: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Under Construction Small.png‎]] &#039;&#039;&#039;*** Article and investigation in early progress ***&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
&lt;br /&gt;
*Byte 0-3: decompressed fastfile size minus 44 (0x2C)&lt;br /&gt;
*Byte 4-7: about the total size of referenced data, e.g. the required memory for IWI textures if material files are in the ff&lt;br /&gt;
*Byte 8-11: &#039;&#039;unknown&#039;&#039;, might be a flag&lt;br /&gt;
*Byte 12-43: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 44-47: equal to number of entries in &amp;quot;1st index&amp;quot; and amount of (model tag/joint/notetrack) strings (times 4 for index length)&lt;br /&gt;
*Byte 48-51: separator? (FF FF FF FF)&lt;br /&gt;
*Byte 52-55: number of records* (&amp;quot;2nd index&amp;quot;, times 8 for index length)&lt;br /&gt;
*Byte 56-63: separator? (FF FF FF FF FF FF FF FF)&lt;br /&gt;
*Byte 64-x: string list (xmodelsurfs?) --&amp;gt; not always, depends on the content (required offsets are in the FF header)*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; under re-investigation &amp;lt;!-- If a file was missing on ff compile, it does not count but the error message is added to the end of the file. There are usually more index entries than the number of records in the header. The given number of records is not equal to the entries in the assetinfo or assetlist file, it&#039;s usually higher. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: mp_backlot_load.ff ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Contains:&#039;&#039;&#039;&lt;br /&gt;
*2x shaders &lt;br /&gt;
*3x materials&lt;br /&gt;
*(1x fastfile name)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Materials:&lt;br /&gt;
# $victorybackdrop - mile_high_victory_screen.iwi (699,092 bytes)&lt;br /&gt;
# $defeatbackdrop - (none)&lt;br /&gt;
# $levelbriefing - loadscreen_mp_backlot.iwi (524,316 bytes)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start of file and header]&lt;br /&gt;
&lt;br /&gt;
71 03 00 00  decompressed filesize - 44 (hex: 371 + 2C = 39D; dec: 881 + 44 = 925)&lt;br /&gt;
&lt;br /&gt;
B8 AA 12 00  size of both IWIs the materials in FF point to - 56 (2x28, 28 bytes = IWI header)&lt;br /&gt;
             0x12AAB8          = 1,223,352&lt;br /&gt;
             699,092 + 524,316 = 1,223,408&lt;br /&gt;
             difference:                56&lt;br /&gt;
&lt;br /&gt;
A4 00 00 00  might be a flag&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  ... empty?&lt;br /&gt;
E5 00 00 00  unknown&lt;br /&gt;
00 00 00 00  ... empty?&lt;br /&gt;
&lt;br /&gt;
-----------  [end of header] (44 bytes), [start of index]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  ... empty?&lt;br /&gt;
&lt;br /&gt;
06 00 00 00  number of records in index (6)&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
&lt;br /&gt;
05 00 00 00  FF FF FF FF  1st: shader&lt;br /&gt;
05 00 00 00  FF FF FF FF  2nd: shader&lt;br /&gt;
04 00 00 00  FF FF FF FF  3rd: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  4th: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  5th: material&lt;br /&gt;
1F 00 00 00  FF FF FF FF  6th: ff name&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
&lt;br /&gt;
-----------  [end of index]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Index ==&lt;br /&gt;
&lt;br /&gt;
4 byte identifier (fastfile entry type), 4 byte offset (FF FF FF FF = -1, meaning right after the previous block?)&lt;br /&gt;
&lt;br /&gt;
Separator (FF FF FF FF) after last 4-byte couple + 00 00 00 00 ?&lt;br /&gt;
&lt;br /&gt;
=== Types ===&lt;br /&gt;
&lt;br /&gt;
* 00 00 00 01 - physpreset&lt;br /&gt;
* 00 00 00 02 - xanim&lt;br /&gt;
* 00 00 00 03 - xmodel&lt;br /&gt;
* 00 00 00 04 - material&lt;br /&gt;
* 00 00 00 05 - shader / techset&lt;br /&gt;
* 00 00 00 06 - image?&lt;br /&gt;
* 00 00 00 0B - map_ents (d3dbsp)&lt;br /&gt;
* 00 00 00 0C - related to col_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 0E - related to game_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 10 - related to col_map_mp / gfx_map (d3dbsp)&lt;br /&gt;
* 00 00 00 13 - font&lt;br /&gt;
* 00 00 00 14 - menu&lt;br /&gt;
* 00 00 00 16 - localized string asset&lt;br /&gt;
* 00 00 00 17 - physpreset??&lt;br /&gt;
* 00 00 00 19 - fx&lt;br /&gt;
* 00 00 00 1F - string / raw file / fastfile name&lt;br /&gt;
* 00 00 00 20 - stringtable (comma separated list)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- under re-investigation, don&#039;t delete please!&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1F 00 00 00 FF FF FF FF  rawfile (plaintext)&lt;br /&gt;
05 00 00 00 FF FF FF FF  shader&lt;br /&gt;
03 00 00 00 FF FF FF FF  related to xmodel&lt;br /&gt;
1F 00 00 00 FF FF FF FF  xmodel data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
4A 06 00 00              rawfile length&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
6D 61 70 73 2F 6D 70 2F  filename:&lt;br /&gt;
5F 72 65 70 75 6C 73 65  maps/mp/_repulse.gsc&lt;br /&gt;
2E 67 73 63 00           followed by plaintext:&lt;br /&gt;
69 6E 69 74 28 29 0D 0A  init()..&lt;br /&gt;
7B 0D 0A 09 74 68 72 65  {...thre&lt;br /&gt;
61 64 20 70 6C 61 79 65  ad playe&lt;br /&gt;
72 63 6F 6E 6E 65 63 74  rconnect&lt;br /&gt;
28 29 3B 0D 0A ...       ();..}.&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
...                      shader (binary data)&lt;br /&gt;
&lt;br /&gt;
...                      xmodel related data&lt;br /&gt;
&lt;br /&gt;
...                      xmodel data (similar to original xmodel file, but nonetheless different)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Shaders ===&lt;br /&gt;
&lt;br /&gt;
50 00 00 00 or&lt;br /&gt;
40 00 00 00&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
9F 00 00 00  size after filename&lt;br /&gt;
&lt;br /&gt;
filename ended with 0x00&lt;br /&gt;
&lt;br /&gt;
(size * 4) bytes of shader data, seems to end with FF FF 00 00&lt;br /&gt;
might contain more data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
filename starts with &#039;,&#039;&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Content ==&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 04 ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 2B 01 01  First 4 bytes seem to be 4 (unsigned) char&#039;s.&lt;br /&gt;
             First byte is so far always 0x00 (perhaps it&#039;s a short together with the second byte).&lt;br /&gt;
             Second byte so far either 0x2B or 0x00, I think this is a length.&lt;br /&gt;
             Third byte so far 0x01, when 0x00 (all 4) the content is only a number of 0x00&#039;s, then the filename (0x00 termination)&lt;br /&gt;
             Fourth byte either 0x00 or 0x01. Can be a length or a bool.&lt;br /&gt;
             Then 0x10 bytes of more header.&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
00           When fourth byte is 01, there&#039;s a 0x00 following?             &lt;br /&gt;
             Then there&#039;s garbage (0xFF) and some shorts it looks of length in the second byte.&lt;br /&gt;
             Then more information...&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [end separation]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 05 ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  0x90 times 0x00&lt;br /&gt;
             Then filename (0x00 termination)             &lt;br /&gt;
&lt;br /&gt;
FF FF FF FF [end separation]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 1F ===&lt;br /&gt;
&lt;br /&gt;
Often at the end of the FF file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
             Then filename (0x00 termination)   &lt;br /&gt;
00           Another termination, of the FF file? Or padding?&lt;br /&gt;
&lt;br /&gt;
             [end of file]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--[[User:CoDEmanX|CoDEmanX]] 01:28, 4 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
--[[User:Daevius|Daevius]] 23:59, 1 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Technical Reference]]&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Daevius</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7117</id>
		<title>Call of Duty 4: FastFile Format</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7117"/>
		<updated>2009-11-04T14:21:14Z</updated>

		<summary type="html">&lt;p&gt;Daevius: /* Content */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Under Construction Small.png‎]] &#039;&#039;&#039;*** Article and investigation in early progress ***&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
&lt;br /&gt;
*Byte 0-3: decompressed fastfile size minus 44 (0x2C)&lt;br /&gt;
*Byte 4-7: about the total size of referenced data, e.g. the required memory for IWI textures if material files are in the ff&lt;br /&gt;
*Byte 8-11: &#039;&#039;unknown&#039;&#039;, might be a flag&lt;br /&gt;
*Byte 12-43: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 44-47: equal to number of entries in &amp;quot;1st index&amp;quot; and amount of (model tag/joint/notetrack) strings (times 4 for index length)&lt;br /&gt;
*Byte 48-51: separator? (FF FF FF FF)&lt;br /&gt;
*Byte 52-55: number of records* (&amp;quot;2nd index&amp;quot;, times 8 for index length)&lt;br /&gt;
*Byte 56-63: separator? (FF FF FF FF FF FF FF FF)&lt;br /&gt;
*Byte 64-x: string list (xmodelsurfs?) --&amp;gt; not always, depends on the content (required offsets are in the FF header)*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; under re-investigation &amp;lt;!-- If a file was missing on ff compile, it does not count but the error message is added to the end of the file. There are usually more index entries than the number of records in the header. The given number of records is not equal to the entries in the assetinfo or assetlist file, it&#039;s usually higher. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: mp_backlot_load.ff ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Contains:&#039;&#039;&#039;&lt;br /&gt;
*2x shaders &lt;br /&gt;
*3x materials&lt;br /&gt;
*(1x fastfile name)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Materials:&lt;br /&gt;
# $victorybackdrop - mile_high_victory_screen.iwi (699,092 bytes)&lt;br /&gt;
# $defeatbackdrop - (none)&lt;br /&gt;
# $levelbriefing - loadscreen_mp_backlot.iwi (524,316 bytes)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start of file and header]&lt;br /&gt;
&lt;br /&gt;
71 03 00 00  decompressed filesize - 44 (hex: 371 + 2C = 39D; dec: 881 + 44 = 925)&lt;br /&gt;
&lt;br /&gt;
B8 AA 12 00  size of both IWIs the materials in FF point to - 56 (2x28, 28 bytes = IWI header)&lt;br /&gt;
             0x12AAB8          = 1,223,352&lt;br /&gt;
             699,092 + 524,316 = 1,223,408&lt;br /&gt;
             difference:                56&lt;br /&gt;
&lt;br /&gt;
A4 00 00 00  might be a flag&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  ... empty?&lt;br /&gt;
E5 00 00 00  unknown&lt;br /&gt;
00 00 00 00  ... empty?&lt;br /&gt;
&lt;br /&gt;
-----------  [end of header] (44 bytes), [start of index]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  ... empty?&lt;br /&gt;
&lt;br /&gt;
06 00 00 00  number of records in index (6)&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
&lt;br /&gt;
05 00 00 00  FF FF FF FF  1st: shader&lt;br /&gt;
05 00 00 00  FF FF FF FF  2nd: shader&lt;br /&gt;
04 00 00 00  FF FF FF FF  3rd: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  4th: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  5th: material&lt;br /&gt;
1F 00 00 00  FF FF FF FF  6th: ff name&lt;br /&gt;
FF FF FF FF  00 00 00 00  separator / termination&lt;br /&gt;
&lt;br /&gt;
-----------  [end of index]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Index ==&lt;br /&gt;
&lt;br /&gt;
4 byte identifier (fastfile entry type), 4 byte offset (FF FF FF FF = -1, meaning right after the previous block?)&lt;br /&gt;
&lt;br /&gt;
Separator (FF FF FF FF) after last 4-byte couple + 00 00 00 00 ?&lt;br /&gt;
&lt;br /&gt;
=== Types ===&lt;br /&gt;
&lt;br /&gt;
* 00 00 00 01 - physpreset&lt;br /&gt;
* 00 00 00 02 - xanim&lt;br /&gt;
* 00 00 00 03 - xmodel&lt;br /&gt;
* 00 00 00 04 - material&lt;br /&gt;
* 00 00 00 05 - shader / techset&lt;br /&gt;
* 00 00 00 06 - image?&lt;br /&gt;
* 00 00 00 0B - map_ents (d3dbsp)&lt;br /&gt;
* 00 00 00 0C - related to col_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 0E - related to game_map_mp (d3dbsp)&lt;br /&gt;
* 00 00 00 10 - related to col_map_mp / gfx_map (d3dbsp)&lt;br /&gt;
* 00 00 00 13 - font&lt;br /&gt;
* 00 00 00 14 - menu&lt;br /&gt;
* 00 00 00 16 - localized string asset&lt;br /&gt;
* 00 00 00 17 - physpreset??&lt;br /&gt;
* 00 00 00 19 - fx&lt;br /&gt;
* 00 00 00 1F - string / raw file / fastfile name&lt;br /&gt;
* 00 00 00 20 - stringtable (comma separated list)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- under re-investigation, don&#039;t delete please!&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1F 00 00 00 FF FF FF FF  rawfile (plaintext)&lt;br /&gt;
05 00 00 00 FF FF FF FF  shader&lt;br /&gt;
03 00 00 00 FF FF FF FF  related to xmodel&lt;br /&gt;
1F 00 00 00 FF FF FF FF  xmodel data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
4A 06 00 00              rawfile length&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
6D 61 70 73 2F 6D 70 2F  filename:&lt;br /&gt;
5F 72 65 70 75 6C 73 65  maps/mp/_repulse.gsc&lt;br /&gt;
2E 67 73 63 00           followed by plaintext:&lt;br /&gt;
69 6E 69 74 28 29 0D 0A  init()..&lt;br /&gt;
7B 0D 0A 09 74 68 72 65  {...thre&lt;br /&gt;
61 64 20 70 6C 61 79 65  ad playe&lt;br /&gt;
72 63 6F 6E 6E 65 63 74  rconnect&lt;br /&gt;
28 29 3B 0D 0A ...       ();..}.&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
...                      shader (binary data)&lt;br /&gt;
&lt;br /&gt;
...                      xmodel related data&lt;br /&gt;
&lt;br /&gt;
...                      xmodel data (similar to original xmodel file, but nonetheless different)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Shaders ===&lt;br /&gt;
&lt;br /&gt;
50 00 00 00 or&lt;br /&gt;
40 00 00 00&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
9F 00 00 00  size after filename&lt;br /&gt;
&lt;br /&gt;
filename ended with 0x00&lt;br /&gt;
&lt;br /&gt;
(size * 4) bytes of shader data, seems to end with FF FF 00 00&lt;br /&gt;
might contain more data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
filename starts with &#039;,&#039;&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Content ==&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 04 ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 2B 01 01  First 4 bytes seem to be 4 (unsigned) char&#039;s.&lt;br /&gt;
             First byte is so far always 0x00 (perhaps it&#039;s a short together with the second byte).&lt;br /&gt;
             Second byte so far either 0x2B or 0x00, I think this is a length.&lt;br /&gt;
             Third byte so far 0x01, when 0x00 (all 4) the content is only a number of 0x00&#039;s, then the filename (0x00 termination)&lt;br /&gt;
             Fourth byte either 0x00 or 0x01. Can be a length or a bool.&lt;br /&gt;
             Then 0x10 bytes of more header.&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
00           When fourth byte is 01, there&#039;s a 0x00 following?             &lt;br /&gt;
             Then there&#039;s garbage (0xFF) and some shorts it looks of length in the second byte.&lt;br /&gt;
             Then more information...&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [end separation]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 05 ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  0x90 times 0x00&lt;br /&gt;
             Then filename (0x00 termination)             &lt;br /&gt;
&lt;br /&gt;
FF FF FF FF [end separation]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 1F ===&lt;br /&gt;
&lt;br /&gt;
Often at the end of the FF file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
             Then filename (0x00 termination)   &lt;br /&gt;
00           Another termination, of the FF file? Or padding?&lt;br /&gt;
&lt;br /&gt;
             [end of file]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--[[User:CoDEmanX|CoDEmanX]] 01:28, 4 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
--[[User:Daevius|Daevius]] 23:59, 1 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Technical Reference]]&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Daevius</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7116</id>
		<title>Call of Duty 4: FastFile Format</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7116"/>
		<updated>2009-11-04T14:18:31Z</updated>

		<summary type="html">&lt;p&gt;Daevius: /* Content */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Under Construction Small.png‎]] &#039;&#039;&#039;*** Article and investigation in early progress ***&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
&lt;br /&gt;
*Byte 0-3: decompressed fastfile size minus 44 (0x2C)&lt;br /&gt;
*Byte 4-7: about the total size of referenced data, e.g. the required memory for IWI textures if material files are in the ff&lt;br /&gt;
*Byte 8-11: &#039;&#039;unknown&#039;&#039;, might be a flag&lt;br /&gt;
*Byte 12-43: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 44-47: equal to number of entries in &amp;quot;1st index&amp;quot; and amount of (model tag/joint/notetrack) strings (times 4 for index length)&lt;br /&gt;
*Byte 48-51: separator? (FF FF FF FF)&lt;br /&gt;
*Byte 52-55: number of records* (&amp;quot;2nd index&amp;quot;, times 8 for index length)&lt;br /&gt;
*Byte 56-63: separator? (FF FF FF FF FF FF FF FF)&lt;br /&gt;
*Byte 64-x: string list (xmodelsurfs?) --&amp;gt; not always, depends on the content (required offsets are in the FF header)*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; under re-investigation &amp;lt;!-- If a file was missing on ff compile, it does not count but the error message is added to the end of the file. There are usually more index entries than the number of records in the header. The given number of records is not equal to the entries in the assetinfo or assetlist file, it&#039;s usually higher. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: mp_backlot_load.ff ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Contains:&#039;&#039;&#039;&lt;br /&gt;
*2x shaders &lt;br /&gt;
*3x materials&lt;br /&gt;
*(1x fastfile name)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Materials:&lt;br /&gt;
# $victorybackdrop - mile_high_victory_screen.iwi (699,092 bytes)&lt;br /&gt;
# $defeatbackdrop - (none)&lt;br /&gt;
# $levelbriefing - loadscreen_mp_backlot.iwi (524,316 bytes)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start of header]&lt;br /&gt;
&lt;br /&gt;
71 03 00 00  decompressed filesize - 44 (hex: 371 + 2C = 39D; dec: 881 + 44 = 925)&lt;br /&gt;
&lt;br /&gt;
B8 AA 12 00  size of both IWIs the materials in FF point to - 56 (2x28, 28 bytes = IWI header)&lt;br /&gt;
             0x12AAB8          = 1,223,352&lt;br /&gt;
             699,092 + 524,316 = 1,223,408&lt;br /&gt;
             difference:                56&lt;br /&gt;
&lt;br /&gt;
A4 00 00 00  might be a flag&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  ... empty?&lt;br /&gt;
E5 00 00 00  unknown&lt;br /&gt;
00 00 00 00  ... empty?&lt;br /&gt;
&lt;br /&gt;
-----------  [end of header] (44 bytes), [start of index]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  ... empty?&lt;br /&gt;
&lt;br /&gt;
06 00 00 00  number of records in index (6)&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
&lt;br /&gt;
05 00 00 00  FF FF FF FF  1st: shader&lt;br /&gt;
05 00 00 00  FF FF FF FF  2nd: shader&lt;br /&gt;
04 00 00 00  FF FF FF FF  3rd: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  4th: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  5th: material&lt;br /&gt;
1F 00 00 00  FF FF FF FF  6th: ff name&lt;br /&gt;
FF FF FF FF  00 00 00 00  separator / termination&lt;br /&gt;
&lt;br /&gt;
-----------  [end of index]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Index ==&lt;br /&gt;
&lt;br /&gt;
4 byte identifier (fastfile entry type), 4 byte offset (FF FF FF FF = -1, meaning right after the previous block?)&lt;br /&gt;
&lt;br /&gt;
Separator (FF FF FF FF) after last 4-byte couple + 00 00 00 00 ?&lt;br /&gt;
&lt;br /&gt;
=== Types ===&lt;br /&gt;
&lt;br /&gt;
* 01 00 00 00 - physpreset&lt;br /&gt;
* 02 00 00 00 - xanim&lt;br /&gt;
* 03 00 00 00 - xmodel&lt;br /&gt;
* 04 00 00 00 - material&lt;br /&gt;
* 05 00 00 00 - shader / techset&lt;br /&gt;
* 06 00 00 00 - image?&lt;br /&gt;
* 0B 00 00 00 - map_ents (d3dbsp)&lt;br /&gt;
* 0C 00 00 00 - related to col_map_mp (d3dbsp)&lt;br /&gt;
* 0E 00 00 00 - related to game_map_mp (d3dbsp)&lt;br /&gt;
* 10 00 00 00 - related to col_map_mp / gfx_map (d3dbsp)&lt;br /&gt;
* 13 00 00 00 - font&lt;br /&gt;
* 14 00 00 00 - menu&lt;br /&gt;
* 16 00 00 00 - localized string asset&lt;br /&gt;
* 17 00 00 00 - physpreset??&lt;br /&gt;
* 19 00 00 00 - fx&lt;br /&gt;
* 1F 00 00 00 - string / raw file / fastfile name&lt;br /&gt;
* 20 00 00 00 - stringtable (comma separated list)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- under re-investigation, don&#039;t delete please!&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1F 00 00 00 FF FF FF FF  rawfile (plaintext)&lt;br /&gt;
05 00 00 00 FF FF FF FF  shader&lt;br /&gt;
03 00 00 00 FF FF FF FF  related to xmodel&lt;br /&gt;
1F 00 00 00 FF FF FF FF  xmodel data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
4A 06 00 00              rawfile length&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
6D 61 70 73 2F 6D 70 2F  filename:&lt;br /&gt;
5F 72 65 70 75 6C 73 65  maps/mp/_repulse.gsc&lt;br /&gt;
2E 67 73 63 00           followed by plaintext:&lt;br /&gt;
69 6E 69 74 28 29 0D 0A  init()..&lt;br /&gt;
7B 0D 0A 09 74 68 72 65  {...thre&lt;br /&gt;
61 64 20 70 6C 61 79 65  ad playe&lt;br /&gt;
72 63 6F 6E 6E 65 63 74  rconnect&lt;br /&gt;
28 29 3B 0D 0A ...       ();..}.&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
...                      shader (binary data)&lt;br /&gt;
&lt;br /&gt;
...                      xmodel related data&lt;br /&gt;
&lt;br /&gt;
...                      xmodel data (similar to original xmodel file, but nonetheless different)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Shaders ===&lt;br /&gt;
&lt;br /&gt;
50 00 00 00 or&lt;br /&gt;
40 00 00 00&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
9F 00 00 00  size after filename&lt;br /&gt;
&lt;br /&gt;
filename ended with 0x00&lt;br /&gt;
&lt;br /&gt;
(size * 4) bytes of shader data, seems to end with FF FF 00 00&lt;br /&gt;
might contain more data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
filename starts with &#039;,&#039;&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Content ==&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 04 ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 2B 01 01  First 4 bytes seem to be 4 (unsigned) char&#039;s.&lt;br /&gt;
             First byte is so far always 0x00 (perhaps it&#039;s a short together with the second byte).&lt;br /&gt;
             Second byte so far either 0x2B or 0x00, I think this is a length.&lt;br /&gt;
             Third byte so far 0x01, when 0x00 (all 4) the content is only a number of 0x00&#039;s, then the filename (0x00 termination)&lt;br /&gt;
             Fourth byte either 0x00 or 0x01. Can be a length or a bool.&lt;br /&gt;
&lt;br /&gt;
             Then 0x10 bytes of more header.&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
&lt;br /&gt;
00           When fourth byte is 01, there&#039;s a 0x00 following?&lt;br /&gt;
             &lt;br /&gt;
             Then there&#039;s garbage (0xFF) and some shorts it looks of length in the second byte.&lt;br /&gt;
&lt;br /&gt;
             Then more information...&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  [end separation]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 05 ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  0x90 times 0x00&lt;br /&gt;
&lt;br /&gt;
             Then filename (0x00 termination)             &lt;br /&gt;
&lt;br /&gt;
FF FF FF FF [end separation]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 1F ===&lt;br /&gt;
&lt;br /&gt;
Often at the end of the FF file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;FF FF FF FF  [start separation]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&lt;br /&gt;
             Then filename (0x00 termination)    &lt;br /&gt;
&lt;br /&gt;
00           Another termination, of the FF file? Or padding?&lt;br /&gt;
&lt;br /&gt;
             [end of file]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--[[User:CoDEmanX|CoDEmanX]] 01:28, 4 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
--[[User:Daevius|Daevius]] 23:59, 1 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Technical Reference]]&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Daevius</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7115</id>
		<title>Call of Duty 4: FastFile Format</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7115"/>
		<updated>2009-11-04T14:12:34Z</updated>

		<summary type="html">&lt;p&gt;Daevius: /* 00 00 00 04 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Under Construction Small.png‎]] &#039;&#039;&#039;*** Article and investigation in early progress ***&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
&lt;br /&gt;
*Byte 0-3: decompressed fastfile size minus 44 (0x2C)&lt;br /&gt;
*Byte 4-7: about the total size of referenced data, e.g. the required memory for IWI textures if material files are in the ff&lt;br /&gt;
*Byte 8-11: &#039;&#039;unknown&#039;&#039;, might be a flag&lt;br /&gt;
*Byte 12-43: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 44-47: equal to number of entries in &amp;quot;1st index&amp;quot; and amount of (model tag/joint/notetrack) strings (times 4 for index length)&lt;br /&gt;
*Byte 48-51: separator? (FF FF FF FF)&lt;br /&gt;
*Byte 52-55: number of records* (&amp;quot;2nd index&amp;quot;, times 8 for index length)&lt;br /&gt;
*Byte 56-63: separator? (FF FF FF FF FF FF FF FF)&lt;br /&gt;
*Byte 64-x: string list (xmodelsurfs?) --&amp;gt; not always, depends on the content (required offsets are in the FF header)*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; under re-investigation &amp;lt;!-- If a file was missing on ff compile, it does not count but the error message is added to the end of the file. There are usually more index entries than the number of records in the header. The given number of records is not equal to the entries in the assetinfo or assetlist file, it&#039;s usually higher. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: mp_backlot_load.ff ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Contains:&#039;&#039;&#039;&lt;br /&gt;
*2x shaders &lt;br /&gt;
*3x materials&lt;br /&gt;
*(1x fastfile name)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Materials:&lt;br /&gt;
# $victorybackdrop - mile_high_victory_screen.iwi (699,092 bytes)&lt;br /&gt;
# $defeatbackdrop - (none)&lt;br /&gt;
# $levelbriefing - loadscreen_mp_backlot.iwi (524,316 bytes)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start of header]&lt;br /&gt;
&lt;br /&gt;
71 03 00 00  decompressed filesize - 44 (hex: 371 + 2C = 39D; dec: 881 + 44 = 925)&lt;br /&gt;
&lt;br /&gt;
B8 AA 12 00  size of both IWIs the materials in FF point to - 56 (2x28, 28 bytes = IWI header)&lt;br /&gt;
             0x12AAB8          = 1,223,352&lt;br /&gt;
             699,092 + 524,316 = 1,223,408&lt;br /&gt;
             difference:                56&lt;br /&gt;
&lt;br /&gt;
A4 00 00 00  might be a flag&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  ... empty?&lt;br /&gt;
E5 00 00 00  unknown&lt;br /&gt;
00 00 00 00  ... empty?&lt;br /&gt;
&lt;br /&gt;
-----------  [end of header] (44 bytes), [start of index]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  ... empty?&lt;br /&gt;
&lt;br /&gt;
06 00 00 00  number of records in index (6)&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
&lt;br /&gt;
05 00 00 00  FF FF FF FF  1st: shader&lt;br /&gt;
05 00 00 00  FF FF FF FF  2nd: shader&lt;br /&gt;
04 00 00 00  FF FF FF FF  3rd: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  4th: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  5th: material&lt;br /&gt;
1F 00 00 00  FF FF FF FF  6th: ff name&lt;br /&gt;
FF FF FF FF  00 00 00 00  separator / termination&lt;br /&gt;
&lt;br /&gt;
-----------  [end of index]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Index ==&lt;br /&gt;
&lt;br /&gt;
4 byte identifier (fastfile entry type), 4 byte offset (FF FF FF FF = -1, meaning right after the previous block?)&lt;br /&gt;
&lt;br /&gt;
Separator (FF FF FF FF) after last 4-byte couple + 00 00 00 00 ?&lt;br /&gt;
&lt;br /&gt;
=== Types ===&lt;br /&gt;
&lt;br /&gt;
* 01 00 00 00 - physpreset&lt;br /&gt;
* 02 00 00 00 - xanim&lt;br /&gt;
* 03 00 00 00 - xmodel&lt;br /&gt;
* 04 00 00 00 - material&lt;br /&gt;
* 05 00 00 00 - shader / techset&lt;br /&gt;
* 06 00 00 00 - image?&lt;br /&gt;
* 0B 00 00 00 - map_ents (d3dbsp)&lt;br /&gt;
* 0C 00 00 00 - related to col_map_mp (d3dbsp)&lt;br /&gt;
* 0E 00 00 00 - related to game_map_mp (d3dbsp)&lt;br /&gt;
* 10 00 00 00 - related to col_map_mp / gfx_map (d3dbsp)&lt;br /&gt;
* 13 00 00 00 - font&lt;br /&gt;
* 14 00 00 00 - menu&lt;br /&gt;
* 16 00 00 00 - localized string asset&lt;br /&gt;
* 17 00 00 00 - physpreset??&lt;br /&gt;
* 19 00 00 00 - fx&lt;br /&gt;
* 1F 00 00 00 - string / raw file / fastfile name&lt;br /&gt;
* 20 00 00 00 - stringtable (comma separated list)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- under re-investigation, don&#039;t delete please!&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1F 00 00 00 FF FF FF FF  rawfile (plaintext)&lt;br /&gt;
05 00 00 00 FF FF FF FF  shader&lt;br /&gt;
03 00 00 00 FF FF FF FF  related to xmodel&lt;br /&gt;
1F 00 00 00 FF FF FF FF  xmodel data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
4A 06 00 00              rawfile length&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
6D 61 70 73 2F 6D 70 2F  filename:&lt;br /&gt;
5F 72 65 70 75 6C 73 65  maps/mp/_repulse.gsc&lt;br /&gt;
2E 67 73 63 00           followed by plaintext:&lt;br /&gt;
69 6E 69 74 28 29 0D 0A  init()..&lt;br /&gt;
7B 0D 0A 09 74 68 72 65  {...thre&lt;br /&gt;
61 64 20 70 6C 61 79 65  ad playe&lt;br /&gt;
72 63 6F 6E 6E 65 63 74  rconnect&lt;br /&gt;
28 29 3B 0D 0A ...       ();..}.&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
...                      shader (binary data)&lt;br /&gt;
&lt;br /&gt;
...                      xmodel related data&lt;br /&gt;
&lt;br /&gt;
...                      xmodel data (similar to original xmodel file, but nonetheless different)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Shaders ===&lt;br /&gt;
&lt;br /&gt;
50 00 00 00 or&lt;br /&gt;
40 00 00 00&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
9F 00 00 00  size after filename&lt;br /&gt;
&lt;br /&gt;
filename ended with 0x00&lt;br /&gt;
&lt;br /&gt;
(size * 4) bytes of shader data, seems to end with FF FF 00 00&lt;br /&gt;
might contain more data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
filename starts with &#039;,&#039;&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Content ==&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 04 ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;-----------  [start of header]&lt;br /&gt;
&lt;br /&gt;
00 2B 01 01  First 4 bytes seem to be 4 (unsigned) char&#039;s.&lt;br /&gt;
             First byte is so far always 0x00 (perhaps it&#039;s a short together with the second byte).&lt;br /&gt;
             Second byte so far either 0x2B or 0x00, I think this is a length.&lt;br /&gt;
             Third byte so far 0x01, when 0x00 (all 4) the content is only a number of 0x00&#039;s, then the filename (0x00 termination)&lt;br /&gt;
             Fourth byte either 0x00 or 0x01. Can be a length or a bool.&lt;br /&gt;
&lt;br /&gt;
             Then 0x10 bytes of more header.&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
&lt;br /&gt;
00           When fourth byte is 01, there&#039;s a 0x00 following?&lt;br /&gt;
             &lt;br /&gt;
             Then there&#039;s garbage (0xFF) and some shorts it looks of length in the second byte.&lt;br /&gt;
&lt;br /&gt;
             Then more information...&lt;br /&gt;
&lt;br /&gt;
-----------  [end of index]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--[[User:CoDEmanX|CoDEmanX]] 01:28, 4 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
--[[User:Daevius|Daevius]] 23:59, 1 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Technical Reference]]&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Daevius</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7114</id>
		<title>Call of Duty 4: FastFile Format</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7114"/>
		<updated>2009-11-04T12:53:40Z</updated>

		<summary type="html">&lt;p&gt;Daevius: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Under Construction Small.png‎]] &#039;&#039;&#039;*** Article and investigation in early progress ***&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
&lt;br /&gt;
*Byte 0-3: decompressed fastfile size minus 44 (0x2C)&lt;br /&gt;
*Byte 4-7: about the total size of referenced data, e.g. the required memory for IWI textures if material files are in the ff&lt;br /&gt;
*Byte 8-11: &#039;&#039;unknown&#039;&#039;, might be a flag&lt;br /&gt;
*Byte 12-43: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 44-47: equal to number of entries in &amp;quot;1st index&amp;quot; and amount of (model tag/joint/notetrack) strings (times 4 for index length)&lt;br /&gt;
*Byte 48-51: separator? (FF FF FF FF)&lt;br /&gt;
*Byte 52-55: number of records* (&amp;quot;2nd index&amp;quot;, times 8 for index length)&lt;br /&gt;
*Byte 56-63: separator? (FF FF FF FF FF FF FF FF)&lt;br /&gt;
*Byte 64-x: string list (xmodelsurfs?) --&amp;gt; not always, depends on the content (required offsets are in the FF header)*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; under re-investigation &amp;lt;!-- If a file was missing on ff compile, it does not count but the error message is added to the end of the file. There are usually more index entries than the number of records in the header. The given number of records is not equal to the entries in the assetinfo or assetlist file, it&#039;s usually higher. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: mp_backlot_load.ff ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Contains:&#039;&#039;&#039;&lt;br /&gt;
*2x shaders &lt;br /&gt;
*3x materials&lt;br /&gt;
*(1x fastfile name)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Materials:&lt;br /&gt;
# $victorybackdrop - mile_high_victory_screen.iwi (699,092 bytes)&lt;br /&gt;
# $defeatbackdrop - (none)&lt;br /&gt;
# $levelbriefing - loadscreen_mp_backlot.iwi (524,316 bytes)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start of header]&lt;br /&gt;
&lt;br /&gt;
71 03 00 00  decompressed filesize - 44 (hex: 371 + 2C = 39D; dec: 881 + 44 = 925)&lt;br /&gt;
&lt;br /&gt;
B8 AA 12 00  size of both IWIs the materials in FF point to - 56 (2x28, 28 bytes = IWI header)&lt;br /&gt;
             0x12AAB8          = 1,223,352&lt;br /&gt;
             699,092 + 524,316 = 1,223,408&lt;br /&gt;
             difference:                56&lt;br /&gt;
&lt;br /&gt;
A4 00 00 00  might be a flag&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  ... empty?&lt;br /&gt;
E5 00 00 00  unknown&lt;br /&gt;
00 00 00 00  ... empty?&lt;br /&gt;
&lt;br /&gt;
-----------  [end of header] (44 bytes), [start of index]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  ... empty?&lt;br /&gt;
&lt;br /&gt;
06 00 00 00  number of records in index (6)&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
&lt;br /&gt;
05 00 00 00  FF FF FF FF  1st: shader&lt;br /&gt;
05 00 00 00  FF FF FF FF  2nd: shader&lt;br /&gt;
04 00 00 00  FF FF FF FF  3rd: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  4th: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  5th: material&lt;br /&gt;
1F 00 00 00  FF FF FF FF  6th: ff name&lt;br /&gt;
FF FF FF FF  00 00 00 00  separator / termination&lt;br /&gt;
&lt;br /&gt;
-----------  [end of index]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Index ==&lt;br /&gt;
&lt;br /&gt;
4 byte identifier (fastfile entry type), 4 byte offset (FF FF FF FF = -1, meaning right after the previous block?)&lt;br /&gt;
&lt;br /&gt;
Separator (FF FF FF FF) after last 4-byte couple + 00 00 00 00 ?&lt;br /&gt;
&lt;br /&gt;
=== Types ===&lt;br /&gt;
&lt;br /&gt;
* 01 00 00 00 - physpreset&lt;br /&gt;
* 02 00 00 00 - xanim&lt;br /&gt;
* 03 00 00 00 - xmodel&lt;br /&gt;
* 04 00 00 00 - material&lt;br /&gt;
* 05 00 00 00 - shader / techset&lt;br /&gt;
* 06 00 00 00 - image?&lt;br /&gt;
* 0B 00 00 00 - map_ents (d3dbsp)&lt;br /&gt;
* 0C 00 00 00 - related to col_map_mp (d3dbsp)&lt;br /&gt;
* 0E 00 00 00 - related to game_map_mp (d3dbsp)&lt;br /&gt;
* 10 00 00 00 - related to col_map_mp / gfx_map (d3dbsp)&lt;br /&gt;
* 13 00 00 00 - font&lt;br /&gt;
* 14 00 00 00 - menu&lt;br /&gt;
* 16 00 00 00 - localized string asset&lt;br /&gt;
* 17 00 00 00 - physpreset??&lt;br /&gt;
* 19 00 00 00 - fx&lt;br /&gt;
* 1F 00 00 00 - string / raw file / fastfile name&lt;br /&gt;
* 20 00 00 00 - stringtable (comma separated list)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- under re-investigation, don&#039;t delete please!&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1F 00 00 00 FF FF FF FF  rawfile (plaintext)&lt;br /&gt;
05 00 00 00 FF FF FF FF  shader&lt;br /&gt;
03 00 00 00 FF FF FF FF  related to xmodel&lt;br /&gt;
1F 00 00 00 FF FF FF FF  xmodel data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
4A 06 00 00              rawfile length&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
6D 61 70 73 2F 6D 70 2F  filename:&lt;br /&gt;
5F 72 65 70 75 6C 73 65  maps/mp/_repulse.gsc&lt;br /&gt;
2E 67 73 63 00           followed by plaintext:&lt;br /&gt;
69 6E 69 74 28 29 0D 0A  init()..&lt;br /&gt;
7B 0D 0A 09 74 68 72 65  {...thre&lt;br /&gt;
61 64 20 70 6C 61 79 65  ad playe&lt;br /&gt;
72 63 6F 6E 6E 65 63 74  rconnect&lt;br /&gt;
28 29 3B 0D 0A ...       ();..}.&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
...                      shader (binary data)&lt;br /&gt;
&lt;br /&gt;
...                      xmodel related data&lt;br /&gt;
&lt;br /&gt;
...                      xmodel data (similar to original xmodel file, but nonetheless different)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Shaders ===&lt;br /&gt;
&lt;br /&gt;
50 00 00 00 or&lt;br /&gt;
40 00 00 00&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
9F 00 00 00  size after filename&lt;br /&gt;
&lt;br /&gt;
filename ended with 0x00&lt;br /&gt;
&lt;br /&gt;
(size * 4) bytes of shader data, seems to end with FF FF 00 00&lt;br /&gt;
might contain more data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
filename starts with &#039;,&#039;&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Content ==&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 04 ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;-----------  [start of header]&lt;br /&gt;
&lt;br /&gt;
00 2B 01 01  First 4 bytes seem to be 4 (unsigned) char&#039;s.&lt;br /&gt;
             First byte is so far always 0x00 (perhaps it&#039;s a short together with the second byte).&lt;br /&gt;
             Second byte so far either 0x2B or 0x00, I think this is a length.&lt;br /&gt;
             Third byte so far 0x01...&lt;br /&gt;
             Fourth byte either 0x00 or 0x01. Can be a length or a bool.&lt;br /&gt;
&lt;br /&gt;
             Then 0x10 bytes of more header.&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF  Separator&lt;br /&gt;
&lt;br /&gt;
00           When fourth byte is 01, there&#039;s a 0x00 following?&lt;br /&gt;
             &lt;br /&gt;
             Then there&#039;s garbage (0xFF) and some shorts it looks of length in the second byte.&lt;br /&gt;
&lt;br /&gt;
             Then more information...&lt;br /&gt;
&lt;br /&gt;
-----------  [end of index]&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--[[User:CoDEmanX|CoDEmanX]] 01:28, 4 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
--[[User:Daevius|Daevius]] 23:59, 1 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Technical Reference]]&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Daevius</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7113</id>
		<title>Call of Duty 4: FastFile Format</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7113"/>
		<updated>2009-11-04T12:50:54Z</updated>

		<summary type="html">&lt;p&gt;Daevius: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Under Construction Small.png‎]] &#039;&#039;&#039;*** Article and investigation in early progress ***&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
&lt;br /&gt;
*Byte 0-3: decompressed fastfile size minus 44 (0x2C)&lt;br /&gt;
*Byte 4-7: about the total size of referenced data, e.g. the required memory for IWI textures if material files are in the ff&lt;br /&gt;
*Byte 8-11: &#039;&#039;unknown&#039;&#039;, might be a flag&lt;br /&gt;
*Byte 12-43: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 44-47: equal to number of entries in &amp;quot;1st index&amp;quot; and amount of (model tag/joint/notetrack) strings (times 4 for index length)&lt;br /&gt;
*Byte 48-51: separator? (FF FF FF FF)&lt;br /&gt;
*Byte 52-55: number of records* (&amp;quot;2nd index&amp;quot;, times 8 for index length)&lt;br /&gt;
*Byte 56-63: separator? (FF FF FF FF FF FF FF FF)&lt;br /&gt;
*Byte 64-x: string list (xmodelsurfs?) --&amp;gt; not always, depends on the content (required offsets are in the FF header)*&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; under re-investigation &amp;lt;!-- If a file was missing on ff compile, it does not count but the error message is added to the end of the file. There are usually more index entries than the number of records in the header. The given number of records is not equal to the entries in the assetinfo or assetlist file, it&#039;s usually higher. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Example: mp_backlot_load.ff ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Contains:&#039;&#039;&#039;&lt;br /&gt;
*2x shaders &lt;br /&gt;
*3x materials&lt;br /&gt;
*(1x fastfile name)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Materials:&lt;br /&gt;
# $victorybackdrop - mile_high_victory_screen.iwi (699,092 bytes)&lt;br /&gt;
# $defeatbackdrop - (none)&lt;br /&gt;
# $levelbriefing - loadscreen_mp_backlot.iwi (524,316 bytes)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
-----------  [start of header]&lt;br /&gt;
&lt;br /&gt;
71 03 00 00  decompressed filesize - 44 (hex: 371 + 2C = 39D; dec: 881 + 44 = 925)&lt;br /&gt;
&lt;br /&gt;
B8 AA 12 00  size of both IWIs the materials in FF point to - 56 (2x28, 28 bytes = IWI header)&lt;br /&gt;
             0x12AAB8          = 1,223,352&lt;br /&gt;
             699,092 + 524,316 = 1,223,408&lt;br /&gt;
             difference:                56&lt;br /&gt;
&lt;br /&gt;
A4 00 00 00  might be a flag&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  ... empty?&lt;br /&gt;
E5 00 00 00  unknown&lt;br /&gt;
00 00 00 00  ... empty?&lt;br /&gt;
&lt;br /&gt;
-----------  [end of header] (44 bytes), [start of index]&lt;br /&gt;
&lt;br /&gt;
00 00 00 00  ... empty?&lt;br /&gt;
&lt;br /&gt;
06 00 00 00  number of records in index (6)&lt;br /&gt;
FF FF FF FF  separator&lt;br /&gt;
&lt;br /&gt;
05 00 00 00  FF FF FF FF  1st: shader&lt;br /&gt;
05 00 00 00  FF FF FF FF  2nd: shader&lt;br /&gt;
04 00 00 00  FF FF FF FF  3rd: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  4th: material&lt;br /&gt;
04 00 00 00  FF FF FF FF  5th: material&lt;br /&gt;
1F 00 00 00  FF FF FF FF  6th: ff name&lt;br /&gt;
FF FF FF FF  00 00 00 00  separator / termination&lt;br /&gt;
&lt;br /&gt;
-----------  [end of index]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Index ==&lt;br /&gt;
&lt;br /&gt;
4 byte identifier (fastfile entry type), 4 byte offset (FF FF FF FF = -1, meaning right after the previous block?)&lt;br /&gt;
&lt;br /&gt;
Separator (FF FF FF FF) after last 4-byte couple + 00 00 00 00 ?&lt;br /&gt;
&lt;br /&gt;
=== Types ===&lt;br /&gt;
&lt;br /&gt;
* 01 00 00 00 - physpreset&lt;br /&gt;
* 02 00 00 00 - xanim&lt;br /&gt;
* 03 00 00 00 - xmodel&lt;br /&gt;
* 04 00 00 00 - material&lt;br /&gt;
* 05 00 00 00 - shader / techset&lt;br /&gt;
* 06 00 00 00 - image?&lt;br /&gt;
* 0B 00 00 00 - map_ents (d3dbsp)&lt;br /&gt;
* 0C 00 00 00 - related to col_map_mp (d3dbsp)&lt;br /&gt;
* 0E 00 00 00 - related to game_map_mp (d3dbsp)&lt;br /&gt;
* 10 00 00 00 - related to col_map_mp / gfx_map (d3dbsp)&lt;br /&gt;
* 13 00 00 00 - font&lt;br /&gt;
* 14 00 00 00 - menu&lt;br /&gt;
* 16 00 00 00 - localized string asset&lt;br /&gt;
* 17 00 00 00 - physpreset??&lt;br /&gt;
* 19 00 00 00 - fx&lt;br /&gt;
* 1F 00 00 00 - string / raw file / fastfile name&lt;br /&gt;
* 20 00 00 00 - stringtable (comma separated list)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- under re-investigation, don&#039;t delete please!&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1F 00 00 00 FF FF FF FF  rawfile (plaintext)&lt;br /&gt;
05 00 00 00 FF FF FF FF  shader&lt;br /&gt;
03 00 00 00 FF FF FF FF  related to xmodel&lt;br /&gt;
1F 00 00 00 FF FF FF FF  xmodel data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
4A 06 00 00              rawfile length&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
6D 61 70 73 2F 6D 70 2F  filename:&lt;br /&gt;
5F 72 65 70 75 6C 73 65  maps/mp/_repulse.gsc&lt;br /&gt;
2E 67 73 63 00           followed by plaintext:&lt;br /&gt;
69 6E 69 74 28 29 0D 0A  init()..&lt;br /&gt;
7B 0D 0A 09 74 68 72 65  {...thre&lt;br /&gt;
61 64 20 70 6C 61 79 65  ad playe&lt;br /&gt;
72 63 6F 6E 6E 65 63 74  rconnect&lt;br /&gt;
28 29 3B 0D 0A ...       ();..}.&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
...                      shader (binary data)&lt;br /&gt;
&lt;br /&gt;
...                      xmodel related data&lt;br /&gt;
&lt;br /&gt;
...                      xmodel data (similar to original xmodel file, but nonetheless different)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Shaders ===&lt;br /&gt;
&lt;br /&gt;
50 00 00 00 or&lt;br /&gt;
40 00 00 00&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
9F 00 00 00  size after filename&lt;br /&gt;
&lt;br /&gt;
filename ended with 0x00&lt;br /&gt;
&lt;br /&gt;
(size * 4) bytes of shader data, seems to end with FF FF 00 00&lt;br /&gt;
might contain more data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
filename starts with &#039;,&#039;&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Content ==&lt;br /&gt;
&lt;br /&gt;
=== 00 00 00 04 ===&lt;br /&gt;
&lt;br /&gt;
00 2B 01 01&lt;br /&gt;
&lt;br /&gt;
First 4 bytes seem to be 4 (unsigned) char&#039;s.&lt;br /&gt;
First byte is so far always 0x00 (perhaps it&#039;s a short together with the second byte).&lt;br /&gt;
Second byte so far either 0x2B or 0x00, I think this is a length.&lt;br /&gt;
Third byte so far 0x01...&lt;br /&gt;
Fourth byte either 0x00 or 0x01. Can be a length or a bool.&lt;br /&gt;
&lt;br /&gt;
Then 0x10 bytes of more header.&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&lt;br /&gt;
When fourth byte is 01, there&#039;s a 0x00 following?&lt;br /&gt;
Then there&#039;s garbage (0xFF) and some shorts it looks of length in the second byte.&lt;br /&gt;
&lt;br /&gt;
Then more information...&lt;br /&gt;
&lt;br /&gt;
--[[User:CoDEmanX|CoDEmanX]] 01:28, 4 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
--[[User:Daevius|Daevius]] 23:59, 1 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Technical Reference]]&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Daevius</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7108</id>
		<title>Call of Duty 4: FastFile Format</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7108"/>
		<updated>2009-11-02T21:13:05Z</updated>

		<summary type="html">&lt;p&gt;Daevius: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Under Construction Small.png‎]] &#039;&#039;&#039;*** Article and investigation in early progress ***&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
&lt;br /&gt;
*Byte 0-3: decompressed fastfile size minus 44 (0x2C)&lt;br /&gt;
*Byte 4-47: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 48-51: separator? (FF FF FF FF)&lt;br /&gt;
*Byte 52-55: number of records*&lt;br /&gt;
*Byte 56-63: separator? (FF FF FF FF FF FF FF FF)&lt;br /&gt;
*Byte 64-x: string list (xmodelsurfs?)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; If a file was missing on ff compile, it does not count but the error message is added to the end of the file. There are usually more index entries than the number of records in the header. The given number of records is not equal to the entries in the assetinfo or assetlist file, it&#039;s usually higher.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Index ==&lt;br /&gt;
&lt;br /&gt;
4 byte identifier (fastfile entry type), 4 byte offset (FF FF FF FF = -1, meaning right after the previous block?)&lt;br /&gt;
&lt;br /&gt;
Separator (FF FF FF FF) after last 4-byte couple&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1F 00 00 00 FF FF FF FF  rawfile (plaintext)&lt;br /&gt;
05 00 00 00 FF FF FF FF  shader&lt;br /&gt;
03 00 00 00 FF FF FF FF  related to xmodel&lt;br /&gt;
1F 00 00 00 FF FF FF FF  xmodel data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
4A 06 00 00              rawfile length&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
6D 61 70 73 2F 6D 70 2F  filename:&lt;br /&gt;
5F 72 65 70 75 6C 73 65  maps/mp/_repulse.gsc&lt;br /&gt;
2E 67 73 63 00           followed by plaintext:&lt;br /&gt;
69 6E 69 74 28 29 0D 0A  init()..&lt;br /&gt;
7B 0D 0A 09 74 68 72 65  {...thre&lt;br /&gt;
61 64 20 70 6C 61 79 65  ad playe&lt;br /&gt;
72 63 6F 6E 6E 65 63 74  rconnect&lt;br /&gt;
28 29 3B 0D 0A ...       ();..}.&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
...                      shader (binary data)&lt;br /&gt;
&lt;br /&gt;
...                      xmodel related data&lt;br /&gt;
&lt;br /&gt;
...                      xmodel data (similar to original xmodel file, but nonetheless different)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Shaders ===&lt;br /&gt;
&lt;br /&gt;
50 00 00 00 or&lt;br /&gt;
40 00 00 00&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
9F 00 00 00  size after filename&lt;br /&gt;
&lt;br /&gt;
filename ended with 0x00&lt;br /&gt;
&lt;br /&gt;
(size * 4) bytes of shader data, seems to end with FF FF 00 00&lt;br /&gt;
might contain more data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
&lt;br /&gt;
filename starts with &#039;,&#039;&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--[[User:CoDEmanX|CoDEmanX]] 17:27, 16 May 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
--[[User:Daevius|Daevius]] 23:59, 1 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Technical Reference]]&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Daevius</name></author>
	</entry>
	<entry>
		<id>https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7107</id>
		<title>Call of Duty 4: FastFile Format</title>
		<link rel="alternate" type="text/html" href="https://wiki.zeroy.com/index.php?title=Call_of_Duty_4:_FastFile_Format&amp;diff=7107"/>
		<updated>2009-11-01T23:59:53Z</updated>

		<summary type="html">&lt;p&gt;Daevius: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:Under Construction Small.png‎]] &#039;&#039;&#039;*** Article and investigation in early progress ***&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Header ==&lt;br /&gt;
&lt;br /&gt;
*Byte 0-3: decompressed fastfile size minus 44 (0x2C)&lt;br /&gt;
*Byte 4-47: &#039;&#039;unknown&#039;&#039;&lt;br /&gt;
*Byte 48-51: separator? (FF FF FF FF)&lt;br /&gt;
*Byte 52-55: number of records*&lt;br /&gt;
*Byte 56-63: separator? (FF FF FF FF FF FF FF FF)&lt;br /&gt;
*Byte 64-x: string list (xmodelsurfs?)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;*&amp;lt;/nowiki&amp;gt; If a file was missing on ff compile, it does not count but the error message is added to the end of the file. There are usually more index entries than the number of records in the header. The given number of records is not equal to the entries in the assetinfo or assetlist file, it&#039;s usually higher.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Index ==&lt;br /&gt;
&lt;br /&gt;
4 byte identifier (fastfile entry type), 4 byte offset (FF FF FF FF = -1, meaning right after the previous block?)&lt;br /&gt;
&lt;br /&gt;
Separator (FF FF FF FF) after last 4-byte couple&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
1F 00 00 00 FF FF FF FF  rawfile (plaintext)&lt;br /&gt;
05 00 00 00 FF FF FF FF  shader&lt;br /&gt;
03 00 00 00 FF FF FF FF  related to xmodel&lt;br /&gt;
1F 00 00 00 FF FF FF FF  xmodel data&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
4A 06 00 00              rawfile length&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
6D 61 70 73 2F 6D 70 2F  filename:&lt;br /&gt;
5F 72 65 70 75 6C 73 65  maps/mp/_repulse.gsc&lt;br /&gt;
2E 67 73 63 00           followed by plaintext:&lt;br /&gt;
69 6E 69 74 28 29 0D 0A  init()..&lt;br /&gt;
7B 0D 0A 09 74 68 72 65  {...thre&lt;br /&gt;
61 64 20 70 6C 61 79 65  ad playe&lt;br /&gt;
72 63 6F 6E 6E 65 63 74  rconnect&lt;br /&gt;
28 29 3B 0D 0A ...       ();..}.&lt;br /&gt;
&lt;br /&gt;
FF FF FF FF              separator&lt;br /&gt;
&lt;br /&gt;
...                      shader (binary data)&lt;br /&gt;
&lt;br /&gt;
...                      xmodel related data&lt;br /&gt;
&lt;br /&gt;
...                      xmodel data (similar to original xmodel file, but nonetheless different)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Shaders ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;FF FF FF FF&lt;br /&gt;
00 00 00 00&lt;br /&gt;
FF FF FF FF&lt;br /&gt;
9F 00 00 00  size after filename&lt;br /&gt;
&lt;br /&gt;
filename ended with 0x00&lt;br /&gt;
&lt;br /&gt;
(size * 4) bytes of shader data, seems to end with FF FF 00 00&lt;br /&gt;
might contain more data&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--[[User:CoDEmanX|CoDEmanX]] 17:27, 16 May 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
--[[User:Daevius|Daevius]] 23:59, 1 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
[[Category:Call of Duty 4]]&lt;br /&gt;
[[Category:Technical Reference]]&lt;br /&gt;
[[Category:File formats]]&lt;/div&gt;</summary>
		<author><name>Daevius</name></author>
	</entry>
</feed>