PMode and VESA

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
gedeon

PMode and VESA

Post by gedeon »

Hello
I started programming my OS few month ago.
And i have now a lot of documentation.
But one question still have no answer
How to programming VESA mode in protected Mode ?
I know how to do that in real mode (int 10 ...), but i have no found documentation for the pmode.
Does anibody have an answer ? or documentation ?
Jeroen Jacobs

Re: PMode and VESA

Post by Jeroen Jacobs »

well... there are two possible solutions :

- Switch to VM86 mode for each vesa-call (not good)
- VESA 2.0 has a 32 bit interface (I think it uses far calls). Search Google for VESA 2.0 . It's very well documented.

Jeroen Jacobs
gedeon

Re: PMode and VESA

Post by gedeon »

Thank you JJ

It's already done
easiest than google
www.vesa.org
good documentation

Ps : 1st solution, agree with you , very very bad solution beurk!
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:PMode and VESA

Post by Pype.Clicker »

now, VBE 3.0 is out and supports a full 32 bits API (even for modes enumerating, switching, etc. which had to be done with VM86 with older VBEs)

Oh, by the way, i'm looking for a C implementation of this for my kernel, so if you don't already have a kernel but are already working on the video driver in PMODE, you're my friend :D
gedeon

Re:PMode and VESA

Post by gedeon »

Thank you i have VBE 3 .0 Documentation.
Sorry but I have a kernel , and for the moment working with VBE mode is not possible with Bochs (maybe it's wrong with 1.4 version), so my OS is in VGA 16 mode.
I work on a website with documentation for my OS and soon it will be online ( i hope), and when my VBE mode driver will be ready , email me and get the source with some explanations.
K.J.

Re:PMode and VESA

Post by K.J. »

Is VBE 3 supported by many graphics cards?

K.J.
Chris Giese

Re:PMode and VESA

Post by Chris Giese »

The protected mode functions supported by VESA 2.x don't
seem very useful. Example: protected-mode bank-switch.
If VESA 2.x has a linear framebuffer, why do you need this?

I could be mistaken, but I thought the VESA 3.x functions
run in 16-bit protected 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:PMode and VESA

Post by Pype.Clicker »

I could be mistaken, but I thought the VESA 3.x functions
run in 16-bit protected mode.
As far as i remember, yes: you have to jump to a 16-bits code segment, but this is still pmode working, and thus it's really cheaper to implement than if it was in realmode ... It's just a trick bios developers found so that the very same code can be run in both real & protected mode by just changing what differs: segments value (usually, 0xc000 is hardcoded, now you can select 0x28 instead ;)

Actually, i've found VBE 3.0 is present on my GeForce 2, so i guess you can expect it on - say - all video card from Y2K ...
Post Reply