prehistorik VGA and CUR

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
AntonZab
Posts: 461
Joined: Thu Oct 01, 2015 5:03 pm

prehistorik VGA and CUR

Post by AntonZab »

prehistorik VGA and CUR files


Samples


https://drive.google.com/file/d/0B0oEDr ... sp=sharing
AntonZab
Posts: 461
Joined: Thu Oct 01, 2015 5:03 pm

Re: prehistorik VGA and CUR

Post by AntonZab »

No ideas?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: prehistorik VGA and CUR

Post by aluigi »

When you see no replies from me it usually means "no idea", yeah :)
AntonZab
Posts: 461
Joined: Thu Oct 01, 2015 5:03 pm

Re: prehistorik VGA and CUR

Post by AntonZab »

Sorry :D
einstein95
Posts: 64
Joined: Tue Sep 08, 2015 11:27 am

Re: prehistorik VGA and CUR

Post by einstein95 »

Code: Select all

# Uses info from Malvineous
# http://www.shikadi.net/moddingwiki/CUR_Format
get OFF short
for
   get SIZE long
   if SIZE = 0
      break
   endif
   get NAME string
   log NAME OFF SIZE
   math OFF + SIZE
next


Some of the files are compressed as noted on the wiki page:
Those files that are compressed start with a UINT32BE value storing the uncompressed size (in bytes), followed by the compressed data. The compression algorithm is LZSS with a length field of 2 bits, a distance field of 8 bits and a code field of 0=escape, 1=length/distance pair. The length-distance pair stores the length field first, followed by the distance field. Like the field storing the uncompressed size, all bits are decoded in big-endian order.

As far as is known, the .mat, .mdi and .pc1 files are always compressed, and all other files are uncompressed.


If aluigi wants to implement this into the script, then that's all the better.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: prehistorik VGA and CUR

Post by aluigi »

I have some problems to build the list of parameters for comtype lzss using these information.
By default lzss uses "12 4 2 2": EI, EJ, P and rless (the names of the first 3 come from the original implementation).
I tried some values but don't get any good result.
Maybe it's not that lzss?