Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

Tool to recompress TIM2 Graphics file (PS2)

Featured Replies

  • Author
  • Localization

Mirakichi, posted Fri Nov 17, 2017 12:26 pm (30100)


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.
  • Author
  • Localization

Acewell, posted Sun Nov 19, 2017 12:41 am (30121)


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     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     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 :)
  • Author
  • Localization

episoder, posted Sun Nov 19, 2017 5:00 pm (30130)


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.
  • Author
  • Localization

Mirakichi, posted Tue Nov 21, 2017 5:31 pm (30174)


Thankyou very much Acewell!
  • Author
  • Localization

Mirakichi, posted Tue Nov 28, 2017 10:30 pm (30379)


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"
  • Author
  • Localization

Acewell, posted Tue Nov 28, 2017 11:45 pm (30381)


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. :)
  • Author
  • Localization

Mirakichi, posted Tue Nov 28, 2017 11:52 pm (30382)


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%
  • Author
  • Localization

Acewell, posted Sat Dec 02, 2017 12:30 am (30442)


i think swuforce is the guy you want, i don't deal with text. :)
  • Author
  • Localization

Mirakichi, posted Sat Dec 02, 2017 10:57 am (30454)


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.
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.