DashGL
  • Introduction
  • Target
    • GLTF
    • Dash Model Format v1
    • Dash Model Format v2
      • Texture
      • Material
      • Vertex
      • Face
      • Skeleton
      • Animation
  • PSX
    • Megaman Legends 2
      • Entity Models
      • Memory Map
      • Bin Archive
      • Textures
  • NDS
    • Phantasy Star Zero
      • NDS Header
      • PRSZ Compression
      • Narc Archive
  • DC
    • Phantasy Star Online Ep1&2
      • .pvm Texture Archive
      • .pvr Texture
      • .nj Model
      • .gsl Scene Archive
      • .bml Asset Archive
      • .prs Compression
      • .rel Stage Asset
  • GC
    • Phantasy Star Online Ep3
      • .rel Stage
      • .gj Model
Powered by GitBook
On this page
  • Summary
  • NARC Section
  • Definitions
  • Layout
  • BTAF Section
  • Definitions
  • Layout
  • BTNF Section
  • Layout

Was this helpful?

  1. NDS
  2. Phantasy Star Zero

Narc Archive

PreviousPRSZ CompressionNextPhantasy Star Online Ep1&2

Last updated 2 years ago

Was this helpful?

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:

  • NARC

  • BTAF

  • BTNF

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

#define NARC_MAGIC 0x4352414e

typedef struct {
    uint32_t magic;
    uint16_t a;
    uint16_t b;
    uint32_t archiveLength;
    uint16_t headerLength;
    uint16_t c;
} narcHeader_t;

Layout

Byte Offset
Length
Type
Description

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

#define BTAF_MAGIC 0x46415442

typedef struct {
    uint32_t magic;
    uint32_t length;
    uint32_t count;
} batfHeader_t;

typedef struct {
    uint32_t startOffset;
    uint32_t endOffset;
} batfFile_t;

Layout

Byte Offset
Length
Type
Description

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.

#define BTNF_MAGIC 0x464e5442;

Layout

Byte Offset
Length
Type
Description

0x0000

4

uint32_t

"BTNF" Magic Number

0x0004

4

uint32_t

BTNF Length

Phantasy Star Zero Archive NARC Header
Phantasy Star Zero Archive BATF Section
Phantasy Star Zero Archive BATF Section