1
edit
(Add category.) |
ArchLeaders (talk | contribs) m (Fix Key/String Table structure) |
||
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
Byaml is Nintendo EPD's binary take on Yet Another Markup Language. | Byaml is Nintendo EPD's binary take on Yet Another Markup Language. It is handled by a dedicated library under the namespace "byaml" in later titles. Every version up to version 10 is supported by Nintendo's library as of Super Mario Wonder. Library supports both little and big endian. | ||
=== Header === | === Header === | ||
Line 17: | Line 17: | ||
|0x2 | |0x2 | ||
|u16 | |u16 | ||
|Version ( | |Version (Up to 10 since Super Mario Wonder) | ||
|- | |- | ||
|0x4 | |0x4 | ||
Line 32: | Line 32: | ||
|0x4 | |0x4 | ||
|u32 | |u32 | ||
|Root | |Root data offset (to ByamlContainer) | ||
|} | |} | ||
=== Byaml Container === | === Byaml Container === | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 58: | Line 57: | ||
|NodeDataType specific data | |NodeDataType specific data | ||
|} | |} | ||
As of version 10 the root data of a header can point to a non-container type, in which case the ByamlContainer header will contain only the data type, with the single value stored directly after the ByamlContainer header. | |||
=== Node Data Types === | === Node Data Types === | ||
u8 enum of data types that can appear. "Value" describes what the Value in a NodeDataType + Value pair means. These pairs are found in every container type. | u8 enum of node data types that can appear. "Value" describes what the Value in a NodeDataType + Value pair means. These pairs are found in every container type. | ||
{| class="wikitable" | {| class="wikitable" | ||
|+Version 7 | |+Version 7 | ||
!Name(unofficial) | !Name(unofficial) | ||
!Value | !Enum Value | ||
!Container "Value" Description | !Container "Value" Description | ||
|- | |- | ||
Line 161: | Line 161: | ||
|- | |- | ||
|0x4 | |0x4 | ||
|0x4 * ByamlContainer count | |0x4 * ByamlContainer count + 1 | ||
|u32 | |u32 | ||
|String offset array, offsets relative | |String offset array, offsets relative to string table header (the extra offset is to the end of the last key/string) | ||
|- | |- | ||
| | | | ||
Line 171: | Line 171: | ||
|} | |} | ||
==== Relocated Key/String Table ( | ==== Relocated Key/String Table (0xc5) ==== | ||
{| class="wikitable" | {| class="wikitable" | ||
|+Version 7 | |+Version 7 | ||
Line 184: | Line 184: | ||
| | | | ||
|- | |- | ||
| | |0x4 | ||
| | |0x4 * ByamlContainer count | ||
| | |u32 | ||
| | |String offset array, except the first element, which is an offset to a u64 value to be added to the other string offsets | ||
|} | |} | ||
=== Hash Array (0x20-0x2f) === | === Hash Array (0x20-0x2f) === | ||
Recent container types first | Recent container types first noticed (to writer's knowledge) in the byaml library of the 3d All Stars menu. NodeDataType + Value pairs can be accessed through hash values and indices. | ||
==== Hash Pair ==== | ==== Hash Pair ==== | ||
Line 212: | Line 202: | ||
|- | |- | ||
|0x0 | |0x0 | ||
|(NodeDataType & 0xf) * 0x4 | |(container NodeDataType & 0xf) * 0x4 | ||
|u32[N] | |u32[N] | ||
|Hash | |Hash | ||
Line 270: | Line 260: | ||
|- | |- | ||
| | | | ||
| | |(if count < 0x100) 0x1 * ByamlContainer count | ||
(if count < 0x10000) 0x2 * ByamlContainer count | |||
(else) 0x4 * ByamlContainer count | |||
|u8, u16, u32 | |u8, u16, u32 | ||
|Index remap table | |Index remap table | ||
Line 318: | Line 309: | ||
|- | |- | ||
|0x4 | |0x4 | ||
|0x1 | |0x1 (aligned up by 0x4) | ||
|u8 | |u8 | ||
|NodeDataType for every array value | |NodeDataType for every array value | ||
Line 393: | Line 384: | ||
|- | |- | ||
| | | | ||
| | |(if count < 0x100) 0x1 * ByamlContainer count | ||
(if count < 0x10000) 0x2 * ByamlContainer count | |||
(else) 0x4 * ByamlContainer count | |||
|u8, u16, u32 | |u8, u16, u32 | ||
|Index remap table | |Index remap table | ||
|} | |} | ||
[[Category:File formats]] | [[Category:File formats]] |
edit