ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Wed May 22, 2019 11:27 am

All times are UTC




Post new topic  Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Sat Apr 13, 2019 6:45 pm 

Joined: Sat Apr 13, 2019 5:53 pm
Posts: 3
New member here.
I've been wanting to examine Lumines II (PSP), but i realized the files are compressed.
I'm not sure what the compression method is, but its most prominent feature is the presence of a "repeating byte" that acts as a "flag" of some sorts.
Lumines LIVE! (XBOX360) and Lumines Puzzle Fusion (PC) also seem to use this compression method.
Please note that the flag can be of a different value, most of the times being FE, but can also be FA, 5C, 9B...

Thanks in advance. Hopefully i'm doing this right and not missing things.


Attachments:
skin038.dat [27.63 KiB]
Downloaded 5 times
Top
   
PostPosted: Sun Apr 28, 2019 12:52 pm 

Joined: Sat Apr 13, 2019 5:53 pm
Posts: 3
Some updates. I think i figured out how the compression works. At the beginning of the files inside the .dat, there's three headers, all of them taking 4 bytes. One is the uncompressed size. Immediately after is the compressed size. And finally, the "flag" value used in the compressed data.
How the "flag" works is this: when the "flag" byte is inserted into the data, immediately after there is a byte with "how many bytes should be rewinded" to reach an "aim", then followed by a value that shows how much the "aim" byte is repeated.


Last edited by HIKARUfw on Mon Apr 29, 2019 7:47 pm, edited 1 time in total.

Top
   
PostPosted: Sun Apr 28, 2019 11:28 pm 

Joined: Sat Apr 13, 2019 5:53 pm
Posts: 3
UPDATE 2: The "second flag byte" does not actually aim for a specific byte, it aims for a section of bytes, which is then repeated. If the third byte's value (repeat) is lower than the second byte, only the segment determined by the former repeats, starting from the first byte of the segment. If the third byte's value is higher than the second byte, the section determined by the latter repeats, completely or partially.
Here's a crudely drawn picture crudely explaining how the thing works.
Image

I've tried to manually decompress one of the files (not the one linked in the first post), only to obtain partial success.
Image

On another note, if the "flag" value is mentioned twice in a row, both don't function as flags; the code stays as it is.
Oh, and can someone please move this to the Game Archive category? Thanks


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