Important information: this site is currently scheduled to go offline indefinitely by end of the year.

LZS compression

The Original Forum. Game archives, full of resources. How to open them? Get help here.
Post Reply
alon
mega-veteran
mega-veteran
Posts: 163
Joined: Mon Nov 29, 2010 10:38 am
Has thanked: 32 times
Been thanked: 2 times

LZS compression

Post by alon »

Hello, All!
Please help extract pac file.
I can't able to extract and uncompress from this game with quickbms.
4 Byte Header "add."
Last edited by alon on Fri Apr 13, 2012 7:04 pm, edited 1 time in total.
chrrox
Moderator
Posts: 2602
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1422 times

Re: LZS compression

Post by chrrox »

What game is this
WRS
ultra-veteran
ultra-veteran
Posts: 603
Joined: Fri Nov 06, 2009 12:13 am
Has thanked: 74 times
Been thanked: 137 times

Re: LZS compression

Post by WRS »

xentax is so distracting :[

anyway, heres a script which can recursively get every filename from every "add" block. theres only 2 levels in your sample, BUT IT CAN SUPPORT MORE :wink:

to actually dump stuff, a check for the "lzs" blockid needs to be added to the if statement. not familiar with lzs so the data i did dump i had no idea was correct.

Code: Select all

# WRS, xentax.com
# quickbms script (wip)

math POINTER = 0
callfunction ProcessBlock

startfunction ProcessBlock
  goto POINTER
  savepos BASEPOS
  getdstring BLOCKID 4

  if BLOCKID == "add"

    get UNKNOWN long
    get HEADSIZE long
    get HEADERS long
    get UNKNOWN long
    get FILESIZE long
    get NULL long
    get NULL long

    for h = 1 to HEADERS
      get POINTER long
      get SIZE long
      get NULL long
      get NULL long
      get NAME string
      padding 4
      savepos CHEAD
      math POINTER += BASEPOS
      print "Processing: %NAME% @ %POINTER%"

      callfunction ProcessBlock
      goto CHEAD
    next h

  #elif BLOCKID == "lzs"
#    print "Awesome! But not ready to dump yet!"

  else
    print "Not sure how to handle %BLOCKID%"
  endif

endfunction
signing off for a few hours.
Useful tool links:
alon
mega-veteran
mega-veteran
Posts: 163
Joined: Mon Nov 29, 2010 10:38 am
Has thanked: 32 times
Been thanked: 2 times

Re: LZS compression

Post by alon »

chrrox wrote:What game is this
Pac file from Shinkon Gattai Godannar PS2
alon
mega-veteran
mega-veteran
Posts: 163
Joined: Mon Nov 29, 2010 10:38 am
Has thanked: 32 times
Been thanked: 2 times

Re: LZS compression

Post by alon »

WRS wrote:xentax is so distracting :[

anyway, heres a script which can recursively get every filename from every "add" block. theres only 2 levels in your sample, BUT IT CAN SUPPORT MORE :wink:

to actually dump stuff, a check for the "lzs" blockid needs to be added to the if statement. not familiar with lzs so the data i did dump i had no idea was correct.

Code: Select all

# WRS, xentax.com
# quickbms script (wip)

math POINTER = 0
callfunction ProcessBlock

startfunction ProcessBlock
  goto POINTER
  savepos BASEPOS
  getdstring BLOCKID 4

  if BLOCKID == "add"

    get UNKNOWN long
    get HEADSIZE long
    get HEADERS long
    get UNKNOWN long
    get FILESIZE long
    get NULL long
    get NULL long

    for h = 1 to HEADERS
      get POINTER long
      get SIZE long
      get NULL long
      get NULL long
      get NAME string
      padding 4
      savepos CHEAD
      math POINTER += BASEPOS
      print "Processing: %NAME% @ %POINTER%"

      callfunction ProcessBlock
      goto CHEAD
    next h

  #elif BLOCKID == "lzs"
#    print "Awesome! But not ready to dump yet!"

  else
    print "Not sure how to handle %BLOCKID%"
  endif

endfunction
signing off for a few hours.

I appreciate your effort very much.

I'm very sorry, there is an error message on the monitor.
Image
Last edited by alon on Sat Jan 01, 2011 7:19 pm, edited 1 time in total.
chrrox
Moderator
Posts: 2602
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1422 times

Re: LZS compression

Post by chrrox »

What do you want to get out of this game? the character the sounds?
alon
mega-veteran
mega-veteran
Posts: 163
Joined: Mon Nov 29, 2010 10:38 am
Has thanked: 32 times
Been thanked: 2 times

Re: LZS compression

Post by alon »

chrrox wrote:What do you want to get out of this game? the character the sounds?
I want to character file.
WRS
ultra-veteran
ultra-veteran
Posts: 603
Joined: Fri Nov 06, 2009 12:13 am
Has thanked: 74 times
Been thanked: 137 times

Re: LZS compression

Post by WRS »

alon wrote:I'm very sorry, there is an error message on the monitor.
please read:
WRS wrote:to actually dump stuff, a check for the "lzs" blockid needs to be added to the if statement. not familiar with lzs so the data i did dump i had no idea was correct.
i dont know how to decompress from the pointers. the missing blockids are deliberate.. as i said

anyone who can recognize lzs, go right ahead and see what you make of it
Useful tool links:
chrrox
Moderator
Posts: 2602
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1422 times

Re: LZS compression

Post by chrrox »

its most likely some custom ps2 lzss a lot of games did this its a real pain and thats why a lot of games were never looked into.
I tried quickbms but it does not seem to be anything implemented in it.
The structure seems to be
0x20 LZS header -- says its compressed
then the file name as a null terminated string
flag01 short
flag02 short
uncompressed size long
flag03 short
flag04 short
compressed size including header long
then i assume the data starts here.
I tried everything in quickbms using the bat file method and nothing gave readable data.
So the only way you will get those ps2 models is with a 3d ripper
or dump the model files from ram then reverse the model format.
alon
mega-veteran
mega-veteran
Posts: 163
Joined: Mon Nov 29, 2010 10:38 am
Has thanked: 32 times
Been thanked: 2 times

Re: LZS compression

Post by alon »

Oops! Sorry!
It's a hard nut to crack.
chrrox
Moderator
Posts: 2602
Joined: Sun May 18, 2008 3:01 pm
Has thanked: 57 times
Been thanked: 1422 times

Re: LZS compression

Post by chrrox »

its impossible to crack unless you reverse a ps2 emulator or you can rip the models the way i said.
alon
mega-veteran
mega-veteran
Posts: 163
Joined: Mon Nov 29, 2010 10:38 am
Has thanked: 32 times
Been thanked: 2 times

Re: LZS compression

Post by alon »

Image
PCSX2 sstates *.p2s file extracted the eeMemory.bin
I got some lcv & tim2 files.
I don't know where is model section.
Here's are some lcv & tim2 files.
Last edited by alon on Fri Apr 13, 2012 7:04 pm, edited 2 times in total.
User avatar
kingfisher13
veteran
Posts: 83
Joined: Mon Jul 26, 2010 7:32 pm
Has thanked: 8 times
Been thanked: 3 times

Re: LZS compression

Post by kingfisher13 »

!!!!!!!!!!!!!!

This is awesome!!!
I am trying to rip the models of the mechs from this game, I will attempt to locate my copy of the game and look at the file format. Lets keep this thread alive, this game has some awesome models, especially mecha models.
alon
mega-veteran
mega-veteran
Posts: 163
Joined: Mon Nov 29, 2010 10:38 am
Has thanked: 32 times
Been thanked: 2 times

Re: LZS compression

Post by alon »

kingfisher13 wrote:!!!!!!!!!!!!!!

This is awesome!!!
I am trying to rip the models of the mechs from this game, I will attempt to locate my copy of the game and look at the file format. Lets keep this thread alive, this game has some awesome models, especially mecha models.
Thanks kingfisher13 interest in my problem.
viewtopic.php?f=21&t=8341
viewtopic.php?f=16&t=7786
I am turning to you for help
User avatar
kingfisher13
veteran
Posts: 83
Joined: Mon Jul 26, 2010 7:32 pm
Has thanked: 8 times
Been thanked: 3 times

Re: LZS compression

Post by kingfisher13 »

It would be better to use 3d Ripper DX to rip the models from the game, maybe someone could help us out with that?
I know it can be done, it has been done before. The problem usually with that is the models come out skewed.

EDIT:
I would also try to contact the owner of this site:

Code: Select all

http://ps23dformat.wikispaces.com/How+To+Extract+Models
He is working on ripping models from PS2 games, using hex editor. I have contacted him already about this game, maybe he can help.
Post Reply