AEMS Bank

From Burnout Wiki
Revision as of 07:45, 29 September 2023 by Burninrubber0 (talk | contribs) (Created page.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
AemsBank
aka AEMS Bank
No Example
Resource names Unknown
Type ID 0xA022
Category Sound
Memory
distribution
Main Memory only
Imports Unknown
Imported by Unknown
Editor
available?
Partial decoder (audio only)
Use NFS_abk_decode*
*Requires manual header removal
Hmmm...
Hmmm...
To do:
This documentation is incomplete and I'm not sure it can realistically be completed without the source code. Some of it seems to be assembly, which makes sense given AEMS and CSIS are said to use glue code. I might come back to this at some point and give it another shot. -Burninrubber0

Audio Event Management System (AEMS) banks contain event-driven sounds such as boost, in-air, skid, and scrape effects.

Structures

Note: AEMS banks begin with a Binary File resource.

AemsDef::ModuleBank

[1]

PlayStation 3, PlayStation 4, Switch

Offset Length Type Name Description Comments
0x0 0x4 char[4] id ABKC
0x4 0x1 uchar ver 1
0x5 0x1 uchar veraimexmajor 1
0x6 0x1 uchar veraimexminor 2
0x7 0x1 uchar veraimexpatch 2
0x8 0x1 uchar platform See platform
0x9 0x1 uchar targetType See TargetType
0xA 0x2 unsigned short nummodules Always 1
0xC 0x4 int debugcrc Always null
0x10 0x4 int uniqueid Always null
0x14 0x4 int totalsize Total AEMS bank size, not including BinaryFile header
0x18 0x4 int residentsize Total size of the portion residing in memory Always the portion before the SFX bank
0x1C 0x4 int moduleoffset AEMS module See Module
0x20 0x4 int sfxbankoffset SND10 SFX sample bank See Snd10SampleBankHeader
0x24 0x4 int sfxbanksizepadded SFX bank size padded to 4 bytes
0x28 0x4 int midibankoffset
0x2C 0x4 int midibanksizepadded
0x30 0x4 int funcfixupoffset See FUNCFIXUPHEADER
0x34 0x4 int staticdatafixupoffset See STATICDATAFIXUPHEADER
0x38 0x4 int interfaceOffset See InterfaceFixupHeader
0x3C 0x4 int modulebankhandle
0x40 0x4 int padTo64Bit1
0x44 0x4 Snd10SampleBankHeader* pSnd10SampleBankHeader
0x48 0x4 int midibhandle
0x4C 0x4 int padTo64Bit2
0x50 0x4 int padTo64Bit3
0x54 0x4 char* streamfilepath
0x58 0x4 int streamfileoffset
0x5C 0x4 int padTo64Bit4
0x60 0x10 CListDNode ln
0x70 0x4 int padTo64Bit5
0x74 0x4 TWEAKHEADER* ptweakheader

Xbox 360, PC

Offset Length Type Name Description Comments
0x0 0x4 char[4] id ABKC
0x4 0x1 uchar ver 1
0x5 0x1 uchar veraimexmajor 1
0x6 0x1 uchar veraimexminor 2
0x7 0x1 uchar veraimexpatch 2
0x8 0x1 uchar platform See platform
0x9 0x1 uchar targetType See TargetType
0xA 0x2 unsigned short nummodules Always 1
0xC 0x4 int debugcrc Always null
0x10 0x4 int uniqueid Always null
0x14 0x4 int totalsize Total AEMS bank size, not including BinaryFile header
0x18 0x4 int residentsize Total size of the portion residing in memory Always the portion before the SFX bank
0x1C 0x4 int moduleoffset AEMS module See Module
0x20 0x4 int sfxbankoffset SND10 SFX sample bank See Snd10SampleBankHeader
0x24 0x4 int sfxbanksizepadded SFX bank size padded to 4 bytes
0x28 0x4 int midibankoffset
0x2C 0x4 int midibanksizepadded
0x30 0x4 int funcfixupoffset See FUNCFIXUPHEADER
0x34 0x4 int staticdatafixupoffset See STATICDATAFIXUPHEADER
0x38 0x4 int interfaceOffset See InterfaceFixupHeader
0x3C 0x4 int modulebankhandle
0x40 0x4 Snd10SampleBankHeader* pSnd10SampleBankHeader
0x44 0x4 int midibhandle
0x48 0x4 char* streamfilepath
0x4C 0x4 int streamfileoffset
0x50 0x8 CListDNode ln
0x58 0x4 TWEAKHEADER* ptweakheader

AemsDef::Module

Modules are immediately followed by an array (aligned to 8 bytes) of the player offsets.

PlayStation 3, PlayStation 4, Switch

Offset Length Type Name Description Comments
0x0 0x4 int id Module ID Effectively a bank ID in Burnout
0x4 0x4 int padTo64Bit1
0x8 0x10 ClassHandle classHandle
0x18 0x20 ClassConstructorClient constructorClient Csis class constructor client
0x38 0x2 short curinstances
0x3A 0x2 short maxinstances
0x3C 0x2 unsigned short numGlobals
0x3E 0x2 unsigned short numFunctions
0x40 0x1 uchar numPlayers
0x41 0x1 uchar classDestructorPresent
0x42 0x1 uchar classDataPresent
0x43 0x1 uchar numClassControllers
0x44 0x4 int padTo64Bit2
0x48 0x4 int padTo64Bit3
0x4C 0x4 TIMERCLIENTFN* pcode
0x50 0x4 int padTo64Bit4
0x54 0x4 void* pdata
0x58 0x4 int datasize
0x5C 0x4 int destroydataoffset
0x60 0x8 CListDStack moduleInstance

Xbox 360, PC

Offset Length Type Name Description Comments
0x0 0x4 int id Module ID Effectively a bank ID in Burnout
0x4 0x8 ClassHandle classHandle Csis class handle
0xC 0x10 ClassConstructorClient constructorClient Csis class constructor client
0x1C 0x2 short curinstances
0x1E 0x2 short maxinstances
0x20 0x2 unsigned short numGlobals
0x22 0x2 unsigned short numFunctions
0x24 0x1 uchar numPlayers
0x25 0x1 uchar classDestructorPresent
0x26 0x1 uchar classDataPresent
0x27 0x1 uchar numClassControllers
0x28 0x4 TIMERCLIENTFN* pcode
0x2C 0x4 void* pdata
0x30 0x4 int datasize
0x34 0x4 int destroydataoffset
0x38 0x4 CListDStack moduleInstance

Csis::ClassHandle

[1]

PlayStation 3, PlayStation 4, Switch

Offset Length Type Name Description Comments
0x0 0x4 int padTo64Bit1
0x4 0x4 void* mpPrivate
0x8 0x4 int mKey
0xC 0x4 int padTo64Bit2

Xbox 360, PC

Offset Length Type Name Description Comments
0x0 0x4 void* mpPrivate
0x4 0x4 int mKey

Csis::ClassConstructorClient

[1]

PlayStation 3, PlayStation 4, Switch

Offset Length Type Name Description Comments
0x0 0x8 void*[2] reserved
0x8 0x8 int[2] padTo64Bit1
0x10 0x4 int padTo64Bit2
0x14 0x4 void* pClientFunc Anonymous function.
Takes Csis::Class*, Csis::Parameter*, and void* arguments
0x18 0x4 int padTo64Bit3
0x1C 0x4 void* pClientData

Xbox 360, PC

Offset Length Type Name Description Comments
0x0 0x8 void*[2] reserved
0x8 0x4 void* pClientFunc Anonymous function.
Takes Csis::Class*, Csis::Parameter*, and void* arguments
0xC 0x4 void* pClientData

CListDStack

[1]

PlayStation 3, PlayStation 4, Switch

Offset Length Type Name Description Comments
0x0 0x4 int padTo64Bit1
0x4 0x4 CListDNode* phead

Xbox 360, PC

Offset Length Type Name Description Comments
0x0 0x4 CListDNode* phead

CListDNode

[1]

PlayStation 3, PlayStation 4, Switch

Offset Length Type Name Description Comments
0x0 0x4 int padTo64Bit1
0x4 0x4 CListDNode* pnext
0x8 0x4 int padTo64Bit2
0xC 0x4 CListDNode* pprev

Xbox 360, PC

Offset Length Type Name Description Comments
0x0 0x4 CListDNode* pnext
0x4 0x4 CListDNode* pprev

AemsDef::FUNCFIXUPHEADER

Offset Length Type Name Description Comments
0x0 0x4 int numfixups
0x4 0x4 uint[1] fixup

AemsDef::STATICDATAFIXUPHEADER

Offset Length Type Name Description Comments
0x0 0x4 int numfixups
0x4 0x4 uint[1] fixup

AemsDef::InterfaceFixupHeader

Offset Length Type Name Description Comments
0x0 0x4 int numFixups
0x4 0xC InterfaceReference[1] reference

AemsDef::InterfaceReference

Offset Length Type Name Description Comments
0x0 0x4 int handleOffset
0x4 0x4 int IDOffset Points to a 4-byte hash followed by a string
0x8 0x1 uchar type See InterfaceType
0x9 0x3 char[3] pad

AemsDef::Snd10SampleBankHeader

[1]

Offset Length Type Name Description Comments
0x0 0x4 uchar[4] id
0x4 0x1 uchar version
0x5 0x1 char pad
0x6 0x2 unsigned short serialNumber
0x8 0x4 int numSamples

AemsDef::TWEAKHEADER

[2]

Offset Length Type Name Description Comments
0x0 0x4 char[4] id
0x4 0x1 unsigned char ver
0x5 0x1 unsigned char platform
0x6 0x2 char[2] pad
0x8 0x4 int crc
0xC 0x4 int numcomponents

Typedefs

TIMERCLIENTFN

Name Type Length Comments
TIMERCLIENTFN uint 0x4

Enumerations

Platform

[1][2]

Name Value Comments
? 0 PC
? 1
? 2 PlayStation 2
? 3 Xbox
? 4 GameCube
? 5 Xbox 360
? 6
? 7
? 8
? 9
PLATFORM_PS3 10 PlayStation 3, PlayStation 4, Switch
? 11
? 12
? 13
? 14
? 15
PLATFORM_MAX 16

AemsDef::TargetType

[1]

Name Value Comments
TARGETTYPE_ORIGINAL 0
TARGETTYPE_UNCOMPRESSEDPROXY 1
TARGETTYPE_SND9 2
TARGETTYPE_SND10 3

AemsDef::InterfaceType

[1]

Name Value Comments
INTERFACETYPE_GLOBALVARIABLE 0
INTERFACETYPE_CLASS 1
INTERFACETYPE_FUNCTION 2

References

  1. 1.0 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 "Need for Speed: The Run." EA. Debugging symbols in NFS.Main_Ps3_Release_unsigned.elf. Built September 1, 2011.
  2. 2.0 2.1 "abktool." xan1242. Accessed May 11, 2023. https://github.com/xan1242/abktool.