<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.wexosmk.xyz/index.php?action=history&amp;feed=atom&amp;title=NARC_%28File_Format%29</id>
	<title>NARC (File Format) - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.wexosmk.xyz/index.php?action=history&amp;feed=atom&amp;title=NARC_%28File_Format%29"/>
	<link rel="alternate" type="text/html" href="https://wiki.wexosmk.xyz/index.php?title=NARC_(File_Format)&amp;action=history"/>
	<updated>2026-04-07T18:46:10Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://wiki.wexosmk.xyz/index.php?title=NARC_(File_Format)&amp;diff=271&amp;oldid=prev</id>
		<title>Wexos: Imported from avsys wiki</title>
		<link rel="alternate" type="text/html" href="https://wiki.wexosmk.xyz/index.php?title=NARC_(File_Format)&amp;diff=271&amp;oldid=prev"/>
		<updated>2024-05-01T17:52:25Z</updated>

		<summary type="html">&lt;p&gt;Imported from avsys wiki&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;NARC&amp;#039;&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;N&amp;#039;&amp;#039;&amp;#039;itro &amp;#039;&amp;#039;&amp;#039;ARC&amp;#039;&amp;#039;&amp;#039;hive) is an archive format used in [[Nintendo DS]] games such as [[Mario Kart DS]], as well as some [[Nintendo 3DS]] and [[Wii U]] games.&lt;br /&gt;
&lt;br /&gt;
= File Format=&lt;br /&gt;
== Header ==&lt;br /&gt;
The file starts with the following header:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Char[4] || &amp;#039;&amp;#039;&amp;#039;File magic&amp;#039;&amp;#039;&amp;#039;. Always &amp;#039;&amp;#039;NARC&amp;#039;&amp;#039; in ASCII.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UInt16 || {{Unknown-left|Looks like a &amp;#039;&amp;#039;&amp;#039;byte-order-mark&amp;#039;&amp;#039;&amp;#039;, however, in [[Mario Kart DS]] this value indicates big endian while the file is in little endian.}}&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || UInt16 || Probably a &amp;#039;&amp;#039;&amp;#039;version number&amp;#039;&amp;#039;&amp;#039;. Always 0x100 in [[Mario Kart DS]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || UInt32 || &amp;#039;&amp;#039;&amp;#039;File size&amp;#039;&amp;#039;&amp;#039; of the whole file in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0C || UInt16 || &amp;#039;&amp;#039;&amp;#039;Header size&amp;#039;&amp;#039;&amp;#039; in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 0x0E || UInt16 || &amp;#039;&amp;#039;&amp;#039;Number of sections&amp;#039;&amp;#039;&amp;#039; in the file.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== BTAF ==&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;BTAF&amp;#039;&amp;#039;&amp;#039; section contains allocated file data. This file data is then linked by [[#BTNF|BTNF]].&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Char[4] || &amp;#039;&amp;#039;&amp;#039;Section magic&amp;#039;&amp;#039;&amp;#039;. Always &amp;#039;&amp;#039;BTAF&amp;#039;&amp;#039; in ASCII.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Section size&amp;#039;&amp;#039;&amp;#039; in bytes.&lt;br /&gt;
|-&lt;br /&gt;
| 0x08 || Int32 || &amp;#039;&amp;#039;&amp;#039;Number of files&amp;#039;&amp;#039;&amp;#039;. The [[#File Entry|file entries]] follow after this field.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== File Entry ===&lt;br /&gt;
Each file entry points to the file data. The entry has the following structure:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt32 || &amp;#039;&amp;#039;&amp;#039;File data start offset&amp;#039;&amp;#039;&amp;#039;. Points to the start of the file data, relative to the end of the [[#GMIF|GMIF]] header.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UInt32 || &amp;#039;&amp;#039;&amp;#039;File data end offset&amp;#039;&amp;#039;&amp;#039;. Points to the end of the file data, relative to the end of the [[#GMIF|GMIF]] header.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== BTNF ==&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;BTNF&amp;#039;&amp;#039;&amp;#039; stores the structure of the archive. It contains the folders and files. This section will not always be align by 4, and therefore [[Nintendo]] pads this section at the end with 0xFF if needed, to align for the next section. It starts with the following header:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Char[4] || &amp;#039;&amp;#039;&amp;#039;Section magic&amp;#039;&amp;#039;&amp;#039;. Always &amp;#039;&amp;#039;BTNF&amp;#039;&amp;#039; in ASCII.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Section size&amp;#039;&amp;#039;&amp;#039; in bytes.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Directory ===&lt;br /&gt;
After the header comes the directories. The amount are not stored in the [[#BTNF|BTNF]] header, however, the parent directory index of the first entry stores the total amount of directories, meaning there will always be at least one directory. Each directory has the following structure:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Directory [[#Child Nodes|child nodes]] offset&amp;#039;&amp;#039;&amp;#039;. It points to the structure where the subfiles and subfolders are stored. Relative to the end of the [[#BTNF|BTNF]] header.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UInt16 || &amp;#039;&amp;#039;&amp;#039;First file index&amp;#039;&amp;#039;&amp;#039;. The index of the first [[#File Entry|file entry]] in [[#BTAF|BTAF]].&lt;br /&gt;
|-&lt;br /&gt;
| 0x06 || UInt16 || &amp;#039;&amp;#039;&amp;#039;Index of the parent directory&amp;#039;&amp;#039;&amp;#039;. The index starts at 0xF000, meaning 0xF005 would be directory 5. For the root node, the total number of directories are stored.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Child Nodes ====&lt;br /&gt;
Each [[#Directory|directory]] points to the child nodes. The directory points to the following structure:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Byte || &amp;#039;&amp;#039;&amp;#039;Flag&amp;#039;&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;F&amp;#039;&amp;#039;&amp;#039;).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This flag is used to figure what data follows. If &amp;#039;&amp;#039;&amp;#039;F&amp;#039;&amp;#039;&amp;#039; is 0, that means end of directory, and no more data follows. If &amp;#039;&amp;#039;&amp;#039;F&amp;#039;&amp;#039;&amp;#039; is not 0, then the highest bit &amp;#039;&amp;#039;&amp;#039;A&amp;#039;&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;Axxx xxxx&amp;#039;&amp;#039;&amp;#039;) in &amp;#039;&amp;#039;&amp;#039;F&amp;#039;&amp;#039;&amp;#039; specifies what data follows.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;A&amp;#039;&amp;#039;&amp;#039; is 0, then a file entry follows. It has the following structure:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || &amp;#039;&amp;#039;&amp;#039;Name of the file&amp;#039;&amp;#039;&amp;#039;. The length of this string is &amp;#039;&amp;#039;&amp;#039;F&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;&amp;#039;A&amp;#039;&amp;#039;&amp;#039; is not 0, then a directory entry follows. It has the following structure:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || String || &amp;#039;&amp;#039;&amp;#039;Name of the directory&amp;#039;&amp;#039;&amp;#039;. The length of this string is &amp;#039;&amp;#039;&amp;#039;F&amp;#039;&amp;#039;&amp;#039; &amp;amp; 0x7F (since the highest bit is always set to 1).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;F&amp;#039;&amp;#039;&amp;#039; &amp;amp; 0x7F || UInt16 || &amp;#039;&amp;#039;&amp;#039;[[#Directory|Child directory]] index&amp;#039;&amp;#039;&amp;#039;. This directory is a child of the current directory. The index starts at 0xF000, meaning 0xF005 would be directory 5. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== GMIF ==&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;GMIF&amp;#039;&amp;#039;&amp;#039; section stores all file data. The file data is linked by the [[#File Entry|file entries]] in [[#BTAF|BTAF]]. This section has the following structure:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Offset !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0x00 || Char[4] || &amp;#039;&amp;#039;&amp;#039;Section magic&amp;#039;&amp;#039;&amp;#039;. Always &amp;#039;&amp;#039;GMIF&amp;#039;&amp;#039; in ASCII.&lt;br /&gt;
|-&lt;br /&gt;
| 0x04 || UInt32 || &amp;#039;&amp;#039;&amp;#039;Section size&amp;#039;&amp;#039;&amp;#039; in bytes (&amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039;).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
After the header, the file data is located, with a size of &amp;#039;&amp;#039;&amp;#039;S&amp;#039;&amp;#039;&amp;#039; - 8. The [[#File Entry|file entries]] points to this data. All file data start addresses are aligned by 4, and 0xFF is used as padding byte.&lt;br /&gt;
&lt;br /&gt;
= Tools =&lt;br /&gt;
The following tools can handle NARC files:&lt;br /&gt;
* Every File Explorer, by Gericom&lt;br /&gt;
&lt;br /&gt;
[[Category:3DS File Formats]]&lt;br /&gt;
[[Category:DS File Formats]]&lt;br /&gt;
[[Category:Wii U File Formats]]&lt;/div&gt;</summary>
		<author><name>Wexos</name></author>
	</entry>
</feed>