using vesa under protected
using vesa under protected
How do they use Vesa under protected mode? I mean , some of OSes(i.e. menuetos) use high resolution desktops. Do they use vesa? if so how? if not what do they use? What can be used for high color and resolution?? Ill be glad for your informations and tutorials advised.
-
- Member
- Posts: 1600
- Joined: Wed Oct 18, 2006 11:59 am
- Location: Vienna/Austria
- Contact:
Re:using vesa under protected
Ahoj!
You guy have guts i have to say. Well, at least you need a working protected mode environment, a functional and debugged task switcher, something to invoke a vm86 task (for the bios ints) ... and a graphics library. Look, start at first with vga, and make it work in your kernel, and THEN try your wits on vesa. it is not that easy. I myself bite my teeth on it at the moment.
The other version: you do it directly after boot up of your kernel with bios ints, before switch to p-mode: the vesa initialization stuff.
go and check out www.brackeen.com for some graphics/vesa stuff resp. links. Hope it helps.
stay safe.
You guy have guts i have to say. Well, at least you need a working protected mode environment, a functional and debugged task switcher, something to invoke a vm86 task (for the bios ints) ... and a graphics library. Look, start at first with vga, and make it work in your kernel, and THEN try your wits on vesa. it is not that easy. I myself bite my teeth on it at the moment.
The other version: you do it directly after boot up of your kernel with bios ints, before switch to p-mode: the vesa initialization stuff.
go and check out www.brackeen.com for some graphics/vesa stuff resp. links. Hope it helps.
stay safe.
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
BlueillusionOS iso image
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:using vesa under protected
as a desesperate move, you can assume your end users will have VBE 3 compliant display card and use the Pmode Vesa Bios interface to change the video mode. however, bochs and most cheap in-chipset video chips will not have that in their BIOS
Re:using vesa under protected
Yes, MenuetOS uses VESA, but it uses VESA LBF (Linear Frame Fuffer) - that is - when you enable VESA 2.0 say, 800x600x32bpp with LFB support (VESA 1.x and below has NO LFB support), mode in real mode, and you have LFB address (every Video card has different LFB address, this address you can get in real mode).
So, in protected mode you write at this address, and you don't have to use anything.
Example:
you get that LFB addr is 0xFFE000 (linear address), then
mov eax, 0xFFEE00
;we will plot uor first pixel in 32bpp mode
mov [eax], dword 0xFFFFFF ; white pixel
;if you want to plot another
mov [eax+4], 0xAAAAAA ; another color and second pixel
And so on
To get all VESA 3.0 (There are ALL VESA versions described) functions read this manual:
www.vesa.org/vbe3.pdf
Oh, yes , other OSes, like SkyOS works in vm86 mode and they can use real mode interrupts everytime.
I hope this helped. Bye
P.S.: check my OS with VESA LFB support www.stormos.ten.lt ;D
So, in protected mode you write at this address, and you don't have to use anything.
Example:
you get that LFB addr is 0xFFE000 (linear address), then
mov eax, 0xFFEE00
;we will plot uor first pixel in 32bpp mode
mov [eax], dword 0xFFFFFF ; white pixel
;if you want to plot another
mov [eax+4], 0xAAAAAA ; another color and second pixel
And so on
To get all VESA 3.0 (There are ALL VESA versions described) functions read this manual:
www.vesa.org/vbe3.pdf
Oh, yes , other OSes, like SkyOS works in vm86 mode and they can use real mode interrupts everytime.
I hope this helped. Bye
P.S.: check my OS with VESA LFB support www.stormos.ten.lt ;D
Re:using vesa under protected
vesa3 had VERY VERY limited support from card manufacturers. far less than vesa2, and a LOT of vesa2 implementations were by TSR from DOS, instead of being native in the BIOS...
which kinda sucks. any modern cards are probably going to lack much in the way of VESA support, its seen as a legacy device and a DOS thing.
which kinda sucks. any modern cards are probably going to lack much in the way of VESA support, its seen as a legacy device and a DOS thing.
-- Stu --
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:using vesa under protected
afaik, modern nvidia chips have VBE3 ... i dunno for others.
Re:using vesa under protected
i've been following this thread and appreciate the info and links. i also have a question of my own: when you obtain the LFB address, is this actually in physical memory or is it mapped to the video card or something? also, can the memory directly after the LFB be used for normal storage? i guess what i am asking is if there is any other reserved memory other than for the LFB.
thanks
thanks
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:using vesa under protected
@HOS: actually, the memory used for the Linear FrameBuffer will be where you (or the PnP bios) will have told the PCI card to locate it. This is true for any other PCI card that exports a memory region, so basically, if you wanna know exactly what physical address range is used by the video card, you should check its PCI configuration block... and if you wanna know if others regions are used by other devices, you should check the PCI configuration block for all those devices ...
and yes, the returned LFB address is a physical address, so if you have paging enabled, it'll be up to you to map the LFB at some place you like ...
and yes, the returned LFB address is a physical address, so if you have paging enabled, it'll be up to you to map the LFB at some place you like ...