Page 6 of 8

Posted: Wed Oct 11, 2006 6:58 pm
by Mr.Mouse
Deniz Oezmen wrote:
Mr.Mouse wrote:Yes, there is. But I had trouble getting it to run on my high-end PC and did not really try hard to fix that problem.
Thanks, I am enqueued now. I do not intend to run the game, I just want to peek into the exe ... ;-)
;)

Posted: Thu Oct 12, 2006 1:36 am
by john_doe
I figured out the decompression scheme.
Can someone send me some more compressed and matching decompressed files so I can test my decompressor more thouroughly to john_doe@techie.com? 10 files or so should be enough.
I'll then release the C++ source code so it can be implemented in MultiEx or other tools.

It's basically an LZ77-based algorithm, I think with Huffman.
I'll probably leave writing the specs to someone else :)

Posted: Thu Oct 12, 2006 6:51 am
by Mr.Mouse
john_doe wrote:I figured out the decompression scheme.
Can someone send me some more compressed and matching decompressed files so I can test my decompressor more thouroughly to john_doe@techie.com? 10 files or so should be enough.
I'll then release the C++ source code so it can be implemented in MultiEx or other tools.

It's basically an LZ77-based algorithm, I think with Huffman.
I'll probably leave writing the specs to someone else :)
That's awesome news! Xela, others? Got some files for him?

Posted: Thu Oct 12, 2006 8:25 am
by john_doe
I sent Xela a PM two days ago but he didn't even read it yet :(
So we'll have to wait until then.

Posted: Thu Oct 12, 2006 8:25 am
by Mr.Mouse
john_doe wrote:I sent Xela a PM two days ago but he didn't even read it yet :(
So we'll have to wait until then.
Nope i've got some for you. Hold on.

Posted: Thu Oct 12, 2006 8:28 am
by Mr.Mouse
Here you go. They are not text like, but have the same header. All files in the DID.DAT start with RA.

Posted: Thu Oct 12, 2006 8:42 am
by john_doe
Good, I'll have a look at them when I'm home and try to finish the code.

Posted: Thu Oct 12, 2006 10:42 am
by Deniz Oezmen
Ah, great!

Since I know the quality of Benjamin's work, I can stop now. ;-)

Though I'd like to see the code when it's finished ...

[By the way: The disassembly seems to indicate there might be some sort of "JR" compression scheme as well. Did anyone encounter that?]

Posted: Thu Oct 12, 2006 11:41 am
by john_doe
:)

I also looked for the JR marker but couldn't find any data that looked right (i.e. as header of a compressed file).

And of course the code will be released when it's done :)

Posted: Thu Oct 12, 2006 12:49 pm
by john_doe
It's done :)

You can download it from http://gamefileformats.the-underdogs.in ... mpra-1.zip
Exe & C++ source code (with a project file for Dev-C++) is included.
The program is a simple command-line tool, use it like "decompra infile outfile".

If you find any bugs or have comments, mail me at john_doe at techie.com.

PS: It worked on the files you sent me, Mr. Mouse, at least I could display some GIF and PCX files.

Posted: Thu Oct 12, 2006 1:01 pm
by Mr.Mouse
john_doe wrote:It's done :)

You can download it from http://gamefileformats.the-underdogs.in ... mpra-1.zip
Exe & C++ source code (with a project file for Dev-C++) is included.
The program is a simple command-line tool, use it like "decompra infile outfile".

If you find any bugs or have comments, mail me at john_doe at techie.com.

PS: It worked on the files you sent me, Mr. Mouse, at least I could display some GIF and PCX files.
BRILLIANT!!! If I have compression problems in the future , I turn to Deniz or John-doe ;) Now for some understanding of it, because we (at the wiki) still have some specs to write. Could you at least point out how the RA files are made up and what specific parts we can distinguish?

EDIT: Indeed, it works. Here's an example of the second file in the DID that is actually a PCX file. :D

I will try to inplement this compression type in MultiEx Commander, and create a plugin for the .DAT files. Is a compressor also possible, by the way? I assume so, but I first'd have to understand what is going on.

Posted: Thu Oct 12, 2006 1:31 pm
by john_doe
Thanks :)
Mr.Mouse wrote: Now for some understanding of it, because we (at the wiki) still have some specs to write. Could you at least point out how the RA files are made up and what specific parts we can distinguish?
I'll try to write some rough specs later.
Essentially it reads a byte as bitbuffer, and reads bits from this. If all 8 bits are used, it reads another byte. Depending on the bits it does more processing. In the end, it's one of two modes:
1. copy raw bytes from the input to the output
2. copy a number bytes from some offset in the output to the current offset into the output

The copy counts, lengths and offsets are calculated via the tables (lengthTable etc.)
Mr.Mouse wrote: Is a compressor also possible, by the way? I assume so, but I first'd have to understand what is going on.
Yes, that should be possible. I still don't know how this table stuff works exactly, figuring that out is needed to make a compressor. It's probably some Huffman type, not sure.
Probably an existing LZ-compresser could be adjusted to create files in the RA format.

Oh, and the header for a RA file looks like this:

Code: Select all

1 word    id, "RA"
1 word    version number, always 2
1 dword   size of decompressed data
1 word    unknown (unused in decompressor code)
1 word    checksum of the decompressed data

Posted: Thu Oct 12, 2006 2:44 pm
by Captain
Holy crap dudes!! :dance:

Posted: Thu Oct 12, 2006 6:53 pm
by Deniz Oezmen
Well done, Benjamin. Fine stuff!

Posted: Thu Oct 12, 2006 11:10 pm
by MGonzales
I forgot I had an account here. :)

<SNIP>The site's rules do not allow to trade full games

I recently acquired the collection...

http://www.lt-solutions.com/images/DID_FSL.JPG

...with TAW being the greatest and final version.



Moderators, please edit or delete my post as necessary to conform with this site's rules. Thanks. Done. - Mr.Mouse
--


Mark