Jump to content

Dune 2000 R8 & R16 format / Dune 2 PAK format


stefanhendriks

Recommended Posts

I've been looking on the internet, as well on several forums, for a clear description about the R8 and R16 format. I did find a rough explenation, and i also found a non-russian R8 extractor (yay!) but no source-code.

I believe the R8 contains 8 bit BMP files, while the R16 contains 16 bit (doh) files, in TGA format.

For those who wonder what i want with this, its a preperation for my shai hulud project. Also i am looking for the Dune 2 PAK format, but i haven't looked on the internet yet. I cannot use the Internet for private means atm since i don't have it at home, only at work.

Thanks for any response / help.

Link to comment
Share on other sites

Well, I googled a bit after reading your post and that's pretty much all I found.

R8 included BMP files(8-bit).

R16 included TGA files(16-bit without RLE compression).

8 bit BMP files though... should be easy to decode, I think.

Not sure if you actually want that, but... here is a nice explanation on the layout of BMP files:

http://www.fortunecity.com/skyscraper/windows/364/bmpffrmt.html

Link to comment
Share on other sites

  • 1 month later...

In Dune 2 PAK a head entry is contains a 32 bit integer wich indicates the chunk's start position in the PAK and a filename string wich is closed with a zero valued byte.

e.g.: scenario.pak

96 04 00 00 52 45 47 49 4f 4e 41 2e 49 4e 49 00

First 4 byte is a 32 bit little endian integer = 0x00000496 = 1174, and after it "REGIONA.INI" and a byte "0".

That's a header entry. The pak's header is end with a zero valued 32 bit integer.

e.g.: scenario.pak

2f ae 04 00 53 43 45 4e 4f 30 32 32 2e 49 4e 49 00 00 00 00 00 3b 5b 47 52

This is the last entry. First 4 byte is the beginning position of the entry's file (44591) and the next bytes is "SCENO022.INI" and a 0 wich terminates the string, and another four zeros wich terminates the PAK header. The next bytes (3b 5b 47 52, meaning: ";[GR") is the first four bytes of "REGIONA.INI" the first file. "REGIONA.INI" begins at 1174.

The body of the PAK is not compressed or encrypted. Plain raw data not more.

So, summa summarum:

head:

entries {

32 bit integer: starting position

string, terminated with zero: filename

}

32 bit integer value = 0: header's end

body:

just the files starts at the starting position showed at the header.

Edit: In time i've maked a PAK packer/unpacker. You can download it from http://oscomp.hu or http://bgafc.t-hosting.hu

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...