How I fixed corrupt color palette on some old games on Windows 7

Blue Steel

New member
Remember: Backup your registory prior to making any changes to it - Safety First ;)

Step 1: Download / install and run Procmon.exe

Step 2: Run game with all default compatability settings ( eg: none except maybe "run as admin"

Step 3: Alt Tab out of game to Procmon window

Step 4: setup a filter on Procmon -> Path : to "DirectDraw\MostRecentApplication" set as include

Step 5: all going well it should show some entries relating to your game ;)

Step 6: Look at the ID (it'll show up as a DWORD.) you'll need to convert this to a hex value

Step 7: open up regedit.exe and go to section "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DirectDraw\Compatibility\"

Step 8: Make a new Key in there naming it to something that resembles the game your running

Step 9: make a new Binary value and name it "Flags"

Step 10: double click on that newly created field and type in the Hex values " 00 08 00 00"(it will add in the spaces for you) then press enter

EDITED Step 11: make a new DWORD value and name it "ID"

EDITED Step 12: double click on that newly created field and type in the values you've converted DWORD value as DECIMAL then press enter

Step 13: make a new string value entry named "Name"

Step 14: double click on that newly created field and type in the text from Procmon as displayed for the Name of the program

Step 15: export the entries that you've just made as a backup for future use (eg: on a rebuild of your computer or something)

Below are samples of games that had corrupted palletes that are now showing correct on my computer, eg:Age Of Empires, Age Of Empires Expansion, Age of Empires 2, Age of empires 2:Conquerers, StarCraft.


EDITED CODE BELOW TO ADD SOME MORE ENTRIES AS I'VE FOUND THAT THE AUTOMATED METHOD STILL DIDN'T WORK AFTER HAVING TO REBUILD MY SYSTEM. i'VE REVERTED BACK TO MY OLD MANUAL METHOD

Code:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DirectDraw\Compatibility\AGE2_X1.ICD]
"Name"="AGE2_X1.ICD"
"Flags"=hex:00,08,00,00
"ID"=dword:3b7433ec

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DirectDraw\Compatibility\EMPIRES2.ICD]
"Flags"=hex:00,08,00,00
"ID"=hex:df,d1,81,39
"Name"="EMPIRES2.ICD"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DirectDraw\Compatibility\aoe2_x1]
"Flags"=hex:00,08,00,00
"ID"=hex:ec,33,74,3b
"Name"="age2_x1.exe"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DirectDraw\Compatibility\StarCraft116]
"Flags"=hex:00,08,00,00
"ID"=hex:ca,89,65,49
"Name"="Starcraft.exe"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DirectDraw\Compatibility\EMPIRES.EXE]
"Name"="EMPIRES.EXE"
"Flags"=hex:00,08,00,00
"ID"=dword:353f8679

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DirectDraw\Compatibility\EMPIRESX.EXE]
"Name"="EMPIRESX.EXE"
"Flags"=hex:00,08,00,00
"ID"=dword:35ec85c2

AFTER ORIGINALLY POSTING THE MESSAGE I'VE FOUND OUT THAT IT WORKS EVEN IF YOU ENTER THE ENTRY IN STEP 12 AS A DECIMAL dword AS OPPOSED TO A HEX VALUE .. THUS MAKING IT EASIER TO FOLLOW AND DO (NOTE i HAVN'T CHANGED THE OLD HEX VALIES IN THE CODE AS THEY TOO WORK ;) ..

enjoy
 
Last edited:

My Computer

OS
Windows 7 Ultimate X86
Awesome fix, thanks for contributing Blue Steel!

Walker
Windows Outreach Team
 

My Computer

Computer Manufacturer/Model Number
HP Pavilion dm3 (netbook) *** 27" iMac (Dual-Boot)
OS
Windows 7 Home Premium (64-bit) *** Windows XP SP3 (32-bit), OSX 10.6
CPU
AMD Athlon Neo X2 1.6GHz *** Intel Core i7 Quad Core 2.8GHz
Memory
4.00 GB *** 4.00 GB
Graphics Card(s)
ATI Radeon HD 3200, 384MB *** ATI Radeon HD 4850, 1GB
Sound Card
ATI High Definition Audio *** ATI High Definition Audio
Monitor(s) Displays
LG Flatron W2053TX
Screen Resolution
1600 x 900 (monitor), 1266 x 768 (laptop) *** 2560 x 1440
Hard Drives
300 GB SATA (internal), 500 GB HP SimpleSave (external) *** 1 TB SATA (internal), 160 GB LaCie (external)
Mouse
Logitech Cordless Optical Mouse for Notebooks
Internet Speed
Broadband
Last edited:

My Computer

OS
Windows 7 Ultimate x64
CPU
AMD Phenom II 1055T
Memory
4GB DDR3 1333
Graphics Card(s)
ATI Radeon 5770
Hard Drives
Seagate 1TB
Hitachi 500GB
PSU
Antec 520
Wow that was quick ;) thanks mudlord

I know you said its for x64 only but i'd appreciate it if you could change it see what OS (ie: x86 or 64bit) is being used and then have it apply according to the OS your running this great patcher.

I know a little C Code and can see what its doing but i don't know enough to add in a feature like this..

OR

If you could just have 2 buttons patch x86 and patch 64Bit.

either way would work.. i know that the first way IS possible just don't know how to do it. and I'd prefer it done that way if possible
 

My Computer

OS
Windows 7 Ultimate X86
Try now, it should distinguish between x64 and x86 Windows 7/Vista OSes and patch accordingly.
 

My Computer

OS
Windows 7 Ultimate x64
CPU
AMD Phenom II 1055T
Memory
4GB DDR3 1333
Graphics Card(s)
ATI Radeon 5770
Hard Drives
Seagate 1TB
Hitachi 500GB
PSU
Antec 520
sorry your patch program is coming up with incorrect info..

i just ran it on starcraft.exe ( starcraft 1 no expansion installed)

here is your generated code
Code:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DirectDraw\Compatibility\StarCraftDemo]
"Name"="Starcraft.EXE"
"ID"=hex:6b,56,91,35
"Flags"=hex:00,08,00,00
here is the correct code
Code:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DirectDraw\Compatibility\StarCraft116]
"Flags"=hex:00,08,00,00
"ID"=hex:ca,89,65,49
"Name"="Starcraft.exe"
as you can see your patcher is getting the wrong flags for this game

BTW thank you for trying to get this working ;)
it'll certianly make things easier than all the steps i'be posted

edit: added

I just ran it again on the same executable and got a totaly different result yet again
Code:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DirectDraw\Compatibility\SWarClass]
"Name"="StarCraft.exe"
"ID"=hex:71,a2,eb,4a
"Flags"=hex:00,08,00,00
 
Last edited:

My Computer

OS
Windows 7 Ultimate X86
Its fine, delete the old entries, and leave SWarClass.

As you see in the source, I use the window class ID to generate the registry entry name. The key is actually not worrying about precise subkey names. I just used the window class ID as thats a easy identifier. I could make it the process ID, if people want though for consistancy.
 

My Computer

OS
Windows 7 Ultimate x64
CPU
AMD Phenom II 1055T
Memory
4GB DDR3 1333
Graphics Card(s)
ATI Radeon 5770
Hard Drives
Seagate 1TB
Hitachi 500GB
PSU
Antec 520
I'd prefer seeing it and having it generate the same values for the same game every time.. to me its very disconcerting and seems dirty having the patcher come up with different entries for the same game. getting it to use consistant keys and names etc.. would also make it easier to check for and get rid of duplicates. (you could even get your patcher to check then too .. then have it prompt wither to replace / update / delete (delete is for in case the patcher doesn't fix the problem) etc...

PS: sorry to be so picky ;)
 

My Computer

OS
Windows 7 Ultimate X86
You certainly don't ask for much, do you? :sarc:

It can't get the keys already there, thats not happening. Application class IDs don't change when updates are made, so its best to just reapply on updates.
 

My Computer

OS
Windows 7 Ultimate x64
CPU
AMD Phenom II 1055T
Memory
4GB DDR3 1333
Graphics Card(s)
ATI Radeon 5770
Hard Drives
Seagate 1TB
Hitachi 500GB
PSU
Antec 520
Nice work guys!
Great stuff!
 

My Computer

Computer Manufacturer/Model Number
Self Built
OS
Windows 7 Ultimate x64
CPU
[email protected]
Motherboard
MSI P67A-GD80 B3
Memory
Corsair Vengeance 1600MHz 16GB
Graphics Card(s)
MSI Geforce 580 Twin Frozr II @ SLI
Sound Card
Creative Sound Blaster Pro (USB)
Monitor(s) Displays
Dell Ultrasharp 27"
Screen Resolution
2560x1440
Hard Drives
Intel 510 Series 250GB SSD
Corsair Reactor Series 120GB SSD
WD Caviar Black 1TB
3x External HDD's.
PSU
Corsair AX 1200W
Case
Corsair Obsidian 800D
Cooling
Antec Kuhler H2O 920 & 3x Scythe Gentle Typhoon AP-15
Keyboard
Mionix Cibal 60
Mouse
CM Storm SENTINEL
Internet Speed
Pretty Fast

My Computer

Computer Manufacturer/Model Number
Self
OS
Main - Windows 7 Pro SP1 64-Bit; 2nd - Windows Server 2008 R2
CPU
Main - Core i7 2600K; 2nd - Core i7 920
Motherboard
Main - Asus P8Z68-V Pro/Gen3; 2nd - Gigabyte GA-EX58-UDR3
Memory
Main - 16GB Corsair Vengeance; 2nd - 12GB Corsair Vengeance
Graphics Card(s)
Main - XFX Radeon 6870 1GB; 2nd - XFX Radeon 4870 1GB
Sound Card
Both: Onboard Realtek Azalia
Monitor(s) Displays
Main - Hann 25" + I-INC 25" + Acer 23"; 2nd - Upgrading Soon
Screen Resolution
Main - 1920x1080 (All Three Monitors); 2nd - Upgrading Soon
Hard Drives
Main - (1) Crucial M4 128GB (Boot)
Main - (1) Seagate 2TB 64MB Cache (Data)
Main - (1) Seagate 2TB 64MB Cache (Data Backup)
2nd - (1) Intel X25-M SSD 80GB (Boot)
2nd - (3) Seagate 1TB 32MB Cache (Data Backup)
2nd - (1) Seagate 320GB (Because)
PSU
Main - OCZ 600W Modular; 2nd - OCZ 600W
Case
Main - Thermaltake Element G; 2nd - NZXT something or other
Cooling
Main - Corsair H80; 2nd - Prolimatech Megahalems
Keyboard
Main - Razer Reclusa; 2nd - Old MS Keyboard
Mouse
Main - Logitech MX Revolution; 2nd - Old MS Mouse
Internet Speed
20Mbps Time-Warner Cable
I'll need to recompile it.

I'll upload it when thats done.

edit: mudlord.info/binaries/w7ddpatcher.zip
 

My Computer

OS
Windows 7 Ultimate x64
CPU
AMD Phenom II 1055T
Memory
4GB DDR3 1333
Graphics Card(s)
ATI Radeon 5770
Hard Drives
Seagate 1TB
Hitachi 500GB
PSU
Antec 520
Sorry it's taken me so long to get back to you, mudlord. I must be doing something wrong. I run the patch, it claims success, but no change.

Any advice? :)
 

My Computer

Computer Manufacturer/Model Number
Self
OS
Main - Windows 7 Pro SP1 64-Bit; 2nd - Windows Server 2008 R2
CPU
Main - Core i7 2600K; 2nd - Core i7 920
Motherboard
Main - Asus P8Z68-V Pro/Gen3; 2nd - Gigabyte GA-EX58-UDR3
Memory
Main - 16GB Corsair Vengeance; 2nd - 12GB Corsair Vengeance
Graphics Card(s)
Main - XFX Radeon 6870 1GB; 2nd - XFX Radeon 4870 1GB
Sound Card
Both: Onboard Realtek Azalia
Monitor(s) Displays
Main - Hann 25" + I-INC 25" + Acer 23"; 2nd - Upgrading Soon
Screen Resolution
Main - 1920x1080 (All Three Monitors); 2nd - Upgrading Soon
Hard Drives
Main - (1) Crucial M4 128GB (Boot)
Main - (1) Seagate 2TB 64MB Cache (Data)
Main - (1) Seagate 2TB 64MB Cache (Data Backup)
2nd - (1) Intel X25-M SSD 80GB (Boot)
2nd - (3) Seagate 1TB 32MB Cache (Data Backup)
2nd - (1) Seagate 320GB (Because)
PSU
Main - OCZ 600W Modular; 2nd - OCZ 600W
Case
Main - Thermaltake Element G; 2nd - NZXT something or other
Cooling
Main - Corsair H80; 2nd - Prolimatech Megahalems
Keyboard
Main - Razer Reclusa; 2nd - Old MS Keyboard
Mouse
Main - Logitech MX Revolution; 2nd - Old MS Mouse
Internet Speed
20Mbps Time-Warner Cable
what game are you trying.. you could also try it manually as I set out in the first message of this thread
 

My Computer

OS
Windows 7 Ultimate X86
Age Of Empires II: Conquerors Expansion
 

My Computer

Computer Manufacturer/Model Number
Self
OS
Main - Windows 7 Pro SP1 64-Bit; 2nd - Windows Server 2008 R2
CPU
Main - Core i7 2600K; 2nd - Core i7 920
Motherboard
Main - Asus P8Z68-V Pro/Gen3; 2nd - Gigabyte GA-EX58-UDR3
Memory
Main - 16GB Corsair Vengeance; 2nd - 12GB Corsair Vengeance
Graphics Card(s)
Main - XFX Radeon 6870 1GB; 2nd - XFX Radeon 4870 1GB
Sound Card
Both: Onboard Realtek Azalia
Monitor(s) Displays
Main - Hann 25" + I-INC 25" + Acer 23"; 2nd - Upgrading Soon
Screen Resolution
Main - 1920x1080 (All Three Monitors); 2nd - Upgrading Soon
Hard Drives
Main - (1) Crucial M4 128GB (Boot)
Main - (1) Seagate 2TB 64MB Cache (Data)
Main - (1) Seagate 2TB 64MB Cache (Data Backup)
2nd - (1) Intel X25-M SSD 80GB (Boot)
2nd - (3) Seagate 1TB 32MB Cache (Data Backup)
2nd - (1) Seagate 320GB (Because)
PSU
Main - OCZ 600W Modular; 2nd - OCZ 600W
Case
Main - Thermaltake Element G; 2nd - NZXT something or other
Cooling
Main - Corsair H80; 2nd - Prolimatech Megahalems
Keyboard
Main - Razer Reclusa; 2nd - Old MS Keyboard
Mouse
Main - Logitech MX Revolution; 2nd - Old MS Mouse
Internet Speed
20Mbps Time-Warner Cable
here are the entries i use for AOE2 and Conquerers

Code:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DirectDraw\Compatibility\EMPIRED2.ICD]
"Flags"=hex:00,08,00,00
"ID"=hex:df,d1,81,39
"Name"="EMPIRES2.ICD"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DirectDraw\Compatibility\aoe2_x1]
"Flags"=hex:00,08,00,00
"ID"=hex:ec,33,74,3b
"Name"="age2_x1.exe"
 

Attachments

My Computer

OS
Windows 7 Ultimate X86
Sorry it's taken me so long to get back to you, mudlord. I must be doing something wrong. I run the patch, it claims success, but no change.

Any advice? :)

I need to update it for AOE/AOE2, but I need to get my hands on that game.
 

My Computer

OS
Windows 7 Ultimate x64
CPU
AMD Phenom II 1055T
Memory
4GB DDR3 1333
Graphics Card(s)
ATI Radeon 5770
Hard Drives
Seagate 1TB
Hitachi 500GB
PSU
Antec 520
I tried this on my AOE2 Conquerors and it initially wouldn't work.

After some trial and error I found that I needed to change the name age2_x1.exe to age2_x1.icd, exactly as it is shown in the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DirectDraw\MostRecentApplication.
 

My Computer

Computer Manufacturer/Model Number
Novatech (UK) iRush Pro
OS
MSDN Home Premium
CPU
Intel i5
Motherboard
Intel DP55WB
Memory
4Gb
Graphics Card(s)
ATI Radeon HD 5770
Sound Card
On Board
Monitor(s) Displays
Philips 170B
Hard Drives
1 x 1Tb
(7 Partitions)
PSU
750W
Case
Antec 300
Cooling
Tricool Fans
Keyboard
Microsoft 3000 Wireless
Mouse
Microsoft 5000 Wireless BlueTrack
Internet Speed
6.1 Mbps
My AOE2 hasnt changed...
 

My Computer

Computer Manufacturer/Model Number
Custom Build
OS
W7 RTM Ultimate x64
CPU
Intel Q8400 @ 2.66GHZ
Motherboard
Gigabyte GA-EG45M-UD2H
Memory
4GB DDR2-800
Graphics Card(s)
Gainward GTS 450 GLH 1GB Edition
Sound Card
Integrated 8 Channel
Monitor(s) Displays
AOC 23.6 Inch Widescreen LCD
Screen Resolution
1920x1080
Hard Drives
Seagate 500GB Internal
Western Digital 1TB Internal

Hitachi 1TB External
PSU
Apevia Java Power 500W
Case
Cooler Master HAF 922 Black
Cooling
Stock Intel CPU Fan
Keyboard
HP SK-2960 Multimedia Keyboard
Mouse
Logitech M350 Wireless Gaming Mouse
Internet Speed
1.5MB
Again, I need to look into SafeDisc game handling (like AOE, possibly C&C RA2 etc....)
 

My Computer

OS
Windows 7 Ultimate x64
CPU
AMD Phenom II 1055T
Memory
4GB DDR3 1333
Graphics Card(s)
ATI Radeon 5770
Hard Drives
Seagate 1TB
Hitachi 500GB
PSU
Antec 520
Back
Top