Jump to content
Setting up an AI agent? ReverseEngineering.wiki skill (works from the command line, no configuration): https://reverseengineering.wiki/skill/rewiki/SKILL.md · setup for every client, including MCP: https://reverseengineering.wiki/llms.txt · REWiki:Connect

Format:SCE SELF (PS3 and PS Vita)

From ReverseEngineering.wiki
Format
Platforms Platform:PlayStation 3, Platform:PlayStation Vita
Magic 53 43 45 00 (SCE\0)
Extensions .self, .sprx, .prx, .suprx, EBOOT.BIN, eboot.bin
Endianness PS3 big, Vita little
On this wiki Facts · Code · Notes · Topics

Signed executable container of the PlayStation 3 (SELF, SPRX) and PS Vita (SELF, eboot.bin, .suprx): a header starting with 53 43 45 00 (SCE\0) followed by app info, section tables and control info, then an embedded ELF whose segments may be compressed and encrypted; PS3 files are big-endian, Vita files little-endian.

Overview

A SELF wraps an ELF with a metadata header. Only the public structure is described here; the keys that protect retail files are out of scope. Open tools document the layout: PSL1GHT tools/fself (PS3, MIT), RPCS3 Crypto/unself.h (GPL-2.0), vita-toolchain src/self.h and vita-make-fself (MIT).

SCE header (0x20 bytes)

Offset Size Field
0x00 4 magic 53 43 45 00
0x04 4 header version: 2 for PS3 files written by PSL1GHT fself, 3 for Vita (vita-make-fself)
0x08 2 flags / SDK type (PSL1GHT writes 0x8000; vita-make-fself 0xC0, 0x40 for the security type)
0x0A 2 header type: 1 = SELF
0x0C 4 metadata offset
0x10 8 header length (offset where the embedded ELF starts)
0x18 8 ELF file size

PS3 extended header

Follows at 0x20, ten u64: an unknown value (3 in fself), app info offset, ELF header offset, program header offset, section header offset, segment (section) info offset, version-info offset, supplemental (control info) offset, supplemental size, padding. App info (0x20 bytes): authority id u64, vendor id u32, program type u32 (4 and 8 NPDRM in fself), version, padding. Then the ELF header copy, program headers, one 0x20-byte segment info per program header (offset, size, compression 1 plain / 2 zlib, encryption flags), version info and supplemental headers. Supplemental header types (RPCS3): 1 capability flags, 2 ELF digest, 3 NPDRM; on Vita also 4 ELF digest, 5 NPDRM, 6 boot parameters, 7 shared secret.

Vita header

Little-endian, header type fields as above, but after the ELF size come the SELF file size, an unknown u64 and the SELF offset before the same list of offsets; the SELF header is padded to 0x1000. App info: authid u64, vendor id u32, SELF type u32, version u64, padding u64. SELF types in vita-make-fself: 7 kernel, 8 NPDRM (default), 9 KBL, 0xB security, 0xD user. Segment info is four u64: offset, length, compression (1 uncompressed, 2 compressed), encryption (1 encrypted, 2 plain). Control info 6 holds the memory budget and file handle limits of the process.

The embedded ELF

  • PS3: big-endian ELF64 PowerPC; OS/ABI byte 102 (ELFOSABI_CELL_LV2). SPRX modules use e_type 0xFFA4 (ET_SCE_PPURELEXEC) with relocations in program header type 0x700000A4 (PT_SCE_PPURELA); the section .sys_proc_prx_param begins 00 00 00 28 1B 43 4C EC; imports live in .lib.stub with FNIDs in .rodata.sceFNID (PSL1GHT sprxlinker). Program header flags 0x00100000 to 0x00400000 mark SPU X/W/R and 0x01000000 to 0x04000000 RSX segments.
  • Vita: little-endian ELF32 ARM; e_type 0xFE00 (ET_SCE_EXEC) or 0xFE04 (ET_SCE_RELEXEC), relocations in PT_SCE_RELA 0x60000000; see Format:PS Vita module info.

Pitfalls

  • The two platforms share the magic but not the endianness or several field widths; check the version field before parsing.
  • Many fields are unknown in all three sources; do not treat them as constants.
  • The supplemental header type numbers are read in RPCS3 rpcs3/Crypto/unself.h line 115 (1=PS3 plaintext_capability; 2=PS3 ELF digest; 3=PS3 NPDRM, 4=PS Vita ELF digest; 5=PS Vita NPDRM; 6=PS Vita boot param; 7=PS Vita shared secret), the SCE header in SceHeader lines 370-383 (magic 0x53434500 as big-endian value, hver, flags, type, meta, hsize, esize). Unverified: types 4 to 7 against a real Vita file; RPCS3 itself documents them only in that comment. e_type values: Format:SCE ELF extensions (PlayStation consoles).

Code & repositories

See Platform:PlayStation 3 and Platform:PlayStation Vita; names via Technique:SCE NID imports and exports.

  • https://github.com/ps3dev/PSL1GHT @ f649a08fd536a9e27c08c7db2d93a2d7ee4c3bbe · license: MIT
    PS3 homebrew SDK (MIT): fself, sprxlinker, sfo and pkg tools
    Tested on: source read, not run: source read, tools/ at the pinned commit · checked 2026-10-18; last activity 2026-10-08
  • https://github.com/RPCS3/rpcs3 @ cbfcf1f6b5de6aed8db54b9a59a5e99b9277e2b3 · license: GPL-2.0-only (declared by the contributor for the files used; GitHub reports GPL-2.0 for the repository)
    PS3 emulator (GPL-2.0): Crypto/unself.h, unpkg.h, Loader/PSF.h and PPUModule.cpp document SELF, PKG, SFO and SPRX import structures
    Tested on: source read, not run: headers read through a summarising fetch, not cloned · checked 2026-10-18; last activity 2026-10-17