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

📄 s3.txt

📁 比较详尽的VGA端口寄存器的文档
💻 TXT
📖 第 1 页 / 共 5 页
字号:
            2: 4.5 MCLKs, 3: 3.5 MCLKs
     6-7  /RAS-PCG. /RAS Precharge Timing Select. 1: 4.5 MCLKs, 2: 3.5 MCLKs,
            3: 2.5 MCLks
Note: This register is latched from PD16-23 on reset. Write A5h to index 39h
      to update this register.

3d4h index 69h (R/W):  Extended System Control 3                     (864,964)
bit  0-4  Display Start Address bits 16-20
Note: The Display Start registers at index 31h/51h still works.

3d4h index 6Ah (R/W):  Extended System Control 4                     (864,964)
bit  0-6  Bank register in units of 64Kbytes.
Note: The bank registers at index 35h/51h still works.

3d4h index 6Bh (R/W):  Extended BIOS Flag 3                          (864,964)
bit  0-7  Reserved

3d4h index 6Ch (R/W):  Extended BIOS Flag 4                          (864,964)
bit  0-7  Reserved

3d4h index 6Dh (R/W):  Extended Miscellaneous Control           (805i,864/964)
bit  0-2  DELAY-BL-BY-DCLK. Delay /BLANK by DCLK. Number of DCLKs to delay the
          BLANK signal. Pulse width is not affected.
     4-6  DELAY-SC-BY-VCLK. Number of VCLKs to delay SC0-1. Pulse width is not
          affected.

3D8h (R/W):  CGA Mode Control Register (CGA_MODE)
bit    0  HRES TEXT. Select High Resolution Text. 0: 40x25, 1: 80x25
       1  GRPH MODE. Select Graphics Mode. 0: Text, 1: Graphics
       2  B/W MODE. Select Black/White Mode. 0: Color enabled, 1: Color
          disabled, In 320x200 4 color mode the pixels are:
            0: background, 1: Cyan, 2: Red, 3: White
       3  DISP ENB. Enable Display.  0: Blank, 1: Video Enabled
       4  HRES GRPH. Select High Resolution Graphics. 1: Enable 640x200
          graphics mode, 0: all other modes.
       5: TEXT BLNK. Enable Text Blinking. 0: disabled, 1: enabled

3D9h (R/W):  CGA Color Select Register (CGA_COLOR)
bit    0  BORDER/BKGR COLOR. Select Blue Border. 0: Blue not selected,
           1: Blue border in text mode, blue background & border in 320x200
              mode, blue foreground in 640x200 mode.
       1  BORDER/BKGR COLOR. Select Green Border. 0: Green not selected,
           1: Green border in text mode, green background & border in 320x200
              mode, green foreground in 640x200 mode.
       2  BORDER/BKGR COLOR. Select Red Border. 0: Red not selected,
           1: Red border in text mode, red background & border in 320x200
              mode, Red foreground in 640x200 mode.
       3  BORDER/BKGR COLOR. Select intensified Border. 0: No intensification,
           1: Intensified border in text mode, intensified background & border
           in 320x200 mode, intensified foreground in 640x200 mode.
       4  SEL I-EN. Select Alternate Color Set. 0: Alternate color set not
          enabled, 1: Background color in text mode, Enable alternate color
          set in graphics mode.
       5  SEL CSET. Select Color Set in 320x200 mode.
            0: Palette: 0: Background, 1: Green, 2: Red, 3: Yellow
            1: Palette: 0: Background, 1: Cyan, 2: Violet, 3: White

3DAh (R):  CGA Status Register (CGA_STAT)
bit    0  /DTM. Border/Blanking Active. Border or Blanking active if set
       1  LPF. Light Pen Flag. 0: Light Pen Latch cleared, 1: light Pen Latch
          triggered.
       2  Light Pen switch open if set, cleared if not
       3  VSY. Vertical Sync Active. if set

3DBh (W):  Reset Light Pen Flag Register (RLPEN)
Any write to this register will reset the Light Pen Latch

3DCh (W):  Set Light Pen Flag Register (SLPEN)
Any write to this register will set the Light Pen Latch


Below are the 8514/A registers. 3d4h index 40h bit 0 must be set to use them.

42E8h W(R):  Subsystem Status Register (SUBSYS_STAT)
bit   0-3  Interrupt requests. These bits show the state of internal interrupt
           requests. An interrupt will only occur if the corresponding bit(s)
           in SUBSYS_CNTL is set. Interrupts can only be reset by writing a 1
           to the corresponding Interrupt Clear bit in SUBSYS_CNTL.
             Bit 0: Vertical Sync Interrupt
                 1: Graphics Engine Busy Interrupt
                 2: FIFO Overflow Interrupt
                 3: FIFO Empty Interrupt
      4-6  MONITORID.
              2: IBM 8514/A color 16"
              5: IBM 8503 Monochrome 12"
              6: IBM 8512 color 14" or 8513 color 12"
              7: No (or other) monitor
        7  PXL LNG. Clear for 4 bits per pixel, set for 8 or more bpp.
           Only used when 3d4h index 50h bits 4-5 = 0.

42E8h W(W):  Subsystem Control Register (SUBSYS_CNTL)
bit   0-3  Interrupt Reset. Write 1 to a bit to reset the interrupt.
           Bit 0  VSY CLR   Write 1 to reset Vertical Sync interrupt.
               1  GEB CLR   Write 1 to reset Graphics Engine Busy interrupt.
               2  FIFO CLO  Write 1 to reset FIFO Overflow interrupt.
               3  FIFO CLE  Write 1 to reset FIFO Empty interrupt.
      4-7  Reserved(0)
        8  VSY ENB. Vertical Sync Interrupt Enabled if set.
        9  GE BSY.  Graphics Engine Busy Interrupt Enabled if set.
       10  FIFO-ENB OVF. FIFO Overflow Interrupt Enabled if set.
       11  FIFO-ENB EMP. FIFO Empty Interrupt Enabled if set.
    14-15  GE-RST. Graphics Engine Software Reset.
             0: no change, 1: Graphics Engine enabled, 2: reset

46E8h (W):  Video Subsystem Enable Register (SETUP_MD)
bit     3  Address Decoding (AD DEC). If clear Video I/O and Memory address
           decoding is disabled.
        4  Enable Setup (EN SUP). Set to enter Setup Mode, clear to enable
           normal operation. When in Setup Mode only the Setup Option Select
           Register at 102h is accessible.

4AE8h W(W):  Advanced Function Control Register  (ADVFUNC_CNTL)
bit     0  ENB EHFC. Enable Enhanced Functions. Set to enable enhanced
           functions using the wide pixel bus to the DAC(SID), clear to enable
           VGA display functions using the VGA pixel bus (PA0-7).
        1  Reserved(1).
        2  (911-928) SCRN SIZE - Screen Size. For enhanced modes this bit
            selects the resolution: Clear for 640x480, set for 1024x768 or
            800x600
           (864,964) ENH PL. Enhanced modes pixel length. Set for 4bits/pixel
            enhanced modes, clear for 8/15/16/24/32 bit/pixel enhanced modes
            (3d4h index 50h bits 4-5 controls the width).
        4  (928 +) LA - Enable Linear Addressing if set. This bit is ORed
             with 3d4h index 58h bit 4 so that either bit will enable Linear
             Addressing if set
        5  (928 +) MIO - Enable Memory Mapped I/O if set. This bit is ORed
             with 3d4h index 53h bit 4 so that either bit will enable Memory
             Mapped I/O if set
        6  (928 only) WP - Enable Write Posting if set. This bit is ORed
             with 3d4h index 40h bit 3 so that either bit will enable Write
             Posting if set

82E8h W(R/W):  Current Y Position Register (CUR_Y)
bit  0-11  Y Position. Y co-ordinate of current position in pixels.

86E8h W(R/W):  Current X Position Register (CUR_X)
bit  0-11  X Position. X co-ordinate of current position in pixels.

8AE8h W(R/W):  Destination Y Position & Axial Step Constant Register
               (DESTY_AXSTP)
bit  0-11  DESTINATION Y-POSITION. During BITBLT operations this is the Y
           co-ordinate of the destination in pixels.
     0-12  (911/924) LINE PARAMETER AXIAL STEP CONSTANT. During Line Drawing,
            this is the Bresenham constant 2*dminor in two's complement
            format. (dminor is the length of the line projected onto the minor
            or dependent axis).
     0-13  (80 x+) LINE PARAMETER AXIAL STEP CONSTANT. Se above

8EE8h W(R/W):  Destination X Position & Diagonal Step Constant Register
               (DESTX_DISTP)
bit  0-11  DESTINATION X-POSITION. During BITBLT operations this is the X
           co-ordinate of the destination in pixels.
     0-12  (911/924) LINE PARAMETER DIAGONAL STEP CONSTANT. During Line
            Drawing this is the Bresenham constant 2*dminor-2*dmajor in two's
            complement format. (dminor is the length of the line projected
            onto the minor or dependent axis, dmajor is the length of the line
            projected onto the major or independent axis)
     0-13  (80x +) LINE PARAMETER DIAGONAL STEP CONSTANT. Se above

92E8h W(R/W):  Line Error Term Read/Write Register (ERR_TERM).
bit  0-12  (911/924) LINE PARAMETER/ERROR TERM. For Line Drawing this is the
            Bresenham Initial Error Term 2*dminor-dmajor (one less if the
            starting X is less than the ending X) in two's complement format.
            (dminor is the length of the line projected onto the minor or
            dependent axis, dmajor is the length of the line projected onto
            the major or independent axis).
     0-13  (80x +) LINE PARAMETER/ERROR TERM. See above.

96E8h W(R/W):  Major Axis Pixel Count/Rectangle Width Register (MAJ_AXIS_PCNT)
bit  0-10  (911/924)  RECTANGLE WIDTH/LINE PARAMETER MAX. For BITBLT and
            rectangle commands this is the width of the area. For Line Drawing
            this is the Bresenham constant dmajor in two's complement format.
            (dmajor is the length of the line projected onto the major or
            independent axis). Must be positive.
     0-11  (80x +) RECTANGLE WIDTH/LINE PARAMETER MAX. See above

9AE8h W(R):  Graphics Processor Status Register (GP_STAT)
bit   0-7  Queue State.
             00h = 8 words available - queue is empty
             01h = 7 words available
             03h = 6 words available
             07h = 5 words available
             0Fh = 4 words available
             1Fh = 3 words available
             3Fh = 2 words available
             7Fh = 1 word  available
             FFh = 0 words available - queue is full
        8  (911-928) DTA AVA. Read Data Available. If set data is ready to be
            read from the PIX_TRANS register (E2E8h).
        9  HDW BSY. Hardware Graphics Processor Busy
           If set the Graphics Processor is busy.
       10  (928 +) AE. All FIFO Slots Empty. If set all FIFO slots are empty.
    11-15  (864/964) (R) Queue State bits 8-12. 1Fh if 8 words or less
            available, Fh for 9 words, 7 for 10 words, 3 for 11 words, 1 for
            12 words and 0 for 13 words available.

9AE8h W(W):  Drawing Command Register (CMD)
bit     0  (911-928) ~RD/WT. Read/Write Data. If set VRAM write operations are
            enabled. If clear operations execute normally but writes are
            disabled.
        1  PX MD. Pixel Mode. Defines the orientation of the display bitmap.
             0 = Through plane mode (Single pixel transferred at a time)
             1 = Across plane mode (Multiple pixels transferred at a time).
        2  LAST PXOF. Last Pixel Off. If set the last pixel of a line command
           (CMD_LINE, SSV or LINEAF) is not drawn. This is used for mixes such
           as XOR where drawing the same pixel twice would give the wrong
           color.
        3  DIR TYP. Direction Type.
             0: Bresenham line drawing (X-Y Axial)
                  CMD_LINE draws a line using the Bresenham algorithm as
                  specified in the DESTY_AXSTP (8AE8h), DESTX_DIASTP (8EE8h),
                  ERR_TERM (92E8h) and MAJ_AXIS_PCNT (96E8h) registers
                  INC_X, INC_Y and YMAJAXIS determines the direction.
             1: Vector line draws (Radial).
                  CMD_NOP allows drawing of Short Stroke Vectors (SSVs) by
                  writing to the Short Stroke register (9EE8h).
                  CMD_LINE draws a vector of length MAJ_AXIS_PCNT (96E8h)
                  in the direction specified by LINEDIR (bits 5-7).
                  DRWG-DIR determines the direction of the line.
        4  DRAW YES. If clear the current position is moved, but no pixels
           are modified. This bit should be set when attempting read or
           write of bitmap data.
      5-7  DRWG-DIR. Drawing Direction. When a line draw command (CMD_LINE)
           with DIR TYP=1 (Radial) is issued, these bits define the direction
           of the line counter clockwise relative to the positive X-axis.
             0 = 000 degrees
             1 = 045 degrees
             2 = 090 degrees
             3 = 135 degrees
             4 = 180 degrees
             5 = 225 degrees
             6 = 270 degrees
             7 = 315 degrees
        5  INC_X. This bit together with INC_Y determines which quadrant
           the slope of a line lies within. They also determine the
           orientation of rectangle draw commands.
           If set lines are drawn in the positive X direction (left to right).

⌨️ 快捷键说明

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