Talk:PARAM.SFO: Difference between revisions

From PS3 Developer wiki
Jump to navigation Jump to search
("SaveData Example" moved to talk)
(all "parameters descriptions" moved from talk to front (ada, i didnt remembered it was a description for TITLEID here when i wrote another one in the front page... now both are copied in main))
Line 218: Line 218:


Source: http://ps3dev.wikispaces.com/PARAM.SFO
Source: http://ps3dev.wikispaces.com/PARAM.SFO
----
==Parameters Descriptions==
=== ATTRIBUTE ===
  Data type: Int32
  Block fixed size: 4 bytes
  Bytes used: 4
This parameter contains a maximun of 32 flags that can be turned on/off to activate/deactivate speciall boot modes for the content.
Values are stored in "Little Indian" format, by converting them to "Big Indian" and then to binary is easyer to see in a "human readable" format how are ordered from older to newer (note that the list separates them in 4 blocks, each of this blocks are "filled" from top to bottom). The older flags are related to PSP in the first block because PSP is older than PS3.
Flags can be used in groups, to remove or add a flag from the group is needed to make an addition or a substraction of the values.
{| class="wikitable"
|-
!  Little Endian !! Big Endian !! Flags (Binary ) !! Description
|-
| 01 00 00 00 || 00 00 00 01 || 00000000 00000000 00000000 00000001 || PSP [[Remote_Play|Remote Play]] in MPEG4 SP/ATRAC
|-
| 02 00 00 00 || 00 00 00 02 || 00000000 00000000 00000000 00000010 || PSP Export
|-
| 04 00 00 00 || 00 00 00 04 || 00000000 00000000 00000000 00000100 || PSP [[Remote_Play|Remote Play]] in MPEG4 AVC/AAC
|-
| 08 00 00 00 || 00 00 00 08 || 00000000 00000000 00000000 00001000 || Unknown !
|-
| 10 00 00 00 || 00 00 00 10 || 00000000 00000000 00000000 00010000 || Unknown !
|-
| 20 00 00 00 || 00 00 00 20 || 00000000 00000000 00000000 00100000 || "XMB in-game"
|-
| 40 00 00 00 || 00 00 00 40 || 00000000 00000000 00000000 01000000 || Not used yet ?
|-
| 80 00 00 00 || 00 00 00 80 || 00000000 00000000 00000000 10000000 || Not used yet ?
|-
! !! !! !!
|-
| 00 01 00 00 || 00 00 01 00 || 00000000 00000000 00000001 00000000 || Move Controller Warning Screen
|-
| 00 02 00 00 || 00 00 02 00 || 00000000 00000000 00000010 00000000 || Navigation Controller Warning Screen
|-
| 00 04 00 00 || 00 00 04 00 || 00000000 00000000 00000100 00000000 || Eye Cam Warning Screen
|-
| 00 08 00 00 || 00 00 08 00 || 00000000 00000000 00001000 00000000 || Calibration Notification
|-
| 00 10 00 00 || 00 00 10 00 || 00000000 00000000 00010000 00000000 || Stereoscopic 3D Warning Screen
|-
| 00 20 00 00 || 00 00 20 00 || 00000000 00000000 00100000 00000000 || Not used yet ?
|-
| 00 40 00 00 || 00 00 40 00 || 00000000 00000000 01000000 00000000 || Not used yet ?
|-
| 00 80 00 00 || 00 00 80 00 || 00000000 00000000 10000000 00000000 || Not used yet ?
|-
! !! !! !!
|-
| 00 00 01 00 || 00 01 00 00 || 00000000 00000001 00000000 00000000 || Unknown !
|-
| 00 00 02 00 || 00 02 00 00 || 00000000 00000010 00000000 00000000 || Installable Packages in path PS3_GAME\PKGDIR\PKG**
|-
| 00 00 04 00 || 00 04 00 00 || 00000000 00000100 00000000 00000000 || Game patch overwrite atribute (resolution, sound format, remote play)
|-
| 00 00 08 00 || 00 08 00 00 || 00000000 00001000 00000000 00000000 || Enable game purchase (depends of variable "CONTENT_ID")
|-
| 00 00 10 00 || 00 10 00 00 || 00000000 00010000 00000000 00000000 || Game patch overwrite atribute (XMB in-game)
|-
| 00 00 20 00 || 00 20 00 00 || 00000000 00100000 00000000 00000000 || Game patch overwrite atribute (move screen)
|-
| 00 00 40 00 || 00 40 00 00 || 00000000 01000000 00000000 00000000 || Game patch overwrite atribute (3D screen)
|-
| 00 00 80 00 || 00 80 00 00 || 00000000 10000000 00000000 00000000 || Move compatible / Game patch overwrite atribute (Move controller)
|-
! !! !! !!
|-
| 00 00 00 01 || 01 00 00 00 || 00000001 00000000 00000000 00000000 || Not used yet ?
|-
| 00 00 00 02 || 02 00 00 00 || 00000010 00000000 00000000 00000000 || Not used yet ?
|-
| 00 00 00 04 || 04 00 00 00 || 00000100 00000000 00000000 00000000 || Not used yet ?
|-
| 00 00 00 08 || 08 00 00 00 || 00001000 00000000 00000000 00000000 || Not used yet ?
|-
| 00 00 00 10 || 10 00 00 00 || 00010000 00000000 00000000 00000000 || Not used yet ?
|-
| 00 00 00 20 || 20 00 00 00 || 00100000 00000000 00000000 00000000 || Not used yet ?
|-
| 00 00 00 40 || 40 00 00 00 || 01000000 00000000 00000000 00000000 || Not used yet ?
|-
| 00 00 00 80 || 80 00 00 00 || 10000000 00000000 00000000 00000000 || Not used yet ?
|}
Some examples. If you find a game with a flag in his ATTRIBUTE that is not yet in the table, please add it
{| class="wikitable"
|-
! Little Endian !! Big Endian !! Flags (Binary ) !!  Game !! Flags !! Description
|-
| 05 17 80 00 || 00 80 17 05 || 00000000 10000000 00010111 00000101 || killzone 3 || 7 || Move compatible + 3D screen + 3 move screens + 2 Remote Play modes
|-
| 20 00 02 00 || 00 02 00 20 || 00000000 00000010 00000000 00100000 || Dead Space 2 || 2 || Installable Packages + "XMB in-game"
|}
*PSP Remote Play
The format "MPEG4 AVC/AAC" only works when the other format "MPEG4 SP/ATRAC" is activated
*PSP Export
Can be activate depend to CATEGORY (HG and others?) and works only if "feel free to fill" checked by "feel free to fill"
*XMB In-game
Is a feature that lets you pause the game (with the PS button) and play your own music from the files stored in your HDD
The formats supported are the same than the native ones, it support playlists and all the normall functions of the music player. It was introduced in firmware 2.40
*Move Controller warning screen
This screen (and the other warning screens) are displayed before the game is launched, them explains the correct way to use the move controller, navigation controller, and eye cam respectively
Each of this screens are displayed around 3 seconds, the game waits for them to appear so is a good idea to remove them to improve the loading time, the removing of any of the 3 screens has no effect of the controller support and the controller will work without them
A example of a bad use of this screens is "3.56 FJW cfw" that patches all SFO's to activate 2 of this flags to force all his users to see 2 logos (i cant comment one of them, and the other the gargoile) causing a delay in the timing to boot a game or program >:P
*Navigation Controller, and Eye Cam warning screens
Only works when "Move Controller" warning screen is activated
*Calibration Notification
This flag makes appear a calibration screen, but only when the controller has not been calibrated previously (or when is missconfigured)
*Stereoscopic 3D Warning Screen
This is a warning screen similar than the ones related with move peripherals, but only appear when you are using a 3D compatible TV (is intended to give you some seconds to catch your 3D glasses)
*Installable Packages in path PS3_GAME\PKGDIR\PKG** (where ** is a number from 00 to 99)
This is one of the 2 ways to install packages (used in Blue-Ray discs), it can be said that the flags is "activating" the sub-folder PKGDIR, inside PKGDIR there is another SFO that can be considered an "Level2 SFO"
The ATTRIBUTE of this "Level2 SFO" is always an "1" (different of the values explained in this table that are only applicables to "Level1 SFO's"
*Enable game purchase
Only works if the category is a DG/HD and checked by "feel free to fill". Can change somes settings as titles, parental lock level, resolutions, and others Content Informations Files (probably related to expirations and such) after you purchased the game.
*Move compatible
Enables support for the Move Controller (Navigation Controller and Eye Cam are activated at the same time that the Move Controller and doesn't have/need a flag)
=== BOOTABLE ===
  Data type: Int32
  Block fixed size: 4 bytes
  Bytes used: 4
{| class="wikitable"
|-
!  Little Endian !! Big Endian !! Flags (Binary ) !! Description
|-
| 00 00 00 00 || 00 00 00 00 || 00000000 00000000 00000000 00000000 || Not bootable
|-
| 01 00 00 00 || 00 00 00 01 || 00000000 00000000 00000000 00000001 || Bootable
|-
|}
 
=== PARAMS ===
Used in Games, SFO CATEGORY type: "SD" SaveData.
Verified against [[XRegistry.sys]]
{| class="wikitable"
|-
! Sections !! length (in bytes) !! Example !! Content !! Notes
|-
| Section 1 || 24 || 030401020300000000000000 0800000000000000 03000000 || Unknown || (3 sections, divided in 12+8+4 bytes ?)
|-
| Section 2 || 4 || 01000000 || User Account nº ||
|-
| Section 3 || 16 || 123456789ABCDEF123456789ABCDEF || Console ID || Not PSID nor IDPS (needs verification)
|-
| Section 4 || 4 || 01000000 || User Account nº ||
|-
| Section 5 || 16 || 123456789ABCDEF123456789ABCDEF || PSN User account ID || Blanked if the account has not been registered in PSN
|-
| Section 6 || 960 || 00000000........ || Unknown || Big chunk of zeroes, probably used or reserved for other formats
|-
|}
=== PARENTAL_LEVEL ===
  Data type: Int32
  Block fixed size: 4 bytes
  Bytes used: 4
{| class="wikitable"
|-
!  Little Endian !! Big Endian !! Decimal !! Description
|-
| 00 00 00 00 || 00 00 00 00 || 0 || Disabled
|-
| 01 00 00 00 || 00 00 00 01 || 1 || Smaller
|-
| 02 00 00 00 || 00 00 00 02 || 2 ||
|-
| 03 00 00 00 || 00 00 00 03 || 3 ||
|-
| 04 00 00 00 || 00 00 00 04 || 4 ||
|-
| 05 00 00 00 || 00 00 00 05 || 5 ||
|-
| 06 00 00 00 || 00 00 00 06 || 6 ||
|-
| 07 00 00 00 || 00 00 00 07 || 7 ||
|-
| 08 00 00 00 || 00 00 00 08 || 8 ||
|-
| 09 00 00 00 || 00 00 00 09 || 9 ||
|-
| 0A 00 00 00 || 00 00 00 0A || 10 ||
|-
| 0B 00 00 00 || 00 00 00 0B || 11 || Higher
|-
|}
=== RESOLUTION ===
  Data type: Int32
  Block fixed size: 4 bytes
  Bytes used: 4
{| class="wikitable"
|-
!  Little Endian !! Big Endian !! Flags (Binary ) !! Description
|-
| 01 00 00 00 || 00 00 00 01 || 00000000 00000000 00000000 00000001 || 480  (4:3)
|-
| 02 00 00 00 || 00 00 00 02 || 00000000 00000000 00000000 00000010 || 576  (4:3)
|-
| 04 00 00 00 || 00 00 00 04 || 00000000 00000000 00000000 00000100 || 720  (16:9)
|-
| 08 00 00 00 || 00 00 00 08 || 00000000 00000000 00000000 00001000 || 1080 (16:9)
|-
| 10 00 00 00 || 00 00 00 10 || 00000000 00000000 00000000 00010000 || 480  (16:9)
|-
| 20 00 00 00 || 00 00 00 20 || 00000000 00000000 00000000 00100000 || 576  (16:9)
|-
| 40 00 00 00 || 00 00 00 40 || 00000000 00000000 00000000 01000000 || Not used yet ?
|-
| 80 00 00 00 || 00 00 00 80 || 00000000 00000000 00000000 10000000 || Not used yet ?
|-
|}
=== SOUND_FORMAT ===
  Data type: Int32
  Block fixed size: 4 bytes
  Bytes used: 4
{| class="wikitable"
|-
!  Little Endian !! Big Endian !! Flags (Binary ) !! Description
|-
| 01 00 00 00 || 00 00 00 01 || 00000000 00000000 00000000 00000001 || LPCM 2.0
|-
| 04 00 00 00 || 00 00 00 04 || 00000000 00000000 00000000 00000100 || LPCM 5.1
|-
| 10 00 00 00 || 00 00 00 10 || 00000000 00000000 00000000 00010000 || LPCM 7.1
|-
| 02 01 00 00 || 00 00 01 02 || 00000000 00000000 00000001 00000010 || Dolby Digital 5.1 ???
|-
| 02 02 00 00 || 00 00 02 02 || 00000000 00000000 00000010 00000010 || DTS Digital Surround ???
|-
|}
===TITLE_ID===
Depends on fews parameters,Category as DG or HG and regions or type.<br>
Examples:<br>
BCAS23005 Asian version of FF XIII<br>
BLJM60362 Japanese version of FF XIII-2<br>
Same game (Dead Space) but for differents market with differents languages files:<br>
BLES00308 <br>
BLES00309<br>
Most of the Bd games will start by BLES (European Market), BLUS (US market) or BLJM/BC.. '(Asian market) +5 digits (Chronological order)
Hdd games or apps will start by NP
Fews title_id names are reserved/restricted and don t apply to this classic way and used By Sony for certains purposes.<br>
Examples:<br>
Title ID as TEST-xxxxx (x as a number) with disc version set as 00.00
Others examples:<br>

Revision as of 07:23, 17 January 2012

SFO_tools_-_linux-64bit-compiles.rar (23.61 KB)

https://github.com/an0nym0u5/PSL1GHT/commit/75013299710d2bde224e2052284461a665a071bf

read_sfo.tar.bz2 (6.33 KB)

PS3SFOEdit.zip (47.59 KB)



More accurate data about the param.sfo: http://pastie.org/2236579 (this is a single example, not generic)


PARAM.SFO

Header

0x00000000  00 50 53 46                                  | .PSF | u32 magic 
0x00000004  01 01 00 00                                  | .... | u32 file version 
0x00000008  d4 00 00 00                                  | .... | u32 key offset 
0x0000000c  50 01 00 00                                  | .... | u32 value offset 
0x00000010  0c 00 00 00                                  | .... | u32 entry count 


Entries

APP_VER
0x00000014  00 00                                        | ..   | u16 key_offset 
0x00000016  04                                           | .    | u8 unk1 
0x00000017  02                                           | .    | u8 value_type 
0x00000018  06 00 00 00                                  | .... | u32 value_len 
0x0000001c  08 00 00 00                                  | .... | u32 padded_len 
0x00000020  00 00 00 00                                  | .... | u32 value_offset 
ATTRIBUTE
0x00000024  08 00                                        | ..   | u16 key_offset
0x00000026  04                                           | .    | u8 unk1
0x00000027  04                                           | .    | u8 value_type
0x00000028  04 00 00 00                                  | .... | u32 value_len
0x0000002c  04 00 00 00                                  | .... | u32 padded_len
0x00000030  08 00 00 00                                  | .... | u32 value_offset
BOOTABLE
0x00000034  12 00                                        | ..   | u16 key_offset
0x00000036  04                                           | .    | u8 unk1
0x00000037  04                                           | .    | u8 value_type
0x00000038  04 00 00 00                                  | .... | u32 value_len
0x0000003c  04 00 00 00                                  | .... | u32 padded_len
0x00000040  0c 00 00 00                                  | .... | u32 value_offset
CATEGORY
0x00000044  1b 00                                        | ..   | u16 key_offset
0x00000046  04                                           | .    | u8 unk1
0x00000047  02                                           | .    | u8 value_type
0x00000048  03 00 00 00                                  | .... | u32 value_len
0x0000004c  04 00 00 00                                  | .... | u32 padded_len
0x00000050  10 00 00 00                                  | .... | u32 value_offset
LICENSE
0x00000054  24 00                                        | ..   | u16 key_offset
0x00000056  04                                           | .    | u8 unk1
0x00000057  02                                           | .    | u8 value_type
0x00000058  13 01 00 00                                  | .... | u32 value_len
0x0000005c  00 02 00 00                                  | .... | u32 padded_len
0x00000060  14 00 00 00                                  | .... | u32 value_offset
PARENTAL_LEVEL
0x00000064  2c 00                                        | ..   | u16 key_offset
0x00000066  04                                           | .    | u8 unk1
0x00000067  04                                           | .    | u8 value_type
0x00000068  04 00 00 00                                  | .... | u32 value_len
0x0000006c  04 00 00 00                                  | .... | u32 padded_len
0x00000070  14 02 00 00                                  | .... | u32 value_offset
PS3_SYSTEM_VER
0x00000074  3b 00                                        | ..   | u16 key_offset
0x00000076  04                                           | .    | u8 unk1
0x00000076  02                                           | .    | u8 value_type
0x00000078  08 00 00 00                                  | .... | u32 value_len
0x0000007c  08 00 00 00                                  | .... | u32 padded_len
0x00000080  18 02 00 00                                  | .... | u32 value_offset
RESOLUTION
0x00000084  4a 00                                        | ..   | u16 key_offset
0x00000086  04                                           | .    | u8 unk1
0x00000087  04                                           | .    | u8 value_type
0x00000088  04 00 00 00                                  | .... | u32 value_len
0x0000008c  04 00 00 00                                  | .... | u32 padded_len
0x00000090  20 02 00 00                                  | .... | u32 value_offset
SOUND_FORMAT
0x00000094  55 00                                        | ..   | u16 key_offset
0x00000096  04                                           | .    | u8 unk1
0x00000097  04                                           | .    | u8 value_type
0x00000098  04 00 00 00                                  | .... | u32 value_len
0x0000009c  04 00 00 00                                  | .... | u32 padded_len
0x000000a0  24 02 00 00                                  | .... | u32 value_offset
TITLE
0x000000a4  62 00                                        | ..   | u16 key_offset
0x000000a6  04                                           | .    | u8 unk1
0x000000a6  02                                           | .    | u8 value_type
0x000000a8  0b 00 00 00                                  | .... | u32 value_len
0x000000ac  80 00 00 00                                  | .... | u32 padded_len
0x000000b0  28 02 00 00                                  | .... | u32 value_offset
TITLE_ID
0x000000b4  68 00                                        | ..   | u16 key_offset
0x000000b6  04                                           | .    | u8 unk1
0x000000b6  02                                           | .    | u8 value_type
0x000000b8  0e 00 00 00                                  | .... | u32 value_len
0x000000bc  10 00 00 00                                  | .... | u32 padded_len
0x000000c0  a8 02 00 00                                  | .... | u32 value_offset
VERSION
0x000000c4  71 00                                        | ..   | u16 key_offset
0x000000c6  04                                           | .    | u8 unk1
0x000000c7  02                                           | .    | u8 value_type
0x000000c8  06 00 00 00                                  | .... | u32 value_len
0x000000cc  08 00 00 00                                  | .... | u32 padded_len
0x000000d0  b8 02 00 00                                  | .... | u32 value_offset


Name table (keys)

0x000000d4  50 50 5f 56 45 52 00                         | APP_VER.        |
0x000000dc  41 54 54 52 49 42 55 54 45 00                | ATTRIBUTE.      |
0x000000e6  42 4f 4f 54 41 42 4c 45 00                   | BOOTABLE.       |
0x000000ef  43 41 54 45 47 4f 52 59 00                   | CATEGORY.       |
0x000000f8  4c 49 43 45 4e 53 45 00                      | LICENSE.        |
0x00000100  50 41 52 45 4e 54 41 4c 5f 4c 45 56 45 4c 00 | PARENTAL_LEVEL. |
0x00000110  50 53 33 5f 53 59 53 54 45 4d 5f 56 45 52 00 | PS3_SYSTEM_VER. |
0x0000011e  52 45 53 4f 4c 55 54 49 4f 4e 00             | RESOLUTION.     |
0x00000129  53 4f 55 4e 44 5f 46 4f 52 4d 41 54 00       | SOUND_FORMAT.   |
0x00000136  54 49 54 4c 45 00                            | TITLE.          |
0x0000013c  54 49 54 4c 45 5f 49 44 00                   | TITLE_ID.       |
0x00000145  56 45 52 53 49 4f 4e 00 00 00 00             | VERSION.        |


Data table (values)

APP_VER
0x00000150  30 30 2e 30 35 00 00 00                      | 00.05    | u8 app_ver[7]
ATTRIBUTE
0x00000158  05 00 00 00                                  | ....     | u32 attribute
BOOTABLE
0x0000015c  01 00 00 00                                  | ....     | u32 bootable
CATEGORY
0x00000160  48 47 00 00                                  | HG..     | u8 category[3]
LICENSE
0x00000164  ...                                          | ....     | u8 license[0x200]
PARENTAL_LEVEL
0x00000364  00 00 00 00                                  | ....     | u32 parental_level
PS3_SYSTEM_VER
0x00000368  30 33 2e 31 30 30 30 00                      | 03.1000. | u8 system_version[7]
RESOLUTION
0x00000370  3f 00 00 00                                  | ....     | u32 resolution
SOUND_FORMAT
0x00000374  17 01 00 00                                  | ....     | u32 sound_format
TITLE
0x00000378  ...                                          | ........ | u8 title[0x30]
TITLE_ID
0x000003f8  ...                                          | ........ | u8 title_id[0x10]
VERSION
0x000004f8  30 30 2e 30 35 00 00 00                      | 00.05... | u8 version[7]

SaveData Example

This is an structure in C of the table for a SaveData

 unsigned char Variable_Name_table[Number_of_variables+1]={
 "ACCOUNT_ID\0x00",
 "ATTRIBUTE\0x00",
 "CATEGORY\0x00",
 "DETAIL0\x00",
  "PARAMS\0x00",
 "PARAMS2\0x00",
 "PARENTAL_LEVEL\0x00",
 "SAVEDATA_DIRECTORY\0x00",
 "SAVEDATA_LIST_PARAM\0x00",
 "SUB_TITLE\0x00",
 "TITLE\0x00",
 "\0x00\0x00"
 };
 unsigned char Account_ID[16]; account_id
 unsigned long Attribute; attribute
 unsigned char Category[4]="SD",0x00,0x00 category
 unsigned char Detail[1024]; detail
 000558 01 05 01 03 03 00 00 00 00 00 00 00 00 00 00 00 / params
 000568 08 00 00 00 01 00 00 00 01 00 00 00 00 00 00 00
 000578 992 x 0x00
 unsigned char Params2[12]; params2
 unsigned long Parental_level; parental_level
 unsigned char SaveData_directory[64]; savedata_directory
 0009a8 37 33 37 00 00 00 00 00 savedata_list_param
 unsigned char Sub_Title[128]; sub title
 unsigned char Title[128]; title
 } param_sfo;

Source: http://ps3dev.wikispaces.com/PARAM.SFO