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

Difference between revisions of "Glossary:DirectX/DirectDraw troubleshooting"

From PCGamingWiki, the wiki about fixing PC games
(Explanation and alternative fix)
m (→‎Cause: Added code tags.)
Line 2: Line 2:
  
 
==Cause==
 
==Cause==
This issue appears to be caused by how more recent versions of Explorer.exe render graphics.  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.
+
This issue appears to be caused by how more recent versions of <code>Explorer.exe</code> render graphics.  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 set their own palette, which causes the odd colors.
 
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 set their own palette, which causes the odd colors.

Revision as of 04:17, 12 March 2012

In Windows 7, Vista and XP some older games have an odd color issue. Harsh basic colors will appear in different areas, particularly in black portions of the screen in many games designed for Windows 95 such as Command & Conquer and Age of Empires II. While the games remain playable, the bad coloration can be found to be distracting.

Cause

This issue appears to be caused by how more recent versions of Explorer.exe render graphics. 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 set their own palette, which causes the odd colors.

Fixes

The most basic fix is to kill the Explorer.exe process either before running the application via the command line or alt-tabbing out of the program and then killing the Explorer.exe process. Alternatively, there is a patcher for old games written by mudlord here (the original link no longer works, but there is a mirror here, or if you Google for the filename w7ddpatcher.zip).

Scripted Fix

The fix can be scripted with a BAT file which will kill Explorer.exe, run the game in question, and then restart Explorer.exe once you have exited the game. Below is an example. Where the text between the square brackets describes the text.

 REM -[ScriptName].bat
 taskkill /F /IM Explorer.exe
 [Path to game executable]
 start explorer.exe

You can place the BAT file on the desktop for some games, but others require that it be in the same folder as the EXE. In those cases, only use the executable name in place of the entire path and create a shortcut on your desktop to the executable.

Sources