started learning bms scripting more than a month ago. I kinda get the basics and can make script for simple zlib and some uncompressed game files, but I can't figure this out, the file extension said lzs, but it got no magic header and some of the data are visible in the hex editor. comp scanner end up with nothing or i'm not inputting the correct file size
need a little guidance
sample is attached below
[PSV] Uppers lzs
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: [PSV] Uppers lzs
It seems just the normal LZSS with the initializer character set to 0x00 instead of the usual 0x20:
Code: Select all
comtype lzss0
get SIZE long
savepos OFFSET
get ZSIZE asize
math ZSIZE - OFFSET
get NAME basename
clog NAME OFFSET ZSIZE SIZE
-
- Posts: 81
- Joined: Sun Jul 10, 2016 11:07 am
Re: [PSV] Uppers lzs
thank you very much, I'll take note of this script.
I feel so stupid, it was that simple hehe.. guess I still need a lot to learn
I feel so stupid, it was that simple hehe.. guess I still need a lot to learn
-
- Site Admin
- Posts: 12984
- Joined: Wed Jul 30, 2014 9:32 pm
Re: [PSV] Uppers lzs
Don't worry it's not that simple
Often it's just luck and experience, in this case I tried lzss and I got a readable good result but there were many 0x20 that didn't sound correct so it was the lzss0 compression (shortcut of lzss0 with 0x00 init).
Usually lzss can be recognized by the presence of readable text strings with 0xff bytes (that sort of 'y' you see with text/hex editor) at their beginning and in the middle.
That's valid also for other algorithm (lzo1x, lz4 and so on) but lzss is very diffused.
Often it's just luck and experience, in this case I tried lzss and I got a readable good result but there were many 0x20 that didn't sound correct so it was the lzss0 compression (shortcut of lzss0 with 0x00 init).
Usually lzss can be recognized by the presence of readable text strings with 0xff bytes (that sort of 'y' you see with text/hex editor) at their beginning and in the middle.
That's valid also for other algorithm (lzo1x, lz4 and so on) but lzss is very diffused.