Glossary:DirectX/DirectDraw troubleshooting
Manifestation
- Windows XP, Vista and 7 have compatibility issues with DirectDraw games using 256-color depth resulting in incorrect colors.
- On Windows 7, these applications can also fully lock up the display, requiring a hard reset of the system.[1]
- This color issue does not occur on Windows 8 and later, but DirectDraw compatibility is still low in general.
Affected titles
Cause
This issue appears to be caused by explorer.exe
resetting the system palette, essentially overwriting the palette defined by the game (hence the rainbow colors). This is evidenced by how taking a screenshot of an affected game will show just the discoloration with black where the other game assets would be rendered and by the fix itself.
These games rely on DirectDraw, an API in DirectX (versions 7 and earlier) which was used to render graphics and is now deprecated. They used an exclusive color palette; they would set the system palette (the colors the system can use, back when there were only 256 colors) to the palette the game wants to use. However, some applications try to set their own exclusive palette, causing conflicting colors since the game's exclusive palette is no longer actually exclusive and is set to the wrong colors. In newer versions of Windows, CSRSS and the desktop window (explorer.exe
) set their own palette, which causes the odd colors.[2]
Fixes
Custom DirectDraw wrappers
- These are small
.dll
files which are to be placed in the same directory as the target game's executable. They differ in implementation. - The choice of the wrapper is handled case-by-case. Try several of them out and compare their performance until the ideal solution is reached.
- cnc-ddraw - converts API calls to Direct3D 9, OpenGL or GDI; additionally supports framerate limiting, vertical sync, mouse sensitivity scaling, borderless windowed mode, and upscaling via GLSL
- DDrawCompat - no API conversion, tries to fix broken calls rather
- DXGL - converts API calls to OpenGL
- DxWrapper - uses a combination of multiple methods
- WineD3D - based on Wine's Direct3D emulation, converts API calls to OpenGL
General DirectX emulators
- DxWnd was originally created to enable old DirectX games to run in a window. Currently, it provides even more features: It can fix the odd rainbow color issue, enable time stretching, and you can decide between running the game in a window or in full screen.
- dgVoodoo 2 converts old DirectX and Glide calls to Direct3D 11/12 ones.
Tool-based
- DirectDraw Compatibility Tool is designed to fix color palette corruption in old games.
- w7ddpatcher is another simple method.
- PalettestealerSuspender prevents palette issues using a different method.[3]
- Display Changer II changes the Windows desktop width, height, color depth, refresh rate, and rotation temporarily or permanently (via a configuration file). Can also run an application in a specific display setting and return to the previous resolution when the application closes.
Registry hack
- Windows 7 actually has a built-in, hidden fix for this issue, but requires editing the registry.
Registry hack[4] |
---|
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\DirectDraw\Compatibility\<NameOfGame>] "Flags"=hex:00,08,00,00 "ID"=hex:00,00,00,00 "Name"="game.exe" 7. Save the file as |
Kill Explorer process with batch script
Use a batch script |
---|
TASKKILL /F /IM "explorer.exe" start /w [insert executable name here].exe start explorer.exe
|
See also
References
- ↑ DirectDraw applications Freeze on Windows 7 anywhere between 1 minute and 3 hours into running them - Microsoft Answers
- ↑ gdi - "Exclusive" DirectDraw palette isn't actually exclusive - Stack Overflow
- ↑ Bed Against The Wall: Solving Color Problem (Red Grass, Purple Water) In Age Of Empires 2: Age Of Kings (The Conquerors And Others Too) On Vista And Windows 7
- ↑ https://www.neowin.net/forum/topic/927140-win7-fixing-old-256-color-games-with-distorted-palettes/