OS Graphics
-
- Posts: 7
- Joined: Sun Jun 17, 2007 3:28 pm
- Location: Brooklyn
OS Graphics
Hi, I was wondering how is it possible to draw graphics in yr OS? Ive asked around and it seems like the only way is to use some API like DX or GL, but wat about Windows, how does it draw it's backgrounds/windows etc. Modes like VGA, SVGA and VESA are all low rez low bit depth mode, Windows can use 32 bit and use huge resolutions, which video memory does it use to achieve this? Thanks, Tim
<font>craw if you have to be here[service] cuz here is the Holy Spirit
</font>
![Smile :)](./images/smilies/icon_smile.gif)
-
- Posts: 7
- Joined: Sun Jun 17, 2007 3:28 pm
- Location: Brooklyn
not with VESA, uninstall graphics cards driver or do clean Windows install without additional graphics drivers. You are unlikely to set higher resolution.vanillasnake21 wrote: ok even 1280x1024x24 but still windows can produce much higher rezes in 32 bits
Graphics driver(VESA or device specific) do 2D line & rectangle drawing.
what I think:
VESA is pretty fast it is just because Windows does lots of swapping vesa is slow in windows. I have Gigabyte I-Ram and window redrawing in 1024x768 is no different than with NVIDIA drivers, but with regular SATA drive even 800x600 is extremely slow.
In comparasing with NVIDIA or ATI driver vesa is slow offcause.
-
- Posts: 7
- Joined: Sun Jun 17, 2007 3:28 pm
- Location: Brooklyn
So let me get this straight, lets say we have a modern motherboard, and a standard graphics card, and I do a clean install of Windows with no display drivers, I will get a low resolution, low bit depth images. But when I install the drivers the res and bit depth go up. Ok, but what changed when I installed the driver? Is the driver now addressing a different memory location, what exactly causes the res to increase? And since this is osdev, lets say that I have a clean machine, no os, i have a simple kernel up and running in protected mode, which steps must I take to achieve the output resolution similar to that of windows. Thats basically what my question is about.exkor wrote:not with VESA, uninstall graphics cards driver or do clean Windows install without additional graphics drivers. You are unlikely to set higher resolution.vanillasnake21 wrote: ok even 1280x1024x24 but still windows can produce much higher rezes in 32 bits
Graphics driver(VESA or device specific) do 2D line & rectangle drawing.
<font>craw if you have to be here[service] cuz here is the Holy Spirit
</font>
![Smile :)](./images/smilies/icon_smile.gif)
Default low res driver doesn't know how to communicate with moder graphics card to achieve higher resolution. Video card manufactures know about their device everything and can do more.
User application calls DrawLine at fixed address but OS has a redirect address at that place which points to the driver drawing rutine.
To archive higher resolution you need to know how to communicate with specific graphic card.
VESA standard provides minimum communication.
User application calls DrawLine at fixed address but OS has a redirect address at that place which points to the driver drawing rutine.
To archive higher resolution you need to know how to communicate with specific graphic card.
VESA standard provides minimum communication.
- Brynet-Inc
- Member
- Posts: 2426
- Joined: Tue Oct 17, 2006 9:29 pm
- Libera.chat IRC: brynet
- Location: Canada
- Contact:
It's simple, Video card manufactures design "Graphics cards", These graphics cards are normally proprietary in design.
The manufacture writes a driver to "communicate" with their hardware, Normally targeting Microsoft Windows.
Now, Be happy as a clam with VESA/VBE modes...![Wink :wink:](./images/smilies/icon_wink.gif)
You won't be able to do much more with these proprietary cards unless you convince a few manufactures to release documentation and/or drivers.
The manufacture writes a driver to "communicate" with their hardware, Normally targeting Microsoft Windows.
Now, Be happy as a clam with VESA/VBE modes...
![Wink :wink:](./images/smilies/icon_wink.gif)
You won't be able to do much more with these proprietary cards unless you convince a few manufactures to release documentation and/or drivers.
-
- Posts: 7
- Joined: Sun Jun 17, 2007 3:28 pm
- Location: Brooklyn
So does that mean that Windows does use my graphics card? So technically speaking unless its an established OS theres no way to directly talk to the gfx card becuase the devs of the card have to provide you with a driver for to do so, am I correct?exkor wrote: To archive higher resolution you need to know how to communicate with specific graphic card.
VESA standard provides minimum communication.
<font>craw if you have to be here[service] cuz here is the Holy Spirit
</font>
![Smile :)](./images/smilies/icon_smile.gif)
- Brynet-Inc
- Member
- Posts: 2426
- Joined: Tue Oct 17, 2006 9:29 pm
- Libera.chat IRC: brynet
- Location: Canada
- Contact:
Most manufactures at least provide VESA/VBE, It's a commonly available standard..vanillasnake21 wrote:So does that mean that Windows does use my graphics card? So technically speaking unless its an established OS theres no way to directly talk to the gfx card becuase the devs of the card have to provide you with a driver for to do so, am I correct?
But yes, You have very little hope to use any of the proprietary hardware 2D/3D acceleration abilities. (Or other features..)
(You could always do some reverse engineering work for a few years.. With a bus analyzer etc..)
-
- Posts: 7
- Joined: Sun Jun 17, 2007 3:28 pm
- Location: Brooklyn
I see, but is there any way to port the drivers to a custom OS? Or at least configure the os in a certain way that it will be able to use the driver written for a different os?Brynet-Inc wrote:
But yes, You have very little hope to use any of the proprietary hardware 2D/3D acceleration abilities. (Or other features..)
(You could always do some reverse engineering work for a few years.. With a bus analyzer etc..)
<font>craw if you have to be here[service] cuz here is the Holy Spirit
</font>
![Smile :)](./images/smilies/icon_smile.gif)
-
- Posts: 7
- Joined: Sun Jun 17, 2007 3:28 pm
- Location: Brooklyn
yea, so thats a definite no , that would be huge amount of work, besides I think that VBE 2.0 is perfect for what I need, the supported resolution is 1024x768x32, but since VESA and VBE are all standards does that mean that the older gfx cards might not support them? [/b]exkor wrote:Your OS needs to support Windows or Linux API. Most of it, the kernel api probably. So that linux/windows programs can run in your os.vanillasnake21 wrote: Or at least configure the os in a certain way that it will be able to use the driver written for a different os?
<font>craw if you have to be here[service] cuz here is the Holy Spirit
</font>
![Smile :)](./images/smilies/icon_smile.gif)
Hi,
However, video is complicated - even with all the necessary documentation it'd take ages to write a good stable device driver. This is especially true for full 2D/3D acceleration, and shader languages (which typically means implementing a compiler to convert a standard shader language into a video card specific language).
VESA/VBE is a standard way of getting framebuffer support. Regardless of what you do I'd recommend (as an absolute minimum) using VESA/VBE to set a default video mode during boot, as this will allow people to use graphics while you're trying to get better video drivers working. Depending on how it's done this could mean users need to reboot to change video modes, but I remember when Windows 95 was like that (and except for games, how often do you change video modes anyway?)...
There's 3 different versions of the VESA/VBE standard. Older video cards might only support "version 1", and very old video cards might not support any. Even if no VESA/VBE is supported you'd still be able to use the (non-VBE) video BIOS functions to setup standard VGA video modes (e.g. 640 * 480 * 16 colours).
Cheers,
Brendan
It is possible to get (some) information for some video cards - most video cards made before 1995, S3, Vodoo/banshee, etc. Also Intel release full documentation and open source device drivers for their onboard video, and some people think that (now that ATI is owned by AMD) it's only a matter of time before modern ATI cards become open too. Lastly, most video cards can be programmed as "standard VGA" cards, which doesn't give you high resolution but it's better than nothing.Brynet-Inc wrote:But yes, You have very little hope to use any of the proprietary hardware 2D/3D acceleration abilities. (Or other features..)
(You could always do some reverse engineering work for a few years.. With a bus analyzer etc..)
However, video is complicated - even with all the necessary documentation it'd take ages to write a good stable device driver. This is especially true for full 2D/3D acceleration, and shader languages (which typically means implementing a compiler to convert a standard shader language into a video card specific language).
That wouldn't necessarily be easy either. To support Windows drivers you'd need to implement half of WIndows (in this case, it'd be easier to join Reactos developers). Porting X11 drivers would be a bit easier, but they have the same problems as the rest of us (most modern video cards aren't supported well due to lack of documentation).vanillasnake21 wrote:I see, but is there any way to port the drivers to a custom OS? Or at least configure the os in a certain way that it will be able to use the driver written for a different os?
VESA/VBE is a standard way of getting framebuffer support. Regardless of what you do I'd recommend (as an absolute minimum) using VESA/VBE to set a default video mode during boot, as this will allow people to use graphics while you're trying to get better video drivers working. Depending on how it's done this could mean users need to reboot to change video modes, but I remember when Windows 95 was like that (and except for games, how often do you change video modes anyway?)...
There's 3 different versions of the VESA/VBE standard. Older video cards might only support "version 1", and very old video cards might not support any. Even if no VESA/VBE is supported you'd still be able to use the (non-VBE) video BIOS functions to setup standard VGA video modes (e.g. 640 * 480 * 16 colours).
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
- Brynet-Inc
- Member
- Posts: 2426
- Joined: Tue Oct 17, 2006 9:29 pm
- Libera.chat IRC: brynet
- Location: Canada
- Contact:
Yeah I should of checked what type of card he was using.. My bad ![Confused :?](./images/smilies/icon_confused.gif)
Still, I'll continue to follow the The Open Graphics Project, Hopefully they'll release a cheap card that'll be fun working with.
(I'm also hoping AMD will release documentation on ATI graphics hardware though..)
![Confused :?](./images/smilies/icon_confused.gif)
Still, I'll continue to follow the The Open Graphics Project, Hopefully they'll release a cheap card that'll be fun working with.
(I'm also hoping AMD will release documentation on ATI graphics hardware though..)
-
- Posts: 7
- Joined: Sun Jun 17, 2007 3:28 pm
- Location: Brooklyn