PlayStation archive (PSARC): Difference between revisions

From PS3 Developer wiki
Jump to navigation Jump to search
Line 128: Line 128:
{| class="wikitable"
{| class="wikitable"
|-
|-
! colspan="2" | Game !! colspan="4" | PSARC's !! rowspan="2" | Notes
! colspan="2" | Game !! colspan="5" | PSARC's !! rowspan="2" | Notes
|-
|-
! TITLE_ID !! TITLE !! Version !! Compression !! Block Size !! Flags
! TITLE_ID !! TITLE !! Version !! Compression !! TOC entry size !! Block Size !! Flags
|-
|-
|  || Uncharted 2 ||  ||  ||  ||  ||  
|  || Uncharted 2 ||  ||  ||  ||  ||  ||  
|-
|-
|  || The Last Of Us ||  ||  ||  ||  ||  
|  || The Last Of Us ||  ||  ||  ||  ||  ||  
|-
|-
|  || Killzone 3 ||  ||  ||  ||  ||  
|  || Killzone 3 ||  ||  ||  ||  ||  ||  
|-
|-
|  || God of War. Ascension ||  ||  ||  ||  ||  
|  || God of War. Ascension ||  ||  ||  ||  ||  ||  
|-
|-
|  || Mass Effect 3 || || || || ||  
|  || Mass Effect 3 || 00010004 (v1.4) || lzma || 1E || 10000 || 3 || all directories and files are in capitals (created with --ignorecase)<br />uses full paths (created with --absolute)
|-
|-
|  || Ape Escape || 00010004 (v1.4) || zlib || 10000 || 2 ||  
|  || Ape Escape || 00010004 (v1.4) || zlib || 1E || 10000 || 2 || uses full paths (created with --absolute)
|-
|-
|  || Ni No Kuni ||  ||  ||  ||  || .psarc file extensions renamed to .adat
|  || Ni No Kuni ||  ||  ||  ||  ||  || .psarc file extensions renamed to .adat
|-
|-
|  || Motorstorm. Pacific Rift ||  ||  ||  ||  ||  
|  || Motorstorm. Pacific Rift ||  ||  ||  ||  ||  ||  
|-
|-
|  || Warhawk ||  ||  ||  ||  ||  
|  || Warhawk ||  ||  ||  ||  ||  ||  
|}
|}



Revision as of 00:21, 5 June 2014

Description

PlayStation ARChive is a container that allows subfolders and per-file compression using zlib or lzma with 9 compression levels

Structure

See Discussion page

Header

Table 1

Table 2

Etc

PSARC Flags
Hexadecimal
(big endian)
Decimal Binary
(flags)
Flag Name Notes
00 00 00 01 1 00000000 00000000 00000000 00000001
00 00 00 02 2 00000000 00000000 00000000 00000010
00 00 00 04 4 00000000 00000000 00000000 00000100
00 00 00 08 8 00000000 00000000 00000000 00001000
00 00 00 10 16 00000000 00000000 00000000 00010000
00 00 00 20 32 00000000 00000000 00000000 00100000
00 00 00 40 64 00000000 00000000 00000000 01000000
00 00 00 80 128 00000000 00000000 00000000 10000000
  • Flags are stored in the header as a big endian number, and defines the characteristics and structure of the archive when it was created

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

Command line versions

PSARC Extractor

By Insomniac @ xentax forums, download link: 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
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)

Total Commander plugin

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

GUI versions

PS3 Games or Apps using PSARC files

Game PSARC's Notes
TITLE_ID TITLE Version Compression TOC entry size Block Size Flags
Uncharted 2
The Last Of Us
Killzone 3
God of War. Ascension
Mass Effect 3 00010004 (v1.4) lzma 1E 10000 3 all directories and files are in capitals (created with --ignorecase)
uses full paths (created with --absolute)
Ape Escape 00010004 (v1.4) zlib 1E 10000 2 uses full paths (created with --absolute)
Ni No Kuni .psarc file extensions renamed to .adat
Motorstorm. Pacific Rift
Warhawk
  • Other games that probably uses PSARC's
    • Uncharted 1?, and 3?
    • Killzone colletion ?
    • God of War. III ?
    • God of War. Collection ?
    • other Motorstorms ?