Need for Speed Hot Pursuit uses version 3 of the Bundle format, adding support for an additional memory type, game changer IDs, and delta bundles.
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:
Main Memory
Graphics System
Graphics Local
Disposable
Keep these in mind when viewing the specs below.
Offset
Length
Type
Name
Description
Comments
0x0
0x4
char[4]
macMagicNumber
Bundle magic
bnd2
0x4
0x4
uint32_t
muVersion
Bundle version
3
0x8
0x4
uint32_t
muPlatform
Platform the bundle was built for
See Platform
0xC
0x4
uint32_t
muDebugDataOffset
Bundle debug data offset
ResourceStringTable XML
0x10
0x4
uint32_t
muResourceEntriesCount
Number of resources in the bundle
0x14
0x4
uint32_t
muResourceEntriesOffset
Resource entries offset
0x18
0x4
uint32_t
muResourceDataOffset
Resource data offset
0x24
0x4
uint32_t
muFlags
Bundle flags
See Flags
CgsResource::BundleV2::ResourceEntry [ edit | edit source ]
Offset
Length
Type
Name
Description
Comments
0x0
0x8
ID
mResourceId
Resource game changer ID or name CRC32
Hashed names are all lowercase. Starts with 1 if UniqueId
0x8
0x8
uint64_t
muImportHash
Dependency name(s) CRC32(s)
Multiple are combined with a bitwise OR
0x10
0x10
uint32_t[4]
mauUncompressedSizeAndAlignment
File sizes (uncompressed) for chunks 1-4
Has high nibble for alignment which changes between platforms 1 << [nibble] equals the memory alignment value
0x20
0x10
uint32_t[4]
mauSizeAndAlignmentOnDisk
File sizes (compressed) for chunks 1-4
0x30
0x10
uint32_t[4]
mauDiskOffset
File offsets for chunks 1-4
0x40
0x4
uint32_t
muImportOffset
Imports offset
0x44
0x4
uint32_t
muResourceTypeId
Asset type
See resource types
0x48
0x2
uint16_t
muImportCount
Number of imports
0x4A
0x1
uint8_t
muFlags
Resource flags
Unused?
0x4B
0x1
uint8_t
muStreamIndex
Stream index
Used for having multiple assets with the same ID
CgsResource::BundleV2::ImportEntry [ edit | edit source ]
Offset
Length
Type
Name
Description
Comments
0x0
0x8
ID
mResourceId
Resource game changer ID or name CRC32
Import entries are appended to the end of internal files
0x8
0x4
uint32_t
muOffset
0xC
0x4
padding
Offset
Length
Type
Name
Description
Comments
0x0
0x8
CHash
mHash
Resource ID
Type at 0x0, ID at 0x4. See ID type for type info
Name
Type
Length
Comments
CHash
uint64_t
0x8
Name
Value
Comments
?
1
PC. Reused for all Hot Pursuit Remastered platforms
?
2
Xbox 360
?
3
PlayStation 3
Name
Value
Comments
IsCompressed
0x1
Resources are compressed using zlib
IsMainMemOptimised
0x2
Possibly IsGraphicsMemOptimised. Always used together
IsGraphicsMemOptimised
0x4
Possibly IsMainMemOptimised. Always used together
ContainsDebugData
0x8
Resource string table XML data is present
?
0x10
?
0x20
Likely is multistream bundle
?
0x40
Is delta bundle - contains additions to a base bundle
Hmmm... To do: These are from Most Wanted's symbols and need to be verified in Hot Pursuit.
Name
Value
Comments
E_ID_TYPE_NORMAL
0x0
Lowercase resource name CRC32 hash
E_ID_TYPE_GAMECHANGER
0x1
See UniqueId
E_ID_TYPE_RESOURCE_LIST
0x80
E_ID_TYPE_DELTA_BUNDLE
0xC0
Additions to a base bundle