Modding/Need for Speed Most Wanted/Memory map

From Burnout Wiki

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[edit | edit source]

CgsMemory::MemoryMap[edit | edit source]

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[edit | edit source]

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

CgsMemory::MemoryMapBaseResource[edit | edit source]

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

CgsMemDescriptor[edit | edit source]

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[edit | edit source]

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[edit | edit source]

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

CgsMemory::MemoryMapLinearAllocator[edit | edit source]

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

CgsMemory::MemoryMapMemLinearAllocator[edit | edit source]

Identical to MemoryMapRawResource.

CgsMemory::MemoryMapHeapAllocator[edit | edit source]

Identical to MemoryMapLinearAllocator.

CgsMemory::MemoryMapRWLinearAllocator[edit | edit source]

Identical to MemoryMapRawResource.

CgsMemory::MemoryMapRWGeneralAllocator[edit | edit source]

Identical to MemoryMapRawResource.

CgsMemory::MemoryMapReservedAllocator[edit | edit source]

Identical to MemoryMapRawResource.

Enumerations[edit | edit source]

EMemCategory[edit | edit source]

PlayStation 3[edit | edit source]

Name Value Comments
E_MEMCAT_MAIN 0 MAIN
E_MEMCAT_VIDEOMAPPED 1 VIDEO MAPPED
E_MEMCAT_VIDEO 2 VIDEO
E_MEMCAT_DISPOSABLE 3 DISPOSABLE
E_MEMCAT_INVALID 4 INVALID
E_MEMCAT_TOTAL 5 TOTAL
E_MEMCAT_NUMCATS 6

EMemoryType[edit | edit source]

PlayStation 3, Vita[edit | edit source]

Name Value Comments
E_MEMTYPE_MAIN 0
E_MEMTYPE_GRAPHICS_SYSTEM 1 GRSYS
E_MEMTYPE_GRAPHICS_LOCAL 2 GRLOCAL
E_MEMTYPE_DISPOSABLE 3
E_MEMTYPE_NUMTYPES 4

Xbox 360[edit | edit source]

Hmmm...
Hmmm...
To do:
Validate these. (Main is not listed in the xex)
Name Value Comments
E_MEMTYPE_MAIN 0
? 1 PHYSICAL
E_MEMTYPE_DISPOSABLE 2
? 3 DUMMY
E_MEMTYPE_NUMTYPES 4

PC[edit | edit source]

Name Value Comments
E_MEMTYPE_MAIN 0
E_MEMTYPE_DISPOSABLE 1
? 2 DUMMY
? 3 DUMMY
E_MEMTYPE_NUMTYPES 4

Wii U[edit | edit source]

Name Value Comments
E_MEMTYPE_MAIN 0
? 1 MEM1
? 2 GRAPHICS_MEM2
E_MEMTYPE_DISPOSABLE 3
E_MEMTYPE_NUMTYPES 4