XNA Game Studio 4.0 XNB: Difference between revisions

From XentaxWiki
Jump to navigation Jump to search
imported>Ikskoks
(Created page with "{{GRAFPageHeader}} == XNB == * ''' Format Type ''': Archive <br> * ''' [http://en.wikipedia.org/wiki/Endianness Endian Order] ''': Little Endian <br> === Format Specif...")
 
imported>Ikskoks
 
(58 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 11: Line 12:
<pre>
<pre>
// XNB file format
// XNB file format
// little endian


//header
3 bytes (char) - signature // "XNB"
3 bytes (char) - signature // "XNB"
1 byte (char) - target platform // "w" - Microsoft Windows
1 byte (char) - target platform // "w" - Microsoft Windows
                                 // "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)
                         // bit 0x80 - asset data is compressed
                         // bit 0x80 - asset data is compressed
4 bytes (uint32) - compressed file size
4 bytes (uint32) - total file size
4 bytes (uint32) - uncompressed 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  
// Note: If the file is compressed (flag bit 0x80 is set), data from this point on  
// is packed using the Xbox XMemCompress API
// is packed using the Xbox XMemCompress API


// type manifest
7BitEncodedInt - type reader count
7BitEncodedInt - type reader count
type_reader_count *
type_reader_count *
{
{
   x bytes (char) - type reader name
  7BitEncodedInt - string length
   4 bytes (int32) - reader version number
   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
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 44: Line 59:
</div>
</div>


=== MultiEx BMS Script ===  
=== Notes and Comments ===  


Not written yet.
* 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 ===  
=== QuickBMS Script ===  


* [http://aluigi.altervista.org/bms/xnb.bms xnb.bms]
* [http://aluigi.altervista.org/bms/xnb.bms xnb.bms]
=== Notes and Comments ===
None.
=== Games ===
List of games using this file format:
* TODO


=== Compatible Programs ===  
=== Compatible Programs ===  
Line 67: Line 85:
* [https://github.com/Inari-Whitebear/SimpleXNBDemapper SimpleXNBDemapper]
* [https://github.com/Inari-Whitebear/SimpleXNBDemapper SimpleXNBDemapper]
* [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://github.com/LeonBlade/xnbcli xnbcli]
=== See Also ===
* [https://drive.google.com/file/d/1AX9Cx7Gm6DF-tBk5VHG1P92Pwz7At_Yn/view?usp=sharing XNB file format + parser]
<br/><br>
<br/><br>




[[Category:Complete Complete|XNA Game Studio 4.0 XNB]]
[[Category:Complete Complete|XNA Game Studio 4.0 XNB]]
[[Category:Platform PC|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