Annotation of ntddk/src/video/displays/vga/i386/display.inc, revision 1.1.1.1

1.1       root        1: ;---------------------------Module-Header------------------------------;
                      2: ; Module Name: display.inc
                      3: ;
                      4: ; Copyright (c) 1992 Microsoft Corporation
                      5: ;-----------------------------------------------------------------------;
                      6: 
                      7: NUMBER_PLANES   equ     4               ;4 plane format
                      8: 
                      9: 
                     10: 
                     11: ;      The color structure is how this driver stores its physical
                     12: ;      colors in memory.  The color consists of four bytes (dword),
                     13: ;      one byte for each of three planes of color, and a fourth
                     14: ;      byte which is a combination of one bit from each plane, plus
                     15: ;      other special information.
                     16: ;
                     17: ;      C3Bit will have to be expanded as needed for the fourth plane.
                     18: 
                     19: 
                     20: phys_color     struc
                     21: pcol_C0        db      ?               ;Plane C0
                     22: pcol_C1        db      ?               ;Plane C1
                     23: pcol_C2        db      ?               ;Plane C2
                     24: pcol_C3        db      ?               ;Plane C3/Monochrome/Special information
                     25: phys_color     ends
                     26: 
                     27: 
                     28: ;      Definitions for the pcol_C3 byte of the physical color
                     29: ;
                     30: ;      Some of these definitions have limitations as to when they
                     31: ;      are valid.  They are as follows:
                     32: ;
                     33: ;      C0_BIT          color device, phys color, solid brushes if SOLID_COLOR
                     34: ;      C1_BIT          color device, phys color, solid brushes if SOLID_COLOR
                     35: ;      C2_BIT          color device, phys color, solid brushes if SOLID_COLOR
                     36: ;      C3_BIT          color device, phys color, solid brushes if SOLID_COLOR
                     37: ;      MONO_BIT        mono  device, phys color
                     38: ;      ONES_OR_ZEROS   color device, phys color, solid brushes if SOLID_COLOR
                     39: ;      GREY_SCALE      color device, dithered solid and hatched brushes
                     40: ;      SOLID_BRUSH     color device, solid brush qualifier
                     41: ;
                     42: ;      There may be brushes where the accelerators could have been set,
                     43: ;      but wasn't.  That's life.
                     44: 
                     45: 
                     46: SPECIAL        equ     pcol_C3         ;Special information is here
                     47: C0_BIT         equ     00000001b       ;  C0 color
                     48: C1_BIT         equ     00000010b       ;  C1 color
                     49: C2_BIT         equ     00000100b       ;  C2 color
                     50: C3_BIT         equ     00001000b       ;  C3 color
                     51: MONO_BIT       equ     00010000b       ;  Monochrome bit
                     52: ONES_OR_ZEROS  equ     00100000b       ;  Color is really all 1's or all 0's
                     53: GREY_SCALE     equ     01000000b       ;  Indicates a real grey scale brush
                     54: SOLID_BRUSH    equ     10000000b       ;  Indicates a solid color brush
                     55: 
                     56:         .errnz  (size phys_color) - 4   ;Must be a double word
                     57: 
                     58: 
                     59: 
                     60: ;      The brush structure is OEM dependant, and can contain whatever
                     61: ;      information that is needed to realize the given brush.
                     62: ;
                     63: ;      For this implementation, the brush will consist of an 8x8
                     64: ;      pattern for each of the planes, and another 8x8 pattern
                     65: ;      for monochrome devices and for monochrome to color conversion
                     66: ;      (for something like a hatched brush, this would contain the
                     67: ;      monochrome mask used to create the brush).
                     68: ;
                     69: ;      The style will also be stored in the brush and is used to
                     70: ;      catch hollow brushes and exit early.
                     71: ;
                     72: ;      A flag specific to the EGA is also stored in the brush.  This
                     73: ;      flag indicates that the brush is a solid brush and that the
                     74: ;      color for each plane is a solid color (all 1's or all 0's).
                     75: ;      Patterns which are solid in each plane can be handle as a
                     76: ;      special case in Bitblt when the raster op is P or Pn.
                     77: 
                     78: 
                     79: SIZE_PATTERN   equ     8               ;Size of an 8 by 8 pattern in bytes
                     80: 
                     81: 
                     82: oem_brush_def  struc
                     83: oem_brush_C0    db     SIZE_PATTERN dup (?)    ;C0 plane
                     84: oem_brush_C1    db     SIZE_PATTERN dup (?)    ;C1 plane
                     85: oem_brush_C2    db     SIZE_PATTERN dup (?)    ;C2 plane
                     86: oem_brush_C3    db     SIZE_PATTERN dup (?)    ;C3 plane
                     87: oem_brush_mono  db     32       dup (?)        ;Mono portion
                     88: oem_brush_style  dw    0                       ;Style of the brush
                     89: oem_brush_accel  db    0                       ;Accellerator for solids
                     90: oem_brush_fg    db     0                       ;current foreground (text) color
                     91: oem_brush_bg    db     0                       ;current background color
                     92: oem_brush_rwidth db    0                       ;pre expanded width
                     93: oem_brush_yshft  db    0                       ;
                     94: oem_brush_spar2  db    0                       ;just a fill byte for now
                     95: oem_brush_width         dd     0                       ;Width of brush
                     96: oem_brush_height dd     0                      ;Height of brush
                     97: oem_brush_planes db    32       dup (?)        ;Special Plane Masks
                     98: oem_brush_pmono  dd     0                      ;pointer to mono pattern
                     99: oem_brush_def  ends                            ;  (same as "Special" above)
                    100: 
                    101: ;      Brush styles defined by GDI
                    102: 
                    103: BS_SOLID            equ     0
                    104: BS_HOLLOW           equ     1
                    105: BS_HATCHED          equ     2
                    106: BS_PATTERN          equ     3
                    107: BS_MONO_PATTERN     equ     4
                    108: BS_COLOR_PATTERN    equ     5

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.