AAR (File Format): Difference between revisions
m (→File Entry) |
|||
| (2 intermediate revisions by the same user not shown) | |||
| Line 13: | Line 13: | ||
| 0x00 || Char[4] || '''File magic'''. Always ''ALAR'' in ASCII. | | 0x00 || Char[4] || '''File magic'''. Always ''ALAR'' in ASCII. | ||
|- | |- | ||
| 0x04 || Byte || ''' | | 0x04 || Byte || '''Format type'''. | ||
|- | |- | ||
| 0x05 || Byte || {{Unknown-left|'''Unknown'''.}} | | 0x05 || Byte || {{Unknown-left|'''Unknown'''.}} | ||
|- | |- | ||
| 0x06 || UInt16 || '''Number of [[#File Entry|file entries]]'''. | | 0x06 || UInt16 || '''Number of [[#File Entry|file entries]]''' ('''N'''). | ||
|- | |- bgcolor="#AAFFAA" | ||
| colspan="3" align="center" | '''If [[#Header|format]] = 2''' | |||
|- bgcolor="#DDFFDD" | |||
| 0x08 || Byte || '''Padding'''. | | 0x08 || Byte || '''Padding'''. | ||
|- | |- bgcolor="#DDFFDD" | ||
| 0x09 || UInt24 || '''First asset link identifier'''. | | 0x09 || UInt24 || '''First asset link identifier'''. | ||
|- | |- bgcolor="#DDFFDD" | ||
| 0x0C || Byte || '''Padding'''. | | 0x0C || Byte || '''Padding'''. | ||
|- | |- bgcolor="#DDFFDD" | ||
| 0x0D || UInt24 || '''Last asset link identifier'''. | | 0x0D || UInt24 || '''Last asset link identifier'''. | ||
|- bgcolor="#DDFFDD" | |||
| 0x10 || File Entry['''N'''] || '''File entries'''. | |||
|- bgcolor="#FFAAAA" | |||
| colspan="3" align="center" | '''Else if [[#Header|format]] = 3''' | |||
|- bgcolor="#FFDDDD" | |||
| 0x08 || Byte[4] || {{Unknown-left|'''Unknown'''. Always 0?}} | |||
|- bgcolor="#FFDDDD" | |||
| 0x0C || Byte || '''Padding'''. | |||
|- bgcolor="#FFDDDD" | |||
| 0x0D || UInt24 || '''First asset link identifier'''. | |||
|- bgcolor="#FFDDDD" | |||
| 0x10 || UInt16 || '''Data section offset'''. | |||
|- bgcolor="#FFDDDD" | |||
| 0x12 || UInt16['''N'''] || '''File entries offsets'''. | |||
|} | |} | ||
| Line 38: | Line 54: | ||
* 0x40 = Texture ([[ATX]], [[TPL]]) | * 0x40 = Texture ([[ATX]], [[TPL]]) | ||
* 0x41 = Motion ([[AMT]]) | * 0x41 = Motion ([[AMT]]) | ||
* 0x42 = Image ([[AIG]], | * 0x42 = Image ([[AIG]], TGA) | ||
* 0x43 = Assemble/resource ([[AOD]]) | * 0x43 = Assemble/resource ([[AOD]]) | ||
* 0x44 = Mesh ([[AMS]]) | * 0x44 = Mesh ([[AMS]]) | ||
| Line 57: | Line 73: | ||
| 0x04 || UInt32 || '''File data offset'''. | | 0x04 || UInt32 || '''File data offset'''. | ||
|- | |- | ||
| 0x08 || UInt32 || '''File size''' in bytes. | | 0x08 || UInt32 || '''File size''' in bytes ('''S'''). | ||
|- | |- | ||
| 0x0C || Byte[4] || {{Unknown-left|'''Unknown flags'''. Always 0x80000001.}} | | 0x0C || Byte[4] || {{Unknown-left|'''Unknown flags'''. Always 0x80000001.}} | ||
|- bgcolor="#AAFFAA" | |||
| colspan="3" align="center" | '''If [[#Header|format]] = 3''' | |||
|- bgcolor="#DDFFDD" | |||
| 0x10 || UInt16 || {{Unknown-left|'''Unknown'''.}} | |||
|- bgcolor="#DDFFDD" | |||
| 0x12 || StringNT || '''File name'''. | |||
|} | |} | ||
== File Data == | == File Data == | ||
{| class="wikitable" | |||
! Offset !! Type !! Description | |||
|- bgcolor="#AAFFAA" | |||
| colspan="3" align="center" | '''If [[#Header|format]] = 2''' | |||
|- bgcolor="#DDFFDD" | |||
| -0x24 || UInt16 || {{Unknown-left|'''Unknown'''.}} | |||
|- bgcolor="#DDFFDD" | |||
| -0x22 || StringNT || '''File name'''. | |||
|- bgcolor="#DDFFDD" | |||
| -0x02 || UInt16 || {{Unknown-left|'''Unknown'''.}} | |||
|- | |- | ||
| | | 0x00 || Byte['''S'''] || '''File data'''. | ||
| | |||
|} | |} | ||
Latest revision as of 18:44, 23 June 2025
AAR (Aqualead ARchive) is an archive format developed by Aqualead and found in some Wii and 3DS games (and suspected to be used in GameCube titles as well), such as One Piece: Unlimited Adventure, One Piece: Unlimited Cruise Episode 1 - The Treasure Beneath The Waves, One Piece: Unlimited Cruise Episode 2: Awakening of a Hero, One Piece: Unlimited Cruise SP and One Piece: Unlimited Cruise SP 2.
File Format
The file byte order can be either big endian (Wii) or little endian (3DS). AAR's internal files may link between themselves by using unique asset link identifiers. These identifiers may only be reused between files of different formats.
Header
The file starts with the following header:
| Offset | Type | Description |
|---|---|---|
| 0x00 | Char[4] | File magic. Always ALAR in ASCII. |
| 0x04 | Byte | Format type. |
| 0x05 | Byte | Unknown. |
| 0x06 | UInt16 | Number of file entries (N). |
| If format = 2 | ||
| 0x08 | Byte | Padding. |
| 0x09 | UInt24 | First asset link identifier. |
| 0x0C | Byte | Padding. |
| 0x0D | UInt24 | Last asset link identifier. |
| 0x10 | File Entry[N] | File entries. |
| Else if format = 3 | ||
| 0x08 | Byte[4] | Unknown. Always 0? |
| 0x0C | Byte | Padding. |
| 0x0D | UInt24 | First asset link identifier. |
| 0x10 | UInt16 | Data section offset. |
| 0x12 | UInt16[N] | File entries offsets. |
File Entry
Each file entry has the following structure:
| Offset | Type | Description |
|---|---|---|
| 0x00 | Byte | File type:
|
| 0x01 | UInt24 | Asset link identifier. |
| 0x04 | UInt32 | File data offset. |
| 0x08 | UInt32 | File size in bytes (S). |
| 0x0C | Byte[4] | Unknown flags. Always 0x80000001. |
| If format = 3 | ||
| 0x10 | UInt16 | Unknown. |
| 0x12 | StringNT | File name. |
File Data
| Offset | Type | Description |
|---|---|---|
| If format = 2 | ||
| -0x24 | UInt16 | Unknown. |
| -0x22 | StringNT | File name. |
| -0x02 | UInt16 | Unknown. |
| 0x00 | Byte[S] | File data. |
Tools
The following tools can handle AAR files:
- (none)