Switch Video Mode int 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
User avatar
AlfaOmega08
Member
Member
Posts: 226
Joined: Wed Nov 07, 2007 12:15 pm
Location: Italy

Switch Video Mode int PMode

Post by AlfaOmega08 »

In Real Mode, we can switch between Video Modes using INT 0x10
In protected mode there is any way to do this or have I to use VMode?
User avatar
01000101
Member
Member
Posts: 1599
Joined: Fri Jun 22, 2007 12:47 pm
Contact:

Post by 01000101 »

you have to write the drivers for the video card or standard (vga, svga, etc..).

you might want to consider switching video modes in real-mode then just writing to the buffers in pmode.
xyzzy
Member
Member
Posts: 391
Joined: Wed Jul 25, 2007 8:45 am
Libera.chat IRC: aejsmith
Location: London, UK
Contact:

Post by xyzzy »

If you want to use VBE, use V8086 mode to perform the mode switch or get card info.
User avatar
os.hacker64
Member
Member
Posts: 149
Joined: Mon Feb 11, 2008 4:43 pm
Location: Limbo City,Afterlife

Post by os.hacker64 »

I believe after reading these posts that I will add switching back to real mode into my kernel so that I can set vesa modes. :D

EDIT: Is there an interface like VGA for XGA? This sounds weird to me, but you get my point. :roll:
Kanu Operating System
Working on:Paging and Multitasking

BURN /\/\1(40$0|=7
User avatar
Dex
Member
Member
Posts: 1444
Joined: Fri Jan 27, 2006 12:00 am
Contact:

Post by Dex »

I have written a demo to show how to go to realmode from pmode and back, for mode switching (in this case vesa and text mode).
See here: http://www.dex4u.com/demos/VesaDemo.zip
Note: this demo need vesa2.

Also its possible to switch vga modes from pmode, without using BIOS
See here: http://bos.asmhackers.net/docs/vga_without_bios/
User avatar
AlfaOmega08
Member
Member
Posts: 226
Joined: Wed Nov 07, 2007 12:15 pm
Location: Italy

Post by AlfaOmega08 »

Thanks Dex, I will try with your docs
User avatar
os.hacker64
Member
Member
Posts: 149
Joined: Mon Feb 11, 2008 4:43 pm
Location: Limbo City,Afterlife

Post by os.hacker64 »

os.hacker64 wrote:I believe after reading these posts that I will add switching back to real mode into my kernel so that I can set vesa modes. :D

EDIT: Is there an interface like VGA for XGA? This sounds weird to me, but you get my point. :roll:
Kanu Operating System
Working on:Paging and Multitasking

BURN /\/\1(40$0|=7
Post Reply