XDBF: Difference between revisions
imported>Stoker25 mNo edit summary |
imported>Stoker25 (im high, so my wording might seem confusing) |
||
Line 83: | Line 83: | ||
|} | |} | ||
= Free Space Table = | |||
The '''Free Space Table''' is used to map out the unused space within the file. It is updated whenever a change is made, as the last entry contains information about the entire file. Each entry in the Free Space Table is composed of the offset in the file and how much space is unused there. The final entry in the free space table is calculated by making the value of the Offset being the size of the entries data (length of the entire file - beginning of the entry data), with the Length being the negative of that (e.g., 2345 and -2345). | |||
== Free Space Entry Structure == | |||
Total length: 8 bytes | |||
{| border=1 | |||
|- | |||
! Offset | |||
! Length | |||
! Type | |||
! Information | |||
|- | |||
| 0x0 | |||
| 0x4 | |||
| signed int | |||
| Offset | |||
|- | |||
| 0x4 | |||
| 0x4 | |||
| signed int | |||
| Length | |||
|} | |||
= Entry Data Offset = | |||
To work out the real entry data offset, times the '''Entry Table Length''' by 0x12, then times the '''Free Space Table Length''' by 0x8 and add the results both together, then add 0x18. This is where the beginning of the entry data begins, then add the offset specified by the entry to get the real offset. | |||
[[Category:File formats]] | [[Category:File formats]] |
Revision as of 03:58, 17 August 2010
XDBF files are used by the Xbox 360 as a generic database of sorts. It is used as the format for GPD (Gamer Profile Data) and SPA (Statistics, Presence and Achievements) files. SPA files are linked into an Xbox 360 executable during compilation and are used by the dashboard to generate the GPD files inside profiles and for Xbox LIVE information.
Header
Total length: 24 bytes (0x18)
Byte ordering: Dependant on magic.
Offset | Length | Type | Information |
---|---|---|---|
0x0 | 0x4 | ascii string | Magic (0x58444246) |
0x4 | 0x2 | unsigned short | Version (0x1) |
0x6 | 0x2 | unsigned short | Reserved |
0x8 | 0x4 | unsigned int | Entry Table Length (in number of entries) |
0xC | 0x4 | unsigned int | Entry Count |
0x10 | 0x4 | unsigned int | Free Space Table Length (in number of entries) |
0x14 | 0x4 | unsigned int | Free Space Table Entry Count |
Entry Table
The Entry Table is made up of different entries, each one under a different type.
Entry Structure
Total length: 18 bytes (0x12)
Offset | Length | Type | Information |
---|---|---|---|
0x0 | 0x2 | signed short | Type (see below) |
0x2 | 0x8 | signed long | ID |
0xA | 0x4 | signed int | Offset (not the real one, see below) |
0xE | 0x4 | signed int | Length |
Free Space Table
The Free Space Table is used to map out the unused space within the file. It is updated whenever a change is made, as the last entry contains information about the entire file. Each entry in the Free Space Table is composed of the offset in the file and how much space is unused there. The final entry in the free space table is calculated by making the value of the Offset being the size of the entries data (length of the entire file - beginning of the entry data), with the Length being the negative of that (e.g., 2345 and -2345).
Free Space Entry Structure
Total length: 8 bytes
Offset | Length | Type | Information |
---|---|---|---|
0x0 | 0x4 | signed int | Offset |
0x4 | 0x4 | signed int | Length |
Entry Data Offset
To work out the real entry data offset, times the Entry Table Length by 0x12, then times the Free Space Table Length by 0x8 and add the results both together, then add 0x18. This is where the beginning of the entry data begins, then add the offset specified by the entry to get the real offset.