home *** CD-ROM | disk | FTP | other *** search
/ Mega A/V / mega_av.zip / mega_av / GRAPHUTL / FRASR172.ZIP / TPLUS.H < prev    next >
C/C++ Source or Header  |  1991-07-29  |  3KB  |  114 lines

  1. /* TPLUS.H, (C) 1991 The Yankee Programmer
  2.    All Rights Reserved
  3.    
  4.    This code may be distributed only when bundled with the Fractint 
  5.    source code.
  6.    
  7.    Mark C. Peterson
  8.    The Yankee Programmer
  9.    405-C Queen Street, Suite #181
  10.    Southington, CT 06489
  11.    (203) 276-9721
  12.    
  13. */
  14.  
  15. #ifndef TPLUS_H
  16. #define TPLUS_H
  17.  
  18. #ifdef __TURBOC__
  19. #define        OUTPORTB    outportb
  20. #define        INPORTB     inportb
  21. #define        OUTPORTW    outport
  22. #define        INPORTW     inport
  23. #else
  24. #define        OUTPORTB    outp
  25. #define        INPORTB     inp
  26. #define        OUTPORTW    outpw
  27. #define        INPORTW     inpw
  28. #endif
  29.  
  30. struct TPWrite {
  31.    unsigned 
  32.       COLOR0,  COLOR1,  COLOR2,  COLOR3,  VIDCON,  INDIRECT,   HUESAT,
  33.       OVSTRT,  MASKL,   MASKH,   LBNK,    HBNK,    MODE1,      MODE2,    
  34.       WBL,     WBH;
  35. };
  36.  
  37. struct TPRead {
  38.    unsigned
  39.       VIDSTAT,          CTL,     MASKL,   LBNK,    READAD,     MODE1,       
  40.       OVSTRT,  USCAN,   MASKH,   OSCAN,   HBNK,    ROWCNT,     MODE2,
  41.       RBL,     RBH;
  42. };
  43.  
  44. /* TPlus Register Data Offsets */
  45. #define     XDOTS       0
  46. #define     YDOTS       1
  47. #define     ASP_RATIO   2
  48. #define     DEPTH       4
  49. #define     PAGE        5
  50. #define     BOTBANK     7
  51. #define     TOPBANK     8
  52. #define     ZOOM        10
  53. #define     DISPMODE    11
  54. #define     DAC567DATA  15
  55. #define     VTOP        19
  56. #define     TOP         51
  57. #define     BOT         53
  58. #define     VPAN        55
  59. #define     NOT_INT     56
  60. #define     HIRES       61
  61. #define     PERM        64
  62. #define     BYCAP       68
  63. #define     PE          69
  64. #define     OVLE        70
  65. #define     HPAN        71
  66. #define     MEM_BASE    73
  67. #define     MEM_MAP     74
  68. #define     LIVEMIXSRC  91
  69. #define     RGB         93
  70. #define     SVIDEO      97
  71. #define     BUFFPORTSRC 98
  72. #define     CM1         101
  73. #define     CM2         102
  74. #define     LUTBYPASS   107
  75. #define     CM3         113
  76. #define     LIVEPORTSRC 115
  77. #define     LIVE8       116
  78. #define     VGASRC      123
  79.  
  80. struct _BOARD {
  81.    int ThisBoard, ClearScreen;
  82.    unsigned char far *Screen;
  83.    unsigned VerPan, HorPan, Top, Bottom;
  84.    unsigned xdots, ydots, Bank64k, RowBytes, RowsPerBank;
  85.    unsigned Reg[128];
  86.    void (*Plot)(unsigned x, unsigned y, unsigned long Color);
  87.    unsigned long (*GetColor)(unsigned x, unsigned y);
  88.  
  89.    struct TPRead Read;
  90.    struct TPWrite Write;
  91. };
  92.  
  93. extern struct _BOARD far TPlus;
  94.  
  95. int
  96.    CheckForTPlus(void),
  97.    FillTPlusRegion(unsigned fx, unsigned fy, unsigned xdots, unsigned ydots,
  98.                    unsigned long Color),
  99.    SetBoard(int BoardNumber),
  100.    SetColorDepth(int Depth),
  101.    SetTPlusMode(int TMode, int NotIntFlag, int Depth, int Zoom),
  102.    SetVGA_LUT(void),
  103.    TPlusLUT(unsigned char far *LUTData, unsigned Index, unsigned Number,
  104.             unsigned DosFlag);
  105.  
  106. void ClearTPlusScreen(void);
  107. void SetTPlusModeLinear(void);
  108. unsigned long ReadTPlusBankedPixel(unsigned x, unsigned y);
  109. void WriteTPlusBankedPixel(unsigned x, unsigned y, unsigned long Color);
  110. void TPlusZoom(int Zoom);
  111.  
  112.  
  113. #endif
  114.