Switching into True Color in protected mode..

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
udarkman

Switching into True Color in protected mode..

Post by udarkman »

I want to switch into True Color. But dont have any information about it.

Any document or link will be appreciated..
Thunder

Re:Switching into True Color in protected mode..

Post by Thunder »

Hello, how much I know you can not switch in another vesa mode in pmode, you have to do it in real mode. Maybe you can do video mode switching in pmode, when your video card have VESA 3.0 BIOS extension.
But this require special initialization.

Go to: http://www.vesa.org/vbe3.pdf

There you will find info how to change video mode in real mode.
Tim

Re:Switching into True Color in protected mode..

Post by Tim »

You can't switch video modes directly in protected mode, but you can do it from V86 mode. However, it's not worth doing this until you have a large amount of your kernel implemented.

V86 tutorial: http://osdev.berlios.de/v86.html
udarkman

Re:Switching into True Color in protected mode..

Post by udarkman »

Tim Robinson wrote: You can't switch video modes directly in protected mode, but you can do it from V86 mode.
Can I switch to any video modes my video card supports or just the modes we can switch with "int 10h". For example can I switch to 1024x768 true color video mode?
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:Switching into True Color in protected mode..

Post by Pype.Clicker »

VM86 just allow you to call the BIOS (or any other real-mode code) from a pmode environment without compromizing the environment's security ...

thus if you can enable the requested video mode with realmode, you can also do it in vm86 mode ... note that 1024x768x16M is also enabled through INT 10h (iirc), but using the VSEA extension (can it be service 0x4c ? to be checked in VBE doc referenced earlier ...
Perica
Member
Member
Posts: 454
Joined: Sat Nov 25, 2006 12:50 am

Re:Switching into True Color in protected mode..

Post by Perica »

..
Last edited by Perica on Sun Dec 03, 2006 9:09 pm, edited 1 time in total.
udarkman

Re:Switching into True Color in protected mode..

Post by udarkman »

Pype.Clicker wrote: note that 1024x768x16M is also enabled through INT 10h (iirc), but using the VSEA extension (can it be service 0x4c ? to be checked in VBE doc referenced earlier ...
Sorry, I dont understand what you mean. May I enable 1024x768x16M through INT10? I think maximum resolution with INT10 is 640x480x16... Am I wrong?
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:Switching into True Color in protected mode..

Post by Pype.Clicker »

from VBE.pdf (pg 25):
This chapter describes in detail each of the functions defined by the VBE standard. VBE functions are called from real mode using the INT 10h software interrupt vector, passing arguments in the 80X86 registers.

(...)

All VBE functions are called with the AH register set to 4Fh to distinguish them from the standard VGA BIOS functions. The AL register is used to indicate which VBE function is to be performed. For supplemental or extended functionality the BL register is used when appropriate to indicate a specific subfunction.
udarkman

Re:Switching into True Color in protected mode..

Post by udarkman »

10Dh - 320x200 32K (1:5:5:5)
10Eh - 320x200 64K (5:6:5)
10Fh - 320x200 16.8M (8:8:8)
110h - 640x480 32K (1:5:5:5)
111h - 640x480 64K (5:6:5)
112h - 640x480 16.8M (8:8:8)
113h - 800x600 32K (1:5:5:5)
114h - 800x600 64K (5:6:5)
115h - 800x600 16.8M (8:8:8)
116h - 1024x768 32K (1:5:5:5)
117h - 1024x768 64K (5:6:5)
118h - 1024x768 16.8M (8:8:8)
119h - 1280x1024 32K (1:5:5:5)
11Ah - 1280x1024 64K (5:6:5)
11Bh - 1280x1024 16.8M (8:8:8)

Oopss.. nice operating modes. Thanks, Ill read the pdf. Do you the meanings of numbers between paranthesis(1:5:5:5)?? And know any link or doc or example using these modes??
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:Switching into True Color in protected mode..

Post by Pype.Clicker »

those number are for the amount of bet for red, green and blue (1: means you have one bit that has no meaning (reserved) .

also note that your card may support extra modes that aren't standard but which may be listed by one of the VBE functions ...
Post Reply