[Closed] Setting VESA/VBE Mode
Posted: Wed Jul 13, 2016 5:49 am
As the title suggests I need a way to set some high resolution VES/VBE mode.
After my bootloader topic I decided to use GRUB2 as my bootloader.
Then we (yes two of us guys) implemented GDT, IDT, ISR, IRQ, Protected Mode, Shell, Basic VGA Driver, Drawing, some other C function and types etc...
At this moment, we have 320x200 VGA with 256 (64) colors. That is not really enough.
We decided that we want High Resolution VBE/VESA mode. Our goal is to achieve resolutions like 1024x768, 1360x768, 1920x1080.
Now we have no idea how to do that. After reading all those articles and tutorials, searching this forum for code... Nothing showed up.
I even tried porting already made VESA drivers, but without any luck.
I've also read that since we are using GRUB2 we can ask GRUB to set video mode for us?
Another important note it that we can directly write to BIOS using inportb and outportb functions. Can we set video mode by using them from our C code or we need some extra assembly functions?
Using protected mode makes this a bit difficult right?
Also there is something called V8086 monitor that is really hard to write but it can use BIOS functions that are not usable with protected mode on?
I would really appreciate some working code for setting graphics mode to VESA with some custom high resolutions or defined ones like 0x1018h.
Asking for makes me feel like a beggar, but that is the only way.
After my bootloader topic I decided to use GRUB2 as my bootloader.
Then we (yes two of us guys) implemented GDT, IDT, ISR, IRQ, Protected Mode, Shell, Basic VGA Driver, Drawing, some other C function and types etc...
At this moment, we have 320x200 VGA with 256 (64) colors. That is not really enough.
We decided that we want High Resolution VBE/VESA mode. Our goal is to achieve resolutions like 1024x768, 1360x768, 1920x1080.
Now we have no idea how to do that. After reading all those articles and tutorials, searching this forum for code... Nothing showed up.
I even tried porting already made VESA drivers, but without any luck.
I've also read that since we are using GRUB2 we can ask GRUB to set video mode for us?
Another important note it that we can directly write to BIOS using inportb and outportb functions. Can we set video mode by using them from our C code or we need some extra assembly functions?
Using protected mode makes this a bit difficult right?
Also there is something called V8086 monitor that is really hard to write but it can use BIOS functions that are not usable with protected mode on?
I would really appreciate some working code for setting graphics mode to VESA with some custom high resolutions or defined ones like 0x1018h.
Asking for makes me feel like a beggar, but that is the only way.