home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / X / mit / server / ddx / x386 / vga / vga.h < prev    next >
Encoding:
C/C++ Source or Header  |  1991-06-26  |  3.9 KB  |  127 lines

  1. /*
  2.  * Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany.
  3.  *
  4.  * Permission to use, copy, modify, distribute, and sell this software and its
  5.  * documentation for any purpose is hereby granted without fee, provided that
  6.  * the above copyright notice appear in all copies and that both that
  7.  * copyright notice and this permission notice appear in supporting
  8.  * documentation, and that the name of Thomas Roell not be used in
  9.  * advertising or publicity pertaining to distribution of the software without
  10.  * specific, written prior permission.  Thomas Roell makes no representations
  11.  * about the suitability of this software for any purpose.  It is provided
  12.  * "as is" without express or implied warranty.
  13.  *
  14.  * THOMAS ROELL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  15.  * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  16.  * EVENT SHALL THOMAS ROELL BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  17.  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  18.  * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  19.  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  20.  * PERFORMANCE OF THIS SOFTWARE.
  21.  *
  22.  * Author:  Thomas Roell, roell@informatik.tu-muenchen.de
  23.  *
  24.  * $Header: /proj/X11/mit/server/ddx/x386/vga/RCS/vga.h,v 1.2 1991/06/27 00:02:52 root Exp $
  25.  */
  26.  
  27. #include "X.h"
  28. #include "misc.h"
  29. #include "x386.h"
  30.  
  31. extern Bool    vgaProbe();
  32. extern Bool    vgaScreenInit();
  33. extern void    vgaEnterLeaveVT();
  34. extern void    vgaAdjustFrame();
  35. extern void    vgaSwitchMode();
  36.  
  37. extern Bool    vgaSaveScreen();
  38. extern Bool    vgaCloseScreen();
  39. extern void    vgaBitBlt();
  40. extern void    vgaImageRead();
  41. extern void    vgaImageWrite();
  42. extern void    vgaPixBitBlt();
  43. extern void    vgaImageGlyphBlt();
  44.  
  45. extern void    vgaHWInit();
  46. extern void    vgaHWRestore();
  47. extern void *  vgaHWSave();
  48. extern void    vgaGetClocks();
  49.  
  50. extern int     vgaListInstalledColormaps();
  51. extern void    vgaStoreColors();
  52. extern void    vgaInstallColormap();
  53. extern void    vgaUninstallColormap();
  54.  
  55.  
  56. /*
  57.  * structure for accessing the video chip`s functions
  58.  */
  59. typedef struct {
  60.   Bool (* ChipProbe)();
  61.   void (* ChipEnterLeave)();
  62.   void (* ChipInit)();
  63.   void * (* ChipSave)();
  64.   void (* ChipRestore)();
  65.   void (* ChipAdjust)();
  66.   void (* ChipSetRead)();
  67.   void (* ChipSetWrite)();
  68.   void (* ChipSetReadWrite)();
  69.   int ChipMapSize;
  70.   int ChipSegmentSize;
  71.   int ChipSegmentShift;
  72.   int ChipSegmentMask;
  73.   int ChipReadBottom;
  74.   int ChipReadTop;
  75.   int ChipWriteBottom;
  76.   int ChipWriteTop;
  77.   
  78. } vgaVideoChipRec, *vgaVideoChipPtr;
  79.  
  80. extern vgaVideoChipRec ET3000;
  81. extern vgaVideoChipRec ET4000;
  82. extern vgaVideoChipRec GVGA;
  83. extern vgaVideoChipRec PVGA1;
  84.  
  85.  
  86. /*
  87.  * hooks for communicating with the VideoChip on the VGA
  88.  */
  89. extern void (* vgaInitFunc)();
  90. extern void (* vgaEnterLeaveFunc)();
  91. extern void * (* vgaSaveFunc)();
  92. extern void (* vgaRestoreFunc)();
  93. extern void (* vgaAdjustFunc)();
  94. extern void (* vgaSetReadFunc)();
  95. extern void (* vgaSetWriteFunc)();
  96. extern void (* vgaSetReadWriteFunc)();
  97. extern int vgaMapSize;
  98. extern int vgaSegmentSize;
  99. extern int vgaSegmentShift;
  100. extern int vgaSegmentMask;
  101. extern int vgaIOBase;
  102.  
  103. #include "vgaBank.h"
  104. extern pointer vgaOrigVideoState;    /* buffers for all video information */
  105. extern pointer vgaNewVideoState;
  106. extern pointer vgaBase;              /* the framebuffer himself */
  107.  
  108.  
  109. typedef struct {
  110.   unsigned char MiscOutReg;     /* */
  111.   unsigned char CRTC[25];       /* Crtc Controller */
  112.   unsigned char Sequencer[5];   /* Video Sequencer */
  113.   unsigned char Graphics[9];    /* Video Graphics */
  114.   unsigned char Attribute[21];  /* Video Atribute */
  115.   unsigned char DAC[768];       /* Internal Colorlookuptable */
  116.   unsigned char NoClock;        /* number of selected clock */
  117.   pointer FontInfo;             /* save area for fonts */ 
  118. } vgaHWRec, *vgaHWPtr;
  119.  
  120. #define BITS_PER_GUN 6
  121. #define COLORMAP_SIZE 256
  122.  
  123. extern void vgaImageGlyphBlt();
  124. extern void vgaDoBitBlt();
  125.  
  126. extern ScrnInfoRec vga256InfoRec;
  127.