Qbasicnews.com

Full Version: NES/SNES sprite color
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
is there a way to replicate the "color scale" used in the old game consols? specail numbers like 128 128 128 for grey and what not.
Please ellaborate. What do you want? To change the palette?
There 256 colors? You can't find what you lookin for in there? :wink: In SCREEN 13 I mean, if your on another screen, I'm of no help.. Smile
The "color scale" used in general is RGB, that is a red value followed by a green value followed by a blue value.

HTML uses this in hexadecimal. 128 128 128 is #808080, or 80 for all three values.

On VGA monitors in DOS, this can be done with OUT.
out &h3c8, color_index
out &h3c9, red
out &h3c9, green
out &h3c9, blue

where red, green and blue vary from 0 to 63 max. That is, just divide the 0-256 value by four. of course, this code only works on VGA screen modes, such as screen 12 or 13. I think on vga monitors you can change some indexes in screen 7, but that's the extent of what I remember.

There are graphics libraries such as UGL or Future that will let you use VESA modes, which can let you use true color modes, that is, let you have thousands or millions colors on the screen at the same time, plotting them down by red, green and blue values instead of a color index.