Darkwatch PS2 PCK: Difference between revisions
Jump to navigation
Jump to search
(anh con may cung voi nhin nha) |
imported>Dinoguy1000 m (Reverted edits by 37.59.80.67 (talk) to last revision by Mr.Mouse) |
||
| Line 1: | Line 1: | ||
== PCK == | |||
* ''' Format Type ''': Archive <br> | |||
* ''' [http://en.wikipedia.org/wiki/Endianness Endian Order] ''': Little Endian <br> | |||
=== Format Specifications === | |||
<tt><b> | |||
<font color="blue"> ''' // FILE DATA ''' </font> <br> | |||
: <font color="blue"> ''' // for each file ''' </font> <br> | |||
:: byte {X} - File Data <br> | |||
<br> | |||
<font color="blue"> ''' // DIRECTORY HEADER ''' </font> <br> | |||
: uint32 {4} - Number Of Files <font color="purple">(including padding files and this 32-byte header)</font> <font color="purple">(64)</font> <br> | |||
: uint32 {4} - Number Of Files <br> | |||
: uint32 {4} - Number Of Files <font color="purple">(including padding files)</font> <font color="purple">(63)</font> <br> | |||
: byte {12} - null <br> | |||
: uint64 {8} - Padding <font color="purple">(all 205's)</font> <br> | |||
<br> | |||
<font color="blue"> ''' // FILES DIRECTORY ''' </font> <br> | |||
: <font color="blue"> ''' // for each file ''' </font> <br> | |||
:: uint64 {8} - <font color="red"> '' Hash? '' </font> <br> | |||
:: uint32 {4} - File Offset <br> | |||
:: uint32 {4} - File Length <br> | |||
<br> | |||
<font color="blue"> ''' // PADDING ''' </font> <br> | |||
: <font color="blue"> ''' // for all padding files ''' </font> <br> | |||
:: uint64 {8} - null <br> | |||
:: uint64 {8} - Padding <font color="purple">(all 205's)</font> <br> | |||
<br> | |||
<font color="blue"> ''' // FILENAME DIRECTORY ''' </font> <br> | |||
: <font color="blue"> ''' // for each file ''' </font> <br> | |||
:: uint32 {4} - <font color="red"> '' Hash? '' </font> <br> | |||
:: uint32 {4} - Filename Length <br> | |||
:: char {X} - Filename <br> | |||
<br> | |||
<font color="blue"> ''' // ARCHIVE FOOTER ''' </font> <br> | |||
: char {X} - Timestamp String <br> | |||
: byte {1} - null Timestamp String Terminator <br> | |||
: uint32 {4} - <font color="red"> '' Unknown '' </font> <br> | |||
: uint32 {4} - <font color="red"> '' Unknown '' </font> <br> | |||
: uint32 {4} - Directory offset <br> | |||
: uint32 {4} - <font color="red"> '' Unknown '' </font> <br> | |||
</b></tt> | |||
=== MultiEx BMS === | |||
<pre>ImpType StandardTail ; | |||
GoTo EOF 0 ; | |||
SavePos END 0 ; | |||
Math END -= 7 ; | |||
GoTo END 0 ; | |||
SavePos TailOffOff 0 ; | |||
Get TailOffSet Long 0 ; | |||
GoTo TailOffSet 0 ; | |||
Get DIREntries Long 0 ; | |||
Get FileNum Long 0 ; | |||
Get U1 Long 0 ; | |||
Get U2 Long 0 ; | |||
SavePos FNOffset 0 ; | |||
Math DIREntries *= 16 ; | |||
Math FNOffset += DIREntries ; | |||
Set C Long 0 ; | |||
Do ; | |||
Get U4 Long 0 ; | |||
Get U5 Long 0 ; | |||
SavePos FOO 0 ; | |||
Get FO Long 0 ; | |||
SavePos FSO 0 ; | |||
Get FS Long 0 ; | |||
SavePos FP 0 ; | |||
If U5 <> 0 ; | |||
GoTo FNOffset 0 ; | |||
Get U6 Long 0 ; | |||
Get NameSize Long 0 ; | |||
GetDString FName NameSize 0 ; | |||
SavePos FNOffset 0 ; | |||
Math C += 1 ; | |||
Log FName FO FS FOO FSO ; | |||
GoTo FP 0 ; | |||
EndIf ; | |||
While C < FileNum ;</pre><br><br> | |||
=== Notes and Comments === | |||
None | |||
=== Supported Programs === | |||
* [[MultiEx Commander|MultiEx Commander]] | |||
Revision as of 05:42, 26 June 2012
PCK
- Format Type : Archive
- Endian Order : Little Endian
Format Specifications
// FILE DATA
- // for each file
- byte {X} - File Data
- byte {X} - File Data
// DIRECTORY HEADER
- uint32 {4} - Number Of Files (including padding files and this 32-byte header) (64)
- uint32 {4} - Number Of Files
- uint32 {4} - Number Of Files (including padding files) (63)
- byte {12} - null
- uint64 {8} - Padding (all 205's)
// FILES DIRECTORY
- // for each file
- uint64 {8} - Hash?
- uint32 {4} - File Offset
- uint32 {4} - File Length
- uint64 {8} - Hash?
// PADDING
- // for all padding files
- uint64 {8} - null
- uint64 {8} - Padding (all 205's)
- uint64 {8} - null
// FILENAME DIRECTORY
- // for each file
- uint32 {4} - Hash?
- uint32 {4} - Filename Length
- char {X} - Filename
- uint32 {4} - Hash?
// ARCHIVE FOOTER
- char {X} - Timestamp String
- byte {1} - null Timestamp String Terminator
- uint32 {4} - Unknown
- uint32 {4} - Unknown
- uint32 {4} - Directory offset
- uint32 {4} - Unknown
MultiEx BMS
ImpType StandardTail ; GoTo EOF 0 ; SavePos END 0 ; Math END -= 7 ; GoTo END 0 ; SavePos TailOffOff 0 ; Get TailOffSet Long 0 ; GoTo TailOffSet 0 ; Get DIREntries Long 0 ; Get FileNum Long 0 ; Get U1 Long 0 ; Get U2 Long 0 ; SavePos FNOffset 0 ; Math DIREntries *= 16 ; Math FNOffset += DIREntries ; Set C Long 0 ; Do ; Get U4 Long 0 ; Get U5 Long 0 ; SavePos FOO 0 ; Get FO Long 0 ; SavePos FSO 0 ; Get FS Long 0 ; SavePos FP 0 ; If U5 <> 0 ; GoTo FNOffset 0 ; Get U6 Long 0 ; Get NameSize Long 0 ; GetDString FName NameSize 0 ; SavePos FNOffset 0 ; Math C += 1 ; Log FName FO FS FOO FSO ; GoTo FP 0 ; EndIf ; While C < FileNum ;
Notes and Comments
None