System File Object (SFO) (PSF)

See also PARAM.SFO on:
 * PSP,
 * PS3,
 * PS4.

See also page

Internal Structure
The values contained in a System File Object can be simplyfied as inputs/outputs for/from the content: Boot modifyers (most of the int32 datas) that are sent to the content when is executed to activate specific features or settings (e.g. audio and video modes of a game). Information texts (most of the utf8 datas) about the content and its restrictions (e.g. title and version of a game).

Header SFO
This is the Header of a SFO/PSF file.

typedef struct{ int magic; //PSF int version; //1.1 int keyTableOffset; int dataTableOffset; int indexTableEntries; } sfo_header_t;

Index table
Starting at offset 0x14, this structure (0x10) is repeated the number of times defined in the header ( № of parameters)

typedef struct{ u16 keyOffset; //offset of keytable + keyOffset u16 param_fmt; //enum (see below) u32 paramLen; u32 paramMaxLen; u32 dataOffset; //offset of datatable + dataOffset } indexTableEntry_t;

Used on index table, there are 3 variables:

0x6+0x10*i

(i=0,1,2,3,4,5,...)

Key table
Ordered alphabetically, each name of parameters of this table is NULL terminated with 1 blank byte (0x00) to separate them.

The table has padding at the end to align their size to a multiply of 4 ( if matches with a multiply of 4 this padding doesn't exist)

Data table

 * UTF-8 entries never uses all the reserved bytes, needs 1 blank byte (0x00) after the last character.


 * Integer entries uses all the reserved bytes.

Algorithm
(i=0,1,2,3,4,5,...)


 * Get Position Value


 * [PSF offset] + [Value Start] + (0x14+(0x10*i))
 * Get Type


 * [PSF offset] + (0x16 * (0x10*i))
 * Get Length Param


 * [PSF offset] + (0x1C * (0x10*i))
 * Get Length Value


 * [PSF offset] + (0x24+0x10*i)-(0x14+0x10*i)
 * Get Position Param


 * [PSF offset] + [Param Start] + (0x20+(0x10*i))

for any problems, you can give a look into my sourcecode: sfo_stuff.c

APP_VER
The format is XX.YY where "XX" and "YY" are numbers, and the point "." is included in the string, e.g: 01.00 for the first stable version released.

ATTRIBUTE
Can contains 32 flags that can be turned on/off to activate/deactivate features allowed for the game/apps content.

Speculation and some features could have been removed.

See also page

FW min for FW column (SYSTEM_VER) seen.

Flag № column is for wikify/chat, 32 flags table speculation.

Notes:
You can check the status of your PS Vita system on the info bar.
 * info bar (top screen):

PS Vita system-communication status - Active applications - Audio output status - time -Remaining battery charge

Move the screen down to reveal the communication zone.
 * Communication zone/ activities:

ATTRIBUTE2
This parameter can not exist on some PKG (used for special functions??)

ATTRIBUTE2 is speculated to be sorted before ATTRIBUTE_MINOR

Speculation and some features could have been removed.

See also page

FW min for FW column (SYSTEM_VER) seen.

Flag № column is for wikify/chat, 32 flags table speculation.

ATTRIBUTE_MINOR
Can contains 32 flags that can be turned on/off to activate/deactivate features allowed for the game/apps content.

Speculation and some features could have been removed.

See also page

FW min for FW column (SYSTEM_VER) seen.

Flag № column is for wikify/chat, 32 flags table speculation.

BOOT_FILE
-

BOOT_INSTALL_DIR
Similar to TITLE_ID, identifier of the content, in the format WXYZ12345.

CATEGORY
Merged with PS4 Category

CONTENT_ID
The format is: XXYYYY-NP_COMMUNICATION_ID-LICENSE_ID.

e.g.: JP0365-PCSG90004_00-SKP2TRIAL0000000

See Content ID

CONTENT_LOCATION
Seen:


 * sceman:
 * sceman:near

EBOOT_APP_MEMSIZE
-

EBOOT_ATTRIBUTE
-

EBOOT_PHY_MEMSIZE
-

GC_RO_SIZE
PS Vita card R/O size

Seen: 0x1C0000 (1835008), 0x380000 (3670016)

GC_RW_SIZE
PS Vita card R/W size

Seen: 00 80 01 00 -->0x00018000--> 98304 bytes (Virtue's Last Reward PCSB00205)

IMPORT_SAVEDATA_INFO
Similar to TITLE, information of the content used by Shared Save Data.

INSTALL_DIR_ADDCONT_x
Where x is a number from 1 to 7(?).

INSTALL_DIR_SAVEDATA
Similar to TITLE_ID, identifier of the content used by Shared Save Data, in the format WXYZ12345.

Used by demo trials/cross platforms titles.

INSTALL_DIR_SAVEDATA_ADD_x
Where x is a number from 1 to 7(?).

Similar to TITLE_ID, identifier of the content used by Shared Save Data, in the format WXYZ12345.

Used by PS VITA episodic/serie titles (e.g.:Ateliers's).

LAREA_TYPE
Used by some system application (category: gda).

Seen: 0x03

NP_COMMUNICATION_ID
Network Platform Communication ID.

The format is 4 letters + 5 numbers with optionally a subid (usually 0) : NPWRyyyyy_zz (e.g. NPWR00001_00)

PARENT_INSTALL_DIR
Title ID.

PARENTAL_LEVEL
It is a scale to rate the content for the different users based in parental control settings and international rating systems as: PEGI, ESRB, CERO, etc...

This should be the same as in the PS3/PS4 (from 0 to 11)

PSP2_DISP_VER
Minimum Firmware for display needed to play this title.

PSP2_SYSTEM_ROOT_VER
-

PSP2_SYSTEM_VER
Minimum Firmware needed to play this title.

PUBTOOLINFO
Contains infos (UTF-8), separated by a comma (0x2C):
 * c_date=yyyymmdd (creation date format?)
 * sdk_ver=xxxxxxxx (digits to indicate PSVita SDK version?) : seen: 01650000, 01800000, 02500000, 03000000

REGION_DENY
Regions restrictions for the content.

See PS3 Region deny

SAFEMEMORY_MODE
Used by NPXS10003 Internet browser with value of 0x80 00 00 80.

SAVEDATA_MAX_SIZE
Save Data Quota

e.g.: 0x00000400 ( = 1024) this game can use 1024 Bytes (1MB)

Seen: 0x400 (1024), 0x800 (2048), 0x1000 (4096), 0x2000 (8192), 0x2800 (10240), 0x5000 (20480), 0x20000 (131072), 0x100000 (1048576)

STITLE
Short Title for default language.

STITLE_xx
Same than STITLE but for localized languages.

An .SFO can contain several STITLE_xx where xx is a number for a regional code.

The "default" TITLE is always present when other "localized" TITLE_xx are used.

SUPPORT_URI
Used to identify the name of a resource

Seen:

See Title ID

SYSPRM
-

TARGET_APP_VER
Target Application Version.

Seen: 00.00

TITLE
Default "title of the game" for all languages.

TITLE_xx
Same than STITLE.

TITLE_ID
Identifier ( Productcode ) of the content, in the format WXYZ12345.

See also Title_ID

VERSION
Version content of the game: Disc revision, or Package revision. The number increases when the content is re-released or re-packaged for whatever reason that doesn't affect the main executable (e.g. when a disc game reaches platinum sales, or "game of the year edition" including extra contents).

PSF Dump (From 0xBF0 to 0x11F0)
The length of this is 0x5D0 offset  00 01 02 03 04 05 06 07  08 09 0A 0B 0C 0D 0E 0F

00000bf0 00 50 53 46 01 01 00 00  24 01 00 00 dc 01 00 00  |.PSF....$.......|  -> Header 00000c00 11 00 00 00 00 00 04 02  06 00 00 00 08 00 00 00  |................|  -> Unknown 00000c10 00 00 00 00 08 00 04 04  04 00 00 00 04 00 00 00  |................| 00000c20 08 00 00 00 12 00 04 02  03 00 00 00 04 00 00 00  |................| 00000c30 0c 00 00 00 1b 00 04 02  25 00 00 00 30 00 00 00  |........%...0...| 00000c40 10 00 00 00 26 00 04 04  04 00 00 00 04 00 00 00  |....&...........| 00000c50 40 00 00 00 31 00 04 04  04 00 00 00 04 00 00 00  |@...1...........| 00000c60 44 00 00 00 3c 00 04 04  04 00 00 00 04 00 00 00  |D...<...........| 00000c70 48 00 00 00 4b 00 04 02  07 00 00 00 08 00 00 00  |H...K...........| 00000c80 4c 00 00 00 59 00 04 04  04 00 00 00 04 00 00 00  |L...Y...........| 00000c90 54 00 00 00 69 00 04 02  10 00 00 00 00 02 00 00  |T...i...........| 00000ca0 58 00 00 00 75 00 04 04  04 00 00 00 04 00 00 00  |X...u...........| 00000cb0 58 02 00 00 87 00 04 02  20 00 00 00 34 00 00 00  |X....... ...4...| 00000cc0 5c 02 00 00 8e 00 04 02  20 00 00 00 34 00 00 00  |\....... ...4...| 00000cd0 90 02 00 00 98 00 04 02  35 00 00 00 80 00 00 00  |........5.......| 00000ce0 c4 02 00 00 9e 00 04 02  35 00 00 00 80 00 00 00  |........5.......| 00000cf0 44 03 00 00 a7 00 04 02  0a 00 00 00 0c 00 00 00  |D...............| 00000d00 c4 03 00 00 b0 00 04 02  06 00 00 00 08 00 00 00  |................| 00000d10 d0 03 00 00 41 50 50 5f  56 45 52 00 41 54 54 52  |....APP_VER.ATTR| -> Variables 00000d20 49 42 55 54 45 00 43 41  54 45 47 4f 52 59 00 43  |IBUTE.CATEGORY.C| 00000d30  4f 4e 54 45 4e 54 5f 49  44 00 47 43 5f 52 4f 5f  |ONTENT_ID.GC_RO_| 00000d40 53 49 5a 45 00 47 43 5f  52 57 5f 53 49 5a 45 00  |SIZE.GC_RW_SIZE.| 00000d50 50 41 52 45 4e 54 41 4c  5f 4c 45 56 45 4c 00 50  |PARENTAL_LEVEL.P| 00000d60  53 50 32 5f 44 49 53 50  5f 56 45 52 00 50 53 50  |SP2_DISP_VER.PSP| 00000d70 32 5f 53 59 53 54 45 4d  5f 56 45 52 00 50 55 42  |2_SYSTEM_VER.PUB| 00000d80 54 4f 4f 4c 49 4e 46 4f  00 53 41 56 45 44 41 54  |TOOLINFO.SAVEDAT| 00000d90 41 5f 4d 41 58 5f 53 49  5a 45 00 53 54 49 54 4c  |A_MAX_SIZE.STITL| 00000da0 45 00 53 54 49 54 4c 45  5f 30 30 00 54 49 54 4c  |E.STITLE_00.TITL| 00000db0 45 00 54 49 54 4c 45 5f  30 30 00 54 49 54 4c 45  |E.TITLE_00.TITLE| 00000dc0 5f 49 44 00 56 45 52 53  49 4f 4e 00 30 31 2e 30  |_ID.VERSION.01.0| -> Parameters of Variables 00000dd0 30 00 00 00 00 00 00 00  67 64 00 00 4a 50 30 33  |0.......gd..JP03| 00000de0 36 35 2d 50 43 53 47 39  30 30 30 34 5f 30 30 2d  |65-PCSG90004_00-| 00000df0 53 4b 50 32 54 52 49 41  4c 30 30 30 30 30 30 30  |SKP2TRIAL0000000| 00000e00 00 00 00 00 00 00 00 00  00 00 00 00 00 80 1a 00  |................| 00000e30 00 00 00 00 01 00 00 00  30 31 2e 35 30 30 00 00  |........01.500..| 00000e40 00 00 50 01 63 5f 64 61  74 65 3d 32 30 31 31 31  |..P.c_date=20111| -> creation data 00000e50 32 30 35 00 00 00 00 00  00 00 00 00 00 00 00 00  |205.............| 00000e60 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................| 00001040 00 00 00 00 00 04 00 00  75 6b 65 2d 74 6f 72 6e  |........uke-torn| ->SAVEDATA_MAX_SIZE + STITLE 00001050 65 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |e...............| 00001060 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................| 00001070  00 00 00 00 00 00 00 00  00 00 00 00 75 6b 65 2d  |............uke-| ->STITLE_00 00001080 74 6f 72 6e 65 00 00 00  00 00 00 00 00 00 00 00  |torne...........| 00001090 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................| 000010b0  75 6b 65 2d 74 6f 72 6e  65 00 00 00 00 00 00 00  |uke-torne.......| ->TITLE 000010c0 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................| 00001130 75 6b 65 2d 74 6f 72 6e  65 28 e3 82 a6 e3 82 b1  |uke-torne(......| ->TITLE_00 00001140  e3 83 88 e3 83 ab e3 83  8d 29 00 00 00 00 00 00  |.........)......| 00001150 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................| 000011b0  50 43 53 43 38 30 30 30  33 00 00 00 30 31 2e 30  |PCSC80003...01.0| ->TITLE_ID + VERSION 000011c0 30 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |0...............| 000011d0 00 00 00 00 00 00 00 01  28 00 00 00 00 00 00 30  |........(......0| 000011e0  80 00 00 00 00 00 00 00  22 00 00 10 1c c7 38 83  |........".....8.|