Page 1 of 1
video mode problem
Posted: Sun May 24, 2009 10:23 pm
by VolTeK
i am making a file manager in my os with tui (text user interface) i have had no problems with my last tui applications, but now i am getting this effect where i will draw a blue on whit background then draw a file bar, but the letters on the file bar blink on then off and then on (it loops) i have tried changing the color, that fixed it but i keep getting to the problem again and i want to use these colors, how can i fix this blinking problem, is there a mode i did not set? (it got so bad i almost thought about using the int 10 print pixel and make functions from there but i dont know how to print the letters in video mode. so i will not use that for now)
btw VolTroX 1.8 is done, all of this work goes to VolTroX Aurora (2.0)
i will give you guys aurora and not 1.8 because i want my first os on here to make a better impression
Re: video mode problem
Posted: Sun May 24, 2009 10:28 pm
by JackScott
Are you sure it is not just that PC or emulator? Some VGA BIOSes sometimes blink the characters (usually with a highest bit in the colour byte set), while others don't.
And is it just happening on that particular character, or on others as well?
Re: video mode problem
Posted: Sun May 24, 2009 10:39 pm
by VolTeK
just the highlighted characters within that color, it just does that for an application. but i have not tried it for any other parts of the os so i dont know if its system wide, but on my os 1.8 the tui (red background on white letters) works fine. is there any more information i should provide?
Re: video mode problem
Posted: Sun May 24, 2009 11:10 pm
by Love4Boobies
The attribute byte for each character uses bits 0-2 for foreground color, bit 3 for foreground intensity or character font select, bits 4-6 for background color and bit 7 for blinking or background intensity. You can redefine how you use bit 3 using the Character Map Select register (it defaults to foreground intensity) and bit 7 with the Attribute Mode Control register (default is character blinking). It has nothing to do with the BIOS, it has to do with VGA hardware.
If you want to change the Attribute Mode Control register so it fits your needs, you need to clear the EB bit (i.e., bit 3). For a better understanding of this, check the VGA documentation. It's been ages since I wrote my VGA driver so I can't really remember the exact ports. I think Combuster also wrote an article on VGA on the wiki and it might cover all this. If you have no luck, I can check the documentation for you.
Re: video mode problem
Posted: Sun May 24, 2009 11:14 pm
by salil_bhagurkar
If you can execute bios interrupts:
mov ax, 1003h
mov bx, 0
int 10h
That should work.
Re: video mode problem
Posted: Sun May 24, 2009 11:30 pm
by VolTeK
im am using the same int 10 option that aides in making tui windows as well as mike os does, the option where you in put an 8 bit binary code and the first four digits (background) last four digits (letters) im not or dont think i am using the char attrib option on the int 10 int, if not i will look that one up on ralph brown and see if that is a better option
i will try the
mov ax, 1003h
mov bx, 0
int 10h
but what hows that do, set a proper vid mode? if so, that maybe it
Re: video mode problem
Posted: Mon May 25, 2009 5:31 am
by salil_bhagurkar
It turns of the blinking.