Rayman 2 & Rayman Rush PS1 .DAT

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
Droolie
Posts: 7
Joined: Wed Feb 25, 2015 3:28 pm

Rayman 2 & Rayman Rush PS1 .DAT

Post by Droolie »

Hi ZenHAX,

I am working on a level viewer for the 3D Rayman games, and this time I am trying to read the Rayman 2 PS1 .DAT bigfile.
I uploaded the first ~30MB here: https://mega.nz/#!8Sx3kAoK!sxKRNp_MsP_k5RZTpY5tqdaP4tw2_p6X1bMAHO3vA3Y

I've figured out part of the format, but got stuck. What I've figured out looks like this:

Code: Select all

block {
   DWORD - sz_decompressed
   DWORD - sz_compressed
   BYTE[sz_compressed] - Compressed with LZO1X
   (Optional) {
      DWORD - 0x0 (End of file?)
      (Optional) Padding. If there is more than one 0x0 dword in succession, the next block will start at a multiple of 0x800.
   }
}
Repeat.

But!
The padding can also be 0xFFFFFFFF instead of 0x0. This happens at 0x0E135F.
The format looks different after that (at 0x0E1800), and I can't figure it out.

Please take a look at the file, I would love to view the levels of this (and the PS1 games that share the same format), and I can only do it with your help. :)

Thanks,
Droolie
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Rayman 2 & Rayman Rush PS1 .DAT

Post by aluigi »

It's a sequence of chunked files, but the index (TOC) is probably at the end or in another file.
Can you provide the last part of the file and check if there is a possible index file somewhere?
Droolie
Posts: 7
Joined: Wed Feb 25, 2015 3:28 pm

Re: Rayman 2 & Rayman Rush PS1 .DAT

Post by Droolie »

aluigi wrote:It's a sequence of chunked files, but the index (TOC) is probably at the end or in another file.
Can you provide the last part of the file and check if there is a possible index file somewhere?

I've checked the other files but didn't find any index, unless it's hardcoded in the executable (if it is, there are no filenames in it). The end of the file doesn't seem to contain it either:
combin_end.zip

I also uploaded the full COMBIN.DAT file here, in case you need it: https://mega.nz/#!5ewTFKhQ!Apz6tE4vzHx2 ... ziTSDpjOmk
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Rayman 2 & Rayman Rush PS1 .DAT

Post by aluigi »

Eh no, there is nothing useful at the end of the file.

Unfortunately without the index with the information you can do almost nothing.

For example this script dumps the initial files but then it finds another type of file that can't be handled and fails, it's necessary to know offset and size (at least size) of all the archived files:

Code: Select all

comtype lzo1x
for
    log MEMORY_FILE 0 0
    append
    for
        get CHUNK_SIZE long
        if CHUNK_SIZE == 0
            break
        endif
        get CHUNK_ZSIZE long
        savepos OFFSET
        clog MEMORY_FILE OFFSET CHUNK_ZSIZE CHUNK_SIZE
        goto CHUNK_ZSIZE 0 SEEK_CUR
    next
    append
    get SIZE asize MEMORY_FILE
    log "" 0 SIZE MEMORY_FILE
next
deton24
Posts: 5
Joined: Fri Feb 02, 2018 12:09 am

Re: Rayman 2 & Rayman Rush PS1 .DAT

Post by deton24 »

Just FYI.

Looks like Nova Extractor finds some files inside Combin.dat.
Few SWF files (30/40MB) with "FWS" header, few small jp2 files, and probably false positives with psb and "##" header and too big files, and some riffs with riff header (corrupted, too big and mixed with game text on the beginning).
Psound extracts SFXes, but not dialogues (though some can be found vert distorted by opening in Audacity via RAW import and VOX ADCM).

Luigi's script extracts 6 files: cl5, dc5, dat, dll (with Sony text written).