BNTX: Difference between revisions
Jump to navigation
Jump to search
Arch Leaders (talk | contribs) (Create BNTX page and document header offsets. (Credit to KillzXGaming and Syroot for the values)) |
Arch Leaders (talk | contribs) (Fix formatting errors) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
==Header== | ==Header== | ||
Line 20: | Line 12: | ||
|4 | |4 | ||
|Bytes | |Bytes | ||
|BNTX File Signature ( | |BNTX File Signature (Magic). Binary BNTX (<code>42 4E 54 58<code/>). | ||
|- | |- | ||
|<code>0x04</code> | |<code>0x04</code> | ||
|4 | |4 | ||
| | |Bytes | ||
|4 bytes of padding | |4 bytes of padding. | ||
|- | |- | ||
|<code>0x08</code> | |<code>0x08</code> | ||
Line 40: | Line 32: | ||
|1 | |1 | ||
|Byte | |Byte | ||
|Alignment | |Alignment. | ||
|- | |- | ||
|<code>0x0F</code> | |<code>0x0F</code> | ||
|1 | |1 | ||
|Byte | |Byte | ||
|Target Address Size | |Target Address Size. | ||
|- | |- | ||
|<code>0x10</code> | |<code>0x10</code> | ||
|4 | |4 | ||
|UInt32 | |UInt32 | ||
|File Name Offset | |File Name Offset. | ||
|- | |- | ||
|<code>0x14</code> | |<code>0x14</code> | ||
|2 | |2 | ||
|UInt16 | |UInt16 | ||
|Flag | |Flag. | ||
|- | |- | ||
|<code>0x16</code> | |<code>0x16</code> | ||
|2 | |2 | ||
|UInt16 | |UInt16 | ||
| | |String Pool Offset. | ||
|- | |- | ||
|<code>0x18</code> | |<code>0x18</code> | ||
|4 | |4 | ||
|UInt32 | |UInt32 | ||
|Relocation Table Offset | |Relocation Table Offset. | ||
|- | |- | ||
|<code>0x1C</code> | |<code>0x1C</code> | ||
|4 | |4 | ||
|UInt32 | |UInt32 | ||
|File Size | |File Size. | ||
|- | |- | ||
|<code>0x20</code> | |<code>0x20</code> | ||
Line 80: | Line 72: | ||
|4 | |4 | ||
|Int32 | |Int32 | ||
|Texture Count | |Texture Count. | ||
|- | |- | ||
|<code>0x28</code> | |<code>0x28</code> | ||
|8 | |8 | ||
|Int64 | |Int64 | ||
|Texture Array Offset | |Texture Array Offset. | ||
|- | |||
|<code>0x30</code> | |||
|8 | |||
|Int64 | |||
|Texture Data Length. | |||
|- | |||
|<code>0x38</code> | |||
|8 | |||
|Int64 | |||
|String Dictionary Offset. | |||
|- | |||
|} | |||
==String Pool (_STR)== | |||
{| class=wikitable | |||
|+ | |||
String Pool Specification | |||
!Offset | |||
!Size | |||
!Data Type | |||
!Description | |||
|- | |||
|<code>0x00</code> | |||
|4 | |||
|Bytes | |||
|_STR File Signature (Magic); Binary _STR (<code>5F 53 54 52<code/>) | |||
|- | |||
|<code>0x04</code> | |||
|4 | |||
|UInt32 | |||
|End of String Pool. (?) | |||
|- | |||
|<code>0x08</code> | |||
|8 | |||
|Int64 | |||
|End of String Pool. (?) | |||
|- | |||
|<code>0x10</code> | |||
|4 | |||
|UInt32 | |||
|String Pool Entry Count. | |||
|- | |||
|} | |||
===String Pool Entry=== | |||
{| class=wikitable | |||
|+ | |||
String Pool Specification | |||
!Offset | |||
!Size | |||
!Data Type | |||
!Description | |||
|- | |||
|<code>0x00</code> | |||
|2 | |||
|UShort | |||
|String size. | |||
|- | |||
|<code>0x02</code> | |||
|size* | |||
|String | |||
|String pool entry text. | |||
|- | |||
|<code>0x*</code> | |||
|1 or 2 | |||
|Byte | |||
|End of string padding where the length is 1 if the <code>String size<code/> is an odd number, otherwise 2. | |||
|- | |||
|} | |||
==String Dictionary (_DIC)== | |||
{| class=wikitable | |||
|+ | |||
String Dictionary Specification | |||
!Offset | |||
!Size | |||
!Data Type | |||
!Description | |||
|- | |||
|<code>0x00</code> | |||
|4 | |||
|Bytes | |||
|_DIC File Signature (Magic); Binary _DIC (<code>5F 44 49 43<code/>) | |||
|- | |||
|<code>0x04</code> | |||
|4 | |||
|Int32 | |||
|String Dictionary entry count. | |||
|- | |||
|<code>0x08</code> | |||
|8 | |||
|Bytes | |||
|Padding/unknown data. | |||
|- | |||
|} | |||
===String Dictionary Entry=== | |||
{| class=wikitable | |||
|+ | |||
String Dictionary Entry Specification | |||
!Offset | |||
!Size | |||
!Data Type | |||
!Description | |||
|- | |||
|<code>0x00</code> | |||
|4 | |||
|UInt32 | |||
|Reference. | |||
|- | |||
|<code>0x04</code> | |||
|2 | |||
|UInt16 | |||
|Left Index. | |||
|- | |||
|<code>0x06</code> | |||
|2 | |||
|UInt16 | |||
|Right Index. | |||
|- | |||
|<code>0x08</code> | |||
|8 | |||
|UInt64 | |||
|String Pool offset. | |||
|- | |||
|} | |||
==Binary Texture Info (BNTI)== | |||
====(Work in progress)==== | |||
==Relocation Table (_RLT)== | |||
{| class=wikitable | |||
|+ | |||
Relocation Table Specification | |||
!Offset | |||
!Size | |||
!Data Type | |||
!Description | |||
|- | |||
|<code>0x00</code> | |||
|4 | |||
|Bytes | |||
|_RLT File Signature (Magic); Binary _RLT (<code>5F 52 4C 54<code/>) | |||
|- | |||
|<code>0x04</code> | |||
|4 | |||
|UInt32 | |||
|Position. | |||
|- | |||
|<code>0x08</code> | |||
|4 | |||
|UInt32 | |||
|Always 2. | |||
|- | |||
|<code>0x0C</code> | |||
|14 | |||
|Bytes | |||
|Padding. (?) | |||
|- | |- | ||
|} | |} |
Latest revision as of 09:38, 2 September 2022
Header
Offset | Size | Data Type | Description |
---|---|---|---|
0x00
|
4 | Bytes | BNTX File Signature (Magic). Binary BNTX (42 4E 54 58 |
0x04
|
4 | Bytes | 4 bytes of padding. |
0x08
|
4 | Bytes | 4 byte version where each byte is a version increment. (00 40 00 FF |
0x0C
|
2 | Bytes | Endianess. FFFE (LE) : FEFF (BE) |
0x0E
|
1 | Byte | Alignment. |
0x0F
|
1 | Byte | Target Address Size. |
0x10
|
4 | UInt32 | File Name Offset. |
0x14
|
2 | UInt16 | Flag. |
0x16
|
2 | UInt16 | String Pool Offset. |
0x18
|
4 | UInt32 | Relocation Table Offset. |
0x1C
|
4 | UInt32 | File Size. |
0x20
|
4 | Bytes | Target platform. (NX ) |
0x24
|
4 | Int32 | Texture Count. |
0x28
|
8 | Int64 | Texture Array Offset. |
0x30
|
8 | Int64 | Texture Data Length. |
0x38
|
8 | Int64 | String Dictionary Offset. |
String Pool (_STR)
Offset | Size | Data Type | Description |
---|---|---|---|
0x00
|
4 | Bytes | _STR File Signature (Magic); Binary _STR (5F 53 54 52 |
0x04
|
4 | UInt32 | End of String Pool. (?) |
0x08
|
8 | Int64 | End of String Pool. (?) |
0x10
|
4 | UInt32 | String Pool Entry Count. |
String Pool Entry
Offset | Size | Data Type | Description |
---|---|---|---|
0x00
|
2 | UShort | String size. |
0x02
|
size* | String | String pool entry text. |
0x*
|
1 or 2 | Byte | End of string padding where the length is 1 if the String size |
String Dictionary (_DIC)
Offset | Size | Data Type | Description |
---|---|---|---|
0x00
|
4 | Bytes | _DIC File Signature (Magic); Binary _DIC (5F 44 49 43 |
0x04
|
4 | Int32 | String Dictionary entry count. |
0x08
|
8 | Bytes | Padding/unknown data. |
String Dictionary Entry
Offset | Size | Data Type | Description |
---|---|---|---|
0x00
|
4 | UInt32 | Reference. |
0x04
|
2 | UInt16 | Left Index. |
0x06
|
2 | UInt16 | Right Index. |
0x08
|
8 | UInt64 | String Pool offset. |
Binary Texture Info (BNTI)
(Work in progress)
Relocation Table (_RLT)
Offset | Size | Data Type | Description |
---|---|---|---|
0x00
|
4 | Bytes | _RLT File Signature (Magic); Binary _RLT (5F 52 4C 54 |
0x04
|
4 | UInt32 | Position. |
0x08
|
4 | UInt32 | Always 2. |
0x0C
|
14 | Bytes | Padding. (?) |