home *** CD-ROM | disk | FTP | other *** search
/ BBS 1 / BBS#1.iso / document / vgadoc.arj / HICOLOR.PAS < prev    next >
Pascal/Delphi Source File  |  1991-12-06  |  2KB  |  78 lines

  1.   The Sierra SC11486 RAMDAC is an alternative RAMDAC for use with
  2.   the Tseng 4000 and ATI VGA Wonder XL.
  3.  
  4.   It provides 15 bit RGB with 5 bits for each basic color.
  5.  
  6.   When in HiColor mode each pixel occupied two bytes.
  7.  
  8.   Bits  0- 4 of the pixel is the blue component.
  9.         5- 9 of the pixel is the green component.
  10.        10-14 of the pixel is the red component.
  11.  
  12.  
  13.    This works for Tseng ET-4000 systems:
  14.  
  15.  
  16.    function sethicolor(mode:word);
  17.    var rp:registers;
  18.    begin
  19.      sethicolor:=false;
  20.      rp.ax:=$10f1;
  21.      intr($10,rp);
  22.      if (rp.ax=$10) and (rp.bl=1) then
  23.      begin
  24.        rp.ax:=$10f0;
  25.        rp.bl:=mode;      {or another video mode.}
  26.        intr($10,rp);
  27.        if rp.ax=$10 then
  28.        begin                 {now in HiColor mode.}
  29.          sethicolor:=true;
  30.        end;
  31.      end;
  32.    end;
  33.  
  34.    procedure plot(xcoor,ycoor,red,green,blue:word);
  35.    var l:longint;
  36.    begin
  37.      l:=(longint(640)*ycoor+xcoor)*2;
  38.      port[$3cd]:=l shr 16;
  39.      memw[$a000:(l and $ffff)]:=blue+(green shl 5)+(red shl 10);
  40.    end;
  41.  
  42.  
  43.  
  44.  
  45.  
  46.    BIOS extensions  (Tseng 4000 Sierra HiColor DAC):
  47.  
  48. ----------1010F0-----------------------------
  49. INT 10 - VIDEO - Tseng ET-4000 BIOS - SET HiColor GRAPHICS MODE
  50.         AX = 10F0h
  51.         BL = video mode (see also AH=00h)
  52.              32768-color modes:
  53.                    13h = 320x200
  54.                    2Dh = 640x350
  55.                    2Eh = 640x480
  56.                    2Fh = 640x400
  57.                    30h = 800x600
  58. Return: AX = 0010h if successful
  59.              other on error
  60. Note: the Tseng HiColor BIOS extensions are supported by:
  61.           Diamond Computer Systems  SpeedStar HiColor VGA
  62.           Everex Systems            HC VGA
  63.           Focus Information Systems 2theMax 4000
  64.           Cardinal Technologies     VGA732
  65.           Orchid ProDesigner IIs
  66. SeeAlso: AX=10F1h
  67.  
  68. Note: Not all BIOS versions support all of these modes!!
  69. ----------1010F1-----------------------------
  70. INT 10 - VIDEO - Tseng ET-4000 BIOS - GET DAC TYPE
  71.         AX = 10F1h
  72. Return: AX = 0010h if succesful, errorcode if not
  73.         BL = type of digital/analog converter
  74.              00h normal VGA DAC
  75.              01h Sierra SC1148x HiColor DAC
  76.              else other HiColor DAC
  77. SeeAlso: AX=10F0h
  78.