-
Notifications
You must be signed in to change notification settings - Fork 1
The AFS file format is a container format. It is used in a number of games, by Sting! and other developers alike, across a number of systems.
The AFS container structure consists of an eight byte header, followed by file offset and size pairs, file name offsets and then the data itself, usually followed by the file names but they could be anywhere in the file.
0x00-0x03: "AFS " (AFS followed by a null character), 0x41465300
0x04-0x07: File count
Following this is the file offsets and sizes:
0x00-0x03: Absolute file data offset
0x04-0x07: Run length
Then a 4-byte absolute offset indicating where the file names are stored, and finally a 4-byte integer indicating the run length of the entire file name data. Each file name is referenced in order, so the first file name belongs to the first file. The file names are 48-byte structures containing 32 character strings (null delimited) followed by a set of 16 bytes whose function is unknown.