ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Thu Jun 21, 2018 8:23 pm

All times are UTC




Post new topic  Reply to topic  [ 271 posts ]  Go to page Previous 110 11 12 13 14
Author Message
PostPosted: Sun Mar 18, 2018 10:45 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 8306
Use the latest version of quickbms and then use reimport2.bat.
This new method has some limitations too, it depends by the format of the archive.


Top
   
PostPosted: Mon Mar 19, 2018 5:05 pm 

Joined: Sun Mar 18, 2018 10:04 pm
Posts: 2
aluigi wrote:
Use the latest version of quickbms and then use reimport2.bat.
This new method has some limitations too, it depends by the format of the archive.


The archive file is data.win. The file including parts for translation is STRG.txt.
Reimport2 doesn't allow to import bigger size file. :(


Top
   
PostPosted: Sat Apr 14, 2018 7:32 am 

Joined: Fri Dec 15, 2017 1:42 pm
Posts: 20
The tool threw me an error when I tried to decompress this data chunk with zlib:
Attachment:
zlib.rar [6.29 KiB]
Downloaded 23 times

while I can decompress it without problems through HexEdit.


Top
   
PostPosted: Sat Apr 14, 2018 2:57 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 8306
It works perfectly, remember that if you use "comtype zlib" you have also give a decompressed size value which is same/bigger than the real decompressed size, only zlib_noerror and unzip_dynamic do the job automatically:
Code:
comtype zlib_noerror # or unzip_dynamic
get SIZE asize
clog "" 0 SIZE SIZE


Top
   
PostPosted: Sat Apr 14, 2018 3:24 pm 

Joined: Fri Dec 15, 2017 1:42 pm
Posts: 20
I actually did specified an unzip size but it still gave me the error saying
"Error: the compressed zlib/deflate input is wrong or incomplete (-5)".

This is the code I'm using for the simple test:
Code:
comtype zlib
get Name basename
string Name + ".dcp"
get ZSize asize
set Size long ZSize
math Size * 20
clog Name 0 ZSize Size

However zlib_noerror does work though.


Top
   
PostPosted: Sat Apr 14, 2018 3:58 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 8306
Your script is correct but your dump is incomplete so the zlib library returns an error if the input is not perfect, in fact the zlib format has a crc at the end to check the input.
zlib_noerror simply ignores these errors and doesn't consider the decompressed size.


Top
   
PostPosted: Sat Apr 14, 2018 4:16 pm 

Joined: Fri Dec 15, 2017 1:42 pm
Posts: 20
aluigi wrote:
in fact the zlib format has a crc at the end to check the input.

I never knew that before. That will make sense. The file I'm dealing with has no fields about the compressed size or unzip size while HexEdit will crash if I decompress the whole compressed chunk directly, so I have to perform a decompression on every piece of data splitted by the zlib magic "\x78\x01" in this case. Guess I'd have to use the noerror method then.


Top
   
PostPosted: Sun Apr 15, 2018 4:46 am 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 8306
or you can just use offzip on the whole data/memory and it will do the job for you automatically, it's just its primary purpose :)
http://aluigi.altervista.org/mytoolz.htm#offzip


Top
   
PostPosted: Tue Apr 17, 2018 2:08 am 

Joined: Fri Dec 15, 2017 1:42 pm
Posts: 20
I was wondering if it would perform a complete decompression either method.


Top
   
PostPosted: Tue May 29, 2018 11:32 pm 
User avatar

Joined: Tue May 29, 2018 9:07 pm
Posts: 5
There's a bug with arrays. If you use a different name (not value, name) as accessor index from any names that were used to initialize it, it won't work properly.

To elaborate, this will work:
Code:
set ID long 0
set TEST[ID] string "pootis"
set POOTIS TEST[ID]


This will not work:
Code:
set ID long 0
set TEST[ID] string "pootis"
set IX long 0
set POOTIS TEST[IX]


Top
   
PostPosted: Wed May 30, 2018 9:57 am 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 8306
There are 2 bugs in those scripts:
- the variable with name pootis and the constant string "pootis" can't coexist
- that feature you are using there is not the (get/put/sort)array one, that's the experimental multi-dimensional array which works in a different way in which the multiple dimensions (VAR[X][Y][Z][W]) are possible by using a trick. long story short TEST[ID] and TEST[IX] are two completely different things


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 271 posts ]  Go to page Previous 110 11 12 13 14

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited