Framebuffer Confusion
Posted: Tue Mar 09, 2021 5:23 am
Hi guys,
i've started implementing a basic framebuffer support for my kernel experiments.
I managed to set-up a framebufer using multiboot and grub, and also get all the information i need back from the bootloader, and also i was able to draw couple of pixels as well (after mapping the framebuffer address in the virtuall address space! )
Btw going through all the documentation i found that more questions than answers are rising, so i hope to find more help in the forum:
And i noticed (but maybe is just me), that the documentation available lack clarity on the stuff above. Probably i will have more questions coming, but these are the first where i'm struggling to find an answer!
i've started implementing a basic framebuffer support for my kernel experiments.
I managed to set-up a framebufer using multiboot and grub, and also get all the information i need back from the bootloader, and also i was able to draw couple of pixels as well (after mapping the framebuffer address in the virtuall address space! )
Btw going through all the documentation i found that more questions than answers are rising, so i hope to find more help in the forum:
- Many tutorial use VESA/VBE/Framebuffer terms, often in the same sentence, are the the same thing? Copmatible?
- In the framebuffer multiboot info tag there is the field framebuffer_type that depending on the value tells what type of color_info are being used, and from what i can see it will implicitly tell how to draw a pixel on the screen, because if i'm not wrong it will be different from each type,is that correct?
- Referring to the point above do i need to support all these three types? Or what is the most common (at least the first that i should support)
- Talking about the color_info, what is going to influence the buffer_type? the chosen resolution? depth? Something else?
- So when i draw a character on the screen probably is going to depend on the color_info? or i am totally confused? And is there a maximum resolution supported by the FB or it depends only on the hardware (i.e. fb can support resolutions like 920x1080) ?
- I'm reading also about GOP, so question is: is grub querying uefi boot while setting/getting framebuffer data?
- https://wiki.osdev.org/Drawing_In_Protected_Mode#Color For example shows two different way of plotting a pixel depending the mode info block. So question is: is possible to write a common putpixel function, or i need as many putpixel functions as supported modes i want to make available?
- Multiboot2 framebuffer info tag data is based on https://wiki.osdev.org/Getting_VBE_Mode_Info? Or not?
- here: https://wiki.osdev.org/PC_Screen_Font#D ... _character one of the variable declared is "scanline", and it states: in the comment
/* number of bytes in each line, it's possible it's not screen width * bytesperpixel! */
so is there a way to compute it? What are the common cases? Am i forced to read the VBE Mode info as explained here: https://wiki.osdev.org/Getting_VBE_Mode_Info ? Or again am i confusing things?
And i noticed (but maybe is just me), that the documentation available lack clarity on the stuff above. Probably i will have more questions coming, but these are the first where i'm struggling to find an answer!