linux/Documentation/svga.txt
<<
>>
Prefs
   1                       Video Mode Selection Support 2.13
   2                    (c) 1995--1999 Martin Mares, <mj@ucw.cz>
   3--------------------------------------------------------------------------------
   4
   51. Intro
   6~~~~~~~~
   7   This small document describes the "Video Mode Selection" feature which
   8allows the use of various special video modes supported by the video BIOS. Due
   9to usage of the BIOS, the selection is limited to boot time (before the
  10kernel decompression starts) and works only on 80X86 machines.
  11
  12   **  Short intro for the impatient: Just use vga=ask for the first time,
  13   **  enter `scan' on the video mode prompt, pick the mode you want to use,
  14   **  remember its mode ID (the four-digit hexadecimal number) and then
  15   **  set the vga parameter to this number (converted to decimal first).
  16
  17   The video mode to be used is selected by a kernel parameter which can be
  18specified in the kernel Makefile (the SVGA_MODE=... line) or by the "vga=..."
  19option of LILO (or some other boot loader you use) or by the "vidmode" utility
  20(present in standard Linux utility packages). You can use the following values
  21of this parameter:
  22
  23   NORMAL_VGA - Standard 80x25 mode available on all display adapters.
  24
  25   EXTENDED_VGA - Standard 8-pixel font mode: 80x43 on EGA, 80x50 on VGA.
  26
  27   ASK_VGA - Display a video mode menu upon startup (see below).
  28
  29   0..35 - Menu item number (when you have used the menu to view the list of
  30      modes available on your adapter, you can specify the menu item you want
  31      to use). 0..9 correspond to "0".."9", 10..35 to "a".."z". Warning: the
  32      mode list displayed may vary as the kernel version changes, because the
  33      modes are listed in a "first detected -- first displayed" manner. It's
  34      better to use absolute mode numbers instead.
  35
  36   0x.... - Hexadecimal video mode ID (also displayed on the menu, see below
  37      for exact meaning of the ID). Warning: rdev and LILO don't support
  38      hexadecimal numbers -- you have to convert it to decimal manually.
  39
  402. Menu
  41~~~~~~~
  42   The ASK_VGA mode causes the kernel to offer a video mode menu upon
  43bootup. It displays a "Press <RETURN> to see video modes available, <SPACE>
  44to continue or wait 30 secs" message. If you press <RETURN>, you enter the
  45menu, if you press <SPACE> or wait 30 seconds, the kernel will boot up in
  46the standard 80x25 mode.
  47
  48   The menu looks like:
  49
  50Video adapter: <name-of-detected-video-adapter>
  51Mode:    COLSxROWS:
  520  0F00  80x25
  531  0F01  80x50
  542  0F02  80x43
  553  0F03  80x26
  56....
  57Enter mode number or `scan': <flashing-cursor-here>
  58
  59   <name-of-detected-video-adapter> tells what video adapter did Linux detect
  60-- it's either a generic adapter name (MDA, CGA, HGC, EGA, VGA, VESA VGA [a VGA
  61with VESA-compliant BIOS]) or a chipset name (e.g., Trident). Direct detection
  62of chipsets is turned off by default (see CONFIG_VIDEO_SVGA in chapter 4 to see
  63how to enable it if you really want) as it's inherently unreliable due to
  64absolutely insane PC design.
  65
  66   "0  0F00  80x25" means that the first menu item (the menu items are numbered
  67from "0" to "9" and from "a" to "z") is a 80x25 mode with ID=0x0f00 (see the
  68next section for a description of mode IDs).
  69
  70   <flashing-cursor-here> encourages you to enter the item number or mode ID
  71you wish to set and press <RETURN>. If the computer complains something about
  72"Unknown mode ID", it is trying to tell you that it isn't possible to set such
  73a mode. It's also possible to press only <RETURN> which leaves the current mode.
  74
  75   The mode list usually contains a few basic modes and some VESA modes.  In
  76case your chipset has been detected, some chipset-specific modes are shown as
  77well (some of these might be missing or unusable on your machine as different
  78BIOSes are often shipped with the same card and the mode numbers depend purely
  79on the VGA BIOS).
  80
  81   The modes displayed on the menu are partially sorted: The list starts with
  82the standard modes (80x25 and 80x50) followed by "special" modes (80x28 and
  8380x43), local modes (if the local modes feature is enabled), VESA modes and
  84finally SVGA modes for the auto-detected adapter.
  85
  86   If you are not happy with the mode list offered (e.g., if you think your card
  87is able to do more), you can enter "scan" instead of item number / mode ID.  The
  88program will try to ask the BIOS for all possible video mode numbers and test
  89what happens then. The screen will be probably flashing wildly for some time and
  90strange noises will be heard from inside the monitor and so on and then, really
  91all consistent video modes supported by your BIOS will appear (plus maybe some
  92`ghost modes'). If you are afraid this could damage your monitor, don't use this
  93function.
  94
  95   After scanning, the mode ordering is a bit different: the auto-detected SVGA
  96modes are not listed at all and the modes revealed by `scan' are shown before
  97all VESA modes.
  98
  993. Mode IDs
 100~~~~~~~~~~~
 101   Because of the complexity of all the video stuff, the video mode IDs
 102used here are also a bit complex. A video mode ID is a 16-bit number usually
 103expressed in a hexadecimal notation (starting with "0x"). You can set a mode
 104by entering its mode directly if you know it even if it isn't shown on the menu.
 105
 106The ID numbers can be divided to three regions:
 107
 108   0x0000 to 0x00ff - menu item references. 0x0000 is the first item. Don't use
 109        outside the menu as this can change from boot to boot (especially if you
 110        have used the `scan' feature).
 111
 112   0x0100 to 0x017f - standard BIOS modes. The ID is a BIOS video mode number
 113        (as presented to INT 10, function 00) increased by 0x0100.
 114
 115   0x0200 to 0x08ff - VESA BIOS modes. The ID is a VESA mode ID increased by
 116        0x0100. All VESA modes should be autodetected and shown on the menu.
 117
 118   0x0900 to 0x09ff - Video7 special modes. Set by calling INT 0x10, AX=0x6f05.
 119        (Usually 940=80x43, 941=132x25, 942=132x44, 943=80x60, 944=100x60,
 120        945=132x28 for the standard Video7 BIOS)
 121
 122   0x0f00 to 0x0fff - special modes (they are set by various tricks -- usually
 123        by modifying one of the standard modes). Currently available:
 124        0x0f00  standard 80x25, don't reset mode if already set (=FFFF)
 125        0x0f01  standard with 8-point font: 80x43 on EGA, 80x50 on VGA
 126        0x0f02  VGA 80x43 (VGA switched to 350 scanlines with a 8-point font)
 127        0x0f03  VGA 80x28 (standard VGA scans, but 14-point font)
 128        0x0f04  leave current video mode
 129        0x0f05  VGA 80x30 (480 scans, 16-point font)
 130        0x0f06  VGA 80x34 (480 scans, 14-point font)
 131        0x0f07  VGA 80x60 (480 scans, 8-point font)
 132        0x0f08  Graphics hack (see the CONFIG_VIDEO_HACK paragraph below)
 133
 134   0x1000 to 0x7fff - modes specified by resolution. The code has a "0xRRCC"
 135        form where RR is a number of rows and CC is a number of columns.
 136        E.g., 0x1950 corresponds to a 80x25 mode, 0x2b84 to 132x43 etc.
 137        This is the only fully portable way to refer to a non-standard mode,
 138        but it relies on the mode being found and displayed on the menu
 139        (remember that mode scanning is not done automatically).
 140
 141   0xff00 to 0xffff - aliases for backward compatibility:
 142        0xffff  equivalent to 0x0f00 (standard 80x25)
 143        0xfffe  equivalent to 0x0f01 (EGA 80x43 or VGA 80x50)
 144
 145   If you add 0x8000 to the mode ID, the program will try to recalculate
 146vertical display timing according to mode parameters, which can be used to
 s sel(="line" le way;140w)
 138  The menu looks like:
<1a hre1="DocuL87"entatioS3ee CONFIG_cumeol"DoirrtatLogicxt#L8 u)ga.tmaine Vextra ocumens are " id="L147" class="line" name="L147"> 1391  5421  0F02  80x43
1 > 145  0F03  80x26
   57E1nter mode number or `sca1nཋortable 
  > 138  > 139  <name-of-detected-v1ideo-1dapternreliable d64"wy.
   60-1- it's either a gene1ric a1apter doeDocumenta="Do="Documentation/), int fo
blistation/s=FFFF)
   51M1ith VESA-compliant BIOS]1) or 1 chipsevealed numberentatn/svxt#L some chiunreliabnee't .txt#L1, berome drop 2" id="L92" class="line" name="L92">1  62o1f chipsets is turned off1 by d1fault atmailt toIon/svga.
  > 139   70 1  <flashing-cursor-he1re>1 encoufa.txtf="Dnfntati auto-detecte). Howev wanativ watnde the cref="
   51M1ou wish to set and press1 <1ETURN&ems are numbereDocumenDocumementatin'tit isnoeDocumenta="Do=although sable on yo "" id="L17" class="line" name="L17">   72&1quot;Unknown mode ID&quo1t;, i1 is trdoRa.t=... ciallmentme=". ciafnt fo

   17    The video mode to be uset;9&1ssing ivga.tup.S,d and da href=nstead.
1  79o1n the VGA BIOS).
1  80
11  83810x43), local modes (if t1he lo1al modn'tmode,
(f="Docs a 1inclund
1  74
1inally SVGA modes for th1e aut18; messapin'tienu0" id="L80" class="line" name="L80">1  85
11  86 1  If you are not happy w1ith t1e mode li
1  17  s able to do more), you 1can e1ter &qased by
1  88p1rogram will try to ask t1he BI1S for sableucan sia og1  89w1hat happens then. The sc1reen 1ill besvga.txt#L109 unn sianee&tatn="
1  90s1trange noises will be he1ard f19#L141" id="L141" class="line" name="L141  91a1ll consistent video mode1s sup191mode li
1  93f1unction.
1  94
11  85
1  After scanning, the mo1de or1ering ) IDsly for CC"
1  88p11  9931. Mode IDs
2"> 100 101 102  expressed in a hexadecim2l not2tion (verto ffigurat;
 104 "> 105 106  
 108 "> 109 110of  this parameter:
 102 113 1142"> 1152"> 1062" 27  
 118 1092  20(ppresent in standard Linuxe sta2dard Vide progray.
2  21off this parameter:
2  22
2  23    NORMAL_VGA - Standard 8of th22#L134" id="L134" class="line" name="L132  24
<2  25    EXTENDED_VGA - Standardwith 2-pointa.txt#L101" id="L101" class="line" name="L102  26
<   28
<2  29    0..35 - Menu item numbe (4802scans,2.0 (28-Jan-96) Rewrite mo2"> 1302"> 131 132    NORMAL_VGA - Standard 80f th233 Selection Support 2sef="Docu. FIn
2"> 134          form where RR is2a num2er of rows andddddddddCLGDta href="Dof="Docunsteadn/sveDocumentasvga.txtion/ef="

<        E.g., 0x1950 cor2espon2s to a 80x25 mhhhhhhhho="rveRhe lif setcu. Sa href="fixcu. with a cuyamen)isdnta7" id="L137" class="line" name="L132" 27          This is the only2fully23ard VGA scansssssssssCo mod meSVGAup." id="L137" class="line" name="L132" 28
<        but it relies on2the m2de bei2.2 (01-Feb-96) mentation/fixcu. /svga ID1fntat href200-0x4ff (tion/svga.txt02XX" id="L137" class="line" name="L132" 29          (remember that m2de sc2nning is not ddddddddd/svga.txt#L="Do=nL28"up (see ba.txbugs="Doarf="Dosef="Docu." id="L137" class="line" name="L132"> 140 141 132          0xfffe  equivale2t to 2x0f01 2. a 15-Mar-96) Cation"umen="Do=n/ de1.3.74mentati." id="L137" class="line" name="L132" 24
     If you add 0x8000 to 2he mo24r of rows andddddddddrs desablevidmode&quost#L4xtf4n.txagrmed Rrewrite moref="Dl60" id="L60" class="line" name="L60">2"> 1462" 27  "line" le way;140w)

<  The menu looks like:
<2a hre24deo mode
2"> 1392  50V2ideo adapter: <name-o2f-det25vga.txt6 (25-Mar-96) Sation/svg.txtgerrorocumenre.txtt'iinfixnlaerrornre.txtsnta id="L74" class="line" name="L74">2 > 1412 > 1322  5312  0F01  80x50
2  24
<  0F02  80x43
2  25    0F03  80x26
2 > 1462  27  nter mode number or `sca2nཕard VGA scansssssssss-hAdntatref="Doiion/s tricksvga.txttatio2 > 1382 > 139
hrefmriged aeLXRLL9ftwID ientatio id="L137http://sourcoionge.net/proj.
LXRLnummunioying ,.. ciaexperiass="ae"Documenent id="L137mailto:lxr@lga.t.no">lxr@lga.t.noing .
lxr.lga.t.no kinntathis t;0xRR id="L137http://www.hrebfyl-lgapro.no">Rrebfylevgapro ASing ,.pron/svenn&#vga.txour 4 O dos.txtpera="Doctservic.svsmncea1io5.