home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1999 January / pcwk_01_1999.iso / Tajnepp / MCLK093 / S3.H < prev    next >
C/C++ Source or Header  |  1997-05-04  |  4KB  |  133 lines

  1. //    The following line denies outside code access to certain
  2. //    member functions of class vga.
  3. #define __s3_h
  4. #include "vga.h"
  5.  
  6. //    s3.h
  7. //
  8. //    Contains class definitions for S3 Vision, Trio, Virge chipsets
  9. //
  10. //    requires reference to "vga.h"
  11.  
  12. class _S3 : public vga    {
  13. protected:
  14.     int sdac;        //    boolean variable, SDAC present?
  15.      int tivpdac;    //    boolean variable, TIVP3025 present?
  16.      uchar save_cr38, save_cr39, save_cr45, save_cr55, save_sr08;
  17.         // v0.93b "save" variables are placeholders
  18.     virtual double _PLL( uchar M, uchar N, uchar R );
  19.         //    Calculate MCLK frequency
  20.     virtual void mclk_help( void );    //    Puts help message in msg.temp
  21.     message _ramtype( uchar mask );
  22.         // Returns RAM information (EDO/RAM), depending on mask's bit
  23.         // settings
  24. public:
  25.     _S3( vga_info info );    // 0.93b constructor now preserves registers
  26.                          // which are changed to enable extended access
  27.     ~_S3( );    //  0.93b added destructor to restore modified registers
  28.     void _mclk( int cmd );    //    MCLK for SDAC only!
  29.     void _fxn1( int cmd );    //    Write Wait State Control, enable fast/WR
  30.     void _fxn2( int cmd );    //   Decode Wait Control (local-bus)
  31.     void _fxn3( int cmd );    //   Read wait control
  32.     void _fxn4( int cmd );    //    Read ahead cache
  33. //    void _fxn5( int cmd );
  34. };
  35.  
  36.  
  37. class _805i : public _S3    {
  38. protected:
  39. public:
  40.     _805i( vga_info info ) : _S3( info )
  41.         {;};    //    Null constructor
  42.     void _fxn5( int cmd );    //    Enable memory interleaving
  43. };
  44.  
  45.  
  46. class _864 : public _S3 {
  47. protected:
  48. public:
  49.     _864( vga_info info ) : _S3( info )
  50.         {;};    //    Null constructor
  51.     message _info( void );    //    S3 misc/setup information (EDO/RAM?)
  52.     void _fxn1( int cmd );    //    RAM page-mode Control
  53.     void _fxn2( int cmd );    //    Enable Fast Write Buffer (local-bus)
  54.     void _fxn3( int cmd );    //    Write latching delay (VL-BUS only)
  55.     void _fxn4( int cmd );    //    RAS' precharge timing control
  56.     void _fxn5( int cmd );    //    RAS' low timing cntrol
  57. };
  58.  
  59.  
  60. class _868 : public _864 {
  61. protected:
  62. public:
  63.     message _info( void );    //    S3-868 setup information (EDO/RAM?)
  64.     _868( vga_info info ) : _864( info )
  65.         {;};    //    Null constructor
  66. };
  67.  
  68.  
  69. class _964 : public _864 {
  70. protected:
  71.     double _PLL( uchar M, uchar N, uchar R );
  72.         //    Calculate MCLK frequency for TIVP3025 RAMDAC
  73. public:
  74.     message _info( void );    //    S3-964 misc information (EDO/RAM?)
  75.      void _mclk( int cmd );    //    TIVP 3025 RAMDAC programming
  76.      void mclk_help( void );    //    TIVP 3025 help
  77.     void _fxn1( int cmd );    //    Write Wait State Control & SAM
  78.     _964( vga_info info ) : _864( info )
  79.         {;};    //    Null constructor
  80. };
  81.  
  82.  
  83. class _968 : public _964 {    //    Will add some more features later...
  84. protected:
  85. public:
  86.     message _info( void );    //    S3-968 misc/setup info (EDO/burst RAM)
  87.     _968( vga_info info ) : _964( info )
  88.         {;};    //    Null constructor
  89. };
  90.  
  91.  
  92.  
  93. class _Trio : public _864    {
  94. protected:
  95.     void read_PLL( uchar *M, uchar *N, uchar *R); //    Read PLL registers
  96. public:
  97.     _Trio( vga_info info ) : _864( info )
  98.         { };    //    constructor
  99.     void _fxn3( int cmd );    //    RAS' timing control
  100.     void _fxn4( int cmd );    //    3MCLK/2MCLK memory writes, v0.84
  101.     void _fxn5( int cmd )    //    nothing, for now
  102.         {
  103.             strcpy(msg.text,"5  function NOT available\n");
  104.         };
  105.     void _mclk( int cmd );    //    Trio MCLK programming
  106.  
  107. };
  108.  
  109.  
  110. class _Triov : public _Trio    {
  111. public:
  112.     message _info( void );    //    Trio64V setup information (EDO/RAM?)
  113.     void _fxn1( int cmd );    //    RAM page-mode Control
  114.     _Triov( vga_info info ) : _Trio( info )
  115.         { };    //    constructor
  116. };
  117.  
  118.  
  119. class _Virge : public _Triov    {
  120. public:
  121.     message _info( void );    //    Virge setup information (no FPM DRAM)
  122.     _Virge( vga_info info ) : _Triov( info )
  123.         { };    //    constructor
  124. };
  125.  
  126.  
  127. class _VirgeVX : public _Virge    {
  128. public:
  129.      void mclk_help( void );        // MCLK constraints are different
  130.     _VirgeVX( vga_info info ) : _Virge( info )
  131.         { };    //    constructor
  132. };
  133.