XNA Game Studio 4.0 XNB: Difference between revisions

From XentaxWiki
Jump to navigation Jump to search
imported>Ikskoks
imported>Ikskoks
 
(40 intermediate revisions by the same user not shown)
Line 4: Line 4:
* ''' Format Type ''':    Archive <br>  
* ''' Format Type ''':    Archive <br>  
* ''' [http://en.wikipedia.org/wiki/Endianness Endian Order] ''': Little Endian <br>
* ''' [http://en.wikipedia.org/wiki/Endianness Endian Order] ''': Little Endian <br>
* ''' Signature ''':    XNB <br>




Line 18: Line 19:
                                 // "m" - Windows Phone 7
                                 // "m" - Windows Phone 7
                                 // "x" - XBOX 360
                                 // "x" - XBOX 360
                                // "d" - Windows??
                                // "S" - Nintendo Switch
                                // "v" - PlayStation Vita
1 byte (uint8) - XNB format version  // 5 = XNA Game Studio 4.0
1 byte (uint8) - XNB format version  // 5 = XNA Game Studio 4.0
1 byte (uint8) - flags  // bit 0x01 - content is for HiDef profile (otherwise Reach)
1 byte (uint8) - flags  // bit 0x01 - content is for HiDef profile (otherwise Reach)
Line 39: Line 43:
}
}


// data
7BitEncodedInt - shared resource count
7BitEncodedInt - shared resource count
 
primary asset data
x bytes - primary asset data
{
  7BitEncodedInt - resource type  // e.g. 1 - Microsoft.Xna.Framework.Graphics.Texture2D
  x bytes - resource data
}


shared_resource_count *
shared_resource_count *
Line 49: Line 58:
</pre>
</pre>
</div>
</div>
=== MultiEx BMS Script ===
Not written yet.
=== QuickBMS Script ===
* [http://aluigi.altervista.org/bms/xnb.bms xnb.bms]


=== Notes and Comments ===  
=== Notes and Comments ===  


None.
* Some files may be compressed with '''LZ4''' or with '''Xbox XMemCompress''' compression.


=== Games ===  
=== Games ===  
List of games using this file format:
List of games using this file format:
* Bleed (PC) (*.XNB)
* Bleed 2 (PC) (*.XNB)
* Bloody Trapland (PC) (*.XNB)
* Bloody Trapland (PC) (*.XNB)
* Bury me, my Love (PC) (*.XNB)
* Celeste (PC) (*.XNB)
* Plants vs zombies (for Windows Phone 7)
* Plants vs zombies (for Windows Phone 7)
* TowerFall Ascension (PC) (*.XNB)
* Many more...
* Many more...
=== QuickBMS Script ===
* [http://aluigi.altervista.org/bms/xnb.bms xnb.bms]


=== Compatible Programs ===  
=== Compatible Programs ===  
Line 76: Line 86:
* [https://github.com/TimothyCates/XNB_Kit XNB Kit]
* [https://github.com/TimothyCates/XNB_Kit XNB Kit]
* [https://drive.google.com/file/d/12WsIpXc26jMe4-6O2gDyI9IOz7tEW3_T/view?usp=sharing xnbdec]
* [https://drive.google.com/file/d/12WsIpXc26jMe4-6O2gDyI9IOz7tEW3_T/view?usp=sharing xnbdec]
* [https://github.com/LeonBlade/xnbcli xnbcli]


=== See Also ===  
=== See Also ===  
Line 85: Line 96:
[[Category:Complete Complete|XNA Game Studio 4.0 XNB]]
[[Category:Complete Complete|XNA Game Studio 4.0 XNB]]
[[Category:Platform XBOX|XNA Game Studio 4.0 XNB]]
[[Category:Platform XBOX|XNA Game Studio 4.0 XNB]]
[[Category:Platform PSVITA|XNA Game Studio 4.0 XNB]]
[[Category:Platform Nintendo Switch|XNA Game Studio 4.0 XNB]]
[[Category:Platform X360|XNA Game Studio 4.0 XNB]]
[[Category:CE Compressed|XNA Game Studio 4.0 XNB]]
[[Category:CE Compressed|XNA Game Studio 4.0 XNB]]
[[Category:Format_Archive | Type: Archive]]
[[Category:Format_Archive | Type: Archive]]
[[Category:Extension_xnb | Extension: xnb]]
[[Category:Extension_xnb | Extension: xnb]]
[[Category:LZ4 compression]]
[[Category:File Format]]
[[Category:File Format]]

Latest revision as of 12:51, 27 December 2022

Back to index | Edit this page

XNB

  • Format Type : Archive
  • Endian Order : Little Endian
  • Signature : XNB


Format Specifications

// XNB file format
// little endian

//header
3 bytes (char) - signature // "XNB"
1 byte (char) - target platform // "w" - Microsoft Windows
                                // "m" - Windows Phone 7
                                // "x" - XBOX 360
                                // "d" - Windows??
                                // "S" - Nintendo Switch
                                // "v" - PlayStation Vita
1 byte (uint8) - XNB format version  // 5 = XNA Game Studio 4.0
1 byte (uint8) - flags   // bit 0x01 - content is for HiDef profile (otherwise Reach)
                         // bit 0x80 - asset data is compressed
4 bytes (uint32) - total file size
if compressed_flag == True:
    4 bytes (uint32) - uncompressed file size


// Note: If the file is compressed (flag bit 0x80 is set), data from this point on 
// is packed using the Xbox XMemCompress API


// type manifest
7BitEncodedInt - type reader count
type_reader_count *
{
   7BitEncodedInt - string length
   x bytes (char) - type reader name  // e.g. "Microsoft.Xna.Framework.Content..."
   4 bytes (int32) - reader version number  // e.g. 0
}


// data
7BitEncodedInt - shared resource count
primary asset data
{
   7BitEncodedInt - resource type   // e.g. 1 - Microsoft.Xna.Framework.Graphics.Texture2D
   x bytes - resource data
}

shared_resource_count *
{
   x bytes - shared resource data
}

Notes and Comments

  • Some files may be compressed with LZ4 or with Xbox XMemCompress compression.

Games

List of games using this file format:

  • Bleed (PC) (*.XNB)
  • Bleed 2 (PC) (*.XNB)
  • Bloody Trapland (PC) (*.XNB)
  • Bury me, my Love (PC) (*.XNB)
  • Celeste (PC) (*.XNB)
  • Plants vs zombies (for Windows Phone 7)
  • TowerFall Ascension (PC) (*.XNB)
  • Many more...

QuickBMS Script

Compatible Programs

See Also