HomeBrew File Folder Format

From ModdingWiki
Jump to navigation Jump to search
HomeBrew File Folder Format
Format typeArchive
Max files232-1 (~4 billion)
File Allocation Table (FAT)Beginning
Filenames?Yes, 8.3 chars
Metadata?None
Supports compression?No
Supports encryption?No
Supports subdirectories?No
Hidden data?Yes
Games

The HomeBrew File Folder Format is used by Gateworld to store much (but not all) of the game data files.

Signature

The file begins with the ASCII string "HomeBrew File Folder" followed by 0x1A and 11 null bytes, padding the header up to 32 bytes.

File format

The file begins with a header.

Data type Name Description
char[21] signature "HomeBrew File Folder" + 0x1A.
BYTE[11] padding Set to 0x00, pads the signature to 32 bytes.
UINT16LE version Assumed version, actual purpose unknown. Set to 0x100 (version "1.0"?)
UINT32LE count Number of files in the archive. Could be UINT16LE.
BYTE[26] padding Set to 0x00, pads the version and count to 32 bytes.

The following 32-byte file entry structure is repeated count times.

Data type Name Description
char filename[12] Non null-terminated 8.3 filename. Pad with 0x00 if less than 12 chars.
BYTE[4] pad1 Padding? Always 0x00.
UINT32LE offset Offset of the file data, relative to the start of the archive.
UINT16LE length Size of the file data, in bytes.
BYTE[8] pad2 Padding? Always 0x00.

The first file's data begins directly after the FAT, which will also be the offset value of the first FAT entry.

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/ANoN/A
Camoto/gamearchive.js AnyYesN/AYesYesN/ANoN/A

Credits

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