An FFE file is a RIFF file, the chunk format Microsoft uses for WAV and AVI files. Its outermost chunk is unusual in one way: the size field is never filled in.
The header
0x00Chunk IDRIFF40x04Size 0 in every file seen40x08Form typeFORC40x0CGUID the same in every file seen16
| Offset | Size | Name | Description |
|---|---|---|---|
0x00 | 4 | Chunk ID | The characters RIFF. |
0x04 | 4 | Size | A 32-bit number. Force Editor leaves it 0, where a RIFF writer would put the size of the rest of the file. All 113 different files in the DirectX 7 SDK have 0 here. A reader cannot use it to find the end of the file, so it goes on until the file ends. |
0x08 | 4 | Form type | The characters FORC. |
0x0C | 16 | GUID | A GUID in the usual layout (three little-endian numbers of 4, 2 and 2 bytes, then 8 bytes in order). Every file has {197E775C-34BA-11D3-ABD5-00C04F8EC627}, bytes 5C 77 7E 19 BA 34 D3 11 AB D5 00 C0 4F 8E C6 27. DirectInput does not say what it is for; it is not one of the effect types. It may name the file format. |
Chunks
After the header come the effects, each a LIST chunk of type
efct. A chunk header is the usual 8 bytes: a four-character ID and a
32-bit size that does not include the header itself.
| Chunk | Where | What it holds |
|---|---|---|
LIST of type efct | after the header, one for each effect | An effect: see the effect list. Its size is correct in every file, and the lists run exactly to the end of the file. |
data | inside an effect list | The axes, the directions, the envelope or the effect type’s parameters. Each has the size its contents need. |
Inside the lists the chunks are not nested the way RIFF usually does it: an
efct list has no chunk of its own for the name or the
DIEFFECT; those are plain bytes straight after the list type. Only the
data chunks have headers. All the sizes in the files seen are multiples of
4, so the RIFF rule that an odd-sized chunk is padded to an even length never comes up.
A file with no effects, such as wall.ffe in the SDK’s Media folder, is the
28-byte header alone.
What the explorer checks
To take a file for an effect file the explorer needs RIFF at the start and
FORC at offset 8. It then reads every list to the end of the file and turns
the file down if anything fails: a chunk that is not an efct list, a list
larger than the file, bytes left at the end, or any check described on the
effect list page. A file turned down is
still shown, as far as it can be read, with the problem marked.