Narc Archive
Summary
The .narc archive is the default archive format for the Phantasy Star Zero game files. In most cases the whole file is compressed with the psz format. So see the PSZ Compression page in order to get information on that. This documentation was written for the decompressed format of this archive.
The Archive is split into three general sections identified by a magic number with a header for each section. The magic numbers are listed as follows:
NARCBTAFBTNF
A short summary of each one of the files. The NARC section describes the number of files, and the length of the whole archive. The BATF section provides the start and end offsets for the child files in the archive. The BTNF section can have optional filenames followed by the binary data of the child files. Because this archive is often compressed in its entirety, there is no internal compression of the child files.
NARC Section
The NARC section of the archive comprises of the first 0x10 bytes of the file. The section contains a magic number, followed by two 16 bit values which are of unknown importance. Following that is 4 bytes which gives the sive of the entire archive file, following by the offset to the BTAF section, and another 16 bit value.
Generally there is not much information that needs to be parsed from the header. Most of the value comes from the magic number indicating the file type as a NARC archive. The BTAF section will always follow at offset 0x10.

Definitions
Layout
0x0000
4
uint32_t
"NARC" Magic Number
0x0004
2
uint16_t
0xFFFF
0x0006
2
uint16_t
0x0100
0x0008
4
uint32_t
Archive Length
0x000c
2
uint16_t
Header Length (0x10)
0x000e
2
uint16_t
0x03
BTAF Section
Contains a list of start and end offset for each of the child files in the archive. The section has a magic number, followed by the size of the section including the header, and the number of files. Following the header is a list of start and end offsets for each of the children files in the archive.

Definitions
Layout
0x0000
4
uint32_t
"BTAF" Magic Number
0x0004
4
uint32_t
BTAF Length
0x0008
4
uint32_t
File Count
BTNF Section
The BTNF section is the final section of the archive that includes the data for each of the files. The section start soof with a small header that only includes the magic number and length. From there the section can optionally contain a list of files and directory names, with an implied root directory.
Layout
0x0000
4
uint32_t
"BTNF" Magic Number
0x0004
4
uint32_t
BTNF Length
Last updated
Was this helpful?