⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 egaregs.txt

📁 比较详尽的VGA端口寄存器的文档
💻 TXT
📖 第 1 页 / 共 2 页
字号:
           0: Data is read from one of 4 bit planes depending on the Read Map
              Select Register (3CEh index 4).
           1: Data returned is a comparison between the 8 pixels occupying the
              read byte and the color in the Color Compare Register (3CEh
              index 2). A bit is set if the color of the corresponding pixel
              matches the register.
      4  Enables Odd/Even mode if set (See 3C4h index 4 bit 2).
      5  Enables CGA style 4 color pixels using even/odd bit pairs if set.

3CEh index  6  (W):  Graphics: Miscellaneous Register
bit   0  Indicates Graphics Mode if set, Alphanumeric mode else.
      1  Enables Odd/Even mode if set.
    2-3  Memory Mapping:
           0: use A000h-BFFFh
           1: use A000h-AFFFh   EGA Graphics modes
           2: use B000h-B7FFh   Monochrome modes
           3: use B800h-BFFFh   CGA modes

3CEh index  7  (W):  Graphics: Color Don't Care Register
bit   0  Ignore bit plane 0 in Read mode 1 if clear.
      1  Ignore bit plane 1 in Read mode 1 if clear.
      2  Ignore bit plane 2 in Read mode 1 if clear.
      3  Ignore bit plane 3 in Read mode 1 if clear.

3CEh index  8  (W):  Graphics: Bit Mask Register
bit 0-7  Each bit if set enables writing to the corresponding bit of a byte in
         display memory.

3d4h index  0  (W):  CRTC: Horizontal Total Register
bit 0-7  Horizontal Total Character Clocks-2

3d4h index  1  (W):  CRTC: Horizontal Display End Register
bit 0-7  Number of Character Clocks Displayed -1

3d4h index  2  (W):  CRTC: Start Horizontal Blanking Register
bit 0-7  The count at which Horizontal Blanking starts

3d4h index  3  (W):  CRTC: End Horizontal Blanking Register
bit 0-4  Horizontal Blanking ends when the last 5 bits of the character
         counter equals this field.
    5-6  Number of character clocks to delay start of display after Horizontal
         Total has been reached.

3d4h index  4  (W):  CRTC: Start Horizontal Retrace Register
bit 0-7  Horizontal Retrace starts when the Character Counter reaches this
         value.

3d4h index  5  (W):  CRTC: End Horizontal Retrace Register
bit 0-4  Horizontal Retrace ends when the last 5 bits of the character counter
         equals this value.
    5-6  Number of character clocks to delay start of display after Horizontal
         Retrace.
      7  Provides Smooth Scrolling in Odd/Even mode. When set display starts
         from an odd byte.

3d4h index  6  (W):  CRTC: Vertical Total Register
bit 0-7  Lower 8 bits of the Vertical Total. Bit 8 is found in 3d4h index 7
         bit 0.

3d4h index  7  (W):  CRTC: Overflow Register
bit   0  Bit 8 of Vertical Total (3d4h index 6)
      1  Bit 8 of Vertical Display End (3d4h index 12h)
      2  Bit 8 of Vertical Retrace Start (3d4h index 10h)
      3  Bit 8 of Start Vertical Blanking (3d4h index 15h)
      4  Bit 8 of Line Compare Register (3d4h index 18h)

3d4h index  8  (W):  CRTC: Preset Row Scan Register
bit 0-4  Number of lines we have scrolled down in the first character row.
         Provides Smooth Vertical Scrolling.

3d4h index  9  (W):  CRTC: Maximum Scan Line Register
bit 0-4  Number of scan lines in a character row -1. In graphics modes this is
         the number of times (-1) the line is displayed before passing on to
         the next line (0: normal, 1: double, 2: triple...).
         This is independent of bit 7, except in CGA modes which seems to
         require this field to be 1 and bit 7 to be set to work.

3d4h index 0Ah (W):  CRTC: Cursor Start Register
bit 0-4  First scanline of cursor within character.

3d4h index 0Bh (W):  CRTC: Cursor End Register
bit 0-4  Last scanline of cursor within character
    5-6  Delay of cursor data in character clocks.

3d4h index 0Ch (W):  CRTC: Start Address High Register
bit 0-7  Upper 8 bits of the start address of the display buffer

3d4h index 0Dh (W):  CRTC: Start Address Low Register
bit 0-7  Lower 8 bits of the start address of the display buffer

3d4h index 0Eh (W):  CRTC: Cursor Location High Register
bit 0-7  Upper 8 bits of the address of the cursor

3d4h index 0Fh (W):  CRTC: Cursor Location Low Register
bit 0-7  Lower 8 bits of the address of the cursor

3d4h index 10h (R):  CRTC: Light Pen High Register
bit 0-7  Upper 8 bits of the address of the lightpen position.

3d4h index 10h (W):  CRTC: Vertical Retrace Start Register
bit 0-7  Lower 8 bits of Vertical Retrace Start. Vertical Retrace starts when
         the line counter reaches this value. Bit 8 is found in 3d4h index 7
         bit 2.

3d4h index 11h (R):  CRTC: Light Pen Low Register
bit 0-7  Lower 8 bits of the address of the lightpen position.

3d4h index 11h (W):  CRTC: Vertical Retrace End Register
bit 0-3  Vertical Retrace ends when the last 4 bits of the line counter equals
         this value.
      4  if clear Clears pending Vertical Interrupts.
      5  Vertical Interrupts (IRQ 2) disabled if set. Can usually be left
         disabled, but some systems (including PS/2) require it to be enabled.

3d4h index 12h (W):  CRTC: Vertical Display End Register
bit 0-7  Lower 8 bits of Vertical Display End. The display ends when the line
         counter reaches this value. Bit 8 is found in 3d4h index 7 bit 1.

3d4h index 13h (W):  CRTC: Offset register
bit 0-7  Number of bytes in a scanline / K. Where K is 2 for byte mode, 4 for
         word mode and 8 for Double Word mode.

3d4h index 14h (W):  CRTC: Underline Location Register
bit 0-4  Position of underline within Character cell.

3d4h index 15h (W):  CRTC: Start Vertical Blank Register
bit 0-7  Lower 8 bits of Vertical Blank Start. Vertical blanking starts when
         the line counter reaches this value. Bit 8 is found in 3d4h index 7
         bit 3.

3d4h index 16h (W):  CRTC: End Vertical Blank Register
bit 0-4  Vertical blanking stops when the lower 5 bits of the line counter
         equals this field.

3d4h index 17h (W):  CRTC: Mode Control Register
bit   0  If clear use CGA compatible memory addressing system
         by substituting character row scan counter bit 0 for address bit 13,
         thus creating 2 banks for even and odd scan lines.
      1  If clear use Hercules compatible memory addressing system by
         substituting character row scan counter bit 1 for address bit 14,
         thus creating 4 banks.
      2  If set increase scan line counter only every second line.
      3  If set increase memory address counter only every other character
         clock.
      4  If set disable the EGA output drivers.
      5  When in Word Mode bit 15 is rotated to bit 0 if this bit is set else
         bit 13 is rotated into bit 0.
      6  If clear system is in word mode. Addresses are rotated 1 position up
         bringing either bit 13 or 15 into bit 0.
      7  Clearing this bit will reset the display system until the bit is set
         again.

3d4h index 18h (W):  CRTC: Line Compare Register
bit 0-7  Lower 8 bits of the Line Compare. When the Line counter reaches this
         value, the display address wraps to 0. Provides Split Screen
         facilities. Bit 8 is found in 3d4h index 7 bit 4.

3dAh (R):  Input Status #1 Register
bit   0  Either Vertical or Horizontal Retrace active if set
      1  Light Pen has triggered if set
      2  Light Pen switch is open if set
      3  Vertical Retrace in progress if set
    4-5  Shows two of the 6 color outputs, depending on 3C0h index 12h.
          Attr: Bit 4-5:   Out bit 4  Out bit 5
                   0          Blue       Red
                   1        I Blue       Green
                   2        I Red      I Green

3dAh (W):  Feature Control Register
bit   0  Output to pin 21 of the Feature Connector.
      1  Output to pin 20 of the Feature Connector.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -