This is a guide on how to force Beyond Divinity to run in Debug Mode. This will allow you to run the game windowed and make use of a proxy such as dgVoodoo 2 for better performance overall. Please note, this is heavily untested so use this with caution. I have not played through the game with this change yet, so I cannot verify it will work for the entire playthrough yet.


PLEASE! Before doing any of this, always make sure to backup your game files and save game files just in case! If you mess up or this does not work for you, you will be able to easily restore the game back to working order via backups of the files we will be editing. Always be sure to backup saved games whenever making any changes/mods to a game in general.

What You Need

You will need the following tools to accomplish this:
- Beyond Divinity (Only tested with the Steam version. 1.003a)
- A hex editor. (Any that can scan for byte patterns will work fine. I use 010 Editor personally.)
- dgVoodoo 2

How To Enable Debug Mode

1. Open your hex editor.
2. Open div.exe inside of the hex editor.
3. Look for the following byte pattern:
89 5E 28 88 9E 60 01 00 00

4. Go to the first result where this pattern was found. (Currently, this is at file offset: 0xDAA37)
5. Change the first 0x5E byte to 0x7E. (Currently, this is at file offset: 0xDAA38)
6. Save div.exe and close the hex editor.

How To Enable/Force Windowed Mode - Part 1 - Slashed Configuration Editing

Next, we need to manually edit the Slash renderer module configuration file. To do this, we will need the hex editor again as this file is saved in a binary format.
This file is formatted in 4 byte integers. Please be aware of where your cursor is at while editing this file as you can easily break things!

Here is the layout of the file:
struct slashedcfg_t
    uint32_t Main;                  // The id of the renderer system. [Default: 0]
    uint32_t Dev;                   // Unknown (Assumed device id of the GPU.) [Default: 0xFFFFFFFF]
    uint32_t Sub;                   // Unknown (Assumed device id of the GPU.) [Default: 0xFFFFFFFF]
    uint32_t Width;                 // The window width.
    uint32_t Height;                // The window height.
    uint32_t Fullscreen;            // The window fullscreen flag. [Default: 1]
    uint32_t Unknown;               // Unknown
    float    Gamma;                 // The games gamma amount. [Default: 0x3F800000, 1.0 float.]
    uint32_t Dark;                  // The games darkness amount. [Default: 0]
    uint32_t Sampling;              // Unknown. [Default: 0]
    uint32_t Tracing;               // Unknown. [Default: 0]
    uint32_t DoubleBufferTextures;  // Flag used for enabling double buffered textures. [Default: 0]
    uint32_t ForceSystemUpload;     // Unknown. [Default: 1]
    uint32_t UseAlphaBit;           // The alpha bit setting value. [Default: 1]

1. Open your hex editor.
2. Open slashed-d3d6.cfg inside of the hex editor.
3. Starting at offset 0x0C, enter a 4 byte integer for the size of your screen width.
4. Starting at offset 0x10, enter a 4 byte integer for the size of your screen height.
5. Starting at offset 0x14, enter a 4 byte integer with the value of 0. (This is for the fullscreen flag.)
6. Save the file and close it.

For example, this is how the file looks, after editing for my setup which is 3440x1440:
[Linked Image]

How To Enable/Force Windowed Mode - Part 2 - dgVoodoo Setup

Last, we need to setup dgVoodoo for the best results and performance. You can download the latest version of dgVoodoo 2 here:

Once downloaded, you need to extract the following files from its zip to the Beyond Divinity folder:
- \MS\x86\D3D8.dll
- \MS\x86\D3D9.dll
- \MS\x86\D3DImm.dll
- \MS\x86\DDraw.dll
- dgVoodoo.conf
- dgVoodooCpl.exe

Place the files directly into the Beyond Divinity folder, do not put them in sub-folders!
Next, run the dgVoodooCpl.exe file to configure dgVoodoo.

Inside of the config tool, you will need to make the following settings changes:
- General Tab > Appearance > Click the bubble next to Windowed. (Leave the dropbox as Unspecified.)
- General Tab > Appearance > Check the box that says 'Enumerate refresh rates.
- DirectX > Videocard > Make sure 'dgVoodoo Virtual 3D Accelerated Card' is selected in the dropdown.
- DirectX > Videocard > Set VRAM to 1024MB.
- DirectX > Resolution > Resolution should be set to the desired game resolution and refresh rate you want to play at. I set mine to 1920x1080 @ 99Hz.
- DirectX > Behavoir > Uncheck 'Application controlled fullscreen/windowed mode state'.
- DirectX > Behavoir > Check 'Disable Alt-Enter to toggle screen state'.
- DirectX > Miscellanneous > Check 'Force vSync' if you wish to have vSync enabled.
- DirectX > Miscellanneous > Uncheck 'dgVoodoo Watermark' to remove the text in the bottom right from dgVoodoo's overlay.

Once down, click apply then ok.

[Linked Image] [Linked Image]

At this point, you should be all set! Next time you run the game it should be in a window. smile