Indy 500 Library Format

From ModdingWiki
Jump to navigation Jump to search
Indy 500 Library Format
Format typeArchive
Max files1,073,741,822 (230 - 2)
File Allocation Table (FAT)Beginning
Filenames?No
Metadata?None
Supports compression?Yes
Supports encryption?No
Supports subdirectories?No
Hidden data?No
Games

The Indy 500 Library Format is used to store game assets for Indianapolis 500: The Simulation. Files in this format have no signature, and do not even have a consistent filename extension: the game's two archives use the extensions .1 and .2, respectively.

Signature

There is no signature, so the file offsets must be checked for validity. The last FAT entry must equal the total size of the archive file, which is a good check. Each offset must also be larger than the previous one (otherwise the file sizes would be negative).

File format

The file starts with a list of UINT32LE values, each of which contains the starting offset for one of the archive's contained files. There is no explicit field containing the number of files, nor of any of the contained file sizes; this data is computed based on the start offsets. The size of the header is the same as the start offset of the first file. The number of files can be computed by dividing the header size by 4.

At each file's stored offset, a single UINT32LE prefixes the compressed file data. This word contains the decompressed file size. The file data itself is compressed (see below).

Compression

Each file is compressed using LZSS compression with the following properties:

  • Size of LZSS "length" field: 4 lower bits
  • Size of LZSS "offset" field: 12 upper bits (making the window size 4096 bytes)
  • Minimum length to write lookback: 3 bytes
  • Window prefill byte: 0x20
  • Initial window position: -16 ("length" bytes before the end of the window)
  • Endian/swap: Read bytes "AB CD" into an integer of value 0xCABD.

Tools

The following tools are able to work with files in this format.

Name PlatformExtract files? Decompress on extract? Create new? Modify? Compress on insert? Access hidden data? Edit metadata? Notes
Camoto/gamearchive.js AnyYesYesYesYesYesN/AN/A

Example code

Credits

This file format was reverse engineered by User:Cmb. If you find this information helpful in a project you're working on, please give credit where credit is due. (A link back to this wiki would be nice too!)