stefanhendriks Posted July 6, 2007 Share Posted July 6, 2007 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. Quote Link to comment Share on other sites More sharing options...
Dark Knight ez Posted July 7, 2007 Share Posted July 7, 2007 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 Quote Link to comment Share on other sites More sharing options...
stefanhendriks Posted July 9, 2007 Author Share Posted July 9, 2007 Yeah i figured the R8 files contain 8 bit bmp files. I already have them and i also have a description how to unpack them from the R8 files and so. I was more interested in the R16 files, looks like research kind of stopped there. Quote Link to comment Share on other sites More sharing options...
TCH Posted September 2, 2007 Share Posted September 2, 2007 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.pak96 04 00 00 52 45 47 49 4f 4e 41 2e 49 4e 49 00First 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.pak2f ae 04 00 53 43 45 4e 4f 30 32 32 2e 49 4e 49 00 00 00 00 00 3b 5b 47 52This 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 positionstring, terminated with zero: filename}32 bit integer value = 0: header's endbody: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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.