Editing Talk:SELF - SPRX

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

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:
== nas_plugin.sprx ==
[[Category:Software]]


=== 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.
----
=== App Info header: ===
Aligned to 0x10 bytes.
{| class="wikitable"
|-
! field 
! offset
! type
! notes
|-
| authid   
| 0x00
| u64
|-
|unknown   
|0x08
|u32
|-
|app_type     
|0x0c
|u32
|
*1 -- level 0
*2 -- level 1
*3 -- level 2
*4 -- application
*5 -- isolated SPU module
*6 -- secure loader
*8 -- NP-DRM application
|-
|app_version
|0x10
|u64
|}
==== Appinfo offset 0x08 ====
for some reason named [[SELF_File_Format_and_Decryption#App_Info|vendor_id]] there.
In geo makeself it was used as: <code>set_u32(&(output_self_info_header.i_magic), 0x01000002);</code>
Not directly related to [[Authentication IDs]], but seems to have many simularities with it, seems also related to [[Hypervisor_Reverse_Engineering#Active_System_Managers_in_HV_dump_3.15|SM ; LPAR's]] and their order suggests hierarchy/permission from high (can do everything) to low (lesser abilities).
{| class="wikitable sortable"
|-
! 'vendorid' !! count !! filetype
|-
| 0xff000000 || 16 || lv1.self's
| 0xff000000 || 4  || ldr's
|-
| 0x07000001 || 180 || iso spu self's
|-
| 0x05000002 || 17 || lv2_kernel.self's
|-
| 0x02000003 || 45 || ps2_emu self's
|-
| 0x01000002 || 6147 || CoreOs / dev_flash files
|-
|}
=== 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
*1: retail
*2: retail type 1
*0x8000: devkit
*4: unknown, games that require 3.42.
*7: unknown, all games that require 3.50 have that flag.
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)
|-
|-
|}
----
=== Region locking ===
SELF or [http://www.ps3devwiki.com/wiki/PARAM.SFO#REGION_DENY SFO REGION_DENY]?
http://www.ps3devwiki.com/index.php?title=File:Badregion-4.jpg
== moved from old talk page ==
Talk:Signed Executable and Linkable Format (SELF)
=== nas_plugin.sprx ===
<pre>
<pre>
SELF
SELF
Line 171: Line 333:




== lv2_kernel.self ==
=== lv2_kernel.self ===
 
<pre>
<pre>
SELF:
SELF:
Line 398: Line 559:




== Sign executables for 3.73+ (mathieulh's "drama") ==
===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
Please note that all contributions to PS3 Developer wiki are considered to be released under the GNU Free Documentation License 1.2 (see PS3 Developer wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following hCaptcha:

Cancel Editing help (opens in new window)