PAC (File Format)

From Wexos's Wiki
Revision as of 17:57, 1 May 2024 by Wexos (talk | contribs) (Imported from avsys wiki)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

PAC files are found in /Data/flash/data_jp from Mario Kart Arcade GP DX's filesystem and they contain layout and image data.

File Format

The file byte order is always little endian.

File Header

The file starts with a header that is 0x14 bytes long.

Offset Type Description
0x00 Char[4] File magic. Always pack in ASCII.
0x04 Int32 Number of files.
0x08 Int32 Offset to String Pool, relative to the end of the File Entry List.
0x0C Int32 Alignment used before file data. Always 0x20.
0x10 Int32 File type:
  • 1 = layout
  • 2 = image
0x14 End of header, start of File Entry List

File Entry List

After the header, there's an entry list with entries for each file. Each entry is 0x10 bytes long.

Offset Type Description
0x00 UInt32 Unknown. Seems to be some kind of hash of the real file name. Strings are assigned to each file in the String Pool, but they do not contain an extension.
0x04 Int32 Offset to file's string, relative to the start of the String Pool.
0x08 Int32 Offset to file data, relative to the end of the entry list.
0x0C Int32 File length.

Followed by the last entry, the data is aligned from the header alignment.

String Pool

At the end of the file, after the file data, there's a string pool, which contains null-terminated strings linked to each file.

Tools

The following tools can handle PAC files:

  • (none)