vgabios.txt
来自「比较详尽的VGA端口寄存器的文档」· 文本 代码 · 共 837 行 · 第 1/3 页
TXT
837 行
26h BYTE DCC of alternate display
27h WORD number of colors supported in current mode
29h BYTE number of pages supported in current mode
2Ah BYTE number of scan lines active
(0,1,2,3) = (200,350,400,480)
2Bh BYTE primary character block
2Ch BYTE secondary character block
2Dh BYTE miscellaneous flags
bit 0 all modes on all displays on
1 grey summing on
2 monochrome display attached
3 default palette loading disabled
4 cursor emulation enabled
5 0 = intensity; 1 = blinking
6 PS/2 P70 plasma display (without 9-dot wide font) active
7 reserved
2Eh 3 BYTEs reserved (00h)
31h BYTE video memory available
00h = 64K, 01h = 128K, 02h = 192K, 03h = 256K
32h BYTE save pointer state flags
bit 0 512 character set active
1 dynamic save area present
2 alpha font override active
3 graphics font override active
4 palette override active
5 DCC override active
6 reserved
7 reserved
33h 13 BYTEs reserved (00h)
Format of Static Functionality Table:
Offset Size Description
00h BYTE modes supported #1
bit 0 to bit 7 = 1 modes 0,1,2,3,4,5,6 supported
01h BYTE modes supported #2
bit 0 to bit 7 = 1 modes 8,9,0Ah,0Bh,0Ch,0Dh,0Eh,0Fh supported
02h BYTE modes supported #3
bit 0 to bit 3 = 1 modes 10h,11h,12h,13h supported
bit 4 to bit 7 reserved
03h 4 BYTEs reserved
07h BYTE scan lines supported
bit 0 to bit 2 = 1 if scan lines 200,350,400 supported
08h BYTE total number of character blocks available in text modes
09h BYTE maximum number of active character blocks in text modes
0Ah BYTE miscellaneous function flags #1
bit 0 all modes on all displays function supported
1 grey summing function supported
2 character font loading function supported
3 default palette loading enable/disable supported
4 cursor emulation function supported
5 EGA palette present
6 color palette present
7 color paging function supported
0Bh BYTE miscellaneous function flags #2
bit 0 light pen supported
1 save/restore state function 1Ch supported
2 intensity blinking function supported
3 Display Combination Code supported
4-7 reserved
0Ch WORD reserved
0Eh BYTE save pointer function flags
bit 0 512 character set supported
1 dynamic save area supported
2 alpha font override supported
3 graphics font override supported
4 palette override supported
5 DCC extension supported
6 reserved
7 reserved
0Fh BYTE reserved
----------101C-------------------------------
INT 10 - VIDEO - SAVE/RESTORE VIDEO STATE (PS50+,VGA)
AH = 1Ch
AL = 00h return state buffer size
Return: BX = number of 64-byte blocks needed
01h save video state
ES:BX -> buffer
02h restore video state
ES:BX -> buffer containing previously saved state
CX = requested states
bit 0 video hardware
1 BIOS data areas
2 color registers and DAC state
3-15 reserved
Return: AL = 1Ch if function supported
Format of video hardware state:
Offset Size Description
00h BYTE sequencer index register
01h BYTE CRTC index register
02h BYTE graphics controller index register
03h BYTE attribute controller index register
04h BYTE feature controller register
05h 4 BYTEs sequencer registers
09h BYTE sequencer register 0
0Ah 25 BYTEs CRTC registers 0-8
23h 16 BYTEs palette registers 00h-0Fh
33h 4 BYTEs attribute registers 10h-13h
37h 9 BYTEs graphics controller registers 0-8
40h BYTE CRTC base address (low)
41h BYTE CRTC base address (high)
42h BYTE plane 0 latch
43h BYTE plane 1 latch
44h BYTE plane 2 latch
45h BYTE plane 3 latch
Format of DAC state:
Offset Size Description
00h BYTE read/write mode DAC
01h BYTE pixel address
02h BYTE pixel mask
03h 768 BYTEs color data (256 triples)
303h BYTE color select register
Memory:
0:410h WORD Bit 4-5: Initial video mode
0: EGA,VGA,PGA 1:40x25 color, 2: 80x25 color,
3: 80x25 monochrome
0:449h BYTE Video current mode
0:44Ah WORD Video columns on screen
0:44Ch WORD Video page (regen buffer) size in bytes
0:44Eh WORD Video current page start address in regen buffer
0:450h 16 BYTEs Video cursor position (col, row) for eight pages, 0 based
0:460h WORD Video cursor type, 6845 compatible, hi=startline, lo=endline
0:462h BYTE Video current page number
0:463h WORD Video CRT controller base address: color=03D4h, mono=03B4h
0:465h BYTE Video current setting of mode select register 03D8h/03B8h
0:466h BYTE Video current setting of CGA palette register 03D9h
0:484h BYTE Video EGA/MCGA/VGA rows on screen minus one
0:485h WORD Video EGA/MCGA/VGA character height in scan-lines
0:487h BYTE Video EGA/VGA control: [MCGA: =00h]
bit 0: =0 alphanumeric cursor emulation enabled, =1 not.
When enabled the text mode cursor size (INT 10h,
AH=01h) are translated to EGA/VGA size.
1: =0 for color or ECD monitor, =1 for mono monitor
2: =1 if to wait for display enable (what means this?)
3: =0 if EGA/VGA video system active, =1 if inactive
4: reserved
6-5: RAM on adapter = (this field + 1) * 64K
7: =1 if not to clear RAM (see INT 10h, AH=00h)
0:488h BYTE Video EGA/VGA switches: [MCGA: reserved]
bits 0-3: configuration switches 4-1 (=0 on, =1 off)
Values as read:
0h Pri MDA, Sec EGA+old color display 40 x 25
1h Pri MDA, Sec EGA+old color display 80 x 25
2h Pri MDA, Sec EGA+ECD normal mode (CGA
emulation)
3h Pri MDA, Sec EGA+ECD enhanced mode
4h Pri CGA 40 x 25, Sec EGA mono display
5h Pri CGA 80 x 25, Sec EGA mono display
6h Pri EGA+old color display 40 x 25, Sec MDA
7h Pri EGA+old color display 80 x 25, Sec MDA
8h Pri EGA+ECD normal mode (CGA emul), Sec MDA
9h Pri EGA+ECD enhanced mode, Sec MDA
Ah Pri EGA mono display, Sec CGA 40 x 25
Bh Pri EGA mono display, Sec CGA 80 x 25
bits 7-4: power-on state of feature connector bits 3-0
Note: When bit4 of 40h:89h is 0, VGA emulates 350-line EGA if
this byte is x3h or x9h, otherwise emulates 200-line CGA in
400-line double scan. VGA resets this byte to x9h after the
mode set.
0:489h BYTE Video MCGA/VGA mode-set option control:
bit 0: [VGA] =1 if VGA active, =0 if not
[MCGA] reserved, zero
1: =1 if grey scale summing enabled, =0 if disabled
2: =1 if mono display, =0 if color display
3: =0 if default palette loading enabled at mode set
4: [VGA] =1 if to use 400-line mode at next mode set
=0 if to emulate EGA at next mode set
This bit set to 1 after the mode set.
[MCGA] =1 use 400-line mode at next mode set
=0 emulate CGA, digital monitor, 200 lines,
8 x 8 text font at next mode set
Bit unchanged by mode set.
5: reserved
6: =1 if display switching enabled, =0 if disabled
bits 7 and 4:
0 0 350-line mode requested
0 1 400-line mode at next mode set
1 0 200-line mode requested
1 1 reserved
Note: Apparently VGA BIOS mode set disregards bit 7 and uses
byte 40h:88h to determine 200/350 selection when bit 4
is zero . Presumably bit 7 is a convenience for other
purposes. Bit 7 is reset to zero after the mode set.
0:48Ah BYTE Video [MCGA/VGA]: index into Display Combination Code table
0:4A8h DWORD Pointer to the Video Save Pointer Table (see below)
Format of Video Save Pointer Table [EGA/VGA/MCGA only]:
Offset Size Description
00h DWORD ptr to Video Parameter Table
04h DWORD ptr to Parameter Dynamic Save Area, else 0 [EGA/VGA only]
08h DWORD ptr to Alphanumeric Character Set Override, else 0
0Ch DWORD ptr to Graphics Character Set Override, else 0
10h DWORD [VGA only] ptr to Secondary Save Pointer Table, must be valid
14h DWORD reserved, zero
18h DWORD reserved, zero
Note: table initially in ROM, copy to RAM to alter, then update 40h:A8h.
Format of Secondary Video Save Pointer Table [VGA only]:
Offset Size Description
00h WORD Length of this table in bytes, including this word (1Ah)
02h DWORD ptr to Display Combination Code Table, must be valid
06h DWORD ptr to second Alphanumeric Character Set Override, else 0
0Ah DWORD ptr to User Palette Profile Table, else 0
0Eh DWORD reserved, zero
12h DWORD reserved, zero
16h DWORD reserved, zero
Note: table initially in ROM, copy to RAM to alter, then alter Save Ptr Table.
Format of Video Parameter Table [EGA, VGA only]:
An array of 23 [EGA] or 29 [VGA] elements, each element being 64 bytes long.
Elements appear in the order:
00h-03h Modes 00h-03h in 200-line CGA emulation mode
04h-0Eh Modes 04h-0Eh
0Fh-10h Modes 0Fh-10h when only 64kB RAM on adapter
11h-12h Modes 0Fh-10h when >64kB RAM on adapter
13h-16h Modes 00h-03h in 350-line mode
17h VGA Modes 00h or 01h in 400-line mode
18h VGA Modes 02h or 03h in 400-line mode
19h VGA Mode 07h in 400-line mode
1Ah-1Ch VGA Modes 11h-13h
Format of Video Parameter Table element [EGA, VGA only]:
Offset Size Description
00h BYTE Columns on screen (see 0:44Ah)
01h BYTE Rows on screen minus one (see 0:484h)
02h BYTE Height of character in scan lines (see 0:485h)
03h WORD Size of video buffer (see 0:44Ch)
05h 4 BYTEs Values for Sequencer Registers 1-4
09h BYTE Value for Miscellaneous Output Register
0Ah 25 BYTEs Values for CRTC Registers 00h-18h
23h 20 BYTEs Values for Attribute Controller Registers 00h-13h
37h 9 BYTEs Values for Graphics Controller Registers 00h-08h
Format of Video Parameter Table [MCGA only] {guesswork from inspection}:
16 triplet BYTEs of R,G,B DAC info for 16 colors;
An array of 11 elements, each element being 32 bytes long.
Elements appear in the order:
Modes 00h,01h in 200-line mode for digital displays
Modes 00h,01h in 400-line mode for analog displays
Modes 02h,03h in 200-line mode for digital displays
Modes 02h,03h in 400-line mode for analog displays
Modes 04h,05h in 200-line mode for digital displays
Modes 04h,05h in 400-line mode for analog displays
Mode 06h in 200-line mode for digital displays
Mode 06h in 400-line mode for analog displays
Mode 11h
Mode 13h in 200-line mode for digital displays
Mode 13h in 400-line mode for analog displays
Format of Video Parameter Table element [MCGA only]:
Offset Size Description
00h BYTE Columns on screen (see 0:44Ah)
01h BYTE Rows on screen minus one (see 0:484h)
02h BYTE Height of character in scan lines (see 0:485h)
03h WORD Size of video buffer (see 0:44Ch)
05h WORD ??? always zero
07h 21 BYTEs Video data registers 00h-14h to port 3D5h indexed by 3D4h
1Ch BYTE PEL Mask to port 3C6h
1Dh BYTE CGA Mode Control to port 3D8h
1Eh BYTE CGA Border Control to port 3D9h
1Fh BYTE Extended Mode Control to port 3DDh
Format of Video Parameter Dynamic Save Area [EGA, VGA only]:
Offset Size Description
00h 16 BYTEs Last data written to Attribute Contr. Palette Registers 0-15
10h BYTE Last data written to Attribute Controller Overscan Register
11h-FFh Reserved
Note: Need for table was that EGA registers were write-only.
Note: If default values (from the Video Parameter Table) are
over-ridden at a mode set by the VGA User Palette Profile
Table, then the Dynamic Save Area is updated with the
default values, not the User Profile ones.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?