Jump to content
Setting up an AI agent? ReverseEngineering.wiki skill (works from the command line, no configuration): https://reverseengineering.wiki/skill/rewiki/SKILL.md · setup for every client, including MCP: https://reverseengineering.wiki/llms.txt · REWiki:Connect

Format:NARC archive

From ReverseEngineering.wiki
Format
Magic 4E 41 52 43 ("NARC") at offset 0
Extensions .narc
Endianness little
On this wiki Facts · Code · Notes · Topics

Nitro archive (.narc) used inside Nintendo DS NitroFS: header magic NARC, then BTAF (file allocation), BTNF (name table) and GMIF (file image) blocks.

Layout

Checked against ndspy narc.py (RoadrunnerWMC/ndspy, GPL-3.0, commit 00165f1; lines 55-95 read, 124-161 write). All block fields are little endian; the 16-byte file header is the common Nitro header <4s H H I H H:

Offset Size Field
0 4 NARC
4 2 byte-order mark
6 2 version
8 4 total file size
0xC 2 header size, 0x10
0xE 2 number of blocks, 3

Two spellings of the mark and version exist and ndspy accepts both: bytes FE FF 00 01 (value 0xFFFE, then version 0x0100; the form of most games, for example Super Mario Bros. DS, which ndspy calls the big-endian beginning) and bytes FF FE 01 00 (value 0xFEFF, version 1; seen in Spirit Tracks). Either way the version means 1, and the parser raises an error for anything else.

Three blocks follow, each 4-char tag, u32 size (including the 8-byte block header); the tags are stored as BTAF, BTNF, GMIF (ndspy writes them reversed in its source as FATB, FNTB, FIMG, which is the order they take in a hex dump read the other way round):

  • BTAF at 0x10: u32 file count, then per file u32 start, u32 end, offsets relative to the first data byte of the GMIF block (GMIF start + 8). Block size = 0x0C + 8 * count.
  • BTNF at 0x10 + BTAF size: a name table in the layout of the NDS ROM's FNT (see Format:Nintendo DS ROM image (NDS)); files are usually unnamed, then it is a short root-directory table padded with 0xFF to 4 bytes.
  • GMIF at the end of BTNF: the concatenated files, each padded with zeros to 4 bytes.

Test: open any .narc; BTAF is at 0x10, BTNF at 0x10 + (size at 0x14), GMIF at the next block boundary.

Code & repositories

  • https://github.com/RoadrunnerWMC/ndspy @ 00165f177d03c6ca9e15e37decf54d9c6754bf54 · license: GPL-3.0
    ndspy (GPL-3.0): Python library reading and writing NDS ROMs, NARC and SDAT archives; narc.py and soundArchive.py give the exact headers, block tags and record tables. Read for format facts only.
    Tested on: source read, not run: Read at this commit; not run. · checked 2026-10-18; last activity 2026-08-29
  • https://github.com/pret/pokeplatinum @ 1dc13dcea40c04ab53f1f607de46023dc409ef20 · license: GPL-3.0-only (declared by the contributor; GitHub's detector did not recognize a license file)
    pret/pokeplatinum: tools/nitrobtx (BTX0/BMD0 container and TEX0 chunk; the files read carry GPL version 3 headers) and tools/nitroarc (NARC tool). No repository-level license file was found.
    Tested on: source read, not run · checked 2026-10-18; last activity 2026-10-14