home *** CD-ROM | disk | FTP | other *** search
/ Shareware Supreme Volume 6 #1 / swsii.zip / swsii / 168 / EGATECH.ZIP / EGATECH.DOC
Encoding:
Internet Message Format  |  1986-05-15  |  17.5 KB

  1. From: PC-Share, to CIS via Ward Christensen 76703,302  03/10/85
  2.  
  3. <<< NOTE EGA-TECH - 597 LINES >>>
  4.  
  5. Technical Information on the Enhanced Graphics Adapter
  6. EXT-Info-IBMPC-1VFRR 23-Feb-85 Info-IBMPC Digest V4 #17
  7. From: {Info-IBMPC Digest <Info-IBMPC@USC-ISIB.ARPA>}DDN
  8. To: {Info-IBMPC: ;}DDN
  9. Identifier: EXT-Info-IBMPC-1VFRR
  10. Length: 5 page(s)[estimate]
  11. Posted: 23-Feb-85 13:10-PST  Received:  5-Mar-85 09:14-PST
  12. Message:
  13. Return-path: <INFO-IBMPC@USC-ISIB.ARPA>
  14. Received: from USC-ISIB.ARPA by OFFICE-2.ARPA; 23 Feb 85 15:44:23 PST
  15. Info-IBMPC Digest       Saturday, 23 February 1985      Volume 4 Issue 17
  16.  
  17. This Week's Editor: Billy Brackenridge
  18.  
  19. Today's Topics:
  20.  
  21. Extended Graphics Adaptor Tech Info
  22.  
  23. How I Got my EGA Manual, a True Story
  24.  
  25.  
  26.  
  27. Date: 23 Feb 1985 11:57:04 PST
  28. Subject: Extended Graphics Adaptor Tech Info
  29. From: Billy <BRACKENRIDGE@USC-ISIB.ARPA>
  30.  
  31. Here is a bit more technical information on the extended graphics adaptor
  32. card. It still isn't complete, but it is a start:
  33.  
  34. The adapter memory (base) is configured a 4 16K bit planes. The graphics
  35. memory expansion adds one bank of 16K to each of the 4 bit planes. Additional
  36. memory may be added to increase each bit plane by another 16K.
  37.  
  38. Modes of Operation
  39.  
  40. IBM Color Display
  41.  
  42.                         Alpha   Buffer   Box   Max
  43.  Mode #  Type   Colors  Format  Start    Size  Pages   Resolution
  44.  ------  ----   ------  ------  ------   ----  -----   ----------
  45.    0     A/N      16    40x25   B8000    8x8    8       320x200
  46.    1     A/N      16    40x25   B8000    8x8    8       320x200
  47.    2     A/N      16    80x25   B8000    8x8    8       640x200
  48.    3     A/N      16    80x25   B8000    8x8    8       640x200
  49.    4     APA       4    40x25   B8000    8x8    1       320x200
  50.    5     APA       4    40x25   B8000    8x8    1       320x200
  51.    6     APA       2    80x25   B8000    8x8    1       640x200
  52.    D     APA      16    40x25   A8000    8x8    2/4/8   320x200
  53.    E     APA      16    80x25   A8000    8x8    1/2/4   640x200
  54.  
  55. Modes 0-6 emulate CGA adapter support.
  56.  
  57. Modes 0,2,5 are identical to 1,3,4 at the adapters direct drive interface.
  58.  
  59. The maximum page fields for modes D and E indicate the number of pages for
  60. 64k,128k,256k bytes of graphics memory.
  61.  
  62. IBM Monochrome Display
  63.  
  64.                         Alpha   Buffer   Box   Max
  65.  Mode #  Type   Colors  Format  Start    Size  Pages   Resolution
  66.  ------  ----   ------  ------  ------   ----  -----   ----------
  67.    7     A/N       4    80x25   B0000    9x14   8       720x350
  68.    F     APA       4    80x25   A0000    8x14   1/2     640x350
  69.  
  70. Mode 7 provides Mono adapter emulation support.
  71.  
  72. IBM Enhanced Color Display
  73.  
  74.                         Alpha   Buffer   Box   Max
  75.  Mode #  Type   Colors  Format  Start    Size  Pages   Resolution
  76.  ------  ----   ------  ------  ------   ----  -----   ----------
  77.    0*    A/N    16/64   40x25   B8000    8x14   8       320x350
  78.    1*    A/N    16/64   40x25   B8000    8x14   8       320x350
  79.    2*    A/N    16/64   80x25   B8000    8x14   8       640x350
  80.    3*    A/N    16/64   80x25   B8000    8x14   8       640x350
  81.    10    APA     4/64   80x25   A8000    8x14   1/2     640x350
  82.    16/64
  83.  
  84. * Note that modes 0,1,2,3 are also listed under Color Display. BIOS provides
  85. support when enhanced display is attached.
  86.  
  87. The values in "Colors" indicates 16 colors out of a palette of 64 or 4 colors
  88. out of 16.
  89.  
  90. Basic Operations
  91.  
  92.    Alphanumeric Modes
  93.  
  94.       The data format for alpha modes on the EGA is the same as the data
  95.       format on the CGA and Mono adapter cards.
  96.  
  97.       As an added function, bit three of the attribute byte may be
  98.       re-defined by the Character map select register to act as a switch
  99.       between character sets. This gives the programmer access to 512
  100.       characters at one time. This function is valid only when you have
  101.       128K or more of graphics memory.
  102.  
  103.       When alpha mode is selected, BIOS transfers character patters from
  104.       ROM into bit plane 2. The processor stores character data into
  105.       plane 0, and the attribute into plane 1. The programmer views
  106.       planes 0 and 1 as a single buffer in alpha modes.
  107.  
  108.       The CRTC generates sequential addresses, and fetches one character
  109.       code byte and one attribute byte at one time. The character code
  110.       and row scan count address bit plane 2, which contain the character
  111.       generators. The appropriate dot patterns are then sent to the
  112.       palette in the attribute chip, where the color is assigned
  113.       according to the attribute data.
  114.  
  115.       Graphics Modes
  116.  
  117.       320x200 Two and Four Color Graphics (Modes 4 and 5)
  118.       --------------------------------------------------- Addressing,
  119.       mapping, and data format are the same as the 320x200 pel mode of
  120.       the CGA. The display buffer is at B8000. The bit image is stored in
  121.       bit planes 0 and 1.
  122.  
  123.       640x200 Two Color Graphics (Mode 6)
  124.  
  125.       -----------------------------------
  126.  
  127.       Addressing, mapping and data formats are the same as the 640x200
  128.       pel mode on the CGA. Buffer starts at B8000 and bit image is in
  129.       plane 0.
  130.  
  131.       640x350 Monochrome Graphics (Mode F)
  132.  
  133.       ---------------------------
  134.  
  135.       This supports the Mono display with the following attributes:
  136.       black, video, blinking, intensified. Maps 0,1 and 2,3 are chained
  137.       together to form 2 32k bit planes. The first map is the video bit
  138.       plane, the second is the intensity plane. Both planes reside at
  139.  
  140.       A0000.
  141.  
  142.       Two bits, one from each plane, define one pel on the screen. The
  143.       bit definition for the pels are given in the following table. Video
  144.       plane is C0, intensity is C2.
  145.  
  146.   C2  C0  Pixel Color  Valid Attributes
  147.   --  --  -----------  ----------------
  148.   0   0   Black         0
  149.   0   1   Video         3
  150.   1   0   Blinking      C
  151.   1   1   Intensified   F
  152.  
  153. The byte organization of the memory is sequential. The first 8 pels on
  154. the screen are defined by the contents in A000:0H, the second 8 in
  155. A000:1, and so on. The first pel within a byte is bit 7 in the byte, the
  156. last is bit 0.
  157.  
  158. Mono graphics works in odd/even mode, which means that odd CPU address go
  159. to odd planes, and even addresses to even planes. Since both planes
  160. reside at A0000, the user must select the plane or planes to update. This
  161. is accomplished by the map mask register of the sequencer.
  162.  
  163. 16/64 Color Graphics Modes (Mode 10)
  164.  ------------------------------------
  165.  
  166. These modes support graphics in 16 colors on either medium or hi
  167. resolution monitor. This uses all four bit planes. The planes are denoted
  168. as C0,C1,C2, and C3.
  169.  
  170.    C0 = Blue Pels
  171.    C1 = Green Pels
  172.    C2 = Red Pels
  173.    C3 = Intensified Pels
  174.  
  175. Four bits (one from each plane) define one pel on the screen. Color
  176. combinations are as follows:
  177.  
  178.    I  R  G  B  Color
  179.    -  -  -  -  ------------------
  180.    0  0  0  0  Black
  181.    0  0  0  1  Blue
  182.    0  0  1  0  Green
  183.    0  0  1  1  Cyan
  184.    0  1  0  0  Red
  185.    0  1  0  1  Magenta
  186.    0  1  1  0  Brown
  187.    0  1  1  1  White
  188.    1  0  0  0  Dark Gray
  189.    1  0  0  1  Light Blue
  190.    1  0  1  0  Light Green
  191.    1  0  1  1  Light Cyan
  192.    1  1  0  0  Light Red
  193.    1  1  0  1  Light Magenta
  194.    1  1  1  0  Yellow
  195.    1  1  1  1  Intensified White
  196.  
  197. The display buffer resides at A0000, The map mask register of the
  198. sequencer is used to select any or all of the bit planes to be updated
  199. when a memory write to the display buffer is performed.
  200.  
  201.    Color Mapping
  202.  
  203.       Character               Mode 10H      Mode 10H
  204.       Attribute   Monchrome   64KB          > 64KB
  205.       ---------   ---------   ---------    ----------
  206.          00H        Black      Black        Black
  207.          01H        Video      Blue         Blue
  208.          02H        Black      Black        Green
  209.          03H        Video      Blue         Cyan
  210.          04H        Blink      Red          Red
  211.          05H        Inten      White        Magenta
  212.          06H        Blink      Red          Brown
  213.          07H        Inten      White        White
  214.          08H        Black      Black        Dark Grey
  215.          09H        Video      Blue         Light Blue
  216.          0AH        Black      Black        Light Green
  217.          0BH        Video      Blue         Light Cyan
  218.          0CH        Blink      Red          Light Red
  219.          0DH        Inten      White        Light Magenta
  220.          0EH        Blink      Red          Yellow
  221.          0FH        Inten      White        Intens White
  222.  
  223. External Registers
  224. ------------------
  225.  
  226. This section describes registers of the EGA card not contained in the LSI
  227. device.
  228.  
  229. Name                    Port  Index
  230. ----------------------- ----  -----
  231. Misc Output Register    3C2    -
  232. Feature Control Reg     3?A    -
  233. Input Status Reg 0      3C2    -
  234. Input Status Reg 1      3?2    -
  235. ? = B in Monchrome modes, D in color modes
  236.  
  237.    Misc Output Register
  238.    --------------------
  239.  
  240.    Write only. Hardware reset causes all bits to zero.
  241.  
  242.    Bit 0 - 3BX/3DX CRTC I/O Address - This bit maps the CRTC I/O
  243.    addresses for the mono or CGA emulation. 0 sets the CRTC addresses to
  244.    3BX and Input status reg 1 to 3BA for mono emulation. 1 sets the CRTC
  245.    address to 3DX and status reg 1 to 3DA for CGA emulation.
  246.  
  247.    Bit 1 - Enable RAM - 0 disables ram from the processor, 1 enables ram
  248.    to respond at addr's designated by the Contol Data Select value in the
  249.    Graphics Controllers.
  250.  
  251.    Bit 2,3 - Clock Select, according to the following table:
  252.  
  253.           Bit 2   Bit 3
  254.           -----   -----
  255.             0      0     14Mhz from Processor I/O channel
  256.             0      1     16Mhz On-board clock
  257.             1      0     External clock from feature connector
  258.             1      1     Not used
  259.  
  260. Bit 4 - Disable Video Drivers - 0 activates internal video drivers, 1
  261. disables them. When disabled, the source of the direct drive color output
  262. becomes the feature connector.
  263.  
  264. Bit 5 - Page Bit for Odd/Even - Selects between 2 64K pages of memory
  265. when in Odd/Even modes (0,1,2,3,7). 0 selects low pase, 1 selects high
  266. page of memory.
  267.  
  268. Bit 6 - Horiz Retrace Polarity - 0 selects positive, 1 selects negative.
  269.  
  270. Bit 7 - Vert Retrace Polarity - 0 selects positive, 1 selects neagative.
  271.  
  272. Feature Control Register
  273. ------------------------
  274.  
  275. Write only. Ouput address is 3BA or 3DA.
  276.  
  277. Bits 0,1 - Feature Control Bits - Output of these bits go to FEAT0
  278. (Pin19) and FEAT1 (Pin 17) of the feature connector.
  279.  
  280. Bits 2,3 - Reserved.
  281.  
  282. Bits 4-7 - Not Used.
  283.  
  284. Input Status Register Zero
  285. --------------------------
  286.  
  287. Read Only. Input address is 3C2.
  288.  
  289. Bits 0-3 - Not Used.
  290.  
  291. Bit 4 - Switch Sense - When set to 1, this allows proc to read the 4
  292. config switchs on the board. The setting of the CLKSEL field determines
  293. switch to be read. The switch setting can also be determined by reading
  294. 40:88H in RAM. 0 indicates switch is closed
  295.  
  296. Bit 5,6 - Feature Code - Input from FEAT0 and FEAT1 on the feature
  297. connector.
  298.  
  299. Bit 7 - CRT Interrupt - 1 indicates video being displayed, 0 indicates
  300. vertical retrace is occurring.
  301.  
  302. Input Status Register One
  303. -------------------------
  304.  
  305. Bit 0 - Display Enable - 0 indicates the CRT raster is in a Horizontal or
  306. vertical retrace interval. This bit is real time status of display enable
  307. signal.
  308.  
  309. Bit 1 - Light Pen Strobe - 0 indicates light pen trigger has not been
  310. set, 1 indicates set.
  311.  
  312. Bit 2 - Light Pen Switch - 0 indicates switch closed, 1 is switch open.
  313.  
  314. Bit 3 - Vertical Retrace - 0 indicates video information being displayed,
  315. 1 indicates CRT is in vertical retrace. This bit can be programmed to
  316. interrupt the proc at int level 2 at the start of retrace. This is done
  317. by bits 4,5 of the Vertical End Register of the CRTC.
  318.  
  319. Bit 4,5 - Diagnostic Usage.
  320.  
  321. Bit 6,7 - Not Used.
  322.  
  323. Sequencer Registers
  324. -------------------
  325.  
  326.   Name             Port Index
  327. ---------------- ---- -----
  328.   Address          3C4   -
  329.   Reset            3C5   00
  330.   Clocking Mode    3C5   01
  331.   Map Mask         3C5   02
  332.   Char Map Select  3C5   03
  333.   Memory Mode      3C5   04
  334.  
  335. Sequencer Address Register
  336. --------------------------
  337.  
  338. A pointer register located at output address 3C4H. Loaded with a value to
  339. indicate where the sequencer data is to be written
  340.  
  341. Bits 0-4 - Sequencer Address.
  342.  
  343. Bits 5-7 - Not Used.
  344.  
  345. Reset Register
  346. --------------
  347.  
  348. Write only. Written to when address register is 00H.
  349.  
  350. Bit 0 - Asynchronous Reset - 0 commands the sequencer to asynchronous
  351. clear and halt. 1 causes sequencer to run unless bit 1 is zero. Reseting
  352. sequencer can cause loss of data in display buffer.
  353.  
  354. Bit 1 - Synchronous Reset - 0 commands sequencer to synchronous clear and
  355.  
  356. halt. bits 0 and 1 both must be 1 to allow sequencer to operate. Reset
  357. the sequencer with this bit before changing clock mode to allow memory
  358. contents to be preserved.
  359.  
  360. Clocking Mode Register
  361. ----------------------
  362.  
  363. Write only. Written when address register is 01H.
  364.  
  365. Bit 0 - 8/9 Dot Clocks - 0 directs sequencer to generate character clocks
  366. 9 dots wide, 1 causes 8 dots wide. Mono alpha (Mode 7) is the only mode
  367. that uses 9 dot clocks.
  368.  
  369. Bit 1 - Bandwidth - 0 makes CRT memory cycles occur 4 out of 5 available
  370. memory cycles; 1 makes CRT memory cycles occur on 2 out of 5 available
  371. memory cycles. All hi-res modes must use 4 out of 5 in order to refresh
  372. the display image.
  373.  
  374. Bit 2 - Shift Load - When 0, video serializes are reloaded every
  375. character clock, 1 causes load every other clock. The later mode is
  376. useful when 16 bits are fetched per cycle and chained together in the
  377. shift registers.
  378.  
  379. Bit 3 - Dot Clock - 0 selects normal dot clocks derived from the
  380. sequencer master input. 1 causes the clock to be divided by 2 to generate
  381. the dot clock. Dot clock divided by to is used for modes 0,1,4,5.
  382.  
  383. Bit 4-7 - Not Used.
  384.  
  385. Map Mask Register
  386. -----------------
  387.  
  388. Write only. Written when address register is 02H.
  389.  
  390. Bit 0-3 - Map Mask - A 1 in bits 3 through 0 enables the proc to write to
  391. the corresponding maps 3 through 0. If this register is 0FH, the CPU can
  392. perform a 32 bit write on a single memory cycle. Data scrolling is
  393. enhanced when this register is 0FH. When odd/even modes are selected,
  394. maps 0,1 and 2,3 should have the same mask value.
  395.  
  396. Character Map Select Register
  397. -----------------------------
  398.  
  399. Write only. Written when the address register is 03H.
  400.  
  401. Bit 0,1 - Character map select B - Selects the map used to generate alpha
  402. characters when attribute bit 3 is 0, according to the following table:
  403.  
  404.    Bit1  Bit0  Map Selected   Table Location
  405.    ----  ----  ------------   ------------------------
  406.      0    0         0         1st 8K of Plane 2 Bank 0
  407.      0    1         1         2nd 8K of Plane 2 Bank 1
  408.      1    0         2         3rd 8K of Plane 2 Bank 2
  409.      1    1         3         4th 8K of Plane 2 Bank 3
  410.  
  411. Bit 2,3 - Character map select A - Selects the map used to generate alpha
  412. characters when attribute bit 3 is 1, according to the following table:
  413.  
  414.    Bit3  Bit2  Map Selected   Table Location
  415.    ----  ----  ------------   ------------------------
  416.      0    0         0         1st 8K of Plane 2 Bank 0
  417.      0    1         1         2nd 8K of Plane 2 Bank 1
  418.  
  419.      1    0         2         3rd 8K of Plane 2 Bank 2
  420.      1    1         3         4th 8K of Plane 2 Bank 3
  421.  
  422. Bits 4-7 - Not used.
  423.  
  424. In alpha modes, bit 3 of the attribute byte normally has the function of
  425. turning the forground intensity on or off.  This bit may be redefined as
  426. a switch between character sets.This function is selected only when the
  427. values in character map select A and B are different.  When they are the
  428. same, the function is disabled.  Memory mode register bit 1 must be a 1
  429. in order to enable this function; otherwise bank 0 is always selected.
  430.  
  431. 128K of memory is required for 2 character sets, 256K for 4 sets.
  432.  
  433. Memory Mode Register
  434. --------------------
  435.  
  436. Write only. Written when address register is 04H.
  437.  
  438. Bit 0 - Alpha - 0 indicates non-alpha mode active. 1 indicates alpha mode
  439. is active and enables character generator map select function.
  440.  
  441. Bit 1 - Extended Memory - 1 indicates memory expansion card installed. 0
  442. indicates card not installed
  443.  
  444. Bit 2 - Odd/Even - 0 directs even processor addresses to maps 0 and 2,
  445. odd to maps 1,3. 1 causes processor addresses to sequentially address the
  446. bit map. The maps are accessed according to the value in the Map Mask
  447. Register.
  448.  
  449. ------------------------------
  450.  
  451. Date: Thu, 21 Feb 85 22:35:27 est
  452.  
  453. From: "John Levine, P.O.Box 349, Cambridge MA 02238-0349 (617-494-1400)"
  454. <ima!johnl@cca-unix> Subject: How I Got my EGA Manual, a True Story
  455.  
  456. To: brackenridge@USC-ISIB.ARPA
  457.  
  458. I was in the same boat as you -- I had the Seminar Proceedings issue on
  459. the EGA, but couldn't find the manual pages.  Then out of the blue, a
  460. local guy called me up and offered to swap a copy of the seminar
  461. proceedings for a copy of the EGA manual.  Needless to say, I took him
  462. up on it.
  463.  
  464. It turns out that he took the totally straightforward approach, entirely
  465. by accident, and it worked.  He bought a copy of the "Options and
  466. Adapters Technical Reference," which costs $125, a total ripoff,
  467. particularly since almost everything in it is in the XT technical
  468. reference, too.  In the front of this manual is a postcard you send in
  469. for the update service.  Wait a month, and a mountain of updates arrives
  470. in the mail, including the EGA manual.  It is over 100 pages including a
  471. lot of diagrams.  About half of it is the assembler listing of the BIOS
  472. code in the ROM.
  473.  
  474. John Levine, ima!johnl or Levine@YALE.ARPA
  475. ------------------------------
  476.  
  477. End of Info-IBMPC Digest
  478.  
  479.  
  480. *** CREATED 03/07/85 22:56:13 BY BILL.FRANTZ/BILL ***
  481.