I wrote a dithering program for VGA Mode13h (a 320x200x8 bit linearly accessed graphics mode in dos) which I can send you, just send me an email. It implements a couple different algorithms, which work at different speeds, and the dithering is seperate from the rendering (I also have a program that fakes truecolor using a fixed palette, by having two real pixels per game pixel, kinda like reverse ClearType. The only problem is that it is highly display dependent, also like ClearType).
Another source for code would be the PocketFrog library, which can be found at . You may even want to use this directly, but If you are modifying a program that already uses another GAPI implementation, this may not be the best approach.
The only problem with run-time dithering is that unless you redesign the rendering algorithm to dither as it renders (doability depends on the type of rendering) it is really slow. The Mode13h program I wrote runs at about 50fps on a 1400 mHz athalon, give or take a bit depending on the dithering method.