VESA video modes/interrupt 10h services in pmode

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
OSNewbie

VESA video modes/interrupt 10h services in pmode

Post by OSNewbie »

is it possible to use VESA interrupt 10h services in protected mode? do you need a certain VESA version to do it? i have one computer with VESA 1.2, one with VESA 2.0, and one with VESA 3.0 and would like my OS to run on them all, how can i get mode switching and bank switching to work in pmode or do i not use VESA at all??

thanks
Anton

RE:VESA video modes/interrupt 10h services in pmode

Post by Anton »

Yes, it's posible to use VESA under pmode, but version >=2. It's even better on version 3.0 . But, you can't do it with version 1. Why do you need to bother about those computers anyway: it's a waste of time for nothing. I mean with Vesa 3 you can have any resoulution & bpp easy, but if you would stay with Vesa 1, you will have poor graphics. You should't be thining about the support for past computers, since then you'll have there problems.

Anton
carbonBased

RE:VESA video modes/interrupt 10h services in pmode

Post by carbonBased »

Supporting Vesa 1.0, 1.2 and 2.0 is hardly a waste of time.

What good is a graphical OS which doesn't support graphics?

There are countless numbers of cards out there that do not support vesa >= 2.0 which could easily be supported through vm86.  There are also countless graphics libraries showing how to do it.  I wrote one myself (granted, over 6 years ago) for DJGPP (www.neuraldk.org) which could be used as a reference.  The code is old, and it isn't great to look at (a lot of assembly and nasty looking C code was used to get the most performance (I profiled everything)), but it works.  The only thing missing is your OSs vm86 handler.

I've heard many nice reviews about Vesa 3.0, but the fact of the matter is, a lot of cards in use today don't support it.  I have a fairly recent ATI Radeon which only supports up to version 2.0.  I don't particularly want to cut out that slice of the market simply because I only wrote Vesa 3.0 drivers.

In all honesty, Vesa should be a fall back anyway... it should be used only if a custom, accelerated driver doesn't exist.  It's a catch-all solution, and as such, it should catch all, which means supporting vesa 1.0 and 1.2 as well as 2.0 and 3.0.

At least such is my opinion...
Jeff
OSNewbie

RE:VESA video modes/interrupt 10h services in pmode

Post by OSNewbie »

well i want to support all of those cards whether through vesa or not... so if it were not through vesa is there any other way to set up graphics modes and switch memory windows/etc? or at that level is it all card-specific if vesa is not used?
carbonBased

RE:VESA video modes/interrupt 10h services in pmode

Post by carbonBased »

If you aren't using VESA, then yes, everything is going to be card specific (save for the VGA standard ports, that all vga and svga cards should support, which'll get you up to 640x480x4bpp, or 320x200x8bpp (and various "modeX" modes)).

Most manufacturers, however, have a standard API for each of their cards (given a certain period).  For example, writting a single Mach64 driver can encompass many cards developed by ATI in the past, such as a single Radeon driver can encompass many of the current cards produced by ATI (all of which, I might add, can and will fall back to Vesa, if required... I've found ATI pretty good at supporting Vesa).

Jeff
OSNewbie

RE:VESA video modes/interrupt 10h services in pmode

Post by OSNewbie »

OK Great where would i find the information for writing card-specific drivers? from those companies themselves? and is it all done through ports? also, you say that some cards support some standard ports, what are those and does documentation on the use of those standards exist?

i am thinking i would like some card-specific drivers, if they fail then the standard, if that fails then vesa or something like that. let me know if that is a good idea or not.
EKP

RE:VESA video modes/interrupt 10h services in pmode

Post by EKP »

VBE 2.x defines a 16-bit (!! What, the planned to use this on a 286 ?!!)protected mode interface...

VBE 3.x defines yet a different interface.

I would try - 1) specific 2) VESA (through VBE) 3) standard 4) bios calls through virtual 86
OSNewbie

RE:VESA video modes/interrupt 10h services in pmode

Post by OSNewbie »

OK that sounds good. now just another question: where is info/docs about writing specific drivers and standard without vesa? and how do i make the OS know that it does not have a specific driver and go to VESA?
Anton

RE:VESA video modes/interrupt 10h services in pmode

Post by Anton »

The src for most of cards exists in XWindow project(www.xfree86.org). I don't think that docs exist, since some of these drivers were writen by the manufacturer, and there are in some way secret.

Anton
carbonBased

RE:VESA video modes/interrupt 10h services in pmode

Post by carbonBased »

Search the internet for VGADOC.  You should be able to find it in quite a few places.

It's a set of text documents describing interfaces to many common graphics chipsets (as well as the Vesa 1.0 - 2.0 standards, and possibly 3.0 now, as well).

The information is very well documented, but mostly in a reference style document, and so downloading working source (such as XFree86 drivers www.xfree86.org, or svgalib www.svgalib.org drivers would probably also be helpful)

Jeff
Post Reply