影片模式選擇支援 2.13¶
- 版權:
© 1995--1999 Martin Mares, <mj@ucw.cz>
簡介¶
這份小文件描述了 “影片模式選擇” 功能,它允許使用影片 BIOS 支援的各種特殊影片模式。由於使用了 BIOS,因此選擇僅限於啟動時間(在核心解壓縮開始之前),並且僅適用於透過 BIOS 韌體啟動的 80X86 機器(與透過 UEFI、kexec 等啟動的機器相反)。
注意
對於沒有耐心的人的簡短介紹:第一次只需使用 vga=ask,在影片模式提示符處輸入 scan,選擇要使用的模式,記住其模式 ID(四位十六進位制數字),然後將 vga 引數設定為該數字(首先轉換為十進位制)。
要使用的影片模式由核心引數選擇,該引數可以在核心 Makefile 中指定(SVGA_MODE=... 行),也可以透過 LILO(或您使用的其他引導載入程式)的 “vga=...” 選項或透過 “xrandr” 實用程式(存在於標準 Linux 實用程式包中)指定。 您可以使用此引數的以下值
NORMAL_VGA - Standard 80x25 mode available on all display adapters.
EXTENDED_VGA - Standard 8-pixel font mode: 80x43 on EGA, 80x50 on VGA.
ASK_VGA - Display a video mode menu upon startup (see below).
0..35 - Menu item number (when you have used the menu to view the list of
modes available on your adapter, you can specify the menu item you want
to use). 0..9 correspond to "0".."9", 10..35 to "a".."z". Warning: the
mode list displayed may vary as the kernel version changes, because the
modes are listed in a "first detected -- first displayed" manner. It's
better to use absolute mode numbers instead.
0x.... - Hexadecimal video mode ID (also displayed on the menu, see below
for exact meaning of the ID). Warning: LILO doesn't support
hexadecimal numbers -- you have to convert it to decimal manually.
模式 ID¶
由於所有影片內容的複雜性,此處使用的影片模式 ID 也有些複雜。 影片模式 ID 是一個 16 位數字,通常以十六進位制表示法表示(以 “0x” 開頭)。 如果您知道模式 ID,即使它未顯示在選單上,您也可以透過直接輸入其模式來設定模式。
ID 號可以分為以下幾個區域
0x0000 to 0x00ff - menu item references. 0x0000 is the first item. Don't use
outside the menu as this can change from boot to boot (especially if you
have used the ``scan`` feature).
0x0100 to 0x017f - standard BIOS modes. The ID is a BIOS video mode number
(as presented to INT 10, function 00) increased by 0x0100.
0x0200 to 0x08ff - VESA BIOS modes. The ID is a VESA mode ID increased by
0x0100. All VESA modes should be autodetected and shown on the menu.
0x0900 to 0x09ff - Video7 special modes. Set by calling INT 0x10, AX=0x6f05.
(Usually 940=80x43, 941=132x25, 942=132x44, 943=80x60, 944=100x60,
945=132x28 for the standard Video7 BIOS)
0x0f00 to 0x0fff - special modes (they are set by various tricks -- usually
by modifying one of the standard modes). Currently available:
0x0f00 standard 80x25, don't reset mode if already set (=FFFF)
0x0f01 standard with 8-point font: 80x43 on EGA, 80x50 on VGA
0x0f02 VGA 80x43 (VGA switched to 350 scanlines with a 8-point font)
0x0f03 VGA 80x28 (standard VGA scans, but 14-point font)
0x0f04 leave current video mode
0x0f05 VGA 80x30 (480 scans, 16-point font)
0x0f06 VGA 80x34 (480 scans, 14-point font)
0x0f07 VGA 80x60 (480 scans, 8-point font)
0x0f08 Graphics hack (see the VIDEO_GFX_HACK paragraph below)
0x1000 to 0x7fff - modes specified by resolution. The code has a "0xRRCC"
form where RR is a number of rows and CC is a number of columns.
E.g., 0x1950 corresponds to a 80x25 mode, 0x2b84 to 132x43 etc.
This is the only fully portable way to refer to a non-standard mode,
but it relies on the mode being found and displayed on the menu
(remember that mode scanning is not done automatically).
0xff00 to 0xffff - aliases for backward compatibility:
0xffff equivalent to 0x0f00 (standard 80x25)
0xfffe equivalent to 0x0f01 (EGA 80x43 or VGA 80x50)
如果您將 0x8000 新增到模式 ID,該程式將嘗試根據模式引數重新計算垂直顯示時序,這可用於消除某些 VGA BIOS 的一些煩人的錯誤(通常用於帶有 S3 晶片組和舊 Cirrus Logic BIOS 的卡) -- 主要是顯示末尾的額外行。
選項¶
arch/x86/boot/* 的構建選項由核心 kconfig 實用程式和核心 .config 檔案選擇。
VIDEO_GFX_HACK - 包括用於設定圖形模式的特殊 hack,這些模式將在以後由特殊驅動程式使用。 允許設定_任何_ BIOS 模式,包括圖形模式,並強制指定文字螢幕解析度而不是從 BIOS 變數中窺視它。 除非您認為您知道自己在做什麼,否則請勿使用。 要啟用此設定,請使用模式編號 0x0f08(請參見上面的模式 ID 部分)。
仍然不起作用?¶
當模式檢測不起作用時(例如,模式列表不正確或機器掛起而不是顯示選單),請嘗試關閉 “選項” 下列出的一些配置選項。 如果失敗,您仍然可以使用核心,並透過核心引數直接設定影片模式。
在任何一種情況下,請向我傳送包含_確切_發生情況以及配置開關如何影響錯誤行為的錯誤報告。
如果您從 M$-DOS 啟動 Linux,您也可以使用一些 DOS 工具進行影片模式設定。 在這種情況下,您必須將 0x0f04 模式(“保留當前設定”)指定給 Linux,因為如果您不這樣做並且使用任何非標準模式,Linux 將自動切換到 80x25。
如果您設定了一些擴充套件模式,並且顯示屏底部有一行或多行包含已經滾出的文字,則您的 VGA BIOS 包含最常見的影片 BIOS 錯誤,稱為“不正確的垂直顯示結束設定”。 將 0x8000 新增到模式 ID 可能會解決問題。 遺憾的是,這必須手動完成 -- 沒有可用的自動檢測機制。
歷史¶
1.0 (??-Nov-95) |
第一個版本支援舊 setup.S + Cirrus Logic 54XX 支援的所有介面卡。 存在於一些 1.3.4? 核心中,然後由於某些機器上的不穩定而被刪除。 |
2.0 (28-Jan-96) |
從頭開始重寫。 添加了 Cirrus Logic 64XX 支援,幾乎所有內容都是可配置的,VESA 支援應該更加穩定,允許顯式模式編號,實現了 “scan” 等。 |
2.1 (30-Jan-96) |
VESA 模式已移至 0x200-0x3ff。 支援按解析度選擇模式。 修復了一些錯誤。 VESA 模式列在 SVGA 自動檢測提供的模式之前,因為它們更可靠。 CLGD 自動檢測效果更好。 不依賴於啟動時處於活動狀態的 80x25。 掃描已修復。 添加了 80x43 (任何 VGA)。 程式碼已清理。 |
2.2 (01-Feb-96) |
修復了 EGA 80x43。 VESA 擴充套件到 0x200-0x4ff(現在可以使用非標準 02XX VESA 模式)。 支援顯示結束錯誤解決方法。 特殊模式已重新編號,以允許新增 “重新計算” 標誌,0xffff 和 0xfffe 成為別名而不是真正的 ID。 模式更改期間保留螢幕內容。 |
2.3 (15-Mar-96) |
已更改為與 1.3.74 核心一起使用。 |
2.4 (18-Mar-96) |
添加了 Hans Lermen 的補丁,修復了某些引導載入程式中的記憶體覆蓋問題。 記憶體管理已重寫以反映這些更改。 遺憾的是,現在只有部分載入程式可以使用螢幕內容保留功能。 添加了 Tseng 132x60 模式。 |
2.5 (19-Mar-96) |
修復了 2.4 中引入的 VESA 模式掃描錯誤。 |
2.6 (25-Mar-96) |
未報告某些 VESA BIOS 錯誤 -- 它修復了具有損壞的 VESA 程式碼的幾張卡(例如,ATI VGA)上的錯誤報告。 |
2.7 (09-Apr-96) |
|
2.8 (14-Apr-96) |
|
2.9 (12-May-96) |
|
2.10(11-Nov-96) |
|
2.11(03-May-97) |
|
2.12(25-May-98) |
添加了對 VESA 幀緩衝圖形的支援。 |
2.13(14-May-99) |
較小的文件修復。 |