VESA Linear Frame Buffer

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
PlayOS

VESA Linear Frame Buffer

Post by PlayOS »

Hi,

If I want to use the linear frame buffer (assuming that it is supported), how do I get a pointer to it and how do I use it?

Thanks.
Slasher

Re:VESA Linear Frame Buffer

Post by Slasher »

Your best bet would be to get the VESA 2.0 and above docs and read on how to get the LFB pointer from the mode info block after issuing the Get_Mode_Information BIOS call.
Also it would be easier to get this pointer while in Real mode before switching to Protected mode. The docs explain how to go about this (I personally haven't gotten to this stage in my os) but its good to know before hand, so that provisions can be made in your design for later additions.
Hope this helps!
PlayOS

Re:VESA Linear Frame Buffer

Post by PlayOS »

Thanks Code Slasher,

I was not able to find within this document how to use the frame buffer, is it just an absolute address that points to the first byte of video memory? Because I have tried using it as an absolute pointer but it never worked. :(

I was using the 'PhysBasePtr' that is returned from the call to vesa's get mode info function. (NOTE: I used a mode that I knew existed for sure, so I guess I used the 'PhysBasePtr' member wrong.)

thanks.


Bye the way, have you implemented a basic paging environment yet?
Slasher

Re:VESA Linear Frame Buffer

Post by Slasher »

Hi, I think that you need to set up other things like a selector etc (don't have my vesa docs here to verify) to use with that pointer before it will work and it also has to be converted to an absolute address (if i remeber correctly:)
I haven't gotten to Paging in my Os yet. I just started Coding it in July,2002 but have done
Memory management(to be improved)
Process Creation and Mgt
Interprocess Communication with messaging passing to mailboxes(send is working but recieve is not 100% correct,failed my tests last night) :'(
Interrupts(complete for timer ),the other need my incomplete send/recieve message passing and Exceptions(to a certain degree)
File system,I/O and the rest also need the incomplete Message passing so that what i need to finish now
My Os is using a Flat memory model and will use a single PDT when i get to it. ;D
Post Reply