Page 1 of 1

Video mode switch in pmode.

Posted: Thu Feb 19, 2004 7:58 am
by lerco
Is it possible to switch to mode 0x13 when in protected mode, or do I first have to switch to real mode, switch to 0x13 using BIOS and then back to pmode?
If I have to be in real mode, what is the easiest way to switch to real mode and back again in my pmode kernel?

Re:Video mode switch in pmode.

Posted: Thu Feb 19, 2004 8:12 am
by Pype.Clicker
because the VGA registers are well-known, it is possible to program mode 13h by manually feeding each configuration registers. I think geezer OS has something like this in video.c ...

Re:Video mode switch in pmode.

Posted: Thu Feb 19, 2004 9:31 am
by Jamethiel
Oh yes, VGA mode-switch is quite possible in pmode. SVGA is more problematic, but you didn't ask about that.

My system has (possibly buggy) code to do the job, but it probably wouldn't do you much good...

I find that the most annoying part are the textmode fonts. If you need to switch to 50-line mode or from graphics to text mode you need a font, and I don't know how to reliably find one in the VGA ROM without just calling it to do the mode switch.

Re:Video mode switch in pmode.

Posted: Thu Feb 19, 2004 11:06 am
by uri
Jamethiel wrote: I find that the most annoying part are the textmode fonts. If you need to switch to 50-line mode or from graphics to text mode you need a font, and I don't know how to reliably find one in the VGA ROM without just calling it to do the mode switch.
What about INT 0x1F and 0x43? IIRC these are pointers to the character tables in video ROM, but I don't know whether they are set by the BIOS or DOS...

Re:Video mode switch in pmode.

Posted: Thu Feb 19, 2004 11:09 am
by bubach
I saw a nice graphics package on programmersheaven.com (i think) that switched mode without the BIOS.
All it needs is the included function for saving fonts in real mode..

/ Christoffer