Anonymous edits have been disabled on the wiki. If you want to contribute please login or create an account.


Warning for game developers: PCGamingWiki staff members will only ever reach out to you using the official press@pcgamingwiki.com mail address.
Be aware of scammers claiming to be representatives or affiliates of PCGamingWiki who promise a PCGW page for a game key.

Glossary:DirectX/DirectDraw troubleshooting

From PCGamingWiki, the wiki about fixing PC games
< Glossary:DirectX
Revision as of 22:36, 10 December 2019 by DenBkh (talk | contribs) (→‎Fixes: DirectDraw Compatibility Tool)
This page may require cleanup to meet basic quality standards. You can help by modifying the article. The discussion page may contain useful suggestions.

Key points

Windows XP, Vista and 7 have compatibility issues with DirectDraw games using 256 color depth resulting in incorrect colors.
On Windows 7, these applications could also fully lock up the display requiring a hard reset.[1]
This color issue does not occur on Windows 8 and later; the steps below only apply to earlier versions.

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.

A more technical explanation: These games rely on DirectDraw, an API in DirectX which was used to render graphics which is now deprecated. More specifically, they used an exclusive palette, where they 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

DirectDraw Compatibility Tool

DirectDraw Compatibility Tool is designed to fix color palette corruption in the old games.

w7ddpatcher

w7ddpatcher is the simplest and best method.[citation needed]

PalettestealerSuspender

PalettestealerSuspender prevents palette issues using a different method.[3]

DxWnd DirectDraw emulation

DxWnd was originally created to enable old DirectX games to run in a window. Nowadays it provides far 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.

Registry hack

Windows 7 actually has a builtin, hidden fix for this issue but requires editing the registry.
Reg-hack[4]
  1. Run your game at least once and exit out of it.
  2. Go to the registry and navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DirectDraw\MostRecentApplication (if you're using 64 bit, go to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\DirectDraw\MostRecentApplication)
  3. Take a note of the name, game.exe, and the ID, which looks similar to this: 0x02e41c67
  4. Remove the '0x' part of the ID and separate the values into pairs, like this: 02 e4 1c 67
  5. Take the pairs and reverse their order, like this: 67 1c e4 02
  6. Open Notepad and add the following. Change NameOfGame to whatever you want, leave Flags alone, enter your own ID keeping commas intact, and change game.exe to whatever it is.

32 bit only

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DirectDraw\Compatibility\<NameOfGame>]
"Flags"=hex:00,08,00,00
"ID"=hex:00,00,00,00
"Name"="game.exe"

or
64 bit only

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 it as fix.reg and run it to import it to the registry.

Not the best method for new users as editing the registry incorrectly can damage your OS.

Kill Explorer with batch script

Paste the following into a text editor and save as a batch script. Run it from the game's folder:

TASKKILL /F /IM "explorer.exe" 
start /w [insert executable name here].exe 
start explorer.exe
If script fails/crashes before it restores the Explorer, you will be left with a blank desktop screen and will have to manually restart the process by the windows key+R to bring up the run dialog and typing "explorer.exe"

See also


References