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.
I'd have read the official (VESA VBE) specification before I would (not) have posted that question
Also, necro alert.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
Assuming that the video mode was set to support LFB, you can grab a pointer to its frame buffer (see the specs to find out how.) If not, its probably at 0xa0000 but you will need to provide a way to support switching between banks.
I personally have been using VGA in protected mode as my system is not up to par yet to support VBE to my standards. (I have high standards in design...)
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
I tried it yesterday before ehenkes wrote this. The graphic modes (with lfb) work without problems, but the text modes don't (tested in qemu and bochs). I think ehenkes tried it on real hardware, too. Maybe there is a lack of support for the text modes?
The idea was to find an easy way to extend the normal 80x25 display to be able to put more information on the screen. Using the graphic mode and drawing own fonts seems a bit to much work right now.
ehenkes wrote:into a text mode, how can I use it later in the kernel using PM?
Is there a video RAM like b8000h?
If I'm not mistaken, the VESA video mode information structure contains a field indicating the base address for the video mode. Unfortunately, VGABIOS (and thus Bochs) does not support VESA text modes. On a standard VGA, the highest text resolution you can get is 90x60 (720x480 pixels, 8x8 characters).
smeezekitty wrote:i fail to see where 80x25, 80x50 and even 90x60 is not enough for text mode?
80x50 is sufficent and it's used for now, but 80x25 wasn't. Printing information about found pci devices takes some space and there is no way to scroll up in the kernel right now.
Yes, as Tobiking already mentioned, we have found this possibility and use this 80*50 with 8*8 fonts (a little bit ugly, but helpful) for the time being.
ehenkes wrote:Could we also expand that resolution to 90*60 in this easy way?
No, unfortunately not. 90x60 needs reprogramming the VGA controller. It's not that difficult (search the forum, it has come up a few times, with source code), but not as easy as a simple int 10h call.