Profile/Burnout Revenge: Difference between revisions

Content added Content deleted
mNo edit summary
(Updated with Xbox info.)
 
Line 7: Line 7:
All profiles use EA's proprietary MC02 header to protect the data. Following any edits, the profile must be rehashed using a program such as [https://www.thetechgame.com/Downloads/id=175971/mc02-package-tool.html MC02 Package Tool].
All profiles use EA's proprietary MC02 header to protect the data. Following any edits, the profile must be rehashed using a program such as [https://www.thetechgame.com/Downloads/id=175971/mc02-package-tool.html MC02 Package Tool].


The following information is from symbols in [[Burnout Revenge (Alpha 7 build)]]. Signature_t is a typedef of uint32_t.
The following information is from symbols in [[Burnout Revenge (Alpha 7 build)]], Dead Space 2 (2010-11-19 build), and The Godfather (2006-04-10 build).

==== PlayStation 2, Xbox 360 ====
Signature_t is a typedef of uint32_t. It is used to hold CRC32 checksums. The algorithm used is nonstandard. See [https://gist.github.com/Experiment5X/5025310 this gist] for an example implementation.


{| class="wikitable"
{| class="wikitable"
Line 22: Line 25:
| 0xC || 0x4 || uint32_t || mUserBodySize || Save data length in bytes ||
| 0xC || 0x4 || uint32_t || mUserBodySize || Save data length in bytes ||
|-
|-
| 0x10 || 0x4 || Signature_t || mUserHeaderSignature || Save header CRC32 ||
| 0x10 || 0x4 || Signature_t || mUserHeaderSignature || Save header signature ||
|-
|-
| 0x14 || 0x4 || Signature_t || mUserBodySignature || Save data CRC32 ||
| 0x14 || 0x4 || Signature_t || mUserBodySignature || Save data signature ||
|-
|-
| 0x18 || 0x4 || Signature_t || mFileHeaderSignature || MC02 header CRC32 || Hashes everything prior to this field
| 0x18 || 0x4 || Signature_t || mFileHeaderSignature || MC02 header signature || Hashes everything prior to this field
|}
|}


==== Xbox ====
The CRC32 algorithm used is nonstandard. See [https://gist.github.com/Experiment5X/5025310 this gist] for an example implementation.
Identical to normal MC02 but with HMAC-SHA1 signatures (denoted by the XCALC_SIGNATURE type) instead of CRC32.


=== Checksum ===
A proprietary checksum is appended to each profile for validation purposes. This is calculated by summing every 4 bytes (read as unsigned 32-bit integers) in the [[#CB4SaveGameData|CB4SaveGameData]] structure, excluding the checksum itself and any padding after it.

= Structures =
=== Data ===
This defines the de facto structure of the save file. The game does not treat it as a structure, instead reading the names and saves into the memory card manager, which is what the information below is based on.

==== PlayStation 2 ====
{| class="wikitable"
{| class="wikitable"
|+ RealmcCore::FileHeader
|-
! Offset !! Length !! Type !! Name !! Description !! Comments
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
|-
| 0x0 || 0x4 || uint32_t || mFileHeaderVersion || Magic || Must be 'MC02'<br />MC = Memory Card<br />02 = version 2
| 0x0 || 0xC0 || GtUTF8[3][64] || maaSaveNames || Save names ||
|-
|-
| 0x4 || 0x4 || uint32_t || mFileSize || Length of the save in bytes || Includes the MC02 header
| 0xC0 || 0x4FE0 || [[#CB4SaveGameData|CB4SaveGameData]][3] || maSaveGameData || Saves ||
|}

==== Xbox ====
{| class="wikitable"
! Offset !! Length !! Type !! Name !! Description !! Comments
|-
|-
| 0x0 || 0x30 || ? || ? || 384-bit key? || Multiplayer-related?
| 0x8 || 0x4 || uint32_t || mUserHeaderSize || Save header length in bytes ||
|-
|-
| 0x30 || 0xC0 || GtUTF8[3][64] || maaSaveNames || Save names ||
| 0xC || 0x4 || uint32_t || mUserBodySize || Save data length in bytes ||
|-
|-
| 0x10 || 0x14 || XCALC_SIGNATURE || mUserHeaderSignature || Save header signature ||
| 0xF0 || 0x5010 || [[#CB4SaveGameData|CB4SaveGameData]][3] || maSaveGameData || Saves ||
|-
| 0x24 || 0x14 || XCALC_SIGNATURE || mUserBodySignature || Save data signature ||
|-
| 0x38 || 0x14 || XCALC_SIGNATURE || mFileHeaderSignature || MC02 header signature || Hashes everything prior to this field
|}
|}


==== Xbox 360 ====
=== Checksum ===
A proprietary checksum is appended to each profile for validation purposes. This is calculated by summing every 4 bytes (read as unsigned 32-bit integers) in the [[#CB4SaveGameData|CB4SaveGameData]] structure, excluding the checksum itself and any padding after it.

Xbox has an additional checksum after the aforementioned checksum. It uses the same algorithm as the MC02 signatures.

= Structures =
=== Data ===
The following table defines the de facto structure of the save file. The game does not treat it as a structure, instead separately reading the names and saves into the memory card manager.

{| class="wikitable"
{| class="wikitable"
! Offset !! Length !! Type !! Name !! Description !! Comments
! Offset !! Length !! Type !! Name !! Description !! Comments
Line 64: Line 69:
| 0x0 || 0xC0 || GtUTF8[3][64] || maaSaveNames || Save names ||
| 0x0 || 0xC0 || GtUTF8[3][64] || maaSaveNames || Save names ||
|-
|-
| 0xC0 || 0x5268 || [[#CB4SaveGameData|CB4SaveGameData]][3] || maSaveGameData || Saves ||
| 0xC0 || Platform dependent || [[#CB4SaveGameData|CB4SaveGameData]][3] || maSaveGameData || Saves ||
|}
|}


Line 95: Line 100:
| 0x1A98 || 0x4 || RwUInt32 || munCheckSum || ||
| 0x1A98 || 0x4 || RwUInt32 || munCheckSum || ||
|-
|-
| 0x1A9C || 0x4 || ? || ? || Padding? ||
| 0x1A9C || 0x14 || ? || ? || HMAC-SHA1 checksum ||
|-
| 0x1AA0 || 0x10 || ? || ? || 128-bit key? || Multiplayer-related?
|}
|}