Editing System File Object (SFO) (PSF)
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: | ||
[[Category:Software]] | [[Category:Software]] | ||
These config strings are inside the [[PS_VITA_Packages_%28.PKG%29#Game_Packages|Game Package (PKG)]]. | |||
See also PARAM.SFO on: | See also PARAM.SFO on: [http://www.psdevwiki.com/ps3/Eboot.PBP#PARAM.SFO PSP], [http://www.psdevwiki.com/ps3/PARAM.SFO PS3], [http://www.psdevwiki.com/ps4/PARAM.SFO PS4]. | ||
= Header = | |||
This is the Header of a SFO/PSF file | |||
{| class="wikitable sortable" | |||
This is the Header of a SFO/PSF file | |||
{| class="wikitable sortable | |||
|- | |- | ||
! Offset !! Data !! Arch !! Notes | |||
|- | |- | ||
| | | 0x0 || 0x00505346 || Little Endian || PSF Magic | ||
|- | |- | ||
| | | 0x4 || 0x01010000 || Little Endian || Version | ||
|- | |- | ||
| | | 0x8 || 0x24010000 || Little Endian || Value Start | ||
|- | |- | ||
| | | 0xC || 0xdc000000 || Little Endian || Params Start | ||
|- | |- | ||
| | | 0x4 || 0x11000000 || Little Endian || N° of params/values | ||
|- | |- | ||
|} | |} | ||
= Body = | |||
Before understanding the algorithm, a few things: | |||
There are 3 variables: | |||
==Type of data== | |||
0x6+0x10*i<br /> | |||
(i=0,1,2,3,4,5,...) | |||
{| class="wikitable sortable" | |||
== | |||
{| class="wikitable sortable" | |||
|- | |- | ||
! Data !! Arch !! Notes | |||
|- | |- | ||
| | | 04 02 || Little Endian || The value is an Integer | ||
|- | |- | ||
| | | 04 04 || Little Endian || The value is an UTF8 | ||
|- | |- | ||
| | | 04 00 || Little Endian || The value is an Special UTF8 | ||
|- | |- | ||
|} | |} | ||
== Position == | |||
The position is stored with this algo: | |||
[Value Start]+(0x14+(0x10*i)) for VALUE<br /> | |||
[Param Start]+(0x20+(i*0x10)) for PARAM <br /> | |||
< | |||
(i=0,1,2,3,4,5,...) | (i=0,1,2,3,4,5,...) | ||
{| | {| class="wikitable sortable" | ||
|- | |- | ||
! Offset !! Data !! Arch !! Notes | |||
|- | |- | ||
| | | 0x14 || 0x0000 || Little Endian || Value | ||
|- | |- | ||
| | | 0x20 || 0x00000000 || Little Endian || Param | ||
|- | |- | ||
|} | |} | ||
== | == Length == | ||
The length is stored with this algo: | |||
0x1C+0x10*i for Param<br /> | |||
(0x24+0x10*i)-(0x14+0x10*i) for Value<br /> | |||
(i=0,1,2,3,4,5,...) | |||
= | {| class="wikitable sortable" | ||
|- | |||
! Offset !! Data !! Arch !! Notes | |||
|- | |||
| 0x24-0x14 || 0x0800 || Little Endian || Length Value | |||
|- | |||
| 0x1C || 0x08000000 || Little Endian || Length Param | |||
|- | |||
|} | |||
== Algorithm == | |||
(i=0,1,2,3,4,5,...)<br /> | (i=0,1,2,3,4,5,...)<br /> | ||
Line 111: | Line 81: | ||
*Get Type<br /> | *Get Type<br /> | ||
**[PSF offset] + (0x16 * (0x10*i)) | **[PSF offset] + (0x16 * (0x10*i)) | ||
*Get | *Get Lenght Param<br /> | ||
**[PSF offset] + (0x1C * (0x10*i)) | **[PSF offset] + (0x1C * (0x10*i)) | ||
*Get | *Get Lenght Value<br /> | ||
**[PSF offset] + (0x24+0x10*i)-(0x14+0x10*i) | **[PSF offset] + (0x24+0x10*i)-(0x14+0x10*i) | ||
*Get Position Param<br /> | *Get Position Param<br /> | ||
**[PSF offset] + [Param Start] + (0x20+(0x10*i)) | **[PSF offset] + [Param Start] + (0x20+(0x10*i)) | ||
for any problems, you can give a look into my sourcecode: [https://raw.github.com/wargio/vitatool/master/sfo_stuff.c sfo_stuff.c] | for any problems, you can give a look into my sourcecode: [[https://raw.github.com/wargio/vitatool/master/sfo_stuff.c sfo_stuff.c]] | ||
=Parameters= | |||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
!Name Variable | |||
!Length Variable | |||
!Parameter (Example) | |||
!Length Parameter | |||
!Notes | |||
|- | |- | ||
| | |APP_VER | ||
|- | |0x8 | ||
| | |1.00 | ||
| | |0x8 | ||
| | |Application Version | ||
|- | |- | ||
| | |ATTRIBUTE | ||
| | |0x9 | ||
| 00 00 80 81 | |||
|- | |0x4 | ||
| | | Special functions | ||
|- | |- | ||
| | |ATTRIBUTE2 | ||
|- | |0xA | ||
| | | 00 00 ?? ?? | ||
| | |0x4 | ||
| | | This parameter can not exist on some PKG (used for special functions??) | ||
| | |- | ||
| | |CATEGORY | ||
| | |0x8 | ||
| | |gdc | ||
| | |0x4 | ||
| | |See below | ||
| | |- | ||
|CONTENT_ID | |||
|- | |0xA | ||
| | |JP0365-PCSG90004_00-SKP2TRIAL0000000 | ||
|- | |0x30 | ||
| | | | ||
|- | |- | ||
| | |GC_RO_SIZE | ||
|- | |0xA | ||
| | |00 00 00 00 | ||
|- | |0x4 | ||
| | |?? | ||
| | |- | ||
|GC_RW_SIZE | |||
|- | |0xA | ||
| | |00 00 00 00 | ||
| | |0x4 | ||
| | |?? | ||
| | |- | ||
| | |PARENTAL_LEVEL | ||
| | |0xE | ||
| | |00 00 00 00 | ||
|- | |0x4 | ||
| | |This should be the same as in the PS3 (from 0 to 11) | ||
| | |- | ||
| | |PSP2_DISP_VER | ||
| | |0xD | ||
| | |00 01 00 00 | ||
| | |0x4 | ||
| | |???? | ||
|- | |- | ||
| | |PSP2_SYSTEM_VER | ||
| | |0xF | ||
|01.500 | |||
| | |0x6 | ||
|Minimum FW to be play this game | |||
|- | |||
|PUBTOOLINFO | |||
|0xB | |||
|c_date=20111205 | |||
|0x200 | |||
|Don't know what this is, but it contain creation data (c_date=20111205) | |||
|- | |||
|REGION_DENY | |||
|0xB | |||
|0x00000000 | |||
|0x4 | |||
| | |||
|- | |||
|SAVEDATA_MAX_SIZE | |||
|0x11 | |||
|00 00 04 00 ( = 1024) | |||
|0x4 | |||
| i found this value here OFFSET: 0x1043 (File: JA0003-PCSC80003_00-UKETORNE00000000.PKG) in this case this game can use 1024 Bytes (1MB) | |||
|- | |||
|STITLE | |||
|0x6 | |||
|uke-torne | |||
|0x32 | |||
|Subtitle | |||
|- | |||
|STITLE_00 | |||
|0x9 | |||
|uke-torne | |||
|0x32 | |||
|Subtitle (00 is for JP) | |||
|- | |||
|TITLE | |||
|0x5 | |||
|uke-torne | |||
|0x80 | |||
|Title of the game | |||
|- | |||
|TITLE_00 | |||
|0x8 | |||
|uke-torne(ウケトルネ) | |||
|0x80 | |||
|Title of the game (00 is for JP) | |||
|- | |||
|TITLE_ID | |||
|0x8 | |||
|PCSG90004 | |||
|0x8 | |||
|APP_ID | |||
|- | |||
|VERSION | |||
|0x8 | |||
|01.01 | |||
|0x4 | |||
|PKG Version | |||
|- | |||
|} | |} | ||
==== | ==Category== | ||
{| class="wikitable sortable" | |||
{| class="wikitable | |||
|- | |- | ||
! | ! Value !! standard name | ||
|- | |- | ||
| ac || PS Vita Additional Content | |||
| | |||
| | |||
|- | |- | ||
| | | gd ||PS Vita Application | ||
|- | |- | ||
| | | gp ||PS Vita Application Patch | ||
|- | |- | ||
| | | gda ||PS Vita System Application | ||
|- | |- | ||
| | | gdc ||PS Vita Non-Game Application | ||
|- | |- | ||
| | | gdd ||PS Vita BG Application | ||
|- | |- | ||
| | | gpc ||PS Vita Non-Game Application Patch | ||
|- | |- | ||
| | | gpd ||PS Vita BG Application patch | ||
|- | |- | ||
| | | sd || PS Vita Save Data | ||
|- | |- | ||
|} | |} | ||
= PSF Dump (From 0xBF0 to 0x11F0) = | |||
The length of this is 0x5D0 | The length of this is 0x5D0 | ||
<pre> | <pre> |