Solution to playing the screen of old games in Windows 7
Playing old games in Windows 7, such as Starcraft, will be blurred.
This is because of the compatibility problem of the 256 color palette of DirectDraw in win7. It is said that it is the default configuration,ProgramYou cannot obtain the color palette lock.
A simple solution is to kill the explorer process. It is estimated that this will stop the desktop topic from modifying the palette.
However, this is not a permanent solution.
After searching on the internet, we found such a solution.
DirectDraw has a registry key used to enable the compatibility mode.
HKEY_LOCAL_MACHINE \ SOFTWARE \ wow6432node \ Microsoft \ DirectDraw \ compatibility
HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ DirectDraw \ compatibility
Add the EXE to enable compatibility mode under this registry key, for example:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE \ SOFTWARE \ wow6432node \ Microsoft \ DirectDraw \ Compatibility \ starcraft116]
"Name" = "Starcraft. EXE"
"ID" = HEX: Ca, 89,65, 49
"Flags" = HEX: 00,08, 00,00
The corresponding program runs in compatible mode.
Among the three key values, name is the program file name, flags is a constant, and ID is the timestamp of the program.
Taking Starcraft 1.161 as an example, we can use the CFF assumerto open starcraft.exe, find the timedatestamp item in the NT headers-file header, and find its value is 496589ca.
This integer is written in the form of low byte priority (little-Endian), which is ca, 65, 49. This is the ID value in the registry.
Some solutions on the Internet claim that the ID record under HKEY_LOCAL_MACHINE \ SOFTWARE \ wow6432node \ Microsoft \ DirectDraw \ mostrecentapplication is the timestamp of the last running game.
However, I found inconsistency during verification.
In this way, Starcraft can run properly on my machine.
In addition, another method is to hook the DirectDraw function. See
However, this is achieved through software-based indexing-> color conversion, without the use of video card acceleration, in the running of Starcraft comparison card.
However, this method can be implemented simply by placing a ddraw. dll file in the program folder, which is convenient.
Maybe someone will use DirectX or OpenGL to simulate the DirectDraw function in the future, which can solve this problem well.