Downgrading: Difference between revisions

From Vita Developer wiki
Jump to navigation Jump to search
(Created page with "= Namco System - Common = <gallery> Namco T6LM.jpg|Namco Tekken 6 live monitor Namco T6.jpg|Namco Tekken 6 standard Namco T6advertisement.jpg|Namco Tekken 6 advertisement<br /...")
 
No edit summary
Line 1: Line 1:
= Namco System - Common =
=Description=
<gallery>
'''P'''lay'''S'''tation '''ARC'''hive is a generic file container that uses an internal hierarchy of subfolders with defined access paths, and optional zlib or lzma per-file compression
Namco T6LM.jpg|Namco Tekken 6 live monitor
Namco T6.jpg|Namco Tekken 6 standard
Namco T6advertisement.jpg|Namco Tekken 6 advertisement<br />Left: Standard version<br />Right: Live Monitor version
Gundamvs4.jpg|Namco System 357
</gallery>


* The case is a big clunky square box called "rack assy": S357-07J Assy, S357B-08J / E Assy, S357C-10J Assy, S357C-11E Assy, or S369C-11J / E Assy
* PS3 Retail based motherboards (using [[Target ID]] {{ARC}} '''A0'''), without WiFi/BT module/board, and without BD Drive (and without integrated BD controller in motherboards over CECH-25xx)
* They do have 2 additional boards manufactured by namco: 1x I/O board, 1x JVS board (JAMMA v2 standards)
* Arcade firmware allows to install packages from the "Install package files" icon in game column
* Namco.uk cabinet manuals: http://namco.co.uk/bandainamcogames/technical-manuals/namco.html and http://www.namco.co.uk/PDF-manuals/namco-manuals/
* Overview of servicing: http://home.gamer.com.tw/creationDetail.php?sn=860018


*XMB messages related with arcade firmware updates inside '''dev_flash/vsh/resource/software_update_plugin.rco/English.xml'''
The access paths are stored in a special file generated at build time called '''manifest''', It mimics a standard tree structure of folders/files but the root of the hierarchy is not defined, this way the contents of the psarc can be "mounted" by the system/game as part of his filesystem at any place and under any device letter/name
{{Boxcode|content=<syntaxhighlight lang="xml">
 
<Text name="msg_update_copying_donot_turn_off_arcade">Copying update data to the system storage... Do not turn off the system.</Text>
There are 3 different methods to generate this paths that defines how the .psarc contents are mounted by the system/game, this methods are enabled by the '''archive flags''' stored in the header, the system/game knows how to recreate the filesystem paths and mounts the .psarc contents by reading the '''archive flags''' that are needed to process the access paths in the '''manifest'''
<Text name="msg_eject_media_auto_restart_arcade">Remove the storage media that contains update data. By removing the storage media, the system will automatically restart.</Text>
 
</syntaxhighlight>}}
 
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)
 
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)
 
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
 
<small>
{{Zlib Header}}
</small>


== Game Dongles and HDDs List ==
=Structure=
The games comes preinstalled in the HDD and paired to a dongle. Games can contain firmware updates, and game updates. Both installed automatically when booting the game for first time.
See: debian psarc Kplugin structure. From Manuel Stahl (thymythos) @ http://opendesktop.org/content/show.php/PSARC+file+header?content=162745


The game update source: '''/dev_hdd0/game/SCEEXE000/ARCDIR/INSTALL0.PKG'''
==Header==
PSARC header example:


The firmware update path (source): '''/dev_hdd0/game/SCEEXE000/ARCDIR/PS3UPDAT.PUP'''
'''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>  <span style="background:#ff6666;">PSAR</span>....<span style="background:#ffff66;">zlib</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>  ................


{| class="wikitable sortable"
{| class="wikitable"
|-
|-
! colspan="4" | Namco Game !! colspan="4" | Namco System compatibility !! rowspan="2" | Firmware !! rowspan="2" | Website !! rowspan="2" | Notes
! Offset !! Size !! Name !! Example !! Value (conversion) !! Notes
|+PSARC Header
| style="background-color:#ff6666;" | 0x00 || style="background-color:#ff6666;" | 0x04 || '''magic''' || 50 53 41 52 || PSAR || '''P'''lay'''S'''tation '''AR'''chive
|-
|-
! Year!! English&nbsp;Name <BR />Japanese&nbsp;Name !! HDD Ref. !! Dongle Ref. !! ''357&nbsp;A''<br />S357-07J !! ''357&nbsp;B''<br />S357B-08J !! ''357&nbsp;C''<br />S357C-10J<br />S357C-11E !! ''369''<br />S369C-11J<br />S369C-11E
| style="background-color:#66ff66;" | 0x04 || style="background-color:#66ff66;" | 0x04 || '''version''' || 00 01 00 04 || v1.4 || First 2 bytes is the '''major version''', next 2 bytes is the '''minor version'''
|-
|-
! rowspan="2" | 2007
| style="background-color:#ffff66;" | 0x08 || style="background-color:#ffff66;" | 0x04 || '''compression_type''' || 7A 6C 69 62 || zlib || '''zlib''' (default)<br>'''lzma'''
| Tekken 6 <BR />鉄拳6 || TE6100-1-NA-HDD0-A || TE61 || {{Yes}} || {{Yes}} || {{Yes}} || ? || 2.51 || [[http://www.tekken-official.jp/tk6ac/index.html Website]] ||  
|-bgcolor="#CCCCCC"
| Tekken 6 (Live Monitor) <BR />鉄拳6ライブモニター用 || TE6100-1-LM-HDD0-A || TE6L || {{Yes}} || {{Yes}} || {{Yes}} || ? || 2.51 || [[http://www.tekken-official.jp/tk6ac/index.html Website]] ||
|-
|-
! rowspan="3" | 2008
| style="background-color:#6666ff;" | 0x0C || style="background-color:#6666ff;" | 0x04 || '''toc_length''' || 00 01 23 BA || 0x123BA || Includes 32 byte header length + block length table following ToC
| Tekken 6 Bloodline Rebellion <BR />鉄拳6 BLOODLINE REBELLION || T6B100-1-NA-HDD0-A or <BR />T6B100-2-NA-HDD0-A02 || T6B1 or <BR />T6B2 || {{Yes}} || {{Yes}} || {{Yes}} || ? || 2.51 || [[http://www.tekken-official.jp/tk6br/index.html Website]] || There are at least 2 versions of this game
|-bgcolor="#CCCCCC"
| Tekken 6 Bloodline Rebellion (Live Monitor) <BR />鉄拳6 BLOODLINE REBELLION ライブモニター用 || T6B100-1-LM-HDD0-A || T6BL || {{Yes}} || {{Yes}} || {{Yes}} || ? || 2.51 ||[[http://www.tekken-official.jp/tk6br/index.html Website]] ||  
|-
|-
| Razing Storm || RST100-2-NA-MPR0-A || RST1 ? || {{Yes}} || {{Yes}} || {{Yes}} || ? || 2.51 || [[http://www.bandainamcogames.co.jp/am/vg/razingstorm/ Website]] || [[http://www.namco.co.uk/PDF-manuals/namco-manuals/Razing_Storm-Manual.pdf Service Manual.pdf]]
| style="background-color:#dd00dd;" | 0x10 || style="background-color:#dd00dd;" | 0x04 || '''toc_entry_size''' || 00 00 00 1E || 30 Bytes || Default is 30 bytes
|-
|-
! rowspan="2" | 2010
| style="background-color:#dddd00;" | 0x14 || style="background-color:#dddd00;" | 0x04 || '''toc_entries''' || 00 00 09 16 || 1 manifest + 2325 files || The '''manifest''' is always included as the first file in the archive without an assigned ID
| Deadstorm Pirates || DSP100-2-NA-MPR0-BXX || DSP1 ? || ? || ? || {{Yes}} || ? || ? || [[http://www.namcoamerica.com/game.php?gameid=24 Website]] || [[http://www.namco.co.uk/PDF-manuals/namco-manuals/Deadstorm_Pirates_DX-manual.pdf Service Manual.pdf]]
|-
|-
| Kidou Senshi Gundam: Extreme Vs. || ? || ? || ? || ? || {{Yes}} || ? || 3.60 || [[http://gundam-vs.jp/extreme/ Website]] ||  
| style="background-color:#dddddd;" | 0x18 || style="background-color:#dddddd;" | 0x04 || '''block_size''' || 00 01 00 00 || 65536 Bytes || Default is 65536 bytes
|-
|-
! rowspan="3" | 2011
| style="background-color:#d0000d;" | 0x1C || style="background-color:#d0000d;" | 0x04 || '''archive_flags''' || 00 00 00 02 || Absolute paths || 0 = '''relative''' paths (default)<br>1 = '''ignorecase''' paths<br>2 = '''absolute''' paths
| Dragon Ball Zenkai Battle Royal || ? || ? || ? || ? || {{Yes}} || ? || ? || [[http://db-zenkai.com/ Website]] ||
|}
|-
 
| Taiko No Tatsujin || ? || ? || ? || ? || {{Yes}} || ? || ? || [[http://taiko.namco-ch.net/ Website]] ||
*'''Relative''' (default, no flags)
|-
**Default value when the .psarc is created from command line or an .xml and no special access paths modes are specifyed
| Tekken Tag Tournament 2 || ? || ? || ? || ? || ? || {{Yes}} || 3.60 || [[http://www.tekken-official.jp/ Website]] ||  
**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"'''
**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
**Enabled by using the option '''--ignorecase''' in command line or '''ignorecase="true"''' in the .xml
**The paths in the '''manifest''' are case insensitive (doesnt matters wich characters are in capitals)
 
*'''Absolute''' flag
**Enabled by using the option '''--absolute''' in command line or '''absolute="true"''' in the .xml
**The paths in the '''manifest''' have an slash character at the start of every line, <!-- the .psarc contents are mounted directly in the root of the application space (under USRDIR)... this is hidden because is a bit speculative, im not so sure but this is what it looks -->
**e.g: '''/Folder/File.bin"'''
 
==TOC Table==
 
PSARC TOC example:
 
'''Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F'''
00000020  <span style="background:#ff6666;">00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00</span>  ................
00000030  <span style="background:#ff6666;">00 00 00 00 00 00</span> <span style="background:#66ff66;">01 79 D9 00</span> 00 01 23 BA A9 A6  .......yÙ...#º©¦
00000040  AB EE E6 73 40 2A E6 C3 37 24 3F C1 81 16 00 00  «îæs@*æÃ7$?Á....
00000050  00 02 00 00 00 1D 90 00 00 01 45 3B 5A 08 E7 AC  ..........E;Z.ç¬
...
 
{| class="wikitable"
|-
|-
! rowspan="5" | 2012
! Offset !! Size !! Name !! Example !! Value (conversion) !! Notes
| Kidou Senshi Gundam: Extreme Vs. Full Boost || GEX100-1-NA-HDD0-A ? || GEX1 ? || ? || ? || {{Yes}} || ? || 4.20 || [[http://gundam-vs.jp/extreme/ Website]] ||
|+PSARC TOC
|-bgcolor="#CCCCCC"
| style="background-color:#ff6666;" | 0x20 || style="background-color:#ff6666;" | 0x16 || '''name digest''' || 00 00 ... 00 00  || - || 128-bit md5 hash
| Kidou Senshi Gundam: Extreme Vs. Full Boost (Live Monitor) || GEX100-1-LM-HDD0-A || GEX1L ? || ? || ? || {{Yes}} || ? || 4.20 || [[http://gundam-vs.jp/extreme/acfb/game/monitor.html Website]] || The game has five additional dongles
|-
|-
| Taiko No Tatsujin KATSU-DON || ST2100-1-NA-HDD0-A21 || ? || ? || ? || {{Yes}} || ? || ? || [[http://taiko.namco-ch.net/ Website]] ||
| style="background-color:#66ff66;" | 0x36 || style="background-color:#66ff66;" | 0x04 || '''index list''' || 01 79 D9 00 || - || Size of the (compressed per default) index list.
|-
| Tekken Tag Tournament 2 Unlimited || TG2100-1-NA-HDD0-F17 || TG21 & DTT2G || ? || ? || ? || {{Yes}} || 3.60 || [[http://www.tekken-official.jp/ Website]] || The game has an additional dongle
|-bgcolor="#CCCCCC"
| Tekken Tag Tournament 2 Unlimited (Live Monitor) || TG2100-1-LM-HDD0-F17 ? || TG21L & DTT2GL ? || ? || ? || ? || {{Yes}} || 3.60 || [[http://www.tekken-official.jp/ Website]] ||
|-
! rowspan="2" | 2013
| Taiko No Tatsujin SORAIRO || ST3100-1-NA-HDD0-B08 || ? || ? || ? || {{Yes}} || ? || ? || [[http://taiko.namco-ch.net/ Website]] ||
|-
| Taiko No Tatsujin MOMOIRO|| ST4100-1-NA-HDD0-K03 || ? || ? || ? || {{Yes}} || ? || ? || [[http://taiko.namco-ch.net/ Website]] ||
|-
! rowspan="1" | 2014
| Taiko No Tatsujin KIMIDORI || ST5100-1-NA-HDD0-A12 || ? || ? || ? || {{Yes}} || ? || ? || [[http://taiko.namco-ch.net/ Website]] ||
|-
! rowspan="1" | 2015
| Taiko No Tatsujin MURASAKI || ST6100-1-NA-HDD0-A11 || ? || ? || ? || {{Yes}} || ? || ? || [[http://taiko.namco-ch.net/ Website]] ||
|-bgcolor="#CCCCCC"
| colspan="11" | Rows marked in gray are "live monitor" versions, not playables, are "demo" machines that displays "real live gameplay" from other machines connected to a network. [[http://www.youtube.com/watch?v=sB4hrNrMenE video]]
|}
|}


<Gallery>
    <array name="TOC" length="num_entries">
File:Namco System 357 game update.jpg‎|Tekken 6 Bloodline Rebellion v2 game update
      <struct name="entry">
File:Tekken 6 Bloodline Rebellion (version A67).jpg|Tekken 6 Bloodline Rebellion <BR />(version A67)
        <array name="MD5" length="16"><primitive type="UInt8"/></array>
File:NAMCO_TE61_dongle_(Tekken_6).jpg‎|Tekken 6 dongle <BR />(TE61)
        <primitive name="zIndex" type="UInt32" />
File:NAMCO T6B1 dongle (Tekken 6 Bloodline Rebelion).jpg|Tekken 6 Bloodline Rebellion dongle <BR />(T6B1)
        <bitfield name="length" width="40" type="unsigned" />
File:NAMCO T6B2 dongle (Tekken 6 Bloodline Rebellion).jpg‎|Tekken 6 Bloodline Rebellion v2 dongle <BR />(T6B2)
        <bitfield name="offset" width="40" type="unsigned" />
File:Kidou Senshi Gundam Extreme Vs. Full Boost Live Monitor HDD.jpg|Kidou Senshi Gundam Extreme Vs. Full Boost Live Monitor HDD/Dongles <BR />(GEX100-1-LM-HDD0-A)
      </struct>
File:Tekken Tag Tournament 2 Unlimited (dongles).JPG|Tekken Tag Tournament 2 Unlimited dongles <BR />(TG21 & DTT2G)
    </array>
</Gallery>
 
==Blocks info table==
 
    <array name="block sizes" length="num_entries">
      <bitfield name="size" width="16" type="unsigned" />
    </array>
 
==File table==
The compression is applyed "per-block", is posible to know the compression level by looking at the zlib header
 
===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'''
 
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 "/"
 
To make things more generic all examples in wiki uses full PC paths, this allows to place the sources (files to create, or psarc to extract), targets (files to create, or psarc to extract), and psarc.exe in any path of the PC, using full paths makes needed the use of the "strip" option in all creation process to remove part of the PC path and device letter from the access paths stored in the '''manifest'''
 
=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
 
GUI versions are derivated from the command line versions
 
==Open PSARC PS3 Extractor==
By Matthieu Milan. It allows you to extract PSARC archive data in linux
 
Source code: https://www.ferb.fr/ps3/PSARC/
 
==PSARC tool==
Port of Matthieu Milan's open PSARC PS3 extractor to Windows. Tool written by Matthieu Milan (@usineur). Ported to VS2012 by AlexAltea.
 
source code: https://github.com/AlexAltea/psarc-tool
 
'''Usage:'''
  psarc [option] filename
'''Options:'''
  -l                Create a text file that lists the file id, size, and name of every file in the archive.
  -x                Extracts all files.
  -e START END      Extracts files with the file id specified by the range between START and END (inclusive).
 
==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
 
'''Usage:'''
  PSARC [flag] <fileName>
'''Flags:'''
  -l            Creates a text file that lists the File ID, Size, and Name of every file in the archive.
  -e START END  Extracts files with the File ID specified by the range between START and END (inclusive).
  <blank>        Extracts all files.
 
*Examples:
**Extract all files from data.psarc :    PSARC data.psarc
**Create list of files from data.psarc :    PSARC -l data.psarc
**Extract file with File ID 5 : PSARC -e 5 5 data.psarc
**Extract files with File ID 7 through 12 : PSARC -e 7 12 data.psarc
 
 
The flag -l creates a .txt file with a list of all the contents of the archive, the info included is: '''File ID''', '''File original size''', and '''File path''' inside psarc archive
 
Example of a .txt file created with the -l flag:
'''ID      Size        Name'''
1      | 7,39 KB    | /my/files/dummies/dummy1.bin
2      | 8,80 KB    | /my/files/dummies/dummy2.bin
3      | 3,30 KB    | /my/files/dummies/dummy3.bin
 
==PSARC==
1.60.008 SDK : x
1.92.001 SDK : x
3.40.001 SDK : psarc-138.002 (C++), built on Feb 15 2010 at 16:17:41
3.41.001 SDK : psarc-138.002 (C++), built on Feb 15 2010 at 16:17:41
3.60.001 SDK : psarc-138.002 (C++), built on Feb 15 2010 at 16:17:41
3.70.001 SDK : psarc-138.002 (C++), built on Feb 15 2010 at 16:17:41
4.00.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: http://www.mediafire.com/?o3wy35uublreh
 
===help===
{{Keyboard|content=
'''C:\>psarc.exe --help'''
'''usage:'''
psarc verb [options] [file...]
psarc --xml=XMLFILE
'''verbs:'''
create                                  Create an archive. (default)
extract                                Extract contents of an existing archive.
list                                    List contents of an existing archive.
dump                                    Print detailed info about archive for unit testing.
verify                                  Verify an existing archive's structural integrity and ensure that all files can be decompressed.
dtd                                    Display a DTD describing psarc's XML input syntax.
 
'''general options:'''
-h, --help                              Show this help message and exit.
    --version                           Display version and exit.
-d, --debug                            Debug: Show debug messages.
-v, --verbose                          Verbose: Show additional progress. (default)
-q, --quiet                            Quiet: Don't show any progress.
-y, --overwrite                        Overwrite existing files when creating/extracting.
--xml=XMLFILE                          XML list of actions to perform.
 
'''create options:'''
-oFILE, --output=FILE                  Archive filename to create.
-IINPUTFILE, --inputfile=INPUTFILE      Inputfile listing files to archive. Consider --xml instead, which gives you more control.
-m, --mself                            Create a PSARC-MSELF hybrid file for PS3, which can contain encrypted special files like SDATA, SPRX, and SPU SELF.
--zlib                                  Use Zlib when compressing. (default)
--lzma                                  Use LZMA when compressing. (usually for PS3 PSN)
--level=N                              Compression quality. 1 is fastest, 9 is best. (default = 9)
-N, --nocompress                        Store all files uncompressed in the archive.
-bBS, --blocksize=BS                    Use blocks of size BS. (default = 64KiB)
-jJOBS, --jobs=JOBS                    Compression threads to run at a time. (default = number of CPUs)
-sREGEX, --strip=REGEX                  Perl-compatible regex specifying a prefix to strip from the pathnames stored in the archive. This may be specified more than once. (default = current dir)
-S, --strip-all                        Strip all paths from files stored in the archive.
-a, --absolute                          Make the paths within the archive absolute.
-R, --relative                          Make the paths within the archive relative. (default)
-i, --ignorecase                        Make the archive directory case-insensitive.
--exclude=WILDCARD                      Wildcard specifying files to exclude.
--skip-missing-files                    If set then ignore it when a file cannot be found.
--mergedups                            Compare the content of all files, and merge identical files so that only one copy of the data is included.
 
'''extract options:'''
--input=FILE                            Archive to extract files from. (default is first file argument)
--to=DIRECTORY                          Directory to write extracted files to. (default is current directory)
}}
 
===dtd===
* Display a DTD describing psarc's XML input syntax.
 
The output of this command is a layout that defines the structure of an .xml document. See: http://www.w3schools.com/DTD/
 
{{Keyboard|content=
'''C:\>psarc.exe dtd'''<nowiki>
<!ELEMENT psarc (create|extract)+>
 
<!ELEMENT create (compression|strip|exclude|file|directory|filelist)+>
<!ATTLIST create archive CDATA #IMPLIED
                absolute (true|false) "false"
                ignorecase (true|false) "false"
                mergedups (true|false) "false"
                stripall (true|false) "false"
                blocksize CDATA "65536"
                jobs CDATA #IMPLIED
                skipmissingfiles (true|false) "false"
                format (psarc|psarc-mself) "psarc"
                overwrite (true|false) "false">
 
<!ELEMENT compression EMPTY>
<!ATTLIST compression type (zlib|lzma) "zlib"
                      level (1|2|3|4|5|6|7|8|9) "9"
                      enabled (true|false) "true">
 
<!ELEMENT strip EMPTY>
<!ATTLIST strip regex CDATA #REQUIRED>
 
<!ELEMENT exclude EMPTY>
<!ATTLIST exclude regex CDATA #IMPLIED
                  wildcard CDATA #IMPLIED>
 
<!ELEMENT file (CDATA)>
<!ATTLIST file wildcard CDATA #IMPLIED
              regex CDATA #IMPLIED
              path CDATA #IMPLIED
              archivepath CDATA #IMPLIED
              fromarchive CDATA #IMPLIED
              compressed (true|false) #IMPLIED
              skipifmissing (true|false) #IMPLIED>
 
<!ELEMENT filelist EMPTY>
<!ATTLIST filelist path CDATA #REQUIRED>
 
<!ELEMENT directory EMPTY>
<!ATTLIST directory path CDATA #REQUIRED
                    archivepath CDATA #IMPLIED
                    fromarchive CDATA #IMPLIED
                    compressed (true|false) #IMPLIED
                    skipifmissing (true|false) #IMPLIED>
 
<!ELEMENT extract (file)+>
<!ATTLIST extract archive CDATA #IMPLIED
                  input CDATA #IMPLIED
                  to CDATA #IMPLIED
                  stripall (true|false) "false"
                  skipmissingfiles (true|false) "false"
                  overwrite (true|false) "false">
</nowiki>}}
 
*DTD Notes:
**Elements are defined in the DTD as: '''<!ELEMENT element-name (element-content)>'''
**Attributes are defined in the DTD as: '''<!ATTLIST element-name attribute-name attribute-type attribute-value>'''
**Elements that contains childrens elements that can be repeated several times are defined with a '''+'''
**Character strings attribute data types are defined with: '''CDATA'''
**Required attributes are defined with: '''#REQUIRED''', and optional attributes with: '''#IMPLIED'''
 
====Performing actions with an XML list====
Is posible to automatize the '''create''' and '''extract''' actions by using an .xml
 
Using an xml is the most flexible way to use psarc.exe because has full support for all features of the tool (command line doesnt), some of the options of the tool are only available when using an xml, specially per-file attributes like: per-file compression (used by lot of games), or per-file extraction
 
To use an .xml is needed to prepare it based in this layout
{{Boxframe2|content=
This is the xml representation of the DTD layout containing all the elements and attributes availables together, is only for wiki purpose
{{Boxcode|content=<syntaxhighlight lang="xml">
<psarc>
<create archive="" absolute="false" ignorecase="false" mergedups="false" stripall="false" blocksize="65536" jobs="" skipmissingfiles="false" format="psarc" overwrite="false">
<compression type="zlib" level="9" enabled="true" />
<strip regex="" />
<exclude regex="" wildcard="" />
<file wildcard="" regex="" path="" archivepath="" fromarchive="" compressed="true" skipifmissing="false" />
<directory path="" archivepath="" fromarchive="" compressed="true" skipifmissing="false" />
<filelist path="" />
</create>
<extract archive="" to="" stripall="false" skipmissingfiles="false" overwrite="true">
<file archivepath="" skipifmissing="false" />
</extract>
</psarc>
</syntaxhighlight>}}
*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
}}
 
When the xml is ready you can run it this way:
{{Keyboard|content=
'''C:\>psarc.exe --xml=C:\DTD_Layout.xml'''
}}
 
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:\>psarc.exe --debug --xml=C:\DTD_Layout.xml'''
}}
 
===verify===
*Verify an existing archive's structural integrity and ensure that all files can be decompressed.
*Output info per-file is: Validating <file ID/number>: - file path inside psarc archive - (file original size in bytes)
 
{{Keyboard|content=
'''C:\>psarc.exe verify "C:\psarctests\source files\test.psarc"'''
Verifying C:\psarctests\source files\test.psarc
Validating 1: dummy.txt (0 bytes)
Validating 2: BMPfolder1/Image1.bmp (6220854 bytes)
Validating 3: JPGfolder1/JPGfolder2/Image2.jpg (12524 bytes)
Validating 4: PNGfolder1/PNGfolder2/PNGfolder3/Image3.png (6142 bytes)
Archive OK
}}
 
===dump===
*Print detailed info about archive for unit testing.
*Output info per-file is: file path inside psarc archive - file original size - file compressed size - file block start offset ?
 
{{Keyboard|content=
'''C:\>psarc.exe dump "C:\psarctests\source files\test.psarc"'''
Dumping C:\psarctests\source files\test.psarc
dummy.txt  os=0 cs=0 fb=1
BMPfolder1/Image1.bmp  os=6220854 cs=8018 fb=2
JPGfolder1/JPGfolder2/Image2.jpg  os=12524 cs=209 fb=97
PNGfolder1/PNGfolder2/PNGfolder3/Image3.png  os=6142 cs=6142 fb=98
}}
 
===list===
*List contents of an existing archive.
*Output info per-file is: file path inside psarc archive - (file compressed size - file original size - compression percentage)
*In the compression percentage: 100% is no reduction, 0% is a huge reduction
 
{{Keyboard|content=
'''C:\>psarc.exe list "C:\psarctests\source files\test.psarc"'''
Listing C:\psarctests\source files\test.psarc
dummy.txt (0/0 100%)
BMPfolder1/Image1.bmp (8018/6220854 0%)
JPGfolder1/JPGfolder2/Image2.jpg (209/12524 1%)
PNGfolder1/PNGfolder2/PNGfolder3/Image3.png (6142/6142 100%)
}}
 
{{Boxframe2|content=
{{Boxtip1|content=Is posible to generate a text file containing the output of the '''list''' command by using the character '''>''' (right arrow) and the path/name of the destination file, this is usefull to convert the generated file to a '''filelist.txt''' for rebuilding the psarc archive later}}
{{Keyboard|content='''C:\>psarc.exe list "C:\psarctests\source files\test.psarc" > c:\psarctests\filelist.txt'''}}
}}
 
----
 
===create===
* Create an archive.
 
====create by directory====
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 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 examle the file dummy.txt (located in the root of the folder in windows, so considered first) has been archived after BMPfolder1
 
{{Boxcode|content=CREATE by_directory.xml<syntaxhighlight lang="xml">
<psarc>
<create archive="C:\psarctests\by_directory.psarc" absolute="false" ignorecase="false">
<compression type="zlib" enabled="true" />
<strip regex="C:\psarctests\source files\test" />
<directory path="C:\psarctests\source files\test" />
</create>
</psarc>
</syntaxhighlight>}}
{{Keyboard|content=
'''C:\>psarc.exe --xml="c:\psarctests\CREATE by_directory.xml"'''
Strip: C:\psarctests\source files\test
Flags: relative
NumJobs: 2
Output: C:\psarctests\by_directory.psarc
Compression: zlib level 9
Archiving C:\psarctests\source files\test
Compressing TOC
Compressing C:\psarctests\source files\test\BMPfolder1\Image1.bmp
Compressing C:\psarctests\source files\test\dummy.txt
Compressing C:\psarctests\source files\test\JPGfolder1\JPGfolder2\Image2.jpg
Compressing C:\psarctests\source files\test\PNGfolder1\PNGfolder2\PNGfolder3\Image3.png
 
          4: Total Files Archived
    6239520: Original Size
        108: Manifest (uncompressed)
          72: Manifest (compressed)
        380: TOC size
        8836: Final Size
        4.3%: Directory Overhead
      99.9%: Compression Ratio
          9: Compression Level
'''C:\>psarc.exe list C:\psarctests\by_directory.psarc'''
Listing C:\psarctests\by_directory.psarc
BMPfolder1/Image1.bmp (8018/6220854 0%)
dummy.txt (0/0 100%)
JPGfolder1/JPGfolder2/Image2.jpg (209/12524 1%)
PNGfolder1/PNGfolder2/PNGfolder3/Image3.png (157/6142 2%)
}}
 
====create by filelist====
This method allows to order the files inside the archive in a specific position (so is posible to know the ID that will have every files before creating the psarc)
 
When rebuilding a psarc from a game is needed to preserve the original ID's of ALL the files inside the archive (is posible to replace files but never remove). By replacing files (e.g: by dummyes) all the others preserves his positions
 
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. Is posible to generate this kind of filelists automatically by using the output of the '''--list''' command and some regular expressions to replace characters
 
The examples used 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''' option with an explicit path or a regular expression (regex) to remove part of the PC path (e.g: if you strip '''C:\psarctests\source files\test''' from '''C:\psarctests\source files\test\BMPfolder1\Image1.bmp''' the resulting path of the file inside the archive will be '''BMPfolder1/Image1.bmp''')
 
The '''--strip''' option removes part of the paths from the filelist, can be used several times with different stripped paths, this is usefull when the psarc archive is generated from a filelist that contains paths from different folders and/or devices in the PC (e.g: is posible to create a filelist including a file from '''F:\textures\packed\texture1.jpg''' and another file from '''G:\models\packed\model1.xxx''' and strip the paths: '''F:\textures\''' and '''G:\models\''', this way both files will be stored inside the psarc archive together under path: '''packed/texture1.jpg''' and '''packed/model1.xxx''')
 
First is needed to prepare a '''filelist.txt''' like this example, located in '''C:\psarctests\source files\filelist.txt''', contains the PC paths of the files that are in the folder '''C:\psarctests\source files\test''' and will be included inside the psarc archive:
C:\psarctests\source files\test\dummy.txt
C:\psarctests\source files\test\BMPfolder1\Image1.bmp
C:\psarctests\source files\test\JPGfolder1\JPGfolder2\Image2.jpg
C:\psarctests\source files\test\PNGfolder1\PNGfolder2\PNGfolder3\Image3.png
 
The psarc archive is created by using the filelist as the '''--inputfile''' and uses an explicit path to '''--strip''' from every file inside the filelist, this way:
{{Keyboard|content='''C:\>psarc.exe create --strip="C:\psarctests\source files\test" --output=C:\psarctests\by_filelist.psarc --inputfile="C:\psarctests\source files\filelist.txt"'''}}
 
Or you can prepare an .xml that contains the path to the filelist.txt
{{Boxcode|content=CREATE by_filelist.xml<syntaxhighlight lang="xml">
<psarc>
<create archive="C:\psarctests\by_filelist.psarc" absolute="false" ignorecase="false">
<compression type="zlib" enabled="true" />
<strip regex="C:\psarctests\source files\test" />
<filelist path="C:\psarctests\source files\filelist.txt" />
</create>
</psarc>
</syntaxhighlight>}}
 
Then run the contents of the .xml this way:
{{Keyboard|content='''C:\>psarc.exe --xml="c:\psarctests\CREATE by_filelist.xml"'''}}
 
The output of the tool is the same in both cases (except the InputFile not present when using an xml)
{{Keyboard|content=
Strip: C:\psarctests\source files\test
Flags: relative
NumJobs: 2
InputFile: C:\psarctests\source files\filelist.txt
Output: C:\psarctests\by_filelist.psarc
Compression: zlib level 9
Archiving C:\psarctests\source files\test\dummy.txt
Archiving C:\psarctests\source files\test\BMPfolder1\Image1.bmp
Archiving C:\psarctests\source files\test\JPGfolder1\JPGfolder2\Image2.jpg
Archiving C:\psarctests\source files\test\PNGfolder1\PNGfolder2\PNGfolder3\Image3.png
Compressing TOC
Compressing C:\psarctests\source files\test\dummy.txt
Compressing C:\psarctests\source files\test\BMPfolder1\Image1.bmp
Compressing C:\psarctests\source files\test\JPGfolder1\JPGfolder2\Image2.jpg
Compressing C:\psarctests\source files\test\PNGfolder1\PNGfolder2\PNGfolder3\Image3.png
 
          4: Total Files Archived
    6239520: Original Size
        108: Manifest (uncompressed)
          72: Manifest (compressed)
        380: TOC size
        8836: Final Size
        4.3%: Directory Overhead
      99.9%: Compression Ratio
          9: Compression Level
'''C:\>psarc.exe list C:\psarctests\by_filelist.psarc'''
Listing C:\psarctests\by_filelist.psarc
dummy.txt (0/0 100%)
BMPfolder1/Image1.bmp (8018/6220854 0%)
JPGfolder1/JPGfolder2/Image2.jpg (209/12524 1%)
PNGfolder1/PNGfolder2/PNGfolder3/Image3.png (157/6142 2%)
}}
 
====create by file====
This method is the real deal, only available by using an xml, superceedes all the other creation methods and is the only method where is posible to use per-file attributes
 
The xml includes a list of files where every path of every file in the PC is specifyed (paths are the same than the filelist.txt explained before) but every file line allows for attributes
 
Note in the next example the compression attribute is enabled and affects all files, except Image3.png that has been archived without compression (appears as 100% in the list command output)
 
The other per-file attribute avoids the tool to output an error in the case the file dummy.txt is missing in the source folder
 
{{Boxcode|content=CREATE by_file.xml<syntaxhighlight lang="xml">
<psarc>
<create archive="C:\psarctests\by_file.psarc" absolute="false" ignorecase="false">
<compression type="zlib" enabled="true" />
<strip regex="C:\psarctests\source files\test" />
<file path="C:\psarctests\source files\test\dummy.txt" skipifmissing="true" />
<file path="C:\psarctests\source files\test\BMPfolder1\Image1.bmp" />
<file path="C:\psarctests\source files\test\JPGfolder1\JPGfolder2\Image2.jpg" />
<file path="C:\psarctests\source files\test\PNGfolder1\PNGfolder2\PNGfolder3\Image3.png" compressed="false" />
</create>
</psarc>
</syntaxhighlight>}}
{{Keyboard|content=
C:\>psarc.exe --xml="c:\psarctests\CREATE by_file.xml"
Strip: C:\psarctests\source files\test
Flags: relative
NumJobs: 2
Output: C:\psarctests\by_file.psarc
Compression: zlib level 9
Archiving C:\psarctests\source files\test\dummy.txt
Archiving C:\psarctests\source files\test\BMPfolder1\Image1.bmp
Archiving C:\psarctests\source files\test\JPGfolder1\JPGfolder2\Image2.jpg
Archiving C:\psarctests\source files\test\PNGfolder1\PNGfolder2\PNGfolder3\Image3.png
Compressing TOC
Compressing C:\psarctests\source files\test\dummy.txt
Compressing C:\psarctests\source files\test\BMPfolder1\Image1.bmp
Compressing C:\psarctests\source files\test\JPGfolder1\JPGfolder2\Image2.jpg
    Storing C:\psarctests\source files\test\PNGfolder1\PNGfolder2\PNGfolder3\Image3.png
 
          4: Total Files Archived
    6239520: Original Size
        108: Manifest (uncompressed)
          72: Manifest (compressed)
        380: TOC size
      14821: Final Size
        2.6%: Directory Overhead
      99.8%: Compression Ratio
          9: Compression Level
'''C:\>psarc.exe list C:\psarctests\by_file.psarc'''
Listing C:\psarctests\by_file.psarc
dummy.txt (0/0 100%)
BMPfolder1/Image1.bmp (8018/6220854 0%)
JPGfolder1/JPGfolder2/Image2.jpg (209/12524 1%)
PNGfolder1/PNGfolder2/PNGfolder3/Image3.png (6142/6142 100%)
}}
 
Batch. This is an useless example to show how the .psarcs are created sequentially and how to create several .psarc's with only one .xml, it uses all default values for compressions, formats, flags etc...
 
In step 1 it creates an egg.psarc containing a dummy.txt. In step 2 it creates a chiken.psarc containing the egg.psarc made in step 1. In step 3 it creates an egg.psarc containing the chicken.psarc made in step 2 (egg.psarc created in step 3 overwrites egg.psarc made in step 1)
 
{{Boxcode|content=CREATE by_file_paradox<syntaxhighlight lang="xml">
<psarc>
<create archive="C:\psarctests\egg.psarc">
<strip regex="C:\psarctests\source files\test" />
<file path="C:\psarctests\source files\test\dummy.txt" />
</create>
<create archive="C:\psarctests\chicken.psarc">
<strip regex="C:\psarctests" />
<file path="C:\psarctests\egg.psarc" />
</create>
<create archive="C:\psarctests\egg.psarc" overwrite="true">
<strip regex="C:\psarctests" />
<file path="C:\psarctests\chicken.psarc" />
</create>
</psarc>
</syntaxhighlight>}}
{{Keyboard|content=
'''C:\>psarc.exe --xml="c:\psarctests\CREATE by_file_paradox.xml"'''
Strip: C:\psarctests\source files\test
Flags: relative
NumJobs: 2
Output: C:\psarctests\egg.psarc
Compression: zlib level 9
Archiving C:\psarctests\source files\test\dummy.txt
Compressing TOC
Compressing C:\psarctests\source files\test\dummy.txt
 
          1: Total Files Archived
          0: Original Size
          9: Manifest (uncompressed)
          9: Manifest (compressed)
          96: TOC size
        105: Final Size
      91.4%: Directory Overhead
      -1.$%: Compression Ratio
          9: Compression Level
 
Strip: C:\psarctests
Flags: relative
NumJobs: 2
Output: C:\psarctests\chicken.psarc
Compression: zlib level 9
Archiving C:\psarctests\egg.psarc
Compressing TOC
Compressing C:\psarctests\egg.psarc
 
          1: Total Files Archived
        105: Original Size
          9: Manifest (uncompressed)
          9: Manifest (compressed)
          96: TOC size
        174: Final Size
      55.2%: Directory Overhead
      -65.7%: Compression Ratio
          9: Compression Level
 
Strip: C:\psarctests
Flags: relative
NumJobs: 2
Output: C:\psarctests\egg.psarc
Compression: zlib level 9
Archiving C:\psarctests\chicken.psarc
Compressing TOC
Compressing C:\psarctests\chicken.psarc
 
          1: Total Files Archived
        174: Original Size
          13: Manifest (uncompressed)
          26: Manifest (compressed)
          96: TOC size
        252: Final Size
      38.1%: Directory Overhead
      -44.8%: Compression Ratio
          9: Compression Level
'''C:\>psarc.exe list C:\psarctests\egg.psarc
Listing C:\psarctests\egg.psarc
chicken.psarc (143/174 82%)
'''C:\>psarc.exe list C:\psarctests\chicken.psarc
Listing C:\psarctests\chicken.psarc
egg.psarc (69/105 65%)
}}
 
----
 
===extract===
* Extract contents of an existing archive.
*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 ?)
 
The required options are '''--input''' (the source .psarc) and '''--to''' (the target folder where contents will be extracted)
 
====extract all====
The example command extracts all files from the .psarc to a directory with full directory tree names, no skipped missing files, no overwrite
 
When using this options the command line output is the same, there is no mention of wich files are stripped, overwritten, or missing in the extraction process
 
{{Keyboard|content=
'''C:\>psarc.exe extract --input="C:\psarctests\source files\test.psarc" --to="C:\psarctests\test"'''
Extracting: dummy.txt (0 bytes)
Extracting: BMPfolder1/Image1.bmp (6220854 bytes)
Extracting: JPGfolder1/JPGfolder2/Image2.jpg (12524 bytes)
Extracting: PNGfolder1/PNGfolder2/PNGfolder3/Image3.png (6142 bytes)
'''C:\>psarc.exe extract --overwrite --strip-all --skip-missing-files --input="C:\psarctests\source files\test.psarc" --to="C:\psarctests\test"'''
Extracting: dummy.txt (0 bytes)
Extracting: BMPfolder1/Image1.bmp (6220854 bytes)
Extracting: JPGfolder1/JPGfolder2/Image2.jpg (12524 bytes)
Extracting: PNGfolder1/PNGfolder2/PNGfolder3/Image3.png (6142 bytes)
}}
 
'''extract all (xml)'''
 
{{Boxcode|content=EXTRACT all.xml<syntaxhighlight lang="xml">
<psarc>
<extract archive="C:\psarctests\source files\test.psarc" to="C:\psarctests\all">
</extract>
</psarc>
</syntaxhighlight>}}
{{Keyboard|content=
'''C:\>psarc.exe --xml="c:\psarctests\EXTRACT all.xml"'''
Extracting: dummy.txt (0 bytes)
Extracting: BMPfolder1/Image1.bmp (6220854 bytes)
Extracting: JPGfolder1/JPGfolder2/Image2.jpg (12524 bytes)
Extracting: PNGfolder1/PNGfolder2/PNGfolder3/Image3.png (6142 bytes)
}}
 
====extract by file====
This extraction method is only available when using an xml because command line doesnt allows to specify files inside the archive
 
{{Boxcode|content=EXTRACT by_file.xml<syntaxhighlight lang="xml">
<psarc>
<extract archive="C:\psarctests\source files\test.psarc" to="C:\psarctests\by_file">
<file archivepath="BMPfolder1/Image1.bmp" />
</extract>
</psarc>
</syntaxhighlight>}}
{{Keyboard|content=
'''C:\>psarc.exe --xml="c:\psarctests\EXTRACT by_file.xml"'''
Extracting: BMPfolder1/Image1.bmp (6220854 bytes)
}}
 
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|content=<syntaxhighlight lang="xml">
<psarc>
<extract archive="C:\psarctests\source files\test.psarc" to="C:\psarctests\by_file" stripall="true" skipmissingfiles="false" overwrite="true">
<file archivepath="dummy.txt" skipifmissing="true" />
<file archivepath="PNGfolder1/PNGfolder2/PNGfolder3/Image3.png" />
</extract>
</psarc>
</syntaxhighlight>}}
 
*Notes about the xml examples above:
**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
 
===Other options===
 
====Regular expression support (regex)====
-sREGEX, --strip=REGEX                  Perl-compatible regex specifying a prefix to strip from the pathnames stored in the archive. This may be specified more than once. (default = current dir)
 
Psarc uses regular expressions compatibles with PERL 5, specifically the ones used by the PCRE library http://www.pcre.org/ As can be seen in the PS3 firmware third party software licenses in XMB/Settings/System Settings/About PlayStation®3 (PS3™)
 
====Compression levels====
--level=N                              Compression quality. 1 is fastest, 9 is best. (default = 9)
 
*Notes
**(default = 9)
**when --level is not defined at creation time, the info about compression level in the creation process window appears with a value of 9, even when using --nocompress
 
{{Boxcode|content=<syntaxhighlight lang="xml">
<psarc>
<create archive="C:\psarctests\by_file.psarc">
<compression type="zlib" level="9" />
...
</syntaxhighlight>}}
 
====Create mself====
-m, --mself                            Create a PSARC-MSELF hybrid file for PS3, which can contain encrypted special files like SDATA, SPRX, and SPU SELF.


ARC USB stick, with multipartitions and serial datasheet: [http://www.mirrorcreator.com/files/ZWMHD4QN/ARC-memorystick_-_32_nm_UDRW_G4_specification.pdf_links]<!--// \files\documents\-Datasheets\UDRW
For rebuilding purposes is needed to verify if some of this files are present in the original filelist, by searching for this file extensions (.sdata .sprx and .self), though file extensions could not be accurate because game developers can use custom names for file extensions
MD5: 6b236943909d8fda6f39f330a1d757c0 / SHA1: 33a272e793fbbadb561325285709615df83caced //--> (http://www.hsc-us.com/Embedded/udrw/ / http://www.hscjpn.co.jp/udrw/develop_about.php)


*Sources:
*As far i remember this option doesnt stores any data in the psarc header so it seems the only way to identify his presence is by looking at the files itself--[[User:Sandungas|Sandungas]] ([[User talk:Sandungas|talk]]) 18:34, 20 March 2017 (UTC)
** http://wiki.arcadeotaku.com/w/Namco_System_357 /
** http://en.wikipedia.org/wiki/Namco_System_357 <!--/ Mantained: https://spreadsheets.google.com/ccc?key=0AosMKkiiS99_dE9tUWVIanZhcDBWVlBDeXlDdVpEZ3c&authkey=CMz7i8cO&hl=en#gid=1 system246/256 = playstation2 hw  -->
**http://forum.arcadeotaku.com/viewtopic.php?f=26&t=19892
**http://www.coinopexpress.com/products/pcbs/system_357/Tekken_6_%3A_Bloodline_Rebellion_upgrade_kit_7858.html
**http://www.coinopexpress.com/products/pcbs/system_357/Tekken_6_kit_7205.html
**Namco System 369 boot process video (with Tekken Tag Tournament 2 Unlimited) http://www.youtube.com/watch?v=hzimKeAjBqE Note HDD Ref nº at minute 4:00 and game/version serial number at minute 7:30 (this serials and version matches with serial printed in the dongle, and the version is part of the HDD ref.)


=== HDD Key ===
==Total Commander plugin==
The harddrive is decrypted using a static key inside lv1ldr when [[Target ID]] = 0xA0 {{ARC}}
http://www.totalcmd.net/plugring/PSARC.html


lv1/lv1ldr should be same as on retailmodels, but for the nittpickers:
==PS3 PSARC GUI==
* ´357A GECR1100 COK-002´ ROS 197.000 and 251.040 : http://mir.cr/0FIFC8FA
It's a graphical user interface to view, extract or create psarc archives. GUI written by aldo, unknown psarc tool used internally
* ´357B GECR1500 VER-001´ ROS 245.000 and 251.040 : http://mir.cr/1DHL7HW1


== Bana Passport ==
Download link: http://aldostools.org/ps3_psarc_gui.rar
[http://en.banapassport.net/en_US/ Bana Passport main site]
* more Bana Passport info : http://www.bandainamcogames.co.jp/am/vg/wanganmaxi3dxplus/miraiken/?page=123
<gallery>
File:Wangan midnight 4 transfer procedure copy.jpg|Bana Passport - Transfer/Copy Procedure
</gallery>


= Namco System 357 =
=PSARC Related Tools=
== 357A (GECR-1100) [[COK-00x|COK-002]] ==
*All the files and xml's from the examples to practise and to use as layouts http://www.multiup.org/en/mirror/c5b18ca6d3b0c4a24ea3c753d6df7a76/psarctests.zip
System357A GECR-1100 (Tekken 6) <!--// IDPS: 00 00 00 01 00 A0 00 04 04 00 04 1B 13 AB 46 25 //-->
*http://findandreplace.codeplex.com/
<Gallery>
*http://fart-it.sourceforge.net/
File:System357a_CELL_BE.jpg |System357A - CELL
*http://textmechanic.com/Remove-Duplicate-Lines.html
File:System357a_-_RSX.jpg |System357A - RSX
File:South_Bridge.jpg |System357A - SouthBridge
File:Arcade_-_Motherboard_Detail_pic1_.jpg |System357A - Motherboard Detail pic
File:Arcade_-_Motherboard_Detail_pic2.jpg |System357A - Motherboard Overview
File:Arcade_-_Motherboard_Detail_pic3.jpg |System357A - Motherboard Overview2
File:Arcade_-_white_sticker.JPG |System357A - white sticker
File:Arcade_-_behind.jpg |System357A - behind
File:Arcade_-_behind_2.jpg |System357A - behind2
File:Arcade_-_top.jpg |System357A - top
File:System 357a top uncovered.jpg |System357A - top uncovered
File:Arcade_-_side.jpg |System357A - side
File:Arcade_-_appearance.jpg |System357A - external
</Gallery>


== 357B (GECR-1500) [[VER-00x|VER-001]] ==
=Rebuilding PSARC files=
[http://akihabaraarcade.blogspot.com/2011/06/namcos-system-357-b-inside-look.html System 357B (GECR-1500) inside picures] :
When rebuilding a psarc is needed to preserve the original positions of all the files inside the archive (because every file in the original psarc has assigned an '''ID''' number, and after rebuilding this numbers must match with the original positions). for this same reason when rebuilding is not a good idea to remove files (because the other files that comes after will be displaced). When the purpose of the rebuild is to  reduce the size (by removing languages, etc...) the method consists in replacing them by dummies (0kb files), this dummies preserves the positions of all the files
<Gallery>
File:Namco System 357B- TopBack.jpg|Namco System 357B - TopBack
File:System357b-RSX.jpg|System357b - RSX
File:System357b-Bottom.jpg|System357b - Bottom
File:System357b-Top.jpg|System357b - Top
File:System357b-Tray.jpg|System357b - Tray
File:Arcade-Motherboard-Overview.jpg|Arcade - Motherboard Overview
File:Arcade-Motherboard-Detail1.jpg|Arcade - Motherboard Detail pic1
File:Arcade-Motherboard-Detail2.jpg|Arcade - Motherboard Detail pic2
File:Arcade-Motherboard-Detail3.jpg|Arcade - Motherboard Detail pic3
File:Namco System 357BC.jpg|Namco System357b/c connection diagram
</Gallery>
* [http://en.wikipedia.org/wiki/Namco_System_357 Namco System 357 &amp; 369 (Wikipedia article)]
* http://kotaku.com/270026/tekken-6-a%C2%AD%C2%AD%C2%ADrcade-huge-hd-costly%EF%BB%BF%EF%BB%BF
*A PS3 arcade displaying an error screen when booting (is trying to find a firmware update) the error makes appear the XMB and can be seen how "autoboots" an installed game http://www.youtube.com/watch?v=_ss-MHvWDCk


== 357C (GECR-1500?) [[VER-00x|VER-001]] ==
This need to preserve the original positions of all the files inside the archive in the practise means there are only 2 methods to rebuild a psarc: "by filelist" or "by file". For both is needed to create a list of files


== NAMCO JVS and I/O boards ==
{{Boxframe3|content='''Rebuilding PSARC files, step-by-step summary'''
I/O board is connected to JVS board, the inputs of the I/O board (buttons, stick, credit slot) are sent to the JVS board and then to the PS3 board by a USB cable. Video signal from "PS3 board" to "JVS board" is sent with a "AV MultiOUT" cable, and then to the cabinet display using a VGA connector
* Step 1 - Identify compression method, archive flags, and verify default structure sizes
* Step 2 - Identify if per-file compression was used <!-- and dupes --->
* Step 3 - Rebuild
** Step 3a - If per-file compression was not used, rebuild with the method "by filelist" or "by file"
** Step 3a - If per-file compression was used, rebuild with the method "by file"
* Step 4 - Verify
}}


<gallery>
'''Step 1'''
File:System357_back_JAMMAconnectors.jpg|Boards connectors/placement
File:Jamma_JVS_diagram.png|"Peripherals", "I/O board" and "JVS Board" Block Diagram
File:Namco JVS boards Main Menu.jpg|Namco JVS boards Main Menu
</gallery>


JVS, or Jamma Video Standard (sometimes even called JAMMA 2), is an updated version of JAMMA created in the late 90’s by an special sub-committee consisting of the major arcade game manufacturers. http://www.jamma.or.jp/
Is needed to look at the psarc header to identify some settings
'''Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F'''
00000000  50 53 41 52 00 01 00 04 <span style="background:#ffff66;">7A 6C 69 62</span> 00 01 23 BA  PSAR....<span style="background:#ffff66;">zlib</span>..
00000010  <span style="background:#dd00dd;">00 00 00 1E</span> 00 00 09 16 <span style="background:#dddddd;">00 01 00 00</span> <span style="background:#d0000d;">00 00 00 03</span>  ................


JVS specifies the type of connectors to use for video (HD-15, commonly known as a VGA), audio (RCA) and power (JST VL), in addition to the communications protocol between the game board and the I/O board.  In contrast to (old) JAMMA, JVS concentrates I/O functions in a separate board.
Most important ones are the '''<span style="background:#ffff66;">compression method</span>''' (zlib/lzma) and the '''<span style="background:#d0000d;">archive flags</span>''' (relative/absolute, and ignorecase), this settings will be used when rebuilding from command line or from xml this way:
{{Boxcode|content=<syntaxhighlight lang="xml">
<psarc>
<create archive="C:\psarctests\by_file.psarc" absolute="true" ignorecase="true">
<compression type="zlib" />
...
</syntaxhighlight>}}


See: http://wiki.arcadeotaku.com/w/JVS and http://jvspac.kirurg.org/
The other values in the header that needs to be verifyed are the '''<span style="background:#dd00dd;">TOC entry size</span>''' and the '''<span style="background:#dddddd;">Block size</span>''', is needed to know if the original psarc we are trying to rebuild uses the default values (all i found used defaults), otherway is posible to use non-default values this way: <!-- not sure if is posible to change the "TOC entry size" -->
{{Boxcode|content=<syntaxhighlight lang="xml">
<psarc>
<create archive="C:\psarctests\by_file.psarc" absolute="true" ignorecase="true" blocksize="65536">
<compression type="zlib" />
...
</syntaxhighlight>}}
 
'''Step2'''
 
Now is needed to know if the psarc uses per-file compression (if some of the files inside the archive are compressed, and others are not compressed)
 
This is important to know wich rebuild method will be used in the next step, is needed to make a --list command with psarc tool and store the output of the command as a .txt
 
Open the .txt in a text editor (like notepad++) and search for the string '''100%''' (the files that appears with a 100% has been archived but are not compressed). Is needed to do it this way semi automatized because is usual to find psarc with thousand of files inside
 
*Check how many files are not compressed, his sizes, and file extensions
**If there are no files with 100% or if there are only a few and his sizes are minimal this is normal, it means the archive doesnt uses per-file compression
**If there some files with the 100%, normal sizes (not minimal), using the same file extension, and can be identifyed (like audio or video formats) then you have a psarc with per-file compression
**If all the files appears as 100% it means the psarc has been created with the compression attibute set as "false" this way:
{{Boxcode|content=<syntaxhighlight lang="xml">
<psarc>
<create archive="C:\psarctests\by_file.psarc" absolute="true" ignorecase="true" blocksize="65536">
<compression type="zlib" enabled="false" />
...
</syntaxhighlight>}}
 
'''Step3'''
 
If the psarc doesnt uses per-file compression then is posible to rebuild it with the '''create by filelist''' method from command line by using an external filelist.txt
 
If the psarc uses per-file compression then the only way to rebuild it is with the '''create by file''' method by using an xml (the xml includes a list of files like the filelist.txt)


----
----
Namco System357 boards connectors:
 
*I/O board (at top, from left to right)
*Special rebuild notes:
**1 connector (in white) with 24 pins
**Mass effect 3 MAIN.PSARC contains a group of generic files compressed with level 9, and another group of .TXT, .BIN, and .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 a ridiculous 1% or 2% of compression ratio because is the max they will admit). This is not how the original file was created (but works), the correct way to rebuild it is by defining specific compression levels "per file" in a predefined .xml
**8 dipswitches (in black/red) -> (2nd dip is for enabling 31KHz)
**Killzone 3 data_ps3.psarc (BCES01007 version) contains 8324 files (included 5.3GB of audio files for 21 languages with a compression of around 50%)... 2883 of all the files uses the same path/filenames repeated up to 3 times (because was created using 3 or more different working directories). This duplication of paths/filenames inside the .psarc in the practise means when doing a standard extraction 2833 files will be missing, overwrited, or they will give an error at extraction time, the correct way to mess with it is by doing several partiall extractions to different directories, and rebuild it by using a preconfigured .xml where the different paths for each file are specifyed, when rebuilding is also needed to use the --strip option several times to remove part of the paths from all the different working directories, this way the paths/filenames will be duplicated inside the .psarc archive (but are different files located at different positions and with a different ID number assigned).
**1 connector (in white) with 10 pins
**Ape Escape target.psarc includes "dupes" (or duplicated files) in the TOC (table of contents) of the psarc archive. This method used at creation time basically works by making several entries of the TOC to point to the same file, this way a single file inside the psarc is indexed several times in the TOC and can be accessed from several different paths/filenames. The only way to identify this dupes before extraction is by reading the TOC of the psarc for all the files and compare wich position are pointing to. As an example the original size of target.psarc is 328mb... after a "standard" extraction is 2.52GB (this extraction doesnt identify the dupes so are extracted several times under different paths/filenames)... if you try to rebuild it again his final size will be much bigger than the original target.psarc
*JVS board (at bottom, from left to right)
**USB (JV I/O JAMMA) interface
**DC IN ?? <!--// seems to be 3.3v in the JVS standard, but is stated as 12v in some webs //-->
**VGA (video out)
**RCA white (left speaker out)
**RCA red (right speaker out)


----
----
*Note the references to system357 in "Deadstorm Pirates" and "Razing Storm" manuals.pdf, and the pictures of the connectors that can help to identify motherboards/models
**Picture in razing storm manual.pdf - (section 5.5 "inserting the dongle")... the connectors matches with a system357b (VER001 motherboard)... but there is no JVS and I/O boards
**It seems the newer system357 models (system357c ?) doesnt have/use a JVS and I/O boards, has been replaced by a "USB I/O PCB" (in page 50 and 94 in razing storm manual and the photo of "357b/c connection diagram" above), with a hardware identifyer "US1001" and/or "USIO01"


*Deadstorm Pirates
*The file paths inside filelist.txt or inside an xml admits 2 formats:
'''HDD CHECK'''
**'''full PC paths''' (where the full PC file path included the device letter is used by psarc.exe to locate the file in any device and/or any folder). This method is the most flexible but needs an '''strip''' command to remove part of the PC path when creating the psarc archive
MEDIA SYSTEM357 HDD
**'''relative to work directory paths''' (where work directory is the path to psarc.exe and the files needs to be placed in a subfolder under it). This method needs to copy psarc.exe to the parent folder of the files
----------------------
'''I/O PCB CHECK'''
I/O PCB : Connect OK
NBGI.;USIO01;VerX.XX;JPN,Mulitipurpose with PPG
----------------------
'''OTHERS'''
ROM DSP100-2-NA-MPR0-BXX
CLOCK 01/01/2010 FRI 08:11:24
S/N 76C0D0-9XXXXX
SYSTEM SW Ver. 250.XXX
CABINET TYPE SD
LANGUAGE ENG
ATTRACT CUT OFF
RATING OFF
HDD CHECK
CLOCK SETTING
BACKUP MEMORY INITIALIZE


*Razing Storm
The file list we need to generate contains the access paths stored in the '''manifest''', the easy way to have have a copy of the manifest is by using the '''list''' command of psarc tool
'''DRIVE CHECK'''
MEDIA  SYSTEM357 HD
----------------------
'''I/O TEST'''
I/O PCB : CONNECT OK
BNGI. : US1001 : Ver 1.00 : JPN,Multipurpose with PPG
----------------------
'''OTHERS'''
ROM  RST100-2-NA-MPR0-A
CLOCK  09/29/2008 (MON) 22 : 12 : 44
S/N  000000-123456
LANGUAGE  ENG
VOICE  ENG
HD CHECK
BACKUP MEMORY INITIALIZE


===JVS to JAMMA converters===
The output of the '''list''' command has some characters that are needed ro remove or replace, the purpose of automatizing this process by using regular expressions is because usually psarc files contains thousand of files, the examples used here are commands for fnr.exe (find and replace tool) and contains regular expressions (to search) and a character strings (to replace)
Used to connect JVS devices to JAMMA cabinets (older), home made cabinets, or for service/repair purposes. This converters are not present in Namco cabinets but are listed here as usefull tools or related hardware
 
{{Boxframe1|content='''Capcom I/O JAMMA converter''' <BR />
===Generating a filelist.txt by using regular expressions===
[[File:Capcom_IO_JAMMA_converter.jpg|200px|thumb|left]]
{{Boxframe3|content='''Generating a filelist.txt, step-by-step summary'''
# Power output (supplies power to the JVS board)
* Step 1 - Save list command output as a .txt
# VGA in (video, standard or high resolution, no medium resolution)
* Step 2 - Remove first line
# USB in (for controls)
* Step 3 - Remove parentheses
# RCA in (audio)
* Step 4 - Remove last line
# Volume adjustment
* Step 5 - Replace slashes (optional, recommended)
# Capcom kick harness (unlike Sega IOs, Capcom IO does not use "unmapped" JAMMA pins for extra buttons, you must use this connector instead. Also, you connect 3P and 4P controls here)
* Step 6 - Add local paths (optional, recommended)
# JAMMA (connect your cabinet here)
** Step 6a - Absolute flag blind fix (optional, recommended)
}}
}}


http://www.solvalou.com/arcade_naomicapcom.php and http://forum.arcadeotaku.com/viewtopic.php?f=26&t=22062
*'''Step 1 - Save list command output as a .txt'''
Generate a .txt file containing the output of the '''list''' comand
{{Boxframe1|content=
{{Keyboard|content='''C:\>psarc.exe list "C:\psarctests\source files\test.psarc" > "C:\psarctests\filelist.txt"'''}}
The file generated by the list command will have this content (note there is en empty line at the end):
Listing C:\psarctests\source files\test.psarc
dummy.txt (0/0 100%)
BMPfolder1/Image1.bmp (8018/6220854 0%)
JPGfolder1/JPGfolder2/Image2.jpg (209/12524 1%)
PNGfolder1/PNGfolder2/PNGfolder3/Image3.png (6142/6142 100%)
<br>}}
 
*'''Step 2 - Remove first line'''
{{Boxframe1|content=
find (and replace by nothing):
Listing.*\n
The resulting file:
dummy.txt (0/0 100%)
BMPfolder1/Image1.bmp (8018/6220854 0%)
JPGfolder1/JPGfolder2/Image2.jpg (209/12524 1%)
PNGfolder1/PNGfolder2/PNGfolder3/Image3.png (6142/6142 100%)
<br>}}
 
*'''Step 3 - Remove parentheses'''
{{Boxframe1|content=
find (and replace by nothing):
[^\b]\(.*\)
The resulting file:
dummy.txt
BMPfolder1/Image1.bmp
JPGfolder1/JPGfolder2/Image2.jpg
PNGfolder1/PNGfolder2/PNGfolder3/Image3.png
<br>}}
 
*'''Step 4 - Remove last line'''
{{Boxframe1|content=
find (and replace by nothing):
\r\n$
The resulting file:
dummy.txt
BMPfolder1/Image1.bmp
JPGfolder1/JPGfolder2/Image2.jpg
PNGfolder1/PNGfolder2/PNGfolder3/Image3.png
<br>}}
*'''Step 5 - Replace slashes (optional, recommended)'''
This step is optional, both slashes are valid, but is good to do it to standarize all paths formats, otherway is a mess
{{Boxframe1|content=
find:
/
replace by:
\\
The resulting file:
dummy.txt
BMPfolder1\Image1.bmp
JPGfolder1\JPGfolder2\Image2.jpg
PNGfolder1\PNGfolder2\PNGfolder3\Image3.png
<br>}}
 
*'''Step 6 - Add local paths (optional, recommended)'''
Now is needed to add the local paths (where the psarc contents are decompressed), e.g: '''C:\psarctests\source files\test\''', remember this is exactly the part of the path that is needed to '''strip''' later (because we dont want to include our local path '''C:\psarctests\source files\test\''' inside the manifest)
 
This is a perfect filelist.txt that can be used for the rebuild method '''by filelist''' from command line (usefull when the psarc doesnt uses per-file compression), remember is needed to use the '''strip''' option
{{Boxframe1|content=
find:
^
replace by:
C:\\psarctests\\source files\\test\\
The resulting file:
C:\psarctests\source files\test\dummy.txt
C:\psarctests\source files\test\BMPfolder1\Image1.bmp
C:\psarctests\source files\test\JPGfolder1\JPGfolder2\Image2.jpg
C:\psarctests\source files\test\PNGfolder1\PNGfolder2\PNGfolder3\Image3.png
<br>}}
 
*'''Step 6a - Absolute flag blind fix (optional, recommended)'''
The purpose of this step is to fix a posible problem that could appear in step 6, the psarc used as an example in step 1 to generate the initial list of files was created without '''archive flags''' (in other words, his access paths in the manifest was '''relative''' paths)
 
The other posible paths format used by the manifest is when the psarc was created with '''absolute''' archive flag, in this case all the lines of the file list in step 5 starts with an slash \ (e.g: the first file in the list that is supposed to be archived in the root of the psarc should be listed as '''\dummy.txt''' instead of '''dummy.txt'''
 
In step 6 is added a local path that ends with an slash too... so the result is '''C:\psarctests\source files\test\\dummy.txt''' (note the double slash), this is wrong and this step fixes it blindlly (because doesnt matters if the problem exists or not, the final result will be the same)
{{Boxframe1|content=
find:
\\\\
replace by:
\\
<br>}}
 
----
 
===Generating a XML by using regular expressions===
{{Boxframe3|content='''Generating a xml, step-by-step summary'''
* Step 1 - Save list command output as a list.txt
* Step 2 - Replace slashes
* Step 3 - Replace first line start (preserves original .psarc path)
* Step 4 - Replace first line end (for relative flag)
* Step 5 - Replace first line end (for absolute flag)
* Step 6 - Replace parentheses (per-file compression autodetection)
* Step 7 - Replace other parentheses
* Step 8 - Replace last line
* Step 9 - Absolute flag blind fix
}}
 
*'''Step 1 - Save list command output as a list.txt'''
Generate a list.txt file containing the output of the '''list''' command
{{Boxframe1|content=
{{Keyboard|content='''C:\>psarc.exe list "C:\psarctests\source files\test.psarc" > "C:\psarctests\list.txt"'''}}
The file generated by the list command will have this content:
{{Boxcode|content=<syntaxhighlight lang="xml">
Listing C:\psarctests\source files\test.psarc
/dummy.txt (0/0 100%)
/BMPfolder1/Image1.bmp (8018/6220854 0%)
/JPGfolder1/JPGfolder2/Image2.jpg (209/12524 1%)
/PNGfolder1/PNGfolder2/PNGfolder3/Image3.png (6142/6142 100%)
 
</syntaxhighlight>}}
*Notes of the example:
**The original path of the .psarc is '''C:\psarctests\source files\test.psarc''' (it will be used as the path where the rebuild .psarc will be created)
**Paths starts with an slash  '''/''' (so the .psarc was created with absolute flag)
**'''dummy.txt''' and '''Image3.png''' was archived without compression (appears with 100%)
**There is an empty line at the end (not visible in wiki because yeah... is empty)
}}
 
*'''Step 2 - Replace slashes'''
This step is to standarize paths formats
{{Boxframe1|content=
find:
/
replace by:
\\
The resulting file:
{{Boxcode|content=<syntaxhighlight lang="xml">
Listing C:\psarctests\source files\test.psarc
\dummy.txt (0\0 100%)
\BMPfolder1\Image1.bmp (8018\6220854 0%)
\JPGfolder1\JPGfolder2\Image2.jpg (209\12524 1%)
\PNGfolder1\PNGfolder2\PNGfolder3\Image3.png (6142\6142 100%)
</syntaxhighlight>}}
}}
 
*'''Step 3 - Replace first line start (preserves original .psarc path)'''
This step keeps the original local path of the .psarc file that appears in the output of the list command (is the path where the .psarc will be created)
{{Boxframe1|content=
find:
Listing.
replace by:
<psarc>\r\n\t<create archive="
The resulting file:
{{Boxcode|content=<syntaxhighlight lang="xml">
<psarc>
<create archive="C:\psarctests\source files\test.psarc
\dummy.txt (0\0 100%)
\BMPfolder1\Image1.bmp (8018\6220854 0%)
\JPGfolder1\JPGfolder2\Image2.jpg (209\12524 1%)
\PNGfolder1\PNGfolder2\PNGfolder3\Image3.png (6142\6142 100%)
</syntaxhighlight>}}
}}
 
*'''Step 4 - Replace first line end (for relative flag)'''
Relative paths is the default value, this step completes the replacement of the first line by using the default '''absolute="false"''' attribute
{{Boxframe1|content=
find:
\.psarc\r\n
replace by:
\.psarc" absolute="false" ignorecase="false">\r\n\t\t<compression type="zlib" />\r\n\t\t<strip regex="C:\\source\\folder\\" />\r\n\r\n\t\t<file path="C:\\source\\folder\\
The resulting file:
{{Boxcode|content=<syntaxhighlight lang="xml">
<psarc>
<create archive="C:\psarctests\source files\test.psarc" absolute="false" ignorecase="false">
<compression type="zlib" />
<strip regex="C:\source\folder\" />
 
<file path="C:\source\folder\\dummy.txt (0\0 100%)
\BMPfolder1\Image1.bmp (8018\6220854 0%)
\JPGfolder1\JPGfolder2\Image2.jpg (209\12524 1%)
\PNGfolder1\PNGfolder2\PNGfolder3\Image3.png (6142\6142 100%)
</syntaxhighlight>}}
}}
 
*'''Step 5 - Replace first line end (for absolute flag)'''
This step finds the same pattern replaced in step before followed by an slash, if found is replaced by the same pattern but with '''absolute="true"''' attribute
{{Boxframe1|content=
find:
\.psarc" absolute="false" ignorecase="false">\r\n\t\t<compression type="zlib" />\r\n\t\t<strip regex="C:\\source\\folder\\" />\r\n\r\n\t\t<file path="C:\\source\\folder\\\\
replace by:
\.psarc" absolute="true" ignorecase="false">\r\n\t\t<compression type="zlib" />\r\n\t\t<strip regex="C:\\source\\folder\\" />\r\n\r\n\t\t<file path="C:\\source\\folder\\\\
The resulting file:
{{Boxcode|content=<syntaxhighlight lang="xml">
<psarc>
<create archive="C:\psarctests\source files\test.psarc" absolute="true" ignorecase="false">
<compression type="zlib" />
<strip regex="C:\source\folder\" />


<gallery>
<file path="C:\source\folder\\dummy.txt (0\0 100%)
File:Namco System 357A - connected.jpg|Namco System 357A - connected to a "Capcom I/O JAMMA converter"
\BMPfolder1\Image1.bmp (8018\6220854 0%)
File:Namco System 357A - overview.jpg|Namco System 357A - overview
\JPGfolder1\JPGfolder2\Image2.jpg (209\12524 1%)
File:Namco System 357A - topback.jpg|Namco System 357A - topback
\PNGfolder1\PNGfolder2\PNGfolder3\Image3.png (6142\6142 100%)
File:Namco System 357A - usbports.jpg|Namco System 357A - usbports
</syntaxhighlight>}}
File:Namco System 357A - io ports.jpg|Namco System 357A - io ports
}}
File:Namco System 357A - back 12V input.jpg|Namco System 357A - DC_IN input
File:JAMMA Functional Diagram.jpg|JAMMA Functional Diagram
</Gallery>


*Sega ?? (it seems there are at least 2 sega "JVS to JAMMA coverters" compatibles, for "Sega Naomi" and "Sega Lindbergh")
*'''Step 6 - Replace parentheses (per-file compression autodetection)'''
This step replaces only the parentheses for the lines of the files that was archived without compression and adds the attribute '''compressed="false"'''
{{Boxframe1|content=
find:
[^\b]\(.*100.\)\r\n
replace by:
" compressed="false" />\r\n\t\t<file path="C:\\source\\folder\\
The resulting file:
{{Boxcode|content=<syntaxhighlight lang="xml">
<psarc>
<create archive="C:\psarctests\source files\test.psarc" absolute="true" ignorecase="false">
<compression type="zlib" />
<strip regex="C:\source\folder\" />


<!--//
<file path="C:\source\folder\\dummy.txt" compressed="false" />
= Namco System 359 =
<file path="C:\source\folder\\BMPfolder1\Image1.bmp (8018\6220854 0%)
note: 359 is disputed as 357C or 369 misnaming
\JPGfolder1\JPGfolder2\Image2.jpg (209\12524 1%)
//-->
\PNGfolder1\PNGfolder2\PNGfolder3\Image3.png" compressed="false" />
<file path="C:\source\folder\
</syntaxhighlight>}}
}}


= Namco System 369 =
*'''Step 7 - Replace other parentheses'''
<Gallery>
This step replaces all the other parentheses for the lines of the files that willl be compressed
File:Namco System 36911J.jpg|Namco System 369 - back
{{Boxframe1|content=
File:Namco System 369 - Accessories.jpg|Namco System 369 - Accessories
find:
File:Namco System 369 - Tekken Tag 2.jpg|Namco System 369 - Tekken Tag 2
[^\b]\(.*\n
</Gallery>
replace by:
source for above: https://www.rinkya.com/en/auction-k159839038
" />\r\n\t\t<file path="C:\\source\\folder\\
The resulting file:
{{Boxcode|content=<syntaxhighlight lang="xml">
<psarc>
<create archive="C:\psarctests\source files\test.psarc" absolute="true" ignorecase="false">
<compression type="zlib" />
<strip regex="C:\source\folder\" />


<Gallery>
<file path="C:\source\folder\\dummy.txt" compressed="false" />
File:System 36911J -Tekken Tag 2 - Cabinet.jpg|System 36911J - Tekken Tag 2 - Cabinet
<file path="C:\source\folder\\BMPfolder1\Image1.bmp" />
File:System 36911J - overview.jpg|System 36911J - overview
<file path="C:\source\folder\\JPGfolder1\JPGfolder2\Image2.jpg" />
File:System 36911J - topback.jpg|System 36911J - topback
<file path="C:\source\folder\\PNGfolder1\PNGfolder2\PNGfolder3\Image3.png" compressed="false" />
File:System 36911J - dongles.jpg|System 36911J - dongles
<file path="C:\source\folder\
File:System 36911J - top.jpg|System 36911J - top
</syntaxhighlight>}}
File:System_36911J - top_sticker bottomleft.jpg|System_36911J - top_sticker bottomright
}}
File:System 36911J - top sticker topright.jpg|System 36911J - top sticker topright
File:System 36911J - back.jpg|System 36911J - back
</Gallery>
source for above: http://akihabaraarcade.blogspot.nl/2013/01/tekken-tag-tournament-2-unlimited.html


https://www.youtube.com/watch?v=h6O3bJ8TFtc
*'''Step 8 - Replace last line'''
This step replaces a useless line at the end and completes the xml structure
{{Boxframe1|content=
find:
\t\t<file path="C:\\source\\folder\\$
replace by:
\t</create>\r\n</psarc>
The resulting file:
{{Boxcode|content=<syntaxhighlight lang="xml">
<psarc>
<create archive="C:\psarctests\source files\test.psarc" absolute="true" ignorecase="false">
<compression type="zlib" />
<strip regex="C:\source\folder\" />


* Note the motherboard is based on PS3 slim, the position of the connectors matches with [[DYN-00x]] (CECH-20xx), and [[SUR-00x]] (CECH-21xx) or later [[JTP-00x|JTP-001]]/[[JSD-00x|JSD-001]]
<file path="C:\source\folder\\dummy.txt" compressed="false" />
* Note the 3 USB connectors (not present in PS3 slim models), this means there is a "USB HUB" inside the case (<s>or 1 of the USB connectors is only a "dummy" to feed power to USB devices with no data communication</s>), either in a separated board or integrated in one of the JVS board or IO board  ''It has been confirmed that there is indeed a USB Hub inside of the System 369 hardware''
<file path="C:\source\folder\\BMPfolder1\Image1.bmp" />
<file path="C:\source\folder\\JPGfolder1\JPGfolder2\Image2.jpg" />
<file path="C:\source\folder\\PNGfolder1\PNGfolder2\PNGfolder3\Image3.png" compressed="false" />
</create>
</psarc>
</syntaxhighlight>}}
}}


== 369 (GECR-2500) [[JTP-00x|JTP-001]]/[[JSD-00x|JSD-001]] ==
*'''Step 9 - Absolute flag blind fix'''
The purpose of this step is to fix a posible problem that only happens when the .psarc was created with absolute flag (when the paths created from the list command starts with an slash, like in the examples)


== 369 (GECR-2500CU1) [[JTP-00x|JTP-001]]/[[JSD-00x|JSD-001]]  ==
The fix is made blindlly because it will remove an slash only if two consecutive slashes are found (if there are no double slashes it will do nothing)
<Gallery>
{{Boxframe1|content=
File:System_369_Exterior.JPG|System 369 Exterior View
find:
File:System_369_Overall_Top.JPG|System 369 Interior Overall Top
\\\\
File:System_369_Overall_Bottom.JPG|System 369 Interior Overall Bottom
replace by:
File:System_369_USB_Hub.JPG|System 369. 4 ports USB Hub (3 input ports at back + JVS Board input)
\\
File:System_369_USB_Header.JPG|System 369 Motherboard USB Header (hub is connected to port0, and port1 is not used)
The resulting file:
File:System_369_JVS_Board_Power_Supply.JPG|Secondary Power Supply for: Additional fan, USB hub, and JVS Board
{{Boxcode|content=<syntaxhighlight lang="xml">
File:System_369_JVS_Board.JPG|System 369 JVS Board (CN1 = power, CN2 = USB out)
<psarc>
File:System_369_Motherboard_Top.JPG|System 369 Motherboard Top
<create archive="C:\psarctests\source files\test.psarc" absolute="true" ignorecase="false">
File:System_369_Motherboard_Top_2.JPG|System 369 Motherboard Top 2 (Note missing BDROM drive and Wireless circuitry)
<compression type="zlib" />
File:System_369_Motherboard_Serial.JPG|System 369 Motherboard Serial (GECR-2500)
<strip regex="C:\source\folder\" />
File:System_369_Motherboard_Bottom.JPG|System 369 Motherboard Bottom
File:System_369_Motherboard_Bottom_2.JPG|System 369 Motherboard Bottom 2 (JTP-001)
File:System_369_Motherboard_Bottom_3.JPG|System 369 Motherboard Bottom 3
</Gallery>
source for above:  Personal collection of [[User:Rkrenicki]]


<file path="C:\source\folder\dummy.txt" compressed="false" />
<file path="C:\source\folder\BMPfolder1\Image1.bmp" />
<file path="C:\source\folder\JPGfolder1\JPGfolder2\Image2.jpg" />
<file path="C:\source\folder\PNGfolder1\PNGfolder2\PNGfolder3\Image3.png" compressed="false" />
</create>
</psarc>
</syntaxhighlight>}}
}}


=Games or Apps using PSARC files=


{| class="wikitable"
! colspan="13" {{cellcolors|lightblue}} {{icon content ps3}}
|-
! colspan="2" | Game/App info !! colspan="5" | PSARC Header info !! rowspan="2" | Compression<BR />Method !! rowspan="2" | Notes
|-
! TITLE !! PSARC files || Version<BR />(offset 0x04) !! Compression<BR />(offset 0x08) !! TOC entry size<BR />(offset 0x10) !! Block Size<BR />(offset 0x18) !! Flags<BR />(offset 0x1C)
|-
| rowspan="3" | Ape Escape || sound.psarc || 00010004 || zlib || 0000001E || 00010000 || 00000000 (no flags) || no compress || Contains not-compressed audio
|-
| <language>.psarc || 00010004 || zlib || 0000001E || 00010000 || 00000002 (absolute) || compress all ||
|-
| target.psarc || 00010004 || zlib || 0000001E || 00010000 || 00000002 (absolute) || compress all || TOC dupes!!!, see notes below
|-
| Atelier Rorona Plus || ? || 00010004 || zlib || 0000001E || 00010000 || 00000002 (absolute) || ? ||
|-
| Eiyuu Densetsu Sen no Kiseki ||  data.psarc || ||  ||  ||  ||  ||  ||
|-
| Eiyuu Densetsu Sen no Kiseki II ||  data.psarc  || ||  ||  ||  ||  ||  ||
|-
| God of War III || All || 00010004 || zlib || 0000001E || 00010000 || 00000002 (absolute) || compress all ||
|-
| rowspan="6" | God of War Ascension || INTROCIN.PSARC ||  ||  ||  ||  ||  || no compress || Intro video
|-
| CRTN.PSARC<BR />CYN.PSARC<BR />FURY.PSARC<BR />HECA.PSARC<BR />HRTN.PSARC<BR />LAN.PSARC<BR />PHI.PSARC<BR />STAT.PSARC<BR />STINT.PSARC<BR />TEM.PSARC ||  ||  ||  ||  ||  || per-file compress || Contains not-compressed audio, and other compressed files<BR />game levels, and game levels soundtracks
|-
| RESOURCES.PSARC ||  ||  ||  ||  ||  || per-file compress || Game resources, included not-compresed audio
|-
| <LANGUAGE>.PSARC ||  ||  ||  ||  ||  || per-file compress || Contains not-compressed audio, and other compressed files
|-
| SHELL.PSARC<BR />TPPS.PSARC ||  ||  ||  ||  ||  || compress all || Main menu<BR />Game updates stub (dummy file)
|-
| GAME.PSARC<BR />(or all others ?) || 00010004 || zlib || 0000001E || 00010000 || 00000002 (absolute) || compress all || Game settings
|-
| ICO & Shadow of the Colossus HD ||  ||  ||  ||  ||  ||  ||  ||
|-
| Killzone 3 || data_ps3.psarc || 00010004 || zlib || 0000001E || 00010000 || 00000001 (ignorecase) || compress all || created from 3 working directories, lot of duplicated paths
|-
| rowspan="3" | Mass Effect 3 || AUDIO.PSARC || 00010004 || lzma || 0000001E || 00010000 || 00000003 (ignorecase + absolute) || no compress || Contains not-compressed audio
|-
| MAIN.PSARC || 00010004 || lzma || 0000001E || 00010000 || 00000003 (ignorecase + absolute) || per-file compress || Contains not-compressed video, and other compressed files
|-
| TEXTURES.PSARC ||  ||  ||  ||  ||  ||  ||
|-
| Metal Gear Solid V. Ground Zeroes || data.psarc || 00010004 || zlib || 0000001E || 00010000 || 00000002 (absolute) || per-file compress || whole game, included texture.qar (452mb) duplicated out of the .psarc
|-
| Motorstorm Pacific Rift ||  ? || ||  ||  ||  ||  ||  || 
|-
| Ni No Kuni || bd03.adat ?<BR />hd01.adat ?<BR />hd05<language>.adat ? || ||  ||  ||  ||  ||  || .psarc file extensions renamed to .adat
|-
| Ninja Gaiden 3 Razors Edge ||  || ||  ||  ||  ||  ||  ||
|-
| rowspan="2" | Ratchet & Clank. Tools of Destruction || *_uncached.psarc || 00010002 || zlib || 0000001E || 00010000 || 00000003 (ignorecase + absolute) || per-file compress || Contains not-compressed audio, and other compressed files
|-
| All others || 00010002 || zlib || 0000001E || 00010000 || 00000003 (ignorecase + absolute) || compress all ||
|-
| rowspan="2" | Ratchet & Clank. Quest for Booty || *_uncached.psarc || 00010002 || zlib || 0000001E || 00010000 || 00000003 (ignorecase + absolute) || per-file compress || Contains not-compressed audio, and other compressed files
|-
| All others || 00010002 || zlib || 0000001E || 00010000 || 00000003 (ignorecase + absolute) || compress all || global_cached.psarc contains TOC dupes!!! (icon0.png)
|-
| rowspan="2" | Ratchet & Clank. A Crack in Time || *_uncached.psarc || 00010003 || zlib || 0000001E || 00010000 || 00000003 (ignorecase + absolute) || per-file compress || Contains not-compressed audio, and other compressed files
|-
| All others || 00010003 || zlib || 0000001E || 00010000 || 00000003 (ignorecase + absolute) || compress all ||
|-
| rowspan="3" | Ratchet & Clank. Into the Nexus || global_cached.psarc<BR />level_cached.psarc || 00010003 || zlib || 0000001E || 00010000 || 00000003 (ignorecase + absolute) || per-file compress || Contains not-compressed files, and other compressed files
|-
| global_uncached.psarc<BR />global_sound_**.psarc || 00010003 || zlib || 0000001E || 00010000 || 00000003 (ignorecase + absolute) || per-file compress || Contains not-compressed audio, and other compressed files
|-
| All others || 00010003 || zlib || 0000001E || 00010000 || 00000003 (ignorecase + absolute) || compress all ||
|-
| The Last Of Us || All ? || 00010003 || zlib || 0000001E || 00010000 || 00000000 (no flags) ||  ||
|-
| The Shoot || All || 00010004 || zlib || 0000001E || 00010000 || 00000002 (absolute) ||  ||
|-
| Time and Eternity ||  || ||  ||  ||  ||  ||  ||
|-
| Uncharted 2 || All ? || 00010003 || zlib || 0000001E || 00010000 || 00000000 (no flags) ||  ||
|-
| Uncharted 3 || All || 00010003 || zlib || 0000001E || 00010000 || 00000000 (no flags) ||  ||
|-
| Warhawk || ? ||  ||  ||  ||  ||  ||  ||
|-
| rowspan="2" | White Knight Chronicles II || All .psarc || 00010003 || zlib || 0000001E || 00010000 || 00000002 (absolute) || no compress || Contains not-compressed audio
|-
| All .psarc.sdat || 00010003 || zlib || 0000001E || 00010000 || 00000002 (absolute) || compress all || Default compression, NPD signed psarcs
|-
| rowspan="2" | Wipeout HD Fury || data01.psarc || 00010003 || zlib || 0000001E || 00010000 || 00000003 (ignorecase + absolute) || no compress || Contains not-compressed audio
|-
| All others || 00010003 || zlib || 0000001E || 00010000 || 00000003 (ignorecase + absolute) || compress all ||
|-
! colspan="13" {{cellcolors|lightblue}} {{icon content ps4}}
|-
! colspan="2" | Game/App info !! colspan="5" | PSARC Header info !! rowspan="2" | Compression<BR />Method !! rowspan="2" | Notes
|-
! TITLE !! PSARC files || Version<BR />(offset 0x04) !! Compression<BR />(offset 0x08) !! TOC entry size<BR />(offset 0x10) !! Block Size<BR />(offset 0x18) !! Flags<BR />(offset 0x1C)
|-
| No Man's Sky || *.pak  || 00010004 || zlib || 0000001E || 00010000 || 00000001 (ignorecase)  || all compress? || .PAK files are actually PSARC files, see https://www.youtube.com/watch?v=xlJfy1dvmGI <abbr title="the original PSARC uses flag --ignorecase it can be seen at minute 1:12 but when he rebuilds it he uses the flag --absolute instead, this is wrong though the game seems to dont care but is important and can cause some of the files to dont load">there is a mistake in the video</abbr>
|-
| VidZone || vidzone*.db.psarc || 00010004 || zlib || 0000001E || 00010000 || 00000000 (no flags) || compress all || Vidzone is a web service, the .psarc is hosted in the web
|-
! colspan="13" {{cellcolors|lightblue}} {{icon content psvita}}
|-
! colspan="2" | Game/App info !! colspan="5" | PSARC Header info !! rowspan="2" | Compression<BR />Method !! rowspan="2" | Notes
|-
! TITLE !! PSARC files || Version<BR />(offset 0x04) !! Compression<BR />(offset 0x08) !! TOC entry size<BR />(offset 0x10) !! Block Size<BR />(offset 0x18) !! Flags<BR />(offset 0x1C)
|-
| Gravity Rush || Gravite.psarc || 00010004 || zlib || 0000001E || 00010000 || 00000000 (no flags) ||  ||
|}


*Other games that probably uses PSARC's
**Uncharted 1?
**Killzone colletion ?
**God of War. Collection ?
**other Motorstorms ?


{{Console Information}}<noinclude>[[Category:Main]]</noinclude>
{{File Formats}}
<noinclude>[[Category:Main]]</noinclude>

Revision as of 22:37, 8 June 2017

Description

PlayStation ARChive is a generic file container that uses an internal hierarchy of subfolders with defined access paths, and optional zlib or lzma per-file compression


The access paths are stored in a special file generated at build time called manifest, It mimics a standard tree structure of folders/files but the root of the hierarchy is not defined, this way the contents of the psarc can be "mounted" by the system/game as part of his filesystem at any place and under any device letter/name

There are 3 different methods to generate this paths that defines how the .psarc contents are mounted by the system/game, this methods are enabled by the archive flags stored in the header, the system/game knows how to recreate the filesystem paths and mounts the .psarc contents by reading the archive flags that are needed to process the access paths in the manifest


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)

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)

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


Zlib Header (source)
byte index bit 7 bit 6 bit 5 bit 4 bit 3 bit 2 bit 1 bit 0
[0] CMF Compression info
  • 7 = indicates a 32K window size
Compression method
  • 8 = denotes the "deflate" compression
[1] FLG FLEVEL
  • 0 - compressor used fastest algorithm
  • 1 - compressor used fast algorithm
  • 2 - compressor used default algorithm
  • 3 - compressor used maximum compression, slowest algorithm
FDICT

(Preset dictionary)

If set, a DICT dictionary identifier is present
immediately after the FLG byte. The dictionary is a sequence of
bytes which are initially fed to the compressor without
producing any compressed output. DICT is the Adler-32 checksum
of this sequence of bytes (see the definition of ADLER32
below).  The decompressor can use this identifier to determine
which dictionary has been used by the compressor.
FCHECK
value must be such that CMF and FLG, when viewed as
a 16-bit unsigned integer stored in MSB order (CMF *256 + FLG),
is a multiple of 31.


About Data Compression:

Structure

See: debian psarc Kplugin structure. From Manuel Stahl (thymythos) @ http://opendesktop.org/content/show.php/PSARC+file+header?content=162745

Header

PSARC header example:

Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
00000000  50 53 41 52 00 01 00 04 7A 6C 69 62 00 01 23 BA  PSAR....zlib..#º
00000010  00 00 00 1E 00 00 09 16 00 01 00 00 00 00 00 02  ................
Offset Size Name Example Value (conversion) Notes
PSARC Header
0x00 0x04 magic 50 53 41 52 PSAR PlayStation ARchive
0x04 0x04 version 00 01 00 04 v1.4 First 2 bytes is the major version, next 2 bytes is the minor version
0x08 0x04 compression_type 7A 6C 69 62 zlib zlib (default)
lzma
0x0C 0x04 toc_length 00 01 23 BA 0x123BA Includes 32 byte header length + block length table following ToC
0x10 0x04 toc_entry_size 00 00 00 1E 30 Bytes Default is 30 bytes
0x14 0x04 toc_entries 00 00 09 16 1 manifest + 2325 files The manifest is always included as the first file in the archive without an assigned ID
0x18 0x04 block_size 00 01 00 00 65536 Bytes Default is 65536 bytes
0x1C 0x04 archive_flags 00 00 00 02 Absolute paths 0 = relative paths (default)
1 = ignorecase paths
2 = absolute paths
  • Relative (default, no flags)
    • 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 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"
    • 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
    • Enabled by using the option --ignorecase in command line or ignorecase="true" in the .xml
    • The paths in the manifest are case insensitive (doesnt matters wich characters are in capitals)
  • Absolute flag
    • Enabled by using the option --absolute in command line or absolute="true" in the .xml
    • The paths in the manifest have an slash character at the start of every line,
    • e.g: /Folder/File.bin"

TOC Table

PSARC TOC example:

Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
00000020  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
00000030  00 00 00 00 00 00 01 79 D9 00 00 01 23 BA A9 A6  .......yÙ...#º©¦
00000040  AB EE E6 73 40 2A E6 C3 37 24 3F C1 81 16 00 00  «îæs@*æÃ7$?Á....
00000050  00 02 00 00 00 1D 90 00 00 01 45 3B 5A 08 E7 AC  ..........E;Z.ç¬
...
Offset Size Name Example Value (conversion) Notes
PSARC TOC
0x20 0x16 name digest 00 00 ... 00 00 - 128-bit md5 hash
0x36 0x04 index list 01 79 D9 00 - Size of the (compressed per default) index list.
   <array name="TOC" length="num_entries">
     <struct name="entry">
       <array name="MD5" length="16"><primitive type="UInt8"/></array>
       <primitive name="zIndex" type="UInt32" />
       <bitfield name="length" width="40" type="unsigned" />
       <bitfield name="offset" width="40" type="unsigned" />
     </struct>
   </array>

Blocks info table

   <array name="block sizes" length="num_entries">
     <bitfield name="size" width="16" type="unsigned" />
   </array>

File table

The compression is applyed "per-block", is posible to know the compression level by looking at the zlib header

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

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 "/"

To make things more generic all examples in wiki uses full PC paths, this allows to place the sources (files to create, or psarc to extract), targets (files to create, or psarc to extract), and psarc.exe in any path of the PC, using full paths makes needed the use of the "strip" option in all creation process to remove part of the PC path and device letter from the access paths stored in the manifest

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

GUI versions are derivated from the command line versions

Open PSARC PS3 Extractor

By Matthieu Milan. It allows you to extract PSARC archive data in linux

Source code: https://www.ferb.fr/ps3/PSARC/

PSARC tool

Port of Matthieu Milan's open PSARC PS3 extractor to Windows. Tool written by Matthieu Milan (@usineur). Ported to VS2012 by AlexAltea.

source code: https://github.com/AlexAltea/psarc-tool

Usage:
 psarc [option] filename

Options:
 -l                Create a text file that lists the file id, size, and name of every file in the archive.
 -x                Extracts all files.
 -e START END      Extracts files with the file id specified by the range between START and END (inclusive).

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

Usage:
 PSARC [flag] <fileName>

Flags:
 -l             Creates a text file that lists the File ID, Size, and Name of every file in the archive.
 -e START END   Extracts files with the File ID specified by the range between START and END (inclusive). 
 <blank>        Extracts all files.
  • Examples:
    • Extract all files from data.psarc : PSARC data.psarc
    • Create list of files from data.psarc : PSARC -l data.psarc
    • Extract file with File ID 5 : PSARC -e 5 5 data.psarc
    • Extract files with File ID 7 through 12 : PSARC -e 7 12 data.psarc


The flag -l creates a .txt file with a list of all the contents of the archive, the info included is: File ID, File original size, and File path inside psarc archive

Example of a .txt file created with the -l flag:

ID       Size         Name
1      | 7,39 KB    | /my/files/dummies/dummy1.bin
2      | 8,80 KB    | /my/files/dummies/dummy2.bin
3      | 3,30 KB    | /my/files/dummies/dummy3.bin

PSARC

1.60.008 SDK : x
1.92.001 SDK : x
3.40.001 SDK : psarc-138.002 (C++), built on Feb 15 2010 at 16:17:41
3.41.001 SDK : psarc-138.002 (C++), built on Feb 15 2010 at 16:17:41
3.60.001 SDK : psarc-138.002 (C++), built on Feb 15 2010 at 16:17:41
3.70.001 SDK : psarc-138.002 (C++), built on Feb 15 2010 at 16:17:41
4.00.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

help

C:\>psarc.exe --help
usage:
 psarc verb [options] [file...]
 psarc --xml=XMLFILE
 
verbs:
 create                                  Create an archive. (default)
 extract                                 Extract contents of an existing archive.
 list                                    List contents of an existing archive.
 dump                                    Print detailed info about archive for unit testing.
 verify                                  Verify an existing archive's structural integrity and ensure that all files can be decompressed.
 dtd                                     Display a DTD describing psarc's XML input syntax.

general options:
 -h, --help                              Show this help message and exit.
     --version                           Display version and exit.
 -d, --debug                             Debug: Show debug messages.
 -v, --verbose                           Verbose: Show additional progress. (default)
 -q, --quiet                             Quiet: Don't show any progress.
 -y, --overwrite                         Overwrite existing files when creating/extracting.
 --xml=XMLFILE                           XML list of actions to perform.

create options:
 -oFILE, --output=FILE                   Archive filename to create.
 -IINPUTFILE, --inputfile=INPUTFILE      Inputfile listing files to archive. Consider --xml instead, which gives you more control.
 -m, --mself                             Create a PSARC-MSELF hybrid file for PS3, which can contain encrypted special files like SDATA, SPRX, and SPU SELF.
 --zlib                                  Use Zlib when compressing. (default)
 --lzma                                  Use LZMA when compressing. (usually for PS3 PSN)
 --level=N                               Compression quality. 1 is fastest, 9 is best. (default = 9)
 -N, --nocompress                        Store all files uncompressed in the archive.
 -bBS, --blocksize=BS                    Use blocks of size BS. (default = 64KiB)
 -jJOBS, --jobs=JOBS                     Compression threads to run at a time. (default = number of CPUs)
 -sREGEX, --strip=REGEX                  Perl-compatible regex specifying a prefix to strip from the pathnames stored in the archive. This may be specified more than once. (default = current dir)
 -S, --strip-all                         Strip all paths from files stored in the archive.
 -a, --absolute                          Make the paths within the archive absolute.
 -R, --relative                          Make the paths within the archive relative. (default)
 -i, --ignorecase                        Make the archive directory case-insensitive.
 --exclude=WILDCARD                      Wildcard specifying files to exclude.
 --skip-missing-files                    If set then ignore it when a file cannot be found.
 --mergedups                             Compare the content of all files, and merge identical files so that only one copy of the data is included.

extract options:
 --input=FILE                            Archive to extract files from. (default is first file argument)
 --to=DIRECTORY                          Directory to write extracted files to. (default is current directory)

dtd

  • Display a DTD describing psarc's XML input syntax.

The output of this command is a layout that defines the structure of an .xml document. See: http://www.w3schools.com/DTD/

C:\>psarc.exe dtd
<!ELEMENT psarc (create|extract)+>

<!ELEMENT create (compression|strip|exclude|file|directory|filelist)+>
<!ATTLIST create archive CDATA #IMPLIED
                 absolute (true|false) "false"
                 ignorecase (true|false) "false"
                 mergedups (true|false) "false"
                 stripall (true|false) "false"
                 blocksize CDATA "65536"
                 jobs CDATA #IMPLIED
                 skipmissingfiles (true|false) "false"
                 format (psarc|psarc-mself) "psarc"
                 overwrite (true|false) "false">

<!ELEMENT compression EMPTY>
<!ATTLIST compression type (zlib|lzma) "zlib"
                      level (1|2|3|4|5|6|7|8|9) "9"
                      enabled (true|false) "true">

<!ELEMENT strip EMPTY>
<!ATTLIST strip regex CDATA #REQUIRED>

<!ELEMENT exclude EMPTY>
<!ATTLIST exclude regex CDATA #IMPLIED
                  wildcard CDATA #IMPLIED>

<!ELEMENT file (CDATA)>
<!ATTLIST file wildcard CDATA #IMPLIED
               regex CDATA #IMPLIED
               path CDATA #IMPLIED
               archivepath CDATA #IMPLIED
               fromarchive CDATA #IMPLIED
               compressed (true|false) #IMPLIED
               skipifmissing (true|false) #IMPLIED>

<!ELEMENT filelist EMPTY>
<!ATTLIST filelist path CDATA #REQUIRED>

<!ELEMENT directory EMPTY>
<!ATTLIST directory path CDATA #REQUIRED
                    archivepath CDATA #IMPLIED
                    fromarchive CDATA #IMPLIED
                    compressed (true|false) #IMPLIED
                    skipifmissing (true|false) #IMPLIED>

<!ELEMENT extract (file)+>
<!ATTLIST extract archive CDATA #IMPLIED
                  input CDATA #IMPLIED
                  to CDATA #IMPLIED
                  stripall (true|false) "false"
                  skipmissingfiles (true|false) "false"
                  overwrite (true|false) "false">
  • DTD Notes:
    • Elements are defined in the DTD as: <!ELEMENT element-name (element-content)>
    • Attributes are defined in the DTD as: <!ATTLIST element-name attribute-name attribute-type attribute-value>
    • Elements that contains childrens elements that can be repeated several times are defined with a +
    • Character strings attribute data types are defined with: CDATA
    • Required attributes are defined with: #REQUIRED, and optional attributes with: #IMPLIED

Performing actions with an XML list

Is posible to automatize the create and extract actions by using an .xml

Using an xml is the most flexible way to use psarc.exe because has full support for all features of the tool (command line doesnt), some of the options of the tool are only available when using an xml, specially per-file attributes like: per-file compression (used by lot of games), or per-file extraction

To use an .xml is needed to prepare it based in this layout

This is the xml representation of the DTD layout containing all the elements and attributes availables together, is only for wiki purpose
Source Code
<psarc>
	<create archive="" absolute="false" ignorecase="false" mergedups="false" stripall="false" blocksize="65536" jobs="" skipmissingfiles="false" format="psarc" overwrite="false">
		<compression type="zlib" level="9" enabled="true" />
		<strip regex="" />
		<exclude regex="" wildcard="" />
		<file wildcard="" regex="" path="" archivepath="" fromarchive="" compressed="true" skipifmissing="false" />
		<directory path="" archivepath="" fromarchive="" compressed="true" skipifmissing="false" />
		<filelist path="" />
	</create>
	<extract archive="" to="" stripall="false" skipmissingfiles="false" overwrite="true">
		<file archivepath="" skipifmissing="false" />
	</extract>
</psarc>
  • 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

When the xml is ready you can run it this way:

C:\>psarc.exe --xml=C:\DTD_Layout.xml

The options --verbose, --debug, and --quiet cant be used inside the xml, so if needed are specifyed in the command line, this way:

C:\>psarc.exe --debug --xml=C:\DTD_Layout.xml

verify

  • Verify an existing archive's structural integrity and ensure that all files can be decompressed.
  • Output info per-file is: Validating <file ID/number>: - file path inside psarc archive - (file original size in bytes)
C:\>psarc.exe verify "C:\psarctests\source files\test.psarc"
Verifying C:\psarctests\source files\test.psarc
Validating 1: dummy.txt (0 bytes)
Validating 2: BMPfolder1/Image1.bmp (6220854 bytes)
Validating 3: JPGfolder1/JPGfolder2/Image2.jpg (12524 bytes)
Validating 4: PNGfolder1/PNGfolder2/PNGfolder3/Image3.png (6142 bytes)
Archive OK

dump

  • Print detailed info about archive for unit testing.
  • Output info per-file is: file path inside psarc archive - file original size - file compressed size - file block start offset ?
C:\>psarc.exe dump "C:\psarctests\source files\test.psarc"
Dumping C:\psarctests\source files\test.psarc
dummy.txt  os=0 cs=0 fb=1
BMPfolder1/Image1.bmp  os=6220854 cs=8018 fb=2
JPGfolder1/JPGfolder2/Image2.jpg  os=12524 cs=209 fb=97
PNGfolder1/PNGfolder2/PNGfolder3/Image3.png  os=6142 cs=6142 fb=98

list

  • List contents of an existing archive.
  • Output info per-file is: file path inside psarc archive - (file compressed size - file original size - compression percentage)
  • In the compression percentage: 100% is no reduction, 0% is a huge reduction
C:\>psarc.exe list "C:\psarctests\source files\test.psarc"
Listing C:\psarctests\source files\test.psarc
dummy.txt (0/0 100%)
BMPfolder1/Image1.bmp (8018/6220854 0%)
JPGfolder1/JPGfolder2/Image2.jpg (209/12524 1%)
PNGfolder1/PNGfolder2/PNGfolder3/Image3.png (6142/6142 100%)
Tip
Is posible to generate a text file containing the output of the list command by using the character > (right arrow) and the path/name of the destination file, this is usefull to convert the generated file to a filelist.txt for rebuilding the psarc archive later
C:\>psarc.exe list "C:\psarctests\source files\test.psarc" > c:\psarctests\filelist.txt

create

  • Create an archive.

create by directory

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 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 examle the file dummy.txt (located in the root of the folder in windows, so considered first) has been archived after BMPfolder1

Source Code
CREATE by_directory.xml
<psarc>
	<create archive="C:\psarctests\by_directory.psarc" absolute="false" ignorecase="false">
		<compression type="zlib" enabled="true" />
		<strip regex="C:\psarctests\source files\test" />
		<directory path="C:\psarctests\source files\test" />
	</create>
</psarc>
C:\>psarc.exe --xml="c:\psarctests\CREATE by_directory.xml"
Strip: C:\psarctests\source files\test
Flags: relative
NumJobs: 2
Output: C:\psarctests\by_directory.psarc
Compression: zlib level 9
Archiving C:\psarctests\source files\test
Compressing TOC
Compressing C:\psarctests\source files\test\BMPfolder1\Image1.bmp
Compressing C:\psarctests\source files\test\dummy.txt
Compressing C:\psarctests\source files\test\JPGfolder1\JPGfolder2\Image2.jpg
Compressing C:\psarctests\source files\test\PNGfolder1\PNGfolder2\PNGfolder3\Image3.png

           4: Total Files Archived
     6239520: Original Size
         108: Manifest (uncompressed)
          72: Manifest (compressed)
         380: TOC size
        8836: Final Size
        4.3%: Directory Overhead
       99.9%: Compression Ratio
           9: Compression Level
C:\>psarc.exe list C:\psarctests\by_directory.psarc
Listing C:\psarctests\by_directory.psarc
BMPfolder1/Image1.bmp (8018/6220854 0%)
dummy.txt (0/0 100%)
JPGfolder1/JPGfolder2/Image2.jpg (209/12524 1%)
PNGfolder1/PNGfolder2/PNGfolder3/Image3.png (157/6142 2%)

create by filelist

This method allows to order the files inside the archive in a specific position (so is posible to know the ID that will have every files before creating the psarc)

When rebuilding a psarc from a game is needed to preserve the original ID's of ALL the files inside the archive (is posible to replace files but never remove). By replacing files (e.g: by dummyes) all the others preserves his positions

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. Is posible to generate this kind of filelists automatically by using the output of the --list command and some regular expressions to replace characters

The examples used 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 option with an explicit path or a regular expression (regex) to remove part of the PC path (e.g: if you strip C:\psarctests\source files\test from C:\psarctests\source files\test\BMPfolder1\Image1.bmp the resulting path of the file inside the archive will be BMPfolder1/Image1.bmp)

The --strip option removes part of the paths from the filelist, can be used several times with different stripped paths, this is usefull when the psarc archive is generated from a filelist that contains paths from different folders and/or devices in the PC (e.g: is posible to create a filelist including a file from F:\textures\packed\texture1.jpg and another file from G:\models\packed\model1.xxx and strip the paths: F:\textures\ and G:\models\, this way both files will be stored inside the psarc archive together under path: packed/texture1.jpg and packed/model1.xxx)

First is needed to prepare a filelist.txt like this example, located in C:\psarctests\source files\filelist.txt, contains the PC paths of the files that are in the folder C:\psarctests\source files\test and will be included inside the psarc archive:

C:\psarctests\source files\test\dummy.txt
C:\psarctests\source files\test\BMPfolder1\Image1.bmp
C:\psarctests\source files\test\JPGfolder1\JPGfolder2\Image2.jpg
C:\psarctests\source files\test\PNGfolder1\PNGfolder2\PNGfolder3\Image3.png

The psarc archive is created by using the filelist as the --inputfile and uses an explicit path to --strip from every file inside the filelist, this way:

C:\>psarc.exe create --strip="C:\psarctests\source files\test" --output=C:\psarctests\by_filelist.psarc --inputfile="C:\psarctests\source files\filelist.txt"

Or you can prepare an .xml that contains the path to the filelist.txt

Source Code
CREATE by_filelist.xml
<psarc>
	<create archive="C:\psarctests\by_filelist.psarc" absolute="false" ignorecase="false">
		<compression type="zlib" enabled="true" />
		<strip regex="C:\psarctests\source files\test" />
		<filelist path="C:\psarctests\source files\filelist.txt" />
	</create>
</psarc>

Then run the contents of the .xml this way:

C:\>psarc.exe --xml="c:\psarctests\CREATE by_filelist.xml"

The output of the tool is the same in both cases (except the InputFile not present when using an xml)

Strip: C:\psarctests\source files\test
Flags: relative
NumJobs: 2
InputFile: C:\psarctests\source files\filelist.txt
Output: C:\psarctests\by_filelist.psarc
Compression: zlib level 9
Archiving C:\psarctests\source files\test\dummy.txt
Archiving C:\psarctests\source files\test\BMPfolder1\Image1.bmp
Archiving C:\psarctests\source files\test\JPGfolder1\JPGfolder2\Image2.jpg
Archiving C:\psarctests\source files\test\PNGfolder1\PNGfolder2\PNGfolder3\Image3.png
Compressing TOC
Compressing C:\psarctests\source files\test\dummy.txt
Compressing C:\psarctests\source files\test\BMPfolder1\Image1.bmp
Compressing C:\psarctests\source files\test\JPGfolder1\JPGfolder2\Image2.jpg
Compressing C:\psarctests\source files\test\PNGfolder1\PNGfolder2\PNGfolder3\Image3.png

           4: Total Files Archived
     6239520: Original Size
         108: Manifest (uncompressed)
          72: Manifest (compressed)
         380: TOC size
        8836: Final Size
        4.3%: Directory Overhead
       99.9%: Compression Ratio
           9: Compression Level
C:\>psarc.exe list C:\psarctests\by_filelist.psarc
Listing C:\psarctests\by_filelist.psarc
dummy.txt (0/0 100%)
BMPfolder1/Image1.bmp (8018/6220854 0%)
JPGfolder1/JPGfolder2/Image2.jpg (209/12524 1%)
PNGfolder1/PNGfolder2/PNGfolder3/Image3.png (157/6142 2%)

create by file

This method is the real deal, only available by using an xml, superceedes all the other creation methods and is the only method where is posible to use per-file attributes

The xml includes a list of files where every path of every file in the PC is specifyed (paths are the same than the filelist.txt explained before) but every file line allows for attributes

Note in the next example the compression attribute is enabled and affects all files, except Image3.png that has been archived without compression (appears as 100% in the list command output)

The other per-file attribute avoids the tool to output an error in the case the file dummy.txt is missing in the source folder

Source Code
CREATE by_file.xml
<psarc>
	<create archive="C:\psarctests\by_file.psarc" absolute="false" ignorecase="false">
		<compression type="zlib" enabled="true" />
		<strip regex="C:\psarctests\source files\test" />
		
		<file path="C:\psarctests\source files\test\dummy.txt" skipifmissing="true" />
		<file path="C:\psarctests\source files\test\BMPfolder1\Image1.bmp" />
		<file path="C:\psarctests\source files\test\JPGfolder1\JPGfolder2\Image2.jpg" />
		<file path="C:\psarctests\source files\test\PNGfolder1\PNGfolder2\PNGfolder3\Image3.png" compressed="false" />
	</create>
</psarc>
C:\>psarc.exe --xml="c:\psarctests\CREATE by_file.xml"
Strip: C:\psarctests\source files\test
Flags: relative
NumJobs: 2
Output: C:\psarctests\by_file.psarc
Compression: zlib level 9
Archiving C:\psarctests\source files\test\dummy.txt
Archiving C:\psarctests\source files\test\BMPfolder1\Image1.bmp
Archiving C:\psarctests\source files\test\JPGfolder1\JPGfolder2\Image2.jpg
Archiving C:\psarctests\source files\test\PNGfolder1\PNGfolder2\PNGfolder3\Image3.png
Compressing TOC
Compressing C:\psarctests\source files\test\dummy.txt
Compressing C:\psarctests\source files\test\BMPfolder1\Image1.bmp
Compressing C:\psarctests\source files\test\JPGfolder1\JPGfolder2\Image2.jpg
    Storing C:\psarctests\source files\test\PNGfolder1\PNGfolder2\PNGfolder3\Image3.png

           4: Total Files Archived
     6239520: Original Size
         108: Manifest (uncompressed)
          72: Manifest (compressed)
         380: TOC size
       14821: Final Size
        2.6%: Directory Overhead
       99.8%: Compression Ratio
           9: Compression Level
C:\>psarc.exe list C:\psarctests\by_file.psarc
Listing C:\psarctests\by_file.psarc
dummy.txt (0/0 100%)
BMPfolder1/Image1.bmp (8018/6220854 0%)
JPGfolder1/JPGfolder2/Image2.jpg (209/12524 1%)
PNGfolder1/PNGfolder2/PNGfolder3/Image3.png (6142/6142 100%)

Batch. This is an useless example to show how the .psarcs are created sequentially and how to create several .psarc's with only one .xml, it uses all default values for compressions, formats, flags etc...

In step 1 it creates an egg.psarc containing a dummy.txt. In step 2 it creates a chiken.psarc containing the egg.psarc made in step 1. In step 3 it creates an egg.psarc containing the chicken.psarc made in step 2 (egg.psarc created in step 3 overwrites egg.psarc made in step 1)

Source Code
CREATE by_file_paradox
<psarc>
	<create archive="C:\psarctests\egg.psarc">
		<strip regex="C:\psarctests\source files\test" />
		<file path="C:\psarctests\source files\test\dummy.txt" />
	</create>
	
	<create archive="C:\psarctests\chicken.psarc">
		<strip regex="C:\psarctests" />
		<file path="C:\psarctests\egg.psarc" />
	</create>
	
	<create archive="C:\psarctests\egg.psarc" overwrite="true">
		<strip regex="C:\psarctests" />
		<file path="C:\psarctests\chicken.psarc" />
	</create>
</psarc>
C:\>psarc.exe --xml="c:\psarctests\CREATE by_file_paradox.xml"
Strip: C:\psarctests\source files\test
Flags: relative
NumJobs: 2
Output: C:\psarctests\egg.psarc
Compression: zlib level 9
Archiving C:\psarctests\source files\test\dummy.txt
Compressing TOC
Compressing C:\psarctests\source files\test\dummy.txt

           1: Total Files Archived
           0: Original Size
           9: Manifest (uncompressed)
           9: Manifest (compressed)
          96: TOC size
         105: Final Size
       91.4%: Directory Overhead
       -1.$%: Compression Ratio
           9: Compression Level

Strip: C:\psarctests
Flags: relative
NumJobs: 2
Output: C:\psarctests\chicken.psarc
Compression: zlib level 9
Archiving C:\psarctests\egg.psarc
Compressing TOC
Compressing C:\psarctests\egg.psarc

           1: Total Files Archived
         105: Original Size
           9: Manifest (uncompressed)
           9: Manifest (compressed)
          96: TOC size
         174: Final Size
       55.2%: Directory Overhead
      -65.7%: Compression Ratio
           9: Compression Level

Strip: C:\psarctests
Flags: relative
NumJobs: 2
Output: C:\psarctests\egg.psarc
Compression: zlib level 9
Archiving C:\psarctests\chicken.psarc
Compressing TOC
Compressing C:\psarctests\chicken.psarc

           1: Total Files Archived
         174: Original Size
          13: Manifest (uncompressed)
          26: Manifest (compressed)
          96: TOC size
         252: Final Size
       38.1%: Directory Overhead
      -44.8%: Compression Ratio
           9: Compression Level
C:\>psarc.exe list C:\psarctests\egg.psarc
Listing C:\psarctests\egg.psarc
chicken.psarc (143/174 82%)
C:\>psarc.exe list C:\psarctests\chicken.psarc
Listing C:\psarctests\chicken.psarc
egg.psarc (69/105 65%)

extract

  • Extract contents of an existing archive.
  • 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 ?)

The required options are --input (the source .psarc) and --to (the target folder where contents will be extracted)

extract all

The example command extracts all files from the .psarc to a directory with full directory tree names, no skipped missing files, no overwrite

When using this options the command line output is the same, there is no mention of wich files are stripped, overwritten, or missing in the extraction process

C:\>psarc.exe extract --input="C:\psarctests\source files\test.psarc" --to="C:\psarctests\test"
Extracting: dummy.txt (0 bytes)
Extracting: BMPfolder1/Image1.bmp (6220854 bytes)
Extracting: JPGfolder1/JPGfolder2/Image2.jpg (12524 bytes)
Extracting: PNGfolder1/PNGfolder2/PNGfolder3/Image3.png (6142 bytes)
C:\>psarc.exe extract --overwrite --strip-all --skip-missing-files --input="C:\psarctests\source files\test.psarc" --to="C:\psarctests\test"
Extracting: dummy.txt (0 bytes)
Extracting: BMPfolder1/Image1.bmp (6220854 bytes)
Extracting: JPGfolder1/JPGfolder2/Image2.jpg (12524 bytes)
Extracting: PNGfolder1/PNGfolder2/PNGfolder3/Image3.png (6142 bytes)

extract all (xml)

Source Code
EXTRACT all.xml
<psarc>
	<extract archive="C:\psarctests\source files\test.psarc" to="C:\psarctests\all">
	</extract>
</psarc>
C:\>psarc.exe --xml="c:\psarctests\EXTRACT all.xml"
Extracting: dummy.txt (0 bytes)
Extracting: BMPfolder1/Image1.bmp (6220854 bytes)
Extracting: JPGfolder1/JPGfolder2/Image2.jpg (12524 bytes)
Extracting: PNGfolder1/PNGfolder2/PNGfolder3/Image3.png (6142 bytes)

extract by file

This extraction method is only available when using an xml because command line doesnt allows to specify files inside the archive

Source Code
EXTRACT by_file.xml
<psarc>
	<extract archive="C:\psarctests\source files\test.psarc" to="C:\psarctests\by_file">
		<file archivepath="BMPfolder1/Image1.bmp" />
	</extract>
</psarc>
C:\>psarc.exe --xml="c:\psarctests\EXTRACT by_file.xml"
Extracting: BMPfolder1/Image1.bmp (6220854 bytes)

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)

Source Code
<psarc>
	<extract archive="C:\psarctests\source files\test.psarc" to="C:\psarctests\by_file" stripall="true" skipmissingfiles="false" overwrite="true">
		<file archivepath="dummy.txt" skipifmissing="true" />
		<file archivepath="PNGfolder1/PNGfolder2/PNGfolder3/Image3.png" />
	</extract>
</psarc>
  • Notes about the xml examples above:
    • 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

Other options

Regular expression support (regex)

-sREGEX, --strip=REGEX                  Perl-compatible regex specifying a prefix to strip from the pathnames stored in the archive. This may be specified more than once. (default = current dir)

Psarc uses regular expressions compatibles with PERL 5, specifically the ones used by the PCRE library http://www.pcre.org/ As can be seen in the PS3 firmware third party software licenses in XMB/Settings/System Settings/About PlayStation®3 (PS3™)

Compression levels

--level=N                               Compression quality. 1 is fastest, 9 is best. (default = 9)
  • Notes
    • (default = 9)
    • when --level is not defined at creation time, the info about compression level in the creation process window appears with a value of 9, even when using --nocompress
Source Code
<psarc>
	<create archive="C:\psarctests\by_file.psarc">
		<compression type="zlib" level="9" />
		...

Create mself

-m, --mself                             Create a PSARC-MSELF hybrid file for PS3, which can contain encrypted special files like SDATA, SPRX, and SPU SELF.

For rebuilding purposes is needed to verify if some of this files are present in the original filelist, by searching for this file extensions (.sdata .sprx and .self), though file extensions could not be accurate because game developers can use custom names for file extensions

  • As far i remember this option doesnt stores any data in the psarc header so it seems the only way to identify his presence is by looking at the files itself--Sandungas (talk) 18:34, 20 March 2017 (UTC)

Total Commander plugin

http://www.totalcmd.net/plugring/PSARC.html

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

Download link: http://aldostools.org/ps3_psarc_gui.rar

PSARC Related Tools

Rebuilding PSARC files

When rebuilding a psarc is needed to preserve the original positions of all the files inside the archive (because every file in the original psarc has assigned an ID number, and after rebuilding this numbers must match with the original positions). for this same reason when rebuilding is not a good idea to remove files (because the other files that comes after will be displaced). When the purpose of the rebuild is to reduce the size (by removing languages, etc...) the method consists in replacing them by dummies (0kb files), this dummies preserves the positions of all the files

This need to preserve the original positions of all the files inside the archive in the practise means there are only 2 methods to rebuild a psarc: "by filelist" or "by file". For both is needed to create a list of files

Rebuilding PSARC files, step-by-step summary
  • Step 1 - Identify compression method, archive flags, and verify default structure sizes
  • Step 2 - Identify if per-file compression was used
  • Step 3 - Rebuild
    • Step 3a - If per-file compression was not used, rebuild with the method "by filelist" or "by file"
    • Step 3a - If per-file compression was used, rebuild with the method "by file"
  • Step 4 - Verify

Step 1

Is needed to look at the psarc header to identify some settings

Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
00000000  50 53 41 52 00 01 00 04 7A 6C 69 62 00 01 23 BA  PSAR....zlib..#º
00000010  00 00 00 1E 00 00 09 16 00 01 00 00 00 00 00 03  ................

Most important ones are the compression method (zlib/lzma) and the archive flags (relative/absolute, and ignorecase), this settings will be used when rebuilding from command line or from xml this way:

Source Code
<psarc>
	<create archive="C:\psarctests\by_file.psarc" absolute="true" ignorecase="true">
		<compression type="zlib" />
		...

The other values in the header that needs to be verifyed are the TOC entry size and the Block size, is needed to know if the original psarc we are trying to rebuild uses the default values (all i found used defaults), otherway is posible to use non-default values this way:

Source Code
<psarc>
	<create archive="C:\psarctests\by_file.psarc" absolute="true" ignorecase="true" blocksize="65536">
		<compression type="zlib" />
		...

Step2

Now is needed to know if the psarc uses per-file compression (if some of the files inside the archive are compressed, and others are not compressed)

This is important to know wich rebuild method will be used in the next step, is needed to make a --list command with psarc tool and store the output of the command as a .txt

Open the .txt in a text editor (like notepad++) and search for the string 100% (the files that appears with a 100% has been archived but are not compressed). Is needed to do it this way semi automatized because is usual to find psarc with thousand of files inside

  • Check how many files are not compressed, his sizes, and file extensions
    • If there are no files with 100% or if there are only a few and his sizes are minimal this is normal, it means the archive doesnt uses per-file compression
    • If there some files with the 100%, normal sizes (not minimal), using the same file extension, and can be identifyed (like audio or video formats) then you have a psarc with per-file compression
    • If all the files appears as 100% it means the psarc has been created with the compression attibute set as "false" this way:
Source Code
<psarc>
	<create archive="C:\psarctests\by_file.psarc" absolute="true" ignorecase="true" blocksize="65536">
		<compression type="zlib" enabled="false" />
		...

Step3

If the psarc doesnt uses per-file compression then is posible to rebuild it with the create by filelist method from command line by using an external filelist.txt

If the psarc uses per-file compression then the only way to rebuild it is with the create by file method by using an xml (the xml includes a list of files like the filelist.txt)


  • Special rebuild notes:
    • Mass effect 3 MAIN.PSARC contains a group of generic files compressed with level 9, and another group of .TXT, .BIN, and .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 a ridiculous 1% or 2% of compression ratio because is the max they will admit). This is not how the original file was created (but works), the correct way to rebuild it is by defining specific compression levels "per file" in a predefined .xml
    • Killzone 3 data_ps3.psarc (BCES01007 version) contains 8324 files (included 5.3GB of audio files for 21 languages with a compression of around 50%)... 2883 of all the files uses the same path/filenames repeated up to 3 times (because was created using 3 or more different working directories). This duplication of paths/filenames inside the .psarc in the practise means when doing a standard extraction 2833 files will be missing, overwrited, or they will give an error at extraction time, the correct way to mess with it is by doing several partiall extractions to different directories, and rebuild it by using a preconfigured .xml where the different paths for each file are specifyed, when rebuilding is also needed to use the --strip option several times to remove part of the paths from all the different working directories, this way the paths/filenames will be duplicated inside the .psarc archive (but are different files located at different positions and with a different ID number assigned).
    • Ape Escape target.psarc includes "dupes" (or duplicated files) in the TOC (table of contents) of the psarc archive. This method used at creation time basically works by making several entries of the TOC to point to the same file, this way a single file inside the psarc is indexed several times in the TOC and can be accessed from several different paths/filenames. The only way to identify this dupes before extraction is by reading the TOC of the psarc for all the files and compare wich position are pointing to. As an example the original size of target.psarc is 328mb... after a "standard" extraction is 2.52GB (this extraction doesnt identify the dupes so are extracted several times under different paths/filenames)... if you try to rebuild it again his final size will be much bigger than the original target.psarc

  • The file paths inside filelist.txt or inside an xml admits 2 formats:
    • full PC paths (where the full PC file path included the device letter is used by psarc.exe to locate the file in any device and/or any folder). This method is the most flexible but needs an strip command to remove part of the PC path when creating the psarc archive
    • relative to work directory paths (where work directory is the path to psarc.exe and the files needs to be placed in a subfolder under it). This method needs to copy psarc.exe to the parent folder of the files

The file list we need to generate contains the access paths stored in the manifest, the easy way to have have a copy of the manifest is by using the list command of psarc tool

The output of the list command has some characters that are needed ro remove or replace, the purpose of automatizing this process by using regular expressions is because usually psarc files contains thousand of files, the examples used here are commands for fnr.exe (find and replace tool) and contains regular expressions (to search) and a character strings (to replace)

Generating a filelist.txt by using regular expressions

Generating a filelist.txt, step-by-step summary
  • Step 1 - Save list command output as a .txt
  • Step 2 - Remove first line
  • Step 3 - Remove parentheses
  • Step 4 - Remove last line
  • Step 5 - Replace slashes (optional, recommended)
  • Step 6 - Add local paths (optional, recommended)
    • Step 6a - Absolute flag blind fix (optional, recommended)
  • Step 1 - Save list command output as a .txt

Generate a .txt file containing the output of the list comand

C:\>psarc.exe list "C:\psarctests\source files\test.psarc" > "C:\psarctests\filelist.txt"

The file generated by the list command will have this content (note there is en empty line at the end):

Listing C:\psarctests\source files\test.psarc
dummy.txt (0/0 100%)
BMPfolder1/Image1.bmp (8018/6220854 0%)
JPGfolder1/JPGfolder2/Image2.jpg (209/12524 1%)
PNGfolder1/PNGfolder2/PNGfolder3/Image3.png (6142/6142 100%)


  • Step 2 - Remove first line
find (and replace by nothing):
Listing.*\n

The resulting file:

dummy.txt (0/0 100%)
BMPfolder1/Image1.bmp (8018/6220854 0%)
JPGfolder1/JPGfolder2/Image2.jpg (209/12524 1%)
PNGfolder1/PNGfolder2/PNGfolder3/Image3.png (6142/6142 100%)


  • Step 3 - Remove parentheses
find (and replace by nothing):
[^\b]\(.*\)

The resulting file:

dummy.txt
BMPfolder1/Image1.bmp
JPGfolder1/JPGfolder2/Image2.jpg
PNGfolder1/PNGfolder2/PNGfolder3/Image3.png


  • Step 4 - Remove last line
find (and replace by nothing):
\r\n$

The resulting file:

dummy.txt
BMPfolder1/Image1.bmp
JPGfolder1/JPGfolder2/Image2.jpg
PNGfolder1/PNGfolder2/PNGfolder3/Image3.png

  • Step 5 - Replace slashes (optional, recommended)

This step is optional, both slashes are valid, but is good to do it to standarize all paths formats, otherway is a mess

find:
/

replace by:

\\

The resulting file:

dummy.txt
BMPfolder1\Image1.bmp
JPGfolder1\JPGfolder2\Image2.jpg
PNGfolder1\PNGfolder2\PNGfolder3\Image3.png

  • Step 6 - Add local paths (optional, recommended)

Now is needed to add the local paths (where the psarc contents are decompressed), e.g: C:\psarctests\source files\test\, remember this is exactly the part of the path that is needed to strip later (because we dont want to include our local path C:\psarctests\source files\test\ inside the manifest)

This is a perfect filelist.txt that can be used for the rebuild method by filelist from command line (usefull when the psarc doesnt uses per-file compression), remember is needed to use the strip option

find:
^

replace by:

C:\\psarctests\\source files\\test\\

The resulting file:

C:\psarctests\source files\test\dummy.txt
C:\psarctests\source files\test\BMPfolder1\Image1.bmp
C:\psarctests\source files\test\JPGfolder1\JPGfolder2\Image2.jpg
C:\psarctests\source files\test\PNGfolder1\PNGfolder2\PNGfolder3\Image3.png

  • Step 6a - Absolute flag blind fix (optional, recommended)

The purpose of this step is to fix a posible problem that could appear in step 6, the psarc used as an example in step 1 to generate the initial list of files was created without archive flags (in other words, his access paths in the manifest was relative paths)

The other posible paths format used by the manifest is when the psarc was created with absolute archive flag, in this case all the lines of the file list in step 5 starts with an slash \ (e.g: the first file in the list that is supposed to be archived in the root of the psarc should be listed as \dummy.txt instead of dummy.txt

In step 6 is added a local path that ends with an slash too... so the result is C:\psarctests\source files\test\\dummy.txt (note the double slash), this is wrong and this step fixes it blindlly (because doesnt matters if the problem exists or not, the final result will be the same)

find:
\\\\

replace by:

\\


Generating a XML by using regular expressions

Generating a xml, step-by-step summary
  • Step 1 - Save list command output as a list.txt
  • Step 2 - Replace slashes
  • Step 3 - Replace first line start (preserves original .psarc path)
  • Step 4 - Replace first line end (for relative flag)
  • Step 5 - Replace first line end (for absolute flag)
  • Step 6 - Replace parentheses (per-file compression autodetection)
  • Step 7 - Replace other parentheses
  • Step 8 - Replace last line
  • Step 9 - Absolute flag blind fix
  • Step 1 - Save list command output as a list.txt

Generate a list.txt file containing the output of the list command

C:\>psarc.exe list "C:\psarctests\source files\test.psarc" > "C:\psarctests\list.txt"

The file generated by the list command will have this content:

Source Code
Listing C:\psarctests\source files\test.psarc
/dummy.txt (0/0 100%)
/BMPfolder1/Image1.bmp (8018/6220854 0%)
/JPGfolder1/JPGfolder2/Image2.jpg (209/12524 1%)
/PNGfolder1/PNGfolder2/PNGfolder3/Image3.png (6142/6142 100%)
  • Notes of the example:
    • The original path of the .psarc is C:\psarctests\source files\test.psarc (it will be used as the path where the rebuild .psarc will be created)
    • Paths starts with an slash / (so the .psarc was created with absolute flag)
    • dummy.txt and Image3.png was archived without compression (appears with 100%)
    • There is an empty line at the end (not visible in wiki because yeah... is empty)
  • Step 2 - Replace slashes

This step is to standarize paths formats

find:
/

replace by:

\\

The resulting file:

Source Code
Listing C:\psarctests\source files\test.psarc
\dummy.txt (0\0 100%)
\BMPfolder1\Image1.bmp (8018\6220854 0%)
\JPGfolder1\JPGfolder2\Image2.jpg (209\12524 1%)
\PNGfolder1\PNGfolder2\PNGfolder3\Image3.png (6142\6142 100%)
  • Step 3 - Replace first line start (preserves original .psarc path)

This step keeps the original local path of the .psarc file that appears in the output of the list command (is the path where the .psarc will be created)

find:
Listing.

replace by:

<psarc>\r\n\t<create archive="

The resulting file:

Source Code
<psarc>
	<create archive="C:\psarctests\source files\test.psarc
\dummy.txt (0\0 100%)
\BMPfolder1\Image1.bmp (8018\6220854 0%)
\JPGfolder1\JPGfolder2\Image2.jpg (209\12524 1%)
\PNGfolder1\PNGfolder2\PNGfolder3\Image3.png (6142\6142 100%)
  • Step 4 - Replace first line end (for relative flag)

Relative paths is the default value, this step completes the replacement of the first line by using the default absolute="false" attribute

find:
\.psarc\r\n

replace by:

\.psarc" absolute="false" ignorecase="false">\r\n\t\t<compression type="zlib" />\r\n\t\t<strip regex="C:\\source\\folder\\" />\r\n\r\n\t\t<file path="C:\\source\\folder\\

The resulting file:

Source Code
<psarc>
	<create archive="C:\psarctests\source files\test.psarc" absolute="false" ignorecase="false">
		<compression type="zlib" />
		<strip regex="C:\source\folder\" />

		<file path="C:\source\folder\\dummy.txt (0\0 100%)
\BMPfolder1\Image1.bmp (8018\6220854 0%)
\JPGfolder1\JPGfolder2\Image2.jpg (209\12524 1%)
\PNGfolder1\PNGfolder2\PNGfolder3\Image3.png (6142\6142 100%)
  • Step 5 - Replace first line end (for absolute flag)

This step finds the same pattern replaced in step before followed by an slash, if found is replaced by the same pattern but with absolute="true" attribute

find:
\.psarc" absolute="false" ignorecase="false">\r\n\t\t<compression type="zlib" />\r\n\t\t<strip regex="C:\\source\\folder\\" />\r\n\r\n\t\t<file path="C:\\source\\folder\\\\

replace by:

\.psarc" absolute="true" ignorecase="false">\r\n\t\t<compression type="zlib" />\r\n\t\t<strip regex="C:\\source\\folder\\" />\r\n\r\n\t\t<file path="C:\\source\\folder\\\\

The resulting file:

Source Code
<psarc>
	<create archive="C:\psarctests\source files\test.psarc" absolute="true" ignorecase="false">
		<compression type="zlib" />
		<strip regex="C:\source\folder\" />

		<file path="C:\source\folder\\dummy.txt (0\0 100%)
\BMPfolder1\Image1.bmp (8018\6220854 0%)
\JPGfolder1\JPGfolder2\Image2.jpg (209\12524 1%)
\PNGfolder1\PNGfolder2\PNGfolder3\Image3.png (6142\6142 100%)
  • Step 6 - Replace parentheses (per-file compression autodetection)

This step replaces only the parentheses for the lines of the files that was archived without compression and adds the attribute compressed="false"

find:
[^\b]\(.*100.\)\r\n

replace by:

" compressed="false" />\r\n\t\t<file path="C:\\source\\folder\\

The resulting file:

Source Code
<psarc>
	<create archive="C:\psarctests\source files\test.psarc" absolute="true" ignorecase="false">
		<compression type="zlib" />
		<strip regex="C:\source\folder\" />

		<file path="C:\source\folder\\dummy.txt" compressed="false" />
		<file path="C:\source\folder\\BMPfolder1\Image1.bmp (8018\6220854 0%)
\JPGfolder1\JPGfolder2\Image2.jpg (209\12524 1%)
\PNGfolder1\PNGfolder2\PNGfolder3\Image3.png" compressed="false" />
		<file path="C:\source\folder\
  • Step 7 - Replace other parentheses

This step replaces all the other parentheses for the lines of the files that willl be compressed

find:
[^\b]\(.*\n

replace by:

" />\r\n\t\t<file path="C:\\source\\folder\\

The resulting file:

Source Code
<psarc>
	<create archive="C:\psarctests\source files\test.psarc" absolute="true" ignorecase="false">
		<compression type="zlib" />
		<strip regex="C:\source\folder\" />

		<file path="C:\source\folder\\dummy.txt" compressed="false" />
		<file path="C:\source\folder\\BMPfolder1\Image1.bmp" />
		<file path="C:\source\folder\\JPGfolder1\JPGfolder2\Image2.jpg" />
		<file path="C:\source\folder\\PNGfolder1\PNGfolder2\PNGfolder3\Image3.png" compressed="false" />
		<file path="C:\source\folder\
  • Step 8 - Replace last line

This step replaces a useless line at the end and completes the xml structure

find:
\t\t<file path="C:\\source\\folder\\$

replace by:

\t</create>\r\n</psarc>

The resulting file:

Source Code
<psarc>
	<create archive="C:\psarctests\source files\test.psarc" absolute="true" ignorecase="false">
		<compression type="zlib" />
		<strip regex="C:\source\folder\" />

		<file path="C:\source\folder\\dummy.txt" compressed="false" />
		<file path="C:\source\folder\\BMPfolder1\Image1.bmp" />
		<file path="C:\source\folder\\JPGfolder1\JPGfolder2\Image2.jpg" />
		<file path="C:\source\folder\\PNGfolder1\PNGfolder2\PNGfolder3\Image3.png" compressed="false" />
	</create>
</psarc>
  • Step 9 - Absolute flag blind fix

The purpose of this step is to fix a posible problem that only happens when the .psarc was created with absolute flag (when the paths created from the list command starts with an slash, like in the examples)

The fix is made blindlly because it will remove an slash only if two consecutive slashes are found (if there are no double slashes it will do nothing)

find:
\\\\

replace by:

\\

The resulting file:

Source Code
<psarc>
	<create archive="C:\psarctests\source files\test.psarc" absolute="true" ignorecase="false">
		<compression type="zlib" />
		<strip regex="C:\source\folder\" />

		<file path="C:\source\folder\dummy.txt" compressed="false" />
		<file path="C:\source\folder\BMPfolder1\Image1.bmp" />
		<file path="C:\source\folder\JPGfolder1\JPGfolder2\Image2.jpg" />
		<file path="C:\source\folder\PNGfolder1\PNGfolder2\PNGfolder3\Image3.png" compressed="false" />
	</create>
</psarc>

Games or Apps using PSARC files

Template:Icon content ps3
Game/App info PSARC Header info Compression
Method
Notes
TITLE PSARC files Version
(offset 0x04)
Compression
(offset 0x08)
TOC entry size
(offset 0x10)
Block Size
(offset 0x18)
Flags
(offset 0x1C)
Ape Escape sound.psarc 00010004 zlib 0000001E 00010000 00000000 (no flags) no compress Contains not-compressed audio
<language>.psarc 00010004 zlib 0000001E 00010000 00000002 (absolute) compress all
target.psarc 00010004 zlib 0000001E 00010000 00000002 (absolute) compress all TOC dupes!!!, see notes below
Atelier Rorona Plus ? 00010004 zlib 0000001E 00010000 00000002 (absolute) ?
Eiyuu Densetsu Sen no Kiseki data.psarc
Eiyuu Densetsu Sen no Kiseki II data.psarc
God of War III All 00010004 zlib 0000001E 00010000 00000002 (absolute) compress all
God of War Ascension INTROCIN.PSARC no compress Intro video
CRTN.PSARC
CYN.PSARC
FURY.PSARC
HECA.PSARC
HRTN.PSARC
LAN.PSARC
PHI.PSARC
STAT.PSARC
STINT.PSARC
TEM.PSARC
per-file compress Contains not-compressed audio, and other compressed files
game levels, and game levels soundtracks
RESOURCES.PSARC per-file compress Game resources, included not-compresed audio
<LANGUAGE>.PSARC per-file compress Contains not-compressed audio, and other compressed files
SHELL.PSARC
TPPS.PSARC
compress all Main menu
Game updates stub (dummy file)
GAME.PSARC
(or all others ?)
00010004 zlib 0000001E 00010000 00000002 (absolute) compress all Game settings
ICO & Shadow of the Colossus HD
Killzone 3 data_ps3.psarc 00010004 zlib 0000001E 00010000 00000001 (ignorecase) compress all created from 3 working directories, lot of duplicated paths
Mass Effect 3 AUDIO.PSARC 00010004 lzma 0000001E 00010000 00000003 (ignorecase + absolute) no compress Contains not-compressed audio
MAIN.PSARC 00010004 lzma 0000001E 00010000 00000003 (ignorecase + absolute) per-file compress Contains not-compressed video, and other compressed files
TEXTURES.PSARC
Metal Gear Solid V. Ground Zeroes data.psarc 00010004 zlib 0000001E 00010000 00000002 (absolute) per-file compress whole game, included texture.qar (452mb) duplicated out of the .psarc
Motorstorm Pacific Rift ?
Ni No Kuni bd03.adat ?
hd01.adat ?
hd05<language>.adat ?
.psarc file extensions renamed to .adat
Ninja Gaiden 3 Razors Edge
Ratchet & Clank. Tools of Destruction *_uncached.psarc 00010002 zlib 0000001E 00010000 00000003 (ignorecase + absolute) per-file compress Contains not-compressed audio, and other compressed files
All others 00010002 zlib 0000001E 00010000 00000003 (ignorecase + absolute) compress all
Ratchet & Clank. Quest for Booty *_uncached.psarc 00010002 zlib 0000001E 00010000 00000003 (ignorecase + absolute) per-file compress Contains not-compressed audio, and other compressed files
All others 00010002 zlib 0000001E 00010000 00000003 (ignorecase + absolute) compress all global_cached.psarc contains TOC dupes!!! (icon0.png)
Ratchet & Clank. A Crack in Time *_uncached.psarc 00010003 zlib 0000001E 00010000 00000003 (ignorecase + absolute) per-file compress Contains not-compressed audio, and other compressed files
All others 00010003 zlib 0000001E 00010000 00000003 (ignorecase + absolute) compress all
Ratchet & Clank. Into the Nexus global_cached.psarc
level_cached.psarc
00010003 zlib 0000001E 00010000 00000003 (ignorecase + absolute) per-file compress Contains not-compressed files, and other compressed files
global_uncached.psarc
global_sound_**.psarc
00010003 zlib 0000001E 00010000 00000003 (ignorecase + absolute) per-file compress Contains not-compressed audio, and other compressed files
All others 00010003 zlib 0000001E 00010000 00000003 (ignorecase + absolute) compress all
The Last Of Us All ? 00010003 zlib 0000001E 00010000 00000000 (no flags)
The Shoot All 00010004 zlib 0000001E 00010000 00000002 (absolute)
Time and Eternity
Uncharted 2 All ? 00010003 zlib 0000001E 00010000 00000000 (no flags)
Uncharted 3 All 00010003 zlib 0000001E 00010000 00000000 (no flags)
Warhawk ?
White Knight Chronicles II All .psarc 00010003 zlib 0000001E 00010000 00000002 (absolute) no compress Contains not-compressed audio
All .psarc.sdat 00010003 zlib 0000001E 00010000 00000002 (absolute) compress all Default compression, NPD signed psarcs
Wipeout HD Fury data01.psarc 00010003 zlib 0000001E 00010000 00000003 (ignorecase + absolute) no compress Contains not-compressed audio
All others 00010003 zlib 0000001E 00010000 00000003 (ignorecase + absolute) compress all
Template:Icon content ps4
Game/App info PSARC Header info Compression
Method
Notes
TITLE PSARC files Version
(offset 0x04)
Compression
(offset 0x08)
TOC entry size
(offset 0x10)
Block Size
(offset 0x18)
Flags
(offset 0x1C)
No Man's Sky *.pak 00010004 zlib 0000001E 00010000 00000001 (ignorecase) all compress? .PAK files are actually PSARC files, see https://www.youtube.com/watch?v=xlJfy1dvmGI there is a mistake in the video
VidZone vidzone*.db.psarc 00010004 zlib 0000001E 00010000 00000000 (no flags) compress all Vidzone is a web service, the .psarc is hosted in the web
Template:Icon content psvita
Game/App info PSARC Header info Compression
Method
Notes
TITLE PSARC files Version
(offset 0x04)
Compression
(offset 0x08)
TOC entry size
(offset 0x10)
Block Size
(offset 0x18)
Flags
(offset 0x1C)
Gravity Rush Gravite.psarc 00010004 zlib 0000001E 00010000 00000000 (no flags)
  • Other games that probably uses PSARC's
    • Uncharted 1?
    • Killzone colletion ?
    • God of War. Collection ?
    • other Motorstorms ?

Template:File Formats