a stupid vga cursor question...

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
sithlord2
Posts: 4
Joined: Tue May 15, 2012 1:37 am

a stupid vga cursor question...

Post by sithlord2 »

I'm almost ashamed of asking this, but I can't find a solution for a very simple problem:

I use the VGA IO ports to update the cursor position, and this works fine. However, my cursor doesn't not blink :lol:
It's just a fixed line, and I can't seem to figure out which register I need to write to, to set it in "blink" modus...
sithlord2
Posts: 4
Joined: Tue May 15, 2012 1:37 am

Re: a stupid vga cursor question...

Post by sithlord2 »

I tried this, but now my cursor even disappears completely :?:

Code: Select all

void con_enableCursor() {
unsigned char value;
outb(0x3d4, 0x0a);
value = inb(0x3D5);
outb(0x3d4, 0x0a);
outb(0x3d5, value|0x20);
}
User avatar
VolTeK
Member
Member
Posts: 815
Joined: Sat Nov 15, 2008 2:37 pm
Location: The Fire Nation

Re: a stupid vga cursor question...

Post by VolTeK »

Image
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: a stupid vga cursor question...

Post by Combuster »

I think the most interesting question to ask is: did it blink before you touched any VGA register? Can you find out what piece of code made it stop doing that?
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
sithlord2
Posts: 4
Joined: Tue May 15, 2012 1:37 am

Re: a stupid vga cursor question...

Post by sithlord2 »

VolTeK wrote:Image
Voltak:

First link talks about the cursor and VT100/ANSI escape codes. Not what I was looking for.
Second link talks about the cursor shape, and indeed the blink rate, but no actual code on how to perform this. Also, it says there is no standard way to control the blink rate, so I'm even more surprised that the cursor is not blinking by default.

Nevertheless, a good try to insinuate that I didn't use google to check first, but trust me, I did ;-)

Combuster:

Actually, I did nothing, I use GRUB as a bootloader, and I suspect it's GRUB that modifies the cursor blink before it boots my kernel. I'm doing this in VirtualBox, so there might be a posssibility that the virtual vga-adapter defaults to a non-blinking cursor?
User avatar
VolTeK
Member
Member
Posts: 815
Joined: Sat Nov 15, 2008 2:37 pm
Location: The Fire Nation

Re: a stupid vga cursor question...

Post by VolTeK »

sithlord2 wrote:Nevertheless, a good try to insinuate that I didn't use google to check first, but trust me, I did
That's what counts.
sithlord2
Posts: 4
Joined: Tue May 15, 2012 1:37 am

Re: a stupid vga cursor question...

Post by sithlord2 »

Okay, I finally found this article:

https://www.virtualbox.org/ticket/7923

Seems that this is VirtualBox issue after all... weird...
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: a stupid vga cursor question...

Post by Combuster »

I'm doing this in VirtualBox, so there might be a posssibility that the virtual vga-adapter defaults to a non-blinking cursor?
Tip of the day: don't trust emulators when it comes to accurate VGA emulation. Always test those things on real hardware.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
LindusSystem
Member
Member
Posts: 63
Joined: Sat Apr 28, 2012 9:41 am
Location: Earth -> Asia

Re: a stupid vga cursor question...

Post by LindusSystem »



Quote:
I'm doing this in VirtualBox, so there might be a posssibility that the virtual vga-adapter defaults to a non-blinking cursor?

Tip of the day: don't trust emulators when it comes to accurate VGA emulation. Always test those things on real hardware.
+1
ME too, I made my bootloader and used to test on Bochs, it worked fine and when I boot it on real computer I was getting Triple Fault.
One more TIP:Emulators are for testing whether the build is hazardous.But you need to test on real hardware even after you test on an emulator.
Anyone has a idea of making a ntfs bootsector?if yes PM me , plz.
Post Reply