Difference between revisions of "EEPROM"
KaosEngineer (talk | contribs) m (→Contents: Zone Bias 0x64-0x67 example hex value was missing a leading 0 - 0x0000168 to 0x00000168 (not that it changes the value just show fill of all 4-bytes)) |
KaosEngineer (talk | contribs) m (→Contents: Removed leading 0's in notes for example pass code values. Matches with nibble values format above the notes.) |
||
Line 171: | Line 171: | ||
* EEPROM offset 0xA0: <code>23 14 00 00</code> | * EEPROM offset 0xA0: <code>23 14 00 00</code> | ||
* Little Endian value 0x00001423. | * Little Endian value 0x00001423. | ||
− | * The pass code is D-pad directions up ( | + | * The pass code is D-pad directions up (0x1), right (0x4), down (0x2), left (0x3). |
* Pass code is only 2 bytes not 4, each button is stored as a nibble in the word. First button in the most significant nibble and last in the least significant nibble. | * Pass code is only 2 bytes not 4, each button is stored as a nibble in the word. First button in the most significant nibble and last in the least significant nibble. | ||
* Data in the EEPROM is aligned to double word (4-byte) boundaries. Thus, the two extra bytes at 0xA2 and 0xA3 of 0x00. | * Data in the EEPROM is aligned to double word (4-byte) boundaries. Thus, the two extra bytes at 0xA2 and 0xA3 of 0x00. |
Revision as of 12:23, 30 August 2017
The Xbox EEPROM is a 256 byte non-volatile storage device which contains device-specific information. It is connected via I²C and located on address 0x54. Parts of the EEPROM are encrypted using Kernel/XboxEEPROMKey.
Contents
Chip Models
Xbox Model | Manufacturer | Model |
---|---|---|
1.4 (Others?) | Catalyst | CAT24WC02J |
Contents
Note: Info in above table comes from XKUtils XKEEPROM.h.
*Configmagic-FINAL-1.6 uses the wrong size when computing Checksum2 (40 instead of 44 bytes) and Checksum3 (96 instead of 92 bytes). Checksum2 value computed was correct only because the extra 4 bytes not used in the CRC computation were all 0's which does not change the CRC value. However, a similiar problem with computation of Checksum3 is present. The CRC computed for v1.6 Xbox's is incorrect as the 4 extra bytes are not 0's as on earlier versions.
Reading/Writing the EEPROM
Software Method
This is the easiest way to dump an Xbox EEPROM. Use your alternative dashboard to dump the EEPROM to a file and download it over FTP.
Hardware Method
If you cannot dump the EEPROM using software, you can dump it using hardware. You have several options: use an I2C host adapter (see here or here), build an I2C-Serial cable, or use a device like a RaspberryPi which has an I2C interface. Connect SDA/SCL/ground to the LPC pinout on the board. See here for pinout information. Then use the corresponding software to read/write the EEPROM.
The HMAC HDD Key
The HMAC HDD Key is generated out of the first 48 bytes. This section has been identified clearly.
The Region Code
This DWORD is encrypted. It corresponds to the region code in the XBE header:
0x00000001 | North America |
0x00000002 | Japan |
0x00000004 | Europe / Australia |
0x80000000 | Manufacturing plant |
The Serial Number
1166356 20903 || | |||||__ || | ||||___ factory number || | |||____ || | ||_____ week of year (starting Mondays) || | |______ last digit of year || |________ ||_____________ number of Xbox within week and factory |______________ production line within factory
1 | 1 | 6 | 6 | 3 | 5 | 6 | 2 | 0 | 9 | 0 | 3 | |||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| | \ | _ | _ | _ | _ | / | | | | | | | \ | \ | _ | Factory Number (02=Mexico, 03=Hungary, 05=China, 06=Taiwan) | |
| | | | | | | | | | | | |||||||||
| | | | | | | | \ | \ | _ | _ | _ | week of year (starting Mondays) | |||||
| | | | | | | | |||||||||||
| | | | | | \ | _ | _ | _ | _ | _ | last digit of year (200Y) | |||||
| | | | | | ||||||||||||
| | \ | \ | _ | _ | _ | _ | _ | _ | _ | _ | _ | number of Xbox within week and factory | ||
| | ||||||||||||||
\ | _ | _ | _ | _ | _ | _ | _ | _ | _ | _ | _ | _ | _ | production line within factory |
The MAC address
This is the MAC address of the Ethernet hardware, which has been issued by the IEEE.
DVD Region
This DWORD corresponds to the region code for playback of DVD movies:
0x00000000 | None |
0x00000001 | Region 1 |
... | ... |
0x00000006 | Region 6 |
Checksum Algorithm
Checksum2 and Checksum3 values can be calculated by running the following code snippet over the area the checksum covers:
/* The EepromCRC algorithm was obtained from the XKUtils 0.2 source released by * TeamAssembly under the GNU GPL. * Specifically, from XKCRC.cpp * * Rewritten to ANSI C by David Pye (dmp@davidmpye.dyndns.org) * * Thanks! */ void EepromCRC(unsigned char *crc, unsigned char *data, long dataLen) { unsigned char* CRC_Data = (unsigned char *)malloc(dataLen+4); int pos=0; memset(crc,0x00,4); memset(CRC_Data,0x00, dataLen+4); //Circle shift input data one byte right memcpy(CRC_Data + 0x01 , data, dataLen-1); memcpy(CRC_Data, data + dataLen-1, 0x01); for (pos=0; pos<4; ++pos) { unsigned short CRCPosVal = 0xFFFF; unsigned long l; for (l=pos; l<dataLen; l+=4) { CRCPosVal -= *(unsigned short*)(&CRC_Data[l]); } CRCPosVal &= 0xFF00; crc[pos] = (unsigned char) (CRCPosVal >> 8); } free(CRC_Data); }