SuperVGA Mode Info Block

 This structure is returned by INT 10H 4f01H to obtain information about a
 specified video mode when VESA/SCGA support is present.  It will return
 info about standard CGA/EGA/VGA modes as well.

SvgaInfoRec
  Offset Size Contents
  ▀▀▀▀▀▀ ▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
   +0      2  rModeAttrs   bit fields: mode characteristics
   +2      1  rWinAAttrs   bit fields: windowing system characteristics
   +3      1  rWinBAttrs   bit fields: windowing system characteristics
   +4      2  wWinGran     window granularity, in Kbytes
   +6      2  wWinSize     window size, in KB
   +8      2  wWinASeg     window A segment address
  +0aH     2  wWinBSeg     window B segment address
  +0cH     4  pfWinFnPtr   far address of window-handling function
  +10H     2  wScanLineSiz bytes per scan line
────────────────────────── Extended/optional information; present only
                           when rModeAttrs bit 1 is 1.
  +12H     2  wHorizRes    horizontal resolution, in pixels or char cells
  +14H     2  wVertRes     vertical resolution, in pixels or char cells
  +16H     1  bCharWide    character cell width
  +17H     1  bCharHigh    character cell height
  +18H     1  bPlaneCnt    number of video memory planes
  +19H     1  bBitsPerPel  number of bits per pixel
  +1aH     1  bBankCnt     number of video memory banks
  +1bH     1  bMemModel    memory model type code
  +1cH     1  bBankSize    video memory bank size, in Kbytes
  +1dH   227  res          reserved
         256               required size of caller buffer

  rModeAttrs  bit flags, defined as follows:
         1
        ┌5- -8╥7┬6┬5┬4┬3┬2┬1┬0┐
        │0...0║0 0 0│gcoxs│
        └─ - ─╨─┴─┴─┴╥┴╥┴╥┴╥┴╥┘ bit  mask
                     ║ ║ ║ ║ ╚══► 0: 01H mode supported with this hardware
                     ║ ║ ║ ╚════► 1: 02H extended information, starting at
                     ║ ║ ║               offset 12H, is present
                     ║ ║ ╚══════► 2: 04H supports output fns such as
                     ║ ║                 INT 10H 0aH and INT 10H 0eH
                     ║ ╚════════► 3: 08H 1=color mode; 0=monochrome mode
                     ╚══════════► 4: 10H 1=graphics mode; 0=text mode
  rWinAAttrs  and...
  rWinBAttrs  bit flags that describe characteristics of the CPU memory
              windowing scheme for the (maximum of two) windows:
              ┌7┬6┬5┬4┬3┬2┬1┬0┐
              │0 0 0 0 0│wrs│
              └─┴─┴─┴─┴─┴╥┴╥┴╥┘ bit  mask
                         ║ ║ ╚══► 0: 01H 1=window (A or B) supported
                         ║ ╚════► 1: 02H 1=window is readable
                         ╚══════► 2: 04H 1=window is writable

    wWinGran  Window granularity: Specifies the smallest boundary, in KB,
              on which the window can be placed in the video memory.

    wWinSize  specifies the size of the window in KB.

    wWinASeg  and...
    wWinBSeg  address specify the segment addresses where the windows are
              located in the CPU address space.

  pfWinFnPtr  is the far address of the video memory windowing function.
              The windowing function can be invoked either through VESA BIOS
              fn 05H, or by calling the function directly.  A direct call
              will provide faster access to the hardware paging registers
              than using INT 10h, and is intended to be used by high
              performance applications.  See INT 10H 4f05H for details.

wScanLineSiz  size, in bytes, of a video-memory scan line.  This is the
              "logical" width, which may be larger than the dimensions
              implied by the physical video mode.

───────────── Extended/optional info; present when rModeAttrs bit 1 is set.
   wHorizRes  and...
    wVertRes  horizontal and vertical resolution of this mode.  In graphics
              modes (wModeAttrs bit 4 is set), this is expressed in pixels.
              In text modes (wModeAttrs bit 4 is clear), this is expressed
              in character cells.

   bCharWide  and...
   bCharHigh  width and height of a character cell, in pixels

   bPlaneCnt  video memory planes.

 bBitsPerPel  specifies the number of bits that define the color of one
              pixel.  16-color and 256-color graphics modes would specify 4
              and 8 respectively.

              Nonstandard memory organizations can be specified using this
              field and the bPlaneCnt field.  For example, a 16-color
              packed-pixel mode would be described as having 1 plane and
              4 bits per pixel.

    bBankCnt  number of banks (groups of scan lines).  Given a scan line s,
              you should select bank s MOD bBankCnt and address the scan
              line as line INT(s/bBankCnt).

              For instance, CGA graphics modes have two banks; even numbered
              lines start at b800:0000 and odd-numbered lines start at
              b800:2000.  Hercules graphics modes have four banks starting
              at b000:0000, 2000, 4000, and 6000.

   bMemModel  specifies the general type of memory organization used in this
              mode.  The following models have been defined:

               00H     = Text mode
               01H     = CGA graphics
               02H     = Hercules graphics
               03H     = 4-plane planar
               04H     = Packed pixel
               05H     = Non-chain 4, 256 color
               06H-0fH = Reserved, to be defined by VESA
               10H-ffH = To be defined by OEM

   bBankSize  specifies the size of a bank (group of scan lines) in units
              of 1K.  For CGA and Hercules graphics modes this is 8, as each
              bank is 8192 (2000H) bytes in length.  For modes that don't
              have scanline banks (such as VGA modes 0Dh-13h), this field
              should be set to 0.

See Also: SVGA
          VESA/SVGA BIOS Services
                                    -♦-