Bundle (original): Difference between revisions

Updated layout and some wording in the page to make it more accurate and understandable.
(Added overview section and moved enumerations to subpage, along with other miscellaneous changes and fixes.)
(Updated layout and some wording in the page to make it more accurate and understandable.)
Line 12:
While the header contains some valuable data, such as the flags and chunk offsets, the majority of relevant information is in resource entries, which store the ID, uncompressed and compressed size, alignment, relative offset, and type of each resource in each chunk. These also store the import offsets, which enable importing specific data from other resources.
 
Bundle debug data is also important to understand. Sometimes called Bundle imports, this was originally only available in development builds but, with the release of Remastered, shipped with every Bundle in the game in Remastered. Consisting of XML data headed by the <code>ResourceStringTable</code> element, it contains the ID, name, and type name of every resource in a respective bundle. This means that effectively every resource name in the game hasis a decodable nameknown. Despite this, however, the resource names given by the debug data sometimes do not match the hash when encoded. In some cases, such as with Registry resources, this means the name is hardcoded.
 
= LayoutMemory types =
== Memory types ==
Across all Bundle versions, a common theme is the use of separate data chunks to define what memory type resources are loaded into. These chunks are as follows:
 
Line 32 ⟶ 31:
Keep these in mind when viewing the specs below.
 
== Bundle =Layout =
The original Bundle format's versions were treated more like additions to the previous version. Thus, rather than a full structure for each, only their additions are described here.
 
=== Version 3 ===
=== Bundle ===
{| class="wikitable"
|-
Line 46:
| 0x8 || 0x4 || uint32_t || muResourceEntriesCount || Number of resources in the bundle ||
|-
| 0xC || 0x28 || SizeAndAlignmentUnknown0[5] || || Size and alignment of each chunk ||
|-
| 0x34 || 0x14 || uint32_t[5] || || Memory address of each chunk ||
Line 61:
|}
 
=== Version 4 AdditionsResourceEntry ===
{| class="wikitable"
|-
! Offset !! Size !! Type !! Name !! Description !! Comments
|-
| 0x5C0x0 || 0x4 || uint32_t || muFlags || BundleResource flagsdata ||memory Seeaddress [[Bundle/Enumerations#Flags|Flags]]|
|-
| 0x600x4 || 0x4 || uint32_t || muImportOffset || Number ofBundle compressedimports resourcesoffset ||
|-
| 0x640x8 || 0x4 || uint32_t || muResourceTypeId || CompressionResource information offsettype || See [[Resource Types (Burnout Paradise)|Resource Types]]
|-
| 0xC || 0x28 || SizeAndAlignmentUnknown0[5] || mauSizeAndAlignmentOnDisk || ||
|-
| 0x34 || 0x28 || SizeAndAlignmentUnknown0[5] || mauDiskOffset || Offsets in bundle || Alignment is unused (always 1)
|-
| 0x5C || 0x14 || uint32_t[5] || || Memory addresses || Swapped endian
|}
 
=== Version 5 AdditionsImports ===
{| class="wikitable"
|-
! Offset !! Size !! Type !! Name !! Description !! Comments
|-
| 0x680x0 || 0x4 || uint32_t || muImportCount || Number of imports || No idea what this does
|-
| 0x6C0x8 || 0x4 || uint32_t || || Import entries || AlsoAligned no8. ideaSee what this[[#ImportEntry|ImportEntry]] doesstructure
|}
 
=== SubstructuresImportEntry ===
==== ResourceEntry ====
{| class="wikitable"
|-
! Offset !! Size !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x40x8 || uint32_tID || mResourceId || Resource dataname memory addressCRC32 ||
|-
| 0x40x8 || 0x4 || uint32_t || muImportOffsetmuOffset || Bundle imports offset ||
|-
| 0x80xC || 0x4 || uint32_t || muResourceTypeId || Resource typepadding || See [[Resource Types (Burnout Paradise)|Resource Types]]
|-
| 0xC || 0x28 || SizeAndAlignment[5] || mauSizeAndAlignmentOnDisk || ||
|-
| 0x34 || 0x28 || SizeAndAlignment[5] || mauDiskOffset || Offsets in bundle || Alignment is unused (always 1)
|-
| 0x5C || 0x14 || uint32_t[5] || || Memory addresses || Swapped endian
|}
 
==== ImportsUnknown0 ====
This structure contains fields for size and alignment, though alignment sometimes goes unused.
{| class="wikitable"
|-
! Offset !! Size !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x4 || uint32_t || muImportCount || NumberSize ofor importsoffset ||
|-
| 0x80x4 || 0x4 || uint32_t || || Import entriesAlignment || Aligned 8. See ImportEntry structure
|}
 
==== ImportEntryVersion 4 Additions ====
=== Bundle ===
{| class="wikitable"
|-
! Offset !! Size !! Type !! Name !! Description !! Comments
|-
| 0x00x5C || 0x80x4 || IDuint32_t || mResourceIdmuFlags || ResourceBundle name CRC32flags || See [[Bundle/Enumerations#Flags|Flags]]
|-
| 0x80x60 || 0x4 || uint32_t || muOffset || Number of compressed resources ||
|-
| 0xC0x64 || 0x4 || uint32_t || || paddingCompression information offset ||
|}
 
==== Compression Information ====
{| class="wikitable"
|-
! Offset !! Size !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x28 || SizeAndAlignmentUnknown0[5] || mauUncompressedSizeAndAlignment || ||
|}
 
==== SizeAndAlignmentVersion 5 Additions ====
=== Bundle ===
The official name of this structure is unknown. The name shown is meant to reflect its purpose.
{| class="wikitable"
|-
! Offset !! Size !! Type !! Name !! Description !! Comments
|-
| 0x00x68 || 0x4 || uint32_t || || Size or offset || No idea what this does
|-
| 0x40x6C || 0x4 || uint32_t || || Alignment || Also no idea what this does
|}
 
== Bundle 2 =Layout =
=== Version 2BundleV2 ===
{| class="wikitable"
|-
Line 166 ⟶ 167:
|}
 
=== SubstructuresResourceEntry ===
==== ResourceEntry ====
{| class="wikitable"
|-
Line 193:
|}
 
==== ImportEntry ====
{| class="wikitable"
|-