Editing PlayStation archive (PSARC)

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 8: Line 8:




The compression algorithms, the PS3 system, and the .psarc format, allows for 9 compression levels but in the practise only are used level 0 (no compression) or 9 (max compression used as the default compression level)


The compression algorithms, the PS3 system, and the .psarc format, allows for 9 compression levels but in the practice only are used level 0 (no compression) or 9 (max compression used as the default compression level)
Compression level 9 for generic file types results as a compression ratio of around 50% of the original size, the final compression ratio can vary for different types of files, usually multimedia files (video, audio, etc) doesnt admits much compression because are already compressed originally (as example, max compression ratio for .BIK video and .MP3 audio doesnt reachs 1% or 2%). For this reason is better to dont compress multimedia files because the size reduction is ridiculous and read access times can be reduced (causing a delay/lag/freeze when trying to load the file)


Compression level 9 for generic file types results as a compression ratio of around 50% of the original size, the final compression ratio can vary for different types of files, usually multimedia files (video, audio, etc) doesn't allow much compression because are already compressed originally (as example, max compression ratio for .BIK video and .MP3 audio doesn't reach 1% or 2%). For this reason is better not to compress multimedia files because the size reduction is ridiculous and read access times can be reduced (causing a delay/lag/freeze when trying to load the file)
Very small files (smaller than 100 bytes or so) as well as dummy files (0 bytes) doesnt admits compression because are so small that the compression algorithm is not able to reduce them, they will be stored without compression inside the .psarc archive even when is applyed compression over them. When listing the contents of a .psarc with this kind of files will be displayed with a percentage of 100% and both his compressed and decompressed sizes the same value
 
Very small files (smaller than 100 bytes or so) as well as dummy files (0 bytes) doesn't admits compression because are so small that the compression algorithm is not able to reduce them, they will be stored without compression inside the .psarc archive even when is applied compression over them. When listing the contents of a .psarc with this kind of files will be displayed with a percentage of 100% and both his compressed and decompressed sizes the same value


<small>
<small>
Line 51: Line 50:


*'''Relative''' (default, no flags)
*'''Relative''' (default, no flags)
**Default value when the .psarc is created from command line or an .xml and no special access paths modes are specified
**Default value when the .psarc is created from command line or an .xml and no special access paths modes are specifyed
**The paths in the '''manifest''' doesn't have an slash character at the start of every line, the system accesses the files exactly like if the .psarc was a folder itself
**The paths in the '''manifest''' doesnt have an slash character at the start of every line, the system accesses the files exactly like if the .psarc was a folder itself
**e.g: '''Folder/File.bin"'''
**e.g: '''Folder/File.bin"'''
**In the games that uses .psarc's without flags (like ''uncharted'' series or ''the last of us'') is possible to replace the psarc by a folder with the same name of the psarc and his contents decompressed inside
**In the games that uses .psarc's without flags (like ''uncharted'' series or ''the last of us'') is posible to replace the psarc by a folder with the same name of the psarc and his contents decompressed inside


*'''Ignorecase''' flag
*'''Ignorecase''' flag
Line 105: Line 104:


==File table==
==File table==
The compression is applied "per-block", is possible to know the compression level by looking at the zlib header
The compression is applyed "per-block", is posible to know the compression level by looking at the zlib header


===Manifest===
===Manifest===
Manifest is the first file inside the psarc filetable, doesn't appears as a file when using the '''--list''' command and doesn't have an assigned '''ID'''
Manifest is the first file inside the psarc filetable, doesnt appears as a file when using the '''--list''' command and doesnt have an assigned '''ID'''


In windows all the paths uses the slash "\" but when the psarc is created the paths are stored inside the manifest as "/". When making a '''--list''' command over a psarc the slashes will appear as "/"
In windows all the paths uses the slash "\" but when the psarc is created the paths are stored inside the manifest as "/". When making a '''--list''' command over a psarc the slashes will appear as "/"
Line 117: Line 116:
There are several versions of PSARC related tools, features has been implemented along the different versions and is hard to keep a record of them, please help filling the info in the page
There are several versions of PSARC related tools, features has been implemented along the different versions and is hard to keep a record of them, please help filling the info in the page


GUI versions are derived from the command line versions
GUI versions are derivated from the command line versions


==Open PSARC PS3 Extractor==
==Open PSARC PS3 Extractor==
Line 138: Line 137:


==PSARC Extractor==
==PSARC Extractor==
{{Missingfiles}}
By Insomniac @ xentax forums, download link: <s>http://www.ps3hax.net/downloads.php?do=file&id=452</s> and <s>http://www.modcontrol.com/Board/pc-tools/28869-psarc-ps3-extractor.html</s>
By Insomniac @ xentax forums, download link: <s>http://www.ps3hax.net/downloads.php?do=file&id=452</s> and <s>http://www.modcontrol.com/Board/pc-tools/28869-psarc-ps3-extractor.html</s>


Line 165: Line 163:


==PSARC==
==PSARC==
{{Missingfiles}}
  1.60.008 SDK : x
  1.60.008 SDK : x
  1.92.001 SDK : x
  1.92.001 SDK : x
Line 314: Line 311:
</psarc>
</psarc>
</syntaxhighlight>}}
</syntaxhighlight>}}
*The purpose of this XML is to use it as a base layout containing all, but is not possible to use it like that, is needed to delete the tags that are not needed for a specific case, the ones that are incompatibles with other tags, and is needed to add paths, etc...
*The purpose of this XML is to use it as a base layout containing all, but is not posible to use it like that, is needed to delete the tags that are not needed for a specific case, the ones that are incompatibles with other tags, and is needed to add paths, etc...
*Some attributes appears as common in the DTD for "create" and "extract" but are not common, some of them has been deleted to avoid mistakes... but probably is needed to delete some more
*Some attributes appears as common in the DTD for "create" and "extract" but are not common, some of them has been deleted to avoid mistakes... but probably is needed to delete some more


Line 375: Line 372:


====create by directory====
====create by directory====
Creates a psarc using the contents of a specified folder and all subfolders. Is only available when using an .xml because command line doesn't allow to specify a source folder
Creates a psarc using the contents of a specifyed folder and all subfolders. Is only available when using an .xml because command line doesnt allows to specify a source folder


Is the most rude method to create a psarc because all folders and files will be archived alphabetically based in his names (there is no control of the ID's that will be assigned to each file in the '''manifest'''). Cant be used to rebuild psarcs
Is the most rude method to create a psarc because all folders and files will be archived alphabetically based in his names (there is no controll of the ID's that will be assigned to each file in the '''manifest'''). Cant be used to rebuild psarcs


Note in the next example the file dummy.txt (located in the root of the folder in windows, so considered first) has been archived after BMPfolder1
Note in the next examle the file dummy.txt (located in the root of the folder in windows, so considered first) has been archived after BMPfolder1


{{Boxcode|title=Create_by_directory.xml|code=<syntaxhighlight lang="xml">
{{Boxcode|title=Create_by_directory.xml|code=<syntaxhighlight lang="xml">
Line 1,205: Line 1,202:
|-
|-
| All others || 00010003 || zlib || 0000001E || 00010000 || 00000003 (ignorecase + absolute) || compress all ||  
| All others || 00010003 || zlib || 0000001E || 00010000 || 00000003 (ignorecase + absolute) || compress all ||  
|-
|Sonic the Fighters
|rom.psarc
|
|
|
|
|
|
|Contains arcade ROM files, audio, and UI graphics
|-
|-
| The Last Of Us || All ? || 00010003 || zlib || 0000001E || 00010000 || 00000000 (no flags) ||  ||  
| The Last Of Us || All ? || 00010003 || zlib || 0000001E || 00010000 || 00000000 (no flags) ||  ||  
Line 1,264: Line 1,251:


{{File Formats}}
{{File Formats}}
<noinclude>
<noinclude>[[Category:Main]]</noinclude>
[[Category:Main]]
</noinclude>
Please note that all contributions to PS3 Developer wiki are considered to be released under the GNU Free Documentation License 1.2 (see PS3 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)