justinng
asked on
Question on using 640x480x32k colors mode
Here's my question...
For your information, I am trying to program in a 640x480x32k colors mode. Before this, I've been in 320x200x256 colors mode and I'm able to play around with the 256 colors available for me and I'm able to create a palette
with 64 different shades of a color for my needs.
But I'm new to this 640x480x32k mode and I hope that someone could answer the following doubts:
1) How many different kinds of shades can a color element
(eg: red) have in this mode? [eg: Red can have up to 64
different shades in 320x200x256 colors mode]
2) How can I create a palette to contain all of the shades?
[eg: for(index=0; index<64; index++)
write_to_palette(index, index, 0, 0);
I can have 64 different shades of red like this.]
3) I understand that in 320x200x256 colors mode, the 3
important color element are Red, Green and Blue. What
about in 640x480x32k colors mode?
4) How can I use the character set from the BIOS in
640x480x32k colors mode? Can I create the font myself
instead of using the character set? How?
For more informations, I'm using Turbo C++ version 3.0 for
DOS compiler. Any help offered is very much appreciated!
For your information, I am trying to program in a 640x480x32k colors mode. Before this, I've been in 320x200x256 colors mode and I'm able to play around with the 256 colors available for me and I'm able to create a palette
with 64 different shades of a color for my needs.
But I'm new to this 640x480x32k mode and I hope that someone could answer the following doubts:
1) How many different kinds of shades can a color element
(eg: red) have in this mode? [eg: Red can have up to 64
different shades in 320x200x256 colors mode]
2) How can I create a palette to contain all of the shades?
[eg: for(index=0; index<64; index++)
write_to_palette(index, index, 0, 0);
I can have 64 different shades of red like this.]
3) I understand that in 320x200x256 colors mode, the 3
important color element are Red, Green and Blue. What
about in 640x480x32k colors mode?
4) How can I use the character set from the BIOS in
640x480x32k colors mode? Can I create the font myself
instead of using the character set? How?
For more informations, I'm using Turbo C++ version 3.0 for
DOS compiler. Any help offered is very much appreciated!
ASKER
For:
1) You mean there can be 64 different shades for Red element in
320x200x256 colors mode and only 32 different shades for the
Red element in 640x480x32k colors mode??
2) Well... you've got a point there but how can I go about doing that?
3) Fine.... thanx!
4) You mean using printf to write to video memory? But how?
Like I use printf to print a string or character on the
80x25 screen but how can I do that in 640x480x32k colors mode?
Can I assign one of the 32k colors to the string or character?
Sorry but can you tell me how can I go about doing it by some
brief codes maybe?
Thanx!
1) You mean there can be 64 different shades for Red element in
320x200x256 colors mode and only 32 different shades for the
Red element in 640x480x32k colors mode??
2) Well... you've got a point there but how can I go about doing that?
3) Fine.... thanx!
4) You mean using printf to write to video memory? But how?
Like I use printf to print a string or character on the
80x25 screen but how can I do that in 640x480x32k colors mode?
Can I assign one of the 32k colors to the string or character?
Sorry but can you tell me how can I go about doing it by some
brief codes maybe?
Thanx!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
2) this mode does not use a palette. the 16 bits you need to write to the videomemory contain the all the color information it needs. much like in truecolor modus. Think about this: how big would a palette for 32k colors be ?
3) well, see 1. they still are red/green/blue
4) once you are in that mode, you can just use printf to write characters to the video-memory. this will take care of bios calls (which is just the same call as in textmode)