Difference between revisions of "SARC (File Format)"
m |
m (Minor cleanup. Still needs some fixing.) |
||
Line 1: | Line 1: | ||
− | '''SARC Files''' are uncompressed archive files used in [[Wii U]] applications and games, including [[Mario Kart 8]]. They are similar to the [[mkw:U8 (File Format)|U8]] | + | '''SARC Files''' are uncompressed archive files used in [[Wii U]] applications and games, including [[Mario Kart 8]]. They are similar to the [[mkw:U8 (File Format)|U8]] files found in GameCube and Wii games. Common extensions are .arc, .sarc, .pack, and .bars. |
= File Format = | = File Format = | ||
Line 8: | Line 8: | ||
! Offset !! Size !! Description | ! Offset !! Size !! Description | ||
|- | |- | ||
− | | 0x00 || 4 || ''' | + | | 0x00 || 4 || '''Magic''': 0x53415243 ("SARC"). |
|- | |- | ||
| 0x04 || 2 || {{Unknown|'''Unknown.''' Always 0x0014?}} | | 0x04 || 2 || {{Unknown|'''Unknown.''' Always 0x0014?}} | ||
|- | |- | ||
− | | | + | | 0x04 || 2 || '''Byte order mark''' (0xFEFF) |
|- | |- | ||
− | | 0x08 || 4 || | + | | 0x08 || 4 || '''File size''' of the entire archive. |
|- | |- | ||
− | | 0x0c || 4 || | + | | 0x0c || 4 || '''Beginning of data''' offset. |
|- | |- | ||
− | | 0x10 || colspan=2 {{Unknown|End of header}} | + | | 0x10 || colspan=2 {{Unknown|End of '''SARC''' header}} |
|- | |- | ||
|} | |} | ||
== File Table == | == File Table == | ||
+ | Unlike the U8 format, SARC does generally not contain subdirectory nodes (though files may reside inside subfolders). It is currently unknown if it is able to. | ||
=== Header === | === Header === | ||
Line 28: | Line 29: | ||
! Offset !! Type !! Description | ! Offset !! Type !! Description | ||
|- | |- | ||
− | | 0x00 || 4 || ''' | + | | 0x00 || 4 || '''Magic''': 0x53464154 ("SFAT"). |
|- | |- | ||
− | | 0x04 || 2 || {{Unknown|'''Unknown.''' Always | + | | 0x04 || 2 || {{Unknown|'''Unknown.''' Always 0x000C?}} |
|- | |- | ||
− | | 0x06 || 2 || | + | | 0x06 || 2 || '''Node count'''. |
|- | |- | ||
| 0x08 || 4 || {{Unknown|'''Unknown.''' Always 0x00000065?}} | | 0x08 || 4 || {{Unknown|'''Unknown.''' Always 0x00000065?}} | ||
|- | |- | ||
− | | 0x0c || colspan=2 {{Unknown|End of header}} | + | | 0x0c || colspan=2 {{Unknown|End of '''SFAT''' header}} |
|- | |- | ||
|} | |} | ||
Line 44: | Line 45: | ||
! Offset !! Size !! Description | ! Offset !! Size !! Description | ||
|- | |- | ||
− | | 0x00 || 4 || {{Unknown}} | + | | 0x00 || 4 || {{Unknown|'''Unknown.'''}} |
|- | |- | ||
− | | 0x04 || 1 || {{Unknown|'''Unknown.''' Always 0x01?}} | + | | 0x04 || 1 || {{Unknown|'''Unknown.''' Always 0x01? Comparable to the file/folder flag from U8?}} |
|- | |- | ||
− | | 0x05 || 3 || | + | | 0x05 || 3 || '''String table entry''' offset, 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. | + | | 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. | + | | 0x0c || 4 || '''End of node file data''', relative to the starting offset specified in the SARC header. |
|- | |- | ||
| 0x10 || colspan=2 {{Unknown|End of node}} | | 0x10 || colspan=2 {{Unknown|End of node}} | ||
Line 65: | Line 66: | ||
! Offset !! Type !! Description | ! Offset !! Type !! Description | ||
|- | |- | ||
− | | 0x00 || 4 || ''' | + | | 0x00 || 4 || '''Magic''': 0x53464E54 ("SFNT"). |
|- | |- | ||
| 0x04 || 4 || {{Unknown|'''Unknown.''' Always 0x00080000?}} | | 0x04 || 4 || {{Unknown|'''Unknown.''' Always 0x00080000?}} | ||
|- | |- | ||
− | | 0x08 || colspan=2 {{Unknown|End of header}} | + | | 0x08 || colspan=2 {{Unknown|End of '''SFNT''' header}} |
|- | |- | ||
|} | |} |
Revision as of 21:36, 9 August 2014
SARC Files are uncompressed archive files used in Wii U applications and games, including Mario Kart 8. They are similar to the U8 files found in GameCube and Wii games. Common extensions are .arc, .sarc, .pack, and .bars.
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 | Magic: 0x53415243 ("SARC"). |
0x04 | 2 | Unknown. Always 0x0014? |
0x04 | 2 | Byte order mark (0xFEFF) |
0x08 | 4 | File size of the entire archive. |
0x0c | 4 | Beginning of data offset. |
0x10 | End of SARC header |
File Table
Unlike the U8 format, SARC does generally not contain subdirectory nodes (though files may reside inside subfolders). It is currently unknown if it is able to.
Header
Offset | Type | Description |
---|---|---|
0x00 | 4 | Magic: 0x53464154 ("SFAT"). |
0x04 | 2 | Unknown. Always 0x000C? |
0x06 | 2 | Node count. |
0x08 | 4 | Unknown. Always 0x00000065? |
0x0c | End of SFAT header |
Node
Offset | Size | Description |
---|---|---|
0x00 | 4 | Unknown. |
0x04 | 1 | Unknown. Always 0x01? Comparable to the file/folder flag from U8? |
0x05 | 3 | String table entry offset, 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 | Magic: 0x53464E54 ("SFNT"). |
0x04 | 4 | Unknown. Always 0x00080000? |
0x08 | End of SFNT 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: