home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / c / cl5sr386.zip / GO32 / DRIVER.H < prev    next >
Text File  |  1992-04-13  |  3KB  |  79 lines

  1. /* DRIVER.H */
  2.  
  3.  
  4. typedef struct {
  5.     unsigned short  modeset_routine;
  6.     unsigned short  paging_routine;
  7.     unsigned short  driver_flags;
  8.     unsigned short  def_tw;
  9.     unsigned short  def_th;
  10.     unsigned short  def_gw;
  11.     unsigned short  def_gh;
  12. } OLD_GR_DRIVER;
  13.  
  14. typedef struct {
  15.     unsigned short  modeset_routine;
  16.     unsigned short  paging_routine;
  17.     unsigned short  driver_flags;
  18.     unsigned short  def_tw;
  19.     unsigned short  def_th;
  20.     unsigned short  def_gw;
  21.     unsigned short  def_gh;
  22.     unsigned short  def_numcolor;
  23.     unsigned short  driver_init_routine;
  24.     unsigned short  text_table;
  25.     unsigned short  graphics_table;
  26. } NEW_GR_DRIVER;
  27.  
  28. typedef union {
  29.     OLD_GR_DRIVER   old;
  30.     NEW_GR_DRIVER   new;
  31. } GR_DRIVER;
  32.  
  33. typedef struct {
  34.     unsigned short  width;
  35.     unsigned short  height;
  36.     unsigned short  number_of_colors;
  37.     unsigned char   BIOS_mode;
  38.     unsigned char   special;
  39. } GR_DRIVER_MODE_ENTRY;
  40.  
  41.  
  42.  
  43.  
  44. #define GRD_NEW_DRIVER  0x0008        /* NEW FORMAT DRIVER IF THIS IS SET */
  45.  
  46. #define GRD_PAGING_MASK 0x0007        /* mask for paging modes */
  47. #define GRD_NO_RW    0x0000        /* standard paging, no separate R/W */
  48. #define GRD_RW_64K    0x0001        /* two separate 64K R/W pages */
  49. /* THE FOLLOWING THREE OPTIONS ARE NOT SUPPORTED AT THIS TIME !!! */
  50. #define GRD_RW_32K    0x0002        /* two separate 32Kb pages */
  51. #define GRD_MAP_128K    0x0003        /* 128Kb memory map -- some Tridents
  52.                        can do it (1024x768x16 without
  53.                        paging!!!)
  54. #define GRD_MAP_EXTMEM  0x0004        /* Can be mapped extended, above 1M.
  55.                        Some Tseng 4000-s can do it, NO
  56.                        PAGING AT ALL!!!! */
  57.  
  58. #define GRD_TYPE_MASK    0xf000        /* adapter type mask */
  59. #define GRD_VGA        0x0000        /* vga */
  60. #define GRD_EGA        0x1000        /* ega */
  61. #define GRD_HERC    0x2000        /* hercules */
  62.  
  63. #define GRD_PLANE_MASK  0x0f00        /* bitplane number mask */
  64. #define GRD_8_PLANES    0x0000        /* 8 planes = 256 colors */
  65. #define GRD_4_PLANES    0x0100        /* 4 planes = 16 colors */
  66. #define GRD_1_PLANE    0x0200        /* 1 plane  = 2 colors */
  67. #define GRD_16_PLANES    0x0300        /* VGA with 32K colors */
  68. #define GRD_8_X_PLANES  0x0400        /* VGA in mode X w/ 256 colors */
  69.  
  70. #define GRD_MEM_MASK    0x00f0        /* memory size mask */
  71. #define GRD_64K        0x0010        /* 64K display memory */
  72. #define GRD_128K    0x0020        /* 128K display memory */
  73. #define GRD_256K    0x0030        /* 256K display memory */
  74. #define GRD_512K    0x0040        /* 512K display memory */
  75. #define GRD_1024K    0x0050        /* 1MB display memory */
  76. #define GRD_192K    0x0060        /* 192K -- some 640x480 EGA-s */
  77. #define GRD_M_NOTSPEC    0x0000        /* memory amount not specified */
  78.  
  79.