Example file: /bg/grd_anm.arc from "Animal Crossing: Wild World".
| Field | Start | End | Size | Example | Description |
|---|---|---|---|---|---|
| Magic stamp | 0x00000000 | 0x00000003 | 4 bytes | "NARC" | Magic stamp. "Nintendo ARChive" |
| Unknown constant | 0x00000004 | 0x00000007 | 4 bytes | 0x0100FFFE | This always appears with this value |
| Section size | 0x00000008 | 0x0000000B | 4 bytes | 0x00002FA0 | Size of this section always matches with file size (includes header) |
| Header size | 0x0000000C | 0x0000000D | 2 bytes | 0x0010 | This is going to be always 0x0010, because size of the header is always the same |
| Number of sections | 0x0000000E | 0x0000000F | 2 bytes | 0x0003 | Number of sections included inside "NARC" section |
| Field | Start | End | Size | Example | Description |
|---|---|---|---|---|---|
| Magic stamp | 0x00000000 | 0x00000003 | 4 bytes | "BTAF" | Magic stamp. "File Allocation Table B?" reversed |
| Section size | 0x00000004 | 0x00000007 | 4 bytes | 0x0000003C | Section size, including header |
| Number of files | 0x00000008 | 0x0000000B | 4 bytes | 0x00000006 | Number of files in the archive |
| Start file offset | 0x0000000C | 0x0000000F | 4 bytes | 0x00000000 | Starting offset RELATIVE to starting data offset in GMIF section |
| End file offset | 0x00000010 | 0x00000013 | 4 bytes | 0x0000022C | Ending offset RELATIVE to starting data offset in GMIF section |
| Two previous offsets repeats 'Number of files' times, so we get starting and end offset for each file in the archive | |||||
| Field | Start | End | Size | Example | Description |
|---|---|---|---|---|---|
| Magic stamp | 0x00000000 | 0x00000003 | 4 bytes | "BTNF" | Magic stamp. "File Name Table B?" reversed |
| Section size | 0x00000004 | 0x00000007 | 4 bytes | 0x0000006C | Section size, including header |
| Here starts directory info contents. Each piece of info is 8 bytes wide, and there are one for every directory in the file. We can know beforehand how much of them we have just looking at first offset. | |||||
| Start directory contents offset | 0x00000008 | 0x0000000B | 4 bytes | 0x00000010 | Starting offset RELATIVE to this first offset. If you follow this offset, you'll find directories and filenames that come inside this one. This first offset also matches with size of directories info |
| Position of first file in FAT | 0x0000000C | 0x0000000D | 2 bytes | 0x0000 | This number, multiplied by 4 bytes each offset multiplied by 2 offsets ('Start File Offset' and 'End Offset'), gives the offset to the first entry in the FAT table for first file in this directory |
| Number of directories / Parent directory | 0x0000000E | 0x0000000F | 2 bytes | 0x0002 | If this is the first directory entry (root directory), this keeps the number of directories in archive. If's not, this number ANDed with 0x0FFF gives the parent directory number |
| This 8 bytes repeats for each directory, but we're going to put the next entry just to see differences between root directory and normal ones. | |||||
| Start directory contents offset | 0x00000010 | 0x00000013 | 4 bytes | 0x00000015 | Starting offset RELATIVE to the first offset. |
| Position of first file in FAT | 0x00000014 | 0x00000015 | 2 bytes | 0x0000 | Same example data as previous, because in this example, root directory contents only directories, and FAT offsets are only needed for files |
| Number of directories / Parent directory | 0x00000016 | 0x00000017 | 2 bytes | 0xF000 | In this case, parent directory is 0 (0xF000 & 0x0FFF = 0x0000) |
| This is the end of directory info contents. Now comes names of directories and files. | |||||
| Size of name | 0x00000018 | 0x00000019 | 1 byte | 0x00000081 | This size also gives type information. If first bit is set (just like in this case), the following name is a directory one, a filename otherwise. So, length in this example is 0x81 & 0x7F = 0x01 |
| Name string | 0x0000001A | 0x0000001B | 'Size of name' bytes | "a" | String containing the name |
| After a filename, comes another one in this fashion (size plus name) until you find a zero 'Size of name'. But when you find a directory, one more field comes into account. | |||||
| Directory number | 0x0000001C | 0x0000001D | 2 bytes | 0xF001 | Number of named directory. Just AND it with 0x0FFF. So, in this example, 0xF001 & 0x0FFF = 0x0001 |
| Field | Start | End | Size | Example | Description |
|---|---|---|---|---|---|
| Magic stamp | 0x00000000 | 0x00000003 | 4 bytes | "GMIF" | Magic stamp. Like others, it's likely to be reversed, but don't imagine what this stands for. |
| Section size | 0x00000004 | 0x00000007 | 4 bytes | 0x00002EE8 | Section size, including header |
| After that, you'll find files data. | |||||
| < Prev |
|---|









