(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
Burnout Paradise uses the constant KAC_BINARY_MEMORY_MAP 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.
By editing the memory map, not only can larger resources be used, more resources can be as well because the limits on numbers of resources are placed in the map. Thus, any larger mods or efforts to improve the quality of certain assets may require altering it.
Modification
As a real-world use case, this section uses editing the OpenWorldPhy pool as an example.
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 memory map structure. From here, go to the pools offset (all offsets are relative to the start of the map), find the 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 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 blocks with the result. Save and run the game. Note: Sizes must be a multiple of the number of banks.