home *** CD-ROM | disk | FTP | other *** search
/ World of Graphics / WOGRAPH.BIN / 471.DRIVERS.H < prev    next >
C/C++ Source or Header  |  1993-03-07  |  7KB  |  191 lines

  1. /****************************************************************************
  2. *
  3. *                        MegaGraph Graphics Library
  4. *
  5. *                   Copyright (C) 1993 Kendall Bennett.
  6. *                            All rights reserved.
  7. *
  8. * Filename:        $RCSfile: drivers.h $
  9. * Version:        $Revision: 1.2 $
  10. *
  11. * Language:        ANSI C
  12. * Environment:    IBM PC (MS DOS)
  13. *
  14. * Description:    Header file providing constant and definitions for the
  15. *                video drivers supported by the library. This is factorised
  16. *                out to make it easier to use the SuperVGA routines outside
  17. *                of the MGL (such as in the SuperVGA kit).
  18. *
  19. * $Id: drivers.h 1.2 1993/03/07 04:03:42 kjb Exp $
  20. *
  21. * Revision History:
  22. * -----------------
  23. *
  24. * $Log: drivers.h $
  25. * Revision 1.2  1993/03/07  04:03:42  kjb
  26. * Numerous bug fixes and enhancements.
  27. *
  28. * Revision 1.1  1993/03/03  10:47:11  kjb
  29. * Initial revision
  30. *
  31. ****************************************************************************/
  32.  
  33. #ifndef    __DRIVERS_H
  34. #define    __DRIVERS_H
  35.  
  36. #ifndef    __DEBUG_H
  37. #include "debug.h"
  38. #endif
  39.  
  40. /*---------------------- Macros and type definitions ----------------------*/
  41.  
  42. /* Define the graphics subsystems available    */
  43.  
  44. typedef enum {
  45.     grDETECT,                /* Auto detect the graphics subsystem        */
  46.     grCGA,                    /* Standard CGA - not supported                */
  47.     grMCGA,                    /* Standard MCGA - only 256 color mode        */
  48.     grEGA,                    /* Standard EGA                                */
  49.     grEGA64,                /* EGA with 64kb of RAM - not supported        */
  50.     grEGAMONO,                /* EGA with mono monitor - not supported    */
  51.     grEGA64MONO,            /* EGA 64k mono monitor - not supported        */
  52.     grHERCMONO,                /* Standard Hercules - not supported        */
  53.     grVGA,                    /* Standard VGA                                */
  54.     grSVGA,                    /* VESA Super VGA                            */
  55.     grSVGA_ATI,                /* ATI Technologies SuperVGA                */
  56.     grSVGA_AHEADA,            /* AHEAD A SuperVGA                            */
  57.     grSVGA_AHEADB,            /* AHEAD B SuperVGA                            */
  58.     grSVGA_CHIPS,            /* Chips & Technologies SuperVGA            */
  59.     grSVGA_EVEREX,            /* Everex SuperVGA                            */
  60.     grSVGA_GENOA,            /* Genoa Systems SuperVGA (GVGA chipset)    */
  61.     grSVGA_OAKTECH,            /* OAK Technologies SuperVGA                */
  62.     grSVGA_PARADISE,        /* Paradise SuperVGA                        */
  63.     grSVGA_TRIDENT88,        /* Trident 8800 SuperVGA                    */
  64.     grSVGA_TRIDENT89,        /* Trident 8900 SuperVGA                    */
  65.     grSVGA_VIDEO7,            /* Video7 SuperVGA                            */
  66.     grSVGA_ET3000,            /* Tseng Labs ET3000 SuperVGA                */
  67.     grSVGA_ET4000,            /* Tseng Labs ET4000 SuperVGA                */
  68.     grSVGA_NCR,                /* NCR 77C22E SuperVGA                        */
  69.     grSVGA_S3,                /* S3 SuperVGA                                */
  70.     grSVGA_ACUMOS,            /* Acumos SuperVGA                            */
  71.     grSVGA_AL2101,            /* Advance Logic AL2101 SuperVGA            */
  72.     grSVGA_MXIC,            /* MXIC 68010 SuperVGA                        */
  73.     grSVGA_P2000,            /* Primus 2000 SuperVGA                        */
  74.     grSVGA_RT3106,            /* RealTek 3106 SuperVGA                    */
  75.     grSVGA_CIRRUS54,        /* Cirrus 5422 SuperVGA                        */
  76.     grUSER,                    /* User drivers start here                    */
  77.     } MGL_driver;
  78.  
  79. /* First and last SuperVGA driver numbers    */
  80.  
  81. #define    __FIRST_SVGA    grSVGA
  82. #define    __LAST_SVGA        grSVGA_CIRRUS54
  83.  
  84. /* Video DAC types */
  85.  
  86. typedef enum {
  87.     grVGADAC,                /* Normal DAC                                */
  88.     grHCDAC,                /* HiColor 15 bit DAC                        */
  89.     grHC2DAC,                /* HiColor 15/16 bit DAC                    */
  90.     grTCDAC,                /* TrueColor 24 bit DAC                        */
  91.     grDETECTDAC        = -1,    /* Auto detect the DAC type                    */
  92.     } MGL_dac;
  93.  
  94. /* Graphics modes supported    - the only video modes supported by this
  95.  * graphics library are those that support at least 16 colors per pixel.
  96.  */
  97.  
  98. typedef enum {
  99.     /* 16 color EGA video modes */
  100.  
  101.     grEGA_320x200x16    = 0,    /* 320x200 16 color 8 page                */
  102.     grEGA_640x200x16    = 1,    /* 640x200 16 color 4 page                */
  103.     grEGA_640x350x16    = 2,    /* 640x350 16 color 2 page                */
  104.  
  105.     /* 16 color VGA video modes */
  106.  
  107.     grVGA_640x400x16    = 3,    /* 640x400 16 color 2 page                */
  108.     grVGA_640x480x16    = 4,    /* 640x480 16 color 1 page                */
  109.  
  110.     /* 256 color VGA video modes */
  111.  
  112.     grVGA_320x200x256    = 5,    /* 320x200 256 color 1 page                */
  113.  
  114.     /* 256 color VGA ModeX video modes */
  115.  
  116.     grVGAX_320x200x256    = 6,    /* 320x200 256 color 4 page                */
  117.     grVGAX_320x240x256    = 7,    /* 320x240 256 color 3 page                */
  118.     grVGAX_320x400x256    = 8,    /* 320x400 256 color 2 page                */
  119.     grVGAX_320x480x256    = 9,    /* 320x480 256 color 1 page                */
  120.     grVGAX_360x200x256    = 10,    /* 360x200 256 color 3 page                */
  121.     grVGAX_360x240x256    = 11,    /* 360x240 256 color 3 page                */
  122.     grVGAX_360x400x256    = 12,    /* 360x400 256 color 1 page                */
  123.     grVGAX_360x480x256    = 13,    /* 360x480 256 color 1 page                */
  124.  
  125.     /* 16 color Super VGA video modes */
  126.  
  127.     grSVGA_800x600x16    = 14,    /* 800x600 16 color 1 page                */
  128.     grSVGA_1024x768x16    = 15,    /* 1024x768 16 color 1 page                */
  129.     grSVGA_1280x1024x16    = 16,    /* 1280x1024 16 color 1 page            */
  130.  
  131.     /* 256 color Super VGA video modes */
  132.  
  133.     grSVGA_640x350x256    = 17,    /* 640x250 256 color 1 page                */
  134.     grSVGA_640x400x256    = 18,    /* 640x400 256 color 1 page                */
  135.     grSVGA_640x480x256    = 19,    /* 640x480 256 color 1 page                */
  136.     grSVGA_800x600x256    = 20,    /* 800x600 256 color 1 page                */
  137.     grSVGA_1024x768x256    = 21,    /* 1024x768 256 color 1 page            */
  138.     grSVGA_1280x1024x256= 22,    /* 1280x1024 256 color 1 page            */
  139.  
  140.     /* 32,768 color Super VGA video modes */
  141.  
  142.     grSVGA_320x200x32k    = 23,    /* 320x200 32,768 color 1 page            */
  143.     grSVGA_640x350x32k    = 24,    /* 640x350 32,768 color 1 page            */
  144.     grSVGA_640x400x32k    = 25,    /* 640x400 32,768 color 1 page            */
  145.     grSVGA_640x480x32k    = 26,    /* 640x480 32,768 color 1 page            */
  146.     grSVGA_800x600x32k    = 27,    /* 800x600 32,768 color 1 page            */
  147.     grSVGA_1024x768x32k    = 28,    /* 1024x768 32,768 color 1 page            */
  148.     grSVGA_1280x1024x32k= 29,    /* 1280x1024 32,768 color 1 page        */
  149.  
  150.     /* 16 million color Super VGA video modes */
  151.  
  152.     grSVGA_320x200x16m    = 30,    /* 320x200 16 million color 1 page        */
  153.     grSVGA_640x350x16m    = 31,    /* 640x350 16 million color 1 page        */
  154.     grSVGA_640x400x16m    = 32,    /* 640x400 16 million color 1 page        */
  155.     grSVGA_640x480x16m    = 33,    /* 640x480 16 million color 1 page        */
  156.     grSVGA_800x600x16m    = 34,    /* 800x600 16 million color 1 page        */
  157.     grSVGA_1024x768x16m    = 35,    /* 1024x768 16 million color 1 page        */
  158.     grSVGA_1280x1024x16m= 36,    /* 1280x1024 16 million color 1 page    */
  159.  
  160.     grMAXMODE            = 36,    /* Maximum mode number                    */
  161.     } MGL_mode;
  162.  
  163. /*------------------------- Function Prototypes ---------------------------*/
  164.  
  165. #ifdef    __cplusplus
  166. extern "C" {            /* Use "C" linkage when in C++ mode    */
  167. #endif
  168.  
  169. /* In detectgr.asm */
  170.  
  171. void     MGL_detectGraph(int far *graphdriver,int far *chipID,
  172.         int far *memory,int far *dac,int far *graphmode);
  173.  
  174. /* In names.c */
  175.  
  176. char    * MGL_modeName(int mode);
  177. char    * MGL_driverName(int driver);
  178. char     * MGL_dacName(int dac);
  179. char    * MGL_chipsetName(int driver,int chipset);
  180.  
  181. /* In modes.c */
  182.  
  183. int     * MGL_availableModes(int driver,int memory);
  184. int        MGL_availablePages(int driver,int memory,int mode);
  185.  
  186. #ifdef    __cplusplus
  187. }                        /* End of "C" linkage for C++    */
  188. #endif
  189.  
  190. #endif    /* __DRIVERS_H */
  191.