Comments and corrections welcomed.
Madden NFL database file format
Header (starts at 0)
- Offset 0 (2 bytes): Database identifier.
- "DB" (ASCII)
- Offset 2 (2 bytes): File format version.
- Madden NFL 2003 is 7 (0x0007). Madden NFL 2004 is 8 (0x0008).
- Offset 4 (4 bytes): Unknown.
- It's always 2011665408 (0x77e79400) for my franchises in 2003. It's zero in the 2004 franchises sent to me.
- Offset 8 (4 bytes): Databse size.
- Contains the length of the entire file, beginning to end.
- Offset 12 (4 bytes): Zero.
- Always contains zero in the franchises I've seen.
- Offset 16 (4 bytes): Table count.
- Contains how many tables can be found in the index that follows.
- Offset 20 (4 bytes): Unknown (2004 only)
- It has been 4098197738 (0xf44588ea) and 1524647641 (0x5ae046d9) in the franchises sent to me. It is possible that this field replaced the one at offset 4 for Madden NFL 2004.
Table index (starts at 20:2003, 24:2004)
Offset 0 (4 bytes): Table name.
The table names are always 4 characters long with no NUL termination.
Offset 4 (4 bytes): Table offset.
Where to find the start of the table data, relative to the end of the table index. In 2004, the table data offset is 4 bytes more than how it is calculated in 2003, even after compensating for the extra 4 byte header field in 2004. Not sure why as there is no other extra data present.
Offset end (4 bytes): Unknown. (checksum?)
Based on pattern and contents, this is another checksum.
Tables
Table Header (sub-offset 0)
Madden NFL 2003
- Offset 0 (4 bytes): Unknown. (table type?)
- Varies between 6, 10, 14, 26, and 30; probably a bitvector.
- Offset 4 (4 bytes): Record length.
- Size of each record, in bytes.
- Offset 8 (4 bytes): Record length in bits.
- Size of each record, in bits.
- Offset 12 (2 bytes): Records allocated in table.
- How many records there is space for (but not necessarily used) in the table.
- Offset 14 (2 bytes): Records in use.
- How many records are actually in use in the table. The same as records allocated for many tables.
- Offset 16 (4 bytes? probably 2 related 2-byte values): Unknown.
- This field is 4294901760 (0xffff0000) for most tables. Some of the ones with other values in 2003 (from two different franchises):
- COCH: 0x00430002 - 4390914
- DCHT: 0x0b600001 - 190840833, 0x055e00b7 - 90046647
- INJY: 0x0060003d - 6291517, 0x00650012 - 6619154
- PLAY: 0x04a60047 - 77987911, 0x07cd00af - 130875567
- PKSI: 0x01930003 - 26411011
- PKSP: 0x00780007 - 7864327
- PSNG: 0x00e40026 - 14942246, 0x08130058 - 135463000
- PSOL: 0x047d0013 - 75300883, 0x048e0024 - 76415012
- Offset 20 (1 byte): Field count.
- The number of fields to be read from the folowing section.
- Offset 21 (1 byte): Index count.
- Number of index records that follow the table data. Probably used to denote fields the database should keep sorted for easy sorting.
- Offset 22 (2 bytes): Unknown.
- It's 86 for all tables except the first (HOFM: Hall of Fame).
Madden NFL 2004
- Offset 0 (4 bytes): Unknown. (table type?)
- Varies between 2, 6, 10, 14, 26, and 30; probably a bitvector.
- Offset 4 (4 bytes): Record length.
- Size of each record, in bytes.
- Offset 8 (4 bytes): Record length in bits.
- Size of each record, in bits.
- Offset 12 (4 bytes): Zero. (2004 only)
- Always zero in the two franchises sent to me.
- Offset 16 (2 bytes): Records allocated in table.
- How many records there is space for (but not necessarily used) in the table.
- Offset 18 (2 bytes): Records in use.
- How many records are actually in use in the table. The same as records allocated for many tables.
- Offset 20 (4 bytes? probably 2 related 2-byte values): Unknown.
- This field is 4294901760 (0xffff0000) for most tables. See the 2003 entry for examples of other values.
- Offset 24 (1 byte): Field count.
- The number of fields to be read from the folowing section.
- Offset 25 (1 byte): Index count.
- Number of index records that follow the table data. Probably used to denote fields the database should keep sorted for easy sorting.
- Offset 26 (2 bytes): Zero.
- Always zero in the two franchises I have.
- Offset 28 (4 bytes): Zero. (2004 only)
- Always zero in the two franchises I have.
- Offset 32 (4 bytes): Unknown. (2004 only)
- Varies wildly between tables. Could be a CRC seed?
Table Fields (sub-offset 24:2003, 34:2004)
- Offset 0 (4 bytes): Field type.
- Either 0, 2, or 3. "0" appears to be for a text field, "3" for a number field, and "2" I'm not sure.
- Offset 4 (4 bytes): Field offset.
- The position of the data for the field within the record, in bits.
- Offset 8 (4 bytes): Field name.
- Four letters or textual-numbers containing the name of the field.
- Offset 12 (4 bytes): Field size.
- How many bits of data are used by the field in the record. NOTE: Fields may span byte boundaries.
Table Data (sub-offset: varies based on field data)
All information about how to read the table data is the previous section, field data, and will vary for every table.
Table Indicies (2003 only)
- Offset 0 (4 bytes): Unknown.
- Four ASCII characters, which result in printing a number: 80 or 84.
- Offset 4 (4 bytes?): Unknown.
- Always 71 (0x47).
- Offset 8 (4 bytes?): Unknown.
- Always 73 (0x49).
- Offset 12 (4 bytes?): Unknown.
- Always 68 (0x44).
Table Footer (sub-offset: varies by table fields, table data, and indicies)
- Offset 0 (4 bytes): Checksum.
- An (Adler32?) checksum for the table. What and how it checksums is unknown.
-- by George Greer (m-l.org, greerga@)
Last updated:
Sun Mar 28 21:42:36 EST 2004