<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.vg-resource.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Cruiseliu</id>
	<title>The VG Resource Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.vg-resource.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Cruiseliu"/>
	<link rel="alternate" type="text/html" href="https://wiki.vg-resource.com/Special:Contributions/Cruiseliu"/>
	<updated>2026-10-10T03:30:08Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.1</generator>
	<entry>
		<id>https://wiki.vg-resource.com/index.php?title=Nitro_Files&amp;diff=3365</id>
		<title>Nitro Files</title>
		<link rel="alternate" type="text/html" href="https://wiki.vg-resource.com/index.php?title=Nitro_Files&amp;diff=3365"/>
		<updated>2024-09-21T22:17:56Z</updated>

		<summary type="html">&lt;p&gt;Cruiseliu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;Nitro Studio Files Specification&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Current status&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;i&amp;gt;This specification is far from complete, and it may contain errors, since it is the result of reverse-engineering.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;11 August 2007 - First published by kiwi.ds@gmail.com&amp;lt;/li&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;16 April 2019 - Published on the apicula github wiki&amp;lt;/li&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;19 April 2019 - Added information from LowLines&amp;#039; ConsoleTool doc&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table width=100% bgcolor=#d0d0d0&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;0. Introduction&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Most 3D models found in Nintendo DS games use the following set of Nitro files:&lt;br /&gt;
* `NSBMD` (Nitro Model), which stores polygon models.&lt;br /&gt;
* `NSBTX` (Nitro Texture), which stores texture image and palette data.&lt;br /&gt;
* `NSBCA` (Nitro Character Animation), which stores skeletal animation data.&lt;br /&gt;
* `NSBTP` (Nitro Texture Pattern anim), which stores texture-swap animations.&lt;br /&gt;
* `NSBTA` (Nitro Texture Animation), which stores UV-change animations.&lt;br /&gt;
* `NSBMA` (Nitro Material Animation), which stores material-swap animations.&lt;br /&gt;
* `NSBVA` (Unknown)&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== 0.1 Terminology ===&lt;br /&gt;
&lt;br /&gt;
File format is explained in C-style struct declaration.&lt;br /&gt;
The following types of variables are used:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
s8	1 byte	// signed char&lt;br /&gt;
s16	2 bytes	// signed short&lt;br /&gt;
s32	4 bytes	// signed long&lt;br /&gt;
u8 	1 byte	// unsigned char&lt;br /&gt;
u16	2 bytes	// unsigned short&lt;br /&gt;
u32	4 bytes	// unsigned long&lt;br /&gt;
text    n bytes // ASCII char string&lt;br /&gt;
&lt;br /&gt;
;// The general format for every data field outlined here is:&lt;br /&gt;
--------  -----  ----- ;// ----------------------------------&lt;br /&gt;
Offset  Size  Type ;// Description&lt;br /&gt;
--------  -----  ----- ;// ----------------------------------&lt;br /&gt;
0x00    4     u32  ;// Example&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== 0.2 Nitro Standard File Header ===&lt;br /&gt;
&lt;br /&gt;
Many files (besides sound-related) found in DS ROMs share this header structure:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
** This is the standard DS Nitro header format: any nitro file starts with this.&lt;br /&gt;
*/&lt;br /&gt;
typedef struct Nitro_Header&lt;br /&gt;
{&lt;br /&gt;
    0x00    4   text;// File identifier: can be &amp;#039;SDAT&amp;#039;, &amp;#039;BMD0&amp;#039;, &amp;#039;BTX0&amp;#039;, &amp;#039;BCA0&amp;#039;, etc...&lt;br /&gt;
    0x04    4   u32 ;// Magic stamp: is either 0x0001FEFF or 0x0002FEFF&lt;br /&gt;
    0x08    4   u32 ;// Size of this file (including this struct)&lt;br /&gt;
    0x0C    2   u16 ;// Size of this structure (always 16)&lt;br /&gt;
&lt;br /&gt;
    0x0E    2   u16 ;// Amount of Blocks&lt;br /&gt;
    ---- Offsets (repeats * Amount of Blocks)&lt;br /&gt;
        0x00    4   u32 ;// Block offset #1&lt;br /&gt;
        0x04    4   u32 ;// Block offset #2&lt;br /&gt;
        etc&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== 0.3 General Data Sub-header ===&lt;br /&gt;
&lt;br /&gt;
In addition to the Standard File Header, the following format of &amp;quot;sub-header&amp;quot; is encountered often in NSB__ files:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
** This is the format of the general-purpose headers that are used in many places within nitro files.&lt;br /&gt;
*/&lt;br /&gt;
typedef struct Header&lt;br /&gt;
{&lt;br /&gt;
    0x00    1   u8  ;// dummy 0&lt;br /&gt;
    0x01    1   u8  ;// Amount of objects&lt;br /&gt;
    0x02    2   u16 ;// Size of this Header&lt;br /&gt;
&lt;br /&gt;
    ---- Unknown Section&lt;br /&gt;
        ---- Sub-Header&lt;br /&gt;
            0x00    2   u16 ;// Size of this Sub-Header, always = 8&lt;br /&gt;
            0x02    2   u16 ;// Size of this Unknown Section&lt;br /&gt;
            0x04    4   u32 ;// Constant = 0x0000017f&lt;br /&gt;
        ---- Unknown Data (repeats * Amount of objects)&lt;br /&gt;
            0x08    4   u32 ;// Unknown&lt;br /&gt;
            0x0C    4   u32 ;// ...&lt;br /&gt;
            etc&lt;br /&gt;
&lt;br /&gt;
    ---- Data Info Section&lt;br /&gt;
        ---- Sub-Header&lt;br /&gt;
            0x00    2   u16 ;// Size of each Data entry, usually = 4&lt;br /&gt;
            0x02    2   u16 ;// Size of this Data Info Section&lt;br /&gt;
        ---- Data (repeats * Amount of objects)&lt;br /&gt;
            0x04    n   ??? ;// The Data stored here is used for several different things, explained when used.&lt;br /&gt;
            0x04+n  n   ??? ;// ...&lt;br /&gt;
            etc&lt;br /&gt;
&lt;br /&gt;
    ---- Name Section (repeats * Amount of objects)&lt;br /&gt;
        0x00    16  text;// Name of Model&lt;br /&gt;
        0x10    16  text;// ...&lt;br /&gt;
        etc&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table width=100% bgcolor=#d0d0d0&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;1. NSBMD Format&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;It has one or two blocks - &amp;#039;MDL0&amp;#039; and &amp;#039;TEX0&amp;#039;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;#039;MDL0&amp;#039; block is usually found at offset 0x14 (depending on how many &amp;lt;b&amp;gt;block_offset&amp;lt;/b&amp;gt;s there are before it)&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The &amp;#039;MDL0&amp;#039; block can potentially be followed by a &amp;#039;TEX0&amp;#039; block, or otherwise the &amp;#039;TEX0&amp;#039; block is defined in an external NSBTX file.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;1.1 &amp;#039;MDL0&amp;#039; Block&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
NSBMD&lt;br /&gt;
------&lt;br /&gt;
&lt;br /&gt;
struct Nitro_Header;// File identifier is &amp;#039;BMD0&amp;#039; (Basic Model Data)&lt;br /&gt;
&lt;br /&gt;
typedef struct Block_MDL0&lt;br /&gt;
{&lt;br /&gt;
    0x00    4   u32 ;// Block identifier: &amp;#039;MDL0&amp;#039; (Model Block)&lt;br /&gt;
    0x04    4   u32 ;// Block size&lt;br /&gt;
&lt;br /&gt;
    struct Header;// Model Header: one Header object for each model&lt;br /&gt;
    {// The &amp;#039;Data&amp;#039; for this Header is like so:&lt;br /&gt;
        0x00    4   u32 ;// The offset of Model_1, relative to the start of Block_MDL0&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    ---- Model_1 (All offsets are relative to this Model_1 section)&lt;br /&gt;
&lt;br /&gt;
        0x00    4   u32 ;// Size of Model_1 (including these 4 bytes)&lt;br /&gt;
        0x04    4   u32 ;// Offset of Additional Model Data&lt;br /&gt;
        0x08    4   u32 ;// Offset of Texture &amp;amp; Palette Offset&lt;br /&gt;
        0x0C    4   u32 ;// Offset of Display List Start&lt;br /&gt;
        0x10    4   u32 ;// Offset of Display List End&lt;br /&gt;
&lt;br /&gt;
        0x14    1   u8  ;// Unknown&lt;br /&gt;
        0x15    1   u8  ;// Unknown&lt;br /&gt;
        0x16    1   u8  ;// Unknown&lt;br /&gt;
&lt;br /&gt;
        0x17    1   u8  ;// Amount of Objects&lt;br /&gt;
        0x18    1   u8  ;// Amount of Materials&lt;br /&gt;
        0x19    1   u8  ;// Amount of Polygons&lt;br /&gt;
&lt;br /&gt;
        0x1A    2   u16 ;// Unknown&lt;br /&gt;
        0x1C    4   u32 ;// Model scale?&lt;br /&gt;
        0x20    4   u32 ;// Bound scale?&lt;br /&gt;
&lt;br /&gt;
        0x24    2   u8  ;// Amount of Vertices&lt;br /&gt;
        0x26    2   u8  ;// Amount of Surfaces&lt;br /&gt;
        0x28    2   u8  ;// Amount of Triangles&lt;br /&gt;
        0x2A    2   u8  ;// Amount of Quads&lt;br /&gt;
&lt;br /&gt;
        0x2C    2   s16 ;// Bounding box X (signed fixed point 1.3.12)&lt;br /&gt;
        0x2E    2   s16 ;// Bounding box Y (signed fixed point 1.3.12)&lt;br /&gt;
        0x30    2   s16 ;// Bounding box Z (signed fixed point 1.3.12)&lt;br /&gt;
        0x32    2   s16 ;// Bounding box Width  (signed fixed point 1.3.12)&lt;br /&gt;
        0x34    2   s16 ;// Bounding box Height (signed fixed point 1.3.12)&lt;br /&gt;
        0x36    2   s16 ;// Bounding box Depth  (signed fixed point 1.3.12)&lt;br /&gt;
&lt;br /&gt;
        0x38    4   u32 ;// Runtime use data&lt;br /&gt;
        0x3C    4   u32 ;// Runtime use data&lt;br /&gt;
&lt;br /&gt;
        struct Header;// Object Header: one Header object for each Polygonal Object&lt;br /&gt;
        {// The &amp;#039;Data&amp;#039; for this Header is like so:&lt;br /&gt;
            0x00    4   u32 ;// The offset of Object Definition, relative to the start of this Object Header&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        ---- Object Definition (repeats * Amount of objects)&lt;br /&gt;
&lt;br /&gt;
            In each definition:&lt;br /&gt;
            0x00    1   u8  ;// Transform Flag byte&lt;br /&gt;
            0x01    1   u8  ;// Unknown&lt;br /&gt;
            0x02    1   u8  ;// Unknown&lt;br /&gt;
            0x03    1   u8  ;// Unknown&lt;br /&gt;
&lt;br /&gt;
            // The Transform Flag byte is set up like so:&lt;br /&gt;
            //     bits: 7.......0&lt;br /&gt;
            //        0b NNNN PSRT&lt;br /&gt;
            //&lt;br /&gt;
            // T:  if set, Translation = Identity (No Translation)&lt;br /&gt;
            //     if = 0, then 12 bytes follow:&lt;br /&gt;
            //          0x04    4   s32 ;// Translation X (signed fixed point 1.3.12)&lt;br /&gt;
            //          0x08    4   s32 ;// Translation Y (signed fixed point 1.3.12)&lt;br /&gt;
            //          0x0C    4   s32 ;// Translation Z (signed fixed point 1.3.12)&lt;br /&gt;
            // R:  if set, Rotation = Zero (No Rotation)&lt;br /&gt;
            //     if = 0, then depends on the &amp;#039;P&amp;#039; bit.&lt;br /&gt;
            // S:  if set, Scale = Identity (No Scale)&lt;br /&gt;
            //     if = 0, then 12 bytes follow:&lt;br /&gt;
            //          0x04    4   s32 ;// Scale X (signed fixed point 1.3.12)&lt;br /&gt;
            //          0x08    4   s32 ;// Scale Y (signed fixed point 1.3.12)&lt;br /&gt;
            //          0x0C    4   s32 ;// Scale Z (signed fixed point 1.3.12)&lt;br /&gt;
            // P:  if = 0 and R = 0, then 16 bytes follow:&lt;br /&gt;
            //          0x00    4   s32 ;// Rotation A&lt;br /&gt;
            //          0x04    4   s32 ;// Rotation B&lt;br /&gt;
            //          0x08    4   s32 ;// Rotation C&lt;br /&gt;
            //          0x0C    4   s32 ;// Rotation D&lt;br /&gt;
            //     if set, Pivot exists- so 4 bytes follow:&lt;br /&gt;
            //          0x04    2   s16 ;// value A (signed fixed point 1.3.12)&lt;br /&gt;
            //          0x06    2   s16 ;// value B (signed fixed point 1.3.12)&lt;br /&gt;
            //     NNNN = Pivot matrix type (0..8)&lt;br /&gt;
            //     0:  | 1  0  0|  1:  | 0  1  0|  2:  | 0  0  1|&lt;br /&gt;
            //         | 0  A  B|      | A  0  B|      | A  B  0|&lt;br /&gt;
            //         | 0  B -A|      | B  0 -A|      | B -A  0|&lt;br /&gt;
            //&lt;br /&gt;
            //     3:  | 0  A  B|  4:  | A  0  B|  5:  | A  B  0|&lt;br /&gt;
            //         | 1  0  0|      | 0  1  0|      | 0  0  1|&lt;br /&gt;
            //         | 0  B -A|      | B  0 -A|      | B -A  0|&lt;br /&gt;
            //&lt;br /&gt;
            //     6:  | 0  A  B|  7:  | A  0  B|  8:  | A  B  0|&lt;br /&gt;
            //         | 0  B -A|      | B  0 -A|      | B -A  0|&lt;br /&gt;
            //         | 1  0  0|      | 0  1  0|      | 0  0  1|&lt;br /&gt;
&lt;br /&gt;
        ---- Bone/Skeleton Section&lt;br /&gt;
&lt;br /&gt;
            0x00    ?   definitions;&lt;br /&gt;
&lt;br /&gt;
            // Each definition consists of 1 Command Byte + Parameters. Each Parameter is 1 byte.&lt;br /&gt;
            // &lt;br /&gt;
            // Command  Params  Description&lt;br /&gt;
            // 0x06     3       params: Object ID, Parent ID, dummy 0&lt;br /&gt;
            // 0x26     4       params: Object ID, Parent ID, dummy 0, Stack ID&lt;br /&gt;
            // 0x46     4       params: Object ID, Parent ID, dummy 0, Stack ID&lt;br /&gt;
            // 0x66     5       params: Object ID, Parent ID, dummy 0, Stack ID, Restore ID&lt;br /&gt;
            // &lt;br /&gt;
            // 0x00     0       NOP (empty command)&lt;br /&gt;
            // 0x01     0       End of Bone/Skeleton Section&lt;br /&gt;
            // 0x02     2       params: Node ID, Visibility&lt;br /&gt;
            // 0x03     1       Set Polygon Stack ID?&lt;br /&gt;
            // 0x04     3       params: Material ID, 0x5, Polygon ID&lt;br /&gt;
            // 0x05     1       ??&lt;br /&gt;
            // 0x06     3       params: Object ID, Parent ID, Dummy 0&lt;br /&gt;
            // 0x07     1       ??&lt;br /&gt;
            // 0x08     1       ??&lt;br /&gt;
            // 0x09     8       ??&lt;br /&gt;
            // &lt;br /&gt;
            // 0x0B     0       BEGIN (indicate begin of Polygon/Material pairing)&lt;br /&gt;
            // 0x2B     0       END (indicate end of Polygon/Material pairing)&lt;br /&gt;
            // &lt;br /&gt;
            // These are Material/Polygon pairing commands, 4 bytes.&lt;br /&gt;
            // The lower nibble of 2nd Paramter must be 5.&lt;br /&gt;
            // 0x04     3       Material ID, 05, Polygon ID&lt;br /&gt;
            // 0x24     3       ...&lt;br /&gt;
            // 0x44     3       ...&lt;br /&gt;
&lt;br /&gt;
        ---- Texture &amp;amp; Palette Offset&lt;br /&gt;
&lt;br /&gt;
            0x00    2   u16 ;// Offset of Texture Section (relative to Texture &amp;amp; Palette Offset)&lt;br /&gt;
            0x02    2   u16 ;// Offset of Palette Section (relative to Texture &amp;amp; Palette Offset)&lt;br /&gt;
&lt;br /&gt;
        ---- Material Section&lt;br /&gt;
&lt;br /&gt;
            struct Header;// Material Header: one Header object for each material&lt;br /&gt;
            {// The &amp;#039;Data&amp;#039; for this Header is like so:&lt;br /&gt;
                0x00    4   u32 ;// The offset of Material Definition, relative to the start of this Material Section&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
            ---- Texture Section&lt;br /&gt;
&lt;br /&gt;
                struct Header;// Texture Header: one Header object for each texture&lt;br /&gt;
                {// The u32 &amp;#039;Data&amp;#039; for this Header is like so:&lt;br /&gt;
                    0x00    2   u16 ;// Offset of Matching Data (relative to Texture &amp;amp; Palette Offset)&lt;br /&gt;
                    0x02    2   u16 ;// Amount of associated Materials (a texture can be in more than one material)&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
            ---- Palette Section&lt;br /&gt;
&lt;br /&gt;
                struct Header;// Palette Header: one Header object for each palette&lt;br /&gt;
                {// The u32 &amp;#039;Data&amp;#039; for this Header is like so:&lt;br /&gt;
                    0x00    2   u16 ;// Offset of Matching Data (relative to Texture &amp;amp; Palette Offset)&lt;br /&gt;
                    0x02    2   u16 ;// Amount of associated Materials (a palette can be in more than one material)&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
            ---- Material Definition (repeats * Amount of Materials)&lt;br /&gt;
                ;// Usually 44 (or 48?) bytes for each material&lt;br /&gt;
                0x00    2   u16 ;// Zero&lt;br /&gt;
                0x02    2   u16 ;// Size of this material&lt;br /&gt;
                0x04    28      ;// Unknown&lt;br /&gt;
                0x20    2   u16 ;// Width&lt;br /&gt;
                0x22    2   u16 ;// Height&lt;br /&gt;
                0x24    8       ;// Unknown&lt;br /&gt;
                &lt;br /&gt;
&lt;br /&gt;
        ---- Polygon Section&lt;br /&gt;
&lt;br /&gt;
            struct Header;// Polygon Header: one Header object for each material&lt;br /&gt;
            {// The &amp;#039;Data&amp;#039; for this Header is like so:&lt;br /&gt;
                0x00    4   u32 ;// The offset of Polygon Definition, relative to the start of this Polygon Section&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
            ---- Polygon Definition (repeats * Amount of Polygons)&lt;br /&gt;
&lt;br /&gt;
                0x00    4   u32 ;// &lt;br /&gt;
                0x04    4   u32 ;// &lt;br /&gt;
                0x08    4   u32 ;// Offset of Display List, relative to Polygon Definition, see below&lt;br /&gt;
                0x0c    4   u32 ;// Size of Display List&lt;br /&gt;
&lt;br /&gt;
                0x10    4   u32 ;// &lt;br /&gt;
                0x14    4   u32 ;// &lt;br /&gt;
                0x18    4   u32 ;// Offset of Display List, relative to Polygon Definition, see below&lt;br /&gt;
                0x1c    4   u32 ;// Size of Display List&lt;br /&gt;
&lt;br /&gt;
                ...&lt;br /&gt;
&lt;br /&gt;
            ---- Display List&lt;br /&gt;
                // The Display List is actually packed geometry command.&lt;br /&gt;
                // See the DStek specification for more information:&lt;br /&gt;
                // http://www.akkit.org/info/gbatek.htm#ds3dvideo&lt;br /&gt;
&lt;br /&gt;
    ---- Model_2&lt;br /&gt;
        ...&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table width=100% bgcolor=#d0d0d0&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;2. NSBTX Format&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The NSBTX file format stores texture image and palette information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;2.1 &amp;#039;TEX0&amp;#039; Block&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;TEX0&amp;#039; Block can be found in certain NSBMD files, not just in NSBTX files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
NSBTX&lt;br /&gt;
------&lt;br /&gt;
&lt;br /&gt;
struct Nitro_Header;// File identifier is &amp;#039;BTX0&amp;#039; (Basic Texture)&lt;br /&gt;
&lt;br /&gt;
typedef struct Block_TEX0&lt;br /&gt;
{&lt;br /&gt;
    0x00    4   u32 ;// Block identifier: &amp;#039;TEX0&amp;#039; (Texture Block)&lt;br /&gt;
    0x04    4   u32 ;// Block size&lt;br /&gt;
&lt;br /&gt;
    ---- Texture Header&lt;br /&gt;
&lt;br /&gt;
        0x08    4   u32 ;// Padding (= 0)&lt;br /&gt;
        0x0C    2   u16 ;// Texture Data Size (bitshift &amp;lt;&amp;lt; 3)&lt;br /&gt;
        0x0E    2   u16 ;// Texture Info Offset (0x3C)&lt;br /&gt;
&lt;br /&gt;
        0x10    4   u32 ;// Padding (= 0) &lt;br /&gt;
        0x14    4   u32 ;// Texture Data Offset&lt;br /&gt;
        0x18    4   u32 ;// Padding (= 0) &lt;br /&gt;
        0x1C    2   u16 ;// Compressed Texture Data Size (bitshift &amp;lt;&amp;lt; 3)&lt;br /&gt;
        0x1E    2   u16 ;// Compressed Texture Info Offset (0x3C)&lt;br /&gt;
&lt;br /&gt;
        0x20    4   u32 ;// Padding (= 0)&lt;br /&gt;
        0x24    4   u32 ;// Compressed Texture Data Offset&lt;br /&gt;
        0x28    4   u32 ;// Compressed Texture Info Data Offset&lt;br /&gt;
        0x2C    4   u32 ;// Padding (= 0)&lt;br /&gt;
        0x30    4   u32 ;// Palette Data Size (bitshift &amp;lt;&amp;lt; 3)&lt;br /&gt;
        0x34    4   u32 ;// Palette Info Offset&lt;br /&gt;
        0x38    4   u32 ;// Palette Data Offset&lt;br /&gt;
&lt;br /&gt;
    ---- Texture Info Section&lt;br /&gt;
&lt;br /&gt;
        struct Header;// Texture Header: one Header object for each texture&lt;br /&gt;
        {// The u32 &amp;#039;Data&amp;#039; for this Header is like so:&lt;br /&gt;
            0x00    2   u16 ;// (bitshift &amp;lt;&amp;lt; 3) Texture Offset, relative to the start of Texture Data&lt;br /&gt;
            0x02    2   u16 ;// Parameters&lt;br /&gt;
            // The format is:&lt;br /&gt;
            // bit:  15..............0&lt;br /&gt;
            //    0 b --CFFFHHHWWW----&lt;br /&gt;
            // where:&lt;br /&gt;
            // C = Palette ID&lt;br /&gt;
            // F = Format (0-7)&lt;br /&gt;
            // H = Height (8 &amp;lt;&amp;lt; Height)&lt;br /&gt;
            // W = Width (8 &amp;lt;&amp;lt; Width)&lt;br /&gt;
            // &lt;br /&gt;
            // To Calculate the Data Size of a Texture:&lt;br /&gt;
            // Bit Depth = Format:&amp;lt;0, 8, 2, 4, 8, 2, 8, 16&amp;gt;&lt;br /&gt;
            // Width * Height * BitDepth / 8&lt;br /&gt;
            0x04    1   u8  ;// Width (should match W &amp;lt;&amp;lt; 3)&lt;br /&gt;
            0x05    1   u8  ;// Unknown (is 0x00 or 0x80)&lt;br /&gt;
            0x06    1   u8  ;// Height? (can be 0, 1, 2, 4, 8)&lt;br /&gt;
            0x07    1   u8  ;// Unknown (is 0x80)    &lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
    ---- Palette Info Section&lt;br /&gt;
&lt;br /&gt;
        struct Header;// Palette Header: one Header object for each palette&lt;br /&gt;
        {// The u32 &amp;#039;Data&amp;#039; for this Header is like so:&lt;br /&gt;
            0x00    2   u16 ;// (bitshift &amp;lt;&amp;lt; 3) Palette Offset, relative to the start of Palette Data&lt;br /&gt;
            0x00    2   u16 ;// Unknown (is 0 or 1)&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
    ---- Texture Data Section&lt;br /&gt;
&lt;br /&gt;
    ---- Compressed Texture Data Section&lt;br /&gt;
&lt;br /&gt;
    ---- Compressed Texture Info Data Section&lt;br /&gt;
&lt;br /&gt;
    ---- Palette Data Section&lt;br /&gt;
&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table width=100% bgcolor=#d0d0d0&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;3. NSBCA Format&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The NSBCA file format stores character skeletal animation data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;3.1 &amp;#039;JNT0&amp;#039; Block&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;JNT0&amp;#039; Block can be found in NSBCA files, it stores bone/joint animation data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
NSBCA&lt;br /&gt;
------&lt;br /&gt;
&lt;br /&gt;
struct Nitro_Header;// File identifier is &amp;#039;BCA0&amp;#039; (Basic Character Animation)&lt;br /&gt;
&lt;br /&gt;
typedef struct Block_JNT0&lt;br /&gt;
{&lt;br /&gt;
    0x00    4   u32 ;// Block identifier: &amp;#039;JNT0&amp;#039; (Joint Block)&lt;br /&gt;
    0x04    4   u32 ;// Block size&lt;br /&gt;
&lt;br /&gt;
    struct Header;// Joint Header: one Header object for each joint&lt;br /&gt;
    {// The &amp;#039;Data&amp;#039; for this Header is like so:&lt;br /&gt;
        0x00    4   u32 ;// The offset of Joint_1, relative to the start of Block_JNT0&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    ---- Joint Section (repeats * Amount of Objects)&lt;br /&gt;
&lt;br /&gt;
        0x00    4   u32 ;// Magic Stamp &amp;#039;J.AC&amp;#039; (Joint Animation Content ?)&lt;br /&gt;
        0x04    2   u16 ;// Amount of Frames        &lt;br /&gt;
        0x06    2   u16 ;// Amount of Objects being animated. Should equal to the number of Objects in a model.&lt;br /&gt;
        0x08    4   u32 ;// Unknown  &lt;br /&gt;
        0x0C    4   u32 ;// Offset to Offset1 chunk. Relative to start of this block.&lt;br /&gt;
        0x10    4   u32 ;// Offset to Offset2 chunk. Relative to start of this block.&lt;br /&gt;
&lt;br /&gt;
        0x14    4   u32 ;// Object Info Offset (repeats * Amount of Objects), relative to start of this Joint Section.&lt;br /&gt;
&lt;br /&gt;
        ---- Object Info - Repeats * Number of Objects&lt;br /&gt;
            0x00    2   u16 ;// Flag - Indicates what sort of Transformations are applied.&lt;br /&gt;
            // The format is:&lt;br /&gt;
            // bit:  15..............0&lt;br /&gt;
            //    0 b --zyx-Sr-RZYX-T-&lt;br /&gt;
            // T is Translation&lt;br /&gt;
            // R is Rotation&lt;br /&gt;
            // S is Scale&lt;br /&gt;
            // If these bits are cleared, transformation data follows.&lt;br /&gt;
            //  X, Y, Z, r, x, y, z are flags that identify how the data is stored.&lt;br /&gt;
            0x02    1   u32 ;// Unknown&lt;br /&gt;
            0x03    1   u32 ;// ID Number&lt;br /&gt;
&lt;br /&gt;
        ---- Transformation Info (Translation XYZ, Rotation, Scale XYZ) when set&lt;br /&gt;
&lt;br /&gt;
            0x00    4   u32 ;// Actual value.&lt;br /&gt;
&lt;br /&gt;
        ---- Transformation Info (Translation XYZ, Rotation, Scale XYZ) when cleared&lt;br /&gt;
&lt;br /&gt;
            0x00    2   u16 ;// Unknown - typically 0.&lt;br /&gt;
            0x02    2   u16 ;// Unknown &lt;br /&gt;
            0x04    4   u32 ;// Offset to data. Relative to end Object Info Header (Object Info Offset + 4).&lt;br /&gt;
&lt;br /&gt;
    ---- Offset1 Chunk - Repeats until Offset2&lt;br /&gt;
&lt;br /&gt;
        0x00    2   u16 ;// I&amp;#039;ve seen 36, 32 &amp;amp; 0.&lt;br /&gt;
        0x02    2   s16 ;// Unknown&lt;br /&gt;
        0x04    2   s16 ;// Unknown&lt;br /&gt;
&lt;br /&gt;
    ---- Offset2 Chunk - Repeats until end of file&lt;br /&gt;
&lt;br /&gt;
        // All transformation offsets point somewhere in this section.&lt;br /&gt;
        // It&amp;#039;s clearly broken up into parts (Translation, Rotation &amp;amp; Scale) however I&amp;#039;m not totally sure how data is store in here yet.&lt;br /&gt;
&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table width=100% bgcolor=#d0d0d0&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;4. NSBTP Format&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The NSBTP file format stores texture pattern animation data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;4.1 &amp;#039;PAT0&amp;#039; Block&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;PAT0&amp;#039; Block can be found in NSBTP files, it stores pattern animation data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
NSBTP&lt;br /&gt;
------&lt;br /&gt;
&lt;br /&gt;
struct Nitro_Header;// File identifier is &amp;#039;BTP0&amp;#039; (Basic Texture Pattern animation)&lt;br /&gt;
&lt;br /&gt;
typedef struct Block_PAT0&lt;br /&gt;
{&lt;br /&gt;
    0x00    4   u32 ;// Block identifier: &amp;#039;PAT0&amp;#039; (Pattern Block)&lt;br /&gt;
    0x04    4   u32 ;// Block size&lt;br /&gt;
&lt;br /&gt;
    // Unknown beyond this point&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table width=100% bgcolor=#d0d0d0&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;5. NSBTA Format&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The NSBTA file format stores texture animation data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;5.1 &amp;#039;SRT0&amp;#039; Block&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;SRT0&amp;#039; Block can be found in NSBTA files, texture animation data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
NSBTA&lt;br /&gt;
------&lt;br /&gt;
&lt;br /&gt;
struct Nitro_Header;// File identifier is &amp;#039;BTA0&amp;#039; (Basic Texture Animation)&lt;br /&gt;
&lt;br /&gt;
typedef struct Block_SRT0&lt;br /&gt;
{&lt;br /&gt;
    0x00    4   u32 ;// Block identifier: &amp;#039;SRT0&amp;#039; (??? Block)&lt;br /&gt;
    0x04    4   u32 ;// Block size&lt;br /&gt;
&lt;br /&gt;
    // Unknown beyond this point&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table width=100% bgcolor=#d0d0d0&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;6. NSBMA Format&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The NSBMA file format stores material animation data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;6.1 &amp;#039;MAT0&amp;#039; Block&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;MAT0&amp;#039; Block can be found in NSBMA files, it stores material animation data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
NSBMA&lt;br /&gt;
------&lt;br /&gt;
&lt;br /&gt;
struct Nitro_Header;// File identifier is &amp;#039;BMA0&amp;#039; (Basic Material Animation)&lt;br /&gt;
&lt;br /&gt;
typedef struct Block_MAT0&lt;br /&gt;
{&lt;br /&gt;
    0x00    4   u32 ;// Block identifier: &amp;#039;MAT0&amp;#039; (Material Block)&lt;br /&gt;
    0x04    4   u32 ;// Block size&lt;br /&gt;
&lt;br /&gt;
    // Unknown beyond this point&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table width=100% bgcolor=#d0d0d0&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;7. NSBVA Format&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The NSBVA file format stores general-purpose value animation data perhaps ..?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;7.1 &amp;#039;VIS0&amp;#039; Block&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;VIS0&amp;#039; Block can be found in NSBVA files, it stores value animation data perhaps ..?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
NSBVA&lt;br /&gt;
------&lt;br /&gt;
&lt;br /&gt;
struct Nitro_Header;// File identifier is &amp;#039;BVA0&amp;#039; (Basic ??? Animation)&lt;br /&gt;
&lt;br /&gt;
typedef struct Block_VIS0&lt;br /&gt;
{&lt;br /&gt;
    0x00    4   u32 ;// Block identifier: &amp;#039;VIS0&amp;#039; (??? Block)&lt;br /&gt;
    0x04    4   u32 ;// Block size&lt;br /&gt;
&lt;br /&gt;
    // Unknown beyond this point&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Category:File Formats]]&lt;br /&gt;
[[Category:Model Formats]]&lt;/div&gt;</summary>
		<author><name>Cruiseliu</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.vg-resource.com/index.php?title=Nitro_Files&amp;diff=3364</id>
		<title>Nitro Files</title>
		<link rel="alternate" type="text/html" href="https://wiki.vg-resource.com/index.php?title=Nitro_Files&amp;diff=3364"/>
		<updated>2024-09-21T20:51:11Z</updated>

		<summary type="html">&lt;p&gt;Cruiseliu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;Nitro Studio Files Specification&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Current status&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;i&amp;gt;This specification is far from complete, and it may contain errors, since it is the result of reverse-engineering.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;11 August 2007 - First published by kiwi.ds@gmail.com&amp;lt;/li&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;16 April 2019 - Published on the apicula github wiki&amp;lt;/li&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;19 April 2019 - Added information from LowLines&amp;#039; ConsoleTool doc&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table width=100% bgcolor=#d0d0d0&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;0. Introduction&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Most 3D models found in Nintendo DS games use the following set of Nitro files:&lt;br /&gt;
* `NSBMD` (Nitro Model), which stores polygon models.&lt;br /&gt;
* `NSBTX` (Nitro Texture), which stores texture image and palette data.&lt;br /&gt;
* `NSBCA` (Nitro Character Animation), which stores skeletal animation data.&lt;br /&gt;
* `NSBTP` (Nitro Texture Pattern anim), which stores texture-swap animations.&lt;br /&gt;
* `NSBTA` (Nitro Texture Animation), which stores UV-change animations.&lt;br /&gt;
* `NSBMA` (Nitro Material Animation), which stores material-swap animations.&lt;br /&gt;
* `NSBVA` (Unknown)&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== 0.1 Terminology ===&lt;br /&gt;
&lt;br /&gt;
File format is explained in C-style struct declaration.&lt;br /&gt;
The following types of variables are used:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
s8	1 byte	// signed char&lt;br /&gt;
s16	2 bytes	// signed short&lt;br /&gt;
s32	4 bytes	// signed long&lt;br /&gt;
u8 	1 byte	// unsigned char&lt;br /&gt;
u16	2 bytes	// unsigned short&lt;br /&gt;
u32	4 bytes	// unsigned long&lt;br /&gt;
text    n bytes // ASCII char string&lt;br /&gt;
&lt;br /&gt;
;// The general format for every data field outlined here is:&lt;br /&gt;
--------  -----  ----- ;// ----------------------------------&lt;br /&gt;
Offset  Size  Type ;// Description&lt;br /&gt;
--------  -----  ----- ;// ----------------------------------&lt;br /&gt;
0x00    4     u32  ;// Example&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== 0.2 Nitro Standard File Header ===&lt;br /&gt;
&lt;br /&gt;
Many files (besides sound-related) found in DS ROMs share this header structure:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
** This is the standard DS Nitro header format: any nitro file starts with this.&lt;br /&gt;
*/&lt;br /&gt;
typedef struct Nitro_Header&lt;br /&gt;
{&lt;br /&gt;
    0x00    4   text;// File identifier: can be &amp;#039;SDAT&amp;#039;, &amp;#039;BMD0&amp;#039;, &amp;#039;BTX0&amp;#039;, &amp;#039;BCA0&amp;#039;, etc...&lt;br /&gt;
    0x04    4   u32 ;// Magic stamp: is either 0x0001FEFF or 0x0002FEFF&lt;br /&gt;
    0x08    4   u32 ;// Size of this file (including this struct)&lt;br /&gt;
    0x0C    2   u16 ;// Size of this structure (always 16)&lt;br /&gt;
&lt;br /&gt;
    0x0E    2   u16 ;// Amount of Blocks&lt;br /&gt;
    ---- Offsets (repeats * Amount of Blocks)&lt;br /&gt;
        0x00    4   u32 ;// Block offset #1&lt;br /&gt;
        0x04    4   u32 ;// Block offset #2&lt;br /&gt;
        etc&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== 0.3 General Data Sub-header ===&lt;br /&gt;
&lt;br /&gt;
In addition to the Standard File Header, the following format of &amp;quot;sub-header&amp;quot; is encountered often in NSB__ files:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
** This is the format of the general-purpose headers that are used in many places within nitro files.&lt;br /&gt;
*/&lt;br /&gt;
typedef struct Header&lt;br /&gt;
{&lt;br /&gt;
    0x00    1   u8  ;// dummy 0&lt;br /&gt;
    0x01    1   u8  ;// Amount of objects&lt;br /&gt;
    0x02    2   u16 ;// Size of this Header&lt;br /&gt;
&lt;br /&gt;
    ---- Unknown Section&lt;br /&gt;
        ---- Sub-Header&lt;br /&gt;
            0x00    2   u16 ;// Size of this Sub-Header, always = 8&lt;br /&gt;
            0x02    2   u16 ;// Size of this Unknown Section&lt;br /&gt;
            0x04    4   u32 ;// Constant = 0x0000017f&lt;br /&gt;
        ---- Unknown Data (repeats * Amount of objects)&lt;br /&gt;
            0x08    4   u32 ;// Unknown&lt;br /&gt;
            0x0C    4   u32 ;// ...&lt;br /&gt;
            etc&lt;br /&gt;
&lt;br /&gt;
    ---- Data Info Section&lt;br /&gt;
        ---- Sub-Header&lt;br /&gt;
            0x00    2   u16 ;// Size of each Data entry, usually = 4&lt;br /&gt;
            0x02    2   u16 ;// Size of this Data Info Section&lt;br /&gt;
        ---- Data (repeats * Amount of objects)&lt;br /&gt;
            0x04    n   ??? ;// The Data stored here is used for several different things, explained when used.&lt;br /&gt;
            0x04+n  n   ??? ;// ...&lt;br /&gt;
            etc&lt;br /&gt;
&lt;br /&gt;
    ---- Name Section (repeats * Amount of objects)&lt;br /&gt;
        0x00    16  text;// Name of Model&lt;br /&gt;
        0x10    16  text;// ...&lt;br /&gt;
        etc&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table width=100% bgcolor=#d0d0d0&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;1. NSBMD Format&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;It has one or two blocks - &amp;#039;MDL0&amp;#039; and &amp;#039;TEX0&amp;#039;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;#039;MDL0&amp;#039; block is usually found at offset 0x14 (depending on how many &amp;lt;b&amp;gt;block_offset&amp;lt;/b&amp;gt;s there are before it)&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The &amp;#039;MDL0&amp;#039; block can potentially be followed by a &amp;#039;TEX0&amp;#039; block, or otherwise the &amp;#039;TEX0&amp;#039; block is defined in an external NSBTX file.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;1.1 &amp;#039;MDL0&amp;#039; Block&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
NSBMD&lt;br /&gt;
------&lt;br /&gt;
&lt;br /&gt;
struct Nitro_Header;// File identifier is &amp;#039;BMD0&amp;#039; (Basic Model Data)&lt;br /&gt;
&lt;br /&gt;
typedef struct Block_MDL0&lt;br /&gt;
{&lt;br /&gt;
    0x00    4   u32 ;// Block identifier: &amp;#039;MDL0&amp;#039; (Model Block)&lt;br /&gt;
    0x04    4   u32 ;// Block size&lt;br /&gt;
&lt;br /&gt;
    struct Header;// Model Header: one Header object for each model&lt;br /&gt;
    {// The &amp;#039;Data&amp;#039; for this Header is like so:&lt;br /&gt;
        0x00    4   u32 ;// The offset of Model_1, relative to the start of Block_MDL0&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    ---- Model_1 (All offsets are relative to this Model_1 section)&lt;br /&gt;
&lt;br /&gt;
        0x00    4   u32 ;// Size of Model_1 (including these 4 bytes)&lt;br /&gt;
        0x04    4   u32 ;// Offset of Additional Model Data&lt;br /&gt;
        0x08    4   u32 ;// Offset of Texture &amp;amp; Palette Offset&lt;br /&gt;
        0x0C    4   u32 ;// Offset of Display List Start&lt;br /&gt;
        0x10    4   u32 ;// Offset of Display List End&lt;br /&gt;
&lt;br /&gt;
        0x14    1   u8  ;// Unknown&lt;br /&gt;
        0x15    1   u8  ;// Unknown&lt;br /&gt;
        0x16    1   u8  ;// Unknown&lt;br /&gt;
&lt;br /&gt;
        0x17    1   u8  ;// Amount of Objects&lt;br /&gt;
        0x18    1   u8  ;// Amount of Materials&lt;br /&gt;
        0x19    1   u8  ;// Amount of Polygons&lt;br /&gt;
&lt;br /&gt;
        0x1A    2   u16 ;// Unknown&lt;br /&gt;
        0x1C    4   u32 ;// Model scale?&lt;br /&gt;
        0x20    4   u32 ;// Bound scale?&lt;br /&gt;
&lt;br /&gt;
        0x24    2   u8  ;// Amount of Vertices&lt;br /&gt;
        0x26    2   u8  ;// Amount of Surfaces&lt;br /&gt;
        0x28    2   u8  ;// Amount of Triangles&lt;br /&gt;
        0x2A    2   u8  ;// Amount of Quads&lt;br /&gt;
&lt;br /&gt;
        0x2C    2   s16 ;// Bounding box X (signed fixed point 1.3.12)&lt;br /&gt;
        0x2E    2   s16 ;// Bounding box Y (signed fixed point 1.3.12)&lt;br /&gt;
        0x30    2   s16 ;// Bounding box Z (signed fixed point 1.3.12)&lt;br /&gt;
        0x32    2   s16 ;// Bounding box Width  (signed fixed point 1.3.12)&lt;br /&gt;
        0x34    2   s16 ;// Bounding box Height (signed fixed point 1.3.12)&lt;br /&gt;
        0x36    2   s16 ;// Bounding box Depth  (signed fixed point 1.3.12)&lt;br /&gt;
&lt;br /&gt;
        0x38    4   u32 ;// Runtime use data&lt;br /&gt;
        0x3C    4   u32 ;// Runtime use data&lt;br /&gt;
&lt;br /&gt;
        struct Header;// Object Header: one Header object for each Polygonal Object&lt;br /&gt;
        {// The &amp;#039;Data&amp;#039; for this Header is like so:&lt;br /&gt;
            0x00    4   u32 ;// The offset of Object Definition, relative to the start of this Object Header&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        ---- Object Definition (repeats * Amount of objects)&lt;br /&gt;
&lt;br /&gt;
            In each definition:&lt;br /&gt;
            0x00    1   u8  ;// Transform Flag byte&lt;br /&gt;
            0x01    1   u8  ;// Unknown&lt;br /&gt;
            0x02    1   u8  ;// Unknown&lt;br /&gt;
            0x03    1   u8  ;// Unknown&lt;br /&gt;
&lt;br /&gt;
            // The Transform Flag byte is set up like so:&lt;br /&gt;
            //     bits: 7.......0&lt;br /&gt;
            //        0b NNNN PSRT&lt;br /&gt;
            //&lt;br /&gt;
            // T:  if set, Translation = Identity (No Translation)&lt;br /&gt;
            //     if = 0, then 12 bytes follow:&lt;br /&gt;
            //          0x04    4   s32 ;// Translation X (signed fixed point 1.3.12)&lt;br /&gt;
            //          0x08    4   s32 ;// Translation Y (signed fixed point 1.3.12)&lt;br /&gt;
            //          0x0C    4   s32 ;// Translation Z (signed fixed point 1.3.12)&lt;br /&gt;
            // R:  if set, Rotation = Zero (No Rotation)&lt;br /&gt;
            //     if = 0, then depends on the &amp;#039;P&amp;#039; bit.&lt;br /&gt;
            // S:  if set, Scale = Identity (No Scale)&lt;br /&gt;
            //     if = 0, then 12 bytes follow:&lt;br /&gt;
            //          0x04    4   s32 ;// Scale X (signed fixed point 1.3.12)&lt;br /&gt;
            //          0x08    4   s32 ;// Scale Y (signed fixed point 1.3.12)&lt;br /&gt;
            //          0x0C    4   s32 ;// Scale Z (signed fixed point 1.3.12)&lt;br /&gt;
            // P:  if = 0 and R = 0, then 16 bytes follow:&lt;br /&gt;
            //          0x00    4   s32 ;// Rotation A&lt;br /&gt;
            //          0x04    4   s32 ;// Rotation B&lt;br /&gt;
            //          0x08    4   s32 ;// Rotation C&lt;br /&gt;
            //          0x0C    4   s32 ;// Rotation D&lt;br /&gt;
            //     if set, Pivot exists- so 4 bytes follow:&lt;br /&gt;
            //          0x04    2   s16 ;// value A (signed fixed point 1.3.12)&lt;br /&gt;
            //          0x06    2   s16 ;// value B (signed fixed point 1.3.12)&lt;br /&gt;
            //     NNNN = Pivot matrix type (0..8)&lt;br /&gt;
            //     0:  | 1  0  0|  1:  | 0  1  0|  2:  | 0  0  1|&lt;br /&gt;
            //         | 0  A  B|      | A  0  B|      | A  B  0|&lt;br /&gt;
            //         | 0  B -A|      | B  0 -A|      | B -A  0|&lt;br /&gt;
            //&lt;br /&gt;
            //     3:  | 0  A  B|  4:  | A  0  B|  5:  | A  B  0|&lt;br /&gt;
            //         | 1  0  0|      | 0  1  0|      | 0  0  1|&lt;br /&gt;
            //         | 0  B -A|      | B  0 -A|      | B -A  0|&lt;br /&gt;
            //&lt;br /&gt;
            //     6:  | 0  A  B|  7:  | A  0  B|  8:  | A  B  0|&lt;br /&gt;
            //         | 0  B -A|      | B  0 -A|      | B -A  0|&lt;br /&gt;
            //         | 1  0  0|      | 0  1  0|      | 0  0  1|&lt;br /&gt;
&lt;br /&gt;
        ---- Bone/Skeleton Section&lt;br /&gt;
&lt;br /&gt;
            0x00    ?   definitions;&lt;br /&gt;
&lt;br /&gt;
            // Each definition consists of 1 Command Byte + Parameters. Each Parameter is 1 byte.&lt;br /&gt;
            // &lt;br /&gt;
            // Command  Params  Description&lt;br /&gt;
            // 0x06     3       params: Object ID, Parent ID, dummy 0&lt;br /&gt;
            // 0x26     4       params: Object ID, Parent ID, dummy 0, Stack ID&lt;br /&gt;
            // 0x46     4       params: Object ID, Parent ID, dummy 0, Stack ID&lt;br /&gt;
            // 0x66     5       params: Object ID, Parent ID, dummy 0, Stack ID, Restore ID&lt;br /&gt;
            // &lt;br /&gt;
            // 0x00     0       NOP (empty command)&lt;br /&gt;
            // 0x01     0       End of Bone/Skeleton Section&lt;br /&gt;
            // 0x02     2       params: Node ID, Visibility&lt;br /&gt;
            // 0x03     1       Set Polygon Stack ID?&lt;br /&gt;
            // 0x04     3       params: Material ID, 0x5, Polygon ID&lt;br /&gt;
            // 0x05     1       ??&lt;br /&gt;
            // 0x06     3       params: Object ID, Parent ID, Dummy 0&lt;br /&gt;
            // 0x07     1       ??&lt;br /&gt;
            // 0x08     1       ??&lt;br /&gt;
            // 0x09     8       ??&lt;br /&gt;
            // &lt;br /&gt;
            // 0x0B     0       BEGIN (indicate begin of Polygon/Material pairing)&lt;br /&gt;
            // 0x2B     0       END (indicate end of Polygon/Material pairing)&lt;br /&gt;
            // &lt;br /&gt;
            // These are Material/Polygon pairing commands, 4 bytes.&lt;br /&gt;
            // The lower nibble of 2nd Paramter must be 5.&lt;br /&gt;
            // 0x04     3       Material ID, 05, Polygon ID&lt;br /&gt;
            // 0x24     3       ...&lt;br /&gt;
            // 0x44     3       ...&lt;br /&gt;
&lt;br /&gt;
        ---- Texture &amp;amp; Palette Offset&lt;br /&gt;
&lt;br /&gt;
            0x00    2   u16 ;// Offset of Texture Section (relative to Texture &amp;amp; Palette Offset)&lt;br /&gt;
            0x02    2   u16 ;// Offset of Palette Section (relative to Texture &amp;amp; Palette Offset)&lt;br /&gt;
&lt;br /&gt;
        ---- Material Section&lt;br /&gt;
&lt;br /&gt;
            struct Header;// Material Header: one Header object for each material&lt;br /&gt;
            {// The &amp;#039;Data&amp;#039; for this Header is like so:&lt;br /&gt;
                0x00    4   u32 ;// The offset of Material Definition, relative to the start of this Material Section&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
            ---- Texture Section&lt;br /&gt;
&lt;br /&gt;
                struct Header;// Texture Header: one Header object for each texture&lt;br /&gt;
                {// The u32 &amp;#039;Data&amp;#039; for this Header is like so:&lt;br /&gt;
                    0x00    2   u16 ;// Offset of Matching Data (relative to Texture &amp;amp; Palette Offset)&lt;br /&gt;
                    0x02    2   u16 ;// Amount of associated Materials (a texture can be in more than one material)&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
            ---- Palette Section&lt;br /&gt;
&lt;br /&gt;
                struct Header;// Palette Header: one Header object for each palette&lt;br /&gt;
                {// The u32 &amp;#039;Data&amp;#039; for this Header is like so:&lt;br /&gt;
                    0x00    2   u16 ;// Offset of Matching Data (relative to Texture &amp;amp; Palette Offset)&lt;br /&gt;
                    0x02    2   u16 ;// Amount of associated Materials (a palette can be in more than one material)&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
            ---- Material Definition (repeats * Amount of Materials)&lt;br /&gt;
                ;// Usually 48 bytes for each material&lt;br /&gt;
&lt;br /&gt;
        ---- Polygon Section&lt;br /&gt;
&lt;br /&gt;
            struct Header;// Polygon Header: one Header object for each material&lt;br /&gt;
            {// The &amp;#039;Data&amp;#039; for this Header is like so:&lt;br /&gt;
                0x00    4   u32 ;// The offset of Polygon Definition, relative to the start of this Polygon Section&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
            ---- Polygon Definition (repeats * Amount of Polygons)&lt;br /&gt;
&lt;br /&gt;
                0x00    4   u32 ;// &lt;br /&gt;
                0x04    4   u32 ;// &lt;br /&gt;
                0x08    4   u32 ;// Offset of Display List, relative to Polygon Definition, see below&lt;br /&gt;
                0x0c    4   u32 ;// Size of Display List&lt;br /&gt;
&lt;br /&gt;
                0x10    4   u32 ;// &lt;br /&gt;
                0x14    4   u32 ;// &lt;br /&gt;
                0x18    4   u32 ;// Offset of Display List, relative to Polygon Definition, see below&lt;br /&gt;
                0x1c    4   u32 ;// Size of Display List&lt;br /&gt;
&lt;br /&gt;
                ...&lt;br /&gt;
&lt;br /&gt;
            ---- Display List&lt;br /&gt;
                // The Display List is actually packed geometry command.&lt;br /&gt;
                // See the DStek specification for more information:&lt;br /&gt;
                // http://www.akkit.org/info/gbatek.htm#ds3dvideo&lt;br /&gt;
&lt;br /&gt;
    ---- Model_2&lt;br /&gt;
        ...&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table width=100% bgcolor=#d0d0d0&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;2. NSBTX Format&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The NSBTX file format stores texture image and palette information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;2.1 &amp;#039;TEX0&amp;#039; Block&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;TEX0&amp;#039; Block can be found in certain NSBMD files, not just in NSBTX files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
NSBTX&lt;br /&gt;
------&lt;br /&gt;
&lt;br /&gt;
struct Nitro_Header;// File identifier is &amp;#039;BTX0&amp;#039; (Basic Texture)&lt;br /&gt;
&lt;br /&gt;
typedef struct Block_TEX0&lt;br /&gt;
{&lt;br /&gt;
    0x00    4   u32 ;// Block identifier: &amp;#039;TEX0&amp;#039; (Texture Block)&lt;br /&gt;
    0x04    4   u32 ;// Block size&lt;br /&gt;
&lt;br /&gt;
    ---- Texture Header&lt;br /&gt;
&lt;br /&gt;
        0x08    4   u32 ;// Padding (= 0)&lt;br /&gt;
        0x0C    2   u16 ;// Texture Data Size (bitshift &amp;lt;&amp;lt; 3)&lt;br /&gt;
        0x0E    2   u16 ;// Texture Info Offset (0x3C)&lt;br /&gt;
&lt;br /&gt;
        0x10    4   u32 ;// Padding (= 0) &lt;br /&gt;
        0x14    4   u32 ;// Texture Data Offset&lt;br /&gt;
        0x18    4   u32 ;// Padding (= 0) &lt;br /&gt;
        0x1C    2   u16 ;// Compressed Texture Data Size (bitshift &amp;lt;&amp;lt; 3)&lt;br /&gt;
        0x1E    2   u16 ;// Compressed Texture Info Offset (0x3C)&lt;br /&gt;
&lt;br /&gt;
        0x20    4   u32 ;// Padding (= 0)&lt;br /&gt;
        0x24    4   u32 ;// Compressed Texture Data Offset&lt;br /&gt;
        0x28    4   u32 ;// Compressed Texture Info Data Offset&lt;br /&gt;
        0x2C    4   u32 ;// Padding (= 0)&lt;br /&gt;
        0x30    4   u32 ;// Palette Data Size (bitshift &amp;lt;&amp;lt; 3)&lt;br /&gt;
        0x34    4   u32 ;// Palette Info Offset&lt;br /&gt;
        0x38    4   u32 ;// Palette Data Offset&lt;br /&gt;
&lt;br /&gt;
    ---- Texture Info Section&lt;br /&gt;
&lt;br /&gt;
        struct Header;// Texture Header: one Header object for each texture&lt;br /&gt;
        {// The u32 &amp;#039;Data&amp;#039; for this Header is like so:&lt;br /&gt;
            0x00    2   u16 ;// (bitshift &amp;lt;&amp;lt; 3) Texture Offset, relative to the start of Texture Data&lt;br /&gt;
            0x02    2   u16 ;// Parameters&lt;br /&gt;
            // The format is:&lt;br /&gt;
            // bit:  15..............0&lt;br /&gt;
            //    0 b --CFFFHHHWWW----&lt;br /&gt;
            // where:&lt;br /&gt;
            // C = Palette ID&lt;br /&gt;
            // F = Format (0-7)&lt;br /&gt;
            // H = Height (8 &amp;lt;&amp;lt; Height)&lt;br /&gt;
            // W = Width (8 &amp;lt;&amp;lt; Width)&lt;br /&gt;
            // &lt;br /&gt;
            // To Calculate the Data Size of a Texture:&lt;br /&gt;
            // Bit Depth = Format:&amp;lt;0, 8, 2, 4, 8, 2, 8, 16&amp;gt;&lt;br /&gt;
            // Width * Height * BitDepth / 8&lt;br /&gt;
            0x04    1   u8  ;// Width (should match W &amp;lt;&amp;lt; 3)&lt;br /&gt;
            0x05    1   u8  ;// Unknown (is 0x00 or 0x80)&lt;br /&gt;
            0x06    1   u8  ;// Height? (can be 0, 1, 2, 4, 8)&lt;br /&gt;
            0x07    1   u8  ;// Unknown (is 0x80)    &lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
    ---- Palette Info Section&lt;br /&gt;
&lt;br /&gt;
        struct Header;// Palette Header: one Header object for each palette&lt;br /&gt;
        {// The u32 &amp;#039;Data&amp;#039; for this Header is like so:&lt;br /&gt;
            0x00    2   u16 ;// (bitshift &amp;lt;&amp;lt; 3) Palette Offset, relative to the start of Palette Data&lt;br /&gt;
            0x00    2   u16 ;// Unknown (is 0 or 1)&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
    ---- Texture Data Section&lt;br /&gt;
&lt;br /&gt;
    ---- Compressed Texture Data Section&lt;br /&gt;
&lt;br /&gt;
    ---- Compressed Texture Info Data Section&lt;br /&gt;
&lt;br /&gt;
    ---- Palette Data Section&lt;br /&gt;
&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table width=100% bgcolor=#d0d0d0&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;3. NSBCA Format&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The NSBCA file format stores character skeletal animation data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;3.1 &amp;#039;JNT0&amp;#039; Block&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;JNT0&amp;#039; Block can be found in NSBCA files, it stores bone/joint animation data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
NSBCA&lt;br /&gt;
------&lt;br /&gt;
&lt;br /&gt;
struct Nitro_Header;// File identifier is &amp;#039;BCA0&amp;#039; (Basic Character Animation)&lt;br /&gt;
&lt;br /&gt;
typedef struct Block_JNT0&lt;br /&gt;
{&lt;br /&gt;
    0x00    4   u32 ;// Block identifier: &amp;#039;JNT0&amp;#039; (Joint Block)&lt;br /&gt;
    0x04    4   u32 ;// Block size&lt;br /&gt;
&lt;br /&gt;
    struct Header;// Joint Header: one Header object for each joint&lt;br /&gt;
    {// The &amp;#039;Data&amp;#039; for this Header is like so:&lt;br /&gt;
        0x00    4   u32 ;// The offset of Joint_1, relative to the start of Block_JNT0&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    ---- Joint Section (repeats * Amount of Objects)&lt;br /&gt;
&lt;br /&gt;
        0x00    4   u32 ;// Magic Stamp &amp;#039;J.AC&amp;#039; (Joint Animation Content ?)&lt;br /&gt;
        0x04    2   u16 ;// Amount of Frames        &lt;br /&gt;
        0x06    2   u16 ;// Amount of Objects being animated. Should equal to the number of Objects in a model.&lt;br /&gt;
        0x08    4   u32 ;// Unknown  &lt;br /&gt;
        0x0C    4   u32 ;// Offset to Offset1 chunk. Relative to start of this block.&lt;br /&gt;
        0x10    4   u32 ;// Offset to Offset2 chunk. Relative to start of this block.&lt;br /&gt;
&lt;br /&gt;
        0x14    4   u32 ;// Object Info Offset (repeats * Amount of Objects), relative to start of this Joint Section.&lt;br /&gt;
&lt;br /&gt;
        ---- Object Info - Repeats * Number of Objects&lt;br /&gt;
            0x00    2   u16 ;// Flag - Indicates what sort of Transformations are applied.&lt;br /&gt;
            // The format is:&lt;br /&gt;
            // bit:  15..............0&lt;br /&gt;
            //    0 b --zyx-Sr-RZYX-T-&lt;br /&gt;
            // T is Translation&lt;br /&gt;
            // R is Rotation&lt;br /&gt;
            // S is Scale&lt;br /&gt;
            // If these bits are cleared, transformation data follows.&lt;br /&gt;
            //  X, Y, Z, r, x, y, z are flags that identify how the data is stored.&lt;br /&gt;
            0x02    1   u32 ;// Unknown&lt;br /&gt;
            0x03    1   u32 ;// ID Number&lt;br /&gt;
&lt;br /&gt;
        ---- Transformation Info (Translation XYZ, Rotation, Scale XYZ) when set&lt;br /&gt;
&lt;br /&gt;
            0x00    4   u32 ;// Actual value.&lt;br /&gt;
&lt;br /&gt;
        ---- Transformation Info (Translation XYZ, Rotation, Scale XYZ) when cleared&lt;br /&gt;
&lt;br /&gt;
            0x00    2   u16 ;// Unknown - typically 0.&lt;br /&gt;
            0x02    2   u16 ;// Unknown &lt;br /&gt;
            0x04    4   u32 ;// Offset to data. Relative to end Object Info Header (Object Info Offset + 4).&lt;br /&gt;
&lt;br /&gt;
    ---- Offset1 Chunk - Repeats until Offset2&lt;br /&gt;
&lt;br /&gt;
        0x00    2   u16 ;// I&amp;#039;ve seen 36, 32 &amp;amp; 0.&lt;br /&gt;
        0x02    2   s16 ;// Unknown&lt;br /&gt;
        0x04    2   s16 ;// Unknown&lt;br /&gt;
&lt;br /&gt;
    ---- Offset2 Chunk - Repeats until end of file&lt;br /&gt;
&lt;br /&gt;
        // All transformation offsets point somewhere in this section.&lt;br /&gt;
        // It&amp;#039;s clearly broken up into parts (Translation, Rotation &amp;amp; Scale) however I&amp;#039;m not totally sure how data is store in here yet.&lt;br /&gt;
&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table width=100% bgcolor=#d0d0d0&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;4. NSBTP Format&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The NSBTP file format stores texture pattern animation data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;4.1 &amp;#039;PAT0&amp;#039; Block&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;PAT0&amp;#039; Block can be found in NSBTP files, it stores pattern animation data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
NSBTP&lt;br /&gt;
------&lt;br /&gt;
&lt;br /&gt;
struct Nitro_Header;// File identifier is &amp;#039;BTP0&amp;#039; (Basic Texture Pattern animation)&lt;br /&gt;
&lt;br /&gt;
typedef struct Block_PAT0&lt;br /&gt;
{&lt;br /&gt;
    0x00    4   u32 ;// Block identifier: &amp;#039;PAT0&amp;#039; (Pattern Block)&lt;br /&gt;
    0x04    4   u32 ;// Block size&lt;br /&gt;
&lt;br /&gt;
    // Unknown beyond this point&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table width=100% bgcolor=#d0d0d0&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;5. NSBTA Format&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The NSBTA file format stores texture animation data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;5.1 &amp;#039;SRT0&amp;#039; Block&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;SRT0&amp;#039; Block can be found in NSBTA files, texture animation data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
NSBTA&lt;br /&gt;
------&lt;br /&gt;
&lt;br /&gt;
struct Nitro_Header;// File identifier is &amp;#039;BTA0&amp;#039; (Basic Texture Animation)&lt;br /&gt;
&lt;br /&gt;
typedef struct Block_SRT0&lt;br /&gt;
{&lt;br /&gt;
    0x00    4   u32 ;// Block identifier: &amp;#039;SRT0&amp;#039; (??? Block)&lt;br /&gt;
    0x04    4   u32 ;// Block size&lt;br /&gt;
&lt;br /&gt;
    // Unknown beyond this point&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table width=100% bgcolor=#d0d0d0&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;6. NSBMA Format&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The NSBMA file format stores material animation data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;6.1 &amp;#039;MAT0&amp;#039; Block&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;MAT0&amp;#039; Block can be found in NSBMA files, it stores material animation data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
NSBMA&lt;br /&gt;
------&lt;br /&gt;
&lt;br /&gt;
struct Nitro_Header;// File identifier is &amp;#039;BMA0&amp;#039; (Basic Material Animation)&lt;br /&gt;
&lt;br /&gt;
typedef struct Block_MAT0&lt;br /&gt;
{&lt;br /&gt;
    0x00    4   u32 ;// Block identifier: &amp;#039;MAT0&amp;#039; (Material Block)&lt;br /&gt;
    0x04    4   u32 ;// Block size&lt;br /&gt;
&lt;br /&gt;
    // Unknown beyond this point&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table width=100% bgcolor=#d0d0d0&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;7. NSBVA Format&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The NSBVA file format stores general-purpose value animation data perhaps ..?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;7.1 &amp;#039;VIS0&amp;#039; Block&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;VIS0&amp;#039; Block can be found in NSBVA files, it stores value animation data perhaps ..?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
NSBVA&lt;br /&gt;
------&lt;br /&gt;
&lt;br /&gt;
struct Nitro_Header;// File identifier is &amp;#039;BVA0&amp;#039; (Basic ??? Animation)&lt;br /&gt;
&lt;br /&gt;
typedef struct Block_VIS0&lt;br /&gt;
{&lt;br /&gt;
    0x00    4   u32 ;// Block identifier: &amp;#039;VIS0&amp;#039; (??? Block)&lt;br /&gt;
    0x04    4   u32 ;// Block size&lt;br /&gt;
&lt;br /&gt;
    // Unknown beyond this point&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Category:File Formats]]&lt;br /&gt;
[[Category:Model Formats]]&lt;/div&gt;</summary>
		<author><name>Cruiseliu</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.vg-resource.com/index.php?title=Nitro_Files&amp;diff=3363</id>
		<title>Nitro Files</title>
		<link rel="alternate" type="text/html" href="https://wiki.vg-resource.com/index.php?title=Nitro_Files&amp;diff=3363"/>
		<updated>2024-09-21T18:07:22Z</updated>

		<summary type="html">&lt;p&gt;Cruiseliu: fix typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;Nitro Studio Files Specification&amp;lt;/h1&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h2&amp;gt;Current status&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;lt;i&amp;gt;This specification is far from complete, and it may contain errors, since it is the result of reverse-engineering.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;11 August 2007 - First published by kiwi.ds@gmail.com&amp;lt;/li&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;16 April 2019 - Published on the apicula github wiki&amp;lt;/li&amp;gt;&lt;br /&gt;
	&amp;lt;li&amp;gt;19 April 2019 - Added information from LowLines&amp;#039; ConsoleTool doc&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table width=100% bgcolor=#d0d0d0&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;0. Introduction&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Most 3D models found in Nintendo DS games use the following set of Nitro files:&lt;br /&gt;
* `NSBMD` (Nitro Model), which stores polygon models.&lt;br /&gt;
* `NSBTX` (Nitro Texture), which stores texture image and palette data.&lt;br /&gt;
* `NSBCA` (Nitro Character Animation), which stores skeletal animation data.&lt;br /&gt;
* `NSBTP` (Nitro Texture Pattern anim), which stores texture-swap animations.&lt;br /&gt;
* `NSBTA` (Nitro Texture Animation), which stores UV-change animations.&lt;br /&gt;
* `NSBMA` (Nitro Material Animation), which stores material-swap animations.&lt;br /&gt;
* `NSBVA` (Unknown)&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== 0.1 Terminology ===&lt;br /&gt;
&lt;br /&gt;
File format is explained in C-style struct declaration.&lt;br /&gt;
The following types of variables are used:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
s8	1 byte	// signed char&lt;br /&gt;
s16	2 bytes	// signed short&lt;br /&gt;
s32	4 bytes	// signed long&lt;br /&gt;
u8 	1 byte	// unsigned char&lt;br /&gt;
u16	2 bytes	// unsigned short&lt;br /&gt;
u32	4 bytes	// unsigned long&lt;br /&gt;
text    n bytes // ASCII char string&lt;br /&gt;
&lt;br /&gt;
;// The general format for every data field outlined here is:&lt;br /&gt;
--------  -----  ----- ;// ----------------------------------&lt;br /&gt;
Offset  Size  Type ;// Description&lt;br /&gt;
--------  -----  ----- ;// ----------------------------------&lt;br /&gt;
0x00    4     u32  ;// Example&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== 0.2 Nitro Standard File Header ===&lt;br /&gt;
&lt;br /&gt;
Many files (besides sound-related) found in DS ROMs share this header structure:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
** This is the standard DS Nitro header format: any nitro file starts with this.&lt;br /&gt;
*/&lt;br /&gt;
typedef struct Nitro_Header&lt;br /&gt;
{&lt;br /&gt;
    0x00    4   text;// File identifier: can be &amp;#039;SDAT&amp;#039;, &amp;#039;BMD0&amp;#039;, &amp;#039;BTX0&amp;#039;, &amp;#039;BCA0&amp;#039;, etc...&lt;br /&gt;
    0x04    4   u32 ;// Magic stamp: is either 0x0001FEFF or 0x0002FEFF&lt;br /&gt;
    0x08    4   u32 ;// Size of this file (including this struct)&lt;br /&gt;
    0x0C    2   u16 ;// Size of this structure (always 16)&lt;br /&gt;
&lt;br /&gt;
    0x0E    2   u16 ;// Amount of Blocks&lt;br /&gt;
    ---- Offsets (repeats * Amount of Blocks)&lt;br /&gt;
        0x00    4   u32 ;// Block offset #1&lt;br /&gt;
        0x04    4   u32 ;// Block offset #2&lt;br /&gt;
        etc&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== 0.3 General Data Sub-header ===&lt;br /&gt;
&lt;br /&gt;
In addition to the Standard File Header, the following format of &amp;quot;sub-header&amp;quot; is encountered often in NSB__ files:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
** This is the format of the general-purpose headers that are used in many places within nitro files.&lt;br /&gt;
*/&lt;br /&gt;
typedef struct Header&lt;br /&gt;
{&lt;br /&gt;
    0x00    1   u8  ;// dummy 0&lt;br /&gt;
    0x01    1   u8  ;// Amount of objects&lt;br /&gt;
    0x02    2   u16 ;// Size of this Header&lt;br /&gt;
&lt;br /&gt;
    ---- Unknown Section&lt;br /&gt;
        ---- Sub-Header&lt;br /&gt;
            0x00    2   u16 ;// Size of this Sub-Header, always = 8&lt;br /&gt;
            0x02    2   u16 ;// Size of this Unknown Section&lt;br /&gt;
            0x04    4   u32 ;// Constant = 0x0000017f&lt;br /&gt;
        ---- Unknown Data (repeats * Amount of objects)&lt;br /&gt;
            0x08    4   u32 ;// Unknown&lt;br /&gt;
            0x0C    4   u32 ;// ...&lt;br /&gt;
            etc&lt;br /&gt;
&lt;br /&gt;
    ---- Data Info Section&lt;br /&gt;
        ---- Sub-Header&lt;br /&gt;
            0x00    2   u16 ;// Size of each Data entry, always = 4&lt;br /&gt;
            0x02    2   u16 ;// Size of this Data Info Section&lt;br /&gt;
        ---- Data (repeats * Amount of objects)&lt;br /&gt;
            0x04    n   ??? ;// The Data stored here is used for several different things, explained when used.&lt;br /&gt;
            0x04+n  n   ??? ;// ...&lt;br /&gt;
            etc&lt;br /&gt;
&lt;br /&gt;
    ---- Name Section (repeats * Amount of objects)&lt;br /&gt;
        0x00    16  text;// Name of Model&lt;br /&gt;
        0x10    16  text;// ...&lt;br /&gt;
        etc&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table width=100% bgcolor=#d0d0d0&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;1. NSBMD Format&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;It has one or two blocks - &amp;#039;MDL0&amp;#039; and &amp;#039;TEX0&amp;#039;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&amp;#039;MDL0&amp;#039; block is usually found at offset 0x14 (depending on how many &amp;lt;b&amp;gt;block_offset&amp;lt;/b&amp;gt;s there are before it)&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;The &amp;#039;MDL0&amp;#039; block can potentially be followed by a &amp;#039;TEX0&amp;#039; block, or otherwise the &amp;#039;TEX0&amp;#039; block is defined in an external NSBTX file.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;1.1 &amp;#039;MDL0&amp;#039; Block&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
NSBMD&lt;br /&gt;
------&lt;br /&gt;
&lt;br /&gt;
struct Nitro_Header;// File identifier is &amp;#039;BMD0&amp;#039; (Basic Model Data)&lt;br /&gt;
&lt;br /&gt;
typedef struct Block_MDL0&lt;br /&gt;
{&lt;br /&gt;
    0x00    4   u32 ;// Block identifier: &amp;#039;MDL0&amp;#039; (Model Block)&lt;br /&gt;
    0x04    4   u32 ;// Block size&lt;br /&gt;
&lt;br /&gt;
    struct Header;// Model Header: one Header object for each model&lt;br /&gt;
    {// The &amp;#039;Data&amp;#039; for this Header is like so:&lt;br /&gt;
        0x00    4   u32 ;// The offset of Model_1, relative to the start of Block_MDL0&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    ---- Model_1 (All offsets are relative to this Model_1 section)&lt;br /&gt;
&lt;br /&gt;
        0x00    4   u32 ;// Size of Model_1 (including these 4 bytes)&lt;br /&gt;
        0x04    4   u32 ;// Offset of Additional Model Data&lt;br /&gt;
        0x08    4   u32 ;// Offset of Texture &amp;amp; Palette Offset&lt;br /&gt;
        0x0C    4   u32 ;// Offset of Display List Start&lt;br /&gt;
        0x10    4   u32 ;// Offset of Display List End&lt;br /&gt;
&lt;br /&gt;
        0x14    1   u8  ;// Unknown&lt;br /&gt;
        0x15    1   u8  ;// Unknown&lt;br /&gt;
        0x16    1   u8  ;// Unknown&lt;br /&gt;
&lt;br /&gt;
        0x17    1   u8  ;// Amount of Objects&lt;br /&gt;
        0x18    1   u8  ;// Amount of Materials&lt;br /&gt;
        0x19    1   u8  ;// Amount of Polygons&lt;br /&gt;
        0x20    4   u32 ;// Unknown&lt;br /&gt;
        0x24    2   u8  ;// Amount of Vertices&lt;br /&gt;
        0x26    2   u8  ;// Amount of Surfaces&lt;br /&gt;
        0x28    2   u8  ;// Amount of Triangles&lt;br /&gt;
        0x2A    2   u8  ;// Amount of Quads&lt;br /&gt;
&lt;br /&gt;
        0x2C    2   s16 ;// Bounding box X (signed fixed point 1.3.12)&lt;br /&gt;
        0x2E    2   s16 ;// Bounding box Y (signed fixed point 1.3.12)&lt;br /&gt;
        0x30    2   s16 ;// Bounding box Z (signed fixed point 1.3.12)&lt;br /&gt;
        0x32    2   s16 ;// Bounding box Width  (signed fixed point 1.3.12)&lt;br /&gt;
        0x34    2   s16 ;// Bounding box Height (signed fixed point 1.3.12)&lt;br /&gt;
        0x36    2   s16 ;// Bounding box Depth  (signed fixed point 1.3.12)&lt;br /&gt;
&lt;br /&gt;
        0x38    4   u32 ;// Runtime use data&lt;br /&gt;
        0x3C    4   u32 ;// Runtime use data&lt;br /&gt;
&lt;br /&gt;
        struct Header;// Object Header: one Header object for each Polygonal Object&lt;br /&gt;
        {// The &amp;#039;Data&amp;#039; for this Header is like so:&lt;br /&gt;
            0x00    4   u32 ;// The offset of Object Definition, relative to the start of this Object Header&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        ---- Object Definition (repeats * Amount of objects)&lt;br /&gt;
&lt;br /&gt;
            In each definition:&lt;br /&gt;
            0x00    1   u8  ;// Transform Flag byte&lt;br /&gt;
            0x01    1   u8  ;// Unknown&lt;br /&gt;
            0x02    1   u8  ;// Unknown&lt;br /&gt;
            0x03    1   u8  ;// Unknown&lt;br /&gt;
&lt;br /&gt;
            // The Transform Flag byte is set up like so:&lt;br /&gt;
            //     bits: 7.......0&lt;br /&gt;
            //        0b NNNN PSRT&lt;br /&gt;
            //&lt;br /&gt;
            // T:  if set, Translation = Identity (No Translation)&lt;br /&gt;
            //     if = 0, then 12 bytes follow:&lt;br /&gt;
            //          0x04    4   s32 ;// Translation X (signed fixed point 1.3.12)&lt;br /&gt;
            //          0x08    4   s32 ;// Translation Y (signed fixed point 1.3.12)&lt;br /&gt;
            //          0x0C    4   s32 ;// Translation Z (signed fixed point 1.3.12)&lt;br /&gt;
            // R:  if set, Rotation = Zero (No Rotation)&lt;br /&gt;
            //     if = 0, then depends on the &amp;#039;P&amp;#039; bit.&lt;br /&gt;
            // S:  if set, Scale = Identity (No Scale)&lt;br /&gt;
            //     if = 0, then 12 bytes follow:&lt;br /&gt;
            //          0x04    4   s32 ;// Scale X (signed fixed point 1.3.12)&lt;br /&gt;
            //          0x08    4   s32 ;// Scale Y (signed fixed point 1.3.12)&lt;br /&gt;
            //          0x0C    4   s32 ;// Scale Z (signed fixed point 1.3.12)&lt;br /&gt;
            // P:  if = 0 and R = 0, then 16 bytes follow:&lt;br /&gt;
            //          0x00    4   s32 ;// Rotation A&lt;br /&gt;
            //          0x04    4   s32 ;// Rotation B&lt;br /&gt;
            //          0x08    4   s32 ;// Rotation C&lt;br /&gt;
            //          0x0C    4   s32 ;// Rotation D&lt;br /&gt;
            //     if set, Pivot exists- so 4 bytes follow:&lt;br /&gt;
            //          0x04    2   s16 ;// value A (signed fixed point 1.3.12)&lt;br /&gt;
            //          0x06    2   s16 ;// value B (signed fixed point 1.3.12)&lt;br /&gt;
            //     NNNN = Pivot matrix type (0..8)&lt;br /&gt;
            //     0:  | 1  0  0|  1:  | 0  1  0|  2:  | 0  0  1|&lt;br /&gt;
            //         | 0  A  B|      | A  0  B|      | A  B  0|&lt;br /&gt;
            //         | 0  B -A|      | B  0 -A|      | B -A  0|&lt;br /&gt;
            //&lt;br /&gt;
            //     3:  | 0  A  B|  4:  | A  0  B|  5:  | A  B  0|&lt;br /&gt;
            //         | 1  0  0|      | 0  1  0|      | 0  0  1|&lt;br /&gt;
            //         | 0  B -A|      | B  0 -A|      | B -A  0|&lt;br /&gt;
            //&lt;br /&gt;
            //     6:  | 0  A  B|  7:  | A  0  B|  8:  | A  B  0|&lt;br /&gt;
            //         | 0  B -A|      | B  0 -A|      | B -A  0|&lt;br /&gt;
            //         | 1  0  0|      | 0  1  0|      | 0  0  1|&lt;br /&gt;
&lt;br /&gt;
        ---- Bone/Skeleton Section&lt;br /&gt;
&lt;br /&gt;
            0x00    ?   definitions;&lt;br /&gt;
&lt;br /&gt;
            // Each definition consists of 1 Command Byte + Parameters. Each Parameter is 1 byte.&lt;br /&gt;
            // &lt;br /&gt;
            // Command  Params  Description&lt;br /&gt;
            // 0x06     3       params: Object ID, Parent ID, dummy 0&lt;br /&gt;
            // 0x26     4       params: Object ID, Parent ID, dummy 0, Stack ID&lt;br /&gt;
            // 0x46     4       params: Object ID, Parent ID, dummy 0, Stack ID&lt;br /&gt;
            // 0x66     5       params: Object ID, Parent ID, dummy 0, Stack ID, Restore ID&lt;br /&gt;
            // &lt;br /&gt;
            // 0x00     0       NOP (empty command)&lt;br /&gt;
            // 0x01     0       End of Bone/Skeleton Section&lt;br /&gt;
            // 0x02     2       params: Node ID, Visibility&lt;br /&gt;
            // 0x03     1       Set Polygon Stack ID?&lt;br /&gt;
            // 0x04     3       params: Material ID, 0x5, Polygon ID&lt;br /&gt;
            // 0x05     1       ??&lt;br /&gt;
            // 0x06     3       params: Object ID, Parent ID, Dummy 0&lt;br /&gt;
            // 0x07     1       ??&lt;br /&gt;
            // 0x08     1       ??&lt;br /&gt;
            // 0x09     8       ??&lt;br /&gt;
            // &lt;br /&gt;
            // 0x0B     0       BEGIN (indicate begin of Polygon/Material pairing)&lt;br /&gt;
            // 0x2B     0       END (indicate end of Polygon/Material pairing)&lt;br /&gt;
            // &lt;br /&gt;
            // These are Material/Polygon pairing commands, 4 bytes.&lt;br /&gt;
            // The lower nibble of 2nd Paramter must be 5.&lt;br /&gt;
            // 0x04     3       Material ID, 05, Polygon ID&lt;br /&gt;
            // 0x24     3       ...&lt;br /&gt;
            // 0x44     3       ...&lt;br /&gt;
&lt;br /&gt;
        ---- Texture &amp;amp; Palette Offset&lt;br /&gt;
&lt;br /&gt;
            0x00    2   u16 ;// Offset of Texture Section (relative to Texture &amp;amp; Palette Offset)&lt;br /&gt;
            0x02    2   u16 ;// Offset of Palette Section (relative to Texture &amp;amp; Palette Offset)&lt;br /&gt;
&lt;br /&gt;
        ---- Material Section&lt;br /&gt;
&lt;br /&gt;
            struct Header;// Material Header: one Header object for each material&lt;br /&gt;
            {// The &amp;#039;Data&amp;#039; for this Header is like so:&lt;br /&gt;
                0x00    4   u32 ;// The offset of Material Definition, relative to the start of this Material Section&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
            ---- Texture Section&lt;br /&gt;
&lt;br /&gt;
                struct Header;// Texture Header: one Header object for each texture&lt;br /&gt;
                {// The u32 &amp;#039;Data&amp;#039; for this Header is like so:&lt;br /&gt;
                    0x00    2   u16 ;// Offset of Matching Data (relative to Texture &amp;amp; Palette Offset)&lt;br /&gt;
                    0x02    2   u16 ;// Amount of associated Materials (a texture can be in more than one material)&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
            ---- Palette Section&lt;br /&gt;
&lt;br /&gt;
                struct Header;// Palette Header: one Header object for each palette&lt;br /&gt;
                {// The u32 &amp;#039;Data&amp;#039; for this Header is like so:&lt;br /&gt;
                    0x00    2   u16 ;// Offset of Matching Data (relative to Texture &amp;amp; Palette Offset)&lt;br /&gt;
                    0x02    2   u16 ;// Amount of associated Materials (a palette can be in more than one material)&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
            ---- Material Definition (repeats * Amount of Materials)&lt;br /&gt;
                ;// Usually 48 bytes for each material&lt;br /&gt;
&lt;br /&gt;
        ---- Polygon Section&lt;br /&gt;
&lt;br /&gt;
            struct Header;// Polygon Header: one Header object for each material&lt;br /&gt;
            {// The &amp;#039;Data&amp;#039; for this Header is like so:&lt;br /&gt;
                0x00    4   u32 ;// The offset of Polygon Definition, relative to the start of this Polygon Section&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
            ---- Polygon Definition (repeats * Amount of Polygons)&lt;br /&gt;
&lt;br /&gt;
                0x00    4   u32 ;// &lt;br /&gt;
                0x04    4   u32 ;// &lt;br /&gt;
                0x08    4   u32 ;// Offset of Display List, relative to Polygon Definition, see below&lt;br /&gt;
                0x0c    4   u32 ;// Size of Display List&lt;br /&gt;
&lt;br /&gt;
                0x10    4   u32 ;// &lt;br /&gt;
                0x14    4   u32 ;// &lt;br /&gt;
                0x18    4   u32 ;// Offset of Display List, relative to Polygon Definition, see below&lt;br /&gt;
                0x1c    4   u32 ;// Size of Display List&lt;br /&gt;
&lt;br /&gt;
                ...&lt;br /&gt;
&lt;br /&gt;
            ---- Display List&lt;br /&gt;
                // The Display List is actually packed geometry command.&lt;br /&gt;
                // See the DStek specification for more information:&lt;br /&gt;
                // http://www.akkit.org/info/gbatek.htm#ds3dvideo&lt;br /&gt;
&lt;br /&gt;
    ---- Model_2&lt;br /&gt;
        ...&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table width=100% bgcolor=#d0d0d0&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;2. NSBTX Format&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The NSBTX file format stores texture image and palette information.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;2.1 &amp;#039;TEX0&amp;#039; Block&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;TEX0&amp;#039; Block can be found in certain NSBMD files, not just in NSBTX files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
NSBTX&lt;br /&gt;
------&lt;br /&gt;
&lt;br /&gt;
struct Nitro_Header;// File identifier is &amp;#039;BTX0&amp;#039; (Basic Texture)&lt;br /&gt;
&lt;br /&gt;
typedef struct Block_TEX0&lt;br /&gt;
{&lt;br /&gt;
    0x00    4   u32 ;// Block identifier: &amp;#039;TEX0&amp;#039; (Texture Block)&lt;br /&gt;
    0x04    4   u32 ;// Block size&lt;br /&gt;
&lt;br /&gt;
    ---- Texture Header&lt;br /&gt;
&lt;br /&gt;
        0x08    4   u32 ;// Padding (= 0)&lt;br /&gt;
        0x0C    2   u16 ;// Texture Data Size (bitshift &amp;lt;&amp;lt; 3)&lt;br /&gt;
        0x0E    2   u16 ;// Texture Info Offset (0x3C)&lt;br /&gt;
&lt;br /&gt;
        0x10    4   u32 ;// Padding (= 0) &lt;br /&gt;
        0x14    4   u32 ;// Texture Data Offset&lt;br /&gt;
        0x18    4   u32 ;// Padding (= 0) &lt;br /&gt;
        0x1C    2   u16 ;// Compressed Texture Data Size (bitshift &amp;lt;&amp;lt; 3)&lt;br /&gt;
        0x1E    2   u16 ;// Compressed Texture Info Offset (0x3C)&lt;br /&gt;
&lt;br /&gt;
        0x20    4   u32 ;// Padding (= 0)&lt;br /&gt;
        0x24    4   u32 ;// Compressed Texture Data Offset&lt;br /&gt;
        0x28    4   u32 ;// Compressed Texture Info Data Offset&lt;br /&gt;
        0x2C    4   u32 ;// Padding (= 0)&lt;br /&gt;
        0x30    4   u32 ;// Palette Data Size (bitshift &amp;lt;&amp;lt; 3)&lt;br /&gt;
        0x34    4   u32 ;// Palette Info Offset&lt;br /&gt;
        0x38    4   u32 ;// Palette Data Offset&lt;br /&gt;
&lt;br /&gt;
    ---- Texture Info Section&lt;br /&gt;
&lt;br /&gt;
        struct Header;// Texture Header: one Header object for each texture&lt;br /&gt;
        {// The u32 &amp;#039;Data&amp;#039; for this Header is like so:&lt;br /&gt;
            0x00    2   u16 ;// (bitshift &amp;lt;&amp;lt; 3) Texture Offset, relative to the start of Texture Data&lt;br /&gt;
            0x02    2   u16 ;// Parameters&lt;br /&gt;
            // The format is:&lt;br /&gt;
            // bit:  15..............0&lt;br /&gt;
            //    0 b --CFFFHHHWWW----&lt;br /&gt;
            // where:&lt;br /&gt;
            // C = Palette ID&lt;br /&gt;
            // F = Format (0-7)&lt;br /&gt;
            // H = Height (8 &amp;lt;&amp;lt; Height)&lt;br /&gt;
            // W = Width (8 &amp;lt;&amp;lt; Width)&lt;br /&gt;
            // &lt;br /&gt;
            // To Calculate the Data Size of a Texture:&lt;br /&gt;
            // Bit Depth = Format:&amp;lt;0, 8, 2, 4, 8, 2, 8, 16&amp;gt;&lt;br /&gt;
            // Width * Height * BitDepth / 8&lt;br /&gt;
            0x04    1   u8  ;// Width (should match W &amp;lt;&amp;lt; 3)&lt;br /&gt;
            0x05    1   u8  ;// Unknown (is 0x00 or 0x80)&lt;br /&gt;
            0x06    1   u8  ;// Height? (can be 0, 1, 2, 4, 8)&lt;br /&gt;
            0x07    1   u8  ;// Unknown (is 0x80)    &lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
    ---- Palette Info Section&lt;br /&gt;
&lt;br /&gt;
        struct Header;// Palette Header: one Header object for each palette&lt;br /&gt;
        {// The u32 &amp;#039;Data&amp;#039; for this Header is like so:&lt;br /&gt;
            0x00    2   u16 ;// (bitshift &amp;lt;&amp;lt; 3) Palette Offset, relative to the start of Palette Data&lt;br /&gt;
            0x00    2   u16 ;// Unknown (is 0 or 1)&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
    ---- Texture Data Section&lt;br /&gt;
&lt;br /&gt;
    ---- Compressed Texture Data Section&lt;br /&gt;
&lt;br /&gt;
    ---- Compressed Texture Info Data Section&lt;br /&gt;
&lt;br /&gt;
    ---- Palette Data Section&lt;br /&gt;
&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table width=100% bgcolor=#d0d0d0&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;3. NSBCA Format&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The NSBCA file format stores character skeletal animation data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;3.1 &amp;#039;JNT0&amp;#039; Block&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;JNT0&amp;#039; Block can be found in NSBCA files, it stores bone/joint animation data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
NSBCA&lt;br /&gt;
------&lt;br /&gt;
&lt;br /&gt;
struct Nitro_Header;// File identifier is &amp;#039;BCA0&amp;#039; (Basic Character Animation)&lt;br /&gt;
&lt;br /&gt;
typedef struct Block_JNT0&lt;br /&gt;
{&lt;br /&gt;
    0x00    4   u32 ;// Block identifier: &amp;#039;JNT0&amp;#039; (Joint Block)&lt;br /&gt;
    0x04    4   u32 ;// Block size&lt;br /&gt;
&lt;br /&gt;
    struct Header;// Joint Header: one Header object for each joint&lt;br /&gt;
    {// The &amp;#039;Data&amp;#039; for this Header is like so:&lt;br /&gt;
        0x00    4   u32 ;// The offset of Joint_1, relative to the start of Block_JNT0&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    ---- Joint Section (repeats * Amount of Objects)&lt;br /&gt;
&lt;br /&gt;
        0x00    4   u32 ;// Magic Stamp &amp;#039;J.AC&amp;#039; (Joint Animation Content ?)&lt;br /&gt;
        0x04    2   u16 ;// Amount of Frames        &lt;br /&gt;
        0x06    2   u16 ;// Amount of Objects being animated. Should equal to the number of Objects in a model.&lt;br /&gt;
        0x08    4   u32 ;// Unknown  &lt;br /&gt;
        0x0C    4   u32 ;// Offset to Offset1 chunk. Relative to start of this block.&lt;br /&gt;
        0x10    4   u32 ;// Offset to Offset2 chunk. Relative to start of this block.&lt;br /&gt;
&lt;br /&gt;
        0x14    4   u32 ;// Object Info Offset (repeats * Amount of Objects), relative to start of this Joint Section.&lt;br /&gt;
&lt;br /&gt;
        ---- Object Info - Repeats * Number of Objects&lt;br /&gt;
            0x00    2   u16 ;// Flag - Indicates what sort of Transformations are applied.&lt;br /&gt;
            // The format is:&lt;br /&gt;
            // bit:  15..............0&lt;br /&gt;
            //    0 b --zyx-Sr-RZYX-T-&lt;br /&gt;
            // T is Translation&lt;br /&gt;
            // R is Rotation&lt;br /&gt;
            // S is Scale&lt;br /&gt;
            // If these bits are cleared, transformation data follows.&lt;br /&gt;
            //  X, Y, Z, r, x, y, z are flags that identify how the data is stored.&lt;br /&gt;
            0x02    1   u32 ;// Unknown&lt;br /&gt;
            0x03    1   u32 ;// ID Number&lt;br /&gt;
&lt;br /&gt;
        ---- Transformation Info (Translation XYZ, Rotation, Scale XYZ) when set&lt;br /&gt;
&lt;br /&gt;
            0x00    4   u32 ;// Actual value.&lt;br /&gt;
&lt;br /&gt;
        ---- Transformation Info (Translation XYZ, Rotation, Scale XYZ) when cleared&lt;br /&gt;
&lt;br /&gt;
            0x00    2   u16 ;// Unknown - typically 0.&lt;br /&gt;
            0x02    2   u16 ;// Unknown &lt;br /&gt;
            0x04    4   u32 ;// Offset to data. Relative to end Object Info Header (Object Info Offset + 4).&lt;br /&gt;
&lt;br /&gt;
    ---- Offset1 Chunk - Repeats until Offset2&lt;br /&gt;
&lt;br /&gt;
        0x00    2   u16 ;// I&amp;#039;ve seen 36, 32 &amp;amp; 0.&lt;br /&gt;
        0x02    2   s16 ;// Unknown&lt;br /&gt;
        0x04    2   s16 ;// Unknown&lt;br /&gt;
&lt;br /&gt;
    ---- Offset2 Chunk - Repeats until end of file&lt;br /&gt;
&lt;br /&gt;
        // All transformation offsets point somewhere in this section.&lt;br /&gt;
        // It&amp;#039;s clearly broken up into parts (Translation, Rotation &amp;amp; Scale) however I&amp;#039;m not totally sure how data is store in here yet.&lt;br /&gt;
&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table width=100% bgcolor=#d0d0d0&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;4. NSBTP Format&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The NSBTP file format stores texture pattern animation data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;4.1 &amp;#039;PAT0&amp;#039; Block&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;PAT0&amp;#039; Block can be found in NSBTP files, it stores pattern animation data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
NSBTP&lt;br /&gt;
------&lt;br /&gt;
&lt;br /&gt;
struct Nitro_Header;// File identifier is &amp;#039;BTP0&amp;#039; (Basic Texture Pattern animation)&lt;br /&gt;
&lt;br /&gt;
typedef struct Block_PAT0&lt;br /&gt;
{&lt;br /&gt;
    0x00    4   u32 ;// Block identifier: &amp;#039;PAT0&amp;#039; (Pattern Block)&lt;br /&gt;
    0x04    4   u32 ;// Block size&lt;br /&gt;
&lt;br /&gt;
    // Unknown beyond this point&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table width=100% bgcolor=#d0d0d0&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;5. NSBTA Format&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The NSBTA file format stores texture animation data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;5.1 &amp;#039;SRT0&amp;#039; Block&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;SRT0&amp;#039; Block can be found in NSBTA files, texture animation data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
NSBTA&lt;br /&gt;
------&lt;br /&gt;
&lt;br /&gt;
struct Nitro_Header;// File identifier is &amp;#039;BTA0&amp;#039; (Basic Texture Animation)&lt;br /&gt;
&lt;br /&gt;
typedef struct Block_SRT0&lt;br /&gt;
{&lt;br /&gt;
    0x00    4   u32 ;// Block identifier: &amp;#039;SRT0&amp;#039; (??? Block)&lt;br /&gt;
    0x04    4   u32 ;// Block size&lt;br /&gt;
&lt;br /&gt;
    // Unknown beyond this point&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table width=100% bgcolor=#d0d0d0&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;6. NSBMA Format&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The NSBMA file format stores material animation data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;6.1 &amp;#039;MAT0&amp;#039; Block&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;MAT0&amp;#039; Block can be found in NSBMA files, it stores material animation data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
NSBMA&lt;br /&gt;
------&lt;br /&gt;
&lt;br /&gt;
struct Nitro_Header;// File identifier is &amp;#039;BMA0&amp;#039; (Basic Material Animation)&lt;br /&gt;
&lt;br /&gt;
typedef struct Block_MAT0&lt;br /&gt;
{&lt;br /&gt;
    0x00    4   u32 ;// Block identifier: &amp;#039;MAT0&amp;#039; (Material Block)&lt;br /&gt;
    0x04    4   u32 ;// Block size&lt;br /&gt;
&lt;br /&gt;
    // Unknown beyond this point&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table width=100% bgcolor=#d0d0d0&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;h2&amp;gt;7. NSBVA Format&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The NSBVA file format stores general-purpose value animation data perhaps ..?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;7.1 &amp;#039;VIS0&amp;#039; Block&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;VIS0&amp;#039; Block can be found in NSBVA files, it stores value animation data perhaps ..?&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
NSBVA&lt;br /&gt;
------&lt;br /&gt;
&lt;br /&gt;
struct Nitro_Header;// File identifier is &amp;#039;BVA0&amp;#039; (Basic ??? Animation)&lt;br /&gt;
&lt;br /&gt;
typedef struct Block_VIS0&lt;br /&gt;
{&lt;br /&gt;
    0x00    4   u32 ;// Block identifier: &amp;#039;VIS0&amp;#039; (??? Block)&lt;br /&gt;
    0x04    4   u32 ;// Block size&lt;br /&gt;
&lt;br /&gt;
    // Unknown beyond this point&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
[[Category:File Formats]]&lt;br /&gt;
[[Category:Model Formats]]&lt;/div&gt;</summary>
		<author><name>Cruiseliu</name></author>
		
	</entry>
</feed>