Format:RARC archive
| Uses | Library:JSystem |
|---|---|
| Platforms | Platform:Nintendo GameCube, Wii |
| Magic | 52 41 52 43 ("RARC") |
| Extensions | .arc, .rarc, .szs, .carc |
| Endianness | big |
| On this wiki | Facts · Code · Notes · Topics |
Resource archive of Nintendo's JSystem (GameCube and some Wii games; .arc, .rarc, Yaz0-compressed .szs/.carc): a 0x20-byte header ("RARC", sizes, data offset, MEM/ARAM part sizes) and a 0x20-byte info block pointing to directory nodes (0x10 bytes), file entries (0x14 bytes, with a 16-bit name hash and attribute byte) and a string table; all offsets after the header are relative to the info block.
Overview
JSystem's JKRArchive classes mount RARC archives; most first-party GameCube games (Software:The Legend of Zelda: The Wind Waker, Super Mario Sunshine, Pikmin 2, Twilight Princess) keep their stage, object and REL files in them, usually compressed whole with Format:Yaz0. Layout below is from the JSystem headers of zeldaret/tww (JKRArchive.h) and decomp-toolkit (src/util/rarc.rs).
Header (0x20 bytes)
| Offset | Field |
|---|---|
| 0x00 | magic RARC
|
| 0x04 | file length |
| 0x08 | header length (0x20): the info block starts here |
| 0x0C | file data offset, relative to the info block |
| 0x10 | file data length |
| 0x14 | size of the MEM part (data loaded with the archive into main RAM, 32-byte aligned) |
| 0x18 | size of the ARAM part |
| 0x1C | unused |
Info block (0x20 bytes, at 0x20)
u32 directory count, directory table offset, file entry count, file entry table offset, string table length, string table offset (offsets relative to the info block), u16 next free file id, u8 "file ids are indexes" flag, 5 bytes padding.
Directories and files
- Directory node (0x10): 4-character type compared as a u32 by
findResType(ROOTfor the first directory; other directories use the upper-cased first 4 characters of their name (comment in Wiimm's SZS Tools project/src/lib-rarc.h lines 91-92, commit 246fdb38d7; the same file marks the 0x08 word and the entry fields as only partly understood)), name offset,u16name hash,u16entry count,u32index of the first file entry. - File entry (0x14):
u16file id (0xFFFF for directories),u16name hash,u32attribute byte (bits 24-31) + name offset (bits 0-23),u32data offset (relative to the file data start; for directories the directory index, 0xFFFFFFFF for the root's..),u32size, 4 bytes reserved for the run-time data pointer. Every directory lists.and..entries. - Attributes: 0x01 file, 0x02 directory, 0x04 compressed, 0x10 in the MEM part, 0x20 in the ARAM part, 0x40 read from DVD when needed, 0x80 compressed with Yaz0 (else Yay0 when 0x04 is set). Typical files have 0x11, directories 0x02.
- Name hash:
h = h * 3 + tolower(c)over the name, 16 bits (JKRArchive::CArcName::store); lookups compare the hash before the string..= 0x002E,..= 0x00B8.
Tools
- decomp-toolkit
dtk rarc list/extract, and Code:DOL executable/GameCube formats toolkit (Python) (lists and walks paths, decompresses Yaz0 first).
Code & repositories
- https://github.com/encounter/decomp-toolkit @
0645e16511814920ffb05b25615dd71f1af73e4c· license: Apache-2.0
decomp-toolkit (dtk, Rust, MIT OR Apache-2.0): splits GameCube/Wii DOLs and RELs into objects for matching decompilations, reads and writes DOL, REL, RARC, U8, Yaz0/Yay0 and the CodeWarrior .comment section, and generates symbols.txt/splits.txt configurations.
Tested on: Read at commit 0645e16: src/util/dol.rs (DolHeader), src/util/rel.rs (R_DOLPHIN_* types), src/util/rarc.rs, src/util/comment.rs; not built. · checked 2026-10-17; last activity 2026-09-10; Note: the latest release ships binaries; the wiki links only the source, never the binaries - https://github.com/Wiimm/wiimms-szs-tools @
246fdb38d7c2fb3054b8f8528e11dc8f17691750· license: GPL-2.0-or-later (declared by the contributor; GitHub's detector did not recognize a license file)
Mario Kart Wii tool set; project/dclib/lib-bmg.h (BMG), project/src/lib-szs.h and lib-brres.h (BRRES), lib-rarc.h (RARC) document the structures in comments
Tested on: source read, not run: source read as documentation, not run · checked 2026-10-19