Video mode switch in pmode.

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
lerco

Video mode switch in pmode.

Post 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?
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Video mode switch in pmode.

Post 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 ...
Jamethiel

Re:Video mode switch in pmode.

Post 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.
uri

Re:Video mode switch in pmode.

Post 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...
User avatar
bubach
Member
Member
Posts: 1223
Joined: Sat Oct 23, 2004 11:00 pm
Location: Sweden
Contact:

Re:Video mode switch in pmode.

Post 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
"Simplicity is the ultimate sophistication."
http://bos.asmhackers.net/ - GitHub
Post Reply