Modding/Burnout Paradise/Memory map: Difference between revisions

Remove BaseEventReceiverQueue (always nullptr in executable, not documented here)
(List small resource types under enums. Correct 360 and PC base resource types.)
(Remove BaseEventReceiverQueue (always nullptr in executable, not documented here))
 
(2 intermediate revisions by the same user not shown)
Line 1:
[[File:Burnout Paradise Resource Memory Debug crop.png|thumb|400px|Memory usage by collision resources in the OpenWorldPhy pool. Displayed using a debug menu in [[Burnout Paradise (2008-01-3130 build)]].]]
Burnout Paradise uses the constant <code>KAC_BINARY_MEMORY_MAP</code> for memory management. When modding, it may be necessary to increase the size of the memory pools listed in the memory map. This has been the case in the past when repairing partially corrupt development builds and was necessary when the Canary Island mod's development was stalled due to the collision resources exceeding the size of the OpenWorldPhy/OWPhysics pool.
 
Line 9:
The memory map is located in the game's executable. Searching for "Root Bank" and subtracting 0x40 from its start offset will place the cursor at the beginning of the [[#CgsMemory::MemoryMap|memory map structure]]. From here, go to the pools offset (all offsets are relative to the start of the map), find the [[#CgsMemory::MemoryMapPool|pool structure]] with the name "OpenWorldPhy", and change the main memory base resource size to the minimum amount that will satisfy your needs for the foreseeable future. Note the difference between the new and old sizes.
 
Because the OpenWorldPhy bank is a child of the OpenWorld bank, the OpenWorld bank needs to be edited as well. Go to the banks offset and find the [[#CgsMemory::MemoryMapBank|bank structure]] with the name "OpenWorld". Take the size difference you noted earlier, align it to 0x20000, and add it to the main memory base resource size. Divide this size by 0x20000 and replace the number of banksblocks with the result. Save and run the game. '''Note: Sizes must be a multiple of the number of banks.'''
 
= Structures =
Line 175:
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x4 || [[#CgsModule::BaseEventReceiverQueue|BaseEventReceiverQueue]]* || mpUser || User requesting|| theNot event ||documented here
|-
| 0x4 || 0x4 || int32_t || miEventId || ID ||
|-
| 0x8 || 0x4 || int32_t || miPoolId || Pool ID ||
|}
 
=== CgsModule::BaseEventReceiverQueue ===
{| class="wikitable"
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x4 || RwChar* || mpcData || ||
|-
| 0x4 || 0x4 || int32_t || miBufferWritePos || ||
|-
| 0x8 || 0x4 || int32_t || miLength || ||
|-
| 0xc || 0x4 || int32_t || miFirstEventOffset || ||
|-
| 0x10 || 0x4 || int32_t || miBufferSize || ||
|-
| 0x14 || 0x4 || int32_t || miAlignment || ||
|}
 
Line 286 ⟶ 269:
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
| 0x0 || 0x4 || [[#CgsModule::BaseEventReceiverQueue|BaseEventReceiverQueue]]* || mpUser || User requesting|| theNot event ||documented here
|-
| 0x4 || 0x4 || int32_t || mnEventId || Event ID ||