Saturday, December 05, 2009

256 colour mode palette handling is broken in Windows 7?

A while ago I ported AcidWarp to Windows using SDL. At the time I was running Vista, and I had to use a workaround for full screen mode. I described the issues and my workaround in a post here.

Now I find that the workaround does not work in Windows 7. AcidWarp fails to get all 256 palette entries even when I use the directx SDL video driver. The program's 256 colours are then remapped onto a smaller number of colours. This results in visible errors in many AcidWarp patterns.

There is an even more serious palette issue. When using the directx SDL driver in the normal way (without workarounds, just using the "set SDL_VIDEODRIVER=directx" command), a substantial number of palette entries remain unchanged in full screen mode. These colours are not remapped, resulting in very ugly static parts of the pattern. This can be avoided by using the windib SDL driver or the workaround I developed in Vista.

One workaround for everything is killing explorer.exe. Then both directx and windib drivers are able to grab all 256 colours. Explorer can easily be restarted from Task Manager, and even the tray icons are preserved. Still, it's not a very nice workaround.

4 comments:

Boris Gjenero said...

This is a much more serious problem with DOSBox. All games have some colour corruption, and even the blue text mode box that DOSBox shows at the start has its colours changed in full screen mode.

Setting "output=openglnb" in the config file fixes this problem. (You can also use "opengl" and "ddraw", but "opengl" blurs the image and "ddraw" turns off Aero in full screen mode.)

Boris Gjenero said...

The release notes for SDL 1.2.14 claim "Verified 100% compatibility with Windows 7." The same palette problems remain. I guess I can't blame SDL however; I expect it is a Windows 7 bug.

Anonymous said...

Try setting the taskbar to auto-hide. Since it isn't around while the game is active, it doesn't interfere with the palette!

Boris Gjenero said...

Auto-hide doesn't fully hide the Taskbar. There's still a one pixel line of the Taskbar at the bottom of the screen, and the same problem remains.