Bundle 2/Need for Speed Most Wanted: Difference between revisions
Updated descriptions, added game changer info, and corrected memory types (added per-platform types)
(Added summary.) |
(Updated descriptions, added game changer info, and corrected memory types (added per-platform types)) |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 2:
= Memory types =
= Structures =
Line 15 ⟶ 9:
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x4 || char[4] || macMagicNumber ||
|-
| 0x4 || 0x2 || uint16_t || muVersion ||
|-
| 0x6 || 0x2 || uint16_t || muPlatform || Platform the bundle is built for || See [[#Platform|Platform]]
|-
| 0x8 || 0x4 || uint32_t || muDebugDataOffset ||
|-
| 0xC || 0x4 || uint32_t || muResourceEntriesCount || Number of
|-
| 0x10 || 0x4 || uint32_t || muResourceEntriesOffset || Resource entries offset ||
|-
| 0x14 || 0x10 || uint32_t[4] || mauResourceDataOffset ||
|-
| 0x24 || 0x4 || uint32_t || muFlags || Bundle flags || See [[#CgsResource::BundleV2::eBundleFlags|eBundleFlags]]
Line 39 ⟶ 33:
=== CgsResource::BundleV2::ResourceEntry ===
Entries are sorted sequentially by, from highest to lowest level:
# Stream offset
# Index from ID (if Game Changer)
# Resource type from ID (if Game Changer)
# ID type
# Resource ID (lower 32 bits)
{| class="wikitable"
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x8 || [[#CgsResource::ID|ID]] || mResourceId ||
|-
| 0x8 || 0x10 || uint32_t[4] || mauUncompressedSizeAndAlignment ||
|-
| 0x18 || 0x10 || uint32_t[4] || mauSizeAndAlignmentOnDisk ||
|-
| 0x28 || 0x10 || uint32_t[4] || mauDiskOffset ||
|-
| 0x38 || 0x4 || uint32_t || muImportOffset || Imports offset ||
|-
| 0x3C || 0x4 || uint32_t || muResourceTypeId ||
|-
| 0x40 || 0x2 || uint16_t || muImportCount || Number of imports ||
|-
| 0x42 || 0x1 || uint8_t || muFlags ||
|-
| 0x43 || 0x1 || uint8_t || muStreamOffset || Stream index || Per-
|-
| 0x44 || 0x4 || || ||
|}
=== CgsResource::BundleV2::ImportEntry ===
Import entries are appended to the resource data.
{| class="wikitable"
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x8 || [[#CgsResource::ID|ID]] || mResourceId ||
|-
| 0x8 || 0x4 || uint32_t || muImportTypeAndOffset || Offset of the pointer to be set at runtime || See [[#CgsResource::BundleV2::eImportType|import type]]
|-
| 0xC || 0x4 || || ||
|}
Line 78 ⟶ 81:
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x8 || [[#CgsResource::ID::CHash|CHash]] || mHash || Resource ID ||
|}
===
This is a specific type of ID which is not an explicitly defined structure, but stores extra information in the high bits of the ID.
{| class="wikitable"
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 ||
|-
| 0x1 || 0x1 || uint8_t || || Index ||
|-
| 0x2 || 0x2 || uint16_t || || Resource type ID || See [[Resource Types (Need for Speed)|resource types]]<br>Does not always match the entry's muResourceTypeId field
|-
| 0x4 || 0x4 || uint32_t || || Resource ID/Game changer ID || ID tracked by the game database. See [[UniqueId]]
|}
Line 101 ⟶ 112:
! Name !! Value !! Comments
|-
|
|-
|
|-
|
|-
| ? || 4 || PlayStation Vita
|-
| ? || 5 || Wii U
|}
Line 120 ⟶ 135:
| E_FLAGS_NON_ASYNCH_FIXUP_REQUIRED || 0x4 ||
|-
| E_FLAGS_MULTISTREAM_BUNDLE || 0x8 || More than one stream is used
|-
| E_FLAGS_DELTA_BUNDLE || 0x10 || Contains additions to a base bundle
Line 137 ⟶ 152:
=== CgsResource::ID::EIdType ===
{| class="wikitable"
! Name !! Value !! Comments
Line 143 ⟶ 157:
| E_ID_TYPE_NORMAL || 0x0 || Lowercase resource name CRC32 hash
|-
| E_ID_TYPE_GAMECHANGER || 0x1 || See [[#
|-
| E_ID_TYPE_RESOURCE_LIST || 0x80 ||
|-
| E_ID_TYPE_DELTA_BUNDLE || 0xC0 || Additions to a base
|}
=== EMemoryType ===
==== PlayStation 3, PlayStation Vita ====
{| class="wikitable"
! Name !! Value !! Comments
|-
| E_MEMTYPE_MAIN || 0 ||
|-
| E_MEMTYPE_GRAPHICS_SYSTEM || 1 ||
|-
| E_MEMTYPE_GRAPHICS_LOCAL || 2 ||
|-
| E_MEMTYPE_DISPOSABLE || 3 ||
|-
| E_MEMTYPE_NUMTYPES || 4 ||
|}
==== Xbox 360 ====
{| class="wikitable"
! Name !! Value !! Comments
|-
| E_MEMTYPE_MAIN || 0 ||
|-
| E_MEMTYPE_PHYSICAL? || 1 || PHYSICAL
|-
| E_MEMTYPE_DISPOSABLE || 2 ||
|-
| ? || 3 || DUMMY
|-
| E_MEMTYPE_NUMTYPES || 4 ||
|}
==== PC ====
{| class="wikitable"
! Name !! Value !! Comments
|-
| E_MEMTYPE_MAIN || 0 ||
|-
| E_MEMTYPE_DISPOSABLE || 1 ||
|-
| ? || 2 || DUMMY
|-
| ? || 3 || DUMMY
|-
| E_MEMTYPE_NUMTYPES || 4 ||
|}
==== Wii U ====
{| class="wikitable"
! Name !! Value !! Comments
|-
| E_MEMTYPE_MAIN || 0 ||
|-
| ? || 1 || MEM1
|-
| ? || 2 || GRAPHICS_MEM2
|-
| E_MEMTYPE_DISPOSABLE || 3 ||
|-
| E_MEMTYPE_NUMTYPES || 4 ||
|}
|