Port Royale 2 .cpr

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
makc_ar
Posts: 1193
Joined: Sun Aug 17, 2014 7:27 pm

Port Royale 2 .cpr

Post by makc_ar »

Game: http://store.steampowered.com/app/12470/Port_Royale_2
Image
Image

Format Specifications Patrician game: http://wiki.xentax.com/index.php/Patrician

Code: Select all

char {16}    - Header (ASCARON_ARCHIVE ) 
char {4}     - Version (V0.9)
byte {12}    - null
uint32 {4}   - Directory Length [-16] (including all these archive header fields and the 9 null padding)
uint32 {4}   - Directory Length [-15] (not including all these archive header fields or the padding)
uint32 {4}   - Number Of Files
uint32 {4}   - Unknown

// for each file

uint32 {4}   - Data Offset
uint32 {4}   - Raw File Length
uint32 {4}   - Unknown (1)
char {X}     - Filename
byte {1}     - null Filename Terminator

byte {9}     - null
byte {X}     - File Data

Someone script unpack/repack for quickbms?
Example: https://mega.nz/#!khQlgCyQ!O4ZvYaxi4L1t ... x1HT0CPsw0
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Port Royale 2 .cpr

Post by aluigi »

I have fixed the xentax script (and many others) that was available on my website:
http://aluigi.org/bms/xentax_cs/CPR_ASCARON.bms
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Port Royale 2 .cpr

Post by aluigi »

Anyway I suspect that the script is incomplete or there is something missing because pr2_arcd.cpr is only partially covered.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Port Royale 2 .cpr

Post by aluigi »

Confirmed, the script is incomplete... not the first time the xentax_cs scripts are incomplete...

This is my script:
http://aluigi.org/bms/ascaron_archive.bms
makc_ar
Posts: 1193
Joined: Sun Aug 17, 2014 7:27 pm

Re: Port Royale 2 .cpr

Post by makc_ar »

Thanks a lot aluigi!