home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / coders / mesa-1.2.8 / include / mondello / clgd547x.h < prev    next >
C/C++ Source or Header  |  1996-05-27  |  2KB  |  96 lines

  1. /*
  2.    file: clgd547x.h
  3.    auth: Peter McDermott
  4.    date: Mon Feb 12 14:38:24 CST 1996
  5.    
  6. */
  7.  
  8. #ifndef _CLGD547X_H
  9. #define _CLGD547X_H
  10.  
  11. #include "type.h"
  12. #include "clgd5471.h"
  13. #include "clgd5472.h"
  14.  
  15. /* taken from /usr/src/xc/programs/xfree86/common/xf86.h */
  16.  
  17. #define V_PHSYNC    0x0001
  18. #define V_NHSYNC    0x0002
  19. #define V_PVSYNC    0x0004
  20. #define V_NVSYNC    0x0008
  21. #define V_INTERLACE 0x0010
  22. #define V_DBLSCAN   0x0020
  23. #define V_CSYNC     0x0040
  24. #define V_PCSYNC    0x0080
  25. #define V_NCSYNC    0x0100
  26. #define V_PIXMUX    0x1000
  27. #define V_DBLCLK    0x2000
  28.  
  29. typedef struct {
  30.   char *name;
  31.   double Clock;
  32.   int CrtcHDisplay;
  33.   int CrtcHSyncStart;
  34.   int CrtcHSyncEnd;
  35.   int CrtcHTotal;
  36.   
  37.   int CrtcVDisplay;
  38.   int CrtcVSyncStart;
  39.   int CrtcVSyncEnd;
  40.   int CrtcVTotal;
  41.   
  42.   int bitsPerPixel;
  43.   int buffers;
  44.   int Flags;
  45. } mode, *modePtr;
  46.  
  47. typedef struct {
  48.   int inMondelloMode;
  49.   clgd5471State *s5471;
  50.   clgd5472State *s5472;
  51.   BYTE *hostMem;
  52.  
  53.   uint width;
  54.   uint height;
  55.   
  56. } clgd547xState, *clgd547xStatePtr;
  57.  
  58. extern int clgd547xPCISlot;             /* PCI slot the card is in */
  59.  
  60. extern char *clgd547xPhysicalBase;      /* physical linear memory detected via PCI */
  61. extern char *clgd547xLogicalBase;       /* logical linear memory (phys. mapped here) */
  62. extern char *clgd547xLogicalBase2;
  63. extern char *clgd547xSecondMegBase;     /* logical base of frame buffer mem (2nd meg) */
  64.  
  65. extern int clgd547xLogicalSize;
  66. extern int clgd547xInMondelloMode;       /* card is in or not in extended mode */
  67. extern int clgd547xAlreadyInited;        /* whether or not the card has been inited */
  68.  
  69. extern clgd547xState *clgd547xStateInfo; /* global state information */
  70.  
  71. int clgd547xProbe();
  72. int clgd547xInit();
  73.  
  74. void clgd547xSetMode(mode *m);
  75. clgd547xState *clgd547xCreateState();
  76. void clgd547xDeleteState(clgd547xState *s);
  77. void clgd547xSaveState(clgd547xState *s);
  78. void clgd547xRestoreState(clgd547xState *s);
  79. int clgd547xTestMemory(unsigned int *ptr);
  80.  
  81.  
  82. /* functions provided to jump-start Mesa conversion */
  83.  
  84. void clgd547x_init();
  85. void clgd547x_done();
  86.  
  87. int clgd547x_getxdim();
  88. int clgd547x_getydim();
  89. int clgd547x_getdepth();
  90. int clgd547x_getcolors();
  91. void clgd547x_setcolorindex(uint index, uint red, uint blue, uint green);
  92.  
  93. #endif
  94.  
  95.  
  96.