Skip to content

Alice Media Binder

RadiantDerg edited this page Jul 11, 2023 · 19 revisions

Extension: .AMB

Binders are usually a hard-coded file archive, meaning the game will ONLY reference the file data inside of these binders by their pre-defined IDs¹ (The ID itself is the order in which the said file appears).

This means that while you can freely edit whatever file they contain, the order of those files or the formats themselves must NOT be changed as this will confuse the game and cause it to crash or hang.

  • For example: You cannot replace a .ZNO(Model) file with a .ZNM(Model animation) file, OR a .ZNO(Original model format) file with an .LNO(Different model format) file.

Binders also support zlib compression. Only certain games feature these and as such, they are the only games that will support them. Once decompressed the AMB can be read normally.. however, while compressed the subheader, index, and data portions of the binder are replaced with a new value specifying the original file size in bytes, followed by the compressed data.

There are also several bytes within the binder that tend to go unused by the actual game. These bytes are actually meant for an internal tool Dimps used to describe the binder files and their contents. The tool would spit out a header file containing all the necessary information, which would then be compiled into the final game's code.

Console versions are big-endian. PC and mobile are little-endian.

¹ - The exception to this is binders which have NOT been defined by the internal tool. They cannot reference the contents directly, so the game will instead rely on the Name Table to find what it's looking for.

General Structure:

Section Description
Header Info about the AMB itself, unanimous among almost all versions of the file, with the exception of Windows Phone AMBs.
Sub Header Contains file count and pointers to the following sections inside the AMB.
File Index A complete list of the files contained within the AMB. Each file has its own sequence of bytes detailing information about the file.
File Data A large chunk of bytes simply filled with every file's data. Sometimes there's padding.
Name Table File names. (Ignored by AMBs that have had their contents hard-coded. Hard-coded binders can omit this table completely for simple masking.)

Templates to quickly view this data in 010 Editor can be found here


Complete Specifications

¹ - Changes to this value will not crash the game

AMB (Base Version)

Header

Hex view:

Offset(h)  0  1  2  3  4  5  6  7   8  9  A  B  C  D  E  F  0123456789ABCDEF
00000000  23 41 4D 42 20 00 00 00  00 00 04 00 00 00 00 00  #AMB ...........
Address Description
0x00 char signature[4] - The file magic, better known as signature
0x04 uint fileVersion - The version of the AMB file
0x08 ushort unknown1 - This always seems to be 0
0x0A ushort unknown2 - This always seems to be 4
0x0C byte endianess - Endianness flag. 0 is little, 1 is big
0x0D byte unknown3 - This always seems to be 0
0x0E byte unknown4 - This always seems to be 0
0x0F byte compressionType - This flag details the compression method

Sub Header

Hex View:

Offset(h)  0  1  2  3  4  5  6  7   8  9  A  B  C  D  E  F  0123456789ABCDEF
00000010  03 00 00 00 20 00 00 00  60 00 00 00 60 2E 10 00  .... ...`...`...
Address Description
0x00 uint fileCount - The number of files contained in the AMB
0x04 uint listPointer - The pointer to the File Index
0x08 uint dataPointer - The pointer to the file data
0x0C uint nameTable¹ - The pointer to the list of names. This CAN be nulled.

File Index

This represents one file in the index. Repeat until the Sub Header's fileCount is met. Any file may be written as null depending on how the AMB is used

Hex View:

Offset(h)  0  1  2  3  4  5  6  7   8  9  A  B  C  D  E  F  0123456789ABCDEF
XXXXXXXX  60 00 00 00 30 8A 08 00  FF FF FF FF 00 00 00 00  `...0Š..ÿÿÿÿ....
Address Description
0x00 uint filePointer - The pointer to the file in the AMB
0x04 uint fileSize - The total length of the file in bytes
0x08 uint unkToolData¹ - Unknown Data (Dimps Internal Tool)
0x0C short USR0¹ - User 1 Data (Dimps Internal Tool)
0x0E short USR1¹ - User 2 Data (Dimps Internal Tool)

Name Table

Each name is a fixed-length string that belongs to a file in the order of appearance (ID). The size of these strings is a maximum of 32 bytes, any unused character bytes are simply written as 0x00. They may also contain internal directory information in the form of slashes.

This table may possibly not exist if the Sub Header's nameTable = 0

Hex View:

Offset(h)  0  1  2  3  4  5  6  7   8  9  A  B  C  D  E  F  0123456789ABCDEF
XXXXXXXX  53 4F 4E 5F 4D 4F 44 45  4C 2E 5A 4E 4F 00 00 00  SON_MODEL.ZNO...
XXXXXXXX  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
XXXXXXXX  53 4F 4E 5F 53 50 49 4E  4D 4F 44 45 4C 2E 5A 4E  SON_SPINMODEL.ZN
XXXXXXXX  4F 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  O...............
XXXXXXXX  53 4F 4E 5F 53 53 50 49  4E 4D 4F 44 45 4C 2E 5A  SON_SSPINMODEL.Z
XXXXXXXX  4E 4F 00 00 00 00 00 00  00 00 00 00 00 00 00 00  NO..............
Address Description
0x00 char fileName[32] - The file's name.
AMB (Revision 1)

Header

Hex view:

Offset(h)  0  1  2  3  4  5  6  7   8  9  A  B  C  D  E  F  0123456789ABCDEF
00000000  23 41 4D 42 28 00 00 00  00 00 04 00 00 00 00 00  #AMB(...........
Address Description
0x00 char signature[4] - The file magic, better known as signature
0x04 uint fileVersion - The version of the AMB file
0x08 ushort unknown1 - This always seems to be 0
0x0A ushort unknown2 - This always seems to be 4
0x0C byte endianess - Endianness flag. 0 is little, 1 is big
0x0D byte unknown3 - This always seems to be 0
0x0E byte unknown4 - This always seems to be 0
0x0F byte compressionType - This flag details the compression method

Sub Header

Hex View:

Offset(h)  0  1  2  3  4  5  6  7   8  9  A  B  C  D  E  F  0123456789ABCDEF
00000010  04 00 00 00 28 00 00 00  00 00 00 00 60 00 00 00  ....(.......`...
00000020  A0 B6 06 00 00 00 00 00                            ¶.......  
Address Description
0x00 uint fileCount - The number of files contained in the AMB
0x04 uint listPointer - The pointer to the File Index
0x08 uint unknown1 - Unknown
0x0C uint dataPointer - The pointer to the file data
0x10 uint nameTable¹ - The pointer to the list of names. This CAN be nulled.
0x14 uint unknown2 - Unknown

File Index

This represents one file in the index. Repeat until the Sub Header's fileCount is met. Any file may be written as null depending on how the AMB is used

Hex View:

Offset(h)  0  1  2  3  4  5  6  7   8  9  A  B  C  D  E  F  0123456789ABCDEF
XXXXXXXX  78 00 00 00 00 00 00 00  E8 16 02 00 FF FF FF FF  x........è..ÿÿÿÿ
XXXXXXXX  00 00 00 00                                       ....
Address Description
0x00 uint filePointer - The pointer to the file in the AMB
0x04 uint unknown1 - Unknown
0x08 uint fileSize - The total length of the file in bytes
0x0C uint unkToolData¹ - Unknown Data (Dimps Internal Tool)
0x10 short USR0¹ - User 1 Data (Dimps Internal Tool)
0x12 short USR1¹ - User 2 Data (Dimps Internal Tool)

Name Table

Each name is a fixed-length string that belongs to a file in the order of appearance (ID). The size of these strings is a maximum of 32 bytes, any unused character bytes are simply written as 0x00. They may also contain internal directory information in the form of slashes.

This table may possibly not exist if the Sub Header's nameTable = 0

Hex View:

Offset(h)  0  1  2  3  4  5  6  7   8  9  A  B  C  D  E  F  0123456789ABCDEF
XXXXXXXX  53 4F 4E 5F 4D 4F 44 45  4C 2E 5A 4E 4F 00 00 00  SON_MODEL.ZNO...
XXXXXXXX  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
XXXXXXXX  53 4F 4E 5F 53 50 49 4E  4D 4F 44 45 4C 2E 5A 4E  SON_SPINMODEL.ZN
XXXXXXXX  4F 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  O...............
XXXXXXXX  53 4F 4E 5F 53 53 50 49  4E 4D 4F 44 45 4C 2E 5A  SON_SSPINMODEL.Z
XXXXXXXX  4E 4F 00 00 00 00 00 00  00 00 00 00 00 00 00 00  NO..............
Address Description
0x00 char fileName[32] - The file's name.
AMB (Revision 2)

Header

Hex view:

Offset(h)  0  1  2  3  4  5  6  7   8  9  A  B  C  D  E  F  0123456789ABCDEF
00000000  23 41 4D 42 30 00 00 00  00 00 04 00 00 00 00 00  #AMB0...........
Address Description
0x00 char signature[4] - The file magic, better known as signature
0x04 uint fileVersion - The version of the AMB file
0x08 ushort unknown1 - This always seems to be 0
0x0A ushort unknown2 - This always seems to be 4
0x0C byte endianess - Endianness flag. 0 is little, 1 is big
0x0D byte unknown3 - This always seems to be 0
0x0E byte unknown4 - This always seems to be 0
0x0F byte compressionType - This flag details the compression method

Sub Header

Hex View:

Offset(h)  0  1  2  3  4  5  6  7   8  9  A  B  C  D  E  F  0123456789ABCDEF
00000010  03 00 00 00 00 00 00 00  30 00 00 00 00 00 00 00  ........0.......
00000020  90 00 00 00 00 00 00 00  30 93 03 00 00 00 00 00  ........0“......
Address Description
0x00 uint64 fileCount - The number of files contained in the AMB
0x04 uint64 listPointer - The pointer to the File Index
0x08 uint64 dataPointer - The pointer to the file data
0x0C uint64 nameTable¹ - The pointer to the list of names. This CAN be nulled.

File Index

This represents one file in the index. Repeat until the Sub Header's fileCount is met. Any file may be written as null depending on how the AMB is used

Hex View:

Offset(h)  0  1  2  3  4  5  6  7   8  9  A  B  C  D  E  F  0123456789ABCDEF
XXXXXXXX  90 00 00 00 00 00 00 00  00 00 00 00 B5 BA 01 00  ............µº..
XXXXXXXX  FF FF FF FF 00 00 00 00                           ÿÿÿÿ....
Address Description
0x00 uint filePointer - The pointer to the file in the AMB
0x04 uint unknown1 - Unknown
0x08 uint unknown2 - Unknown
0x0C uint fileSize - The total length of the file in bytes
0x10 uint unkToolData¹ - Unknown Data (Dimps Internal Tool)
0x14 short USR0¹ - User 1 Data (Dimps Internal Tool)
0x16 short USR1¹ - User 2 Data (Dimps Internal Tool)

Name Table

Each name is a fixed-length string that belongs to a file in the order of appearance (ID). The size of these strings is a maximum of 32 bytes, any unused character bytes are simply written as 0x00. They may also contain internal directory information in the form of slashes.

This table may possibly not exist if the Sub Header's nameTable = 0

Hex View:

Offset(h)  0  1  2  3  4  5  6  7   8  9  A  B  C  D  E  F  0123456789ABCDEF
XXXXXXXX  53 4F 4E 5F 4D 4F 44 45  4C 2E 5A 4E 4F 00 00 00  SON_MODEL.ZNO...
XXXXXXXX  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  ................
XXXXXXXX  53 4F 4E 5F 53 50 49 4E  4D 4F 44 45 4C 2E 5A 4E  SON_SPINMODEL.ZN
XXXXXXXX  4F 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  O...............
XXXXXXXX  53 4F 4E 5F 53 53 50 49  4E 4D 4F 44 45 4C 2E 5A  SON_SSPINMODEL.Z
XXXXXXXX  4E 4F 00 00 00 00 00 00  00 00 00 00 00 00 00 00  NO..............
Address Description
0x00 char fileName[32] - The file's name.

Windows Phone AMB The only outlier of this format (Not supported by DSL)

Clone this wiki locally