This page contains very early version of simple wrapper which improves compatibility of Dangerous Waters with Windows 8 and Windows 10.
Background of the problem(s)
- The Windows 8+ does not directly support 16-bit display modes anymore. For old applications it provides a thin emulation layer which transparently changes the parameters used to create the default back buffer from R5G6B5 to X8R8G8B8. This works well for applications which render geometry using the standard drawing calls and do not care about the real layout of the buffer. Unfortunately DW draws its UI by locking the buffer and manually writing it here. While the game seems to contain some code to support 32bit back buffers, it was likely not tested, does not work and will crash the game.
- On Windows 10 (at least Nvidia driver) the Present call will generate black screen if the device was created with D3DSWAPEFFECT_COPY swap effect.
- The game can not deal with situation when no R5G6B5 display mode is enumerated by the DX8 API resulting in invalid parameters sent to the CreateDevice call.
- The game does not call IDirect3DDevice8::SetCursorPosition so if OS decides to not use the system cursor in the fullscreen mode, the game cursor will be not moving.
What the wrapper does
- Redirects all rendering of the game to separate new lockable 16-bit color buffer and when the game wants to show the result, it blits that buffer to the 32-bit one created by the compatibility layer. Please note that the wrapper is designed to work with DW and it only implements the minimal functionality required by the game.
- Replaces the swap effect with D3DSWAPEFFECT_DISCARD and removes unnecessary D3DPRESENTFLAG_LOCKABLE_BACKBUFFER flag just to be sure.
- Changes the display mode enumeration to report all X8R8G8B8 modes as R5G6B5 and ignore all other modes. Can be disabled by setting environment variable D3DEMU_NO_FAKE_16BIT_DISPLAY_MODES to any value.
- Calls IDirect3DDevice8::SetCursorPosition before each Present with the current position of the mouse when operating in the fullscreen mode. Can be disabled by setting environment variable D3DEMU_NO_MOUSE_CURSOR_UPDATE to any value.
Installation
Unpack the archive to the game directory.
Download
Version 0.04 (8.10.2023) - Very experimental.
Source code
- Workaround for display mode initialization failure on Windows 10
- Workaround for non-moving mouse cursor on Windows 10
History
Version 0.03 (27.2.2022) - Very experimental.
Source code
- Fixed crash when changing resolution in game.
- Support for windowed mode even on 32-bit desktop without compatibility mode in the Steam version
Version 0.02 (3.8.2015) - Very experimental.
Source code
- Fixed black screen on Windows 10.
Version 0.01 (26.10.2014) - Very experimental.
Source code
- Initial version. I did only minimal testing. There is a known issue with crash when trying to change resolution in game options screen. Until that issue is fixed, edit dangerouswaters.ini to change the resolution.