When playing WC1 it astonishes me just how much love has gone into the it when compared to later games.
In the two higher resolution modes, the game allocates a software 320x200 buffer, and uses blt() to scale it up 2x, meaning that in 640x480 mode, black bars are introduced to the top and the bottom, and the aspect ratio is wrong. If this fails, it tries to set up 640x400, and after that fails, 640x480. If the game can set a 320x200 mode, it does what I described above. There's no real reason it couldn't just use DirectDraw1, considering that all it does is locking the front buffer and dumping a frame to it, along with some palette manipulation.
Wing Commander 1 for Windows uses DirectDraw2. You never know where these projects end up. Third, it's gpl, and I'd rather keep away from it if possible. Second, it's rather tied to the rest of wine. Some folk have wondered why I didn't just take the ddraw project from wine.įirst, their approach is rather different from mine. I also dug up old DirectX SDK:s from my personal CD stack, as Microsoft has helpfully nuked all old DirectDraw documentation off the online MSDN.
It was a wrapper project (meaning, again, that they just call the real ddraw.dll), only supported DirectDraw7 and only very small parts of it, but it showed me how to get going.
In one case I found a forum thread claiming that deleting ddraw.dll from the game's directory fixes something, so in this case it's a hack gone wrong.Īfter further searching I found a project which actually released sources, with a liberal license even.
The point of these hacks is to fix small problems, like games that ignore surface pitch, require cleared surfaces or some such. Most of the ddraw.dll hacks are actually wrappers - that get between the game and the real ddraw.dll, change something subtle, but let the real ddraw.dll do the heavy lifting. As it happens, lots of people have, but nothing that's useful for me. Maybe someone had written a new ddraw.dll already, and I could just use it. The first step is always to look for prior art. None of that will stop windows from going into 256c mode, as far as I know, anyway.įor those interested, some solutions can be found on this thread on Doing the Homework There's also some undocumented registry entries you can play with which may help. I've been told there's a tool that lets you do all of the above, but I feel it's still rather inelegant. Seeing that the games use DirectDraw, I decided to roll my own. Naturally the screen resolution and color mode will be 640x480 and 256 colors, but if you've bent backwards that much, you probably don't care all that much. Your desktop will disappear, along with the task bar.