Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror

Comment Re: Bitmapped text mode (Score 1) 136

I should mention that the Copper Bars sample on my page does NOT change the palette in the horizontal retrace of a text or graphics mode. It uses 320x200 256-color mode (mode 13h) and uses a certain optimization to redraw every pixel every frame, allowing the bars to rotate, as well as zoom in and out.

But, BetterThanCaesar is right, as someone has mentioned. On a VGA card, in text mode, you can set the palette using the same code to modify the palette in 256-color mode (obviously because it uses the same registers), and thus you can have any 16 colors of the 262,144 possible colors. If you do this during the retrace, you can modify one or more colors for each horizontal line, making a total of 400 different colors (400 scan lines) for just 1 of the 16 colors in text mode. I think I was able to change 6 colors per line on a 200 Mhz system, although this program no longer runs well in Windows XP, so I cannot showcase it.

Another trick you can use to make more colors is to flicker between two screen pages. Take a look at my Color Wheel / Fake 12-Bit Color sample on my page. It uses 320x400 256-color mode (Mode-X), and swaps between two screen buffers every retrace. Using a palette of only 256 colors, it makes it appear to have 12-bit color (4,096 colors). (Actually, it only has 16*16*15 = 3,840 colors, but it's close enough that no one really notices that extra shade gone from blue.)

Of course, none of these tricks are allowed in TMDC.

Slashdot Top Deals

Put not your trust in money, but put your money in trust.

Working...