ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Fri Dec 15, 2017 12:13 pm

All times are UTC




Post new topic  Reply to topic  [ 11 posts ] 
Author Message
PostPosted: Fri Nov 17, 2017 12:26 pm 

Joined: Wed Jul 26, 2017 2:44 pm
Posts: 9
Hi guys, I would like to know if anyone can provide me a tool to recompress this graphic file https://drive.google.com/file/d/1xlxfBN ... p=drivesdk
This graphic is in TIM2 format, and is from Fatal Frame II PS2. This file originally after extracted from the game, is compressed, the header when the file is compressed is "LESS".
I use this tool to decompress it https://github.com/wmltogether/ZeroUnpa ... DeLESS.exe
I can view it with the "Texture Finder" and the "Optix Image Studio".
But the tool only decompress, but don't make the inverse process (compress TIM2 to LESS again)
I need recompress the file to insert it edited in the game. Later I will post a sample of this same file compressed.


Top
   
PostPosted: Fri Nov 17, 2017 5:03 pm 

Joined: Wed Jul 26, 2017 2:44 pm
Posts: 9
Link with the same LESS file above, but compressed https://drive.google.com/file/d/1FIptWt ... p=drivesdk


Top
   
PostPosted: Sun Nov 19, 2017 12:41 am 
User avatar

Joined: Fri Aug 08, 2014 1:06 am
Posts: 367
here is bms script to do the same as that "DeLESS.exe" :D
Code:
# script for QuickBMS http://aluigi.altervista.org/quickbms.htm

comtype lzss0
get NAME basename
string NAME + .LED
get TOTAL_SIZE long
idstring "LESS"
get UNK long
get CHUNKS long
get DATA_OFFSET long
get UNK2 long
get ZERO long
get TOTAL_ZSIZE long
for i = 0 < CHUNKS
    get SKIP short
    get CHUNK_ZSIZE short
    savepos TMP
    goto DATA_OFFSET
    do
        get CHECK byte
    while CHECK == 0
    goto -1 0 seek_cur
    savepos DATA_OFFSET
    append
    clog NAME DATA_OFFSET CHUNK_ZSIZE TOTAL_SIZE
    append
    math DATA_OFFSET + CHUNK_ZSIZE
    goto TMP
next i


and here is bms script to extract the tm2 textures from the LED file :)
Code:
# script for QuickBMS http://aluigi.altervista.org/quickbms.htm

get FILES long
goto 0x10
for i = 0 < FILES
    get OFFSET long
    savepos TMP
    goto OFFSET
    goto 0x10 0 seek_cur
    get SIZE long
    math SIZE + 0x10
    get NAME basename
    string NAME + _
    string NAME + i
    string NAME + .tm2
    log NAME OFFSET SIZE
    goto TMP
next i


both scripts should be available for reimport with Quickbms :)

_________________
Quickbms.com link thread
Search bms scripts


Top
   
PostPosted: Sun Nov 19, 2017 5:00 pm 

Joined: Fri Oct 27, 2017 7:36 pm
Posts: 34
seems like an illegal operation. may not work with the ps2 disc filesystem. reverse compression is not predictable. modifying a file changes the compressed size. if it's bigger it should only re-import the part that fits in the total_size of the original. with the rest potentially missing and failing to decompress correct in-engine. re-importing a file that compresses smaller should crash the compression algorithm on eof, reading further to fill the compressed total_size.


Top
   
PostPosted: Tue Nov 21, 2017 5:31 pm 

Joined: Wed Jul 26, 2017 2:44 pm
Posts: 9
Thankyou very much Acewell!


Top
   
PostPosted: Tue Nov 28, 2017 10:30 pm 

Joined: Wed Jul 26, 2017 2:44 pm
Posts: 9
Hi Acewell, I made some tests, the script reimport only the tm2 files to the LED file, but the reimport mode won't work to recompress the LED to LESS, and the LED file is in the original size.
Can you create a tool to recompress the LED?
The script says that the algorithm used is "lzss"


Top
   
PostPosted: Tue Nov 28, 2017 11:45 pm 
User avatar

Joined: Fri Aug 08, 2014 1:06 am
Posts: 367
sorry i don't make tools, if reimport doesn't work there is nothing more i can do. :(
that "deless" bms script was just for fun anyway. :)

_________________
Quickbms.com link thread
Search bms scripts


Top
   
PostPosted: Tue Nov 28, 2017 11:52 pm 

Joined: Wed Jul 26, 2017 2:44 pm
Posts: 9
Thanks, having the tm2 textures is
already a breakthrough. In
my translation of this game
is only missing the graphics,
the texts are almost 100%


Top
   
PostPosted: Fri Dec 01, 2017 9:23 pm 

Joined: Wed Jul 26, 2017 2:44 pm
Posts: 9
Hey Acewell, can you make for me an Text Exporter/Inserter for this file? https://drive.google.com/file/d/1MLDtrh ... p=drivesdk
You can see the texts using the Windhex and the table file included.


Top
   
PostPosted: Sat Dec 02, 2017 12:30 am 
User avatar

Joined: Fri Aug 08, 2014 1:06 am
Posts: 367
i think swuforce is the guy you want, i don't deal with text. :)

_________________
Quickbms.com link thread
Search bms scripts


Top
   
PostPosted: Sat Dec 02, 2017 10:57 am 

Joined: Wed Jul 26, 2017 2:44 pm
Posts: 9
He tried to make, but said "it's to complex". This text file uses absolute pointers, ex: 45DA01>01DA45 and so on... I've translated some texts using the Windhex, the problem that is are manys texts and many blocks, have blocks with + 200 pointers, are 66 blocks. If anyone make a exporter/inserter, will make easily the my translation.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 11 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