Format:CRI CPK
| Developer | CRI Middleware |
|---|---|
| Magic | CPK (43 50 4B 20) |
| Extensions | .cpk, .awb (audio-bank variant) |
| Endianness | big (tables) |
| License | proprietary |
| On this wiki | Facts · Code · Notes · Topics |
CRI Middleware's generic archive (.cpk): magic 'CPK ' followed by an @UTF header table (CpkHeader) that points to TOC/ETOC/ITOC/GTOC tables listing files by name or by id; files may be compressed with CRI's 'CRILAYLA' scheme.
Identification
CPK (with trailing space) at offset 0, then four bytes of flags, a size, and an Format:CRI UTF table at 0x10 (the CpkHeader table, one row with fields such as the offsets and sizes of the other tables, the file count and the content offset). The file table (TOC) holds directory and file names, file offset (relative to the content offset), file size and extracted size; the ITOC variant addresses files by numeric id (used in audio banks). Different table names exist in the same file: CpkHeader, CpkTocInfo/TOC, CpkEtocInfo, CpkItocInfo, CpkGtocInfo: Unverified, listed from memory of CRI tooling; read the table names from the first @UTF's string pool of a sample.
In the audio-bank use (.awb that is a CPK, early CRI ADX2 titles such as Metal Gear Solid: Snake Eater 3D, Street Fighter X Tekken, Ace Combat Infinity) vgmstream reads CPK ITOC tables: DataL / DataH tables with Align, Files, FilesL, FilesH, ContentOffset, ItocOffset columns to find each waveform by id; the waveforms are HCA, ADX or CWAV files.
Compression: files with extracted size greater than stored size start with CRILAYLA (a small LZ77 variant that decompresses back to front): Unverified here.
Game use
Most Japanese engines load assets through the CRI file system from a bound CPK, with a virtual path prefix like /cri_bind/, which makes loose-file redirection possible by hooking the open function (see Library:CRIWARE).
Related
Format:CRI UTF table, Format:AFS2 (AWB).
Evidence & references
- vgmstream commit db77f98f405a45ad08df98aa444cae3848f95e6c (ISC):
src/meta/cpk.clines 8-60 (CPK magic, @UTF at 0x10, ITOC/DataL/DataH columns).