Editing Param.sfo

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:
== Description ==
==Description==
'''SFO''' ('''S'''ystem '''F'''ile '''O'''bject) are used in folders which content needs to be displayed in the [[XMB]].


'''SFO''' ('''S'''ystem '''F'''ile '''O'''bject) are files used in folders whose content needs to be displayed in the PSP [[XMB]]. It is also present on PS3, PS Vita and PS4.
*The values contained in a SFO 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).
*The values contained in a SFO can be simplified as inputs/outputs for/from the content:
**Boot modifyers (most of the int32 datas) that are sent to the content when it 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).
**Information texts (most of the utf8 datas) about the content and its restrictions (e.g. title and version of a game).


'''SFX''' ('''S'''ystem '''F'''ile in '''X'''ML format) is similar than SFO but without the data related to its structure (the SFO metadata that has no real value).
'''SFX''' ('''S'''ystem '''F'''ile in '''X'''ML format) is similar than SFO but without the data related to its structure (the SFO metadata that has no real value).


The conversion between the two formats is direct because the important values contained in both formats are the same ('''version''', '''param_key''', '''param_fmt''', '''param_max_len''' and '''param_data''').
The conversion between the 2 formats is direct because the important values contained in both formats are the same ('''version''', '''param_key''', '''param_fmt''', '''param_max_len''' & '''param_data''').


SFO's and SFX's can be chained in a structure of subfolders where the "main" SFO activates a special subfolder, and the subfolder contains another SFO that activates another subfolder and so on.
SFO's and SFX's can be chained in a structure of subfolders where the "main" SFO activates a special subfolder, and the subfolder contains another SFO that activates another subfolder and so on.


== Internal Structure ==
==Internal Structure==
 
===header===
=== Header ===
 
At offset 0x0, length 0x14 (20 bytes)
At offset 0x0, length 0x14 (20 bytes)
{{Boxcode|content=<syntaxhighlight lang="c">
{{Boxcode|content=<syntaxhighlight lang="c">
Line 29: Line 26:
</syntaxhighlight>}}
</syntaxhighlight>}}


=== index_table ===
===index_table===
 
At offset 0x14, composed by a number of entries defined with '''tables_entries''' in the '''header''', each entry is 0x10 length (16 bytes). Values are in Little Endian.
At offset 0x14, composed by a number of entries defined with '''tables_entries''' in the '''header''', each entry is 0x10 length (16 bytes). Values are in Little Endian.


Every entry belongs to a '''key''' name in the '''key_table''' and defines a '''data''' area in the '''data_table'''.
Every entry belongs to a '''key''' name in the '''key_table''' and defines a '''data''' area in the '''data_table'''


{{Boxcode|content=<syntaxhighlight lang="c">
{{Boxcode|content=<syntaxhighlight lang="c">
Line 52: Line 48:
! In SFO !! In SFX
! In SFO !! In SFX
|-
|-
| 04 00 || {{no}}? || {{cellcolors|brown|yellow}} utf8-S || utf8 Special Mode, '''NOT''' NULL terminated || Used in SFO's generated by the system and/or linked to an user ([[Game Saves]] and [[Trophy files|Trophies]]). See {{talk}} page.
| 04 00 || {{no}}? || {{cellcolors|brown|yellow}} utf8-S || utf8 Special Mode, '''NOT''' NULL terminated || Used in SFO's generated by the system and/or linked to an user ([[Game Saves]] and [[Trophy files|Trophies]]). See {{talk}} page
|-
|-
| 04 02 || utf8 || {{cellcolors|brown|white}} utf8 || utf8 character string, NULL terminated (0x00) || Can be used any character from the system [[XMB Fonts|fonts]]. The NULL byte is counted as part of the used bytes in '''len'''.
| 04 02 || utf8 || {{cellcolors|brown|white}} utf8 || utf8 character string, NULL terminated (0x00) || Can be used any character from the system [[XMB Fonts|fonts]]. The NULL byte is counted as part of the used bytes in '''len'''
|-
|-
| 04 04 || int32 || {{cellcolors|black|lime}} int32 || integer 32 bits unsigned || Allways has a length of 4 bytes in '''len''' and '''max_len''' (even in the case some bytes are not used, all them are marked as used).
| 04 04 || int32 || {{cellcolors|black|lime}} int32 || integer 32 bits unsigned || Allways has a length of 4 bytes in '''len''' and '''max_len''' (even in the case some bytes are not used, all them are marked as used)
|-
|-
|}
|}


===key_table===
===key_table===
Composed by a number of '''key''' entries defined with '''tables_entries''' in the '''header''', are short utf8 strings in capitals, NULL terminated (0x00), and ordered alphabetically (from A to Z). This alphabetically order defines the order of the associated entries in the other two tables ('''index_table''', and '''data_table''')


Composed by a number of '''key''' entries defined with '''tables_entries''' in the '''header''', are short utf8 strings in capitals, NULL terminated (0x00), and ordered alphabetically (from A to Z). This alphabetically order defines the order of the associated entries in the other two tables ('''index_table''', and '''data_table''').
The end offset of this table needs to be aligned to a multiply of 32bits (4 bytes), this is made with a padding at the end of  '''key_table''' when needed (in a few SFO's the table is aligned naturally as a coincidence caused by the length of the '''key''' names used, when this happens there is no padding needed)
 
The end offset of this table needs to be aligned to a multiply of 32bits (4 bytes), this is made with a padding at the end of  '''key_table''' when needed (in a few SFO's the table is aligned naturally as a coincidence caused by the length of the '''key''' names used, when this happens there is no padding needed).


===data_table===
===data_table===
Composed by a number of '''data''' entries defined with '''tables_entries''' in the '''header''', every entry in this table is defined by the associated entry in the '''index_table''' by using: '''fmt''', '''len''', '''max_len''', and '''offset'''. There is no padding between entries neither at the end of this table


Composed by a number of '''data''' entries defined with '''tables_entries''' in the '''header''', every entry in this table is defined by the associated entry in the '''index_table''' by using: '''fmt''', '''len''', '''max_len''', and '''offset'''. There is no padding between entries neither at the end of this table.
Some '''data''' entries can be filled with zeroes (not used, but availables for being used). This entries can be considered reserved, and are marked with a '''len''' = 0 in the associated entry in the '''index_table'''


Some '''data''' entries can be filled with zeroes (not used, but available for being used). This entries can be considered reserved, and are marked with '''len''' = 0 in the associated entry in the '''index_table'''.


==Internal Structure Examples==
==Internal Structure Examples==
Both example files (SFO & SFX) are hand made (the structure is correct but are only a minimal example). Both contains the same info but in different format: only 1 entry (TITLE_ID) and the value for this entry (BLUS12345)


Both example files (SFO and SFX) are hand made (the structure is correct but are only a minimal example). Both contains the same info but in different format: only 1 entry (TITLE_ID) and the value for this entry (BLUS12345).
*The bigger difference between SFO and SFX is SFX doesnt contains:
 
*The biggest difference between SFO and SFX is that SFX does not contain:
**SFO header
**SFO header
**Key and Data offsets
**Key and Data offsets
**Data used length
**Data used length


''This structure was taken from PS3 SFO''
''This Structure was taken from PS3 SFO''
''There is no TITLE_ID inside PSP SFO''
''There is no TITLE_ID inside PSP SFO''


Line 126: Line 120:
|}
|}


=== SFX ===
===SFX===
 
{{Boxtip3|content= SFX are used in some disc with special content<br />SFX Can be used as "templates" to generate SFO files<br />SFX Can be created using a SFO as the "source". See: [[Dev_Tools#SFO2SFX|SFO2SFX]]}}
{{Boxtip3|content= SFX are used in some disc with special content<br />
SFX can be used as "templates" to generate SFO files<br />
SFX can be created using a SFO as the "source". See: [[Dev_Tools#SFO2SFX|SFO2SFX]]}}


{{Boxcode|content=<syntaxhighlight lang="xml">
{{Boxcode|content=<syntaxhighlight lang="xml">
Line 142: Line 133:
**The function of '''add_hidden="false"''' is unknown
**The function of '''add_hidden="false"''' is unknown


== Parameters Descriptions ==
==Parameters Descriptions==


===BOOTABLE===
===BOOTABLE===
{{Boxinfo3|content='''param_fmt''': Int32<br />'''param_max_len''': 4 <br />'''param_len''': 4}}
{{Boxinfo3|content='''param_fmt''': Int32<br />'''param_max_len''': 4 <br />'''param_len''': 4}}


This flag tells the PSP if the game is bootable or not?
This flag tells the PSP if the game is bootable or not ?
 
====CATEGORY====


====CATEGORY====<!--Will Need some help on this as i only know of one currently UG which should be for GAMES-->
{{Boxinfo3|content='''param_fmt''': utf8-S<br />'''param_max_len''':4<br />'''param_len''': 4}}
{{Boxinfo3|content='''param_fmt''': utf8-S<br />'''param_max_len''':4<br />'''param_len''': 4}}


A category table is needed here.
Category Table Needed Here i currently only have one PSP sfo
 
UG - PSP GAME ?
UG - PSP GAME ?


Please note that all contributions to PSP Developer wiki are considered to be released under the GNU Free Documentation License 1.2 (see PSP 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)