Bundle 2/Burnout Paradise: Difference between revisions
m
no edit summary
m (Version) |
mNo edit summary |
||
(5 intermediate revisions by 2 users not shown) | |||
Line 6:
= Memory types =
Resources always have data in Main Memory. If the resource is split, headers are loaded into Main Memory, while the other portion is typically loaded into Graphics Local on PS3, Physical on X360, and Disposable on PC and all Remastered variants. '''In resource documentation, these will be simplified to a "secondary" type.''' On PS3, some resources' secondary portion may be loaded into Graphics System; in that case, it will be listed separately.
Note that resources only ever have primary and secondary portions, never a tertiary one. Even in bundles where all three memory types are used, such as <code>SHADERS.BUNDLE</code> on PS3, resources only have two portions.
= Structures =
=== CgsResource::BundleV2 ===
{| class="wikitable"
|-▼
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
Line 24 ⟶ 21:
| 0x4 || 0x4 || uint32_t || muVersion || Bundle version || 2
|-
| 0x8 || 0x4 || uint32_t || muPlatform || Platform the bundle was built for || See [[#Platform|
|-
| 0xC || 0x4 || uint32_t || muDebugDataOffset || Bundle debug data offset || ResourceStringTable XML
Line 32 ⟶ 29:
| 0x14 || 0x4 || uint32_t || muResourceEntriesOffset || Resource entries offset ||
|-
| 0x18 || 0xC || uint32_t[3] || mauResourceDataOffset ||
|-
| 0x24 || 0x4 || uint32_t || muFlags || Bundle flags || See [[#Flags|
|}
=== CgsResource::BundleV2::ResourceEntry ===
Entries are sorted sequentially by resource ID.
{| class="wikitable"
|-▼
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
Line 46 ⟶ 44:
| 0x8 || 0x8 || uint64_t || muImportHash || Dependency name(s) CRC32(s) || Multiple are combined with a bitwise OR
|-
| 0x10 || 0xC || uint32_t[3] || mauUncompressedSizeAndAlignment ||
|-
| 0x1C || 0xC || uint32_t[3] || mauSizeAndAlignmentOnDisk ||
|-
| 0x28 || 0xC || uint32_t[3] || mauDiskOffset ||
|-
| 0x34 || 0x4 || uint32_t || muImportOffset ||
|-
| 0x38 || 0x4 || uint32_t || muResourceTypeId || Resource type || See [[
|-
| 0x3C || 0x2 || uint16_t || muImportCount || Number of imports ||
|-
| 0x3E || 0x1 || uint8_t || muFlags || Resource flags || Unused?
|-
| 0x3F || 0x1 || uint8_t || muStreamIndex || || Unused
|}
Line 66 ⟶ 64:
ImportEntries are appended to the end of resources.
{| class="wikitable"
|-▼
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x8 || [[Resource ID|ID]] || mResourceId ||
|-
| 0x8 || 0x4 || uint32_t || muOffset || Offset of the pointer to be set at runtime ||
|-
| 0xC || 0x4 || || ||
|}
= Enumerations =
=== Platform ===
Three constants used by the platform field.
{| class="wikitable"
|-▼
! Name !! Value !! Comments
|-
| KU_BUNDLE_DX9? || 1 || PC. Reused for all platforms in Remastered
|-
|
|-
|
|}
=== Flags ===
{| class="wikitable"
! Name !! Value !! Comments
|-
▲|-
| ? || 0x2 || Is main mem optimised. Always set same as is graphics mem optimised
▲|-
| ? || 0x4 || Is graphics mem optimised. Always set same as is main mem optimised
▲|-
|
|}
=== CgsResource::ESmallResourceMemType ===
==== PlayStation 3 ====
{| class="wikitable"
! Name !! Value !! Comments
|-
| E_MEMTYPE_MAINMEMORY || 0 ||
▲| IsCompressed || 0x1 || Resources are zlib compressed
|-
| E_MEMTYPE_GRAPHICS_SYSTEM || 1 ||
|-
| E_MEMTYPE_GRAPHICS_LOCAL || 2 ||
|-
| E_MEMTYPE_NUMTYPES || 3 ||
▲| ContainsDebugData || 0x8 || Contains ResourceStringTable/Bundle Imports XML data
|}
====
{| class="wikitable"
! Name !! Value !! Comments
▲|-
| E_MEMTYPE_MAINMEMORY || 0 ||
|-
| ? || 1 || PHYSICAL
|-
| ? || 2 || DUMMY
|-
| E_MEMTYPE_NUMTYPES || 3 ||
|}
==== PC, Remastered ====
{| class="wikitable"
! Name !! Value !! Comments
|-
| E_MEMTYPE_MAINMEMORY || 0
|-
| ? || 1 || DISPOSABLE
|-
| ? || 2 || DUMMY
|-
| E_MEMTYPE_NUMTYPES || 3 ||
|}
|