LIC.DAT: Difference between revisions
(→header) |
mNo edit summary |
||
Line 1: | Line 1: | ||
=Description= | =Description= | ||
*Paths | |||
**dev_bdvd/'''PS3_GAME'''/LICDIR/'''LIC.DAT''' | |||
**dev_bdvd/'''PS3_GM01'''/LICDIR/'''LIC.DAT''' | |||
**dev_bdvd/'''PS3_GM02'''/LICDIR/'''LIC.DAT''' | |||
**etc... | |||
Checked within Level 2 Kernel and possible via lv2syscall476<br> | Checked within Level 2 Kernel and possible via lv2syscall476<br> | ||
Line 8: | Line 12: | ||
See also {{talk}} page | See also {{talk}} page | ||
= | =Example= | ||
00000000 50 53 33 4C 49 43 44 41 00 00 00 01 80 00 00 00 PS3LICDA........ | 00000000 50 53 33 4C 49 43 44 41 00 00 00 01 80 00 00 00 PS3LICDA........ | ||
Line 17: | Line 21: | ||
... | ... | ||
= | =Structure= | ||
The structure is dependant of how the file is generated in PC and processed by the PS3 | The structure is dependant of how the file is generated in PC and processed by the PS3 | ||
Line 26: | Line 30: | ||
The CRC32 hash stored in the final LIC.DAT file.... is the hash of the file generated in step 1 (with the crc32 area on the header filled with zeroes) and a total size smaller than 0x10000 (because doesnt have the padding added at the end of step 2) <!-- yes, thats weird --> | The CRC32 hash stored in the final LIC.DAT file.... is the hash of the file generated in step 1 (with the crc32 area on the header filled with zeroes) and a total size smaller than 0x10000 (because doesnt have the padding added at the end of step 2) <!-- yes, thats weird --> | ||
== | ==Header== | ||
{|class="wikitable" | {|class="wikitable" | ||
Line 46: | Line 50: | ||
| 0x1C || 0x4 || 0x00000001 || License amount || Values found: 0x1 (single boot discs), 0x2 (dual boot discs), 0x3 (triple boot discs) | | 0x1C || 0x4 || 0x00000001 || License amount || Values found: 0x1 (single boot discs), 0x2 (dual boot discs), 0x3 (triple boot discs) | ||
|- | |- | ||
| 0x20 || 0x4 || 0xD8A9D38C || crc32 || CRC32 from the first byte of LIC.DAT till the end of license table ( | | 0x20 || 0x4 || 0xD8A9D38C || crc32 || CRC32 from the first byte of LIC.DAT till the end of license table (includes the CRC32 placeholder filled with zeroes) | ||
|- | |- | ||
| 0x24 || ? || 0x0000... || padding || is unknown where the header ends, probablly aligned to 0x200 but there are much more zeroes after it | | 0x24 || ? || 0x0000... || padding || is unknown where the header ends, probablly aligned to 0x200 but there are much more zeroes after it | ||
Line 52: | Line 56: | ||
==License table== | ==License table== | ||
Composed by one or more | Composed by one or more license entries | ||
=== License entry === | ===License entry=== | ||
{|class="wikitable" | {|class="wikitable" |
Revision as of 20:28, 28 August 2015
Description
- Paths
- dev_bdvd/PS3_GAME/LICDIR/LIC.DAT
- dev_bdvd/PS3_GM01/LICDIR/LIC.DAT
- dev_bdvd/PS3_GM02/LICDIR/LIC.DAT
- etc...
Checked within Level 2 Kernel and possible via lv2syscall476
Final File size is: 0x10000 Bytes
See also Discussion page
Example
00000000 50 53 33 4C 49 43 44 41 00 00 00 01 80 00 00 00 PS3LICDA........ 00000010 00 00 09 00 00 00 08 00 00 00 01 00 00 00 00 01 ................ 00000020 8C D3 A9 D8 00 00 00 00 00 00 00 00 00 00 00 00 ................ ... 00000800 01 42 4C 45 53 30 31 36 32 33 00 00 00 00 00 00 .BLES01623...... ...
Structure
The structure is dependant of how the file is generated in PC and processed by the PS3
Generation - The file is created in 2 steps, the file generated in first step contains the header (with a crc32 filled with zeroes intended as a placeholder) and the licenses table, in second step is calculated the crc32 of the file and is added in the header, and filled with zeroes at the end up to 0x10000
Processing - PS3 first reads the file LIC.DAT (header + licenses table, not included the padding at end), then it makes a copy of it (because is needed to edit it)... then it reads the crc32 area from the header and stores it separatedlly, then it fills the crc32 area with zeroes... and finally... it calculates the crc32 of the edited file
The CRC32 hash stored in the final LIC.DAT file.... is the hash of the file generated in step 1 (with the crc32 area on the header filled with zeroes) and a total size smaller than 0x10000 (because doesnt have the padding added at the end of step 2)
Header
Offset | Length | Example | Name | Description |
---|---|---|---|---|
0x0 | 0x8 | 'PS3LICDA' | Magic | LIC.DAT identifyer |
0x8 | 0x4 | 0x1 | Version | DAT structure version |
0xC | 0x4 | 0x80000000 | Disc type ? | 0x80000000 = retail (used in LIC.DAT under directory PS3_GAME) 0x00000000 = debug (used in LIC.DAT under directory PS3_GM01, PS3_GM02, etc...) |
0x10 | 0x4 | 0x00000900 | License table, absolute end offset | Calculated by: license table start + (license amounts * license size) |
0x14 | 0x4 | 0x00000800 | License table, absolute start offset | Always found 0x800 (static) |
0x18 | 0x4 | 0x00000100 | License size | Always found 0x100 (static) |
0x1C | 0x4 | 0x00000001 | License amount | Values found: 0x1 (single boot discs), 0x2 (dual boot discs), 0x3 (triple boot discs) |
0x20 | 0x4 | 0xD8A9D38C | crc32 | CRC32 from the first byte of LIC.DAT till the end of license table (includes the CRC32 placeholder filled with zeroes) |
0x24 | ? | 0x0000... | padding | is unknown where the header ends, probablly aligned to 0x200 but there are much more zeroes after it |
License table
Composed by one or more license entries
License entry
Relative Offset | Length | Example | Name | Description |
---|---|---|---|---|
0x0 | 0x1 | 0x1 | ID type | 0x01 = Title ID 0x02 = SKU ID 0x03 = Content ID |
0x1 | varies | BLES01623 | ID | Bootable content identifyer (EBOOT.BIN related) |
varies | varies | 0x0000.... | padding | padding to fill the entry with zeroes up to the "license size" specifyed in the header |
The first byte indicates type and size of following text:
- 0x01 means 0xA bytes, a regular TitleID (ex. BLES01623) with \0 terminating
- 0x02 means 0x2A bytes, a regular SKU ID (ex. UP0002-BLES01623_00-0000111122223333-E001) with \0 terminating
- 0x03 means 0x25 bytes, a regular npdrm ContentID (ex. UP0002-BLES01623_00-0000111122223333) with \0 terminating
Padding
Padding addded at bottom of LIC.DAT file, to make the total size a multiplyer of X bluray disc sectors... and to protect the laser lens because otherway is too tiny and hard to locate by the laser
This padding is added as the last step when generating the file, and removed as the first step when processing it by PS3
|