ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Wed Sep 19, 2018 2:49 am

All times are UTC




Post new topic  Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Help with LZSS encoder
PostPosted: Fri Aug 10, 2018 1:34 pm 

Joined: Wed Jul 26, 2017 2:44 pm
Posts: 17
Hi aluigi, I've found this LZSS encoder in the net https://drive.google.com/file/d/1Opgvyn ... p=drivesdk and it seems he is used by quickbms to support the LZSS algorithm. I want to use this encoder to recompress a graphics archive, this graphics archive is the "LESS20" file included in the link, and the "LESS20.LED" is the LESS20 decompressed.

I use an bms script to decompress the "LESS20", the encoder recompress the "LESS20.LED" to "LESS20" again, but when I edit the textures, same keeping the original size, the encoder do not recompress.

The source code of this encoder is included, I would like to know if can adapt this encoder to compress the LESS20.LED with the edited textures to LESS20 again, since it is used by quickbms.
In the link I've included two bms scripts that I use to decompress the LESS20 and to dump the textures and reimport them. Altough the encoder create the new encoded file, after decompress, the modified texture is no there.


Top
   
PostPosted: Sat Aug 11, 2018 1:14 am 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 8779
That format is a bit more complicated than just compressing and decompressing a file, there is a header and moreover chunks as visible in less.cpp.

Anyway I guess the problem of the script is the following:
Code:
    savepos TMP
    goto DATA_OFFSET
    do
        get CHECK byte
    while CHECK == 0
    goto -1 0 seek_cur
Replace it with "padding 16" and it may work (not tested, limited time)


Top
   
PostPosted: Sat Aug 11, 2018 12:41 pm 

Joined: Wed Jul 26, 2017 2:44 pm
Posts: 17
Hi, I've tried replace here, but I don't know where is the "padding" in the script to update with 32, can you update for me, please?


Top
   
PostPosted: Sat Aug 11, 2018 2:31 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 8779
eh???
Anyway I have seen your same topic on encode.ru and it was very confusing there too so probably it's better if you continue there.


Top
   
PostPosted: Sat Aug 11, 2018 4:47 pm 

Joined: Wed Jul 26, 2017 2:44 pm
Posts: 17
I am need so much of this tool, because this I've searched for a solution in 2 sites, here in the Zenhax and in the encode.ru. If this last site cannot help me, I can still count on your help?


Top
   
PostPosted: Tue Aug 14, 2018 1:13 pm 
Site Admin
User avatar

Joined: Wed Jul 30, 2014 9:32 pm
Posts: 8779
If it's a problem with quickbms or a script sure, but I don't think it's the case because there you want to rebuild a format (quickbms is good for extraction and reimporting, not building).

If it's a problem with that C code I prefer to stay away from it :D (time reasons)


Top
   
PostPosted: Tue Aug 14, 2018 3:50 pm 

Joined: Wed Jul 26, 2017 2:44 pm
Posts: 17
Hi aluigi, the Shelwien has show to me a new way to use the LZSS recompressor and is working perfectly with the modified textures in the game, but the quickbms and the script is a crucial tool to the reimport the textures before recompression and to decompress the LESS archives, so I am using the two tools in my translation, each one with an specific purpose.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 7 posts ] 

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