Talk:PlayStation archive (PSARC): Difference between revisions
Jump to navigation
Jump to search
(Created page with " ==PSARC structure notes== Debian psarc Kplugin structure. From Manuel Stahl (thymythos) @ http://opendesktop.org/content/show.php/PSARC+file+header?content=162745 <?xml ver...") |
mNo edit summary |
||
Line 31: | Line 31: | ||
'''Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F''' | '''Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F''' | ||
00000000 50 53 41 52 00 01 00 04 7A 6C 69 62 00 01 23 BA PSAR....zlib..#º | 00000000 <span style="background:#ff6666;">50 53 41 52</span> <span style="background:#66ff66;">00 01 00 04</span> <span style="background:#ffff66;">7A 6C 69 62</span> <span style="background:#6666ff;">00 01 23 BA</span> PSAR....zlib..#º | ||
00000010 00 00 00 1E 00 00 09 16 00 01 00 00 00 00 00 02 ................ | 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" | |||
|- | |||
! Offset !! Size !! Name !! Example !! Value (conversion) !! Notes | |||
|- | |||
| style="background-color:#ff6666;" | 0x00 || style="background-color:#ff6666;" | 0x04 || '''magic''' || 50 53 41 52 || PSAR || '''P'''lay'''S'''tation '''Ar'''chive | |||
|- | |||
| style="background-color:#66ff66;" | 0x04 || style="background-color:#66ff66;" | 0x04 || '''version''' || 00 01 00 04 || 01.04? || | |||
|- | |||
| style="background-color:#ffff66;" | 0x08 || style="background-color:#ffff66;" | 0x80 || '''compression type''' || 7A 6C 69 62 || zlib || zlib or lzma | |||
|- | |||
| style="background-color:#6666ff;" | 0x0C || style="background-color:#6666ff;" | 0x04 || '''table of content length''' || 00 01 23 BA || || | |||
|- | |||
| style="background-color:#dd00dd;" | 0x10 || style="background-color:#dd00dd;" | 0x04 || '''table of content entries size''' || 00 00 00 1E || || | |||
|- | |||
| style="background-color:#dddd00;" | 0x14 || style="background-color:#dddd00;" | 0x04 || '''number of entries''' || 00 00 09 16 || 2325+1 files || | |||
|- | |||
| style="background-color:#dddddd;" | 0x18 || style="background-color:#dddddd;" | 0x04 || '''block size''' || 00 01 00 00 || 65536 Bytes || block size per default is 64 KiB (65536 Bytes) | |||
|- | |||
| style="background-color:#d0000d;" | 0x1C || style="background-color:#d0000d;" | 0x04 || '''archive flags''' || 00 00 00 02 || - || | |||
|} |
Revision as of 04:23, 5 June 2014
PSARC structure notes
Debian psarc Kplugin structure. From Manuel Stahl (thymythos) @ http://opendesktop.org/content/show.php/PSARC+file+header?content=162745
<?xml version="1.0" encoding="UTF-8"?> <struct name="header"> <primitive name="magic" type="UInt32" /> <primitive name="version" type="UInt32" /> <primitive name="compression" type="UInt32" /> <primitive name="TOC length" type="UInt32" /> <primitive name="TOC entry size" type="UInt32" /> <primitive name="num_entries" type="UInt32" /> <primitive name="max block size" type="UInt32" /> <primitive name="archive flags" type="UInt32" /> <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> <array name="block sizes" length="num_entries"> <bitfield name="size" width="16" type="unsigned" /> </array> </struct>
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 |
---|---|---|---|---|---|
0x00 | 0x04 | magic | 50 53 41 52 | PSAR | PlayStation Archive |
0x04 | 0x04 | version | 00 01 00 04 | 01.04? | |
0x08 | 0x80 | compression type | 7A 6C 69 62 | zlib | zlib or lzma |
0x0C | 0x04 | table of content length | 00 01 23 BA | ||
0x10 | 0x04 | table of content entries size | 00 00 00 1E | ||
0x14 | 0x04 | number of entries | 00 00 09 16 | 2325+1 files | |
0x18 | 0x04 | block size | 00 01 00 00 | 65536 Bytes | block size per default is 64 KiB (65536 Bytes) |
0x1C | 0x04 | archive flags | 00 00 00 02 | - |