The Bundle container is the core file format used in development builds of Burnout 5/Paradise, Black (Xbox 360), and Black 2 (Xbox 360). It is not used in any retail titles. Each Bundle holds one or more resources (assets) and contains information about each resource, such as its size, type, compression, alignment, and so on.
The Bundle format underwent at least five iterations during its use from early 2006 to early-mid 2007. At present, only files using Bundle version 3, 4, and 5 have been discovered. It was succeeded by the Bundle 2 container.
Overview[edit | edit source]
Bundles are used for nearly every asset in Burnout Paradise. This makes it one of the most important formats to understand when attempting to parse assets.
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 size, alignment, 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, it consists of XML data headed by the
ResourceStringTable element and contains the ID, name, and type name of every resource in a respective bundle. This means that where debug data is present, every resource name is known. Despite this, 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.
Memory types[edit | edit source]
Across all Bundle versions, a common theme is the use of separate data chunks to define what memory type resources are loaded into. On Xbox 360, these chunks are as follows:
- Main Memory
- Disposable uninitialized
Keep these in mind when viewing the structures.
Structures[edit | edit source]
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.
CgsResource::BundleHeaderBase[edit | edit source]
Bundle[edit | edit source]
|0x4||0x4||uint32_t||muVersion||Bundle version||3 in base, 4 in V4, 5 in V5|
|0x8||0x4||uint32_t||muResourceEntriesCount||Number of resources in the bundle|
|0xC||0x28||Size and alignment||Size and alignment of each chunk|
|0x34||0x14||uint32_t||Memory address of each chunk|
|0x48||0x4||uint32_t||Resource IDs offset|
|0x4C||0x4||uint32_t||muResourceEntriesOffset||Resource entries offset|
|0x54||0x4||uint32_t||muResourceDataOffset||Resource data offset|
|0x58||0x4||uint32_t||muPlatform||Platform the bundle was built for||See Platform|
ResourceEntry[edit | edit source]
|0x0||0x4||uint32_t||Resource data memory address|
|0x4||0x4||uint32_t||muImportOffset||Bundle imports offset|
|0x8||0x4||uint32_t||muResourceTypeId||Resource type||See ResourceType|
|0xC||0x28||Size and alignment||mauSizeAndAlignmentOnDisk|
|0x34||0x28||Size and alignment||mauDiskOffset||Offsets in bundle||Alignment is unused (always 1)|
|0x5C||0x14||uint32_t||Memory addresses||Swapped endian|
Imports[edit | edit source]
This is not a structure as such; rather, it is
uint32_t muImportCount followed by four bytes of padding, then a set of import entries of an amount defined by the aforementioned count.
ImportEntry[edit | edit source]
|0x0||0x8||ID||mResourceId||Resource name CRC32|
Size and alignment[edit | edit source]
This structure contains fields for size and alignment, though alignment sometimes goes unused. Real name is not known.
|0x0||0x4||uint32_t||Size or offset|
CgsResource::BundleHeaderV4[edit | edit source]
Bundle (Additions)[edit | edit source]
|0x5C||0x4||uint32_t||muFlags||Bundle flags||See Flags|
|0x60||0x4||uint32_t||Number of compressed resources|
|0x64||0x4||uint32_t||Compression information offset|
Compression Information[edit | edit source]
|0x0||0x28||Size and alignment||mauUncompressedSizeAndAlignment|
CgsResource::BundleHeaderV5[edit | edit source]
Bundle (Additions)[edit | edit source]
|0x68||0x4||uint32_t||No idea what this does|
|0x6C||0x4||uint32_t||Also no idea what this does|
Enumerations[edit | edit source]
Platform[edit | edit source]
Flags[edit | edit source]
|IsCompressed||0x1||Resources are zlib compressed|
ResourceType[edit | edit source]
See Resource Types.