Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11

Thread: Ember - patching launcher

  
  1. #1

    Post Ember - patching launcher

    Hello everyone! Dungeon Keeper 2 is one of my favorite childhood games. To play it now, you need to run DKII-DX.EXE, which, unlike the original DKII.EXE, does only one thing. It replaces the import of DDRAW.dll with PATCH.dll. PATCH.dll applies some patches that allow you to run the game on windows 10. Its source code is closed and somehow changing it to add your own developments is problematic.

    I have been reverse engineering DK2 machine code for about a year now and trying to write machine code patches for this game. As a result of my work, i have created a game launcher that patches the machine code of the game right before it starts, and it does not using any patches from PATCH.dll.

    At the moment, patches does this:
    - Adds support for Windows 10 when checking operating system version
    - Removes the use of dinput in the game code and replaces it with user32 window messages.
    - Forces the game to run in windowed mode, you can scale it as you want and it's mostly for reversal purposes
    - limits the game's frame rate to 60, so in-game animations don't run as fast
    - Adds the ability to collect information about the crash of the game so that it can be fixed later

    The binaries: https://github.com/DiaLight/Ember/releases
    There is source code, so you can check and compile it by yourself: https://github.com/DiaLight/Ember

    Don't actually know where to improve the game next. This will likely be fixes to the game menu and some day i'll figure out how to run game with higher resolution textures.

  2. #2
    Awakening Game Master Metal Gear Rex's Avatar
    Join Date
    Sep 2009
    Posts
    5,689

    Default Re: Ember - patching launcher

    This is quite some interesting news! Always exciting to see some work done for DK2.

    I'm not so knowledgeable about technical stuff, so this may be foolish to ask but please enlighten me on what exactly the sort of capabilities you can do from this position? Would it be possible to fix certain bugs or AI behavior?

    What kind of fixes to the game menu did you have in mind?
    Dungeon Keeper 2 Patch: With More Balance and Pie [Hiatus]
    Forever Hiatus. Probably. Latest Version: 3.5 w/Levels 1-11 Revised.

    The Awakening: GM Powers Activate!
    Tesonu is napping!

  3. #3

    Default Re: Ember - patching launcher

    Quote Originally Posted by Metal Gear Rex View Post
    This is quite some interesting news! Always exciting to see some work done for DK2.

    I'm not so knowledgeable about technical stuff, so this may be foolish to ask but please enlighten me on what exactly the sort of capabilities you can do from this position? Would it be possible to fix certain bugs or AI behavior?

    What kind of fixes to the game menu did you have in mind?
    DKII.exe is where source code of the game was compiled and linked to. Changing this binary means changing code behaviour. Ember does not changing DKII.exe on disk, but patches it in memory after it was loaded, but before it was started. Yes, i can fix game bugs and AI behaviour. It's only matter of time.

    Without PATCH.dll, some buttons in menu just does not render, but they still can be clicked. Here in the multiplayer menu in the right down corner should be buttons
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	Снимок экрана 2022-09-23 100432.png 
Views:	81 
Size:	674.7 KB 
ID:	2297  
    Last edited by DiaLight; September 23rd, 2022 at 15:19.

  4. #4

    Default Re: Ember - patching launcher

    Hello! I released another version of Ember. I broke the game resolution limits. on the 4k resolution game looks weird, interface float away, but i finally made it work. Next time i will try to improve some textures.
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	dk2_4k.png 
Views:	51 
Size:	6.48 MB 
ID:	2343  

  5. #5

    Default Re: Ember - patching launcher

    On the way to hires textures. Fixed some bugs, added ability in launcher to extract textures from EngineTextures.dat

  6. #6

    Default Re: Ember - patching launcher

    Аdded ability to use extracted textures in game.
    Click image for larger version. 

Name:	tex_edit.png 
Views:	81 
Size:	2.08 MB 
ID:	2344

    Unfortunately, it will not be so easy to increase the resolution of textures. There are a lot of places tailored for the maximum texture resolution of 256x256. I managed to increase the resolution of loaded textures and game surfaces, but there are still problems with applying textures.
    Click image for larger version. 

Name:	upscaled_surfaces.png 
Views:	70 
Size:	2.50 MB 
ID:	2345
    Happy New Year, everyone. I won't be doing the project for a while.

  7. #7

    Default Re: Ember - patching launcher

    Hey, would you be able to make the Ember launcher pass command line args to the program if it doesn't already? I'm creating a DK2 launcher that allows for level selection and stuff like that, so I'd like to be able to pass the selected level through to your launcher and it still be loaded correctly.

  8. #8
    Fly Quuz's Avatar
    Join Date
    Dec 2019
    Location
    Russia
    Posts
    74

    Default Re: Ember - patching launcher

    In fact, very interesting developments. Well done! Keep up the good work, please )

  9. #9

    Default Re: Ember - patching launcher

    Quote Originally Posted by Nat View Post
    Hey, would you be able to make the Ember launcher pass command line args to the program if it doesn't already? I'm creating a DK2 launcher that allows for level selection and stuff like that, so I'd like to be able to pass the selected level through to your launcher and it still be loaded correctly.
    Implemented in latest release

  10. #10

    Default Re: Ember - patching launcher

    [QUOTE=DiaLight;57833]
    [..]I have been reverse engineering DK2 machine code for about a year now and trying to write machine code patches for this game. As a result of my work, i have created a game launcher that patches the machine code of the game right before it starts, and it does not using any patches from PATCH.dll.

    At the moment, patches does this:
    - Adds support for Windows 10 when checking operating system version
    [.. and a lot more .. ]

    I am quite impressed by your work - thank you!

    I just don't know how to start it: When I try, I get the messages:
    ---
    DKII.exe - found
    signature: entry=00238440 size=002D6E00
    Dungeon Keeper 2 version: v1.70
    copy DKII.exe failed: 00000020
    ---
    Last edited by falaffel; December 15th, 2023 at 13:50.

Similar Threads

  1. Campaigns not working after patching
    By Badass in forum KeeperFX
    Replies: 0
    Last Post: February 7th, 2013, 12:28
  2. New DK remake - Dungeon Overlord (Ember Realms)
    By Bibendus in forum General Discussion
    Replies: 27
    Last Post: October 20th, 2012, 08:44
  3. Trouble Patching To 1.7
    By AkaRai in forum DK2 Troubleshooting
    Replies: 3
    Last Post: December 30th, 2011, 23:05
  4. Launcher using wxWidgets
    By mefistotelis in forum KeeperFX
    Replies: 2
    Last Post: June 13th, 2011, 15:35
  5. Ember Realms - MMDKLFG
    By DragonsLover in forum General Discussion
    Replies: 1
    Last Post: February 1st, 2010, 09:38

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
  •