------------------------------------------------------------------------- DBVGAL15.ZIP David Boynton's VGA Library, V1.5 ------------------------------------------------------------------------- This library is placed in the public domain. However, if you like it, and would like to make a small donation to encourage me to improve this product, my address is: David Boynton 8083 Budding Br Rd, T-3 Glen Burnie MD 21061-5077 Please let me know of any "corrections" or improvements you'd like to see. Send netmail to either: Avi-technic BBS 1:261/662 or: Dave's Doghouse 1:261/1096 (different Dave) Detailed instructions can be obtained from the header files. ------------------------------------------------------------------------- VIDLIB.H ------------------------------------------------------------------------- The library is built from seven major components: masm functions vidlib.obj general VGA functions vidlib4.obj 16 color mode VGA functions vidlib8.obj 256 color mode VGA functions vesa.obj general VESA functions vesa8.obj 256 color mode (640x400,640x480,etc) VESA functions vtext.obj text mode function (25,28,33,40,50 line mode sets) Caveat Programmer: remember, all function arguments are in bytes, not pixels; there is no bitblt (unaligned move) function in this library for 16 color modes. Also, beware of using the low-level VGA register functions with inappropriate values. They do no checking for ignorance. Most of the C functions would be a lot faster in masm, but I haven't gotten around to converting them yet. The 16 color functions in particular. ------------------------------------------------------------------------- DEMOS ------------------------------------------------------------------------- They were never really intended as "Demos" in the way you probably think, but as "test" programs to show how the library works (or IF the library works). testvl.exe: tests the text, 16 color, 256 color, 256 color vesa, and palette functions. test.exe: tests the low-level (VGA register level) functions. vgaregs.exe: uses the library to dump the VGA registers to the standard output. vesainfo.exe: shows information about what VESA modes are available on the current display card. l28.com: sets the display to 28 lines, EGA font (9x14). l33.exe: 33 lines, modified EGA font (9x12). l40.com: 40 lines, CGA font in larger box (9x10). Note that line-drawing characters don't connect in this mode. ------------------------------------------------------------------------- DEBUGGING ------------------------------------------------------------------------- The library currently has a "debugging mode" built in. All you have to do is call the 'Start_vgadebug(pathname)' to open (or append) a debug file, and 'Close_vgadebug()' to turn it off. It can be turned on/off/on/ etc. several times during a given program. ------------------------------------------------------------------------- VESA.H ------------------------------------------------------------------------- The functions in this module have undergone a lot of work and testing. If all you need is 256 color modes, this has everything you need. Run testvl.exe (after loading your vesa BIOS driver) for a sample. ------------------------------------------------------------------------- Credits ------------------------------------------------------------------------- Much credit goes to books like: "Advanced Programmer's Guide to SuperVGAs", George Sutty and Steve Blair. Published by Brady; ISBN 0-13-010455-8. "Power Graphics Programming", Michael Abrash. Published by Que; ISBN 0-88022-500-9. No part of this library comes directly out of either book; all is original programming. The vesainfo.c demo program mostly came from the first book; I rewrote it to take advantage of my library. ------------------------------------------------------------------------- Coming Soon ------------------------------------------------------------------------- vtext - will support the full 256k (or 512k) VGA buffer. (for storage of text screens, or anything else) vidlib4 - will have a bitblt. - line and curve drawing. vidlib8 - Anti-aliasing, palette manipulation, full use of VGA memory. vidlib - non-standard mode sets like 320x240, 320x400, and functions to support them (the hard part). I already have the code for the mode sets, but it's what you do after that's so complicated. vesa4 - ? vesa8 - support for independent read/write windows. -------------------------------------------------------------------------