video mode problem

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
VolTeK
Member
Member
Posts: 815
Joined: Sat Nov 15, 2008 2:37 pm
Location: The Fire Nation

video mode problem

Post 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
User avatar
JackScott
Member
Member
Posts: 1033
Joined: Thu Dec 21, 2006 3:03 am
Location: Hobart, Australia
Mastodon: https://aus.social/@jackscottau
Matrix: @JackScottAU:matrix.org
GitHub: https://github.com/JackScottAU
Contact:

Re: video mode problem

Post 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?
User avatar
VolTeK
Member
Member
Posts: 815
Joined: Sat Nov 15, 2008 2:37 pm
Location: The Fire Nation

Re: video mode problem

Post 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?
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania

Re: video mode problem

Post 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.
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
User avatar
salil_bhagurkar
Member
Member
Posts: 261
Joined: Mon Feb 19, 2007 10:40 am
Location: India

Re: video mode problem

Post by salil_bhagurkar »

If you can execute bios interrupts:

mov ax, 1003h
mov bx, 0
int 10h

That should work.
User avatar
VolTeK
Member
Member
Posts: 815
Joined: Sat Nov 15, 2008 2:37 pm
Location: The Fire Nation

Re: video mode problem

Post 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
User avatar
salil_bhagurkar
Member
Member
Posts: 261
Joined: Mon Feb 19, 2007 10:40 am
Location: India

Re: video mode problem

Post by salil_bhagurkar »

It turns of the blinking.
Post Reply