GFA (File Format)

From Wexos's Wiki
Jump to navigationJump to search

GFA (Good-Feel Archive) is an archive format developed by Good-Feel and used in some Nintendo 3DS games and software such as StreetPass Mii Plaza.

File Format

The file byte order is always little endian.

Header

Every GFA file begins with a 0x2C byte header structure.

Offset Type Description
0x00 Char[4] File magic. Always GFAC in ASCII.
0x04 UInt32 Version number.
0x08 UInt32 Unknown. Always 1.
0x0C UInt32 File Allocation Table offset.
0x10 UInt32 Size of File Allocation Table in bytes.
0x14 UInt32 GFCP offset.
0x18 UInt32 Size of GFCP in bytes.
0x1C Byte[16] Padding.

File Allocation Table

The Header is immediately followed by a File Allocation Table. It has the following structure:

Offset Type Description
0x00 Int32 Number of nodes.

Node

Followed by the number of nodes comes all node entries. Each entry has the following structure:

Offset Type Description
0x00 UInt32 File Hash.
0x04 UInt24 File name offset.
0x07 Byte Unknown. Sometimes seen as 0x80.
0x08 UInt32 Size of the uncompressed file in bytes.
0x0C UInt32 Uncompressed file offset, starting at the GFCP offset.

GFCP

The GFCP section contains file data. Its header has the following structure:

Offset Type Description
0x00 Char[4] File magic. Always GFCP in ASCII.
0x04 UInt32 Unknown. Always 1.
0x08 Int32 Compression type:
  • 0 = Uncompressed
  • 1 = BPE
  • 2 = LZ77 Wii Raw 10
  • 3 = LZ77 Wii Raw 10 (as well?)
0x0C UInt32 Uncompressed size.
0x10 UInt32 Compressed size.

After follows 4-byte aligned null-terminated strings that represent the filenames of the packed files.

File Data

The compressed data begins just after the the GFCP header.

Version List

Version Found in
0.0.3.1

Tools

The following tools can handle GFA files:

  • (none)