Editing Talk:SELF - SPRX
Jump to navigation
Jump to search
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
== | === NPDRM Header === | ||
typedef struct | |||
{ | |||
u32 block_type; // this is 3(NPDRM) | |||
u32 block_size; // this is 0x90(sizeof(Self_NPDRM)) | |||
u32 unknown1; // So far always 0 | |||
u32 unknown2; // So far always 0 | |||
u32 magic; // 0x4E504400(NPD) | |||
u32 unknown3; // 1; 3 (version probably) | |||
u32 license; // 1 - Network License; 2 - Local License; 3 - Free | |||
u32 type; // 0 - Module; 1 - Executable; 0x20 - Module (Update for Disc Based Game); 0x21 - Executable (Update for Disc Based Game) | |||
u8 titleid[0x30]; | |||
u8 hash_unknown[0x10]; | |||
u8 hash1[0x10]; | |||
u8 hash2[0x10]; | |||
u8 padding[0x10]; | |||
} Self_NPDRM | |||
Located after the Self Control Info. | |||
---- | |||
=== Encrypted phdr offset entry === | |||
There is one of these entries for each phdr entry in the elf file so that the ps3 knows where to decrypt the data from. (because it might also be compressed.) | |||
{| class="wikitable" | |||
|- | |||
! field !! offset !! type !! notes | |||
|- | |||
| Encrypted Data Offset || 0x00 ||u64 || | |||
|- | |||
|Encrypted Data Size || 0x08 || u64 || | |||
|- | |||
|unknown || 0x10 || u32 || This has been 1 in all the examples I have seen. | |||
|- | |||
|unknown || 0x14 || u32 || Always 0, as far as I know. | |||
|- | |||
|unknown || 0x18 || u32 || Always 0, as far as I know. | |||
|- | |||
|unknown || 0x1c || u32 || This is 2 for loadable segment types, and 0 for other types. | |||
|- | |||
|} | |||
=== Meta Checksums === | |||
There are 3 checksums at the offset specified by meta_offset. | |||
*The first is the sha1 checksum of the entire self file. | |||
*The 2nd checksum is the inverse of the first checksum. | |||
*The 3rd checksum is the first checksum XORed with 0xAAAAAA..AAAAAB | |||
The PSJailbreak payload ignores the actual checksums, but checks that the 3rd checksum is the 2nd checksum XORed with 0xAAAAAA..AAAAAB | |||
=== SDK Flags added === | |||
{| class="wikitable" | |||
|- | |||
! field !! offset !! type !! notes | |||
|- | |||
| Magic || 0x0 || u32 || Must be "SCE\0" | |||
|- | |||
| version || 0x4 || u32 || This must be 2 or the SELF loader will abort | |||
|- | |||
| flags || 0x8 || u16 || | |||
*0: retail type 0 | |||
*2: retail type 1 | |||
*0x8000: devkit | |||
0001: FW 1.00 (app version 1.0.0) | |||
... | |||
0001: FW 3.15 (app version 3.15.0) | |||
0001: FW 3.20 (app version 3.20.0) | |||
0001: FW 3.21 (app version 3.21.0) | |||
0001: FW 3.30 (app version 3.30.0) | |||
0004: FW 3.40 (app version 3.40.0) | |||
0004: FW 3.41 (app version 3.40.0) | |||
0004: FW 3.42 (app version 3.40.0) | |||
0007: FW 3.50 (app version 3.55.0) | |||
000A: FW 3.55 (app version 3.55.0) | |||
000D: FW 3.56 (app version 3.56.0) | |||
0010: FW 3.60 (app version 3.60.0) | |||
0010: FW 3.61 (app version 3.61.0) | |||
0013: FW 3.65 (app version 3.65.0) | |||
0013: FW 3.66 (app version 3.66.0) | |||
0016: FW 3.70 (app version 3.70.0) | |||
0016: FW 3.72 (app version 3.70.0) | |||
0016: FW 3.73 (app version 3.73.0) | |||
0019: FW 4.00 (app version 4.00.0) | |||
0019: FW 4.01 (app version 4.01.0) | |||
0019: FW 4.10 (app version 4.10.0) | |||
0019: FW 4.11 (app version 4.11.0) | |||
|- | |||
|- | |||
|} | |||
---- | |||
== moved from old talk page == | |||
Talk:Signed Executable and Linkable Format (SELF) | |||
=== nas_plugin.sprx === | |||
<pre> | <pre> | ||
SELF | SELF | ||
Line 171: | Line 267: | ||
== lv2_kernel.self == | === lv2_kernel.self === | ||
<pre> | <pre> | ||
SELF: | SELF: | ||
Line 398: | Line 493: | ||
== Sign executables for 3.73+ | ===Sign executables for 3.73+=== | ||
<pre> | <pre> | ||
[21:00:58] <Mathieulh> selfs are a mess to generate properly because a lot of values need to be calculated from the original elf file | [21:00:58] <Mathieulh> selfs are a mess to generate properly because a lot of values need to be calculated from the original elf file |