Modding/Need for Speed Most Wanted/Memory map

Revision as of 15:45, 9 April 2023 by Burninrubber0 (talk | contribs) (Created page.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This page documents the KAC_BINARY_MEMORY_MAP constant in Most Wanted. For a general understanding of what the memory map is and how modding it is relevant, see the page for the memory map in Burnout Paradise.

Structures

CgsMemory::MemoryMap

Offset Length Type Name Description Comments
0x0 0x4 int32_t miVersion 3
0x4 0x4 uint32_t muNumBanks
0x8 0x4 uint32_t muNumPools
0xC 0x4 uint32_t muNumRawResources
0x10 0x4 uint32_t muNumLinearAllocators
0x14 0x4 uint32_t muNumMemLinearAllocators
0x18 0x4 uint32_t muNumHeapAllocators
0x1C 0x4 uint32_t muNumRWLinearAllocators
0x20 0x4 uint32_t muNumRWGeneralAllocators
0x24 0x4 uint32_t muNumReservedAllocators
0x28 0x4 MemoryMapBank* mpBanks
0x2C 0x4 MemoryMapPool* mpPools
0x30 0x4 MemoryMapRawResource* mpRawResources
0x34 0x4 MemoryMapLinearAllocator* mpLinearAllocators
0x38 0x4 MemoryMapMemLinearAllocator* mpMemLinearAllocators
0x3C 0x4 MemoryMapHeapAllocator* mpHeapAllocators
0x40 0x4 MemoryMapRWLinearAllocator* mpRWLinearAllocators
0x44 0x4 MemoryMapRWGeneralAllocator* mpRWGeneralAllocators
0x48 0x4 MemoryMapReservedAllocator* mpReservedAllocators

CgsMemory::MemoryMapBank

Offset Length Type Name Description Comments
0x0 0x28 MemoryMapBaseResource Base
0x28 0x20 CgsMemDescriptor mDescriptor

CgsMemory::MemoryMapBaseResource

Offset Length Type Name Description Comments
0x0 0x20 char[32] macName
0x20 0x4 int32_t miBankId
0x24 0x4 int32_t miParentBankId

CgsMemDescriptor

Offset Length Type Name Description Comments
0x0 0x10 uint32_t[4] mauSizes See EMemoryType and EMemCategory for index names
0x10 0x10 uint32_t[4] mauAlignments See EMemoryType and EMemCategory for index names

CgsMemory::MemoryMapPool

Offset Length Type Name Description Comments
0x0 0x28 MemoryMapBaseResource Base class
0x28 0x8 int8_t[8] maiDependencyIds
0x30 0x1 int8_t miPoolId
0x31 0x1 int8_t miDeletionDelayFrames
0x32 0x1 int8_t miNumDependencies
0x33 0x1 bool mbAllowDefragmentation
0x34 0x1 bool mbUseUncachedGSMemory
0x38 0x20 CgsMemDescriptor mDescriptor
0x58 0x4 uint32_t muUncachedGSSize
0x5C 0x2 uint16_t muMaxResources
0x5E 0x8 uint16_t[4] mauMaxResources See EMemoryType and EMemCategory for index names

CgsMemory::MemoryMapRawResource

Offset Length Type Name Description Comments
0x0 0x28 MemoryMapBaseResource Base class
0x28 0x20 CgsMemDescriptor mDescriptor

CgsMemory::MemoryMapLinearAllocator

Offset Length Type Name Description Comments
0x0 0x28 MemoryMapBaseResource Base class
0x28 0x4 int32_t miSize
0x2C 0x4 int32_t miAlignment

CgsMemory::MemoryMapMemLinearAllocator

Identical to MemoryMapRawResource.

CgsMemory::MemoryMapHeapAllocator

Identical to MemoryMapLinearAllocator.

CgsMemory::MemoryMapRWLinearAllocator

Identical to MemoryMapRawResource.

CgsMemory::MemoryMapRWGeneralAllocator

Identical to MemoryMapRawResource.

CgsMemory::MemoryMapReservedAllocator

Identical to MemoryMapRawResource.

Enumerations

EMemCategory

Name Value Comments
E_MEMCAT_MAIN 0
E_MEMCAT_VIDEOMAPPED 1
E_MEMCAT_VIDEO 2
E_MEMCAT_DISPOSABLE 3
E_MEMCAT_INVALID 4
E_MEMCAT_TOTAL 5
E_MEMCAT_NUMCATS 6

EMemoryType

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