Wednesday, November 13, 2013

Huffman Encoding - Part 2 (The Legend Continues)

Ok, so we have some uncompressed chunks, what now? Comparing the DS version (which uses the same format), we can see that the plaintext is in some kind of file structure. The figure on the left is actually a memory dump from Demul at runtime (basically dumping the Dreamcast RAM while the game is running).


A better way to view the memory, however, is with savestates. Demul saves the state of the virtual 'system' in a binary file like the one below - as we can see, it has an int value at the top which is followed by 0x78 0xXX which if it werent for the fact that the source code is available and uses zlib exclusively for compression, this would be a clear indication.


Throwing the zlib data into a stream decompressor and we have the 16MB dump of the Dreamcast RAM at the time the state was taken. The RAM itself has many interesting bits - especially the one I marked below in blue which is rather familiar...


Aha! It's from our DAT file, however, not from the top due to the fact that this group of entries has to do with a compressed sub-file in our compressed file (a 'yo-dawg' situation, indeed).




Another interesting bit is what appears to be our Model Format! It uses a header of "MODL" for both DS and DC versions - more than likely pointing to this being some kind of proprietary format.


We've also found this - not sure, yet...

Some of these files have to be the card graphics. Chances are, they're compressed as a straight up texture binary (not even in a pvr format or anything - ready to get thrown at the GPU).




Breaking out Gimp with a binary file renamed with a .data extension is quite handy to find graphics in unknown files.

A little messy... let's see if we can mess around with the resolution (keeping in mind it's more than likely in powers of 2) to get a picture.



Ahhh! There we go! Color datas a little messed up - will have to fix that.


This ones color is a bit more true to the game:



More as it develops!

No comments:

Post a Comment