home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 17 / CD_ASCQ_17_101194.iso / dos / prg / svgabg55 / notes_s3.svg < prev    next >
Text File  |  1994-03-30  |  3KB  |  88 lines

  1. SuperVGA S3 BGI driver 
  2. Version 1.6
  3. March 30, 1994
  4.  
  5. Revisions:
  6.     1.5 - August 28, 1993
  7.     1.1 - May 20, 1993
  8.     1.05 - January 28, 1993
  9.     1.0 - June 28, 1992
  10.  
  11. This is the latest version of my SuperVGA S3 BGI driver.  All functions
  12. have been implemented, but there may still be bugs.
  13.  
  14.     o Apparently there is a problem with using putimage at addresses >64k
  15.     (The driver will put up a solid block instead of the image)
  16.  
  17. Note:  Palette functions, and the mouse cursor will not work with this driver.
  18.        Paging is not yet implemented
  19.  
  20.   Using the driver in the 256 and 16 color modes is similar to using the
  21.   standard SuperVGA 256 and 16 color drivers.  See the files NOTES[256|16].SVG
  22.  
  23.   Using the S3 driver in 32768 color mode:
  24.  
  25.     Implementing the 32768 color driver involved several hacks, as
  26.     the BGI interface only supports 8-bit color values, but the driver
  27.     needed support for 15-bit color values.  The procedures that needed
  28.     to be changed were those that accepted color values, (SetColor,
  29.     SetFillStyle, SetFillPattern, PutPixel and Floodfill)  and those 
  30.     that return color values (GetColor and GetPixel).
  31.     As the HiColor modes do not support palettes, I decided to use
  32.     the SetRgbPalette call to set colors, as it accepts values for the 
  33.     R,G and B components of the color.
  34.  
  35.     The format of a pixel in the HiColor modes is:
  36.         -Byte 1- -Byte 0-
  37.         xRRRRRGG GGGBBBBB
  38.  
  39.     Several new functions are defined to make the color selection easier.
  40.     In addition, the macro RGB(rv,gv,bv) has been defined.  It packs
  41.     the R, G and B values into the format described above and returns the
  42.     combined color.
  43.  
  44.     * RealDrawColor(); - Sets the current drawing color.
  45.       Usage:
  46.         setcolor(RealDrawColor(RGB(rval,gval,bval)); - HiColor modes
  47.         setcolor(RealDrawColor(cval)); - (suggested for any other driver)
  48.  
  49.     * RealFillColor(); - Sets the current fill color.
  50.       Usage:
  51.         setfillstyle(fillstyle,RealFillColor(RGB(rval,gval,bval)));
  52.         setfillstyle(fillstyle,RealFillColor(cval));
  53.         setfillpattern(fillpat,RealFillColor(RGB(rval,gval,bval)));
  54.         setfillpattern(fillpat,RealFillColor(cval));
  55.  
  56.     * RealColor(); - For putpixel, sets the color of the pixel
  57.                - For floodfill, sets the color of the boundary
  58.         putpixel(x,y,RealColor(RGB(rval,gval,bval)));
  59.         putpixel(x,y,RealColor(cval));
  60.         floodfill(x,y,RealColor(RGB(rval,gval,bval)));
  61.         floodfill(x,y,RealColor(cval));
  62.  
  63.     * GetPixel normally only returns an 8-bit value.  However, the
  64.       value returned from the BGI driver is a 16-bit value in DX (the 
  65.       BGI kernel loads the value into AX and clears the upper 8 bits),
  66.       so to read the value of a pixel:
  67.  
  68.       In Pascal:
  69.         Color := getpixel(x,y);
  70.         inline($89/$56/<Color);  (* Loads 15-bit color value *)
  71.  
  72.       In C:
  73.         Color = getpixel(x,y);
  74.         Color = _DX;
  75.       
  76.     o Mouse code hooks added (1.05)
  77.  
  78.     o Fixed text clipping at right and bottom edges (1.1)
  79.  
  80.     o Added compile-time support for 8x8, 8x14, or 8x16 bitmap fonts (1.1)
  81.  
  82.     o Fixed detection so it should work with newer S3 cards (1.1)
  83.  
  84.     o Drivers now have compile-time support for BGI version 3.0.
  85.       Supports protected mode with Borland Pascal 7.0 (1.5)
  86.  
  87.     o Fixed lockup bug (1.6)
  88.