NarcArchive

Reads and writes Nintendo DS NARC container files.

NARC binary layout (all fields little-endian):

Main header – 16 bytes 0x00 magic "NARC" 0x04 BOM FE FF 0x06 version 00 01 0x08 file size (u32) 0x0C hdr size 10 00 0x0E sections 03 00

BTAF – file allocation table block 0x00 magic "BTAF" 0x04 size (u32, includes this 8-byte header) 0x08 num files (u32) 0x0C entries numFiles × { start u32, end u32 } (relative to GMIF data start)

BTNF – file name table block 0x00 magic "BTNF" 0x04 size (u32) 0x08 FNT data (minimal single-root entry for anonymous NARCs)

GMIF – file image block 0x00 magic "GMIF" 0x04 size (u32, includes this 8-byte header) 0x08 file data (concatenated)

Functions

Link copied to clipboard

Packs a list of files into an anonymous NARC container. Files are stored in the given order and accessed by index (no name table).

Link copied to clipboard

Packs a named map of files into a NARC container with a full file name table (FNT).

Link copied to clipboard

Extracts all files from a NARC container.

Link copied to clipboard

Unpacks a NARC into a map of path → file data.