Profile/Need for Speed Hot Pursuit: Difference between revisions
(Created page.) |
(Improved page structure.) |
||
Line 1: | Line 1: | ||
= Headers, footers and protection = |
|||
This section lists the game-specific headers, footers and protections on the savegame. See the section on the [[Profile#Protection|profile page]] for per-platform protections. |
|||
⚫ | |||
A 4 byte header specifying the length of the database is the first field in the save. All pointers in the database are relative to offset 4 in the file because of this. After the database is {{hex|0x47000}} bytes of null data. Additional data follows on PC. |
|||
⚫ | |||
⚫ | The database is followed by 1024 characters storing the login token. The token is followed by a |
||
After this is a 128-bit hash used for savegame validation. Without recalculating the hash, saves cannot be modified. The algorithm used is currently unknown. |
|||
==== PC (Remastered) ==== |
|||
The database is followed by a space character ({{hex|0x20}}), then the same 128-bit hash as is used in the original PC game. No padding is present. |
|||
==== Other platforms ==== |
|||
No game-specific headers, footers or protections are present on other platforms. |
|||
= Row definitions = |
= Row definitions = |
||
Row definitions define the fields, or columns, used in each table. With different schema versions, new row definitions may be added and existing ones may be altered or removed. |
Row definitions define the fields, or columns, used in each table. With different schema versions, new row definitions may be added and existing ones may be altered or removed. |
||
Line 23: | Line 6: | ||
= Structures = |
= Structures = |
||
=== Savegame === |
|||
This is the overall savegame structure. Only the MUD database itself is defined in Criterion's debugging symbols; the rest is independent research and prone to error. |
|||
==== Playstation 3, Xbox 360, PlayStation 4, Switch ==== |
|||
{| class="wikitable" |
|||
! Offset !! Length !! Type !! Name !! Description !! Comments |
|||
|- |
|||
| 0x0 || 0x4 || uint32_t || ? || Database length || All pointers in the database are relative to offset 0x4 because of this |
|||
|- |
|||
| 0x4 || 0x40000 || [[#Mud::Db|Db]] || ? || MUD database || |
|||
|- |
|||
| 0x40004 || 0x4700C || ? || ? || Unknown data, always null || |
|||
|} |
|||
⚫ | |||
{| class="wikitable" |
|||
! Offset !! Length !! Type !! Name !! Description !! Comments |
|||
|- |
|||
| 0x0 || 0x4 || uint32_t || ? || Database length || All pointers in the database are relative to offset 0x4 because of this |
|||
|- |
|||
| 0x4 || 0x40000 || [[#Mud::Db|Db]] || ? || MUD database || |
|||
|- |
|||
| 0x40004 || 0x4700C || ? || ? || Unknown data, always null || |
|||
|- |
|||
| 0x87010 || 0x410 || ? || ? || EA account/login information || See [[#Account info|account info]] |
|||
|- |
|||
| 0x87420 || 0x10 || ? || ? || 128-bit hash || Used for save validation. Unknown algorithm |
|||
|} |
|||
⚫ | |||
{| class="wikitable" |
|||
! Offset !! Length !! Type !! Name !! Description !! Comments |
|||
|- |
|||
| 0x0 || 0x4 || uint32_t || ? || Database length || All pointers in the database are relative to offset 0x4 because of this |
|||
|- |
|||
| 0x4 || 0x40000 || [[#Mud::Db|Db]] || ? || MUD database || |
|||
|- |
|||
| 0x40004 || 0x4700C || ? || ? || Unknown data, always null || |
|||
|- |
|||
| 0x87010 || 0x1 || char || ? || Unused. Replaces account info || Always 0x20 |
|||
|- |
|||
| 0x87011 || 0x10 || ? || ? || 128-bit hash || Used for save validation. Unknown algorithm. Not padded |
|||
|} |
|||
=== Mud::Db === |
=== Mud::Db === |
||
==== 32-bit ==== |
==== 32-bit ==== |
||
Line 193: | Line 220: | ||
|- |
|- |
||
| 0x8 || 0x4 || int32_t || miNumPages || || Always 0x22F |
| 0x8 || 0x4 || int32_t || miNumPages || || Always 0x22F |
||
|} |
|||
=== Account info === |
|||
⚫ | '''PC only.''' The database is followed by 1024 characters storing the login token. The token is followed by a {{hex|0x10}}-long chunk which stores a 32-bit integer with value <code>2</code>, 4 bytes of padding, and a 64-bit integer (or 32-bit with 4 bytes padding) which is presumably the account ID. |
||
{| class="wikitable" |
|||
! Offset !! Length !! Type !! Name !! Description !! Comments |
|||
|- |
|||
| 0x0 || 0x400 || char[1024] || ? || Token || |
|||
|- |
|||
| 0x400 || 0x4 || uint32_t || ? || Version? || |
|||
|- |
|||
| 0x404 || 0x4 || || || Padding || |
|||
|- |
|||
| 0x408 || 0x8 || uint64_t || ? || EA account ID || Possibly uint32_t followed by 4 bytes of padding |
|||
|} |
|} |
||
Revision as of 22:31, 13 March 2023
Row definitions
Row definitions define the fields, or columns, used in each table. With different schema versions, new row definitions may be added and existing ones may be altered or removed.
Although row definitions are best read programmatically with the rest of the database, the structures they define are provided in a subpage for those who want to read them manually.
Row definitions |
Structures
Savegame
This is the overall savegame structure. Only the MUD database itself is defined in Criterion's debugging symbols; the rest is independent research and prone to error.
Playstation 3, Xbox 360, PlayStation 4, Switch
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x4 | uint32_t | ? | Database length | All pointers in the database are relative to offset 0x4 because of this |
0x4 | 0x40000 | Db | ? | MUD database | |
0x40004 | 0x4700C | ? | ? | Unknown data, always null |
PC
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x4 | uint32_t | ? | Database length | All pointers in the database are relative to offset 0x4 because of this |
0x4 | 0x40000 | Db | ? | MUD database | |
0x40004 | 0x4700C | ? | ? | Unknown data, always null | |
0x87010 | 0x410 | ? | ? | EA account/login information | See account info |
0x87420 | 0x10 | ? | ? | 128-bit hash | Used for save validation. Unknown algorithm |
PC (Remastered)
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x4 | uint32_t | ? | Database length | All pointers in the database are relative to offset 0x4 because of this |
0x4 | 0x40000 | Db | ? | MUD database | |
0x40004 | 0x4700C | ? | ? | Unknown data, always null | |
0x87010 | 0x1 | char | ? | Unused. Replaces account info | Always 0x20 |
0x87011 | 0x10 | ? | ? | 128-bit hash | Used for save validation. Unknown algorithm. Not padded |
Mud::Db
32-bit
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x1 | uint8_t | muFormatVersion | Always 2 | |
0x1 | 0x3 | Padding | |||
0x4 | 0x4 | uint32_t | muSchemaVersion | Schema version | 1 on PC and 360, 5 on PS3 |
0x8 | 0x100 | uint8_t[256] | mauReserved | ||
0x108 | 0x4 | ArrayList<Table, 200>* | mTables | Database tables | Always 0x180 |
0x10C | 0x8 | Allocator | mPageAllocator | Database allocation |
64-bit
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x1 | uint8_t | muFormatVersion | Always 2 | |
0x1 | 0x3 | Padding | |||
0x4 | 0x4 | uint32_t | muSchemaVersion | Schema version | 8 in HPR |
0x8 | 0x100 | uint8_t[256] | mauReserved | ||
0x108 | 0x8 | ArrayList<Table, 200>* | mTables | Database tables | Always 0x180 |
0x110 | 0xC | Allocator | mPageAllocator | Database allocation |
Mud::Table
32-bit
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0xD | char[13] | macName | Table name | |
0xD | 0x3 | Padding | |||
0x10 | 0x178 | RowDef | mRowDef | Row | |
0x188 | 0x4 | Page* | mpFirstPage | ||
0x18C | 0x4 | Allocator* | mpAllocator | Always 0x10C | |
0x190 | 0xB8 | uint8_t[184] | mauDefaultRow | Default values | Data length is same as row size |
64-bit
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0xD | char[13] | macName | Table name | |
0xD | 0x3 | Padding | |||
0x10 | 0x178 | RowDef | mRowDef | Row | |
0x188 | 0x8 | Page* | mpFirstPage | ||
0x190 | 0x8 | Allocator* | mpAllocator | Always 0x110 | |
0x198 | 0xB8 | uint8_t[184] | mauDefaultRow | Default values | Data length is same as row size |
Mud::RowDef
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x2 | uint16_t | mRowSize | Number of columns | |
0x2 | 0x2 | Padding | |||
0x4 | 0x174 | ColumnList | mColumns | Columns |
Mud::Column
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0xD | char[13] | macName | Name | |
0xD | 0x1 | uint8_t | muType | Field type | See type |
0xE | 0x2 | uint16_t | muRowOffset | Offset in structure |
Mud::Page
32-bit
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x10 | Header | mHeader | ||
0x10 | 0xEC | uint8_t[236] | mBody | ||
0xFC | 0x4 | Footer | mFooter |
64-bit
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x18 | Header | mHeader | ||
0x18 | 0xE4 | uint8_t[228] | mBody | ||
0xFC | 0x4 | Footer | mFooter |
Mud::Page::Header
32-bit
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x4 | Page* | mpNext | Next node | |
0x4 | 0x4 | Table* | mpTable | Type | |
0x8 | 0x2 | uint16_t | muNextAllocation | Length | |
0xA | 0x2 | Padding | |||
0xC | 0x4 | uint32_t | muSentinelPre |
64-bit
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x8 | Page* | mpNext | Next node | |
0x8 | 0x8 | Table* | mpTable | Type | |
0x10 | 0x2 | uint16_t | muNextAllocation | Length | |
0x12 | 0x2 | padding | |||
0x14 | 0x4 | uint32_t | muSentinelPre |
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x4 | uint32_t | muSentinelPost |
Mud::Allocator
32-bit
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x4 | Page* | mpaPages | Always 0x1CA00 | |
0x4 | 0x4 | int32_t | miNumPages | Always 0x236 |
64-bit
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x8 | Page* | mpaPages | Always 0x1D080 | |
0x8 | 0x4 | int32_t | miNumPages | Always 0x22F |
Account info
PC only. The database is followed by 1024 characters storing the login token. The token is followed by a 0x10-long chunk which stores a 32-bit integer with value 2
, 4 bytes of padding, and a 64-bit integer (or 32-bit with 4 bytes padding) which is presumably the account ID.
Offset | Length | Type | Name | Description | Comments |
---|---|---|---|---|---|
0x0 | 0x400 | char[1024] | ? | Token | |
0x400 | 0x4 | uint32_t | ? | Version? | |
0x404 | 0x4 | Padding | |||
0x408 | 0x8 | uint64_t | ? | EA account ID | Possibly uint32_t followed by 4 bytes of padding |
Typedefs
Mud::RowDef::ColumnList
Name | Type | Length | Comments |
---|---|---|---|
ColumnList | MudArrayList<Column, 23>::type | 0x174 |
Mud::MudArrayList<Mud::Column, 23>::type
Name | Type | Length | Comments |
---|---|---|---|
type | ArrayList<Column, 23> | 0x174 |
Enumerations
Mud::EType
Name | Value | Comments |
---|---|---|
E_TYPE_INT32 | 0 | |
E_TYPE_FLOAT | 1 | |
E_TYPE_INT16 | 2 | |
E_TYPE_INT8 | 3 | |
E_TYPE_INT64 | 4 | |
E_TYPE_BOOL | 5 | |
E_TYPE_UINT8 | 6 | |
E_TYPE_UINT16 | 7 | |
E_TYPE_UINT32 | 8 | |
E_TYPE_UINT64 | 9 | |
E_TYPE_STRING | 10 | |
E_TYPE_COUNT | 11 |