DxWnd v.2.03.97 Program Configuration Document

(Printer friendly html version)


Index

Main tab:

Hook tab:

Video tab:

Input tab:

DirectX tab:

DirectX(2) tab:

Direct3D tab:

Timing tab:

Logs tab:

Libs tab:

Compat. tab:



Through the Add or Modify command, a series of tabbed panels will be shown.

Main tab:

Go to top

Name:

The user defined program name, to allow you to label your application with an evocative naming, possibly including qualifiers, versioning etc. If unset, DxWnd will insert here the task filename.

Path:

The pathname of the task to be activated / hooked.

Launch:

In some cases, the program to be hooked can't be run by launching itself directly, but needs arguments or other environment elements provided by some frontend father program. To simplify the program activation, the frontend pathname can be written here: when set, the run command does not run the path in the field above, but this one.


Generic

Do not notify on task switch

Inhibits the task switch notification message that may hurt some games not designed to handle it properly.

No banner

Well, DxWnd celebrates itself a little by showing a very short splash screen at the beginning. If you're not happy with this, checking this flag will disable the show.

Run in window

Checked by default, tells DxWnd to try to run the program in windowed mode, that is the essential reason why DxWnd exists. But if not checked DxWnd still performs all other functions not related to the screen size, such as time stretching, compatibility options and so forth.

Terminate on window close

Immediately terminates the application when you close the window.

Ask confirmation on window close

Asks you for confirmation when you close the window.

Acquire admin caps

Hooking the game requires running DxWnd as an administrator. If you set this flag and run DxWnd without administrator privileges, running a game from the DxWnd interface will show a dialog box prompting you to elevate the permissions level. When you confirm this, DxWnd will automatically terminate and restart itself. If you don't see its window anymore, look beneath other windows, as it may lose its Z-order when it restarts.

Fullscreen only

Forces applications to run in fullscreen mode only.

Show hints

This option activates message boxes that contain information about what DxWnd finds in a program's executable. It can't tell you exactly how to configure that program's hook, but can be helpful in determining which settings you may need to adjust.

Optimize CPU

Optimizes the CPU load, but only for ddraw operations.


Position

Hide desktop background

Starts the windowed program together with four black borderless windows that surround it entirely, hiding the distracting background and providing a more focused gaming experience. The whole idea was borrowed from "Mr. Hide."

Keep aspect ratio

When the window is resized, the aspect ratio set by the window initial size is preserved (by default the 4:3 aspect ratio such as 800x600).

Window initial position & size

Four values for the initial X, Y coordinates of the upper left window corner and the window width (W) and height (H).


TIP: You can set the width and height to 0 to automatically resize the window based on the game resolution.

Monitor

For almost all window position modes (except the "X,Y coordinates" mode), multi-screen configurations require you to specify which monitor the configuration refers to. For instance, if you select "centered," you probably want it centered on a specific monitor rather than in the entire extended desktop. The drop-down selector has a "def." ("default") option, referring to the primary monitor, and a number for each specific monitor.

Position

A selection of 4 possible cases:

  • X, Y coordinates: the window is placed at the chosen coordinates

  • Desktop center: the window is centered on the screen, and only the width and height fields are used.

  • Desktop work area: the window occupies the whole screen but the bottom taskbar.

  • Desktop: the window occupies the whole screen, as if it was fullscreen (a.k.a. Fake-fullscreen mode).



Hook tab:

Go to top

Hook enabled

If this flag is not set, DxWnd ignores the task. (gray icon)

Additional modules:

DxWnd's hooking logic may not notice some DLLs. In these fortunately rare cases, you can fix the issue by entering one or more module names to be added to DxWnd's search algorithm.

Start folder path

When you run a program through the DxWnd interface, the program execution path is not set by default. The program location folder is used as the execution folder. This works for most programs, but some need to start from a different path. Enter a path in this text box to specify a different execution path parameter.


Injection mode

SetWindowsHook

A SetWindowsHook callback handles the injection by intercepting the creation of the first program window. It is the default DxWnd hooking schema, allowing the program to run independently from the DxWnd interface. The drawback is that the window may only be created after some operation that needed to be fixed and DxWnd will be unable to completely intercept the program's execution, resulting in some odd behaviors from the program.

Debugger mode

This basic hook technique intercepts the first window creation event. By this point, the program may have taken unwanted actions already, such as changing the video mode, detecting bad conditions, or crashing. Checking this flag injects DxWnd's logic right at the beginning of task execution, allowing DxWnd to intercept all events. The drawback is that this only works when the task is activated from the DxWnd interface (indicated by a yellow icon). Another drawback is that the injection process closely resembles the activation of a debugger, which some games will detect and intercept, shutting down the program.

Inject suspended process

This hook technique is similar to the "Debugger mode" above, but does not involve debugging, allowing greater compatibility with some programs that might block that more complex method. This settings works well on Windows XP.


Hook flags

Hot patch (obfuscated IAT)

The original DxWnd used IAT patching to redirect API calls to the altered routines. This method has its advantages, but fails when not all API are reached because they are located in unconnected dlls, referenced by ordinal number or referenced by programs with obfuscated IAT. IAT obfuscation is a sophisticated but common enough technique to make hacker's life harder: for instance, the game executable of Doom III has an obfuscated IAT.

Checking this flag causes DxWnd to use an alternate patching technique, that is the "hot patching" that creates a detour assembly code right at the beginning of the API implementation. Once done EVERY SINGLE CALL gets intercepted no matter from where the call is made, but it isn't always possible to apply this technique. Luckily, in the vast majority of cases, they both work.

Hook child WindowProc

By default, DxWnd intercepts the WindowProc routine of the main window, and this is enough for its purposes. In some cases, though, this is not enough and this flag tells DxWnd to intercept and redirect the WindowProc routines of all child windows as well.

Hook all DLLs

The original DxWnd behaviour was limited to search & hook calls made by the main program directly. Checking this flag causes DxWnd to recurse in all non-system DLLs address space to hook calls there. It's necessary in all cases where the graphic engine is not directly coded in the program, but it's implemented in a separated engine DLL.

Widechar program vs. ANSI

DxWnd uses ANSI versions of several system calls by default. This flag tells DxWnd to use the corresponding WIDECHAR version instead.

No Run

Some applications run several executables. The only game found to run like this so far is Die Hard Trilogy. It has a frontend program that runs one choice of three different executables, each one implementing one single, unique game. In this situation, each individual game needs an individual DxWnd configuration entry, and also needs to be run by the frontend. They cannot be run directly. The "No Run" flag and the corresponding blocking icon prevent the user from trying to run the game from the DxWnd interface.

No SHIMs

Disables Microsoft ACT compatibility fixes by renaming the executable.

No hook update

Under certain conditions, the same API or method call may have different memory addresses while the program is running. Unfortunately, there is no universal policy to handle this situation: In some cases, the program only works correctly if the function's original address is updated; in other cases, it is better to stick to the original value. By default, the original address is updated. Check this flag to keep the initial original address instead.


Son process hook

Default

By default, DxWnd does not intercept the CreateProcess call and therefore does not automatically hook the program's children. To hook the program's children, use Edit > Add to create a new entry in the main program list for each child process.

Suppress

This option bypasses calls to CreateProcess. Some games play intro movies in a child process (like binkplayer.exe). You can skip these movies and avoid desktop configuration changes by activating this flag.

Extend Hook

This option automatically hooks any created child processes with the same configuration as its parent. If the child process has a random name each time it is created (generally for the express purpose of making it harder to hook), use this option.

Extend Injection

This option automatically hooks any created child processes with the same configuration as its parent, including DLL injection. This means that the hook is applied as soon as the process starts.


Additional libraries hook

Hook Glide libs

Enables Glide API hooking. Not currently implemented.

Hook DirectSound

Hooks DirectSound to avoid hardware exclusive access, allowing debugging, tracing, and future expansions.

Video tab:

Go to top

Windows handling

Fix Window Frame Style

Initializes the game window with a title bar and resizable borders.

Prevent Win Maximize

Some modern games don't actually go in fullscreen mode, but just make the window occupy the whole screen. The option intercepts Windows messages and user32 calls to avoid changing the window position and size to make it a full-screen window.

Lock win style

Intercepts messages and calls that the program makes to himself to change its own windowstyle.

Recover screen mode

Sets the screen mode to registry default settings. In general, DxWnd intercepts any attempt to change display settings and prevents unwanted operations, but still some programs have display settings instructions before DxWnd could possibly intercept them (e.g. before the window is created and the windows hook is invoked), so that changing the display settings right after is the only possible solution. Try this when other options don't work.

Refresh on win resize

Any decently written windows application should take care of refreshing the screen primary surface when resized, and most fullscreen games do it. Some don't (they were not supposed to ever be resized, actually). This flag is to force a refresh (useful for “Uprising”).

Fix Parent Window

Typically, a game is started with an invisible program window, and then creates a separate and child window for handling the graphic. Some games don't use the child window, but they rather use the parent one. In this case, the parent window becomes visible, then needs to be properly resized. It's experimental, for now, but seems to be able to manage successfully several tough games: Solaris, SleepWalker, Sid Meier's Sim Golf, the Worms series....

Modal Style

When "Fix Window Frame Style" is set, a borderless and titleless modal style is chosen instead of the default one.

Force win resize

Experimental (and not working very well so far): should force the processing of window resizing messages so that the window can be resized by dragging borders.

Hide multi-monitor config

Makes the program ignore that there are multiple monitors in your system configuration, giving informations about the primary monitor only.

Hide Taskbar

Forces the Windows Taskbar to hide while a game is running.

Unlock Z-order

Some games repeatedly bring their window to the top of the Z-order, meaning that they insist on remaining on top of all other windows. This flag prevents the hooked game from updating its own Z-order.

Suppress main window destruction

Some games kill the main window before starting a new one, and DxWnd may not properly handle this behavior. This flag prevents the main window from being destroyed, resolving that issue.

Send WM_ACTIVATEAPP message

Windows sends an ACTIVATEAPP message to fullscreen programs, but may not send this message to windowed programs. This flag forces Windows to send that message, resolving cases where the hooked program expects to receive such a message.


Window size & position

Free

Allows to move and resize the window freely, with commands both from inside the application (through system calls) or from external user commands (es. grabbing the window border to stretch or move the window).

Floating

Move and resize operations are allowed only from user commands, but internal operations are intercepted and neutralized.

Locked size

Allows moving of window but not resizing.

Anchored

Does not allow window movement or resizing.


Initial virtual color setting

Current

Does not change the video color mode.

8 BPP

Some games act as if you had switched the video mode to 8BPP before starting the game, making 8BPP emulation useless. This option tells the game that the desktop setting is in 8BPP mode already.

16 BPP

Same as above, but declaring a 16BPP setting.

24 BPP

Same as above, but declaring a 24BPP setting.

32 BPP

Same as above, but declaring a 32BPP setting.



Color management

Lock Sys Colors

Suppresses the SetSysColors API that changes the colors of system elements, such as window borders and panel backgrounds. Some fullscreen games change these colors when they start and revert them when they exit, which is unnoticeable when these games run in fullscreen mode but very noticeable when they are run in a window. The only known game that needs this option is Western Front.

Lock reserved palette entries

This option simulates a lock on the system palette entries (usually 20 colors, corresponding to 0-9 and 246-255 in the 8-bit, 256-color palette entries), preventing DirectDraw calls from updating these values.

Disable setting gamma ramp

Disables API trying to alternate the default gamma ramp making the screen lighter or darker. Since there API affects the whole screen, this flag is mainly useful to avoid the background desktop to be affected.



Screen resolution

Screen resolution affects the resolutions detected by the application:

SVGA modes

The classic 4:3 screen resolutions starting from 320x200 up to 1280x800.

HDMI modes

The typical 16:9 resolutions from 640x360 up to 1980x1080.

Monitor native modes

Whatever resolution is returned from the video card.

Initial resolution

Set the initial screen resolution to the width and height given in the adjacent text fields.

Max resolution

Set the maximum screen resolution to the width and height given in the adjacent text fields.

Limit resolution

Disables any resolution higher than the selected value. By default, the choice is "unlimited", that means no resolution is disabled.

Note that 320x200 resolution is typically no longer supported, but it is not a problem to emulate it in a window, and this resolution is necessary to run some older games.



Input tab:

Go to top

Cursor visibility

Automatic

Clears any forced cursor visibility settings.

Hide

Forces hiding the hardware cursor.

Show

Forces showing the hardware cursor.



Cursor Handling

Correct mouse position

Compensate for X,Y mouse coordinates when the window is moved or resized. It should be typically set for most games.

Position message processing

Some programs get the current mouse position via the dedicated GetCursorPos API, but others analyze the POINT coordinates that are included in every window message the program receives. This flag enables a Windows hook that receives messages and compensates for windowed mode's displacement of mouse coordinates by adjusting them to the equivalent fullscreen coordinates.

Force cursor clipping

Set hardware cursor clipping within the window's region. It greatly improves the game playability in some cases (namely, the Dungeon Keeper series). With this set the cursor stays inside the window.

Keep cursor within window

Avoid moving the cursor outside the window area. Doing so was used as “Cursor OFF” directive in some games.

Keep cursor fixed

Inhibits the SetCursorPos() API: in some cases, it affects the program's behaviour (e.g. “Necrodrome”).

Intercept GDI cursor clipping

Disables GDI clipping, avoiding unpleasant effects such as the mouse that is not free to move within the whole window.

Fix WM_NCHITTEST

Fixes the WM_NCHITTEST message X,Y coordinates. When the window's border behaves strangely, set this flag to correct the position of the mouse cursor.

Slow down mouse polling

Some old programs have this bad habit to continuously loop through the mouse status polling with no delay, using 100% of CPU time. This flag introduces a minimal and unnoticeable delay between mouse polls, saving most of CPU time.

Release mouse outside window

Normally, when the mouse is placed outside the window and the window keeps receiving mouse messages, the mouse cursor is placed on the corresponding window border and the program performs video scrolling or so forth. There are some cases in which you don't want this to happen, for instance when you want to use two programs alternatively, such as a game and a keyboard simulator.

Checking this flag causes DxWnd to detect the mouse outside window condition, and in this case it places the cursor right in the middle of the screen, where it is supposed to make no harm.

Enable virtual joystick

Some games require a joystick. If a joystick is not connected, this flag emulates a rudimentary joystick, controlled by mouse movement. The X and Y axes are controlled by mouse movement, the two primary joystick buttons are controlled by left and right click, and the joystick centering function is controlled by the middle mouse button (if available). The joysticks position and its button states are shown in a cross-shaped viewfinder that overlaps the game window.



DirectInput

Hook dinput

Hooks DirectInput libraries, making sure that the DirectInput modes are appropriate for a non fullscreen program and enabling all other flags in the same group.

Hook dinput8

Hooks DirectInput8 libraries.

Unacquire devices on focus lost

Unacquire DirectInput/DirectInput8 devices when they lose focus and acquire them back when they regain focus. This option should be set if the program using DirectInput libraries keeps listening to mouse input even when the program's window is inactive, or when it keeps ignoring mouse input even when the program's window becomes active once again.

Emulate mouse relative movement

Emulates the DirectInput detection of relative mouse position by keeping the mouse at the center of the window and looking for movements. It should be used whenever the native DirectInput mechanism doesn't work properly.

Skip HID device type

Newer versions of Windows may have access to new types of HID (human interface device) that can interfere with old games that can only recognize the three traditional devices (mouse, keyboard, and joystick). This flag masks the presence of such devices. It fixes a crash in the game "Jetboat Superchamps 2," the only known game that requires this setting.

Suppress DI common errors

This flag forces some DirectInput operations to return a successful completion rather than an error even in the event of a failure. Some programs work more reliably with this flag turned on.

Set keyboard shared coop. level

Forces DirectInput cooperative level to NONEXCLUSIVE mode for the keyboard. Use this flag when the program shows DirectInput errors related to keyboard access. The game "Planet of the Apes" can't process the PrintScreen key without this flag.



Message Handling

Process all messages

Most programs get X,Y mouse coordinates from the mouse messages or from the specific API. One tricky way to get the same info, though, is to listen to the Windows message queue using PeekMessage/GetMessage, and retrieve the X,Y coordinates from ANY received message in the pt field. Checking this box makes DxWnd fix the X,Y coordinates in this uncommon situation as well (see the game Uprising).

Skip offending messages

In theory, a fullscreen message should not expect several messages that are impossible to receive, such as border sizing, taskbar events, and so forth. Some programs are not properly coded to react to such "impossible" messages and may show malfunctions. This flag causes potentially harmful and meaningless messages to be suppressed.

Defaulting offending messages

While a well-designed windowed program should react to all window system messages, it is possible that a fullscreen program was designed without an appropriate reaction to such unexpected messages, like window stretching. This option makes DxWnd automatically process all these messages that an application might not correctly handle. It should be turned on if operations like window resizing or movement cause crashes or other problems.

Peek all messages in queue

In Windows 7 and newer, any windowed application MUST empty its message queue. The operating system considers any application that does not do this within a defined timeout period (about 5 seconds) to be malfunctioning, and kills the process (although it keeps displaying the window's contents). Programs developed before Windows 7 didn't take this constraint into account and may easily fail to get messages during processes such as unskippable cutscenes or long calculations. This option periodically empties the system queue, ensuring that the program won't be killed. However, there is a small chance that some events (like mouse clicks) could get lost occasionally and will need to be repeated.

Filter winposchange messages

Suppresses the WM_WINDOWPOSCHANGING or WM_WINDOWPOSCHANGED messages that some programs send to themselves to automatically move their window. This option is used for Rollercoaster Tycoon.

Add message pump (Win7 comp.)

Windows 7 and onward monitor each foreground process's input message queue and kill any processes that wait too long to flush their queue (generally five seconds). Some older games skip this task during long intro movies or AI processing, making them vulnerable to being killed by the OS. This flag activates a thread that periodically flushes pending messages from the queue, preventing these games from being automatically terminated.



Keyboard Handling

Enables hot keys

DxWnd can set some special keys (Alt-Fn) to trigger special actions, storing the key association in the DxWnd.ini file.

This flag enables the hot keys definitions. If unchecked, all hot keys are disabled for this program.

Intercept Alt-F4 key

Intercepts the Alt-F4 key in the message processing loop to immediately terminate the program, avoiding any programmed exit procedure (out-tro, savegame warnings, ads...). Of course, IF the game is doing the message processing loop!


DirectX tab:

Go to top

DirectX Version Hook

DirectX Version Hook

Sets the basic intervention strategy: depending on the game technology, a different hooking technique should be adopted. Automatic tries to find it by itself, but it doesn't always succeed! OpenGL handling requires a dedicated setting (see libs tab)


It is also possible to specify the option "none" to avoid hooking DirectX at all. This could be helpful whenever you are interested in DxWnd features that are not related to the graphics (e.g. time stretching, compatibility options) and you want to leave the graphics alone.



Emulation

None

The primary surface and backbuffers are simply scaled to the desired size, but no other characteristic is altered. In particular, the pixel color depth and mode are not altered.

Primary Buffer

Same as "None," but blit operations are made against a memory surface and then transferred to the real primary surface – this handles the so-called "pitch-bug" problem.

Locked Surface

Same as "Primary Buffer" (EMULATEBUFFER) but the buffer is the surface of an OFFSCREENPLAIN DirectDraw surface, so it is handled similarly to a DirectX surfacebuffer.

Primary Surface

The virtual primary surface has a different color depth from the real primary surface, and DxWnd takes care of the color transformation internally: it might be a little slower but it involves no screen mode changes. Furthermore, this option allows you to set the "Set AERO compatible mode" that avoids making a temporary color conversion and stretching it to the primary surface (which would break the AERO desktop composition mode).

Hybrid mode

Similar to "Primary Surface" mode (EMULATESURFACE), but DxWnd forwards the palette and color conversion to GDI calls instead of managing them internally. It is usually less compatible than primary surface, but in some rare cases it may do better at managing unusual color conversions. Try this option if the game works but the colors are wrong or the screen is black.

GDI mode

Similar to "Primary Surface" mode (EMULATESURFACE), but DxWnd forwards all the conversion between the virtual primary interface and the window surface instead of managing it internally. Because of recent optimizations to GDI that can now take advantage of hardware-accelerated functions, this mode is becoming particularly interesting, and the lack of extra service surfaces brings it closer to the original game schema. It is also quite respectful of AERO desktop modes.



Filtering

ddraw default

The normal mode, where the primary surface is stretch-blitted to the window surface.

Fast 2X Bilinear

Activates a simplified filter that scales each pixel twice, interpolating the colors of adjacent pixels. The default window size is double the resolution of the virtual screen. If you choose a different size, the surface is scaled to fit into the client area, but this noticeably slows down the blit operation.

Full Bilinear

Activates a bilinear filter to scale the DirectDraw primary surface to the window client area. When this is used with GDI games, it activates GDI internal filtering for better scaling.


DirectDraw Surface handling

switch VIDEO to SYSTEM on fail

When this option is set and a CreateSurface fails because of video memory shortage, DxWnd backs this up by creating the surface on memory. Oddly enough, some games expect to notice this by themselves and work correctly only when the option is NOT set.

Suppress DX common errors

Some games running in windowed mode generate sporadic errors that wouldn't prevent the game to work, but terminate the application. This option makes directx methods return OK condition in such common cases.

Lock color depth

Locks the DirectDraw color depth to the current desktop value (used in SetDisplayMode). If a game's color depth can't be corrected in any other way, use this flag. This option is used for the game "Ahlgrens Bilspelet."

Blit from Backbuffer

Some games (the Sims, the only one so far....) read graphic data from the primary surface. When the game runs windowed, the approximation introduced in a scaled window brings cumulative errors that appear as a progressive "smearing" effect. In this case, it might be better to read the data from the backbuffer surface that is not scaled, even if in such a way you get other troubles when scrolling (see it by yourself...). The only reasonable alternative: write game code in a better way, in my opinion!

Suppress clipper

DxWnd sets clipping on the primary surface. If the game does it the same way, there might be interferences. As a matter of fact, setting this flag is the only way to make "Pax Imperia Eminent Domain" working correctly.

Force clipper

Forces mouse clipping inside the main window client area. This is very useful if a fullscreen game doesn't provide for cursor clipping and there is horizontal or vertical scrolling.

Palette update don't blit

Avoid executing a blit operation in case of a palette update. This could be used to fix conflicts between GDI and ddraw palette updates.

Don't fix the Pixel Format

Do not try to fix the surface pixel format.

By default set no ALPHACHANNEL

By default, DirectDraw surfaces are created with alpha channel capability. This flag changes the default to create surfaces without alpha channel capability.

Auto primary surface refresh

Some badly programmed games (namely the "Cossacks" series) don't follow the specification to blit changes on screen, they just get the primary surface memory address and keep writing there. This option forces a periodic blitting of the primary surface on screen even if the game doesn't request it. You want a second example? It has not been easy to find, but "Crush! Deluxe" suffers the same problem.

Forced mode

Same as Auto Primary Surface Blit, but uses a dedicated thread to manage situations where the game doesn't process the message queue (e.g., during intro movies).

Set texture pixel format

Applies the virtual pixel format to texture surfaces that don't have an explicit DDSD_PIXELFORMAT attribute.

Suppress Release on backbuffer

This flag ensures that the DirectDraw backbuffer surface - a critical resource - will not be released in emulated modes, even if explicitly requested.

Flip emulation

Enabled by default, this flag remaps the DirectDraw Flip method which isn't supported on windowed primary surfaces to a corresponding Blt (blit) operation.

Compensate Flip emulation

By default, the Flip operation doesn't take into account the existing background. In several cases (mostly involving mouse cursor movement), this simplified method leaves trails on the screen. This option switches to a slower but more accurate method of Flip emulation that resolves this issue.


AERO handling

Set AERO compatible mode

Forces the program to declare its compatibility with AERO desktop mode by invoking the DirectDraw SetAppCompatData call, suppressing the switch from AERO to standard desktop mode. Useful for Windows Vista to Windows 8.

Optimize for AERO mode

Optimizes operations for the AERO environment. All stretching and color conversion operations are made on system memory surfaces, and then the final blit to screen doesn't break the AERO mode.


DirectX(2) tab:

Go to top

Ddraw tweaks

No primary SYSTEMMEMORY

DirectDraw applications have much better performance if they can operate on system memory rather than video memory, particularly when reading surface memory. Since the virtual primary surface has to be read before it can be transferred to the actual primary surface, it's best to use system memory offscreen surfaces whenever possible. Unfortunately, some programs request hardware acceleration functions that are only available for video surfaces. This flag forces the virtual primary surface to be created in system memory, sacrificing performance for compatibility.

No backbuffer SYSTEMMEMORY

Similar to the NOSYSMEMPRIMARY flag, but applied to the backbuffer surface. It's rare to need both of these flags, and which one to use depends on where the application performs the accelerated functions.

Lock/Unlock Pitch Fix

Some programs ignore the pitch value returned by the DirectDrawSurface::Lock method and fill the graphics buffer according to an incorrect predetermined pitch value. This discrepancy is caused when DxWnd creates virtual surfaces with varying pitch values that may not correspond to the original values when creating the surface on a different memory type (system memory and video memory). When this is happening to a hooked program, some elements may appear diagonally skewed. This flag resolves the issue by copying the graphic scan lines to the proper memory offset.

Width not power of 2 fix

Some programs produce texture surfaces of odd sizes, which are generally not supported but can be detected when the textures have an incorrect aspect ratio. This flag resolves the issue by copying the graphic scan lines to the proper memory offset. The most notable example of this issue is in Midtown Madness.

Fix ddraw ref counter

Decrement the reference counter of some objects to keep in proper account all service objects created internally by DxWnd.

Return 0 ref counter

Returns always a 0 reference counter when a surface / directdraw session is released.

Suppress overlay capability

Prevents the game from detecting any hardware overlay capability. Hardware overlay is very efficient, but not very flexible. If you run a program with hardware overlay in a window, you may be able to reposition and resize the window, but the blitted surface (the content of the window) doesn't move or change. This flag makes programs ignore hardware overlay capability so that you can move or stretch the window with expected results. The most notable example of this issue is in Moto Racer 2.

Set minimal caps

Simulates minimal hardware capabilities similar to what's available by the VirtualPC or VMWare emulators. Some older games may not support advanced features, in which case this flag can improve the rendering process and eliminate some artifacts.

Deinterlace movies

Interlaced movies on old games would improve their frame rate by only showing the odd horizontal lines of the video, leaving even lines black. The black lines weren't very noticeable on old monitors, but the effect becomes more pronounced on modern computers. This flag detects interlaced movies and interpolates the lines above and below each black line to approximate a full video, improving the video quality at the cost of some extra CPU usage.

Set ZBufferBitDepths capability

The dwZBufferBitDepths is an obsolete field in the DirectDraw surface descriptor. It is no longer set and should be ignored, but some old programs rely on the value of this field and may crash if the field is empty (contains the null value). This flag copies the value returned by the GetCaps method and places it into the dwZBufferBitDepths field. The most notable example of this issue is in Mech Commander 2.

Limit ddraw interface

Instead of using a specific version of DirectDraw, some programs simply request the most recent version available on the machine. Using a version of DirectDraw that is significantly newer than what was available when the game was developed may have poor results. This option hides newer versions of DirectDraw from the hooked program, basically allowing you to manually specify which version of DirectDraw the program should use. Choose a maximum DirectDraw version from the drop-down menu located near this option.

Forces HEL

Forces Hardware Emulation Layer.

Simulate BW monitor

Activate a tweak in the palette handling that causes all colors to be replaced with the corresponding grayscale color. It works only on 8BPP palettized games or while emulating 16BPP on a 32BPP desktop.

Set 16BPP RGB565 encoding

By default, DxWnd emulates 16BPP color with RGB555 encoding. The option forces RGB565. This option only impacts the video in emulation mode and with 16BPP color depth.

Make Backbuf attachable

Alters the size specification of the created backbuffer so that it copes with the actual primary surface, so that it may be attachable to a ZBUFFER surface. It makes “Dave Mirra Freestyle BMX” playable.

Clear texture FourCC

Experimental flag for tweaking games. DxWnd lets you dump, edit, and replace all uncompressed game textures. Textures compressed with a FourCC codec can't be processed this way.


This flag forces FourCC capabilities OFF in the capability query and in texture surface creation. This forces the game to use plain, uncompressed bitmap textures that can be easily tweaked.


To avoid texture errors, you may need to adjust texture flags. This flag was introduced to allow uncompressed textures for the game "The Sting!".

No EXCLUSIVE coop level

When running a program in windowed mode, DxWnd suppresses the DirectDraw DDSCL_EXCLUSIVE mode in the SetCooperativeLevel wrapper, since this mode is not allowed in windowed mode. However, if windowed mode is not requested, DxWnd leaves the cooperative level flags as they are, allowing DDSCL_EXCLUSIVE cooperative mode if requested. This flag also suppresses the DDSCL_EXCLUSIVE mode in fullscreen mode (that is, when DDSCL_FULLSCREEN is set). This flag is required when running "Warhammer 40,000: Rites of War" in non-windowed fullscreen mode.


Direct3D tab:

Go to top


Direct3D tweaks

Textures not power of 2 fix

Some games don't properly check whether the hardware can properly manage textures whose sizes are not a power of 2 (e.g. 16, 32, 64, 128 bits). If textures of a different size are processed by hardware without this capability, you get diagonal effects on the rendered image. The option fixes this problem.

Clean ZBUFFER @0.0 fix

Some games don't properly clear the zeta buffer between frames, producing incorrect surface z-ordering and other issues. This flag fixes this problem.

Clean ZBUFFER @1.0 fix

Some games don't properly clear the zeta buffer between frames, producing incorrect surface z-ordering and other issues. This flag fixes this problem. It is similar to ZBUFFER0CLEAN, but it works in different contexts.

Suppress D3D8/9 reset

Do not perform the D3D reset operation.

Suppress d3d9 extensions

D3d9.dll comes in different versions depending on the platform: on older windows releases it exports the Direct3DCreate API, while in more recent versions there are many further exported calls. The flag suppresses the additional entries.

Enumerate 16bit modes

On Windows 10, the list of available video modes (see DirectDraw8/9::EnumAdapterModes) may not include those with color depths lower than 32bpp while no fullscreen programs are running (known as "desktop composition mode"). This may impact games that need 8- or 16-bit color depth. This flag forces the inclusion of modes with 16-bit color depth. This option may help when a Direct3D8/9 program running on Windows 10 lacks the proper video mode and terminates.


Direct3D Window tweaks

Fix Windows Frame in D3D

Tries to prevent D3D from rendering on the whole window surface including the window border. It activates a small trick that causes the program to render to a child modal surface within the main window borders.

Don't move D3D rendering window

Do not try to update the window position and size on D3D rendering. In some cases, the window may be movable but the rendering area does not move with it. In this case, avoid moving the window at all. It is an experimental feature and doesn't always work.


Swap Effect

Forces Swap Effect

This experimental flag forces the selected SwapEffect mode during the CreateDevice/Reset methods. In some cases, it may improve compatibility or performance.


Texture handling

None

The default behavior. Does not apply special handling to textures.

Highlight

All hooked textures are replaced with a randomly-generated solid color. This makes it easier to see texel boundaries and texture usage.

Dump

All hooked textures that match the criteria in the Texture section of your dxwnd.ini configuration file are extracted as bitmap files and dumped into DxWnd's "texture.out" subfolder. The automatic filenames include a hash of the file's graphical content to make it easier to uniquely identify each texture.

Hack

This option replaces all hooked textures by calculating hashed filenames, looking for those names in DxWnd's "texture.in" subfolder, and using any matching textures that it finds there.


3D effects

Disable Textures

Remap all textures with a white texture (D3D only).

3D wireframe

As a fancy and easy action that DxWnd may implement on D3D and OpenGL programs (not ddraw ones!!), checking this flag will show the graphic in wireframe mode.

Disable Fogging

Disables the fogging effect (D3D only).

Clear target viewport

Forcefully invokes the Direct3D "Clean" method on the target surface every time the "BeginScene" method is invoked. Most games already do this, but some omit it because there were no undesired effects on the computers that were in use at the time. Running these games in windowed mode on modern platforms may show trails of previous frames. This flag cleans up graphical artifacts from old frames, resolving this issue.



Timing tab:

Go to top

Frame per Second

Frame per Second - Limit

Introduces a configurable delay between screen refresh operations, so that the FPS is limited accordingly.

Frame per second – Skip

Introduces no delay in the screen operations, but skips several screen updates so that the actual FPS value is limited without the program noticing it.

Frame per second – delay (msec)

The delay expressed in milliseconds to be used either for Limit or Skip operations.

Updates bigger than 1/4 screen size

DxWnd can display an FPS counter based on the number of screen updates per second. This counter is accurate for applications that update the entire screen, but produces wildly exaggerated figures when a program makes frequent updates to small sections of the screen, such as counters, icons, or other tiny elements. This flag tells DxWnd to ignore screen updates that affect less than one quarter of the screen, producing a more realistic FPS figure.

Show FPS on title

When checked, the FPS counter is appended to the window title.

Show FPS overlay

When checked, the FPS counter is drawn as an overlay of the program client area, in a corner of the screen and periodically and randomly moved to other corners to avoid accidentally overlap an important screen region.



Time stretching

Time Stretching – initial:

If this option is checked, DxWnd tries to emulate an accelerated (xn) or decelerated (:n) time flow. The value set in the listbox is the initial value, that can be altered by means of the time control slider in the time panel. When checked, DxWnd stretches time in timing API such as GetSystemTime(), the query performance APIs and the Sleep APIs, that are the most used ways to control a program timing.

Show time stretch

When checked, the time stretch ratio is drawn as an overlay of the program client area, in a corner of the screen and periodically and randomly moved to other corners whenever it is updated.

Fine time adjust

When checked, the time stretch ratio coarse becomes finer, from a 1.5 (50%)ratio to a 1.1 (10%) ratio for each tick. This allows a better and finer control of timing, despite the more limited range (about 0.5x up to 2.0x).

Enable Time Freeze

This switches between the normal time mode and a "locked" mode, where the time is not advancing at all. This sometimes produces weird effects, like having all characters in a game stand still while still being able to move the camera.

Intercept RTDSC opcode

The platform performance counter should be determined by calling the QueryPerformanceCounter() API. But there is a more direct way, that is calling the assembler RDTSC family instructions. When checked, DxWnd looks for RDTSC and RDTSCP instructions by disassembling the program text segment and replaces them with stretchable time counters.

Stretch timers

When checked, the window timers are stretched, namely the user32.dll timers set by SetTimer and the multimedia timers in winmm.dll set by timeSetEvent().

Normalize Performance Counter

Normalizes the system performance counter, simulating a clock speed of 1MHz. Some old games assume that this is the correct clock speed, and produce speed problems without this flag. This flag gives these old games the clock speed they depend on to run properly. Don't use this flag unless you are experiencing speed issues.



System speed

CPU slow down

Reduces a program's CPU usage by suspending and resuming all of its threads according to the specified ratio. Since the minimum timing resolution that the system can use for this operation is 1ms, (1/1000th of a second), high ratios may make the game appear choppy. This flag doesn't suspend high-priority threads.

CPU max usage

Same as CPUSLOWDOWN, but operates more selectively. This flag only suspends process threads that are consuming more CPU than the selected ratio. This option can't be set at the same time as CPUSLOWDOWN.

Ratio

Allows you to set a ratio for the slowdown used by the above flags. For example, a value of 2 will produce a ratio of 1:2, suspending the program for 1ms and then running it for 2ms, reducing that program's CPU usage by 33%.



Logs tab:

Go to top

dxwnd logs

None

No logs.

Overwrite

Logs will erase and overwrite an existing dxwnd.log file.

Append

If a log exists, logging messages will be added to the existing file. Otherwise, a new file will be created.

Separated

Each session will write to a new, separate log file named dxwnd<n>.log where n is the smallest usable number to avoid filename conflicts.


Logged info

DxWnd hacks

Enables the operation logging of all significant events that DxWnd performs to bring the fullscreen program in windowed mode.

DirectDraw trace

Enables the operation logging of DirectDraw operations.

Direct3D trace

Enables the operation logging of Direct3D operations.

Win Events

Enables logging of all Window messages intercepted in the application's queues, together with events that are generated or processed internally by the Peek/GetMessage APIs.

Cursor / Mouse

Enables extended logging of all cursor or mouse related operations.

** BEWARE ** some old games don't mind the possibility of concurrent use and perform mouse/cursor operations in close loops, so that this type of log can quickly grow quite big in size. In this case, consider the possibility to slow down the program by using the “Slow Down” flag.

Import Table

Enables extended logging of the Import Table as seen by the DxWnd program.

This can be quite useful to analyze and troubleshoot uncommon executables (e.g. when copy protections are applied).

Debug

Writes some more detailed information for diagnostic purposes.

Registry op.

Enables the operation logging of registry operations.

Hook op.

Enables the operation logging of hooking operations.


Log options

Output debug string

Each log message will be also generated as a debug message. This can be useful to show the logs while they occur by using a runtime scrollable view such as that offered by the DebugView.exe tool.

Add timestamp to log

Adds a timestamp with the system tick count (from GetTickCount() calls) to the beginning of each line in a log file.

Relative timestamp

If the "Add timestamp to log" option is on, the "Relative timestamp" option adds a timestamp to the beginning of each line in a log file that measures the duration between that line and the previous one. This makes it easier to spot long operations.


Libs tab:

Go to top

GDI

No GDI handling

Disables video-related GDI / user32 API hooking.

Scaled GDI calls

Scales GDI API coordinates to fit the window stretching.

Emulated Device Context

Handle an emulated GDI DC.

Share ddraw and GDI DC

Shares the window DC (device context) with the DirectDraw primary surface DC. These contexts can have very different interactions in fullscreen and windowed modes. In windowed mode, what usually happens is that one DC layer overlaps the other and produces flickering. This option merges the graphic content of GDI on top of the primary surface of DirectDraw.

Remap Client Rect

Enabled by default, makes DxWnd remap the window client coordinates so that the program receives the same values as if the program was running in fullscreen mode.

Scale font parameters

Tries to scale font parameters to fit the window stretching.

Suppress FillRect

It is quite common for a fullscreen program to start its activities by clearing the desktop through a FillRect of the whole desktop area. Though this operation is usually intercepted and redirected to the windowed area, if it fails this flag bypasses that FillRect call.

Fix clipper area in shared DC

In SHAREDDC mode, this flag tries to compensate for clipping problems between the program window and other windows on the desktop. It is not currently fully implemented, so it is discouraged for now.

Syncronize GDI to ddraw palette

Makes DirectDraw palette emulation aware of palette changes made through GDI calls.

Suppress Win common errors

Makes system libraries return success in all cases where the error could depend on the windowed environment, but can be safely ignored. Currently, it only suppresses errors in the DestroyWindow user32 call.


Smack

Hook Smackw32

Hooks Smackw32 to avoid tight looping, allowing debugging, tracing, and future expansions. When this flag is active, the SmackOpen call activates a thread that ensures that all frames are refreshed to the screen (similar to the "Auto Primary Surface Blit" option in DirectDraw Surface Handling).

Fix Smack loop

Fixes a Smack loop by inserting processmessage and blit operations between frames. During the playback of Smack movies (which typically have an .smk extension), the screen may not get updated, which is detected by the OS and killed as a nonresponsive program. The intro movies in the game "Galapagos" benefits from this flag.


OpenGL

Hook OpenGL

Enables OpenGL API hooking.

Force Hook

Experimental – probably unnecessary.

Fix glPixelZoom args

Scales the xfactor and yfactor parameters of the glPixelZoom OpenGL call. Use this flag if the OpenGL screen is not properly scaled to fit the main window.

Fix glBindTexture texture

Recent OpenGL releases for Windows omit the glActiveTexture function, preventing the application from correctly switching textures. The visible effect is a replication of a single texture instead of the coordinated use of multiple textures to compose a screen.

Hook glut32

This flag hooks the glut32.dll OpenGL extension library to fix issues with some OpenGL games.

Custom OpenGL library

By default, DxWnd detects OpenGL APIs within the standard OpenGL32.dll library. The field allow to set a different filename for any custom OpenGL implementation that may refer to a different library name.


MM (Multimedia)

Remap MCI coordinates

Finds and scales the movie coordinates that may be embedded in the MciSendString command string. It may fix movie sizes when they are played using the MciSendString winmm call.

No movies

Skips movies whenever possible - that is, when performed through explicit movie handling calls.

Stretch ActiveMovie window

Several window classes are devoted to playing multimedia. This flag detects the known multimedia windows and stretches their size to cover the full main window area.

Fix movies color depth

Fixes the color depth of VFW (Video For Windows) movies by forcing their value to the color depth of the virtual desktop.

Bypass MCI calls

Several games perform MCI operations (e.g. to check for a CD-ROM) that are not essential and may cause errors. This flag bypasses MCI calls when possible and returns a positive result.

Compat. tab:

Go to top

Tweaks

Block process priority class

Blocks a process's attempts to change its own priority class. Old fullscreen games may use this trick to get 100% CPU power dedicated to them, but on modern OS's and windowed environments this could be a bad idea, interfering with other operations and overheating the processor for no reason.

Set single core process affinity

Some games are not properly synchronized to run on physically separate multiple core CPUs, or simply don't properly handle powerful CPUs. This option sets the program's core affinity so that the program is run by a single core (the first one).

Set last core affinity

Same as single core process affinity, but picks the last CPU core.

Limit available resources

Makes the query for available resources (either RAM, hard disk free space and so on) to return a limited value: some old games can't handle a very big integer number and see it as a negative value, refusing to start.

Disable performance counter

Since performance metrics hardware is not mandatory on a PC, this flag disables the GetPerfCounter() performance metrics API, simulating an unsupported condition. Usually, in this condition the software should rely on other performance measurement metrics that are more conveniently manipulated by DxWnd timing hooks. It should be set when, despite the time acceleration feature, the program doesn't seem to behave according to the imposed speed ratio.

Bypass font unsupported api

Some games may attempt to manage old font styles that were present by default on legacy platforms and are no longer supported. This flag simulates a success operation to let the program continue. Of course, the font will be wrong, but Windows will approximate the choice with the most similar available font.

Replace privileged opcodes

Real multitasking OS's (from Windows NT onward) forbid applications from using privileged instructions that directly manipulate the hardware, like the IN opcode. Running a program with such opcodes would result in a program exception on modern systems. This option scans the program code segment at startup and replaces all detected privileged operations with NOP (no operation) instructions. Since these opcodes are often dedicated to interactions with sound hardware, the program will likely work with the possible side effect of some audio issues. Use this flag for games like Ubik.

Suppress IME

The flag tries to suppress IME windows, though that is not fully working yet!

Handle exceptions

Setting this flag causes DxWnd to set its own exception handler that tries (and often succeeds!) to fix several common exceptions such as the divide by zero exception of old games that were trying to calculate the CPU speed.

Diablo tweak

A flag that seems to improve Blizzard's "Diablo" compatibility. It should not be used for other games and will cease to be supported as soon as a more general tweak is discovered.

Intercept Imagehlp.dll

Intercept imagehlp.dll unsupported calls, returning a clean error condition so that the program doesn't crash. One notable game that needs this flag is The Fifth Element.

EA Sports hack

Intercept and neutralize some of the internal hooks usually set by "EA Sports" games, and possibly other titles as well.

Reserve legacy memory segments

Old 16-bit programs for Windows 95 and 98 relied on the availability of memory from address 0x4000000 to 0x8FFFFFF, even though they never explicitly allocated it. Recent OS's don't guarantee this memory availability. This flag, combined with DLL injection, reserves memory in this range when the program starts up, before that memory can be used for other purposes.

Disable Max Windowed Mode

Invoke DirectDraw SetAppCompatData(12,0) to set the DisableMaxWindowedMode.

Disable "disable Alt-Tab"

Disable the compatibility patches that disable the Alt-Tab key combination to avoid window switching, along with other similar key combinations. Usually, programs hooked by DxWnd can afford window switching with no impact, either by default or by setting the UNNOTIFY flag.

Win7 color fix

As described in a DirectDraw hack, this flag fixes a color problem that Windows 7 has with 8BPP palettized modes. It only has an effect when the screen is actually set to an 8BPP color depth, which is now very rare.

Fix GlobalUnlock

Fixes a reported problem of the 16-bit GlobalUnock() API's 32-bit port. In some cases, it never returns the expected value, causing game crashes or endless loops.

Fix FreeLibrary

Fix FreeLibrary, simulating a return code of 0 (error) when attempting to free an unallocated module as Windows 95 and 98 would. Use this flag to fix the endless loop problem in "Heavy Gear" version 1.2.



Registry

Emulate registry

Intercepts registry read operations so that missing entries are replaced by the values in DxWnd.reg file. (Registry tab)

Override registry

Intercepts registry read operations so that missing and existing entries are replaced by the values in DxWnd.reg file. (Registry tab)

Set KEY_WOW64_64KEY flag

Set the KEY_WOW64_64KEY value in registry system calls so that they are forced to search in the native 64-bit section of the registry in 64-bit platforms.

Set KEY_WOW64_32KEY flag

Set the KEY_WOW64_32KEY value in registry system calls so that they are forced to search in the 32-bit section of the registry in 64-bit platforms.



Fake version

Fake Version

Causes the program to detect the chosen Windows release. Notice: this is not the same thing as the compatibility setting of the Windows properties panel, that also adjust the system's behaviour to emulate the chosen platform.



GOG

Hook GOG libs

Games distributed by GOG (gog.com) sometimes apply compatibility patches by changing the name and compatibility behavior of some system DLLs and routing system calls here. This flag causes DxWnd to hook these custom libraries instead of the system equivalent. Only use this flag on certain GOG games.

Bypass GOG libs

The purpose of this flag is similar to that of HOOKGOGLIBS. It is sometimes a better solution to avoid rerouting the system calls to custom DLLs and instead map them to system DLLs. This flag breaks GOG's system call rerouting. Only use this flag on certain GOG games.



I/O Tweaks

Fix buffered I/O after Win8

Windows 98 was the last platform to support asynchronous disk I/O from devices such as CD-ROMs. This flag suppresses requests for asynchronous mode, avoiding errors from this operation.

Set CDROM Drive Type

Simulates each disk device to appear as a CDROM type. This allows you to copy the content of some CD's onto a hard disk and override the disk type controls that form some very basic copy protection schemes.

Hide empty CDROM drives

Some old games didn't handle the possibility of having multiple CDROM devices and simply look for the game in the first available CDROM. If you have physical and virtual CDROM devices in your system, it may become complicated to insert a physical CD on a virtual device (or vice versa). This flag removes any CDROM devices that don't mount a CD from the list of available devices, so that you can simply unmount all disks except for the desired one.



Go to top