Editing PlayStation archive (PSARC)
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: | ||
=Description= | =Description= | ||
'''P'''lay'''S'''tation '''ARC'''hive is a | '''P'''lay'''S'''tation '''ARC'''hive is a container that allows subfolders and per-file compression using Zlib or lzma with 9 compression levels | ||
*Notes: | |||
**lzma with compression level 9 has a compression ratio of around 50% of the size for general files | |||
**some files doesnt admits much compression like .BIK videos (max compression ratio for .BIK doesnt reachs 1% or 2%). For this reason is better to dont use compression with videos because the size reduction is ridiculous | |||
=Structure= | =Structure= | ||
See | See {{Talk}} page | ||
==Header== | ==Header== | ||
PSARC header example: | PSARC header example: | ||
'''Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F''' | '''Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F''' | ||
00000000 <span style="background:#ff6666;">50 53 41 52</span> <span style="background:#66ff66;">00 01 00 04</span> <span style="background:#ffff66;">7A 6C 69 62</span> <span style="background:#6666ff;">00 01 23 BA</span> | 00000000 <span style="background:#ff6666;">50 53 41 52</span> <span style="background:#66ff66;">00 01 00 04</span> <span style="background:#ffff66;">7A 6C 69 62</span> <span style="background:#6666ff;">00 01 23 BA</span> PSAR....zlib..#º | ||
00000010 <span style="background:#dd00dd;">00 00 00 1E</span> <span style="background:#dddd00;">00 00 09 16</span> <span style="background:#dddddd;">00 01 00 00</span> <span style="background:#d0000d;">00 00 00 02</span> ................ | 00000010 <span style="background:#dd00dd;">00 00 00 1E</span> <span style="background:#dddd00;">00 00 09 16</span> <span style="background:#dddddd;">00 01 00 00</span> <span style="background:#d0000d;">00 00 00 02</span> ................ | ||
Line 33: | Line 19: | ||
! Offset !! Size !! Name !! Example !! Value (conversion) !! Notes | ! Offset !! Size !! Name !! Example !! Value (conversion) !! Notes | ||
|+PSARC Header | |+PSARC Header | ||
| style="background-color:#ff6666;" | 0x00 || style="background-color:#ff6666;" | 0x04 || '''magic''' || 50 53 41 52 || PSAR || '''P'''lay'''S'''tation ''' | | style="background-color:#ff6666;" | 0x00 || style="background-color:#ff6666;" | 0x04 || '''magic''' || 50 53 41 52 || PSAR || '''P'''lay'''S'''tation '''Ar'''chive | ||
|- | |- | ||
| style="background-color:#66ff66;" | 0x04 || style="background-color:#66ff66;" | 0x04 || '''version''' || 00 01 00 04 || v1.4 || First 2 bytes is the | | style="background-color:#66ff66;" | 0x04 || style="background-color:#66ff66;" | 0x04 || '''version''' || 00 01 00 04 || v1.4 || First 2 bytes is the main version, next 2 bytes is the subversion and are processed separatedlly, so 0001.0004 is "translated" to 1.4 by the system | ||
|- | |- | ||
| style="background-color:#ffff66;" | 0x08 || style="background-color:#ffff66;" | 0x04 || ''' | | style="background-color:#ffff66;" | 0x08 || style="background-color:#ffff66;" | 0x04 || '''compression type''' || 7A 6C 69 62 || zlib || zlib (default) or lzma | ||
|- | |- | ||
| style="background-color:#6666ff;" | 0x0C || style="background-color:#6666ff;" | 0x04 || ''' | | style="background-color:#6666ff;" | 0x0C || style="background-color:#6666ff;" | 0x04 || '''table of content length''' || 00 01 23 BA || 0x123BA || | ||
|- | |- | ||
| style="background-color:#dd00dd;" | 0x10 || style="background-color:#dd00dd;" | 0x04 || ''' | | style="background-color:#dd00dd;" | 0x10 || style="background-color:#dd00dd;" | 0x04 || '''table of content entries size''' || 00 00 00 1E || 30 Bytes || Default is 30 bytes | ||
|- | |- | ||
| style="background-color:#dddd00;" | 0x14 || style="background-color:#dddd00;" | 0x04 || ''' | | style="background-color:#dddd00;" | 0x14 || style="background-color:#dddd00;" | 0x04 || '''number of entries''' || 00 00 09 16 || 1+2325 files || The filecount includes the "file path/names definitions" as an additionall file always placed at first position in the list and without an assigned ID | ||
|- | |- | ||
| style="background-color:#dddddd;" | 0x18 || style="background-color:#dddddd;" | 0x04 || ''' | | style="background-color:#dddddd;" | 0x18 || style="background-color:#dddddd;" | 0x04 || '''block size''' || 00 01 00 00 || 65536 Bytes || Default is 65536 Bytes | ||
|- | |- | ||
| style="background-color:#d0000d;" | 0x1C || style="background-color:#d0000d;" | 0x04 || ''' | | style="background-color:#d0000d;" | 0x1C || style="background-color:#d0000d;" | 0x04 || '''archive flags''' || 00 00 00 02 || Absolute paths || Default is 0. See table below | ||
|} | |} | ||
PSARC Archive Flags are stored in the header as a big endian number, and defines the characteristics and structure of the archive when it was created | |||
{| class="wikitable" | {| class="wikitable" | ||
|+PSARC Archive Flags | |||
! Hexadecimal<br />(big endian) !! Decimal !! Binary<br />(flags) !! Flag Name !! Notes | |||
|- | |- | ||
| {{cellcolors|black|lime}} 00 00 00 00 || style="text-align:right;" | 0 || 00000000 00000000 00000000 00000000 || '''relative archive paths''' (no slash character at the start of every line) || default value when using command line or xml | |||
| | |||
| | |||
|- | |- | ||
| | | {{cellcolors|black|lime}} 00 00 00 01 || style="text-align:right;" | 1 || 00000000 00000000 00000000 00000001 || '''ignorecase archive paths''' (all characters in capitals) || same than --ignorecase in command line and ignorecase="true" in the xml | ||
|- | |- | ||
| | | {{cellcolors|black|lime}} 00 00 00 02 || style="text-align:right;" | 2 || 00000000 00000000 00000000 00000010 || '''absolute archive paths''' (slash character added at the start of every line) || same than --absolute in command line and absolute="true" in xml | ||
|} | |} | ||
==TOC Table== | |||
==Blocks info table== | ==Blocks info table== | ||
==File table== | ==File table== | ||
The compression is | The compression is applyed "per-block", is posible to know the compression level by looking at the zlib header | ||
<small> | |||
{{Zlib Header}} | |||
</small> | |||
=PSARC Tools= | =PSARC Tools= | ||
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 | GUI versions are derivated from the command line versions | ||
==Open PSARC PS3 Extractor== | ==Command line versions== | ||
===Open PSARC PS3 Extractor=== | |||
By Matthieu Milan. It allows you to extract PSARC archive data in linux | By Matthieu Milan. It allows you to extract PSARC archive data in linux | ||
Source code: https://www.ferb.fr/ps3/PSARC/ | Source code: https://www.ferb.fr/ps3/PSARC/ | ||
==PSARC tool== | ===PSARC tool=== | ||
Port of Matthieu Milan's open PSARC PS3 extractor to Windows. Tool written by Matthieu Milan (@usineur). Ported to VS2012 by AlexAltea. | Port of Matthieu Milan's open PSARC PS3 extractor to Windows. Tool written by Matthieu Milan (@usineur). Ported to VS2012 by AlexAltea. | ||
Line 137: | Line 82: | ||
-e START END Extracts files with the file id specified by the range between START and END (inclusive). | -e START END Extracts files with the file id specified by the range between START and END (inclusive). | ||
==PSARC Extractor== | ===PSARC Extractor=== | ||
By Insomniac @ xentax forums, download link: http://www.ps3hax.net/downloads.php?do=file&id=452 and http://www.modcontrol.com/Board/pc-tools/28869-psarc-ps3-extractor.html | |||
By Insomniac @ xentax forums, download link: | |||
'''Usage:''' | '''Usage:''' | ||
Line 164: | Line 108: | ||
3 | 3,30 KB | /my/files/dummies/dummy3.bin | 3 | 3,30 KB | /my/files/dummies/dummy3.bin | ||
==PSARC== | ===PSARC=== | ||
1.60.008 SDK : x | 1.60.008 SDK : x | ||
1.92.001 SDK : x | 1.92.001 SDK : x | ||
Line 175: | Line 118: | ||
4.50.001 SDK : psarc-1310.001 (C++), built on Nov 16 2011 at 03:31:36 | 4.50.001 SDK : psarc-1310.001 (C++), built on Nov 16 2011 at 03:31:36 | ||
*From xentax forums: http://forum.xentax.com/viewtopic.php?p=44228&sid=0a7b5167ba4599f71f85471119c918a6#p44228 Download link: | *From xentax forums: http://forum.xentax.com/viewtopic.php?p=44228&sid=0a7b5167ba4599f71f85471119c918a6#p44228 Download link: http://www.mediafire.com/?o3wy35uublreh | ||
===help=== | ====help==== | ||
{{Keyboard|content= | {{Keyboard|content= | ||
C:\>psarc.exe --help | '''C:\Portables\psarc>psarc.exe --help''' | ||
usage: | '''usage:''' | ||
psarc verb [options] [file...] | psarc verb [options] [file...] | ||
psarc --xml=XMLFILE | psarc --xml=XMLFILE | ||
verbs: | '''verbs:''' | ||
create Create an archive. (default) | create Create an archive. (default) | ||
extract Extract contents of an existing archive. | extract Extract contents of an existing archive. | ||
Line 192: | Line 135: | ||
dtd Display a DTD describing psarc's XML input syntax. | dtd Display a DTD describing psarc's XML input syntax. | ||
general options: | '''general options:''' | ||
-h, --help Show this help message and exit. | -h, --help Show this help message and exit. | ||
--version Display version and exit. | --version Display version and exit. | ||
Line 201: | Line 144: | ||
--xml=XMLFILE XML list of actions to perform. | --xml=XMLFILE XML list of actions to perform. | ||
create options: | '''create options:''' | ||
-oFILE, --output=FILE Archive filename to create. | -oFILE, --output=FILE Archive filename to create. | ||
-IINPUTFILE, --inputfile=INPUTFILE Inputfile listing files to archive. Consider --xml instead, which gives you more control. | -IINPUTFILE, --inputfile=INPUTFILE Inputfile listing files to archive. Consider --xml instead, which gives you more control. | ||
Line 220: | Line 163: | ||
--mergedups Compare the content of all files, and merge identical files so that only one copy of the data is included. | --mergedups Compare the content of all files, and merge identical files so that only one copy of the data is included. | ||
extract options: | '''extract options:''' | ||
--input=FILE Archive to extract files from. (default is first file argument) | --input=FILE Archive to extract files from. (default is first file argument) | ||
--to=DIRECTORY Directory to write extracted files to. (default is current directory) | --to=DIRECTORY Directory to write extracted files to. (default is current directory) | ||
</ | }} | ||
====verify==== | |||
{{Keyboard|content= | |||
'''C:\Portables\psarc>psarc.exe verify c:\psarctests\custom_folders.psarc''' | |||
Verifying c:\psarctests\custom_folders.psarc | |||
Validating 1: Folder1/Image1.bmp (6220854 bytes) | |||
Validating 2: Folder2/Folder21/Image21.png (6142 bytes) | |||
Validating 3: Folder3/Folder31/Folder311/Image311.jpg (12524 bytes) | |||
Archive OK | |||
}} | |||
{| class="wikitable" | |||
|+verify output per-file | |||
|| Validating <file ID/number>: || file path inside psarc archive || (file original size in bytes) | |||
|} | |||
====list==== | |||
{{Keyboard|content= | |||
'''C:\Portables\psarc>psarc.exe list c:\psarctests\custom_folders.psarc''' | |||
Listing c:\psarctests\custom_folders.psarc | |||
Folder1/Image1.bmp (6220854/6220854 100%) | |||
Folder2/Folder21/Image21.png (157/6142 2%) | |||
Folder3/Folder31/Folder311/Image311.jpg (209/12524 1%) | |||
}} | |||
{| class="wikitable" | |||
|+list output per-file | |||
|| file path inside psarc archive || (file compressed size || file original size || compression percentage) | |||
|} | |||
*Notes: | |||
**In the compression percentage: 100% is no reduction, 0% is a huge reduction | |||
=== | ====dump==== | ||
{{Keyboard|content= | |||
'''C:\Portables\psarc>psarc.exe dump c:\psarctests\custom_folders.psarc''' | |||
Dumping c:\psarctests\custom_folders.psarc | |||
Folder1/Image1.bmp os=6220854 cs=6220854 fb=2 | |||
Folder2/Folder21/Image21.png os=6142 cs=157 fb=97 | |||
Folder3/Folder31/Folder311/Image311.jpg os=12524 cs=209 fb=98 | |||
}} | |||
{| class="wikitable" | |||
|+dump output per-file | |||
|| file path inside psarc archive || file original size || file compressed size || file block start offset ? | |||
|} | |||
====dtd==== | |||
The output of this command is a layout that defines the structure of an .xml document. See: http://www.w3schools.com/DTD/ | The output of this command is a layout that defines the structure of an .xml document. See: http://www.w3schools.com/DTD/ | ||
{{Keyboard|content= | {{Keyboard|content= | ||
C:\>psarc.exe dtd | '''C:\Portables\psarc>psarc.exe dtd'''<nowiki> | ||
<!ELEMENT psarc (create|extract)+> | <!ELEMENT psarc (create|extract)+> | ||
Line 284: | Line 267: | ||
skipmissingfiles (true|false) "false" | skipmissingfiles (true|false) "false" | ||
overwrite (true|false) "false"> | overwrite (true|false) "false"> | ||
</ | </nowiki>}} | ||
*DTD Notes: | *DTD Notes: | ||
Line 293: | Line 276: | ||
**Required attributes are defined with: '''#REQUIRED''', and optional attributes with: '''#IMPLIED''' | **Required attributes are defined with: '''#REQUIRED''', and optional attributes with: '''#IMPLIED''' | ||
Based in the DTD layout is posible to create an .xml layout that automatizes all the actions of the tool, this example is a generic layout containing all the elements and attributes availables together | |||
{{Boxcode|content=<syntaxhighlight lang="xml"> | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
{{Boxcode| | |||
<psarc> | <psarc> | ||
<create archive="" absolute="false" ignorecase="false" mergedups="false" stripall="false" blocksize="65536" jobs="" skipmissingfiles="false" format="psarc" overwrite="false"> | <create archive="" absolute="false" ignorecase="false" mergedups="false" stripall="false" blocksize="65536" jobs="" skipmissingfiles="false" format="psarc" overwrite="false"> | ||
Line 314: | Line 294: | ||
</psarc> | </psarc> | ||
</syntaxhighlight>}} | </syntaxhighlight>}} | ||
*XML Notes: | |||
**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 | |||
**Is posible to generate this kind of .xml by using as the source the output of the "list" command after applying over it some character strings replacing using regular expressions with a tool like http://findandreplace.codeplex.com/# | |||
The options '''-- | ====extract==== | ||
The required options are '''--input''' (the source .psarc) and '''--to''' (the target folder where contents will be extracted). The example command extracts all files from the .psarc to a directory with full directory tree names, no skipped missing files, no overwrite | |||
=== | {{Keyboard|content= | ||
'''C:\Portables\psarc>psarc.exe extract --input=c:\psarctests\custom_folders.psarc --to=c:\psarctests\custom_folders_extracted''' | |||
Extracting: Folder1/Image1.bmp (6220854 bytes) | |||
Extracting: Folder2/Folder21/Image21.png (6142 bytes) | |||
Extracting: Folder3/Folder31/Folder311/Image311.jpg (12524 bytes) | |||
}} | |||
*There are 3 optional available attributes for extract: | |||
**'''--overwrite''' (if the files existed in the extraction folder they will be overwritten without advise) | |||
**'''--strip-all''' (extracts all files in the root of the target folder, incase of several extracted files with the same name the program will return an error, this can be solved by using the command --overwrite) | |||
**'''--skip-missing-files''' (seems pointless, mostly to extract files from malformed .psarcs or .psarcs that doesnt passes the "verify" command ?) | |||
* | |||
* | |||
When using this options the command line output is the same than in the example above, there is no mention of wich files are stripped, overwritten, or missing in the extraction process, usage example: | |||
{{Keyboard|content= | |||
'''C:\Portables\psarc>psarc.exe extract --overwrite --strip-all --skip-missing-files --input=c:\psarctests\custom_folders.psarc --to=c:\psarctests\custom_folders_extracted''' | |||
Extracting: Folder1/Image1.bmp (6220854 bytes) | |||
Extracting: Folder2/Folder21/Image21.png (6142 bytes) | |||
{{Keyboard|content= | Extracting: Folder3/Folder31/Folder311/Image311.jpg (12524 bytes) | ||
C:\>psarc.exe | |||
}} | }} | ||
====create==== | |||
Ther are 3 different ways to create a psarc archive (by '''directory''', by '''filelist''', or by '''file'''). '''By directory''' creates the psarc using the contents of a specifyed folder and all subfolders, all them ordered alphabetically (windows style), this method cant be used to rebuild psarcs where every file needs to be assigned with an specific ID (and im not sure if is available in command line). '''By file''' means every path of every file in the PC is needed to be specifyed and this is not posible in command line when the archive has lot of files (for a single file is fine, but when are thousand of files is a no way). For this reason the only method explained here is '''by filelist''' | |||
===create=== | |||
The filelist is a plain .txt file where every file is defined by a single line, composed by his path, filename, and file extension, 1 line per file, in any order (not needed to be ordered alphabetically). Is posible to generate this kind of filelists automatically by using the output of the '''--list''' command and some regular expressions to replace characters (this is long explain and doesnt fits here by now) | |||
As explained before, the examples used here in wiki uses full PC paths to be more flexible (no need to place psarc.exe next to the source folder, actually you can place psarc.exe in c:\ the source folder in d:\ and create the psarc in x:\). When using full paths is mandatory to use the '''strip''' element with the '''regex''' attribute to remove part of the PC path (e.g: if you strip '''psarctests\custom_folders_extracted\''' from c:\psarctests\custom_folders_extracted\Folder1\Image1.bmp the resulting path of the file inside the archive will be '''Folder1\Image1.bmp''') | |||
In the next example the filelist is in c:\psarctests\custom_folders_filelist.txt and contains the PC paths of the files that will be included inside the psarc archive: | |||
C:\psarctests\custom_folders_extracted\Folder1\Image1.bmp | |||
C:\psarctests\custom_folders_extracted\Folder2\Folder21\Image21.png | |||
C:\psarctests\custom_folders_extracted\Folder3\Folder31\Folder311\Image311.jpg | |||
{{ | The psarc archive is created by using the filelist as the '''--inputfile''' | ||
{{Keyboard|content= | |||
'''C:\Portables\psarc>psarc.exe create --strip=c:\psarctests\custom_folders_extracted\ --output=c:\psarctests\custom_folders.psarc --inputfile=c:\psarctests\custom_folders_filelist.txt''' | |||
Strip: c:\psarctests\custom_folders_extracted | |||
Strip: | |||
Flags: relative | Flags: relative | ||
NumJobs: 2 | NumJobs: 2 | ||
Output: | InputFile: c:\psarctests\custom_folders_filelist.txt | ||
Output: c:\psarctests\custom_folders.psarc | |||
Compression: zlib level 9 | Compression: zlib level 9 | ||
Archiving C: | Archiving C:/psarctests/custom_folders_extracted/Folder1/Image1.bmp | ||
Archiving C:/psarctests/custom_folders_extracted/Folder2/Folder21/Image21.png | |||
Archiving C:/psarctests/custom_folders_extracted/Folder3/Folder31/Folder311/Image311.jpg | |||
Compressing TOC | Compressing TOC | ||
Compressing C:\psarctests\ | Compressing C:\psarctests\custom_folders_extracted\Folder1\Image1.bmp | ||
Compressing C:\psarctests\ | Compressing C:\psarctests\custom_folders_extracted\Folder2\Folder21\Image21.png | ||
Compressing C:\psarctests\ | Compressing C:\psarctests\custom_folders_extracted\Folder3\Folder31\Folder311\Image311.jpg | ||
3: Total Files Archived | |||
6239520: Original Size | 6239520: Original Size | ||
87: Manifest (uncompressed) | |||
57: Manifest (compressed) | |||
348: TOC size | |||
8789: Final Size | |||
4. | 4.0%: Directory Overhead | ||
99.9%: Compression Ratio | 99.9%: Compression Ratio | ||
9: Compression Level | 9: Compression Level | ||
}} | |||
*Notes: | |||
**'''--strip''' option removes part of the paths from the filelist | |||
**The program replaces the windows slash "\" by "/" when archiving the files (note the difference in the creation process between'''Archiving C:/''' and '''Compressing C:\...'''). When making a '''--list''' command over the created psarc the slashes will appear as "/" because this is how they was archived in the '''Manifest''' (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''') | |||
====xml==== | |||
To use an .xml is needed to prepare it before using psarc.exe, using an xml is the most flexible way to use psarc.exe because allows to place the source (files to create, or psarc to extract), target (files to create, or psarc to extract), and psarc.exe in any path of the PC, it allows the usage of a filelist.txt (that defines all files inside the archive), create psarcs based in a directory, or specify all the files inside the xml, also to specify the compression level for every file (needed for video or audio files that doesnt admits compression), etc... | |||
Is also the most complicated method because is needed to specify full PC paths inside the xml, and when creating is needed to specify regular expressions to strip part of the PC path | |||
When the xml is ready you can run it this way: | |||
{{Keyboard|content= | |||
'''C:\Portables\psarc>psarc.exe --xml=c:\psarctests\extract_custom_folders.xml''' | |||
}} | |||
The '''-- | The options '''--verbose''', '''--debug''', and '''--quiet''' cant be used inside the xml, so if needed are specifyed in the command line, this way: | ||
{{Keyboard|content= | |||
'''C:\Portables\psarc>psarc.exe --debug --xml=c:\psarctests\create_custom_folders.xml''' | |||
}} | |||
=====xml extract===== | |||
Extracting all files | |||
{{Boxcode|content=<syntaxhighlight lang="xml"> | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
{{ | |||
<psarc> | <psarc> | ||
< | <extract archive="c:\psarctests\custom_folders.psarc" to="c:\psarctests\custom_folders_extracted"> | ||
</extract> | </extract> | ||
</psarc> | </psarc> | ||
</syntaxhighlight>}} | </syntaxhighlight>}} | ||
Extracting a single file | |||
{{Boxcode|content=<syntaxhighlight lang="xml"> | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
{{Boxcode| | |||
<psarc> | <psarc> | ||
<extract archive=" | <extract archive="c:\psarctests\custom_folders.psarc" to="c:\psarctests\custom_folders_extracted"> | ||
<file archivepath=" | <file archivepath="Folder1/Image1.bmp" /> | ||
</extract> | </extract> | ||
</psarc> | </psarc> | ||
</syntaxhighlight>}} | </syntaxhighlight>}} | ||
When extracting single files is also posible to use the same attributes availables in command line, and attributes per-file, but they uses different names inside the xml (see the DTD example) | When extracting single files is also posible to use the same attributes availables in command line, and attributes per-file, but they uses different names inside the xml (see the DTD example) | ||
{{Boxcode| | {{Boxcode|content=<syntaxhighlight lang="xml"> | ||
<?xml version="1.0" encoding="UTF-8"?> | |||
<psarc> | <psarc> | ||
<extract archive=" | <extract archive="c:\psarctests\custom_folders.psarc" to="c:\psarctests\custom_folders_extracted" stripall="true" skipmissingfiles="false" overwrite="true"> | ||
<file archivepath=" | <file archivepath="Folder1/Image1.bmp" skipifmissing="true" /> | ||
<file archivepath=" | <file archivepath="Folder3/Folder31/Folder311/Image311.jpg" /> | ||
</extract> | </extract> | ||
</psarc> | </psarc> | ||
Line 707: | Line 416: | ||
**The element "extract" uses the attribute '''archive''' but could be replaced by '''input''', in this case are exactly the same and both will work, actually '''--input''' is the same option used in comand line but the examples in wiki uses the name '''archive''' because is more intuitive (is also used as an attribute for "create" and in both cases is refered to the compressed archive.psarc). Both (archive and input) appears in the DTD as optional (#IMPLIED) but only one of them can be used in the xml | **The element "extract" uses the attribute '''archive''' but could be replaced by '''input''', in this case are exactly the same and both will work, actually '''--input''' is the same option used in comand line but the examples in wiki uses the name '''archive''' because is more intuitive (is also used as an attribute for "create" and in both cases is refered to the compressed archive.psarc). Both (archive and input) appears in the DTD as optional (#IMPLIED) but only one of them can be used in the xml | ||
**The element "file" uses the attribute '''archivepath''' but could be replaced by '''path''', in this case are exactly the same and both will work, but the examples in wiki uses the name '''archivepath''' because is more intuitive (is refered to the path of a file inside archive.psarc). Both (archivepath and path) appears in the DTD as optional (#IMPLIED) but only one of them can be used in the xml | **The element "file" uses the attribute '''archivepath''' but could be replaced by '''path''', in this case are exactly the same and both will work, but the examples in wiki uses the name '''archivepath''' because is more intuitive (is refered to the path of a file inside archive.psarc). Both (archivepath and path) appears in the DTD as optional (#IMPLIED) but only one of them can be used in the xml | ||
**To identify the paths inside the psarc archive use '''--list''' option in command line. By default the paths inside the psarc are relative (path names starts with the name of the folder) but in some cases the paths starts with a slash"/" (when the psarc has been created with '''absolute''' flag), in this case the slash needs to be specifyed as part of the path here (e.g: '''archivepath="Folder1/Image1.bmp"''' is a relative path, and '''archivepath="/Folder1/Image1.bmp"''' is an absolute path) | |||
=== | =====xml create===== | ||
==Total Commander plugin== | ==Total Commander plugin== | ||
http://www.totalcmd.net/plugring/PSARC.html | http://www.totalcmd.net/plugring/PSARC.html | ||
==PS3 PSARC GUI== | ==GUI versions== | ||
===PS3 PSARC GUI=== | |||
It's a graphical user interface to view, extract or create psarc archives. GUI written by aldo, unknown psarc tool used internally | It's a graphical user interface to view, extract or create psarc archives. GUI written by aldo, unknown psarc tool used internally | ||
Download link: http://aldostools.org/ps3_psarc_gui.rar | Download link: http://aldostools.org/ps3_psarc_gui.rar | ||
=Games or Apps using PSARC files= | =Games or Apps using PSARC files= | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
! colspan=" | ! colspan="3" | External information !! colspan="5" | PSARC Header info !! rowspan="2" | Notes | ||
|- | |- | ||
! TITLE !! | ! Platform !! TITLE_ID !! TITLE !! Version<BR />(offset 0x04) !! Compression<BR />(offset 0x08) !! TOC entry size<BR />(offset 0x10) !! Block Size<BR />(offset 0x18) !! Flags<BR />(offset 0x1C) | ||
|- | |- | ||
| | | {{icon content ps3}} || || Ape Escape || 00010004 || Zlib || 0000001E || 00010000 || 00000002 || uses full paths (created with --absolute) | ||
|- | |- | ||
| | | {{icon content ps3}} || || Atelier Rorona Plus || 00010004 || zlib || 0000001E || 00010000 || 00000002 || | ||
|- | |- | ||
| | | {{icon content ps3}} || || God of War. Ascension || 00010004 || zlib || 0000001E || 00010000 || 00000002 || | ||
|- | |- | ||
| | | {{icon content ps3}} || || Killzone 3 || 00010004 || zlib || 0000001E || 00010000 || 00000001 || | ||
|- | |- | ||
| | | {{icon content ps3}} || || Mass Effect 3 || 00010004 || lzma || 0000001E || 00010000 || 00000003 || AUDIO.PSARC created with: --lzma --nocompress --absolute --ignorecase<br />MAIN.PSARC created with: --lzma --absolute --ignorecase | ||
|- | |- | ||
| | | {{icon content ps3}} || || Motorstorm. Pacific Rift || || || || || || | ||
|- | |- | ||
| | | {{icon content ps3}} || || Ni No Kuni || || || || || || .psarc file extensions renamed to .adat | ||
|- | |- | ||
| | | {{icon content ps3}} || || The Last Of Us || 00010003 || zlib || 0000001E || 00010000 || 00000000 || the game can load files from decompressed psarcs (because the original psarcs doesnt uses flags) | ||
|- | |- | ||
| | | {{icon content ps3}} || || Uncharted 2 || 00010003 || zlib || 0000001E || 00010000 || 00000000 || the game can load files from decompressed psarcs (because the original psarcs doesnt uses flags) | ||
|- | |- | ||
| | | {{icon content ps3}} || || Warhawk || || || || || || | ||
|- | |- | ||
| {{icon content ps4}} || || VidZone || 00010004 || zlib || 0000001E || 00010000 || 00000000 || | |||
| | |||
| | |||
| VidZone | |||
|} | |} | ||
*Other games that probably uses PSARC's | *Other games that probably uses PSARC's | ||
**Uncharted 1? | **Uncharted 1?, and 3? | ||
**Killzone colletion ? | **Killzone colletion ? | ||
**God of War. III ? | |||
**God of War. Collection ? | **God of War. Collection ? | ||
**other Motorstorms ? | **other Motorstorms ? | ||
*Rebuild notes: | |||
**Mass effect 3 MAIN.PSARC contains a folder with generic files (compressed with level 9) and another folder with .BIK videos (not compressed at all). In the creation options suggested above in the table the compression level is not defined and this means all them will use the default compression level 9 (so the .BIK files will have an 1% or 2% of compression ratio). This is not how the original file was created (but works), it seems there is a way to define specific compression levels "per file" or "per folder" (by using a DTD.XML filelist?) | |||
{{File Formats}} | {{File Formats}} | ||
<noinclude> | <noinclude>[[Category:Main]]</noinclude> | ||
[[Category:Main]] | |||
</noinclude> |