so to not start another thread i have a small misunderstanding with the virtual machine.
when i set the background color to F , in bochs the screen blinks like hell, but in virtual pc it's white. on my pc it's white too. what's the catch?
Color Codes
Color Codes
Last edited by overburn on Wed Aug 19, 2009 12:55 pm, edited 2 times in total.
One Tequila, Two Tequila, Three Tequila, Floor!
Re: Color Codes
Hi,
I have split the topic as this post was on a completely different subject to your original thread.
To answer the question: If you look at the VGA registers, they can be set up so that the high bit of the background colour represents a 'blink' attribute. This means that you get a dark blinking colour rather than a bright stable one. I assume the VGA registers are initialised differently in Bochs to in hardware - I don't know if the 'Correct' initial setting for this is even defined in any standard (any idea Combuster?)
Cheers,
Adam
I have split the topic as this post was on a completely different subject to your original thread.
To answer the question: If you look at the VGA registers, they can be set up so that the high bit of the background colour represents a 'blink' attribute. This means that you get a dark blinking colour rather than a bright stable one. I assume the VGA registers are initialised differently in Bochs to in hardware - I don't know if the 'Correct' initial setting for this is even defined in any standard (any idea Combuster?)
Cheers,
Adam
Re: Color Codes
Hi,
I just wanted to mention that you can use "BIOS Int 0x10, AX = 0x1003" to either enable blinking (and disable 16 background colours) or disable blinking (and enable 16 background colours).
Every time I set a 16-colour text mode (mostly in every boot loader I write, as I don't assume anything if I can help it), I enable 16 background colours and disable the cursor. If I really want to flash I'll do it in software (and still have 16 background colours), and IMHO the cursor should never be visible until/unless you're waiting for the user to type something.
Cheers,
Brendan
I just wanted to mention that you can use "BIOS Int 0x10, AX = 0x1003" to either enable blinking (and disable 16 background colours) or disable blinking (and enable 16 background colours).
Every time I set a 16-colour text mode (mostly in every boot loader I write, as I don't assume anything if I can help it), I enable 16 background colours and disable the cursor. If I really want to flash I'll do it in software (and still have 16 background colours), and IMHO the cursor should never be visible until/unless you're waiting for the user to type something.
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
Re: Color Codes
Blinking is the default in all reall PC's I have seen back in the days when text mode was your default UI. I can imagine however that some emulators do not bother to emulate blinking, as textmode is hardly used anymore.AJ wrote:I assume the VGA registers are initialised differently in Bochs
JAL
Re: Color Codes
Is there also a protected mode way of doing it (i.e. without interrupts)? Or is it required to do it through BIOS interrupts?Brendan wrote:Hi,
I just wanted to mention that you can use "BIOS Int 0x10, AX = 0x1003" to either enable blinking (and disable 16 background colours) or disable blinking (and enable 16 background colours).
Every time I set a 16-colour text mode (mostly in every boot loader I write, as I don't assume anything if I can help it), I enable 16 background colours and disable the cursor. If I really want to flash I'll do it in software (and still have 16 background colours), and IMHO the cursor should never be visible until/unless you're waiting for the user to type something.
Cheers,
Brendan
When the chance of succeeding is 99%, there is still a 50% chance of that success happening.
- gravaera
- Member
- Posts: 737
- Joined: Tue Jun 02, 2009 4:35 pm
- Location: Supporting the cause: Use \tabs to indent code. NOT \x20 spaces.
Re: Color Codes
@Creature: Exactly what I was just about to ask. I had no idea you could actually disable the cursor: I guess I should read the real datasheets for devices from now on, and not just the tutorials I find.
17:56 < sortie> Paging is called paging because you need to draw it on pages in your notebook to succeed at it.
Re: Color Codes
well
just to help you:
of cause you can disable the cursor:
http://www.osdever.net/FreeVGA/vga/crtcreg.htm#0B is a GOOD start.
actualy it can be done in one register:
Cursor Start Register (Index 0Ah), and set bit 5 ( 7 and 6 are unused) to 0, that should do it, however you can also make the size 0 , or huge. .. all should "make it" dissapere
@creature
you can just ude the Attribute Mode Control Register (Index 10h) bit 3, change it to 0 makes it color intense( and 1 = blinking). so you can do it in pmode
edit:
forgot to mentinon the IO: 3C0h for the blinking and the cursor is at 3x5h and 3x4h
KMT dk
just to help you:
of cause you can disable the cursor:
http://www.osdever.net/FreeVGA/vga/crtcreg.htm#0B is a GOOD start.
actualy it can be done in one register:
Cursor Start Register (Index 0Ah), and set bit 5 ( 7 and 6 are unused) to 0, that should do it, however you can also make the size 0 , or huge. .. all should "make it" dissapere
@creature
you can just ude the Attribute Mode Control Register (Index 10h) bit 3, change it to 0 makes it color intense( and 1 = blinking). so you can do it in pmode
edit:
forgot to mentinon the IO: 3C0h for the blinking and the cursor is at 3x5h and 3x4h
KMT dk
well, what to say, to much to do in too little space.
when it goes up hill, increase work, when it goes straight, test yourself but when going down, slow down.
when it goes up hill, increase work, when it goes straight, test yourself but when going down, slow down.
Re: Color Codes
Thanks for the information, the link is useful and when I started looking up the ports, I found it.
When the chance of succeeding is 99%, there is still a 50% chance of that success happening.