Page 2 of 4 FirstFirst 1 2 3 4 LastLast
Results 11 to 20 of 36

Thread: Reversal of DKII Binary File Formats

  
  1. #11

    Default Re: Reversal of DKII Binary File Formats

    Windows 7, with Compatibility mode for 2000. 98 Compatibility mode would not start the game.

    That address is outside of the range of the executable's identity mapping - 0x00401000 -> 0x007ae400. I'm assuming there's a relocation base there, otherwise the crash is in a loaded dll (entirely possible if this is a ddraw problem, but as you indicated it applied over multiple graphics settings, I would expect gameplay code to be the source).

    I know I'm reaching here, but is there any chance of getting a video of the crash (from you or anyone who might be able to reproduce).

  2. #12
    OpenKeeper developer
    Join Date
    Jul 2014
    Posts
    86

    Default Re: Reversal of DKII Binary File Formats

    Hi!

    I'm also interested in reversing the file formats. To try make an Open Dungeon Keeper 2, using the old assets (requiring license to the original game). I know how to extract the WAD files with different tools, but it would be great to be able to do this on-the-fly in the code. The meshes are somewhat reversed but I have no idea how to handle the WAD archives... Anyone got info on them?

  3. #13
    KeeperFX Author mefistotelis's Avatar
    Join Date
    Sep 2009
    Location
    Poland
    Posts
    1,242

    Default Re: Reversal of DKII Binary File Formats

    Quote Originally Posted by tonihele View Post
    I have no idea how to handle the WAD archives... Anyone got info on them?
    http://keeper.lubiki.pl/html/dk2_tools_other.php

    There's unfinished tool there with C source, if I remember correctly it can read uncompressed WADs (some have compression).

    Also, I think "Dragon unpacker" is open source and can read uncompressed WADs too, its made in Pascal i think.

  4. #14

    Default Re: Reversal of DKII Binary File Formats

    For accessing wad files:

    wad.c.txt
    wad.h.txt

    The decompress routine here was extracted by someone else - managed to find the post and its hosting disappeared, hopefully it will be a bit more permanent here - so to the unnamed author I say thanks.

    This is an older interface that I was using to do some model loading, which searches linearly for the file name to be loaded.

    This will neatly open compressed and uncompressed wads (.txt added because forum file manager does not allow .c/.h). Enjoy!

  5. #15
    OpenKeeper developer
    Join Date
    Jul 2014
    Posts
    86

    Default Re: Reversal of DKII Binary File Formats

    Very nice, thank you. I tried to read the Dragon Unpacker code, but lost my patience I used to code Object Pascal for many years when I was a kid (20 years ago). And it is still easy to read but I found it clumsy to find the bits I needed. Last time I touched C code was 10 years ago. Now it is only JAVA. If I manage to convert the code, I'll release the source here if someone should ever need it. For loading the models (and initially creating the game, or trying) I would use JMonkeyEngine. The models will prove more difficult however...

  6. #16

    Default Re: Reversal of DKII Binary File Formats

    I have been writing up documentation for the entire set of file formats used by the game. I am not much of a typesetter, but my preliminary version has a full reference sheet for the model formats.

    Feel free to use any information from this guide, but credit me either as a member of this forum, or with my name contained in the document. The full version will be released in latex source form via github eventually. If anyone has any suggestions for content, I will entertain them and accept content.

    Enjoy!

    guide.pdf

  7. #17
    OpenKeeper developer
    Join Date
    Jul 2014
    Posts
    86

    Default Re: Reversal of DKII Binary File Formats

    Thank you for the excellent guide! I've managed to extract the meshes WAD file and read imp KMF. Although I haven't really managed to import the model to the engine I'm using, and no GROP or ANIM support yet. I found it hard enough to try to use those unsigned numbers in JAVA (using 7, 8 is not officially supported by the engine) The code is messy and not really refactored, wrongly commented (I don't really understand bit functions anymore) etc. The usual. But here if someone wants to use these or something.
    https://github.com/tonihele/OpenDungeonKeeper

  8. #18
    OpenKeeper developer
    Join Date
    Jul 2014
    Posts
    86

    Default Re: Reversal of DKII Binary File Formats

    @werk Did you have the other formats covered? Or anyone else? I got the impression you cracked the compression on the textures. I've successfully extracted the textures, but they are still in unknown format. I found your code from the texture formats thread, but I think it was incomplete. Many externs without any values. Or did I just not understand it...? Thanks.

  9. #19

    Default Re: Reversal of DKII Binary File Formats

    The incompleteness of the code was based around tables that are present in the executable (DKII.exe silver 1.7) of which I was unsure of the copyright for - extracting the values at the positions given by their names, types and sizes will make things work. I recommend using IDA freeware to extract the data at those locations.

    The image format is actually a variant of EA's TQI format, itself based on IDC, detailed at http://wiki.multimedia.cx/index.php?...ronic_Arts_TQI, with similar segment code implemented for ffmpeg at http://ffmpeg.org/doxygen/trunk/eaidct_8c_source.html.

  10. #20
    OpenKeeper developer
    Join Date
    Jul 2014
    Posts
    86

    Default Re: Reversal of DKII Binary File Formats

    Quote Originally Posted by werkt View Post
    The image format is actually a variant of EA's TQI format, itself based on IDC, detailed at http://wiki.multimedia.cx/index.php?...ronic_Arts_TQI, with similar segment code implemented for ffmpeg at http://ffmpeg.org/doxygen/trunk/eaidct_8c_source.html.
    When you say variant, what is the difference? Or could I just use the TQI format extraction?

Similar Threads

  1. Questions about the reversal of stuff
    By DragonsLover in forum KeeperFX
    Replies: 61
    Last Post: April 16th, 2014, 22:32
  2. LOG file improvement
    By jomalin in forum KeeperFX
    Replies: 10
    Last Post: June 15th, 2011, 22:54
  3. Help me by uploading a file
    By f0wh in forum DK2 Troubleshooting
    Replies: 0
    Last Post: January 26th, 2011, 02:10

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •