Page 2 of 2

Re: VGA: only part of screen

Posted: Mon Oct 26, 2015 2:44 am
by Brendan
Hi,
Awe2K wrote:Ok, now I've got my mboot->vbe_mode bit 14 set, how do I know linear address then, or where are framebuffer segments located?
GRUB/multi-boot just gives you the same data it got from VBE. More specifically, you're looking for the "VBE mode information structure" defined by VESA. A pointer to this is given to you in multi-boot's "boot information structure".

You can find more information about VBE (and the "VBE mode information structure") here; especially links to the VBE specification itself near the bottom of that page.

I'd highly recommend reading that VBE specification; because you're going to need to know a whole bunch of stuff about pixel formats/masks/shifts, addressing, "bytes between lines", etc.


Cheers,

Brendan

Re: VGA: only part of screen

Posted: Mon Oct 26, 2015 3:14 am
by Awe2K
Brendan wrote:Hi,
Awe2K wrote:Ok, now I've got my mboot->vbe_mode bit 14 set, how do I know linear address then, or where are framebuffer segments located?
GRUB/multi-boot just gives you the same data it got from VBE. More specifically, you're looking for the "VBE mode information structure" defined by VESA. A pointer to this is given to you in multi-boot's "boot information structure".

You can find more information about VBE (and the "VBE mode information structure") here; especially links to the VBE specification itself near the bottom of that page.

I'd highly recommend reading that VBE specification; because you're going to need to know a whole bunch of stuff about pixel formats/masks/shifts, addressing, "bytes between lines", etc.


Cheers,

Brendan
Thanks, I've already retrieved that struct from grub (mboot->vbe_mode_info). Graphics seem to work now :)

Re: VGA: only part of screen

Posted: Mon Oct 26, 2015 3:56 am
by freecrac
Hello.
Brendan wrote: You can find more information about VBE (and the "VBE mode information structure") here; especially links to the VBE specification itself near the bottom of that page.
I am not sure if it is possible with Grub to use refreshrate controlled videomodes with a VBE 3 bios.

For refreshrate controlled videomodes it is usefull to get the monitor information for to check the capacity of the monitor.
Example for 800x600@140 hz refreshrate i use a monitor with 96 khz like most of the 19" CRTs support.

The original and costfree documents can be found on vesa.org(need register/login) in their public section:
"vbe3.pdf"
"EEDIDguideV1.pdf"
"EEDIDverifGuideRa.pdf"

Dirk

Re: VGA: only part of screen

Posted: Mon Oct 26, 2015 4:20 am
by Awe2K
Damn it. Grub still tries to kill my kernel.
When I try to load ramdisk, it just trashes screen.
There's no problem if I boot it without ramdisk in grub.cfg

Code: Select all

menuentry "myos" {
	multiboot /boot/kernel.bin
	module /boot/initrd.gz
}

Re: VGA: only part of screen

Posted: Mon Oct 26, 2015 7:56 am
by Awe2K
Okay, I've fixed that. Now GRUB gives me correct pointer to vbe mode info.
(1024x768x24bpp, it even tells me pitch :) )