keepin' C&C running

I don't get anything for what I do and everything is released as open source so anyone can continue and hack on my code. But if you like what I do or want to sponsor some particular feature (ask first) I do accept donations!


2012-06-15 - Hand on to yer helmet

Carmageddon loading screens and transition effects fixed.

2011-12-15 - Red Alert 3.03 Westwood Online fixed

Using Westwood Online (the Internet button) crashed the game when it tried to use some ddraw methods I did not have implemented. Now they are and WOL works fine except I have massive lag using the UI with cnc-ddraw, not that it really matters.

2011-10-18 - Minor update, major bug (in OpenGL)

The OpenGL renderer used NPOT textures if the target resolution was over 1024x1024 where it was supposed to use NPOT only if the source resolution was bigger than that, meaning the game's resolution.

This caused white screen on GPUs that don't support NPOT textures and probably some performance regressions if POT textures are faster, dunno. New release anyway, thanks to FunkyFr3sh for finding another bug.

2011-09-27 - New window handling, CPU0 by default

Been a long time folks! This release probably breaks a lot of games but the original ones are tested so they should work better at least. New in this release:

A lot of people might ask why I switched from OpenGL to GDI suddenly as the default renderer. The reason behind is simple: it works better. Really. It is completely unaccelerated and slow on paper but on most systems it performs better then OpenGL for various reasons. It does not support the nice scaling filter of linear nor vsync but everything else is available.

If you experience weird window behaviour with this release, please report it ASAP so I can push a fix. Preferrably with instructions how to trigger the bad behaviour.

I suggest not using maxfps=0 if you have any problems with *speed*. Slow systems really choke on it, fast ones just run better.

2011-07-08 - Silly me, borderless & boxing

There was a small error in the flipping code for Carmageddon that caused flickering when maxfps was not 0, fixed.

On another note I added borderless windowed mode for those who want it. You can make a fullscreen window that is alt-tabbable and ctrl-tabbable without minimizing, works great for dual head.

On third note I implemented letter- and windowboxing using boxing=true ini setting for GDI renderer, it tries to 2x scale first and if it fits, center that in the window, otherwise it just centers the unscaled one. Now stop asking me for this! Also accidentally optimized GDI renderer, sorry about that.

2011-07-08 - Minor mouse behaviour changes

For the first time in a very long time I actually played some RA. After a while of swapping between IRC and RA I felt the lock/unlock style cnc-ddraw used felt a little cumbersome. So naturally I changed it:

2011-07-05 - New release

Been a long time but it's finally here! List of major changes:

2011-06-16 - Possible missing cursor fix for RA!

If someone who has the darn bug could try playing with this patch and reporting in IRC or by mail if it did or didn't help I would appreciate. It might cause minor other cursor flickering glitches but it's better than no cursor at all, right?

Also you've heard of the high resolution patch for RA, right? Grab it from

Update: I've heard it does fix the cursor issue so if you have the disappearing cursor bug, try it out!

2011-06-04 - The future of cnc-ddraw

Well, it all started with me getting fed up with how slowly Wine rendered Red Alert, found ddhack, had some chats, researched, decided to write my own as of course my project is better, right? I had a good starting point. Wrote the first version in a week or so, got RA running really swell. I was happy. Mission accomplished.

No, it wasn't. C&C95 support came along. Finished.

NO, not yet. RA's cursor disappears. The game has a bug in it, fuuuck! Tried to tackle it for weeks, got fed up, forgot about cnc-ddraw.

"How is Tiberian Sun support coming?", ehh? Ok, I'll take a look. Took a look, got it working at some level, found out the ddraw surface is shared with GDI and I didn't know how I could emulate something like that. Hand off now, finished enough, C&C works quite well, mission accomplished enough.

Wut? New Carmageddon? Gonna check this out! A community, old Carmageddon? I still have the CD somewhere... ah. 640x480, oh, cmon, I have a HD display. Fuck it, I'll test cnc-ddraw. Crash, bummer. Seems there is an unimplemented method, hmm. Got it, it works, whee! *some playing* Yeah, I need to announce this, this is good, everyone should be able to enjoy it like I do.

So, now the Carmageddon community can enjoy it. I'll just leave it there then, unofficial Carmageddon support, a hidden feature so to speak, fine with me.

Fuxors, a mail concerning cnc-ddraw? The Starcraft community is in despair, oh noes! They found out about cnc-ddraw and now some guy is patching it up to work with SC, how cool is THAT?.

Now it would be two non-C&C games that both really need this. Maybe it is a time for a change? There are actually people interested in this project and want new game support. Do you have an old classic game that doesn't work well with Windows 7 or Wine? Send a mail, write a patch if you can, the project is all open for new code adding support for more games! I will still try to keep the original intention of having no game specific hacks in place (other than C&C video scaling, they forced me!). It should be possible to emulate the API close enough for any game to work, though, there might be some issues with GDI and all, that is a whole different story.

I might change the project name if this catches up. Suggestions?

2011-06-01 - Carmageddon support

Wanted to have a spin with this classic for a while, *really* wanted it run on cnc-ddraw and so, it does now on the "ts" branch. If someone wants to test they need to either build it themselves or contact me for a binary.

A screenshot of it running on cnc-ddraw and Wine here (640x480 doubled with linear filter).

2011-04-05 - Cursor bug is back!

False alarm, the fix only works in the menu, in-game still loses the cursor. Bummer...

2011-04-03 - More minor fixes for cnc-ddraw, missing cursor redux

Pushed a new dll that has minor fixes, check the github page for the commit log.

More interesting is that I probably found a way to overcome the missing cursor bug in Red Alert by patching the game itself. The engine does some weird threading magic which causes problems with hacks like cnc-ddraw.

The cursor hack and more hacks/patches for Red Alert can be found at

2011-03-26 - Minor fix

Window moving has been problematic for quite some time. It should work correctly again.

2011-03-24 - Video resize!

After a long wait, I finally delivered! cnc-ddraw now fully supports C&C95 video scaling. The new ini option is "vhack", check the sample config below. The latest build includes these features:

2011-03-12 - GCC sucks, bad

Lately I heard that the current mingw32 gcc stack generates slow code. I didn't really think it was relevant at all with cnc-ddraw but apparently it makes a big difference. The dll is now recompiled with gcc 3.4.4 and is tons faster!

2011-02-06 - Deinterlacing and more!

cncfan from the forums has worked on cnc-ddraw by himself and added quite a lot of long wanted features. I'll leave it to him to explain the specifics. The changes will be merged into the main tree sometime in the future. Until that, enjoy his builds! The complete thread and his final post:

2011-01-10 - Fix Westwood Chat

There was a major problem with cnc-ddraw and wchat. First there is a custom window message (again) that is used to trigger network activity in C&C. Second the game maximizes itself when a game is starting. Doesn't work too well with windowed mode.

2010-11-26 - Alt key + 640x480 fix + edwin fix

It was not working in game, now it does.

Also fixed 640x480 mode cursor boundaries with a dirty hack.

Edwin now works again, it has been broken for a week or so.

2010-11-23 - Regressions

There was a regression that made RA not work with CnCNet when using cnc-ddraw. Fixed now.

2010-11-21 - Screenshots!

You can now take paletted screenshots by pressing Ctrl+S in game. It will save them in the game directory.

On another note a freezing bug was fixed which oddly happened only on Windows 7 when minimizing. Thanks to Heavylobster for reporting and testing!

2010-11-18 - Scrolling issues redux, sensitivity stuff

Scrolling issue has been turned around, it'll slow down instead of speeding up when the CPU is under high load.

Also added new ini variable, "sensitivity". Allows manual mouse sensitivity scaling.

2010-11-17 - Lot of fixes

I'm pleased to announce the next version of cnc-ddraw, download link updated.

2010-11-10 - Game version support extended

Using a new method the dll can now dynamically support any version of C&C and RA. (dedicated to MadHQ ;)


cnc-ddraw is an OpenGL re-implementation of the old DirectDraw API which was used for games such as Command & Conquer 95 and Red Alert .

Note: This project is still a work in progress! It might crash or do other undesirable things at the moment.

Key features:

Additional features:

Multi-core/SMP/fast CPU issues fixed:

Windows Vista/7 issues fixed:

Wine issues fixed:



Red Alert 640x400 @ 1920x1080 in a 46 inch TV (GL_LINEAR) 1
Red Alert 640x400 @ 1920x1080 in a 46 inch TV (GL_LINEAR) 2
Red Alert 640x400 @ 800x600 (GL_LINEAR)
Red Alert 640x400 @ 1280x800 (GL_NEAREST)


Note: The latest version enables video stretching by default which does NOT work correctly in C&C95 without the v1.06c r2 patch! Disable it if you are using an older version or you will encounter unexpected zooming. This was reverted in the current version.

Latest development snapshot: ddraw.dll (updated 2012-06-15)
Source: cnc-ddraw @ github

If you are going to play C&C95, always check for the latest patch from Nyerguds' first at


For cnc-ddraw to work at all, you need to disable all compatibility settings. Yes, thats right, disable. That means Windows version, 256 color mode and 640x480 resolution. It will most likely crash if any of them is enabled. For both C&C and RA to work properly, you need to set "Back buffer in Video memory" ON and "Allow hardware filled blits" OFF in "Hardware Options" using ccsetup.exe/rasetup.exe.

For best results with Red Alert, set its video mode to 640x400. For best results with C&C, use v1.06 patch and 1024x768 mode.

Place ddraw.dll in the game folder and on first run it will automagically create ddraw.ini using the following default settings (Wine users: add ddraw to dll overrides!):

; bits per pixel, possible values: 16, 24 and 32, 0 = auto
; show window borders in windowed mode
; use letter- or windowboxing to make a best fit (GDI only!)
; real rendering rate, -1 = screen rate, 0 = unlimited, n = cap
; vertical synchronization, enable if you get tearing (OpenGL only)
; scaling filter, nearest = sharp, linear = smooth (OpenGL only)
; mouse sensitivity scaling
; manual sensitivity scaling, 0 = disabled, 0.5 = half, 1.0 = normal
; enable C&C/RA mouse hack
; enable C&C video resize hack, auto = auto-detect game, true = forced, false = disabled (OpenGL only)
; switch between OpenGL (opengl) and software (gdi) renderers, latter supports less features but might be faster depending on the GPU
; force CPU0 affinity, avoids crashes with RA, *might* have a performance impact

With these settings you should have a naturally sized window which is not scaled.

You can alt-tab out of the window and back. To lock your cursor inside the window, click it. To unlock, press Ctrl+TAB.


My affiliate, the Command & Conquer Communications Center has a community forum which is a great place to meet new people, arrange games and get help with anything C&C, RA, Red Alert high resolution patch or cnc-ddraw related! There is also the CnCNet IRC channel for those who like to chat.

cnc-ddraw - cnc-plugin - ra95-hires -
Command & Conquer Communications Center - CnCNet

Copyright © 2010, 2011 Toni Spets <t n . p t @ k . i   o i s e s i i f >

Command & Conquer™ and Red Alert™ are registered trademarks of Electronic Arts, all rights reserved.

Valid XHTML 1.1 Valid CSS 2