Death Rally BPA Format

From ModdingWiki
Jump to: navigation, search
Death Rally BPA Format
Format typeArchive
Max files255
File Allocation Table (FAT)Start
Filenames?Yes, 8.3
Metadata?None
Supports compression?No
Supports encryption?Yes
Supports subdirectories?No
Hidden data?No
Games

The BPA file format is an archive format used by Death Rally.

Header

Data type Description
UINT32LE numFiles Number of files in the archive
FILEREC[255] fileRecords Encrypted FAT

Each FILEREC is of the form

Data type Name Description
char[13] encryptedName Encrypted filename, padded with non-encrypted 0x00 bytes
UINT32LE size Size of the file data

The FILEREC table has a fixed size of 255 * 17 bytes, padded with null bytes, and cannot contain more than 255 FILERECs. Compressed file data begins immediately after the table, at offset 0x10F3. Because the header does not store offsets, these must be calculated by accumulating through the table.

The file content is not compressed or encrypted by the archive itself, however many of the files typically found in this archive are already encrypted as part of their respective file formats.

Filename encryption

To restore a filename, subtract 117 - 3 * index from each byte, where index is the 0-based index of the byte in the filename. This will yield a non-null-terminated string in uppercase. The encrypted filename is null-terminated (the terminating/padding null bytes are not encrypted).

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 Linux/WindowsYesN/AYesYesN/AN/AN/A

Credits

This file format was reverse engineered by Ceidwad. 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!)