
This is a little package with some helpfull info about writing video
drivers.  Here's a list of what's in the package:

00-Read-Me          This file :-)

Bootscript.video    A standard Bootscript modified to mount a floppy before
                    starting the app_server

makefile            A sample makefile that builds the ViRGE driver and test
                    programs.

virge.cpp           The C++ (really C with C++ comments) source for the ViRGE
                    driver.

virge.h             The header file for the ViRGE driver.

tester.c            An extremely cheesey tester for the driver.

videotest.c         A less cheesey tester for the driver.


Hints and Other Stuff

If you're developing a driver under R3 for Intel, you're life will be *much*
simpler if:

1) You use a Matrox card as your BeOS display adapter.  The reason for this
is that the Matrox cards can be configured without using any "ISA I/O", and
therefore won't interfere with you bringing up your driver.

2) You have two monitors, or one of those monitor-switcher-thingies.  You'll
need one to code on, and one to bring your new card up on.

3) You order the cards in the PCI and/or AGP slot(s) such that the card
you're trying to write the driver for is the one that the machine uses to
display the BIOS and show the BeOS boot loader.  This has a number of
advantages, but the most important is that you'll be seeing the card exactly
like you would if it were the only card in the system.

These same things apply to the BeBox version of the BeOS, but the BIOS on
the video cards will not be executed before you take control of the card.
This can sometimes simplify the process of bringing up the card for the
first time, as it reliably in its power-up state.

Bootscript.video is a copy of the R3 Bootscript modified to mount a floppy
disk before the app_sever is run.  To use it, you will need to copy it over
the Bootscript in /boot/beos/system/boot.  If you place a copy of your
driver in /fd/home/config/add-ons/app_server or
/fd/beos/system/add-ons/app_server, the app_server will try to use it before
searching for a driver on the boot volume.


About 16-bit Support

Even though we have constants for both the 15 and 16 bits per pixel modes, we
only really ask for the 16-bit modes from the app_server.  When your driver is
called with a 15 or 16 bit mode, you should try to set whatever mode was
requested, or fall back to a mode you can support.  For example, your hardware
supports only 15 bits per pixel (1-5-5-5), but you're called requesting
B_16_BIT_800x600.  You should set up in 800x600 mode in 15 bits, and return 15
in the graphics_card_info.bits_per_pixel structure.  We know that this is a bit
of a kludge, but it's just to hold us over until the whole world changes with
R4.
