SARC (File Format)

From MK8
Revision as of 21:34, 9 August 2014 by Leseratte (talk | contribs)
Jump to navigation Jump to search

SARC Files are uncompressed archive files used in Wii U applications and games, including Mario Kart 8. They are similar to the U8 (ARC) files found in GameCube and Wii games.

File Format

The file begins with a 16 bytes long header, and is followed by a file system and a list of filenames that are included in the archive. All values are big endian.

Header

Offset Size Description
0x00 4 0x53415243 ("SARC") file identifier.
0x04 2 Unknown. Always 0x0014?
0x06 2 Byte order mark. Always 0xfeff?
0x08 4 Total archive file size.
0x0c 4 Offset for beginning of data.
0x10 End of header

File Table

Header

Offset Type Description
0x00 4 0x53464154 ("SFAT") file identifier.
0x04 2 Unknown. Always 0x000c?
0x06 2 Amount of nodes.
0x08 4 Unknown. Always 0x00000065?
0x0c End of header

Node

Offset Size Description
0x00 4 unknown
0x04 1 Unknown. Always 0x01?
0x05 3 Offset of string table entry, relative to the end of the file name table header, divided by 4.
0x08 4 Beginning of node file data relative to the starting offset specified in the SARC header.
0x0c 4 End of node file data relative to the starting offset specified in the SARC header.
0x10 End of node

File Name Table

The header is immediately followed by 4-byte aligned null-terminated strings that represent the filenames of the packed files.

Header

Offset Type Description
0x00 4 0x53464e54 ("SFNT") file identifier.
0x04 4 Unknown. Always 0x00080000?
0x08 End of header

File Data

The data begins at the variable value specified in the SARC header. There is padding between the files for 256-byte (0x100) alignment.

Tools

The following tool can extract SARC files: