Question about VGA Graphics ASM
El Paisa
Posts: 375
In the shapes, box and boxfill how I change the writing color?
The only color I got is white.
The only color I got is white.
Comments
if you look at the 'color' command in the form of a BINARY number...
gr.color(i,%RRGGBBxx_RRGGBBxx)
...The upper BYTE is the foreground (pixel color), while the lower BYTE is the background.
Each RGB place holder represents two bits, resulting in a total of 4 color shades for each R, G, and B.
Example:
gr.color(i,%11000000_00000000) ' Bright Red on Black
gr.color(i,%00110000_00000000) ' Bright Green on Black
gr.color(i,%11110000_00001100) ' Bright Yellow on Blue
Note:
'i' represents the tile number
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
That part understand.
What I want is able to change color to draw like lines, shapes, etc NOT tiles.
I would like to change writing colors to draw boxes,shapes, text, etc.
I'm not sure I understand your question. Each Tile can only support 2 colors.... a foreground color which is what you plot with lines, boxes, shapes, text, etc. and a background color.
To draw Bright Red lines, boxes, shapes, text, etc. on a Black background...
gr.color(i,%11000000_00000000) ' Bright Red on Black
To draw Bright Green lines, boxes, shapes, text, etc. on a Black background...
gr.color(i,%00110000_00000000) ' Bright Green on Black
To draw Bright Yellow lines, boxes, shapes, text, etc. on a Blue background...
gr.color(i,%11110000_00001100) ' Bright Yellow on Blue
again 'i' specifies which tile you want to configure
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Post Edited (Beau Schwabe (Parallax)) : 4/30/2007 8:39:53 PM GMT
"This does not tell me how to change the foregrouind color only the background."
Please take a closer look, it tells you how to change both foreground colors and background colors.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.