DECOMPRESS SCRIPT Vrally 2 (dc/pc)

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
domingo
Posts: 83
Joined: Fri Aug 19, 2016 11:53 am

DECOMPRESS SCRIPT Vrally 2 (dc/pc)

Post by domingo »

I need decompress this script for I can to edit the text.

Image

SCRIPT.rar


I think already posted everything I need to translate into Spanish V-Rally 2 Dreamcast versión



Thanks
Last edited by domingo on Wed Aug 24, 2016 10:11 pm, edited 1 time in total.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: DECOMPRESS SCRIPT

Post by aluigi »

Unfortunately doesn't exist a real solution because I don't know what's the algorithm.
The compression is similar to LBALZSS2 but it's not the same and so the decompressed data is wrong.
This is a test script to show you what I mean:

Code: Select all

comtype LBALZSS2
get SIZE long
savepos OFFSET
get ZSIZE asize
math ZSIZE - OFFSET
get NAME basename
string NAME + ".txt"
clog NAME OFFSET ZSIZE SIZE
domingo
Posts: 83
Joined: Fri Aug 19, 2016 11:53 am

Re: DECOMPRESS SCRIPT

Post by domingo »

Aluigi thank you very much, I think I can settle me, but I can not reimport.

I get the option to skip, cancel or force, I write force, the program says it has been re-imported, but open the hex file and still the same.
This is the problem?

It could Fixes for reimport?

You could look at my other post, if they have solution?

IPMS audio header and compress texture.

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

Re: DECOMPRESS SCRIPT

Post by aluigi »

Reimporting what?!
The decompressed data is wrong and even if it was correct there is no recompression function for that algorithm.
domingo
Posts: 83
Joined: Fri Aug 19, 2016 11:53 am

Re: DECOMPRESS SCRIPT

Post by domingo »

I understand

I thought that the text could compress once edited
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: DECOMPRESS SCRIPT

Post by aluigi »

That text is WRONG. It's NOT the real original text.
domingo
Posts: 83
Joined: Fri Aug 19, 2016 11:53 am

Re: DECOMPRESS SCRIPT

Post by domingo »

This the file original with all scripts,the file is zap.

SCRIPTS.rar


Only I caught one of they
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: DECOMPRESS SCRIPT

Post by aluigi »

I'm back from additional tests made also with Little Big Adventure 2 and it's a problem of the decompression algorithm that has an additional instruction which is not used by the games. I have no idea where I got that additional part of code but if it's there it means it was in the code I reverse engineered.
Anyway now the decompression works at 100% on both LBA and Vrally2 but the code is not available in quickbms.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: DECOMPRESS SCRIPT

Post by aluigi »

Here we go, no need to wait quickbms 0.7.7:

Code: Select all

get SIZE long
savepos OFFSET
get ZSIZE asize
math ZSIZE - OFFSET
get NAME basename
string NAME + ".txt"
# this is the fixed LBALZSS* algorithm that will be fixed in quickbms 0.7.7
set MEMORY_FILE binary "\x55\x89\xe5\x57\x56\x53\x83\xec\x0c\x8b\x4d\x08\x8b\x45\x0c\x01\xc8\x89\x45\xf0\x8b\x45\x10\x03\x45\x14\x89\x45\xec\x8b\x45\x10\x3b\x45\xec\x73\x73\x3b\x4d\xf0\x73\x6e\x8d\x71\x01\x8a\x09\xc6\x45\xea\x08\x88\x4d\xeb\xf6\x45\xeb\x01\x74\x15\x3b\x75\xf0\x73\x57\x3b\x45\xec\x73\x52\x8a\x16\x8d\x4e\x01\x40\x88\x50\xff\xeb\x3b\x8d\x4e\x02\x3b\x4d\xf0\x77\x3f\x0f\xb6\x56\x01\x0f\xb6\x36\xc1\xe2\x08\x09\xf2\x31\xf6\x89\xd7\x0f\xb7\xd2\x83\xe7\x0f\x03\x7d\x18\xf7\xd2\xc1\xfa\x04\x01\xc2\x39\xfe\x7f\x0f\x3b\x45\xec\x73\x16\x8a\x1c\x32\x40\x46\x88\x58\xff\xeb\xed\xd0\x6d\xeb\xfe\x4d\xea\x74\x8c\x89\xce\xeb\x9e\x2b\x45\x10\x83\xc4\x0c\x5b\x5e\x5f\x5d\xc3"
comtype calldll "MEMORY_FILE 0 cdecl RET #INPUT# #INPUT_SIZE# #OUTPUT# #OUTPUT_SIZE# 2"
clog NAME OFFSET ZSIZE SIZE
domingo
Posts: 83
Joined: Fri Aug 19, 2016 11:53 am

Re: DECOMPRESS SCRIPT

Post by domingo »

Perfect, now everything is in order
domingo
Posts: 83
Joined: Fri Aug 19, 2016 11:53 am

Re: DECOMPRESS SCRIPT

Post by domingo »

Aluigi, there is some form to return to compress the file zap, once have the scripts edited?

I tried re-importing but not supported

Perhaps in the next versión quickbms?Or other method?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: DECOMPRESS SCRIPT

Post by aluigi »

To disable the compression it's enough to set the decompressed size field (the first 32bit value) like the compressed size.
But there is no way to do everything automatic, you need a rebuilder.
domingo
Posts: 83
Joined: Fri Aug 19, 2016 11:53 am

Re: DECOMPRESS SCRIPT Vrally 2 (dc/pc)

Post by domingo »

Hello Aluigi, I have edited one of the Zap files, but can not find anyone to create a rebuilder.

You could create a rebuilder?


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

Re: DECOMPRESS SCRIPT Vrally 2 (dc/pc)

Post by aluigi »

no
domingo
Posts: 83
Joined: Fri Aug 19, 2016 11:53 am

Re: DECOMPRESS SCRIPT Vrally 2 (dc/pc)

Post by domingo »

Okay thanks anyway