home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / FAQSYS18.ZIP / FAQS.DAT / VGA.DOC < prev    next >
INI File  |  1995-10-08  |  667KB  |  14,811 lines

  1. [Start of file: vga.doc]
  2.  
  3.  
  4. 0.    Preamble: about this document
  5. ==    =============================
  6.  
  7.  
  8. 0.01  Title, subtitle, author, version, copyright
  9. ====  ===========================================
  10.  
  11.  
  12.       TITLE:       VGA Programmers Master Reference Manual
  13.  
  14.  
  15.       SUBTITLE:    Concepts and pragmatics of computational modelling,
  16.                    visual model representation and manipulation, using
  17.                    a Video Graphics Array controller chip.
  18.  
  19.                    {This is a somewhat expansive subtitle, suitable for }
  20.                    {a somewhat more comprehensive work than the present.}
  21.                    {This is justified only when additional work is done.}
  22.  
  23.  
  24.       EDITION:     First edition,  Summer 1991,  Identity:  91.07.52
  25.  
  26.  
  27.       AUTHOR:      Andrew Scott
  28.  
  29.  
  30.       COPYRIGHT:   (c) 1991 by Andrew Scott, world rights reserved
  31.  
  32.  
  33.  
  34.  
  35. 0.02  List of contents
  36. ====  ================
  37.  
  38.  
  39. 0.           Preamble: about this document
  40.  
  41.      0.01    Title, subtitle, author, version, copyright
  42.      0.02    List of contents
  43.      0.03    Notice of copyright
  44.      0.04    Suggested license fees
  45.      0.05    Shareware and how it works
  46.      0.06    Obtaining a print of this document
  47.      0.07    Your expert input to this document
  48.      0.08    Contacting the author
  49.      0.09    Registration and Receipt Form
  50.      0.s     Summary
  51.  
  52.  
  53. 1.           Preface: how this document will help you
  54.  
  55.      1.01    Goals of this document
  56.      1.02    Suggested audience orientation
  57.      1.03    How to use this document
  58.      1.s     Summary
  59.  
  60.  
  61. 2.           Components of a computer system
  62.  
  63.      2.01    A computer system structure
  64.      2.02    Hardware of a computer system
  65.      2.03    Hardware: the input unit
  66.      2.04    Hardware: the processing unit
  67.      2.05    Hardware: the memory unit
  68.      2.06    Hardware: the control unit
  69.      2.07    Hardware: the output unit
  70.      2.08    Hardware: the external environment
  71.      2.09    Hardware: control by program
  72.      2.s     Summary
  73.  
  74.  
  75. 3.           Modelling using a computer system
  76.  
  77.      3.01    Computer system operation
  78.      3.02    The original computer
  79.      3.03    Computation as modelling
  80.      3.04    The essentials of computation
  81.      3.05    Problem solving through model building
  82.      3.06    Types of models
  83.      3.07    Objects and structural models
  84.      3.08    Attributes, values and value spaces
  85.      3.09    Some properties of value spaces
  86.      3.10    Simple values, collected values
  87.      3.11    Models with memory
  88.      3.12    The memory store operation
  89.      3.13    The memory load operation
  90.      3.14    Modelling constants, variables
  91.      3.15    The problem of addresses
  92.      3.16    Structures expressed by means of values
  93.      3.17    The program as a model
  94.      3.18    The simplest operations for computation
  95.      3.s     Summary
  96.  
  97.  
  98. 4.           Visual modelling
  99.  
  100.      4.01    Complexity control and abstraction
  101.      4.02    Human interaction with a computer system
  102.      4.03    Display quality issues
  103.      4.04    Context representation
  104.      4.05    Building blocks of a visual modelling scheme
  105.      4.s     Summary
  106.  
  107.  
  108. 5.           Display device characteristics
  109.  
  110.      5.01    Raster scan display systems
  111.      5.02    Raster scan image refresh
  112.      5.03    Signals for image generation
  113.      5.04    Timing issues
  114.      5.05    Image generation can be dangerous!
  115.      5.06    Persistance in human vision
  116.      5.07    Interlaced display
  117.      5.08    Screen border display
  118.      5.09    Cursor generation
  119.      5.10    Multi-synch monitors
  120.      5.s     Summary
  121.  
  122.  
  123. 6.           VGA controller: Computer interface
  124.  
  125.      6.01    Memory interface
  126.      6.02    Input, output, port interface
  127.      6.03    Complete input, output port accessible register list
  128.      6.04    Register specifications: Sequencer
  129.      6.05    Register specifications: CRT Controller
  130.      6.06    Register specifications: Graphics Controller
  131.      6.07    Register specifications: Attribute Controller
  132.      6.08    Register specifications: DAC Support Logic
  133.      6.09    Register specifications: General Registers
  134.      6.10    Register specifications: Special Registers
  135.      6.s     Summary
  136.  
  137.  
  138. 7.           VGA controller: Architecture
  139.  
  140.      7.01    Controller timing generator:    { Sequencer            }
  141.      7.02    Display timing generator:       { CRT Controller       }
  142.      7.03    Image information processor:    { Graphics Controller  }
  143.      7.04    Image presentation processor:   { Attribute Controller }
  144.      7.05    Colour presentation processor:  { DAC Support Logic    }
  145.      7.s     Summary
  146.  
  147.  
  148. 8.           VGA controller: Text
  149.              {Only available in second edition}
  150.  
  151.      8.01    Text image generation
  152.      8.02    Text font representation
  153.      8.03    Text attribute representation
  154.      8.04    Text character set extensions
  155.      8.05    Text mode support for graphics
  156.  
  157.  
  158. 9.           VGA controller: Graphics
  159.              {Only available in second edition}
  160.  
  161.      9.01    Graphic image generation
  162.      9.02    Graphic multi-plane memory
  163.      9.03    Graphic packed pixel memory
  164.      9.04    Graphic line drawing
  165.      9.05    Graphic object drawing
  166.  
  167.  
  168. 10.          VGA controller: Hardware Interface
  169.  
  170.      10.01   Hardware connector layout
  171.      10.02   Monitor auto-detection operation
  172.      10.03   Monitor auto-configuration operation
  173.  
  174.  
  175.  
  176.              References.
  177.  
  178.  
  179.              Glossary.
  180.  
  181.  
  182.              Index.
  183.  
  184.  
  185.  
  186.  
  187. 0.03  Notice of copyright
  188. ====  ===================
  189.  
  190.  
  191. This file is copyright (c) 1991 by A.J.B. Scott.  Restricted permission to copy
  192. is given provided that the following conditions are met in full, without any
  193. qualification:
  194.  
  195.  
  196.   1.  No fee shall be charged for the material content of this file, excepting
  197.       only that a small fee for media and copying time may be charged for.
  198.  
  199.   2.  The file shall be copied entirely, without modification or ammendment,
  200.       the copyright notice shall be present in the original form, and these
  201.       conditions shall appear intact.
  202.  
  203.   3.  The copying of this material shall not be for commercial gain with
  204.       the intent or effect of depriving the copyright owner of legitimate
  205.       income deriving from licenses granted to users for this work.
  206.  
  207.   4.  The material appearing here is assigned by the author to distribution as
  208.       shareware.  This means that copyright remains with the author, and that
  209.       this material may be used in entirety for a short period for review.  At
  210.       completion of review, the user may decide that the material is useful,
  211.       in which case a registration fee presented by the user to the author will
  212.       secure a license to use, for the registering user.  The user may decide
  213.       what to pay for the license to use, depending upon the value to the user
  214.       of the material.  Guidelines are given below regarding a suitable fee.
  215.       A suggested period for review is thirty (30) days elapsed time.  After
  216.       this time, either the material should be licensed, or if unsuitable for
  217.       the purpose intended by the user, it should be passed in entirety to
  218.       another interested person or else completely destroyed.  Erasure from
  219.       the carrier medium is for this purpose equivalent to destruction.  Any
  220.       printed version must also be destroyed.
  221.  
  222.   5.  The user is responsible for deciding the suitability or otherwise of this
  223.       material for purposes decided by the user.  The user makes use of this
  224.       work at the users own risk.  The author explicitly forbids any user from
  225.       using any material contained in this document in connection with any and
  226.       all life critical systems.
  227.  
  228.  
  229.  
  230.  
  231. 0.04  Suggested license fees
  232. ====  ======================
  233.  
  234.  
  235. A suggested scale of license fees is given below, based upon the degree
  236. of use to which the user puts or expects to put the enclosed material:
  237.  
  238.   1.  If you find that certain portions of the material are sufficiently
  239.       useful that you need to refer to them in order to PROGRESS SOME
  240.       PROJECT that you are involved in, then you really are depending on
  241.       the material, so an appropriate payment would be SIXTEEN (16) POUNDS
  242.       U.K. STERLING.  This is the LICENSE FEE applicable when you make ONE
  243.       PRINTED COPY of this document.
  244.  
  245.   2.  For registered users as in (1) above, FURTHER PRINTED COPIES of
  246.       the document may be taken, and registered for use, by payment of
  247.       FOUR (4) POUNDS U.K. STERLING PER PRINTED COPY.  There is NO
  248.       discount available for additional printed copies.
  249.  
  250.   3.  If as a user, you find the material sufficiently interesting or
  251.       relevant that you READ ALL THE MATERIAL, then you could consider
  252.       that the material was either entertaining or extremely relevant to
  253.       you and your interests.  In this case an appropriate payment would
  254.       be TWELVE (12) U.K. POUNDS STERLING.  This assumes that you have
  255.       NOT MADE A PRINTED COPY.
  256.  
  257.   4.  If you find that although you cannot use the material at this time,
  258.       you would EXPECT TO USE it at some time IN the FUTURE, you are of
  259.       the opinion that the material is potentially useful to you, so a
  260.       registration fee of EIGHT (8) U.K. POUNDS STERLING is appropriate.
  261.       This assumes that you have NOT MADE A PRINTED COPY.
  262.  
  263.   5.  If you simply want to maintain the RIGHT TO LEGALLY USE the material
  264.       WHEN IT BECOMES IMPORTANT to you, then IN ORDER TO RETAIN it ON YOUR
  265.       COMPUTER SYSTEM, a payment of FOUR (4) U.K. POUNDS STERLING is the
  266.       suggested license fee.  This applies when you wish to KEEP material
  267.       for BACKUP PURPOSES or for "what if" or "just in case" situations.
  268.       This assumes that you have NOT MADE A PRINTED COPY.
  269.  
  270.   6.  For REGISTERED USERS who wish to INCREASE their LEVEL OF REGISTRATION
  271.       at a later date, A DISCOUNT IS AVAILABLE.  To take advantage of this,
  272.       include your registration number with your order, and deduct ONE pound
  273.       sterling FOR EACH FOUR pounds DIFFERENCE in your existing and upgraded
  274.       registration levels.  This does NOT APPLY TO additional PRINTED COPIES
  275.       of this work.  See (2) above.
  276.  
  277.   7.  IF you reviewed the material but do not find it interesting, or if
  278.       YOU CANNOT MAKE any USE OF IT, THEN you are requested to pass all the
  279.       material to someone who may be interested, or ENTIRELY DESTROY your
  280.       COPY of it, INCLUDING any PRINTED VERSION you may have made for review
  281.       purposes.  THIS PROVIDES you with a LEGITIMATE way of stating that
  282.       the material DOES NOT MEET your NEEDS.  If you need to KEEP A COPY,
  283.       then you SHOULD consider REGISTERING as in (5) above.
  284.  
  285.  
  286.  
  287.  
  288. 0.05  Shareware and how it works
  289. ====  ==========================
  290.  
  291.  
  292. It is important to emphasise that this material did not just suddenly appear
  293. as if by magic.  It had to be created, but only after the expenditure of much
  294. thought and effort.  As with any human endevour, people who create works or
  295. perform work for other people do expect and do need to be rewarded for their
  296. efforts.
  297.  
  298. The purpose of the shareware concept is to provide a vehicle whereby talented
  299. people can produce high quality work, which may subsequently be distributed
  300. by many different channels, but always at low cost.  The ultimate goal is that
  301. clients who use shareware, can obtain useful relevant products at a very low
  302. price, without any compromise on quality.
  303.  
  304. For a shareware author, the business of marketing and distribution is taken
  305. care of, leaving the author with the time and energy to concentrate on product
  306. development, helping to ensure production of a quality product.
  307.  
  308. So, if you find any shareware product useful, make sure that you take the time
  309. to give your vote of confidence in the product and its author, by registering
  310. the product enclosing the appropriate fee to the author.
  311.  
  312. If you do not do this, the author will not be in a position to produce further
  313. products that you will find useful, and, ultimately, you will be saying that
  314. you do not respect the product you are using, the author who produced it, and
  315. that you would rather buy an expensive product in a shiny wrapper than support
  316. the shareware concept.
  317.  
  318. The simple fact is, you either register your use of a product, or see the means
  319. that brought you that product (shareware) wither and die.  The choice is yours.
  320.  
  321. On the other hand, you should definately not register a product which is no use
  322. to you, and will never be any use to you.  Many authors like to hear why their
  323. product does not provide what you actually need, and would like your comments.
  324.  
  325. Why not support them and provide your views?  You can only benefit long term.
  326. Some people  have found that authors of shareware products can be very flexible
  327. when new updates are issued.  Some users have suddenly found that their views
  328. have helped give them exactly what they need in a new product.
  329.  
  330. So, it's over to you.  Enjoy using this material or let me know how you would
  331. like to see it improved or reoriented.  Thank you and good luck.
  332.  
  333.  
  334.  
  335.  
  336. 0.06  Obtaining a print of this document
  337. ====  ==================================
  338.  
  339.  
  340. To make best use of this document, for evaluation purposes, or, after you have
  341. registered and paid the appropriate license fee (see above for details), for
  342. reference use, it is beneficial to obtain a printed version of this document.
  343.  
  344. For those of you who wish to print this document, it is necessary to make note
  345. that the ascii text comprising this document is completely devoid of control
  346. characters, excepting only cr {carriage return} and lf {line feed}.  No other
  347. non-printing characters are used.  This has been done on purpose, so that any
  348. printing device which supports ascii character sets may successfully produce
  349. a print.
  350.  
  351. The absence of ff {form feed} control characters means that there will not be
  352. a division of this document into complete page sections.  This should not be a
  353. problem, since the material is indexed by the contents list, and there are
  354. differences of page lengths supported by different printing devices, which in
  355. practise would change the page numbering.
  356.  
  357. For these reasons, the concept of page has been completely ignored throughout
  358. this document.
  359.  
  360. The printable width of lines is constrained to be 80 characters or less.  In
  361. this way, virtually any industry standard output device may be used to create
  362. a readable image of this text, whether on video display unit, or print device.
  363. Note however, that the actual size of a line may be just over 80 characters
  364. when the carriage return, line feed pair are taken into account.  This might
  365. affect the setup of certain types of printer drivers.
  366.  
  367. If you do make a printed version of this document, and then decide that you do
  368. not wish to register your copy, you should either pass the printed copy with
  369. the computer readable copy to another person who may have an interest, or you
  370. should destroy both copies.  This removes any obligation from you to register
  371. your use by making a payment to the author.
  372.  
  373. UNDER NO CIRCUMSTANCES SHOULD YOU PRODUCE MORE THAN ONE PRINTED COPY WITHOUT
  374. PAYMENT OF A REGISTRATION FEE TO THE AUTHOR.  If you have registered your use
  375. and need to register more than one printed copy, please see above for the
  376. beneficial rates available for this situation.
  377.  
  378.  
  379.  
  380.  
  381. 0.07  Your expert input to this document
  382. ====  ==================================
  383.  
  384.  
  385. If you are an expert or have recently become an expert in areas from which this
  386. work would benefit, and you would like to provide input to the author so that
  387. others may benefit from your knowledge, please contact the author.  Any extra
  388. materials provided will be included at this authors sole discretion, but such
  389. included material will always be given special acknowledgement.  Any anonymous
  390. material will be excluded unconditionally from further consideration.
  391.  
  392. If you have found this document to be useful but feel that it could be better,
  393. please write to the author and make constructive suggestions.  Criticism will
  394. be welcomed but only if it is of a constructive nature.  Your input as a user
  395. is needed to help ensure that this document meets your needs today, tomorrow,
  396. and into the future.
  397.  
  398. If you do wish to provide updates to this material, please provide these on a
  399. 1.44M or 720K 3.5 inch floppy disk.  Use a simple ascii file format without
  400. using any control codes except carriage return and line feed.  When marking
  401. changes in the existing text, use the following conventions.
  402.  
  403. Any source material which is to be changed, should be surrounded with special
  404. brackets, indicating that it is subject to change.  These brackets appear as
  405. follows:
  406.  
  407.  
  408.            !-!...original text to modify...!=!...new replacement text...!+!
  409.  
  410.  
  411. It may be most useful to use this convention with complete lines of text, then
  412. less confusion will result when many small changes are made to detail:
  413.  
  414.  
  415. !-!
  416.            original body of text
  417.            which needs
  418.            some changes made
  419. !=!
  420.            new text as
  421.            a replacement
  422.            for the above
  423. !+!
  424.  
  425.  
  426. Source material which is to be unconditionally deleted is dealt with as in the
  427. following manner:
  428.  
  429.  
  430. !-!
  431.            body of text which needs
  432.            deleting without replacement
  433. !-!
  434.  
  435.  
  436. Source material which is to be inserted as entirely new text, is introduced in
  437. the following way:
  438.  
  439.  
  440. !+!
  441.            body of text which needs
  442.            interting as entirely
  443.            new material
  444. !+!
  445.  
  446.  
  447. Comments which need to be made, but which should not be included in the body of
  448. the text, may be enclosed with appropriate brackets as follows:
  449.  
  450.  
  451. !'!
  452.            Note ' is a single quote !
  453.            comments which describe
  454.            the reasons for performing
  455.            edits, deletion or insertion
  456.            of new material
  457.            Note " is a double quote !
  458. !"!
  459.  
  460.  
  461. Please note that the above markers cannot contain each other.  That is, it is
  462. possible only to operate with a flat file, and nesting of markers is illegal.
  463. Markers can however be conjoined together one set following immediately after
  464. another set, without intervening text.
  465.  
  466. These conventions must be adopted since the author relies on automated library
  467. processing software.
  468.  
  469. All such material will become the property and copyright of the present author.
  470. Regretfully, no payment can be made for any material provided in this way, and
  471. disks will not be returned.  The reasons for these conditions are simple.  The
  472. author does not have unlimited time available to service this work, so any way
  473. of making administration easier must be seriously considered.   Who knows, if
  474. this material attracts sufficient registrations, more time might be available.
  475.  
  476.  
  477.  
  478.  
  479. 0.08  Contacting the author
  480. ====  =====================
  481.  
  482.  
  483. The author is a practising software/hardware engineer who often travels abroad
  484. in connection with an international consultancy business.  The contact address
  485. to use (which is only a forewarding address) is as follows:
  486.  
  487.       _____________________
  488.      |                     |
  489.      |   Andrew Scott      |
  490.      |   SHAREWARE 01      |
  491.      |   c/o 1 Bramcote    |
  492.      |   Aylesbury         |
  493.      |   Buckinghamshire   |
  494.      |   HP20 1QE          |
  495.      |   ENGLAND           |
  496.      |_____________________|
  497.  
  498.  
  499. There is no possibility of telephone contact simply because the author spends
  500. long periods of time abroad.  This situation is regretted but could change if
  501. sufficient registrations warrant a different approach.
  502.  
  503. If you wish to communicate put your letter on a 720K or 1.44M  3.5 inch disc
  504. with a filename of 'letter.doc'.  Do not forget to put your name and address
  505. on the disc in a file called 'address.doc' then mail it to the above address.
  506.  
  507. All files should be in plain ascii, without control codes other than carriage
  508. return and line feed.  No other file formats are acceptable.  An 'address.doc'
  509. file should print your name and address exactly as it should be written on an
  510. envelope to be posted to you.  Please note that discs will not be accepted if
  511. they contain executable files of any type whatsoever.  This is to prevent any
  512. difficulties with software licensing, and to help ensure freedom from viruses.
  513.  
  514. Please note that the author uses a standard procedure with any received discs.
  515. This involves using a special bootable program to wipe all files from the disc
  516. which do not have the extension '.doc'.  In particular, the disc is rendered
  517. unbootable.  Only after this special virus proof program has been run is the
  518. disc read using a conventional industry standard operating system, with a set
  519. of appropriate adjustments made to the floppy disc drive control software for
  520. further security protection.
  521.  
  522. Do please remember this if you need to send a disc.
  523.  
  524. If you need to send program code, then it must be sent in source form, and you
  525. must be the author, or possess a license sufficient to transmit source to a
  526. third party.  Please include details of this license in a separate file with
  527. the name 'license.doc'.
  528.  
  529. In any case, program fragments are to be preferred, since they make a technical
  530. point without introducing irrelevant detail.  Source should be in some genus of
  531. 80x86 assembly language.
  532.  
  533. No written communications can be accepted, since they involve so much handling
  534. overhead.  All discs become the property of the present author on receipt.
  535.  
  536. The author regrets that failure to observe these requirements will prevent any
  537. attempted communication from taking place.
  538.  
  539. The policy of the author is that any licensed files will be erased as soon as
  540. it is practically possible to do so.  The author does not have any interest
  541. whatsoever in 'data collection' of any type.  This is particularly true in the
  542. case of material which may be the licensable property of others.
  543.  
  544. Although the author will attempt to respond where appropriate, no undertaking
  545. can be given on this point, simply due to pressure of time.  This unfortunate
  546. circumstance could change should the level of user support of this work prove
  547. to be of an appropriate level.
  548.  
  549.  
  550.  
  551.  
  552. 0.09  Registration and Receipt Form
  553. ====  =============================
  554.  
  555.  
  556. Registrations are made only by means of a cheque drawn on a U.K. bank in pounds
  557. sterling as detailed above.  Please make the cheque payable to:
  558.  
  559.       ___________________
  560.      |                   |
  561.      |   Andrew Scott    |
  562.      |___________________|
  563.  
  564.  
  565. All registrations MUST be accompanied by the Registration and Receipt Form that
  566. appears below.  Use your text editor to extract this form then fill it in, or
  567. alternatively, use the separate file 'register.doc' in the same way.  Having
  568. filled in the form, print it out and enclose it with your cheque.  As before,
  569. the motivation for this is the saving of administration time.  Cheques provided
  570. without the form will be accepted, but of course, no receipt can then be given.
  571.  
  572. It may be necessary to allow some time to elapse before receiving your receipt.
  573. Do not be alarmed by this.  If you do not require a receipt, please either tick
  574. the box to state this, or alternatively, just send your cheque unaccompanied.
  575.  
  576. Please note that it is not the authors policy to keep names and addresses of
  577. registrees in computer readable form, since this can cause difficulties with
  578. existing U.K. legislation in terms of overhead cost in time and money.
  579.  
  580. Please find below the form which MUST accompany your registration cheque.  It
  581. is followed by an example which has been filled in for a ficticious client at
  582. a U.K. address.  After that, another example follows, for a foreign client.
  583.  
  584.  
  585.  
  586.  
  587. ==============================================================================
  588.                    Registration and Receipt Form  [Start]
  589. ==============================================================================
  590.  
  591.  
  592.    When completed, please send a printed version of this form together
  593.    with the appropriate value cheque to the address following:
  594.  
  595.                     _____________________
  596.                    |                     |
  597.                    |   Andrew Scott      |
  598.                    |   SHAREWARE 01      |
  599.                    |   c/o 1 Bramcote    |
  600.                    |   Aylesbury         |
  601.                    |   Buckinghamshire   |
  602.                    |   HP20 1QE          |
  603.                    |   ENGLAND           |
  604.                    |_____________________|
  605.  
  606.  
  607.    Client Name and Address (as for an envelope to be posted).
  608.    You MUST use your text editor; handwriting is unreliable.
  609.    Simply leave any unused lines free of text.  Please leave
  610.    the numeric fields as they stand, unaltered.  Use a clear
  611.    simple typeface when printing this form prior to mailing.
  612.  
  613.  
  614.          001:
  615.          ----------------------------------------------------
  616.          002:
  617.          ----------------------------------------------------
  618.          003:
  619.          ----------------------------------------------------
  620.          004:
  621.          ----------------------------------------------------
  622.          005:
  623.          ----------------------------------------------------
  624.          006:
  625.          ----------------------------------------------------
  626.          007:
  627.          ----------------------------------------------------
  628.          008:
  629.          ----------------------------------------------------
  630.          009:
  631.          ----------------------------------------------------
  632.          010:
  633.          ----------------------------------------------------
  634.          011:
  635.          ----------------------------------------------------
  636.          012:
  637.          ----------------------------------------------------
  638.  
  639.  
  640.    Receipt Required?  Please delete 'Yes' if no receipt is required.
  641.  
  642.  
  643.          120:      Yes
  644.          -------------
  645.  
  646.  
  647.    Please indicate here the actual license REGISTRATION FEE you are paying,
  648.    WITHOUT including any provision for U.K. local tax {V.A.T.}.
  649.  
  650.  
  651.          230:
  652.          -------------
  653.  
  654.  
  655.    If you have an ADDRESS in the U.K. (V.A.T. area) you MUST INCLUDE V.A.T.
  656.    at the CURRENT RATE.  It is 17.5% at this time, but may of course change
  657.    later.  Your RECEIPT will PROVIDE you with PROOF of V.A.T. SPENDING.
  658.    OVERSEAS client ADDRESSES do NOT pay V.A.T., so for them, this is zero.
  659.    Please indicate here the amount of V.A.T. you are paying.
  660.  
  661.  
  662.          231:
  663.          -------------
  664.  
  665.  
  666.    This amount MUST match the VALUE of your CHEQUE.
  667.    YOUR CHEQUE MUST BE DRAWN ON A U.K. BANK IN POUNDS STERLING.
  668.    If you have a U.K. address YOU MUST INCLUDE V.A.T.
  669.    If you have a FOREIGN address, you DO NOT pay V.A.T.
  670.    Please indicate here the value of your registration fee together with any
  671.    local U.K. tax {V.A.T.} you are paying.
  672.  
  673.  
  674.          234:
  675.          -------------
  676.  
  677.  
  678.    Registration Number issued in receipt.  Please leave this blank
  679.    unless you have already registered and are increasing the level
  680.    of your existing registration.  Do not forget a discount may be
  681.    available to you.  See {0.04} Suggested license fees.
  682.  
  683.  
  684.          340:
  685.          ---------------------------------------------------------
  686.  
  687.  
  688. ==============================================================================
  689.                    Registration and Receipt Form  [End]
  690. ==============================================================================
  691.  
  692.  
  693.  
  694.  
  695. ==============================================================================
  696. EXAMPLE UK         Registration and Receipt Form  [Start]  EXAMPLE UK
  697. ==============================================================================
  698.  
  699.  
  700.    When completed, please send a printed version of this form together
  701.    with the appropriate value cheque to the address following:
  702.  
  703.                     _____________________
  704.                    |                     |
  705.                    |   Andrew Scott      |
  706.                    |   SHAREWARE 01      |
  707.                    |   c/o 1 Bramcote    |
  708.                    |   Aylesbury         |
  709.                    |   Buckinghamshire   |
  710.                    |   HP20 1QE          |
  711.                    |   ENGLAND           |
  712.                    |_____________________|
  713.  
  714.  
  715.    Client Name and Address (as for an envelope to be posted).
  716.    You MUST use your text editor; handwriting is unreliable.
  717.    Simply leave any unused lines free of text.  Please leave
  718.    the numeric fields as they stand, unaltered.  Use a clear
  719.    simple typeface when printing this form prior to mailing.
  720.  
  721.  
  722.          001:       John Smith
  723.          ----------------------------------------------------
  724.          002:       Basement Flat
  725.          ----------------------------------------------------
  726.          003:       Number 3
  727.          ----------------------------------------------------
  728.          004:       Holly Lane
  729.          ----------------------------------------------------
  730.          005:       Beringsbeare
  731.          ----------------------------------------------------
  732.          006:       Tullingdon
  733.          ----------------------------------------------------
  734.          007:       Near Great Minsforth
  735.          ----------------------------------------------------
  736.          008:       Shrafton
  737.          ----------------------------------------------------
  738.          009:       Shropshire
  739.          ----------------------------------------------------
  740.          010:       SH12 4PB
  741.          ----------------------------------------------------
  742.          011:
  743.          ----------------------------------------------------
  744.          012:
  745.          ----------------------------------------------------
  746.  
  747.  
  748.    Receipt Required?  Please delete 'Yes' if no receipt is required.
  749.  
  750.  
  751.          120:      Yes
  752.          -------------
  753.  
  754.  
  755.    Please indicate here the actual license REGISTRATION FEE you are paying,
  756.    WITHOUT including any provision for U.K. local tax {V.A.T.}.
  757.  
  758.  
  759.          230:   16.00
  760.          -------------
  761.  
  762.  
  763.    If you have an ADDRESS in the U.K. (V.A.T. area) you MUST INCLUDE V.A.T.
  764.    at the CURRENT RATE.  It is 17.5% at this time, but may of course change
  765.    later.  Your RECEIPT will PROVIDE you with PROOF of V.A.T. SPENDING.
  766.    OVERSEAS client ADDRESSES do NOT pay V.A.T., so for them, this is zero.
  767.    Please indicate here the amount of V.A.T. you are paying.
  768.  
  769.  
  770.          231:   2.80
  771.          -------------
  772.  
  773.  
  774.    This amount MUST match the VALUE of your CHEQUE.
  775.    YOUR CHEQUE MUST BE DRAWN ON A U.K. BANK IN POUNDS STERLING.
  776.    If you have a U.K. address YOU MUST INCLUDE V.A.T.
  777.    If you have a FOREIGN address, you DO NOT pay V.A.T.
  778.    Please indicate here the value of your registration fee together with any
  779.    local U.K. tax {V.A.T.} you are paying.
  780.  
  781.  
  782.          234:  18.80
  783.          -------------
  784.  
  785.  
  786.    Registration Number issued in receipt.  Please leave this blank
  787.    unless you have already registered and are increasing the level
  788.    of your existing registration.  Do not forget a discount may be
  789.    available to you.  See {0.04} Suggested license fees.
  790.  
  791.  
  792.          340:
  793.          ---------------------------------------------------------
  794.  
  795.  
  796. ==============================================================================
  797. EXAMPLE UK         Registration and Receipt Form  [End]  EXAMPLE UK
  798. ==============================================================================
  799.  
  800.  
  801.  
  802.  
  803. ==============================================================================
  804. EXAMPLE FOREIGN    Registration and Receipt Form  [Start]  EXAMPLE FOREIGN
  805. ==============================================================================
  806.  
  807.  
  808.    When completed, please send a printed version of this form together
  809.    with the appropriate value cheque to the address following:
  810.  
  811.                     _____________________
  812.                    |                     |
  813.                    |   Andrew Scott      |
  814.                    |   SHAREWARE 01      |
  815.                    |   c/o 1 Bramcote    |
  816.                    |   Aylesbury         |
  817.                    |   Buckinghamshire   |
  818.                    |   HP20 1QE          |
  819.                    |   ENGLAND           |
  820.                    |_____________________|
  821.  
  822.  
  823.    Client Name and Address (as for an envelope to be posted).
  824.    You MUST use your text editor; handwriting is unreliable.
  825.    Simply leave any unused lines free of text.  Please leave
  826.    the numeric fields as they stand, unaltered.  Use a clear
  827.    simple typeface when printing this form prior to mailing.
  828.  
  829.  
  830.          001:       Johan Schmidt
  831.          ----------------------------------------------------
  832.          002:       Heliger Strasse 13
  833.          ----------------------------------------------------
  834.          003:       Markt Windsheim
  835.          ----------------------------------------------------
  836.          004:       Langenburg
  837.          ----------------------------------------------------
  838.          005:       Aschaffenburg
  839.          ----------------------------------------------------
  840.          006:       Frankfurt a/d Main
  841.          ----------------------------------------------------
  842.          007:       Germany
  843.          ----------------------------------------------------
  844.          008:
  845.          ----------------------------------------------------
  846.          009:
  847.          ----------------------------------------------------
  848.          010:
  849.          ----------------------------------------------------
  850.          011:
  851.          ----------------------------------------------------
  852.          012:
  853.          ----------------------------------------------------
  854.  
  855.  
  856.    Receipt Required?  Please delete 'Yes' if no receipt is required.
  857.  
  858.  
  859.          120:      Yes
  860.          -------------
  861.  
  862.  
  863.    Please indicate here the actual license REGISTRATION FEE you are paying,
  864.    WITHOUT including any provision for U.K. local tax {V.A.T.}.
  865.  
  866.  
  867.          230:   16.00
  868.          -------------
  869.  
  870.  
  871.    If you have an ADDRESS in the U.K. (V.A.T. area) you MUST INCLUDE V.A.T.
  872.    at the CURRENT RATE.  It is 17.5% at this time, but may of course change
  873.    later.  Your RECEIPT will PROVIDE you with PROOF of V.A.T. SPENDING.
  874.    OVERSEAS client ADDRESSES do NOT pay V.A.T., so for them, this is zero.
  875.    Please indicate here the amount of V.A.T. you are paying.
  876.  
  877.  
  878.          231:   0.0
  879.          -------------
  880.  
  881.  
  882.    This amount MUST match the VALUE of your CHEQUE.
  883.    YOUR CHEQUE MUST BE DRAWN ON A U.K. BANK IN POUNDS STERLING.
  884.    If you have a U.K. address YOU MUST INCLUDE V.A.T.
  885.    If you have a FOREIGN address, you DO NOT pay V.A.T.
  886.    Please indicate here the value of your registration fee together with any
  887.    local U.K. tax {V.A.T.} you are paying.
  888.  
  889.  
  890.          234:  16.00
  891.          -------------
  892.  
  893.  
  894.    Registration Number issued in receipt.  Please leave this blank
  895.    unless you have already registered and are increasing the level
  896.    of your existing registration.  Do not forget a discount may be
  897.    available to you.  See {0.04} Suggested license fees.
  898.  
  899.  
  900.          340:
  901.          ---------------------------------------------------------
  902.  
  903.  
  904. ==============================================================================
  905. EXAMPLE FOREIGN    Registration and Receipt Form  [End]  EXAMPLE FOREIGN
  906. ==============================================================================
  907.  
  908.  
  909.  
  910. 0.s   Summary
  911. ===   =======
  912.  
  913.  
  914. This document is a copyright work, for which a license to use is required.
  915. Details are given for registering a user license, with appropriate payment.
  916.  
  917. Technical notes on the source character set employed in this document are
  918. made for those needing to produce a printed version of this work.
  919.  
  920. Expert input from people who have seen this document is invited with a view to
  921. increasing the usefulness, relevance and quality for existing and prospective
  922. registered users.
  923.  
  924. Details are given on procedure for contact with the author, and for making
  925. payment for a user license.
  926.  
  927. A disclaimer is presented concerned with fitness for use of this work.
  928.  
  929.  
  930.  
  931.  
  932. 1.    Preface: how this document will help you
  933. ==    ========================================
  934.  
  935.  
  936. 1.01  Goals of this document
  937. ====  ======================
  938.  
  939.  
  940. The goal of this document is the description of means for programming the VGA
  941. controller chips found in contemporary Intel 80x86 processor powered industry
  942. standard architecture computer systems.
  943.  
  944. To program any device effectively requires intimate knowledge of environmental
  945. issues which determine the context within which the device finds application,
  946. the technical issues which determine the structure of the device, and finally,
  947. full details of the programming interface available to the host machine.
  948.  
  949. We will first consider the background against which any computer system works.
  950. This will broaden into a brief overview of the structures which comprise any
  951. computer system, and which are necessary to support computation.  Computation
  952. is then considered as a modelling activity.  We will consider means for making
  953. models, and the representation of models in people oriented terms.
  954.  
  955. These considerations will naturally broaden into a discussion of video image
  956. generation and the employment of images as an essential part of the process
  957. of communication between people and computer systems.
  958.  
  959. We consider the reasons why images can be appropriate for the expression of
  960. complex modelling relations, which then leads naturally to considerations for
  961. the technical specification of image generating capabilities.
  962.  
  963. The architectural aspects of the host machine are then discussed, in particular
  964. the implications of memory mapped interfaces, and the means for controlling the
  965. operation of a very highly configurable video image generator chip.  This gives
  966. reasons for the register input output structures commonly used when programming
  967. the VGA controller chip.
  968.  
  969. Details of the conceptual and physical structure of the video image generator
  970. are examined, with discussion of the motivation for the various programmable
  971. features introduced into the hardware.  The characteristics of the hardware
  972. are given, with details of the user oriented operations which motivate them,
  973. and the programming strategies to be adopted in their use for achievement of
  974. maximally high image manipulation performance.
  975.  
  976. The main part of this work is centred upon the highly complex register set that
  977. provides the VGA controller with all its many programmable option settings.  It
  978. is the interaction of these settings which, for the most part, makes the VGA so
  979. difficult to understand and program.  We will describe the data content of each
  980. register, in a systematic manner.  There will be discussion concerning the real
  981. design motivation for providing the particular feature which is being described
  982. which will in most cases considerably clarify complex issues.  Further, related
  983. features are brought into focus, with either a useful comment as introduction,
  984. or with a full discussion.  In all cases, cross references are given at the top
  985. of each register description.  These will yield considerable insight, when used
  986. to direct attention on a particular point of interest.
  987.  
  988. By following the cross references in a random manner the informed reader will
  989. very quickly build up a complete picture of essential VGA operation.  This is
  990. very important prior to starting any serious programming for this very highly
  991. flexible but very complex device.  Excellent advice to follow before creating
  992. any program for the VGA device is to obtain from the original manufacturer of
  993. your particular VGA absolutely all the technical documentation available.  In
  994. this way, you will hopefully have some chance of being adequately informed as
  995. most VGA controller chips now available support extensive additional features
  996. which will, for the most part, be completely non-standard.
  997.  
  998.  
  999.  
  1000.  
  1001. 1.02  Suggested audience orientation
  1002. ====  ==============================
  1003.  
  1004.  
  1005. This document is primarily concerned with a particularly technical aspect of
  1006. programming the industry standard architecture machines employing Intel 80x86
  1007. processor chips.  As such, the reader would benefit considerably from a good
  1008. knowledge of Intel 80x86 assembly language programming, including architectural
  1009. appreciation of that line of processor chips.  In particular, the memory access
  1010. and input output model of the 8086 processor chip should be understood.
  1011.  
  1012. If the reader is not concerned with the intimate details of VGA programming,
  1013. this document should provide all the source material neeeded to form a view of
  1014. the capabilities and attendant design issues facing a VGA programmer.  This
  1015. might be of interest to a system designer who is addressing the question of
  1016. whether to develop a product using the full capability of the VGA video system.
  1017.  
  1018. Knowledge of hardware structures would be useful, but should not be essential
  1019. for obtaining spectacular performance from the hardware described.  However,
  1020. some degree of conceptual awareness of hardware structures will be developed in
  1021. this document, and without this knowledge, it would be very difficult to obtain
  1022. original practical results for a special application.  This level of knowledge
  1023. is fairly simple, so should not prove onerous to even the most wisened hardware
  1024. illiterate programmer.
  1025.  
  1026. Programming templates will be given in a generic 8086 assembly language,
  1027. without any pseudo-operation context.  The intention is to produce practical
  1028. conceptual knowledge, which is perpetually reuseable, rather than a set of
  1029. recipes for various commonly occuring problems.  The emphasis is firmly on
  1030. high performance, which means writing code with a solid understanding of what
  1031. is happening in the hardware.  Only in this way can the full power of the VGA
  1032. controller chip be realised in practical application.
  1033.  
  1034. It should be fairly clear by now that we will not be concerned with means by
  1035. which the VGA can be programmed with involvement of a video bios {basic input
  1036. output system}.  We will instead consider the questions involved in writing
  1037. our own application specific bios, using only the naked resources provided by
  1038. the VGA controller chip itself.  People interested in programming using the
  1039. various bios facilities will, nevertheless, find this document interesting in
  1040. the sense that having understood this material, the operations of the bios
  1041. will become much clearer.  This means more effective programming, even at the
  1042. more constrained level of bios operations.  In addition, the potential always
  1043. exists to perform mixed bios and customised high speed programming of the VGA
  1044. controller for special applications which do not warrant the development of a
  1045. full custom programmed solution.  In all these situations, the material given
  1046. here should help the programmer to obtain the desired results without too much
  1047. fuss or heartache.
  1048.  
  1049. Since the price of VGA controllers with massive amounts of memory has reached
  1050. a very affordable level at the time of writing {summer of 1991}, we will not
  1051. dwell on the various video standards which preceeded VGA, but will from time
  1052. to time make parenthetic notes about particular compatibility considerations
  1053. which motivate various aspects of the hardware design.  This will represent
  1054. the full extent of our interest in such compatibility issues.  In particular,
  1055. we will often assume that we are using a VGA controller with certain specific
  1056. characteristics.  That is, we assume a Trident 8900 VGA controller chip, with
  1057. a full one megabyte of video memory.  These assumptions will not generally
  1058. upset the validity of the concepts and programming techniques discussed, but
  1059. do serve to provide a complete specification of the environment within which
  1060. this document was conceived and written.
  1061.  
  1062. The most important qualification for gaining benefit from this document is an
  1063. interest in understanding the subject matter, and a relatively keen intellect.
  1064. The rest is the ability to author well conceived program code, and the strength
  1065. to accept that mistakes need to be made before outstanding results are seen.
  1066.  
  1067. Do remember that when dealing with inherantly complex issues, the only way to
  1068. succeed is to use the appropriate approach.  As Sir Winston Churchill once said
  1069. when speaking to the Oxford University Student Union:
  1070.  
  1071. "Never give up".   "Never, never, give up".   "Never, never, never, give up".
  1072.  
  1073. This was his address in its entirety, which received rapturous applause and
  1074. doubtless helped to change the lives of many as a result.
  1075.  
  1076.  
  1077.  
  1078.  
  1079. 1.03  How to use this document
  1080. ====  ========================
  1081.  
  1082.  
  1083. We spend some time developing a model of computation, which embraces the
  1084. hardware and software structures necessary for practical problem solving
  1085. using computer based modeling techniques.  This material can be ommited
  1086. by those who are interested in serious descriptions of the hardware form
  1087. of the VGA controller chip, and the software interface available providing
  1088. control using the host machine.
  1089.  
  1090. Students of computation may find the discussion of interst, since it draws a
  1091. parallel between the general basis for computation and the generic hardware
  1092. manipulation facilities provided within the VGA controller chip.  In this
  1093. way, the VGA controller chip can be seen as a specialised processor adapted
  1094. for the specific operations required for image transformation and transport.
  1095.  
  1096. Specifically, some VGA controller image manipulation primitives can be seen
  1097. to have the control element of the image computation provided explicitly by
  1098. the host processor.  This partitioning of the control leads to a flexibility
  1099. which would not otherwise exist, and can be interpreted as a natural extension
  1100. of the classical architecture of a general purpose digital computer system.
  1101. To employ the Intel nomenclature, the VGA controller chip can under practical
  1102. conditions be viewed as a very specialised (so therefore complex) co-processor
  1103. device.
  1104.  
  1105.  
  1106.  
  1107.  
  1108. 1.s   Summary
  1109. ===   =======
  1110.  
  1111.  
  1112. This document is concerned with high performance programming for the video
  1113. graphics array controller Trident 8900, equipped with 1 megabyte of memory.
  1114.  
  1115. The emphasis is on programming for high performance image manipulation and
  1116. presentation, principally using assembly language without use of a video bios.
  1117.  
  1118. A guide to the relevant chapters is given for those with various backgrounds,
  1119. motivations and interests.
  1120.  
  1121.  
  1122.  
  1123.  
  1124. 2.    Orientation - the computer system
  1125. ==    =================================
  1126.  
  1127.  
  1128. 2.01  A computer system structure
  1129. ====  ===========================
  1130.  
  1131.  
  1132. A computer system is a collection of many different component parts.  Some of
  1133. these are fixed and invariant in structure, whilst others are only partially
  1134. fixed in structure so may in practise have a variable structure.
  1135.  
  1136. We usually think of these two distinct properties as belonging to the hardware
  1137. components and software components, respectively, of a computer system.  These
  1138. two types of components make up an entire computer system, which consists only
  1139. of hardware components and software components.
  1140.  
  1141. The hardware components of a computer system represent the finite fixed means
  1142. available to enact a computation described in precise detail by the software
  1143. components of that computer system.
  1144.  
  1145. The software components of a computer system determine every detail of the
  1146. computation of that system, by means of a moment by moment selection of the
  1147. actual hardware capabilities brought into play, from the entire set of possible
  1148. capabilities available.  We talk about the entire collection of software
  1149. components associated with a computer system as the program for that computer
  1150. system.  Therefore a program is a complete collection of software components,
  1151. sufficient to fully direct the hardware which makes up a computer system.
  1152.  
  1153.  
  1154.  
  1155.  
  1156. 2.02  Hardware of a computer system
  1157. ====  =============================
  1158.  
  1159.  
  1160. The physical reality of the computer system hardware appears as a number of
  1161. fundamental units, interconnected with each other, but each of which is needed
  1162. in any general purpose digital computer system.  {We distinguish this class of
  1163. computer system in particular, since there are other classes of computer system
  1164. with which we will not concern ourselves.}  These units are as follows:
  1165.  
  1166.   1.  Input unit
  1167.   2.  Processing unit
  1168.   3.  Memory unit
  1169.   4.  Control unit
  1170.   5.  Output unit
  1171.  
  1172. Each of these units is physically constructed from a mix of components which
  1173. could be classed as mechanical, electro-mechanical, electro-optical or
  1174. electronic.  Other technologies may be used, but it is essential to understand
  1175. that the technology implementing hardware capability is not in itself crucial;
  1176. rather, it is the information processing capabilities provided by the hardware
  1177. units themselves which is important.
  1178.  
  1179. In some cases, only one class of component is used in the construction of a
  1180. particular type of unit.  For example, an input unit might use mechanical,
  1181. electro-mechanical and electronic components in its realisation.  This would
  1182. contrast with a processing unit which might use only electronic components in
  1183. its construction.  The construction is not as important as the fixed set of
  1184. capabilities supported by each unit, expressed in terms of information transfer
  1185. and modification abilities of a particular unit, as noted above.
  1186.  
  1187.  
  1188.  
  1189.  
  1190. 2.03  Hardware: the input unit
  1191. ====  ========================
  1192.  
  1193.  
  1194. The input unit has the fixed capability to obtain information from somewhere
  1195. outside the computer system and deliver it into the computer system in a timely
  1196. manner.  This is the only purpose for which the input unit is used.
  1197.  
  1198. The somewhere outside is usually referred to as the external environment within
  1199. which the computer system operates.
  1200.  
  1201.  
  1202.  
  1203.  
  1204. 2.04  Hardware: the processing unit
  1205. ====  =============================
  1206.  
  1207.  
  1208. The processing unit has a set of fixed capabilities for processing information,
  1209. that is, for changing information in a controlled manner.  Some of the ways in
  1210. which information may be changed are given below:
  1211.  
  1212.   1.  Reduction of information.
  1213.  
  1214.       This corresponds to removal of some of the information content of
  1215.       data, thereby classifying data into a set of predetermined groups.
  1216.  
  1217.       When one knows the classification of a data item, it is not then
  1218.       possible to say with certainty what exact data derived that class,
  1219.       since information loss has occured.  Therefore information loss is
  1220.       associated with a one way process which cannot then be reversed to
  1221.       obtain the original data.
  1222.  
  1223.   2.  Transformation of information.
  1224.  
  1225.       This does not change the information content of data, but merely
  1226.       changes the representation of that data, to make it suitable for
  1227.       use within a particular computational environment.
  1228.  
  1229.       It is in principle possible to reverse the transformation of data
  1230.       such that the transformed data could give rise to the original
  1231.       data, assuming sufficient computational resources are available to
  1232.       effect the inverse transformation.  {In fact, there may be reasons
  1233.       why the inverse transformation does not exist in practise, although
  1234.       this does not of itself deny the principle.}
  1235.  
  1236.   3.  Comparison of information.
  1237.  
  1238.       This actually creates information based upon the representation of
  1239.       existing information.  This newly created information is available
  1240.       for further processing just as any other information would be.
  1241.  
  1242.       By changing the representation of data, the result of comparing two
  1243.       data items can change.  The data representation is what determines
  1244.       the comparison result, not the information content of the data.
  1245.  
  1246. These are the only ways available for processing information, so all possible
  1247. computations are built up from these types of information manipulation.
  1248.  
  1249.  
  1250.  
  1251.  
  1252. 2.05  Hardware: the memory unit
  1253. ====  =========================
  1254.  
  1255.  
  1256. The memory unit has the fixed capability of accepting information at one moment
  1257. in time, and delivering that information at a later moment in time without any
  1258. change having occured to that information in the intervening time.  The amount
  1259. of time which passes between the presentation of information to the memory unit
  1260. and the later recovery of that unaltered information is not important for the
  1261. operation of the memory.  In that sense it is completely time independant.
  1262.  
  1263.  
  1264.  
  1265.  
  1266. 2.06  Hardware: the control unit
  1267. ====  ==========================
  1268.  
  1269.  
  1270. The control unit mediates between the instructions which comprise a program and
  1271. the operation of all the hardware units which comprise the computer hardware.
  1272. The control unit manages and directs all flows of information within the entire
  1273. computer system.  No computation can proceed without the involvement of the
  1274. control unit, which initiates input information flows, directs the output of
  1275. information, determines the processing of information and the presentation to
  1276. and recovery from memory of information.
  1277.  
  1278.  
  1279.  
  1280.  
  1281. 2.07  Hardware: the output unit
  1282. ====  =========================
  1283.  
  1284.  
  1285. The output unit is equipped with fixed capability to accept information from
  1286. within the computer system and present that information in timely manner to
  1287. somewhere outside the computer system.  This destination is referred to as the
  1288. external environment, which is also the source of input information, as noted
  1289. above.
  1290.  
  1291.  
  1292.  
  1293.  
  1294. 2.08  Hardware: the external environment
  1295. ====  ==================================
  1296.  
  1297.  
  1298. This means that a computer system takes its input from, and delivers output to,
  1299. its external environment.  In this view of things, the computer system itself
  1300. is completely separate from the external environment which contains information
  1301. to process and which in turn accepts processed information.  This observation
  1302. is important, since it is essential that the computer system be able to act in
  1303. a manner completely independant of the information environment with which it is
  1304. associated.  It is only when this is true that a program can be seen to be the
  1305. sole determinant of the activities of a computer system.
  1306.  
  1307.  
  1308.  
  1309.  
  1310. 2.09  Hardware: control by program
  1311. ====  ============================
  1312.  
  1313.  
  1314. All these activities are controlled by the program which controls the operation
  1315. of the control unit and thence the operation of the entire computer system.  So
  1316. the hardware component of the computer system represented by the control unit
  1317. is the fixed means by which the entire computer system fixed capabilities are
  1318. organised and controlled, but the moment by moment operation of this unit is in
  1319. turn controlled through the statements which comprise the program controlling
  1320. the computer system.  This program comprises the full collection of individual
  1321. software components which together with the hardware components make up the
  1322. complete computer system, thereby determining its entire behaviour.
  1323.  
  1324.  
  1325.  
  1326.  
  1327. 2.s   Summary
  1328. ===   =======
  1329.  
  1330.  
  1331. The structure of a computer system is described in terms of components which
  1332. appear as hardware and software.  The nature of the hardware components and
  1333. their function is examined.  In particular, the types of information processes
  1334. available to an information processing unit are discussed.  The program as the
  1335. ultimate arbiter of computer system operational control is seen as a collection
  1336. of all the software components of a computer system.
  1337.  
  1338.  
  1339.  
  1340.  
  1341. 3.    Modelling using a computer system
  1342. ==    =================================
  1343.  
  1344.  
  1345. 3.01  Computer system operation
  1346. ====  =========================
  1347.  
  1348.  
  1349. We have seen that a computer system comprises hardware units with fixed sets
  1350. of capabilities which interact under the direction of the control unit.  This
  1351. control unit is itself controlled by the software components which when taken
  1352. together comprise a program.
  1353.  
  1354. So now we know what a computer system comprises.  This does not directly help
  1355. to answer the question concerning what it is a computer system does.  Once we
  1356. know what a computer system does, we will understand the motivation for being
  1357. interested in a computer system.  This question is what we will now look at.
  1358.  
  1359.  
  1360.  
  1361.  
  1362. 3.02  The original computer
  1363. ====  =====================
  1364.  
  1365. We can look back in time to the days prior to the existence of electronic
  1366. computers, when the english language held that a computer was a person who by 
  1367. dint of intelligence, knowledge and insight, performed calculations of interest
  1368. using just paper and pen.
  1369.  
  1370. This is the sort of activity we engage in when we ask how much we have spent
  1371. on the basket of shopping we have just bought.  But we can also ask questions
  1372. about the future, such as how much would it cost to buy all the food necessary
  1373. to entertain a group of friends each of whom has a different taste from each of
  1374. the others.
  1375.  
  1376. If we decide that the proposed evening would be too expensive, we can then ask
  1377. what would be the most economical way of entertaining half our friends, knowing
  1378. the range of meals which each would find acceptable.  This might involve making
  1379. a decision regarding who should attend, followed by a decision as to what each
  1380. guest should be given to eat.
  1381.  
  1382. Of course, this latter problem would quickly prove impractical to solve if we
  1383. had a large number of friends, each of who delighted in a wide range of special
  1384. dishes from around the world.  This introduces the notion of the tractability
  1385. of solving a particular problem, given the context of a particular method for
  1386. solving that problem.
  1387.  
  1388.  
  1389.  
  1390.  
  1391. 3.03  Computation as modelling
  1392. ====  ========================
  1393.  
  1394.  
  1395. All of these activities are completely characterised by the posing of some kind
  1396. of question and the discovery of an appropriate answer.  The connection between
  1397. the question and the answer is known as a model.  The model provides all the
  1398. information required in order to specify the context in which the question is
  1399. framed, and within which the answer must be interpreted.  Naturally then, if
  1400. the model changes, then so too will the associated questions and their answers.
  1401.  
  1402. The person whos job was that of computer was required to solve problems given
  1403. as questions, by providing answers given numerically.  This meant that usually
  1404. the problems posed were of a numerical nature, requiring for their solution
  1405. the application of numerical formulae.  These formulae and the knowledge needed
  1406. to manipulate them were provided by the computer as a skilled worker.
  1407.  
  1408. In some other situations, there was no directly applicable numerical model for
  1409. solving a problem.  This was so when deciding upon the invitations for half our
  1410. friends to an evening meal.  In this case, a structural model is required, and
  1411. this model must be developed by the expert computer, before being applied to
  1412. the solution of the given problem.
  1413.  
  1414.  
  1415.  
  1416.  
  1417. 3.04  The essentials of computation
  1418. ====  =============================
  1419.  
  1420.  
  1421. It is in principle, possible to look in detail at all the activities of such a
  1422. skilled computer, in order to discover the simplest steps taken during the
  1423. solution of any problem.  If this is done, it turns out that there are a very
  1424. small number of simplest such steps, which suffice for the solution of any
  1425. problem whatsoever, providing that the problem is indeed soluable.  {There are
  1426. some problems which appear to be insoluable by any currently known methods, but
  1427. this should not concern us since most of these types of problems are not too
  1428. relevant from a practical point of view.}
  1429.  
  1430. Realising this, we could then conjecture that we could build a machine in some
  1431. appropriate technology, capable of realising each one of these simplest steps.
  1432. The exact sequence of simplest steps actually used to solve any given problem,
  1433. could then be written out as a sequence of instructions, in a form suitable for
  1434. controlling the machine we have just defined.
  1435.  
  1436. If this is done, we can then recognise all the elements of a computer system.
  1437.  
  1438.  
  1439.  
  1440.  
  1441. 3.05  Problem solving through model building
  1442. ====  ======================================
  1443.  
  1444.  
  1445. It is now possible to see why a computer system is interesting and useful.  We
  1446. can solve any soluable problem for which it is possible to express a model by
  1447. applying a computer system to the expression of the problem within that model.
  1448.  
  1449. We usually talk of a program to solve a particular problem, or type of problem
  1450. which occurs frequently in practise.  The use of a program to control the
  1451. operation of a computer system comprises the execution of that program by the
  1452. computer system.  The activity of a computer system while executing a program
  1453. is said to be that of computation.  Computation solves a problem expressed in
  1454. the context of a given model, by supplying a solution to the problem expressed
  1455. in that same context.
  1456.  
  1457. The essential point is that we can represent some aspect of a reality by means
  1458. of an appropriate model, which can then be manipulated by a computer system.
  1459. In this way we can ask questions and obtain answers, without affecting the real
  1460. world reality.  The advantage of this is clear when one considers the actual
  1461. cost of answering some difficult types of question by means of an experiment.
  1462.  
  1463. For example, how many atomic bombs of a cetain size would it take to destroy
  1464. mankind?  Clearly, if we insist on obtaining an answer to this particular type
  1465. of question, we would benefit considerably by using a computer based model.
  1466.  
  1467.  
  1468.  
  1469.  
  1470. 3.06  Types of models
  1471. ====  ===============
  1472.  
  1473.  
  1474. Computation is effectively a modelling process, so we will consider the types
  1475. of modelling with which real world problems may be effectively expressed.  In
  1476. this manner we can conclude that there are really two types of models:
  1477.  
  1478.   1.  Numerical models
  1479.   2.  Structural models
  1480.  
  1481. Numerical models rely completely upon relations between numeric values given
  1482. by formulae which themselves represent the model.  The values describe certain
  1483. attributes which are applicable in the modelled situation.  Given sufficient
  1484. information, it is possible to use numerical methods to obtain values for some
  1485. unknown quantities represented by the model.  In this way, problems which are
  1486. concerned with discovering values for unknown quantites can be solved, given
  1487. that sufficient known quantities are available.
  1488.  
  1489. Structural models represent collections of attributes which cluster in groups
  1490. known as objects.  The structural composition of any given object may vary in
  1491. permitted ways which are themselves characteristic of the type of object.  That
  1492. is, the structure of an object may not be necessarily fixed.  An object belongs
  1493. to a class of objects, which represents a collection of object types each of
  1494. which possesses common characteristics. This enables objects to represent those
  1495. situations where the morphology is either unknown in advance or is determined
  1496. dynamically on a moment by moment basis.
  1497.  
  1498. In general, a structural model will employ embedded within it, many numerical
  1499. models, each for use in connection with particular situations or circumstances
  1500. arising in the model itself, or in connection with manipulation of the model.
  1501. For this reason, it is normally the case that structural models tend to be more
  1502. complex than numerical models, because they are usually larger than numerical
  1503. models.  However, special types of numerical models do occur which are very
  1504. complex indeed.  {Linear programming equations for optimising the output from
  1505. an oil refinary give just one example of such a case.}
  1506.  
  1507.  
  1508.  
  1509.  
  1510. 3.07  Objects and structural models
  1511. ====  =============================
  1512.  
  1513.  
  1514. Objects may theselves be composed of other objects, with variable structure, so
  1515. in principle, any structure can be modelled by means of a hierarchy of various
  1516. component objects of arbitrary complexity.  There is no restriction regarding
  1517. the use of network structures as objects, so strictly hierarchial arrangements
  1518. of objects may be used or ignored according to the modelling requirement.  This
  1519. provides complete modelling freedom.
  1520.  
  1521. The types of questions which we might ask in connection with structural models
  1522. are generally concerned with forming collections of objects so that some given
  1523. attribute is minimised or maximised over the group.  This type of question can
  1524. provide the answers to questions concerned with finding minimal cost routes for
  1525. travelling between a collection of cities, or the cheapest or perhaps most time
  1526. efficient synthesis route for a molecule, given certain precursor stock.
  1527.  
  1528. Notice that although we have identified that an object is just a collection of
  1529. attributes, we have not identified what we might mean by attribute.  Similarly
  1530. we have associated values with attributes, but have not considered what a value
  1531. might be, or what it might represent.
  1532.  
  1533.  
  1534.  
  1535.  
  1536. 3.08  Attributes, values and value spaces
  1537. ====  ===================================
  1538.  
  1539.  
  1540. An attribute is nothing more than the expression of one particular possibility
  1541. from a collection of such possibilities.  An attribute takes on a value, and
  1542. that value has the potential to change from moment to moment.  {Of course, for
  1543. a given model, an attribute may take a single constant value.}  In this way, an
  1544. attribute is associated with a set of potential values, which does not change
  1545. during the passage of time.  The values associated with an attribute determine
  1546. the type of the attribute, that is, the nature of the information imparted by,
  1547. or associated with the attribute.
  1548.  
  1549. An attribute will take on a single value at any particular moment.  We speak of
  1550. a single value chosen from a value space.  A value space is simply the complete
  1551. collection of all possible values of a related type.  Here related type implies
  1552. that all the values play an identical role in any model of which they may be a
  1553. part.
  1554.  
  1555. The association of an attribute with a value represents the minimum expression
  1556. of information possible.  Although a value represents minimal information, it
  1557. is usually the case that the value space containing that value possesses some
  1558. internal structure which permits more information to be associated with the
  1559. value than might at first appear possible.
  1560.  
  1561. Typically this will be so where other values within the same value space are
  1562. combined by means of information processing steps, such that new models result
  1563. which represent different interpretations of the original model.  The values
  1564. which are combined in this way may be attributes of objects, or purely numeric
  1565. quantities associated with numerical models.
  1566.  
  1567. In fact, for processing of values to take place at all, certain properties must
  1568. exist in the underlying value space.  {In general, very weak properties in the
  1569. value space are adequate to support computation.  However, in any practical
  1570. computation scheme, stronger properties are needed which have a significant
  1571. effect on the richness of available algorithms to solve any particular problem.
  1572. This richness manifests itself as a change from algorithmic intractability to
  1573. eminently practical algorithms, as the properties of the value space increase
  1574. in strength.}
  1575.  
  1576.  
  1577.  
  1578.  
  1579. 3.09  Some properties of value spaces
  1580. ====  ===============================
  1581.  
  1582.  
  1583. In any type of modelling scheme, certain underlying properties of the various
  1584. value spaces present are employed so frequently that they become indispensible
  1585. to any practical modelling construction.  These properties are identical to the
  1586. properties of some axiomatic number systems studied by mathematicians.  Some of
  1587. the more important properties for computational modelling are included below:
  1588.  
  1589.   1.  An attribute takes a single value from a finite set of similar values
  1590.       known as a value space for the particular attribute type.
  1591.  
  1592.   2.  There is a way of assessing the similarity or difference of any values
  1593.       from the same set of possible values.  This provides for the relations
  1594.       equal_to, not_equal_to, between any attributes of similar type.
  1595.  
  1596.   3.  There may be an ordering specified for the set of possible values.  In
  1597.       this case, it is possible to assess the similarity or difference of any
  1598.       values from the set, in terms of the relations less_than, greater_than,
  1599.       equal_to, not_equal_to.  It is also possible to arrange any group of
  1600.       values according to their position within the specified ordering.  It
  1601.       may be that there exists more than one possible ordering over any given
  1602.       value space.
  1603.  
  1604.   4.  Given two values from the same set of possible values, there is a way
  1605.       of describing their difference, which is a measure of how distant they
  1606.       are from each other assuming a special ordering of the value space made
  1607.       available for this particular purpose.  One difference can be produced
  1608.       for every pair of values in the value space.
  1609.  
  1610.   5.  A difference can potentially be either a signed difference or an unsigned
  1611.       difference.  A signed difference indicates a direction, and a magnitude,
  1612.       whereas an unsigned difference has a magnitude only.  Some value spaces
  1613.       do not have a signed difference defined for them.
  1614.  
  1615.   6.  The difference between two values from the value space is itself a value
  1616.       either of the same value space, or of another value space made available
  1617.       for the particular purpose of expressing differences.
  1618.  
  1619.   7.  Every value in a value space is associated with an ordinal number, which
  1620.       gives the position in the value space at which the value occurs, assuming
  1621.       the value space to be ordered according to an ordering made available for
  1622.       just this purpose.
  1623.  
  1624.   8.  Every value space is finite, and there is a value space which provides
  1625.       values capable of describing the size of all other value spaces.  There
  1626.       is a natural ordering specified for this size descriptive value space.
  1627.  
  1628.   9.  There is a value space which contains all other value spaces, over which
  1629.       a natural ordering is defined.  This natural ordering defines the natural
  1630.       ordering for every contained value space.
  1631.  
  1632. There are many other properties which may be required in the practical solution
  1633. of computational models, but these properties give the essential features of a
  1634. value space necessary to support useful modelling.  The essential point to see
  1635. is that values can be thought of as being associated with a continuum which
  1636. supports the notions of closeness and distance.  These notions are vital for
  1637. the construction of computational models as we will soon appreciate.
  1638.  
  1639.  
  1640.  
  1641.  
  1642. 3.10  Simple values, collected values
  1643. ====  ===============================
  1644.  
  1645.  
  1646. A computational model consists of a collection of attributes, each of which
  1647. associates with a single value at any given moment.  Attributes may collect
  1648. together as objects.  In turn, objects may be associated with other objects.
  1649.  
  1650. This provides the ability to model collections of real world objects each of
  1651. which has relations with other real world objects.  For the real world object,
  1652. there will typically be a set of characteristics which describe that object.
  1653.  
  1654. Each of the charateristics can usefully be modelled by an attribute of a type
  1655. appropriate to the values associated with that particular characteristic.  As
  1656. an example, consider a model of a real world gas pipeline.  The properties of
  1657. interest might be as follows:
  1658.  
  1659.   1.    [m]    Physical dimensions.
  1660.   2.    [s]    Maximum service pressure.
  1661.   3.    [m]    Chemical compatibility.
  1662.   4.    [m]    Maximum flow rate data.
  1663.   5.    [m]    Pressure drop / flow rate characteristics.
  1664.   6.    [s]    Coefficient of expansion of a pipe segment.
  1665.   7.    [m]    Optimum economic pressure drop.
  1666.   8.    [s]    Date of commissioning.
  1667.   9.    [s]    Major inspection interval.
  1668.   10.   [m]    Results of previous inspections.
  1669.   11.   [m]    Welding inspection certificate reference numbers.
  1670.  
  1671. These values are either simple values or a collection of a number of values.
  1672. For an example of simple values see (2,6,8,9) above.  The remaining attributes
  1673. collect together as multi-attributed objects which each describe what is in
  1674. effect, a single value of complex internal structure.
  1675.  
  1676. We can see that for models of practical interest, there must be a means for
  1677. collecting individual values together to represent multivalued aspects of the
  1678. modelled reality.  In similar fashion, it must be possible to collect together
  1679. objects into groups, which may collectively appear to behave as an object with
  1680. complex internal structure.
  1681.  
  1682. We have not yet considered how the representation of collections of attributes
  1683. might be possible in a computational setting.  To do this, we must consider an
  1684. aspect of computational modelling which we have so far ignored.
  1685.  
  1686. Until now, we have considered that processes are available for the manipulation
  1687. of information.  However, apart from suggesting that information is ultimately
  1688. represented as simple values selected from an appropriate value space, we have
  1689. not considered exactly how that information might be held in a computer system.
  1690.  
  1691.  
  1692.  
  1693.  
  1694. 3.11  Models with memory
  1695. ====  ==================
  1696.  
  1697.  
  1698. All models consist of constant components which never change in value, together
  1699. with variable components which do change in value, without which no model could
  1700. be used to support computational problem solving.  The fact that some values
  1701. always remain constant leads to the question of how it might be possible to
  1702. model constancy.  In fact we can conveniently manage this by means of the piece
  1703. of hardware described above as a memory unit.  A memory unit can store a value
  1704. without that value changing, no matter how much time has elapsed before the
  1705. request to retrieve the value is given.  Furthermore, no matter how many times
  1706. the value is retrieved, it does not change.  For this reason, a memory unit is
  1707. vitally important in any computational modelling activity.
  1708.  
  1709. Similarly, by using the properties of a memory unit in an appropriate manner,
  1710. we can make the memory preserve the value of attributes which themselves make
  1711. association with different values from moment to moment during the modelling
  1712. activity.  To see how this can be made to work, we must look in detail at the
  1713. manner in which a memory unit operates.
  1714.  
  1715.  
  1716.  
  1717.  
  1718. 3.12  The memory store operation
  1719. ====  ==========================
  1720.  
  1721.  
  1722. In order to get a memory unit to store a particular value, it is necessary to
  1723. provide a special value known as an address, which will be used by the memory
  1724. to give a unique identity to the value actually being stored.  So to store a
  1725. value, we first choose an address from the value space of addresses, then give
  1726. the memory an instruction to associate the address with the value to be stored.
  1727. The operation engaged in by the memory, in order to form this association, is
  1728. termed a store operation.  The instruction which causes the operation to be
  1729. carried out is termed a store instruction.
  1730.  
  1731. The association between an address value and the stored value during a store
  1732. operation is maintained for all time, until changed.  But before we consider
  1733. how such an association might be changed, we will see how a value stored by a
  1734. memory may be retrieved for further use outside the memory.
  1735.  
  1736.  
  1737.  
  1738.  
  1739. 3.13  The memory load operation
  1740. ====  =========================
  1741.  
  1742.  
  1743. A memory unit responds to two types of instruction.  We have seen above how the
  1744. store instruction can change the way an association is remembered by the memory
  1745. unit.  There is another instruction which is termed a load instruction.  This
  1746. results in the memory performing a load operation.  For a load operation to be
  1747. operate successfully, the memory unit must be presented with an address value
  1748. which must have been given at the time a store operation was made.  Given that
  1749. a store did actually take place using that address, the memory unit retrieves
  1750. the value.
  1751.  
  1752. This may not sound very useful, since it would appear that, in order to access
  1753. any stored information from a memory unit, a unique value must be associated
  1754. with every number stored.  In this way, it would seem that we would then have
  1755. to somehow remember the same number of address values as the number of values
  1756. stored in the memory.  This is of course a totally impractical situation.  We
  1757. will see shortly how a memory unit may be usefully employed without having to
  1758. remember endless quantities of address values.
  1759.  
  1760. We have seen how a store instruction provides the address and value association
  1761. which can then later be used to retrieve the value given the address.  We have
  1762. not seen how we might change an existing address and value association, so that
  1763. a model may be made of a value which changes from moment to moment during the
  1764. modelling process.
  1765.  
  1766.  
  1767.  
  1768.  
  1769. 3.14  Modelling constants, variables
  1770. ====  ==============================
  1771.  
  1772.  
  1773. If we fail to ever make an association between an address and a value, using a
  1774. store instruction, any load operation conducted using that address will return
  1775. a value whose nature is unpredictable.  A value is returned, but it will be of
  1776. a random nature.  If we perform a store operation, then retrieve the value by
  1777. using the same address in a load operation, the original stored value will be
  1778. returned.  If however, we perform two consecutive store operations to the same
  1779. address, using different values on each occasion, then perform a load using the
  1780. same address, the value returned will be the latest value stored.
  1781.  
  1782. In this way, a memory can be made to keep a value for as long as required, then
  1783. change it by means of a new store operation using the appropriate address.  In
  1784. this way, a memory unit can be made to model constancy and change.  The store
  1785. operation determines whether a load operation at a given address will retrieve
  1786. a constant value, or a variable value.  If only one store operation is made to
  1787. an address, then the value stored will always have the same value, so will be
  1788. constant.  Otherwise, the values stored to an address may be different from one
  1789. another, so any associated load operations will retrieve the changed value on
  1790. each occasion.
  1791.  
  1792.  
  1793.  
  1794.  
  1795. 3.15  The problem of addresses
  1796. ====  ========================
  1797.  
  1798.  
  1799. We noticed above that a memory unit would not be very practical if for each of
  1800. the stored values, it would be required to keep a note somewhere of the address
  1801. by means of which it might be retrieved.  We will now see why this difficulty
  1802. does not occur in practise.
  1803.  
  1804. A model is not something which remains static.  It is used to solve problems,
  1805. using computational activity to achieve a series of transformations of models
  1806. until a solution can be found.  The development of new interpretations of the
  1807. already available models is necessary to provide the information which will
  1808. ultimately solve the problem being addressed.
  1809.  
  1810. Implicit in all this is a set of instructions which dictate exactly how this
  1811. process of model refinement will take place.  These instructions can contain
  1812. constant values of direct or indirect use to the model.  An indirect use for
  1813. a constant value would be that of a memory address.  In this way, the question
  1814. of remembering addresses diminishes, since they can be included in the program
  1815. so long as they are constant in value.
  1816.  
  1817. In fact, we will not generally need the same number of address values as values
  1818. stored in a memory unit for other reasons which will soon become clear.  The
  1819. nature of information and therefore also of models, is that of natural grouping
  1820. into connected entities which we term objects.  Therefore, for any particular
  1821. aspect of a model, various values which are associated together, may easily be
  1822. stored close by each other in memory.  For this to work, we must have a notion
  1823. of closeness of two values.  Since an address is a value similar to any other
  1824. value, we will have the idea of closeness defined between two addresses.
  1825.  
  1826. In this way, we can choose a special address value representative of the close
  1827. grouping of addresses belonging to an associated group of values in memory.
  1828.  
  1829. This special address will be only a small distance away from any address values
  1830. assigned to values in the group.  Therefore we can apply a shorthand method of
  1831. accessing any of these related values.  This involves adding a small value to
  1832. the special address value, to yield the actual address in memory for any needed
  1833. value group member.  The special address value is generally known as a base
  1834. address, whilst the small value added to the base address is termed an offset.
  1835.  
  1836.  
  1837.  
  1838.  
  1839. 3.16  Structures expressed by means of values
  1840. ====  =======================================
  1841.  
  1842.  
  1843. We have seen that a memory is a vital component of any computational modelling
  1844. scheme, and that the representation of collections of values within a memory is
  1845. entirely natural.  We will now think about the way in which object collections
  1846. may be arranged into a grouping.
  1847.  
  1848. Any collection of values in memory will have a characteristic base address.  By
  1849. recognising that a base address is really just a value, it can be stored in a
  1850. memory just like any other value.  It is this possibility which permits groups
  1851. of objects to be formed with ease.  To form a group of objects, take the base
  1852. address of each individual component object, then store all the base addresses
  1853. as a collection of values making up a new compound object.  Given the base
  1854. address of the compound object, it becomes possible to access any value in any
  1855. of the member objects by means of judicious application of the relevant offset
  1856. values.
  1857.  
  1858. An important point to consider is that the number of objects sharing a given
  1859. internal structure (and thus set of associated characteristic offset values) is
  1860. usually large in a model of any complexity.  In this way, memory access using a
  1861. large base address value with a small offset value for each group member gives
  1862. a very compact representation for the final address of each value.  Since the
  1863. base addresses and offsets are stored with the instructions representing the
  1864. program, the program size is reduced as a consequence.
  1865.  
  1866.  
  1867.  
  1868.  
  1869. 3.17  The program as a model
  1870. ====  ======================
  1871.  
  1872.  
  1873. It should be clear by now that a program consists of instructions, and these
  1874. instructions may be closely associated in some way with constant values which
  1875. may be used in various ways.  One use for these values is as part of the model
  1876. which is being presented for solution of a problem.  Another, frequent use for
  1877. these constants is as representation of the base addresses and offset values
  1878. for accessing memory in order to retrieve constants and variable values which
  1879. represent the model proper.
  1880.  
  1881. Although we have not yet considered what may actually be necessary in order to
  1882. construct a program of instructions for solving a problem, we can now determine
  1883. some important properties of any program, no matter what the representation.
  1884.  
  1885. It should be clear that, whatever else a program is, it can only ultimately be
  1886. represented as a set of objects, each with any required internal structure, all
  1887. these objects being ultimately represented by a collection of single values.
  1888.  
  1889. This means that for any purposes, we can treat a program as an entity which can
  1890. itself be modelled in the same way that we build models of the real world.  The
  1891. reason that this is so important is that it enables a program to be stored in
  1892. the same type of memory unit that we use to store model values.  This means a
  1893. potential to build programs which take other programs as their data, using them
  1894. as models which can then be manipulated into forms and interpretations more
  1895. appropriate for solving certain proglems.  As an example of this type of model
  1896. manipulation, where the model is really a program, consider the translator for
  1897. a programming language.
  1898.  
  1899.  
  1900.  
  1901.  
  1902. 3.18  The simplest operations for computation
  1903. ====  =======================================
  1904.  
  1905.  
  1906. We will now look in some detail at the types of simplest operations necessary
  1907. to support meaningful computation.  These operations will have the capability
  1908. to process information by manipulating the basic information representations
  1909. that we use for modelling.
  1910.  
  1911. Using these manipulations, it is possible to make new interpretations of any
  1912. particular model, or indeed any particular aspect of a given model.  The new
  1913. interpretations are themselves models, but with a different information content
  1914. which may be either more specialised or more generalised than the source model
  1915. information.  In any event, it will be easier to obtain the answers to certain
  1916. questions when using the new model as compared with the original model.  This
  1917. fact provides the motivation for the creation and derivation of new models from
  1918. existing, but somehow deficient models, assuming a particular purpose has been
  1919. specified.
  1920.  
  1921. It is necessary to provide a model with new values from outside the model.  The
  1922. need for this is satisfied by an instruction which performs an input operation,
  1923. using the input unit described above.
  1924.  
  1925. In similar manner, an output instruction is made available, so that the output
  1926. unit may be commanded to deliver a new value to the computational environment.
  1927.  
  1928. We have already considered that store and load instructions are needed in order
  1929. to provide the memory unit with a means to function.
  1930.  
  1931. The processing of data requires a number of different instructions.  It must be
  1932. possible to introduce a new constant value into a computation.  Any given value
  1933. lies next to two nearest neighbouring values in the value space of which it is
  1934. a member.  Each of these nearest values must be easily and directly computable,
  1935. so that the notion of closeness may be directly used in modelling.  This can be
  1936. particularly important for the programmed manipulation of addresses, and in any
  1937. situation where counting is needed.  It should be possible to determine the
  1938. distance between two values; given a value and a difference, the value giving
  1939. the difference should be obtainable.  These operations correspond with addition
  1940. and subtraction.
  1941.  
  1942. Finally, it should be possible to control the proress of the computation.  This
  1943. means being able to take decisions dependant upon the values present from time
  1944. to time in the model.  In this way, the immediate progress of a computation may
  1945. be conditional upon situations detected in earlier parts of the computation.
  1946.  
  1947.  
  1948.  
  1949.  
  1950. 3.s   Summary
  1951. ===   =======
  1952.  
  1953.  
  1954. We have examined the operation of a computer system in order to find out what
  1955. it is that a computer actually does.  We have seen that computation can most
  1956. usefully be thought of as a modelling activity.  The motivation for modelling
  1957. is always as a means by which solutions can be found for what would otherwise
  1958. be difficult or impossible problems.
  1959.  
  1960. We have seen that there are essentially two types of models, and that the first
  1961. type is usually implicitly present in the second.  We have examined attributes
  1962. and their values, and means for combining attributes together to form objects.
  1963.  
  1964. The properties of values and their associated value spaces were described.  The
  1965. importance of the underlying structure of a value space was emphasised since it
  1966. is fundamentally important for supporting computation.
  1967.  
  1968. Memory units are seen to be the essential modelling vehicle for permitting the
  1969. simple expression of both constants and variables.  The concept of an address
  1970. value was introduced, with the consequent implications for representation of
  1971. programs and the modelling of objects.
  1972.  
  1973. We have seen that a program is itself a real world reality which may therefore
  1974. be modelled.  The resulting interesting properties of programs were described.
  1975.  
  1976. Finally, we examined the types of instruction which might be important for the
  1977. exppression of a program.  This concludes our overview of computation.
  1978.  
  1979.  
  1980.  
  1981.  
  1982. 4.    Visual modelling
  1983. ==    ================
  1984.  
  1985.  
  1986. 4.01  Complexity control and abstraction
  1987. ====  ==================================
  1988.  
  1989.  
  1990. In any modelling activity, there will be layers of structures built one upon
  1991. the next.  This is an important feature of modelling, since it implies that
  1992. certain details associated with a given object will be hidden from view as a
  1993. consequence of their presence within component objects of that object.  This
  1994. has the pleasant effect of enabling the component object properties to be
  1995. assumed present by abstraction, at the level of the given object.  In this way,
  1996. a complex model may be built up by combining simple component objects, or could
  1997. equally easily be built from the top down by assuming abstract properties for
  1998. needed components.
  1999.  
  2000. This proliferation of complexity within useful models does present certain
  2001. problems.  For example, there may be many possible ways of interpreting any
  2002. particular properties of a model.  This means that the ways we look at the
  2003. models we create must be flexible enough to accomodate the essential whilst
  2004. ommitting all unimportant detail.
  2005.  
  2006. Historically, when dealing with purely numeric models involving formulae which
  2007. relate different variable values together, it has been very useful for the good
  2008. understanding of such a model, to present graphs showing how under some assumed
  2009. constraints, two or more variables change with respect to each other.
  2010.  
  2011. It is easy to see that by visual means, a complex situation can be described
  2012. satisfactorily in terms of a two dimensional graph.  Sometimes, where an extra
  2013. dimension of change is involved, for example time, a sequence of graphs may be
  2014. the ideal representation.  Electronic engineers have embodied these principles
  2015. in devices such as the oscilloscope and logic analyser.
  2016.  
  2017.  
  2018.  
  2019.  
  2020. 4.02  Human interaction with a computer system
  2021. ====  ========================================
  2022.  
  2023.  
  2024. There are some special types of modelling situation where a drawing may include
  2025. multiple layers, each of which correspond to a level of design abstraction.  As
  2026. an example of this type of modelling system, one can consider the hierarchical
  2027. design systems with which silicon integrated circuits are designed.  In these
  2028. types of systems, much detail must be represented in a physically small screen
  2029. viewing area.  In addition, it must be possible to quickly change the scale at
  2030. which a design is presented, so that fine detail is clearly visible and more
  2031. importantly, manipulable.  This is an example of a direct visual model used to
  2032. represent a device which does not (yet) have any existance in the real world.
  2033.  
  2034. Typically, the user creating a drawing needs to be able to observe the existing
  2035. state of the drawing, and then must be able to select a portion of the drawing
  2036. and manipulate it.  It is necessary to be able to create new detail and to move
  2037. existing detail in the drawing.  For these types of operations which involve a
  2038. very precise spatial input from the user, as observed on the displayed image,
  2039. the mouse input device has proven very useful.  As an alternative to the mouse
  2040. device, a graphics tablet is also a powerful pointing device, with high useful
  2041. resolution and good positional accuracy.  Both these types of pointing device
  2042. provide for great sensitivity in pointing to a drawing feature, and therefore
  2043. enable modifications to be affected with ease.  The graphics tablet has a great
  2044. advantage over the mouse when input from an existing drawing is required.  The
  2045. tablet has excellent positional accuracy and repeatability, so can be readily
  2046. used to digitise an existing drawing into a computer system.  A mouse cannot
  2047. operate in this way, as it is a relative motion device with no capability for
  2048. absolute positional input.
  2049.  
  2050.  
  2051.  
  2052.  
  2053. 4.03  Display quality issues
  2054. ====  ======================
  2055.  
  2056.  
  2057. Usually, where a large amount of relevant detail must be shown on a drawing, it
  2058. it useful to inhibit the display of some detail, only enabling it to appear on
  2059. request.  In this respect, different colours used to highlight the significance
  2060. of important details can be advantageous in reducing any ambiguity in a crowded
  2061. drawing.  The number of possible colours available for display depends upon the
  2062. image generator and the display unit quality.  The image generator may generate
  2063. analogue signals with considerable colour information available, but unless the
  2064. display unit can accept this full colour bandwidth, the display colour palette
  2065. will remain limited.  This may result in some colours appearing to be identical
  2066. with each other, even though they are supposed to be different.
  2067.  
  2068. The ultimate capability of a displayed image is expressed in terms of the pixel
  2069. count in each screen dimension.  This depends on the image generation hardware
  2070. and the display unit.  The highest displayed spatial frequencies are limited by
  2071. the bandwidth of the output signal from the image generator and by the response
  2072. to that signal by the display unit.  In addition, there may be a physical limit
  2073. on image spatial resolution due to a shadow mask associated with the display.
  2074.  
  2075. When a view is changed by expanding the level of detail, or perhaps by changing
  2076. the scale at which it is displayed, it is important that the new image appear
  2077. without undue delay.  This is important to ensure continuity of concentration
  2078. for the person manipulating the design.  There is usually a trade-off between
  2079. the speed of update of an image and the level of detail actually displayed.  If
  2080. there is a great deal of image information, in general, update speeds will not
  2081. be as great as for a lower resolution image display.
  2082.  
  2083. In order to provide a display space which can be readily programmed to provide
  2084. high quality images within a range of different modelling requirements, it is
  2085. very important that the aspect ratio of individual display pixels be either
  2086. exactly 1:1 or very close indeed to this ideal ratio.  If aspect ratios other
  2087. than 1:1 are employed, it can be very difficult to obtain good visual results
  2088. when modelling fine detail, especially where curves must be presented.  In the
  2089. case of a circle, an aspect ratio of 1:2 will produce an effect not unlike that
  2090. of a broad nib fountain pen.  That is, the near vertical portions of the circle
  2091. will appear razor thin, whilst the near horizontals appear thick and blocklike.
  2092.  
  2093. The screen image must be absolutely rock steady, since any instability over a
  2094. prolonged period of time would be absolutely intolerable for someone engaged in
  2095. serious work.  This means that high quality design must be a prerequisite for
  2096. both the image generation hardware and the image display hardware.  In addition
  2097. the production and test procedures employed by the manufacturer have a vital
  2098. role to play in the production of a displayed image which is a pleasure to use.
  2099.  
  2100.  
  2101.  
  2102.  
  2103. 4.04  Context representation
  2104. ====  ======================
  2105.  
  2106.  
  2107. It is usually the case that when a change is contemplated to a visual model, it
  2108. must be considered in terms of at least two distinct views.  Often, it will be
  2109. necessary to consider many more than this number of separate views.  To see why
  2110. this is so, consider the common situation where a connection must be made from
  2111. one point on an image to a second, distinct point.  There are immediately two
  2112. regions of interest within the image.  If the displayed image is an uppermost
  2113. viewing level, then it may be prudent to take an enlargement about each of the
  2114. two points to be connected.  This means there will be three separate views of
  2115. the same image.
  2116.  
  2117. Practical considerations may mean that considerably more views are needed in
  2118. the performance of a particular manipulation.  Normally however, these views
  2119. are not needed concurrently.  As the manipulation proceeds (perhaps connecting
  2120. a line between points at different levels in a design hierarchy) the context
  2121. changes, so a previously necessary view can be relinquished, whilst a new view
  2122. is originated.  In this way, the visual presentation of the design is extremely
  2123. dynamic.  This need for multiple views can have an important impact on the way
  2124. a visual interface is designed to operate.  It must be easy and time efficient
  2125. to create and change multiple views into a design database.  One consequence of
  2126. displaying multiple views is the need to be able to place pairs of views one
  2127. upon another.  That is, it must be possible to choose the portion of one view
  2128. which is for the moment covered by a second view.  The implication is that any
  2129. view must be freely moveable within the display area.  In addition, it must be
  2130. possible to change the overlap order of views so that the obscured portions of
  2131. each view are exactly those parts that are visually unimportant.
  2132.  
  2133.  
  2134.  
  2135.  
  2136. 4.05  Building blocks of a visual modelling scheme
  2137. ====  ============================================
  2138.  
  2139.  
  2140. The building blocks of a visual modelling scheme are separable into two parts,
  2141. the visual context component, and the visual object component.
  2142.  
  2143. Visual context is concerned with the spaces available within a display screen
  2144. for presentation of a visual image which is bound to one aspect of the model
  2145. concerned.  When the visual context is changed, the displayed images change as
  2146. a consequence of overlap or of hiding, but the information which is visible in
  2147. any given context remains unchanged.  Visual context is concerned with the way
  2148. the display area of a screen is arranged so as to provide the maximum amount
  2149. of immediately visible, relevant information.
  2150.  
  2151. Within the display area associated with a given visual context, visual objects
  2152. will be made available for display.  {If any area of a context is not visible,
  2153. this will be as a consequence of the overlap of a number of contexts, with the
  2154. result that some are subjected to partial or complete hiding.}  These objects
  2155. will themselves be of two principle forms.   Geometric shapes comprise the main
  2156. element of visual modelling schemes, with text providing essential additional
  2157. information.
  2158.  
  2159. Geometric elements are provided for all the main families of geometric shape
  2160. which are likely to occur in real world objects.  Such shape families include
  2161. the square, the rectangle, the circle, the ellipse and the triangle.  Lines
  2162. are available for purposes of connecting any two points.
  2163.  
  2164. Text may be provided in various sizes, to suit the hierarchical level at which
  2165. the text associates with a design.  For example, in a silicon chip design, the
  2166. top level functional blocks will often employ large text with which to express
  2167. their names.  Details of interface lines between functional blocks will employ
  2168. a much smaller text, to emphasise the difference in overall importance of these
  2169. component parts.
  2170.  
  2171. In practise, there can be problems of representation for curves in any context
  2172. where an essentially rectilinear coordinate system is used, as is the case for
  2173. raster display systems.  The difficulty arises where line segment gradients
  2174. occur at angles antagonistic to accurate representation in a rectilinear system
  2175. of coordinates.  This happens at shallow angles to each major axis, and at the
  2176. angles which lie about one quarter of a right angle from the major axes.  These
  2177. critical angles result in jagged line segments, which are most disconcerting to
  2178. the eye.  There are means available to reduce problems of this nature, by using
  2179. an anti-aliasing technique.  This technique applies a small modification to the
  2180. displayed image by modifying the luminosity of pixels on or near the line being
  2181. processed.  The result deceives the eye into believing that a smooth gradient
  2182. is actually being displayed.  Under these conditions, the visual interpretation
  2183. becomes very close to the ideal shallow angle line segment.  However, to make
  2184. appropriate image adjustments is an extremely computationally intensive task.
  2185.  
  2186.  
  2187.  
  2188.  
  2189. 4.s   Summary
  2190. ====  =======
  2191.  
  2192.  
  2193. An introduction to visual modelling has been presented, showing the motivation
  2194. and historical background which preceeded computer based imaging systems.
  2195.  
  2196. The visual consequences of modelling with hierarchy are examined with a view to
  2197. understanding the design issues which must be addressed in ensuring that the
  2198. display system is capable of practical use in solving real problems.  Devices
  2199. available for closing the visual feedback loop by providing graphical input are
  2200. examined in terms of their comparative properties.
  2201.  
  2202. Some of the more important technical issues affecting displayed image quality
  2203. are reviewed.  This gives insight into motivations at work during the technical
  2204. design of a real display system.
  2205.  
  2206. The notion of visual context is introduced, with a discussion of the necessary
  2207. supporting manipulations required to enable control of visual context during
  2208. practical interaction with a visual modelling system.
  2209.  
  2210. Finally, the building blocks needed in order to construct a visual modelling
  2211. scheme are examined.  A discussion of some of the difficulties relating to use
  2212. of a rectilinear coordinate system in the representation of curves includes
  2213. mention of a technique for atonement of the problem.
  2214.  
  2215.  
  2216.  
  2217.  
  2218. 5.    Display device characteristics
  2219. ==    ==============================
  2220.  
  2221.  
  2222. 5.01  Raster scan display systems
  2223. ====  ===========================
  2224.  
  2225.  
  2226. There are a number of possible technologies used for producing high quality
  2227. visual images from computer produced data.  We are concerned with only one of
  2228. these technologies, raster scan display technology.  We will not mention any
  2229. of the other available systems, since we are concerned with video graphics
  2230. array controller chip programming, which implies using a raster scan display.
  2231.  
  2232. A raster scan display system is very simple in concept.  The generated visual
  2233. image is considered to be composed of a large number of lines of visual data,
  2234. with the orientation of each line being essentially horizontal.  One line is
  2235. displayed after another, so that successive lines are stacked vertically one
  2236. upon another, with minimal vertical separation.  In this way, a rectangular
  2237. image space is built up.  In order for this to work, the computer system must
  2238. provide data suitable for describing the visual content of each neighbouring
  2239. line, one after another, until each line has been described and the image is
  2240. complete.
  2241.  
  2242. We can think of a line as being composed of many individual picture elements,
  2243. each of which represent in some way, the smallest amount of information that it
  2244. is possible for a display to present.  A picture element is usually referred to
  2245. as a pixel, which is essentially a contraction of picture element, following
  2246. the fashion for contracting pictures to pics (or pix) and picture to pic.
  2247.  
  2248. A pixel has a number of useful properties.  It is entirely separate from any
  2249. other pixel, which means that any characteristics it possesses can be changed
  2250. independantly of the characteristics of any other pixel.  In this manner, we
  2251. can determine the resolving power of a display by means of a statement of how
  2252. many pixels the display can support during operation.  This is termed the
  2253. resolution of the display.  However, visual images are generated outside the
  2254. display itself, so the resolution of the image generator must be taken into
  2255. account when deciding the achievable resolution for the entire visual system.
  2256.  
  2257. The important physical properties of a pixel are those of size, aspect ratio
  2258. and colour capability.  A small pixel will pack more tightly into a given line
  2259. length therefore giving greater resolution for the presented image.  The aspect
  2260. ratio should ideally be 1:1 as noted above.  This gives best results using a
  2261. rectilinear coordinate system.  The colour capability of a pixel is expressed
  2262. as hue and luminosity.  Hue describes the mixture of the primary colours used
  2263. to generate a displayed colour, whilst luminosity is a measure of the strength
  2264. of the colour.
  2265.  
  2266.  
  2267.  
  2268.  
  2269. 5.02  Raster scan image refresh
  2270. ====  =========================
  2271.  
  2272.  
  2273. A pixel can be given exactly the properties required by means of descriptive
  2274. data sent to a display unit from a computer system.  However, a display unit
  2275. does not itself possess any memory for the characteristics given to a pixel in
  2276. this way.  That is, the display system can display a pixel according to data
  2277. describing that pixel, but that data is not remembered anywhere in the display
  2278. unit.  The effect is that a single image can be produced, which then starts to
  2279. fade away, until it becomes quite invisible.
  2280.  
  2281. Therefore, when building an image using a raster scan display system, we have
  2282. only to present the display device with an endless stream of data, composed of
  2283. the information we need to completely describe the characteristics of each and
  2284. every pixel, on a moment by moment basis.  The need to supply data to a display
  2285. on a continuous basis, arises because the display can only present a displayed
  2286. image for a small time before the image begins to fade.  However, if we make
  2287. the display data continuous, the image produced will not have time to begin to
  2288. fade, so will remain strong.  The fade time of an image determines the delay
  2289. before the image must be refreshed, this time decided by the chemicals used in
  2290. making the phosphor in the cathode ray tube.  {In fact, there is a short term
  2291. memory in a display unit, which is the result of a phosphor taking some time to
  2292. forget the information represented by the radiation of coloured light at some
  2293. particular intensity.  This short time permits the serial presentation of data
  2294. into a display device to result in a complete image over the entire screen.}
  2295.  
  2296. {Note: not all raster display systems use a cathode ray tube with its attendant
  2297. phosphor fade.  This was for many years the dominant technology, and is still
  2298. the principle display tchnology used today.  Other raster display technologies
  2299. use exactly the the same signals as would a cathode ray tube system, but do not
  2300. suffer from phosphor fade.  We mention the above simply to give an insight into
  2301. the original design motivation behind repeated data presentation into a raster
  2302. scan display device.  There are other consequences of the original technology
  2303. which will become apparent in later discussions.  Most of the timing issues in
  2304. raster scan image generation relate to the original technology.}
  2305.  
  2306.  
  2307.  
  2308.  
  2309. 5.03  Signals for image generation
  2310. ====  ============================
  2311.  
  2312.  
  2313. The sequential generation of an image requires that individual lines of visual
  2314. data be sent to a display device, one after another, until an entire image has
  2315. been constructed.  The whole process is then repeated indefinately.  The data
  2316. which represents the individual characteristics of each pixel must therefore be
  2317. synchronised in some way with the operation of the display device.  This must
  2318. be done in order to ensure that the data for each pixel actually changes the
  2319. same physical pixel on the screen, each time it is sent to the display unit.
  2320.  
  2321. The display unit operates to an extent without any knowledge of the data being
  2322. sent to it from the image generator.  Once an image has started, the display
  2323. alters each pixel in a display line simply by converting the colour information
  2324. arriving from the image generator into light of specified hue and luminosity.
  2325.  
  2326. The physical process used by the display unit involves scanning three separate
  2327. electron beams at a known and absolutely constant velocity across the pixels
  2328. making up the line to be displayed.  The colour information from the image
  2329. generator is used to change the intensity of each of the three electron beams.
  2330. The strength of an electron beam striking a phosphor determines the intensity
  2331. of the light emitted by the phosphor.  By making each pixel from three dots of
  2332. different coloured phosphors, and arranging that each electron beam focuses on
  2333. phosphor of a known colour, it is possible to completely control the colour at
  2334. each pixel position of the display.
  2335.  
  2336. The image generator has a way of telling the display unit that a complete new
  2337. image is about to be transmitted, and also a way of informing the display unit
  2338. that a new line of visual information is about to be sent.  Apart from these
  2339. two synchronisation signals, the displayed image positional stability depends
  2340. completely on the ability of the two units to maintain very accurate matched
  2341. timing in their operations.  The display scans each pixel in a line at a known
  2342. rate, so the image generator must supply pixel colour information at exactly
  2343. this same rate.  In this way, so long as the timing stays the same during the
  2344. period required to display one line, the image will be positionally stable.
  2345.  
  2346. The signals describing pixel characteristics provided by the image generator
  2347. represent intensities which are used by the display unit to modulate light from
  2348. each of the three phosphors which make up one complete display pixel.  These
  2349. phosphors generate the colours red, green and blue.  Using the emmision colour
  2350. mixing model, it is possible to represent any desired hue and luminance by
  2351. changing the absolute intensity value of each of these component colours.  In
  2352. this way an entire colour image is formed on the display screen.
  2353.  
  2354.  
  2355.  
  2356.  
  2357. 5.04  Timing issues
  2358. ====  =============
  2359.  
  2360.  
  2361. For practical generation of display image information suitable for presentation
  2362. into a raster scan display device, there must be provision for synchronisation
  2363. signals.  We will now examine some of the important timing characteristics of
  2364. these synchronisation signals by looking at the display unit operation in some
  2365. detail.  We will, as before, assume a cathode ray tube based display unit.
  2366.  
  2367. The most important aspect of timing information in a raster scan display based
  2368. on a cathode ray tube, is concerned with the finite energy required to move the
  2369. electron beams across the surface of the display tube.  This energy is used to
  2370. create a varying magnetic field, which permeates the display tube and results
  2371. in the deflection of the electrons passing through it.  This is the essential
  2372. mechanism by means of which the pixels in a display line are scanned.  However,
  2373. there are some important consequences of this use of a magnetic field and they
  2374. affect the timing signals presented by the image generator to the display unit.
  2375.  
  2376. The magnetic field which sweeps the beams of electrons across the display tube
  2377. is a strong magnetic field.  This means it possesses a large amount of energy.
  2378. That energy reaches a maximum at the extreme positions of a scan line.  So at
  2379. the start of a scan line the magnetic energy is at a maximum in one direction,
  2380. whilst at the end of a scan line the energy is a maximum in the very opposite
  2381. direction.  The implication is that between the extreme right position on one
  2382. scan line and the extreme left position of the following scan line, a large
  2383. amount of energy must be safely transferred.  This cannot happen without some
  2384. time being made available specially for the purpose.
  2385.  
  2386. Each time the display line is advanced from the top of the display tube towards
  2387. the bottom, a similar argument applies.  A magnetic field possessing energy is
  2388. used to direct the electron beams at right angles to those used for the pixel
  2389. scan along each line.  But the energy argument is just as valid in the vertical
  2390. direction.  Therefore in order to finish the last display line in the image it
  2391. is necessary to provide a time delay so that the magnetic field can be set up
  2392. ready for the first line in the display.  As before, considerable energy must
  2393. be transferred, which accounts for this requirement.
  2394.  
  2395. During the flyback period, which can be either line flyback or frame flyback,
  2396. the electron beams would normally re-traverse the screen, which would cause
  2397. difficulties with image interference.  This would be the result of any double
  2398. exposure of pixels to the electron beams.  In order to prevent this possibility
  2399. all the electron beams are inhibited during a flyback period.  This is termed
  2400. line blanking and frame blanking respectively.
  2401.  
  2402. The circuitry which controls the horizontal and vertical scanning uses a method
  2403. of improving the absolute positional accuracy of the electron beam deflection
  2404. called overscanning.  An overscan is the result of applying too much deflection
  2405. to the electron beams to the extent that they no longer strike the surface of
  2406. the screen.  Instead, they strike an interior portion of the display tube, and
  2407. do not generate any image as a consequence.  A difficulty arises when the beams
  2408. start to strike the display screen resulting in image generation.  The result
  2409. is an image which appears ragged, since the boundary between the non-displaying
  2410. and displaying part of the screen may not be well defined.  In addition, there
  2411. is the need to establish unambiguous synchronisation between the display unit
  2412. and the image generator.  This cannot be readily achieved by using the edge of
  2413. the screen as a guide to determining where each scan line should commence.
  2414.  
  2415. To combat this problem, horizontal blanking is used to switch off the electron
  2416. beams at the start and end of each horizontal scan line.  In this way some part
  2417. of the display screen remains unused, but the result is a much more stable and
  2418. accurately positioned display.  The horizontal synchronisation signal is used
  2419. to specify the exact timing characteristics of this special blanking.  It can
  2420. usefully be thought of as an extension of the line blanking due to flyback.
  2421.  
  2422. There is an identical extension to the vertical synchronisation signal for the
  2423. same reasons.
  2424.  
  2425.  
  2426.  
  2427.  
  2428. 5.05  Image generation can be dangerous!
  2429. ====  ==================================
  2430.  
  2431.  
  2432. The timing of the horizontal and vertical synchronisation signals is determined
  2433. completely by the image generator, but although this is so, these signals must
  2434. be interpreted correctly by the display unit if the intended image is ever to
  2435. be produced.  This means that there is potential for an image generator to send
  2436. visual signal information to a display unit, which that display unit cannot use
  2437. to produce an image.
  2438.  
  2439. It is important to see why this may be so, since if such signals are sent to a
  2440. display unit, one possible consequence is that permanent damage to the display
  2441. may result.  Obviously this situation is extremely undesirable, and likely to
  2442. be very costly if it does occur.  This is one of the rare situations where the
  2443. incorrect use of software can result in destruction of hardware.  {We refer to
  2444. industry standard systems only in making this remark.  There are large classes
  2445. of systems termed embedded systems where the coupling between hardware and the
  2446. software which controls it is so close, that this potential for destruction is
  2447. ever present.  Such systems are only programmed by experts as a result.}
  2448.  
  2449. A display unit has the important characteristic that it will correctly accept
  2450. synchronisation and image generation signals upto a certain maximum frequency.
  2451. This means that in a given time, only a certain quantity of information may be
  2452. accepted by the display unit from the image generator unit.  If this maximum
  2453. frequency is exceeded, the circuitry within the display unit will not function
  2454. correctly and may be damaged as a result.  This can happen because the quantity
  2455. of energy used in controlling the electron beam scanning is very high, making
  2456. it essential that electronic devices capable of withstanding high stress are
  2457. used in the circuitry.  Moreover, to improve display device reliability, energy
  2458. conservation circuits are introduced into the display unit.  This measure means
  2459. that the display circuits dissipate less heat and therefore operate at a lower
  2460. temperature than would otherwise be the case.  However, in order to for these
  2461. circuits to operate correctly, certain important assumptions must be made about
  2462. the frequency of operation.  This is in essence why it is possible to damage a
  2463. display device by feeding it with image information at too high a frequency.
  2464.  
  2465.  
  2466.  
  2467.  
  2468. 5.06  Persistance in human vision
  2469. ====  ===========================
  2470.  
  2471.  
  2472. The frequency of the image information presented to a display unit determines
  2473. the maximum image resolution of the resulting display, assuming an acceptable
  2474. match exists between the image generator and the display unit.  That is, the
  2475. greater the number of pixels to be displayed, the more information is required
  2476. for each single image displayed.  We term each of these images a frame.  More
  2477. information in a given amount of time results in a higher frequency.  We would
  2478. like to keep the image information frequency as low as possible, since this
  2479. helps to keep the display system quality high and the cost low.  This can only
  2480. be done by making a compromise.  We will now examine how this can be achieved.
  2481.  
  2482. We have seen above how it becomes necessary to repeat each frame at such a rate
  2483. that the resulting display image becomes constant.  We have seen how this can
  2484. be determined by the image persistance of the phosphors representing a pixel.
  2485. There is another important aspect of image persistance which we have not yet
  2486. considered.  The human eye itself has properties of image persistance.  So it
  2487. is possible for a human eye to provide an image for some time after the image
  2488. has vanished.  This is the important property which gives projected cinema film
  2489. the realism which makes cinema films possible.  In projecting a cinema film, a
  2490. single image is flashed onto the screen for a fraction of a second, then the
  2491. light illuminating the image is removed, the image is then replaced by the next
  2492. in sequence.  This whole process repeats many times per second.  Persistence of
  2493. vision is the means by which the cinema screen seems to give a steady portrayal
  2494. of stationary scenes and smooth representation of movement.
  2495.  
  2496. This same persistance is at least partly responsible for our ability to see the
  2497. image presented by a display unit as a single continuous image.  We know that a
  2498. phosphor also exibits persistance.  An interesting question therefore arises.
  2499. How many frames per second must we display in order to minimise the information
  2500. sent to a display unit, whilst still maintaining an acceptable displayed image?
  2501.  
  2502. This question is absolutely vital in determining the highest frequency that a
  2503. display unit must operate at, given a particular image resolution.  This whole
  2504. issue determines the cost of the display unit and the quality of the displayed
  2505. image.  It therefore also determines the characteristics of the image generator
  2506. which must produce the information for creating the image.  So it is a really
  2507. pivotal question for a visual display system.
  2508.  
  2509. A cinema projector usually operates at 24 frames per second, and at this frame
  2510. frequency a high quality image is perceived.  At lower frame frequencies, there
  2511. may be image flicker, which after some time can become very unpleasant.  It is
  2512. important to eliminate flicker so that a display system image can if necessary,
  2513. be observed for prolonged periods of time without creating undue stress.
  2514.  
  2515. A display unit frame is not directly comparable with a cinema film frame.  This
  2516. is so because a display unit produces an image by using scanned electron beams,
  2517. whilst the cinema film frame is a complete image in its own right.  This means
  2518. that in order to give the same freedom from perceived flicker, a display unit
  2519. must produce more frames per second than does a cinema projector.  In practise
  2520. a display unit will usually attempt to operate at a frame frequency of at least
  2521. 40 frames per second.  Some display units operate at over 90 frames per second,
  2522. which results in an extremely stable, high quality image.  Of course, to run at
  2523. the higher frame rate means much more image information must be generated, so
  2524. the complete cost of the display system will be very much higher than a system
  2525. which uses a low frame rate.
  2526.  
  2527.  
  2528.  
  2529.  
  2530. 5.07  Interlaced display
  2531. ====  ==================
  2532.  
  2533.  
  2534. It is important to keep the frame rate of a display system as high as possible
  2535. in order to produce a good quality image which remains flicker free.  At the
  2536. same time, we wish to keep the information frequency as low as possible so as
  2537. to minimise the cost of the display system.  We will now examine an interesting
  2538. compromise which attempts to obtain the best of both situations by using what
  2539. really amounts to a clever visual trick.  This trick just happens to be simple
  2540. to implement using raster scan display technology, hence is of practical merit
  2541. in some types of display systems.
  2542.  
  2543. The trick is based on the observation that apparent flicker can be reduced when
  2544. two almost identical images are displayed one after another, but in a special
  2545. physical relationship with each other on the display screen.  All single images
  2546. are composed of a certain number of raster scan lines.  It is possible to take
  2547. a single image and make two separate images from it, by taking alternate scan
  2548. lines from the full image.  This places all even numbered scan lines in one of
  2549. the derived images, with all the odd numbered scan lines making up the second
  2550. image.  These derived images are then each composed of approximately half the
  2551. number of scan lines appearing in the original image.  In this way each derived
  2552. image is represented by approximately half the visual information needed in the
  2553. original image frame.  {We say approximately half, since we did not specify the
  2554. number of scan lines in the original image, which may not be divisible into two
  2555. identical parts.}
  2556.  
  2557. We can then display these two derived image frames alternately, which means the
  2558. visual information frequency is roughly halved, whilst the frame rate remains
  2559. constant.  Alternatively, the visual informatin frequency can remain constant,
  2560. whilst the frame rate is doubled.  To do this, the display unit interlaces the
  2561. two images, which means that physically, on the screen, the original image is
  2562. reconstituted exactly as it was prior to being dismembered.  Obviously in order
  2563. for this to work, the display unit positional error must be very low.  However,
  2564. this is a requirement of any display system, so does not present tremendous
  2565. difficulty.  In this way, flicker is reduced, whilst a reasonable quality image
  2566. is produced by the display system.  As a result the apparent display resolution
  2567. can be increased by a factor of two, without too much increase to the cost.
  2568.  
  2569. For the very highest quality display presentation, it is better not to use this
  2570. technique, since the ability of the display unit to correctly reconstitute the
  2571. image will leave something to be desired.  However in some situations interlace
  2572. can be useful.
  2573.  
  2574.  
  2575.  
  2576.  
  2577. 5.08  Screen border display
  2578. ====  =====================
  2579.  
  2580.  
  2581. It may prove useful to display an image which is substantially smaller than the
  2582. resolution of the display unit being used.  This might be the case where some
  2583. software assumes such a smaller image area when creating a visual image.  So it
  2584. can be displayed on the higher resolution display system, some of the pixels on
  2585. the display must be effectively removed from the true image area.  In this way,
  2586. the actual image display will appear smaller than the true available image area
  2587. on the display screen.
  2588.  
  2589. A convenient way to manage this reduction in display image size, is to create a
  2590. border surrounding the true active display area.  In this way, those pixels not
  2591. required in the image are set to some predetermined colour, which is termed the
  2592. border colour.  We mention this possibility since later, we will see that this
  2593. capability is supported by a video graphics array controller chip.
  2594.  
  2595.  
  2596.  
  2597.  
  2598. 5.09  Cursor generation
  2599. ====  =================
  2600.  
  2601.  
  2602. An image display system is an output component in a feedback loop incorporating
  2603. the computer system and the person using that system.  Within a displayed image
  2604. there is one point with which the user is presently concerned.  This point will
  2605. be subject to any manipulation deemed necessary by the user.  As the resolution
  2606. of the display system increases, the quantity of visual data becomes large, so
  2607. the user requires a means of determining where the active point is situated.
  2608.  
  2609. The movement of an input device can be related to a cursor which specifies the
  2610. exact position of the hot spot within the image.  This cursor will be easy to
  2611. distinguish from the image proper, and for this purpose will normally blink on
  2612. and off at a rate designed to be easily seen amongst a mass of visual detail.
  2613.  
  2614. Since the generation of a blinking cursor by software is a very high overhead
  2615. operation, it is beneficial for the image generation hardware to provide some
  2616. facilities for cursor generation and positional control.
  2617.  
  2618.  
  2619.  
  2620.  
  2621. 5.10  Multi-synch monitors
  2622. ====  ====================
  2623.  
  2624.  
  2625. There is some advantage in designing a display unit (also termed a monitor, or
  2626. sometimes video monitor) so that it will accept image information at different
  2627. frequencies.  The advantage is that the full display area is used, rather than
  2628. producing a small image with an unused border as discussed above.  The display
  2629. accepts lower frequencies of image information and, as a direct consequence of
  2630. this, the apparent physical width of a pixel changes.  The result is a reduced
  2631. resolution display, but one which takes up the full display area.
  2632.  
  2633. For this concept to work, there are certain frequencies assumed to be in use by
  2634. the display system, so that signals from the image generator can be analysed to
  2635. determine their timing properties, and hence determine the correct operation of
  2636. the display unit.  Since the signals which give image timing are synchronising
  2637. signals, the name of such devices is multi-synch monitors.  At any moment, only
  2638. one of the possible display unit operating frequencies is matched by the timing
  2639. of the horizontal and vertical synchronising signals.  If this timing should be
  2640. changed, then the monitor adopts the new frequency after a short period.  For a
  2641. short time during the change over period, the image produced by the monitor may
  2642. be dimensionally and visually unstable.  This is quite normal with commercially
  2643. available multi-synch monitors.  However, this should not be surprising, as the
  2644. operation of the monitor is affected so fundamentally by the change from one
  2645. input frequency to another.
  2646.  
  2647.  
  2648.  
  2649.  
  2650. 5.s   Summary
  2651. ====  =======
  2652.  
  2653.  
  2654. The concepts associated with raster scan display systems are introduced with
  2655. the special emphasis on the use of cathode ray tubes for the display unit of
  2656. such systems.
  2657.  
  2658. The pixel is identified as the fundamental unit for image presentation and also
  2659. display image resolution.  Properties of pixels are explored.
  2660.  
  2661. The properties of a cathode ray tube based display unit are seen to embrace the
  2662. need for image refresh.  This is seen to be a consequence of the absence of any
  2663. image data memory in a display unit.
  2664.  
  2665. The need for synchronisation between an image generator and a display unit is
  2666. identified and related to the physical processes employed by the display unit
  2667. for image presentation.  The concept of multi-phosphor pixels is introduced,
  2668. with consequences for the data encoding of colour information.
  2669.  
  2670. The need for periods of inactivity between the display of neighbouring scan
  2671. lines is outlined in terms of flyback energy, with similar requirements for
  2672. the frame flyback period.  The use of special linearising circuitry for both
  2673. line scanning and frame scanning is seen to have important implications for
  2674. the horizontal and vertical synchronisation signals respectively.
  2675.  
  2676. The properties of display units which make them suceptible to damage by image
  2677. generators are carefully examined.
  2678.  
  2679. Consequences for display system design deriving from human visual persistance
  2680. are examined.  These are seen to be of seminal importance.
  2681.  
  2682. The interlace technique is seen as a trade off between ultimate image quality
  2683. and image information frequency, with implications for display system cost.
  2684.  
  2685. The use of a border area is examined as a means for using low resolution images
  2686. with a high resolution display unit.
  2687.  
  2688. The advantage of an image generator supported cursor is reviewed.
  2689.  
  2690. Multi-synch monitor are described in relation to their frequency agility with
  2691. implications for display of images at a lower resolution than that supported
  2692. naturally by the display device.
  2693.  
  2694.  
  2695.  
  2696.  
  2697. 6.    Trident 8900 VGA controller: Computer interface
  2698. ==    ===============================================
  2699.  
  2700.  
  2701. 6.01  Memory interface
  2702. ====  ================
  2703.  
  2704.  
  2705. The video graphics array controller must repeatedly transmit image information
  2706. to the display device.  Since the display device does not possess an image data
  2707. memory, that memory must be provided by the image generator.  Image generation
  2708. is intimately managed by the controller chip, so the image memory can only be
  2709. accessed through the controller chip.  In this way, we do not have to concern
  2710. ourselves with the complicated hardware details of memory access, as the memory
  2711. interface provided by the controller chip suffices.   This interface will now
  2712. be given in broad outline, but important details will be omitted for clarity.
  2713.  
  2714. The Intel 80x86 processor family uses a segmented memory architecture.  In the
  2715. original 8086 processor, for which most current software is targetted, the size
  2716. of a segment is limited to a maximum of length of 64 kilo-bytes.  This quantity
  2717. of memory is therefore immediately accessible without the need for changes to a
  2718. segment register value.  For this reason, the memory access interface provided
  2719. by the VGA controller requires that the processor generate addresses inside the
  2720. 64 kilo-byte span of a segment.  The motivation is speed of image access.
  2721.  
  2722. The image generator typically controls much more memory than 64 kilo-bytes, so
  2723. that high resolution colour images can be generated.  A usual configuration at
  2724. the time of writing would be 1024 kilo-bytes of image memory.  Clearly, so that
  2725. the processor be able to read and write such a large image memory using only 64
  2726. kilo-bytes of addressing, some type of access extension mechanism is needed.
  2727.  
  2728. We can think of the 64K {shorthand: 64 kilo-bytes} addressing range recognised
  2729. by the VGA controller as being a window into the much larger image memory.  If
  2730. the controller is reappraised of the alignment of this window within the entire
  2731. image memory range, it is possible to read and write to the full image memory.
  2732.  
  2733. Of course, for this scheme to work, we would periodically have to send special
  2734. information to the controller chip, which adjusts the positioning of the memory
  2735. window, so gaining access to memory outside the 64K furnished by the currently
  2736. defined window.
  2737.  
  2738. In order to specify where within the full image memory span the current access
  2739. window will be situated, the concept of a page is introduced.  A page contains
  2740. two segments, each of which is 64K.  So a page represents a memory unit of 128K
  2741. bytes of image memory.  Further, two pages combine to form a bank with 256K of
  2742. image memory.  Finally, one of four possible banks can be selected, giving full
  2743. access to one megabyte of image memory.  It is important to note that the image
  2744. memory is only accessible via the VGA controller chip.  It is not possible to
  2745. directly access this memory from the processor, except insofar that the memory
  2746. interface provided by the VGA controller permits.  This is equivalent to saying
  2747. that any read or write access to the 64K window provided by the VGA controller
  2748. has an effect in video memory determined by a pre-established context which has
  2749. to be explicitly programmed for the purpose at hand.  The memory interface must
  2750. be managed by the programmer, so nothing can be taken for granted.
  2751.  
  2752. In fact, there are a number of complications with this scheme, which we should
  2753. expect in a subsystem as powerful as the VGA controller.  This means that later
  2754. we will encounter additional VGA controller capabilities which affect the image
  2755. memory addresses which are generated by the processor.
  2756.  
  2757.  
  2758.  
  2759.  
  2760. 6.02  Input, output, port interface
  2761. ====  =============================
  2762.  
  2763.  
  2764. The VGA controller is a collection of mutually supporting logic blocks, which
  2765. interact to produce the full functionality required of the controller.  Each of
  2766. the individual logic blocks can sometimes be conveniently programmed as though
  2767. it were completely isolated from all the remaining blocks, although that is not
  2768. always the case.  For reasons related to ease of chip design, each block has an
  2769. interface provided which gives input output port access to a set of internal
  2770. control registers.  These registers determine the detailed operation for each
  2771. logic block so can be used to give fine control of image generation as required
  2772. in a sophisticated image display system.
  2773.  
  2774. The access to large numbers of internal programmable registers by a processor
  2775. provides a problem for the hardware designer.  The idea is to provide as much
  2776. functionality as possible, without using too many hardware resources providing
  2777. access to the large number of programmable registers needed for control.
  2778.  
  2779. To ease this hardware design problem, which is effectively an attempt to reduce
  2780. the device complexity and cost from the hardware point of view, a trade-off is
  2781. made with respect to ease of programmability.  This trade-off is the reason why
  2782. VGA controller chips are a little strange to program.  {People who think every
  2783. means possible should be employed to make every device easier to program should
  2784. reflect that even with contemporary technology, adherance to this philosophy is
  2785. not economically possible, from the hardware design and development viewpoint
  2786. and also because of manufacturing and marketing considerations.  The truth of
  2787. this is especially visible where commodity market chips are concerned.}
  2788.  
  2789. We now see the typical input output port interface provided to give access to
  2790. the programmable registers within one logic block of the VGA controller chip.
  2791. Each interface uses just two input output port addresses.  This simplifies the
  2792. decoder logic overhead within the logic block.
  2793.  
  2794. If the logic block we are going to program is the Sequencer, the two ports we
  2795. will access lie at the following addresses:
  2796.  
  2797.   1.  Sequencer Address Register  {  Port 3c4 hex for Read, Write }
  2798.   2.  Sequencer access port       {  Port 3c5 hex for Read, Write }
  2799.  
  2800. The correct programming sequence for accessing an internal register depends on
  2801. each of the registers being associated with an index number.  Programmers can
  2802. think of the internal registers being arranged in an array for which an index
  2803. must be provided in order to obtain access to an individual register.  Once the
  2804. index number for the register of interest is known, that index number is output
  2805. to the Sequencer Address Register.  The sequencer will then set itself up so an
  2806. access to the Sequencer access port actually performs input or output to the
  2807. required internal sequencer programmable register.
  2808.  
  2809. A code fragment to perform a write to the Character Map Select Register within
  2810. the sequencer, and then to read that value back is given below.
  2811.  
  2812.  
  2813.            ; start example 1
  2814.  
  2815.            ; Set up Sequencer Address Register ...
  2816.            ; ... for access to Character Map Select Register
  2817.  
  2818.            mov     dx,3c4h         ; Sequencer Address Register port
  2819.            mov     al,03h          ; Character Map Select Register index
  2820.            out     dx,al           ; select the Character Map Select Register
  2821.  
  2822.            ; Write the Character Map Select Register
  2823.  
  2824.            mov     dx,3c5h         ; Sequencer access port
  2825.            mov     al,write_data   ; collect the data to write
  2826.            out     dx,al           ; write the Character Map Select Register
  2827.  
  2828.            ; Read the Character Map Select Register
  2829.  
  2830.            mov     dx,3c5h         ; Sequencer access port
  2831.            in      al,dx           ; read the Character Map Select Register
  2832.  
  2833.            ; end example 1
  2834.  
  2835.  
  2836. Whilst this example does not appear to be particularly onerous, we will see in
  2837. later examples that the number of registers which must be programmed in concert
  2838. may lead to long sequences of code which do nothing else but select and access
  2839. VGA controller registers, prior to actually performing image manipulation.  It
  2840. would be misleading to pretend that the writing of such sequences is anything
  2841. other than tedious;  however, if excellent results (or indeed any results!) are
  2842. to be had, we must face this prospect.
  2843.  
  2844. There is a fortunate aspect of the Intel 80x86 input output port architecture
  2845. which can help to ease the programming burden associated with VGA registers.
  2846. When a word output is performed to a particular port number, two bytes are in
  2847. fact transferred.   The first is sent to the port mentioned and the second is
  2848. sent to that port number plus one.  This has the happy consequence that it is
  2849. possible using word output, to effect the index selection with the first port,
  2850. followed by data output to the just selected register.  This can help to ease
  2851. the amount of code to be written, and is of course much faster to execute.
  2852.  
  2853.  
  2854.            ; start example 2
  2855.  
  2856.            ; Set up Sequencer Address Register ...
  2857.            ; ... for access to Character Map Select Register
  2858.  
  2859.            mov     dx,3c4h         ; Sequencer Address Register port
  2860.            mov     al,03h          ; Character Map Select Register index
  2861.  
  2862.            ; Write the Character Map Select Register
  2863.  
  2864.            mov     ah,write_data   ; collect the data to write
  2865.            out     dx,ax           ; write the Character Map Select Register
  2866.  
  2867.            ; Read the Character Map Select Register
  2868.  
  2869.            mov     dx,3c5h         ; Sequencer access port
  2870.            in      al,dx           ; read the Character Map Select Register
  2871.  
  2872.            ; end example 2
  2873.  
  2874.  
  2875. In this way, it is possible to omit one output port instruction and one address
  2876. load instruction, making a saving of 2 instructions per 6 original.  This is a
  2877. very useful saving.  Useful execution speedup is also obtained in consequence.
  2878.  
  2879.  
  2880.  
  2881.  
  2882. 6.03  Complete input, output port accessible register list
  2883. ====  ====================================================
  2884.  
  2885.  
  2886. The registers are listed with a document reference number which is numeric only
  2887. or preceeded by an X.  The numeric only register reference numbers describe the
  2888. standard VGA registers.  Those beginning with an X, describe extended registers
  2889. which may be specific to a particular implementation, in this case, the Trident
  2890. 8900 video graphics controller chip.
  2891.  
  2892. The port address is some instances contains a ? indicating that an alternative
  2893. port address can be made available under program control.  This choice will be
  2894. between the hex digit 'b' for monochrome emulation or 'd' for colour emulation.
  2895. The port address shown as 3?5h would be either 3b5h or 3d5h depending upon the
  2896. value of the status bit <0> in the Miscellaneous Output Register.
  2897.  
  2898. In some instances, the access definition for a particular register will change
  2899. for read and write.  Sometimes, for example, a different port is used depending
  2900. on whether a value is being written to, or being read from, the register.  This
  2901. difference will be highlighted by the appearance of two descriptive lines, with
  2902. the suffixes a,b indicating a closely related definition.
  2903.  
  2904. Note that not all port addresses are used.  This is also true of the register
  2905. index numbers used to access the internal arrays of registers.  In most cases
  2906. the hardware defines some internal datapath for these unused register indexes.
  2907. They are used only for testing purposes, if at all.  They are not significant
  2908. with respect to programmable functionality, so should not be accessed.  Where
  2909. a break in contiguous index numbers occurs, this is emphasised by means of a
  2910. dummy line, which breaks the pattern of smoothly increasing index numbers.
  2911.  
  2912.  
  2913. Document Reference
  2914. ===---------------
  2915.  
  2916.        Index Port Address
  2917. ===    ====--------------
  2918.  
  2919.                Access Port Address
  2920. ===    ====    ====---------------
  2921.  
  2922.                        Index Number
  2923. ===    ====    ====    ===---------
  2924.  
  2925.                               Read/Write Access
  2926. ===    ====    ====    ===    ===--------------
  2927.  
  2928.                                      Register Description
  2929. ===    ====    ====    ===    ===    ====================
  2930.  
  2931.  
  2932.   1    3c4h    ----    ---    R/W    Sequencer Address Register
  2933.   2    3c4h    3c5h    00h    R/W    Reset Register
  2934.   3    3c4h    3c5h    01h    R/W    Clocking Mode Register
  2935.   4    3c4h    3c5h    02h    R/W    Map Mask Register
  2936.   5    3c4h    3c5h    03h    R/W    Character Map Select Register
  2937.   6    3c4h    3c5h    04h    R/W    Sequencer Memory Mode Register
  2938.        ----    ----    ---    ---
  2939. X 1    3c4h    3c5h    0bh    R--    Hardware Version Register {new definition}
  2940. X 2    3c4h    3c5h    0bh    --W    Version Selector Register {old definition}
  2941.        ----    ----    ---    ---
  2942. X 3    3c4h    3c5h    0ch    R/W    Configuration Port Register 1
  2943. X 4    3c4h    3c5h    0dh    R/W    Mode Control Register 2
  2944. X 5    3c4h    3c5h    0eh    R/W    Mode Control Register 1
  2945. X 6    3c4h    3c5h    0fh    R/W    Power-up Mode Register 2
  2946.  
  2947.  
  2948.   7a   3b4h    ----    ---    R/W    CRT Controller Address Register
  2949.    b   3d4h    ----    ---    R/W    CRT Controller Address Register
  2950.   8    3?4h    3?5h    00h    R/W    Horizontal Total Register
  2951.   9    3?4h    3?5h    01h    R/W    Horizontal Display Enable End Register
  2952.  10    3?4h    3?5h    02h    R/W    Start Horizontal Blanking Register
  2953.  11    3?4h    3?5h    03h    R/W    End Horizontal Blanking Register
  2954.  12    3?4h    3?5h    04h    R/W    Start Horizontal Retrace Pulse Register
  2955.  13    3?4h    3?5h    05h    R/W    End Horizontal Retrace Register
  2956.  14    3?4h    3?5h    06h    R/W    Vertical Total Register
  2957.  15    3?4h    3?5h    07h    R/W    CRT Controller Overfow Register
  2958.  16    3?4h    3?5h    08h    R/W    Preset Row Scan Register
  2959.  17    3?4h    3?5h    09h    R/W    Maximum Scan Line Register
  2960.  18    3?4h    3?5h    0ah    R/W    Cursor Start Register
  2961.  19    3?4h    3?5h    0bh    R/W    Cursor End Register
  2962.  20    3?4h    3?5h    0ch    R/W    Start Address High Register
  2963.  21    3?4h    3?5h    0dh    R/W    Start Address Low Register
  2964.  22    3?4h    3?5h    0eh    R/W    Cursor Location High Register
  2965.  23    3?4h    3?5h    0fh    R/W    Cursor Location Low Register
  2966.  24    3?4h    3?5h    10h    R/W    Vertical Retrace Start Register
  2967.  25    3?4h    3?5h    11h    R/W    Vertical Retrace End Register
  2968.  26    3?4h    3?5h    12h    R/W    Vertical Display Enable End Register
  2969.  27    3?4h    3?5h    13h    R/W    Offset Register
  2970.  28    3?4h    3?5h    14h    R/W    Underline Location Register
  2971.  29    3?4h    3?5h    15h    R/W    Start Vertical Blanking Register
  2972.  30    3?4h    3?5h    16h    R/W    End Vertical Blanking Register
  2973.  31    3?4h    3?5h    17h    R/W    CRTC Mode Control Register
  2974.  32    3?4h    3?5h    18h    R/W    Line Compare Register
  2975.        ----    ----    ---    ---
  2976. X 7    3?4h    3?5h    1eh    R/W    CRTC Module Testing Register
  2977. X 8    3?4h    3?5h    1fh    R/W    Software Programming Register
  2978.        ----    ----    ---    ---
  2979. X 9    3?4h    3?5h    22h    R--    CPU Latch Read Back Register
  2980.        ----    ----    ---    ---
  2981. X10    3?4h    3?5h    24h    R--    Attribute State Read Back Register
  2982.        ----    ----    ---    ---
  2983. X11    3?4h    3?5h    26h    R--    Attribute Index Read Back Register
  2984.  
  2985.  
  2986.  33    3ceh    ----    ---    R/W    Graphics Address Register
  2987.  34    3ceh    3cfh    00h    R/W    Set/Reset Register
  2988.  35    3ceh    3cfh    01h    R/W    Enable Set/Reset Register
  2989.  36    3ceh    3cfh    02h    R/W    Colour Compare Register
  2990.  37    3ceh    3cfh    03h    R/W    Data Rotate Register
  2991.  38    3ceh    3cfh    04h    R/W    Read Map Select Register
  2992.  39    3ceh    3cfh    05h    R/W    Graphics Mode Register
  2993.  40    3ceh    3cfh    06h    R/W    Miscellaneous Register
  2994.  41    3ceh    3cfh    07h    R/W    Colour Don't Care Register
  2995.  42    3ceh    3cfh    08h    R/W    Bit Mask Register
  2996.        ----    ----    ---    ---
  2997. X12    3ceh    3cfh    0eh    R/W    Source Address Register
  2998. X13    3ceh    3cfh    0fh    R/W    Source Address Enable Register
  2999.  
  3000.  
  3001.  43    3c0h    ----    ---    R/W    Attribute Address Register
  3002.  44a   3c0h    3c0h    00h    --W    Palette Register 00
  3003.    b   3c0h    3c1h    00h    R--    Palette Register 00
  3004.  45a   3c0h    3c0h    01h    --W    Palette Register 01
  3005.    b   3c0h    3c1h    01h    R--    Palette Register 01
  3006.  46a   3c0h    3c0h    02h    --W    Palette Register 02
  3007.    b   3c0h    3c1h    02h    R--    Palette Register 02
  3008.  47a   3c0h    3c0h    03h    --W    Palette Register 03
  3009.    b   3c0h    3c1h    03h    R--    Palette Register 03
  3010.  48a   3c0h    3c0h    04h    --W    Palette Register 04
  3011.    b   3c0h    3c1h    04h    R--    Palette Register 04
  3012.  49a   3c0h    3c0h    05h    --W    Palette Register 05
  3013.    b   3c0h    3c1h    05h    R--    Palette Register 05
  3014.  50a   3c0h    3c0h    06h    --W    Palette Register 06
  3015.    b   3c0h    3c1h    06h    R--    Palette Register 06
  3016.  51a   3c0h    3c0h    07h    --W    Palette Register 07
  3017.    b   3c0h    3c1h    07h    R--    Palette Register 07
  3018.  52a   3c0h    3c0h    08h    --W    Palette Register 08
  3019.    b   3c0h    3c1h    08h    R--    Palette Register 08
  3020.  53a   3c0h    3c0h    09h    --W    Palette Register 09
  3021.    b   3c0h    3c1h    09h    R--    Palette Register 09
  3022.  54a   3c0h    3c0h    0ah    --W    Palette Register 10
  3023.    b   3c0h    3c1h    0ah    R--    Palette Register 10
  3024.  55a   3c0h    3c0h    0bh    --W    Palette Register 11
  3025.    b   3c0h    3c1h    0bh    R--    Palette Register 11
  3026.  56a   3c0h    3c0h    0ch    --W    Palette Register 12
  3027.    b   3c0h    3c1h    0ch    R--    Palette Register 12
  3028.  57a   3c0h    3c0h    0dh    --W    Palette Register 13
  3029.    b   3c0h    3c1h    0dh    R--    Palette Register 13
  3030.  58a   3c0h    3c0h    0eh    --W    Palette Register 14
  3031.    b   3c0h    3c1h    0eh    R--    Palette Register 14
  3032.  59a   3c0h    3c0h    0fh    --W    Palette Register 15
  3033.    b   3c0h    3c1h    0fh    R--    Palette Register 15
  3034.  60a   3c0h    3c0h    10h    --W    Attribute Mode Control Register
  3035.    b   3c0h    3c1h    10h    R--    Attribute Mode Control Register
  3036.  61a   3c0h    3c0h    11h    --W    Overscan Colour Register
  3037.    b   3c0h    3c1h    11h    R--    Overscan Colour Register
  3038.  62a   3c0h    3c0h    12h    --W    Colour Plane Enable Register
  3039.    b   3c0h    3c1h    12h    R--    Colour Plane Enable Register
  3040.  63a   3c0h    3c0h    13h    --W    Horizontal PEL Panning Register
  3041.    b   3c0h    3c1h    13h    R--    Horizontal PEL Panning Register
  3042.  64a   3c0h    3c0h    14h    --W    Colour Select Register
  3043.    b   3c0h    3c1h    14h    R--    Colour Select Register
  3044.  
  3045.  
  3046.  65a   3c2h    ----    ---    W--    Miscellaneous Output Register
  3047.    b   3cch    ----    ---    --R    Miscellaneous Output Register
  3048.  66    3c2h    ----    ---    R--    Input Status Register Zero
  3049.  67    3?ah    ----    ---    R--    Input Status Register One
  3050.  
  3051.  
  3052.  68    3c3h    ----    ---    R/W    Video Subsystem Enable Register
  3053.  69    46e8h   ----    ---    R/W    Display Adapter Enable Register
  3054.  
  3055.  
  3056.  70    3c6h    ----    ---    R/W    DAC Pixel Mask Register
  3057.  71    3c7h    ----    ---    R--    DAC Status Register
  3058.  72    3c7h    ----    ---    W--    DAC Read Data Address Register
  3059.  73    3c8h    ----    ---    R/W    DAC Write Data Address Register
  3060.  74    3c9h    ----    ---    R/W    DAC Data Register
  3061.  
  3062.  
  3063. This concludes the list of programmable registers for the VGA controller chip.
  3064.  
  3065.  
  3066.  
  3067.  
  3068. 6.04  Register specifications: Sequencer
  3069. ====  ==================================
  3070.  
  3071.  
  3072. 6.04.01  Sequencer Address Register      { 3c4h    ---    R/W }
  3073. =======  ======================================================
  3074.  
  3075.  
  3076. <3..0>   Sequencer Register Address
  3077.          --------------------------
  3078.  
  3079.          Port 3c5h accesses the register pointed to by the index number in this
  3080.          bit field.  Index number zero is represented by <=0000>.
  3081.  
  3082.          This register is cleared to zero by hardware RESET.
  3083.  
  3084.  
  3085. <7..4>   Reserved. Always <=0000>.
  3086.          -------------------------
  3087.  
  3088.  
  3089.  
  3090.  
  3091. 6.04.02  Reset Register                  { 3c5h    00h    R/W }
  3092. =======  ======================================================
  3093.  
  3094.  
  3095. Cross reference with {6.04.03} Clocking Mode Register.
  3096.  
  3097.  
  3098. This register provides capability to stop the sequencer operation.  This must
  3099. be done before changing the highly critical mode selections which govern all
  3100. the timing signal generation for the VGA controller.  Changes to the critical
  3101. Clocking Mode Register must be preceeded by a reset to the sequencer and then
  3102. followed by a sequencer restart.
  3103.  
  3104.  
  3105. <0>      Fast Reset Command
  3106.          ------------------
  3107.  
  3108.          <=0>  Apply an immediate reset to the sequencer.  This can result in
  3109.                a loss of data from the image memory.  If this loss cannot be
  3110.                tolerated, the safe reset command should be used.  This image
  3111.                memory loss occurs because the sequencer action maintains the
  3112.                memory refresh necessary to preserve memory data during normal
  3113.                operation.  If the sequencer suddenly stops, the memory chips
  3114.                cannot receive their refresh cycles resulting in lost data.
  3115.                At the hardware level, all sequencer outputs go tristate when
  3116.                this option is selected.
  3117.  
  3118.          <=1>  No immediate reset condition requested.  This condition is not
  3119.                sufficient to guarantee that the sequencer will run, since it
  3120.                must occur in conjunction with an absence of Safe Reset.
  3121.  
  3122.  
  3123. <1>      Safe Reset Command
  3124.          ------------------
  3125.  
  3126.          <=0>  Apply a safe reset to the sequencer.  The sequencer maintains
  3127.                correct image memory signal operation during the reset period.
  3128.                This reset should be used whenever the image memory must be
  3129.                preserved across the reset.  Note that this reset cannot last
  3130.                longer than a few tens of microseconds without the possibility
  3131.                of image memory corruption due to lack of refresh activity.
  3132.                The sequencer outputs do not go tristate for this setting.
  3133.  
  3134.          <=1>  No safe reset condition requested.  This condition is not
  3135.                sufficient to guarantee that the sequencer will run, since
  3136.                it must occur in conjunction with an absence of Fast Reset.
  3137.  
  3138.  
  3139. <7..2>   Reserved. Always <=000000>.
  3140.          ---------------------------
  3141.  
  3142.  
  3143.  
  3144.  
  3145. 6.04.03  Clocking Mode Register          { 3c5h    01h    R/W }
  3146. =======  ======================================================
  3147.  
  3148.  
  3149. Cross reference with {6.04.02} Reset Register.
  3150. Cross reference with {6.05.02} Horizontal Total Register.
  3151. Cross reference with {6.05.03} Horizontal Display Enable End Register.
  3152. Cross reference with {6.05.04} Start Horizontal Blanking Register.
  3153. Cross reference with {6.05.05} End Horizontal Blanking Register.
  3154. Cross reference with {6.05.06} Start Horizontal Retrace Pulse Register.
  3155. Cross reference with {6.05.07} End Horizontal Retrace Register.
  3156. Cross reference with {6.05.10} Preset Row Scan Register.
  3157. Cross reference with {6.05.25} CRTC Mode Control Register.
  3158. Cross reference with {6.06.07} Graphics Mode Register.
  3159. Cross reference with {6.06.08} Miscellaneous Register.
  3160. Cross reference with {6.07.18} Attribute Mode Control Register.
  3161. Cross reference with {6.07.21} Horizontal PEL Panning Register.
  3162. Cross reference with {6.09.01} Miscellaneous Output Register.
  3163. Cross reference with {6.10.04} Mode Control Register 2.
  3164.  
  3165.  
  3166. <0>      Character Dot Clock Select
  3167.          --------------------------
  3168.  
  3169.          <=0>  Generate character clocks using 9 dot clocks.  This provides for
  3170.                separation between each character in a line of text by insertion
  3171.                of one extra pixel between characters in a horizontal direction.
  3172.                This pixel is normally given the background colour, so that the
  3173.                apparent width of each character is increased.  In this way, the
  3174.                character fonts can use the full 8 pixels width, without having
  3175.                to allow for separation between neighbouring characters.
  3176.  
  3177.                However, a problem can arise with the automatic insertion of an
  3178.                extra pixel, since some characters are used for giving graphics
  3179.                effects even though text mode is in use.  A graphics character
  3180.                is normally used for drawing boxes around text, such that lines
  3181.                representing the box are unbroken.  This does not work when the
  3182.                hardware inserts one extra pixel for every eight actually in the
  3183.                character font.  To overcome this problem, a special control bit
  3184.                can be set to ensure that any character in the ascii range from
  3185.                hex 'c0' to hex 'df' is treated so that the 8th pixel is copied
  3186.                into the 9th pixel, thereby creating continuous line graphics.
  3187.  
  3188.                See {6.07.18} Attribute Mode Control Register.
  3189.  
  3190.                There are controls available to select dot clock frequency and
  3191.                dot clock division ratios.
  3192.  
  3193.                See {6.09.01} Miscellaneous Output Register.
  3194.                See {6.10.04} Mode Control Register 2.
  3195.  
  3196.          <=1>  Generate character clocks using 8 dot clocks.  This results in
  3197.                all text mode generated characters being 8 dot clocks width. On
  3198.                the display, 8 pixels are available to represent the character,
  3199.                in each scan line belonging to the character.  When designing a
  3200.                character font for use with 8 pixel character width, it should
  3201.                be remembered that character separation will only occur if the
  3202.                font uses 7 of the 8 available pixels.  The remaining pixel is
  3203.                used to provide background colour to prevent characters merging.
  3204.  
  3205.                There are controls available to select dot clock frequency and
  3206.                dot clock division ratios.
  3207.  
  3208.                See {6.09.01} Miscellaneous Output Register.
  3209.                See {6.10.04} Mode Control Register 2.
  3210.  
  3211.          Packed pixel 256 colour mode halves the dot clock frequency through a
  3212.          rearrangement of the shift register structure, which shifts 4 bits at
  3213.          each clock using 2 dot clocks per 8 bit unit to represent 256 colours
  3214.          for display.
  3215.  
  3216.          See {6.06.07} Graphics Mode Register.
  3217.  
  3218.  
  3219. <1>      Reserved.  Always <=0>.
  3220.          -----------------------
  3221.  
  3222.  
  3223. <2>      Shift Load Two Control
  3224.          ----------------------
  3225.  
  3226.          <=0>  Reload the video shift registers on each character clock.  This
  3227.                assumes that the video memory can respond fast enough to permit
  3228.                safe operation at the frequency of the character clock.  With a
  3229.                contemporary design, this is not a problem.  This is the normal
  3230.                value for the bit.
  3231.  
  3232.                The ability to load more than one byte per character clock can
  3233.                assist with display image memory address extension schemes, by
  3234.                making certain of the low order address bits redundant.
  3235.  
  3236.                See {6.05.25} CRTC Mode Control Register.
  3237.  
  3238.                The loading of more than one shift register per character clock
  3239.                also has implications for shift register interconnection.  This
  3240.                is discussed elsewhere.
  3241.  
  3242.                See {6.06.07} Graphics Mode Register.
  3243.  
  3244.                Note this setting can be over-ridden by the setting of the Shift
  3245.                Load Four Control bit to <=1>.  See below.
  3246.  
  3247.          <=1>  Reload the video shift registers on every second character clock
  3248.                permitting use of slow image memory chips.  The reload accesses
  3249.                two memory locations in parallel;  the length of the video shift
  3250.                register is doubled.  This permits using a slower video memory
  3251.                than would otherwise be possible.
  3252.  
  3253.                The ability to load more than one byte per character clock can
  3254.                assist with display image memory address extension schemes, by
  3255.                making certain of the low order address bits redundant.
  3256.  
  3257.                See {6.05.25} CRTC Mode Control Register.
  3258.  
  3259.                The loading of more than one shift register per character clock
  3260.                also has implications for shift register interconnection.  This
  3261.                is discussed elsewhere.
  3262.  
  3263.                See {6.06.07} Graphics Mode Register.
  3264.  
  3265.                Note this setting can be over-ridden by the setting of the Shift
  3266.                Load Four Control bit to <=1>.  See below.
  3267.  
  3268.  
  3269. <3>      Dot Clock Divide by Two Enable
  3270.          ------------------------------
  3271.  
  3272.          <=0>  The normal dot clock frequency is available.  This means that a
  3273.                single pixel will be displayed for each dot clock period.  This
  3274.                is the normal setting for this bit.  It provides maximum image
  3275.                resolution on the display unit.
  3276.  
  3277.                There are controls available to select dot clock frequency and
  3278.                dot clock division ratios.
  3279.  
  3280.                See {6.09.01} Miscellaneous Output Register.
  3281.                See {6.10.04} Mode Control Register 2.
  3282.  
  3283.          <=1>  The dot clock frequency is divided by two.  In this manner, the
  3284.                quantity of image data available is reduced by two.  This means
  3285.                that the data from what would have been originally one pixel is
  3286.                now used to specify two pixels.  The result is a reduction in
  3287.                the image resolution to one half of the original value.  At the
  3288.                same time, any image will extend to twice the original size.
  3289.                Commonly used for low resolution text displays at 40 characters
  3290.                per line.
  3291.  
  3292.                There are controls available to select dot clock frequency and
  3293.                dot clock division ratios.
  3294.  
  3295.                See {6.09.01} Miscellaneous Output Register.
  3296.                See {6.10.04} Mode Control Register 2.
  3297.  
  3298.  
  3299. <4>      Shift Load Four Control
  3300.          -----------------------
  3301.  
  3302.          <=0>  Reload the video shift registers on each character clock.  This
  3303.                assumes that the video memory can respond fast enough to permit
  3304.                safe operation at the frequency of the character clock.  With a
  3305.                contemporary design, this is not a problem.  This is the normal
  3306.                value for the bit.
  3307.  
  3308.                The ability to load more than one byte per character clock can
  3309.                assist with display image memory address extension schemes, by
  3310.                making certain of the low order address bits redundant.
  3311.  
  3312.                See {6.05.25} CRTC Mode Control Register.
  3313.  
  3314.                The loading of more than one shift register per character clock
  3315.                also has implications for shift register interconnection.  This
  3316.                is discussed elsewhere.
  3317.  
  3318.                See {6.06.07} Graphics Mode Register.
  3319.  
  3320.                Note this setting can be over-ridden by the setting of the Shift
  3321.                Load Two Control bit to <=1>.  See above.
  3322.  
  3323.          <=1>  Reload the video shift registers on every fourth character clock
  3324.                permitting use of slow image memory chips.  The reload accesses
  3325.                four memory locations in parallel;  the width of the video shift
  3326.                register is quadrupled.  This permits a much slower video memory
  3327.                to be used than would otherwise be possible.  This feature does
  3328.                not find any use in contemporary designs unless used for address
  3329.                extension schemes.
  3330.  
  3331.                The ability to load more than one byte per character clock can
  3332.                assist with display image memory address extension schemes, by
  3333.                making certain of the low order address bits redundant.
  3334.  
  3335.                See {6.05.25} CRTC Mode Control Register.
  3336.  
  3337.                The loading of more than one shift register per character clock
  3338.                also has implications for shift register interconnection.  This
  3339.                is discussed elsewhere.
  3340.  
  3341.                See {6.06.07} Graphics Mode Register.
  3342.  
  3343.                Note this setting is dominant over the setting of the Shift Load
  3344.                Two Control bit.  See above.
  3345.  
  3346.  
  3347. <5>      Screen Inhibit
  3348.          --------------
  3349.  
  3350.          <=0>  The display screen operates normally.  The contents of the image
  3351.                memory are displayed as usual, depending on the specified modes
  3352.                of the VGA controller chip.
  3353.  
  3354.          <=1>  The display screen is blanked.  The image memory is not accessed
  3355.                for purposes of maintaining the display.  This means that there
  3356.                is full memory bandwidth available for processor access to image
  3357.                memory.  During this period, the display screen remains blanked.
  3358.                However the display remains synchronised with the VGA controller
  3359.                so that the display can be re-enabled at any time.
  3360.  
  3361.                This facility is sometimes used to update a complex image such
  3362.                that the update itself cannot be viewed as it occurs.  When the
  3363.                update is complete, the screen is re-enabled for normal use.
  3364.                Since image memory access is much faster than normal, an update
  3365.                made in this way can be completed in significantly less time.
  3366.  
  3367.  
  3368. <7..6>   Reserved.  Always <=00>.
  3369.          ------------------------
  3370.  
  3371.  
  3372.          Prior to any change to the Clocking Mode Register, the sequencer must
  3373.          be temporarily shut down.  This avoids corrupted timing generation in
  3374.          the VGA controller.
  3375.  
  3376.          See {6.04.02} Reset Register.
  3377.  
  3378.          The display generation mode is either text mode or graphic mode.
  3379.  
  3380.          See {6.06.08} Miscellaneous Register.
  3381.  
  3382.  
  3383.  
  3384.  
  3385. 6.04.04  Map Mask Register               { 3c5h    02h    R/W }
  3386. =======  ======================================================
  3387.  
  3388.  
  3389. Cross reference with {6.04.06} Sequencer Memory Mode Register.
  3390. Cross reference with {6.06.02} Set/Reset Register.
  3391.  
  3392.  
  3393. <0>      Map Plane 0 Write Enable Control
  3394.          --------------------------------
  3395.  
  3396.          <=0>  Disable memory plane 0.  This prevents data being written to the
  3397.                image plane 0 by any processor write operation to image memory.
  3398.                Using this facility, plane 0 contents can be preserved across a
  3399.                write operation which updates some of the other memory planes.
  3400.  
  3401.          <=1>  Enable memory plane 0.  A processor write operation will be able
  3402.                to modify data stored in the image memory plane 0.  Unless there
  3403.                is at least one memory plane enabled, processor writes will not
  3404.                affect image memory in any way.
  3405.  
  3406.                Note when operating in Packed Pixel mode, all memory planes must
  3407.                be enabled.  See {6.04.06} Sequencer Memory Mode Register.
  3408.  
  3409.  
  3410. <1>      Map Plane 1 Write Enable Control
  3411.          --------------------------------
  3412.  
  3413.          <=0>  Disable memory plane 1.  This prevents data being written to the
  3414.                image plane 1 by any processor write operation to image memory.
  3415.                Using this facility, plane 1 contents can be preserved across a
  3416.                write operation which updates some of the other memory planes.
  3417.  
  3418.          <=1>  Enable memory plane 1.  A processor write operation will be able
  3419.                to modify data stored in the image memory plane 1.  Unless there
  3420.                is at least one memory plane enabled, processor writes will not
  3421.                affect image memory in any way.
  3422.  
  3423.                Note when operating in Packed Pixel mode, all memory planes must
  3424.                be enabled.  See {6.04.06} Sequencer Memory Mode Register.
  3425.  
  3426.  
  3427. <2>      Map Plane 2 Write Enable Control
  3428.          --------------------------------
  3429.  
  3430.          <=0>  Disable memory plane 2.  This prevents data being written to the
  3431.                image plane 2 by any processor write operation to image memory.
  3432.                Using this facility, plane 2 contents can be preserved across a
  3433.                write operation which updates some of the other memory planes.
  3434.  
  3435.          <=1>  Enable memory plane 2.  A processor write operation will be able
  3436.                to modify data stored in the image memory plane 2.  Unless there
  3437.                is at least one memory plane enabled, processor writes will not
  3438.                affect image memory in any way.
  3439.  
  3440.                Note when operating in Packed Pixel mode, all memory planes must
  3441.                be enabled.  See {6.04.06} Sequencer Memory Mode Register.
  3442.  
  3443.  
  3444. <3>      Map Plane 3 Write Enable Control
  3445.          --------------------------------
  3446.  
  3447.          <=0>  Disable memory plane 3.  This prevents data being written to the
  3448.                image plane 3 by any processor write operation to image memory.
  3449.                Using this facility, plane 3 contents can be preserved across a
  3450.                write operation which updates some of the other memory planes.
  3451.  
  3452.          <=1>  Enable memory plane 3.  A processor write operation will be able
  3453.                to modify data stored in the image memory plane 3.  Unless there
  3454.                is at least one memory plane enabled, processor writes will not
  3455.                affect image memory in any way.
  3456.  
  3457.                Note when operating in Packed Pixel mode, all memory planes must
  3458.                be enabled.  See {6.04.06} Sequencer Memory Mode Register.
  3459.  
  3460.  
  3461.  
  3462. <7..4>   Reserved.  Always <=0000>.
  3463.  
  3464.  
  3465.  
  3466.  
  3467. 6.04.05  Character Map Select Register   { 3c5h    03h    R/W }
  3468. =======  ======================================================
  3469.  
  3470.  
  3471. Cross reference with {6.04.06} Sequencer Memory Mode Register.
  3472. Cross reference with {6.05.22} Underline Location Register.
  3473. Cross reference with {6.06.08} Miscellaneous Register.
  3474. Cross reference with {6.07.18} Attribute Mode Control Register.
  3475. Cross reference with {6.10.04} Mode Control Register 2.
  3476.  
  3477.  
  3478. <0>      Character Font Memory Map 'B' Partial Offset 16K byte
  3479.          -----------------------------------------------------
  3480.  
  3481.          <=0>  Character Font Memory Map partial offset set to 00K byte
  3482.          <=1>  Character Font Memory Map partial offset set to 16K byte
  3483.  
  3484.  
  3485. <1>      Character Font Memory Map 'B' Partial Offset 32K byte
  3486.          -----------------------------------------------------
  3487.  
  3488.          <=0>  Character Font Memory Map partial offset set to 00K byte
  3489.          <=1>  Character Font Memory Map partial offset set to 32K byte
  3490.  
  3491.  
  3492. <2>      Character Font Memory Map 'A' Partial Offset 16K byte
  3493.          -----------------------------------------------------
  3494.  
  3495.          <=0>  Character Font Memory Map partial offset set to 00K byte
  3496.          <=1>  Character Font Memory Map partial offset set to 16K byte
  3497.  
  3498.  
  3499. <3>      Character Font Memory Map 'A' Partial Offset 32K byte
  3500.          -----------------------------------------------------
  3501.  
  3502.          <=0>  Character Font Memory Map partial offset set to 00K byte
  3503.          <=1>  Character Font Memory Map partial offset set to 32K byte
  3504.  
  3505.  
  3506. <4>      Character Font Memory Map 'B' Partial Offset 08K byte
  3507.          -----------------------------------------------------
  3508.  
  3509.          <=0>  Character Font Memory Map partial offset set to 00K byte
  3510.          <=1>  Character Font Memory Map partial offset set to 08K byte
  3511.  
  3512.  
  3513. <5>      Character Font Memory Map 'A' Partial Offset 08K byte
  3514.          -----------------------------------------------------
  3515.  
  3516.          <=0>  Character Font Memory Map partial offset set to 00K byte
  3517.          <=1>  Character Font Memory Map partial offset set to 08K byte
  3518.  
  3519.  
  3520. <7..6>   Reserved.  Always <=00>.
  3521.          ------------------------
  3522.  
  3523.  
  3524.          Text mode results in character generation through hardware capability
  3525.          with the character fonts being brought into use.
  3526.  
  3527.          See {6.06.08} Miscellaneous Register.
  3528.  
  3529.          This register only becomes active when the Memory Size Specification
  3530.          indicates that more than 64K of image memory is present.
  3531.  
  3532.          See {6.04.06} Sequencer Memory Mode Register.
  3533.  
  3534.          When the fonts selected by the A and B maps are identical, there is a
  3535.          change made to the text mode attribute byte bit 3 interpretation.  In
  3536.          this situation, bit 3 specifies the foreground intensity.
  3537.  
  3538.          See {6.05.22} Underline Location Register.
  3539.  
  3540.          When the fonts are distinct, text mode attribute byte bit 3 selects
  3541.          which of the character fonts to use, either A, or B.  When the value
  3542.          of bit 3 is zero, font A is used.  Otherwise, font B is selected.
  3543.  
  3544.          See {6.05.22} Underline Location Register.
  3545.  
  3546.          There is the possibility to extend the character set selection with
  3547.          an extension to the addressing capability for a character font base
  3548.          address.
  3549.  
  3550.          See {6.10.04} Mode Control Register 2.
  3551.  
  3552.          For convenience, the bit patterns associated with the different font
  3553.          memory offsets are specified below.  They are identical for both A,B
  3554.          maps, but are shown in different sorted orders below for ease of use.
  3555.  
  3556.          Note that the hardware requires all character font data to reside in
  3557.          image memory plane 2.  This cannot be circumvented by software unless
  3558.          the hardware character generator is not used.  This situation results
  3559.          in a much slower text display than that obtainable with the hardware,
  3560.          but is essential for generation of text in graphics display modes.
  3561.  
  3562.  
  3563. <5|3|2>  Character Map Select A
  3564.          ----------------------
  3565.  
  3566.          <=000>  Select Character Map Memory offset 00K
  3567.          <=100>  Select Character Map Memory offset 08K
  3568.          <=001>  Select Character Map Memory offset 16K
  3569.          <=101>  Select Character Map Memory offset 24K
  3570.          <=010>  Select Character Map Memory offset 32K
  3571.          <=110>  Select Character Map Memory offset 40K
  3572.          <=011>  Select Character Map Memory offset 48K
  3573.          <=111>  Select Character Map Memory offset 56K
  3574.  
  3575.  
  3576. <4|1|0>  Character Map Select B
  3577.          ----------------------
  3578.  
  3579.          <=000>  Select Character Map Memory offset 00K
  3580.          <=001>  Select Character Map Memory offset 16K
  3581.          <=010>  Select Character Map Memory offset 32K
  3582.          <=011>  Select Character Map Memory offset 48K
  3583.          <=100>  Select Character Map Memory offset 08K
  3584.          <=101>  Select Character Map Memory offset 24K
  3585.          <=110>  Select Character Map Memory offset 40K
  3586.          <=111>  Select Character Map Memory offset 56K
  3587.  
  3588.  
  3589.  
  3590.  
  3591. 6.04.06  Sequencer Memory Mode Register  { 3c5h    04h    R/W }
  3592. =======  ======================================================
  3593.  
  3594.  
  3595. Cross reference with {6.04.04} Map Mask Register.
  3596. Cross reference with {6.04.05} Character Map Select Register.
  3597. Cross reference with {6.06.02} Set/Reset Register.
  3598. Cross reference with {6.06.06} Read Map Select Register.
  3599. Cross reference with {6.06.07} Graphics Mode Register.
  3600. Cross reference with {6.06.08} Miscellaneous Register.
  3601. Cross reference with {6.09.01} Miscellaneous Output Register.
  3602. Cross reference with {6.10.05} Mode Control Register 1.
  3603.  
  3604.  
  3605. <0>      Reserved.  Always <=0>.
  3606.          -----------------------
  3607.  
  3608.  
  3609. <1>      Memory Size Specification
  3610.          -------------------------
  3611.  
  3612.          <=0>  Specifies that the total image memory installed is 64K bytes.
  3613.                This feature was used historically when image memory was very
  3614.                much more expensive than contemporary pricing.  The option is
  3615.                not used today.  When this setting is active, feature support
  3616.                for multiple character sets is inhibited.  In consequence the
  3617.                Character Map Select Register is disabled.
  3618.  
  3619.                See {6.04.05} Character Map Select Register.
  3620.  
  3621.          <=1>  Specifies that more than 64K bytes of image memory is available.
  3622.                This used to be 256K bytes in earlier design implementations but
  3623.                this value is likely to be too small now.  It is usual for image
  3624.                memory sizing to be 1024K bytes at the time of writing.  This is
  3625.                is the standard setting in use today.  With this setting active,
  3626.                the Character Map Select Register features become operative.  In
  3627.                addition, the display memory address counter higher order output
  3628.                bits become active, permitting use of a larger addressing range.
  3629.  
  3630.                See {6.04.05} Character Map Select Register.
  3631.  
  3632.  
  3633. <2>      Processor Image Memory Access Mode Select
  3634.          -----------------------------------------
  3635.  
  3636.          <=0>  Text Memory Access Mode.  This affects a data transfer from the
  3637.                processor to the image memory such that it is suitable for text
  3638.                mode operations.  The processor transfers 16 bits per access to
  3639.                image memory in text mode.  The data consists of a character in
  3640.                the current character set together with an attribute byte which
  3641.                exterts control over the character presentation on the display.
  3642.  
  3643.                For text mode display character codes occupy image memory plane
  3644.                zero with attribute data occupying plane one.  The image memory
  3645.                planes are paired (0,1) and (2,3).  The Text Memory Access Mode
  3646.                directs even address accesses to planes (0,2), with odd address
  3647.                accesses directed to planes (1,3).  In this way maximum ease of
  3648.                access is provided for textual data update.  This is sometimes
  3649.                termed odd/even mode.
  3650.  
  3651.                To use this mode effectively it is usual to disable writes to a
  3652.                pair of planes so permitting update to a two plane pair.
  3653.  
  3654.                See {6.04.04} Map Mask Register.
  3655.  
  3656.                Only processor writes to image memory are affected by this mode.
  3657.                That is, image memory organisation continues to be multiplane in
  3658.                all respects except as described above during write addressing.
  3659.  
  3660.                Processor Image Memory Access Mapping Select must be set to zero
  3661.                for this setting to be effective.  See below.
  3662.  
  3663.          <=1>  Graphics Memory Access Mode.  In graphics mode the image memory
  3664.                planes respond to addresses from the processor in parallel.  In
  3665.                this way, all four memory planes can be read or written using a
  3666.                single access.  The processor data transfer supports only 8 bit
  3667.                transfers, so various mechanisms are employed to map the 8 bits
  3668.                to each of the four bytes actually accessed.  In some cases, it
  3669.                is not necessary to perform any mapping of this type at all, as
  3670.                the processor is used only to generate an address which is then
  3671.                used internally for image manipulation.
  3672.  
  3673.                The manipulation is specified in advance and all that is needed
  3674.                is a stream of processor generated addresses to put the process
  3675.                into operation.  This type of operation is very fast to execute.
  3676.                It is discussed during the description of write mode 1.
  3677.  
  3678.                See {6.06.02} Set/Reset Register.
  3679.  
  3680.                Processor Image Memory Access Mapping Select must be set to zero
  3681.                for this setting to be effective.  See below.
  3682.  
  3683.                See {6.06.07} Graphics Mode Register.
  3684.  
  3685.          This is rather similar to the Memory Plane Pairing Control.
  3686.          See {6.06.08} Miscellaneous Register.
  3687.  
  3688.  
  3689. <3>      Processor Image Memory Access Mapping Select
  3690.          --------------------------------------------
  3691.  
  3692.          <=0>  The processor accesses all four image memory planes using a
  3693.                single access.  The access for write is modified for each of
  3694.                the memory planes by means of the Map Mask Register.  This
  3695.                permits multiple plane writes to take place, which is useful
  3696.                when graphics mode multi-plane operation is in effect.  Each
  3697.                memory plane contains all the information of a given colour.
  3698.                Using multi-plane writes gives the capability to selectively
  3699.                change more than one colour plane for each of eight pixels,
  3700.                using one memory access.  This makes for high speed updates.
  3701.  
  3702.                See the {6.04.04} Map Mask Register.
  3703.  
  3704.                The processor write accesses can be further determined with
  3705.                the Processor Image Memory Access Mode Select, when this is
  3706.                the selected setting.  See above.
  3707.  
  3708.                See {6.06.06} Read Map Select Register.
  3709.  
  3710.          <=1>  The processor accesses a single image memory plane during a
  3711.                single access.  This memory plane is identified by the two
  3712.                least significant bits of the memory address.  This provides
  3713.                a convenient means for access to image memory when packed
  3714.                pixel operation is in use.  Packed pixel images do not use
  3715.                multiple memory planes for colour definition.  Instead, each
  3716.                memory plane is accessed in turn, and the byte specifies the
  3717.                colour directly.  For this type of image, the processor need
  3718.                is for single byte access to successive image planes as this
  3719.                setting provides.  Of course only 16K bytes of each plane is
  3720.                accessible without changing the memory mapping in this mode.
  3721.                {Four planes with a 64K processor access window.}
  3722.  
  3723.                See {6.10.05} Mode Control Register 1.
  3724.  
  3725.                All effects of Processor Image Memory Access Mode Select, as
  3726.                specified above, are made null when this setting is active.
  3727.  
  3728.                See {6.06.06} Read Map Select Register.
  3729.  
  3730.  
  3731. <7..4>   Reserved.  Always <=0000>.
  3732.          --------------------------
  3733.  
  3734.  
  3735.  
  3736.  
  3737.          A Synopsis of Display Image Memory Access Control
  3738.          =================================================
  3739.  
  3740.  
  3741.          Processor Image Memory Access Mapping Select
  3742.          =-------------------------------------------
  3743.  
  3744.               Processor Image Memory Access Mode Select
  3745.          =    =----------------------------------------
  3746.  
  3747.                    Processor Display Memory Addressing
  3748.          =    =    ===================================------------------
  3749.  
  3750.  
  3751.          0    0    Text access; odd/even mode; the low order address bit
  3752.                    selects the pair of planes to access.  Even addresses
  3753.                    select the pair (0,2) and odd addresses (1,3).
  3754.  
  3755.                    In all other respects the memory organisation remains
  3756.                    multiplane.
  3757.  
  3758.                    Data transfers are by word from the processor in this
  3759.                    memory mode, with a character code and attribute byte
  3760.                    sent together.  Memory planes 2,3 are write inhibited
  3761.                    to preserve the character font data in plane 2.
  3762.  
  3763.                    The Read Map Select field bit 0 is not used for this
  3764.                    memory mode.  The remaining bit 1 selects a plane in
  3765.                    the pair of planes determined by the access address,
  3766.                    for read mode 0.
  3767.  
  3768.                    See {6.06.06} Read Map Select Register.
  3769.  
  3770.          0    1    Multiplane access; the planes are written by using a
  3771.                    write mode and read using a read mode.  The plane is
  3772.                    selected by means of special registers used by these
  3773.                    read and write modes.  This organisation supports 16
  3774.                    colours, with 8 pixels per byte across 4 planes at a
  3775.                    single image memory byte address.
  3776.  
  3777.                    Data transfers are single byte from the processor in
  3778.                    this memory mode.
  3779.  
  3780.                    The Read Map Select field denotes the plane number to
  3781.                    be read by a read mode 0 access, in this memory mode.
  3782.                    Planes 0 through 3 are therefore accessible.
  3783.  
  3784.                    See {6.06.06} Read Map Select Register.
  3785.  
  3786.  
  3787.          1    0    The two low order address bits are the plane address;
  3788.                    the remaining address bits are shifted down to become
  3789.                    a byte address into multiplane memory.  This supports
  3790.                    256 colour packed pixel mode, where a byte represents
  3791.                    the colour data for a single pixel.
  3792.  
  3793.                    Data transfers are single byte from the processor in
  3794.                    this memory mode.
  3795.  
  3796.                    All two bits of the Read Map Select field are ignored
  3797.                    in this memory mode, for read mode 0 access.
  3798.  
  3799.                    See {6.06.06} Read Map Select Register.
  3800.  
  3801.  
  3802.          1    1    The two low order address bits are the plane address;
  3803.                    the remaining address bits are shifted down to become
  3804.                    a byte address into multiplane memory.  This supports
  3805.                    256 colour packed pixel mode, where a byte represents
  3806.                    the colour data for a single pixel.
  3807.  
  3808.                    Data transfers are single byte from the processor in
  3809.                    this memory mode, for read mode 0 access.
  3810.  
  3811.                    All two bits of the Read Map Select field are ignored
  3812.                    in this memory mode.
  3813.  
  3814.                    See {6.06.06} Read Map Select Register.
  3815.  
  3816.  
  3817.          ---------------------------------------------------------------
  3818.  
  3819.  
  3820.  
  3821.  
  3822. 6.04.07  ................................{ 3c5h    07h    R/W }
  3823. 6.04.07  Horizontal Character Counter Reset Register...........
  3824. =======  ======================================================
  3825.  
  3826.  
  3827.          This existance of this register is not formally recognised.
  3828.          It has only been discovered through reverse engineering the
  3829.          original VGA controller design.  For this reason, it cannot
  3830.          be guaranteed to exist in all clone chips.  The origin of
  3831.          this information is the Chips 82C456 chip documentation.
  3832.  
  3833.  
  3834. <7..0>   Horizontal Character Counter Reset
  3835.          ----------------------------------
  3836.  
  3837.          When any write operation occurs to this register, with data of any
  3838.          value, a special state is entered.  This state holds the horizontal
  3839.          character counter in a permanent reset, making it hold the value 0.
  3840.  
  3841.          A write to any sequencer register in the index range 0..6 will make
  3842.          the special reset state terminate.  Then the horizontal character
  3843.          counter is free to respond to character clocks as usual.
  3844.  
  3845.          The character row counter which counts all active display scan lines
  3846.          is clocked using a horizontal character counter derived signal.  If
  3847.          the character counter reset state is entered during the vertical
  3848.          retrace period, then releasing the reset state will permit display
  3849.          operation to recommence in a synchronised manner.
  3850.  
  3851.          The motivation for this functionality is that of synchronisation to
  3852.          an external event.  This affords the possibility of a display being
  3853.          synchronised to some event of interest, which might be the case for
  3854.          a system which photographs a display screen for example.  Since the
  3855.          functionality has never been officially documented, the use is made
  3856.          unsafe from a portability point of view across many VGA chips.
  3857.  
  3858.  
  3859.  
  3860.  
  3861. 6.05  Register specifications: CRT Controller
  3862. ====  =======================================
  3863.  
  3864.  
  3865. 6.05.01  CRT Controller Address Register          { 3?4h    ---    R/W }
  3866. =======  ===============================================================
  3867.  
  3868.  
  3869. Cross reference with {6.09.01} Miscellaneous Output Register.
  3870. Cross reference with {6.10.09} CPU Latch Read Back Register.
  3871.  
  3872.  
  3873. <5..0>   CRT Controller Register Address
  3874.          -------------------------------
  3875.  
  3876.          Port 3?5h accesses the register pointed to by the index number in this
  3877.          bit field.  Index number zero is represented by <=000000>.
  3878.  
  3879.          The value of the hexadecimal digit '?' used in defining input output
  3880.          port addresses is either hex 'b' or hex 'd' depending upon the setting
  3881.          of the Miscellaneous Output Register Input Output Address Select bit.
  3882.  
  3883.          See {6.09.01} Miscellaneous Output Register.
  3884.  
  3885.          Note that bit <5> is normally set to zero, but can be used for access
  3886.          to registers normally used for manufacturing test.  These are special
  3887.          registers which are specific to the Trident 8900 chip.
  3888.  
  3889.          See {6.10.09} CPU Latch Read Back Register.
  3890.  
  3891.  
  3892. <7..6>   Reserved.  Always <=00>.
  3893.          ------------------------
  3894.  
  3895.  
  3896.  
  3897.  
  3898. 6.05.02  Horizontal Total Register                { 3?5h    00h    R/W }
  3899. =======  ===============================================================
  3900.  
  3901.  
  3902. Cross reference with {6.04.03} Clocking Mode Register.
  3903. Cross reference with {6.05.03} Horizontal Display Enable End Register.
  3904. Cross reference with {6.05.04} Start Horizontal Blanking Register.
  3905. Cross reference with {6.05.05} End Horizontal Blanking Register.
  3906. Cross reference with {6.05.06} Start Horizontal Retrace Pulse Register.
  3907. Cross reference with {6.05.07} End Horizontal Retrace Register.
  3908. Cross reference with {6.07.19} Overscan Colour Register.
  3909. Cross reference with {6.09.01} Miscellaneous Output Register.
  3910. Cross reference with {6.10.07} CRTC Module Testing Register.
  3911.  
  3912.  
  3913.          This register is subject to write protection through option setting.
  3914.          The whole register is affected.
  3915.  
  3916.          See {6.10.07} CRTC Module Testing Register.
  3917.  
  3918.  
  3919. <7..0>   Horizontal Total
  3920.          ----------------
  3921.  
  3922.          This register specifies the total time required to enable a scan line
  3923.          to complete, and the next scan line to start, such that the positions
  3924.          are identical on successive scan lines.  This is equivalent to seeing
  3925.          scan line generation as a repetitive operation, and allowing a fixed
  3926.          amount of time for the production of a full scan line followed by the
  3927.          full retrace interval.  This register provides the means to tell when
  3928.          a new scan line period is about to start.  Character periods are the
  3929.          unit of measurement.
  3930.  
  3931.          Note that this is not the same as determining when a new scan line is
  3932.          about to start.  See below for details.
  3933.  
  3934.          Note that the width of a character in text mode can be changed from
  3935.          8 pixels to 9 pixels which would change the apparent scan line time.
  3936.          See {6.04.03} Clocking Mode Register.
  3937.  
  3938.          Because the hardware is pipelined, the number actually appearing in
  3939.          this register is the total time in character periods, minus five.
  3940.  
  3941.          When the number actually actually appearing in this register matches
  3942.          the contents of the horizontal character counter, the preparations
  3943.          needed for reset of the latter register are put into effect.  After
  3944.          five more character clock periods, the reset takes place.  For this
  3945.          reason, the horizontal character counter will continue to count past
  3946.          the value determined in the Horizontal Total Register.  This implies
  3947.          that further value matches are possible before the counter is reset.
  3948.          In practice, the End Horizontal Blanking Register matches during the
  3949.          five character clock over-run period.  See below for details.
  3950.  
  3951.          Prior to the reset, border colour generation should have recommenced
  3952.          with the completion of the display blanking period.
  3953.  
  3954.          See {6.05.05} End Horizontal Blanking Register.
  3955.          See {6.07.19} Overscan Colour Register.
  3956.  
  3957.          The effect of the reset is that border colour generation is finished,
  3958.          and the display unit begins to display actual image data.
  3959.  
  3960.  
  3961.  
  3962.          Overview of relationship with other registers
  3963.          =============================================
  3964.  
  3965.          This register is used with the horizontal character counter, which is
  3966.          the master timing reference.  The values of this counter begin at zero
  3967.          and increase successively through the scan line.  When the counter is
  3968.          equal to the Horizontal Total, preparations are made for the counter
  3969.          to be reset back to zero.  After five further character clock periods
  3970.          this reset actually takes place.  All the horizontal timing is derived
  3971.          from values which match this counter as it increases from zero to the
  3972.          maximum value.  A scan line is commenced just before the counter is
  3973.          reset to zero, so there is a small offset between the display physical
  3974.          scan line position and the value of the horizontal character counter.
  3975.  
  3976.          By convention, when the horizontal character counter is reset to zero,
  3977.          the scan line begins to generate the display using image data.  Prior
  3978.          to that moment, border colour will be generated, without use of image
  3979.          data.  The display image will commence part way through the scan line
  3980.          so that there is an offset between actual counter values and the real
  3981.          position of the electron beam(s) forming the (colour) display image.
  3982.  
  3983.          To make this point clear, we give a value map which relates the value
  3984.          in the horizontal character counter to the activity of the display.
  3985.  
  3986.          The actual values given in hex are taken from the settings used by the
  3987.          bios, when video mode 10h is in effect.  These values are illustrative
  3988.          of the conceptual approach required when formulating register values.
  3989.  
  3990.          Please note that these values may have to be encoded before actually
  3991.          being used.  For example, some registers do not fully specify all the
  3992.          eight bits of the horizontal character counter.  Sometimes, a setting
  3993.          is split across two different registers.  The values given here are
  3994.          the functional values which do not take these coding conventions into
  3995.          account.  We mention this point to avoid possible confusion between
  3996.          functional values and their coded representation in registers.
  3997.  
  3998.          See {6.05.02} Horizontal Total Register. {This.}
  3999.          See {6.05.03} Horizontal Display Enable End Register.
  4000.          See {6.05.04} Start Horizontal Blanking Register.
  4001.          See {6.05.05} End Horizontal Blanking Register.
  4002.          See {6.05.06} Start Horizontal Retrace Pulse Register.
  4003.          See {6.05.07} End Horizontal Retrace Register.
  4004.  
  4005.  
  4006.  
  4007.  
  4008.  Hex     Register name     Corresponding Display Activity
  4009.  ===     =============     ==============================
  4010.  
  4011.  
  4012.  00      [Zero]
  4013.  
  4014.          ------------>     Horizontal Character Counter start.................
  4015.          ------------>     Border Colour end...............................  |
  4016.          ------------>     Image display start..............              |  |
  4017.                                                            |              |  |
  4018.                                                            |              |  |
  4019.  4f      {6.05.03} Horizontal Display Enable End Register  |              |  |
  4020.                                                            |              |  |
  4021.          ------------>     Image display end...............|              |  |
  4022.          ------------>     Border Colour start.................           |  |
  4023.                                                               |           |  |
  4024.                                                               |           |  |
  4025.  50      {6.05.04} Start Horizontal Blanking Register         |           |  |
  4026.                                                               |           |  |
  4027.          ------------>     Border Colour end..................|           |  |                                            |
  4028.          ------------>     Display blanked start........................  |  |
  4029.                                                                        |  |  |
  4030.                                                                        |  |  |
  4031.  54      {6.05.06} Start Horizontal Retrace Pulse Register             |  |  |
  4032.                                                                        |  |  |
  4033.          ------------>     Scan line end.............................  |  |  |
  4034.          ------------>     Horizontal Retrace start...............  |  |  |  |
  4035.                                                                  |  |  |  |  |
  4036.                                                                  |  |  |  |  |
  4037.  5f      {6.05.02} Horizontal Total Register - {A}               |  |  |  |  |
  4038.                                                                  |  |  |  |  |
  4039.          ------------>     Horizontal character                  |  |  |  |  |
  4040.          ------------>     counter prepared for                  |  |  |  |  |
  4041.          ------------>     reset to zero                         |  |  |  |  |
  4042.                                                                  |  |  |  |  |
  4043.                                                                  |  |  |  |  |
  4044.  61      {6.05.07} End Horizontal Retrace Register               |  |  |  |  |
  4045.                                                                  |  |  |  |  |
  4046.          ------------>     Horizontal Retrace end................|  |  |  |  |
  4047.          ------------>     Scan line start..........................|  |  |  |
  4048.                                                                        |  |  |
  4049.                                                                        |  |  |
  4050.  62      {6.05.05} End Horizontal Blanking Register                    |  |  |
  4051.                                                                        |  |  |
  4052.          ------------>     Display blanked end.........................|  |  |
  4053.          ------------>     Border Colour start............................|  |
  4054.                                                                              |
  4055.                                                                              |
  4056.          {6.05.02} Horizontal Total Register - {B}                           |
  4057.                                                                              |
  4058.  64      ------------>     Horizontal character                              |
  4059.          ------------>     counter is actually                               |
  4060.                            reset to zero.....................................|
  4061.  
  4062.  
  4063.  
  4064.  
  4065. 6.05.03  Horizontal Display Enable End Register   { 3?5h    01h    R/W }
  4066. =======  ===============================================================
  4067.  
  4068.  
  4069. Cross reference with {6.04.03} Clocking Mode Register.
  4070. Cross reference with {6.05.02} Horizontal Total Register.
  4071. Cross reference with {6.05.04} Start Horizontal Blanking Register.
  4072. Cross reference with {6.07.19} Overscan Colour Register.
  4073. Cross reference with {6.10.07} CRTC Module Testing Register.
  4074.  
  4075.  
  4076.          This register is subject to write protection through option setting.
  4077.          The whole register is affected.
  4078.  
  4079.          See {6.10.07} CRTC Module Testing Register.
  4080.  
  4081.  
  4082. <7..0>   Horizontal Display Enable
  4083.          -------------------------
  4084.  
  4085.          This register specifies the total time during which a single scan line
  4086.          will actually display image data. The character period is the unit for
  4087.          measurement.  This determines the length of a scan line in character
  4088.          periods.  This measure is independant of the means by which the image
  4089.          is generated.  It is therefore valid for text mode or graphics mode.
  4090.          See {6.05.02} Horizontal Total Register.
  4091.  
  4092.          Note that the width of a character in text mode can be changed from
  4093.          8 pixels to 9 pixels which would change the apparent scan line time.
  4094.          See {6.04.03} Clocking Mode Register.
  4095.  
  4096.          Because the hardware represents this period by means of the horizontal
  4097.          character counter which starts the active display period with a value
  4098.          of zero, at the end of the active display period the counter will have
  4099.          a value equal to the display time in character periods, minus one.  It
  4100.          is that period value minus one which is programmed into this register.
  4101.  
  4102.          This register specifies the start of border colour generation.
  4103.          See {6.05.04} Start Horizontal Blanking Register.
  4104.          See {6.07.19} Overscan Colour Register.
  4105.  
  4106.  
  4107.  
  4108.  
  4109. 6.05.04  Start Horizontal Blanking Register       { 3?5h    02h    R/W }
  4110. =======  ===============================================================
  4111.  
  4112.  
  4113. Cross reference with {6.04.03} Clocking Mode Register.
  4114. Cross reference with {6.05.02} Horizontal Total Register.
  4115. Cross reference with {6.05.03} Horizontal Display Enable End Register.
  4116. Cross reference with {6.07.19} Overscan Colour Register.
  4117. Cross reference with {6.10.07} CRTC Module Testing Register.
  4118.  
  4119.  
  4120.          This register is subject to write protection through option setting.
  4121.          The whole register is affected.
  4122.  
  4123.          See {6.10.07} CRTC Module Testing Register.
  4124.  
  4125.  
  4126. <7..0>   Start Horizontal Blanking
  4127.          -------------------------
  4128.  
  4129.          This register specifies the value of the horizontal character counter
  4130.          when display blanking begins.  This measure is independant of the way
  4131.          in which the image is generated.  It is therefore valid for text mode
  4132.          or graphics mode.
  4133.  
  4134.          See {6.05.02} Horizontal Total Register.
  4135.  
  4136.          Before this point, border colour generation will have been started.
  4137.  
  4138.          See {6.05.03} Horizontal Display Enable End Register.
  4139.          See {6.07.19} Overscan Colour Register.
  4140.  
  4141.          This point determines the end of the border colour generation.
  4142.  
  4143.          Note that the width of a character in text mode can be changed from
  4144.          8 pixels to 9 pixels which would change the apparent scan line time.
  4145.  
  4146.          See {6.04.03} Clocking Mode Register.
  4147.  
  4148.  
  4149.  
  4150.  
  4151. 6.05.05  End Horizontal Blanking Register         { 3?5h    03h    R/W }
  4152. =======  ===============================================================
  4153.  
  4154.  
  4155. Cross reference with {6.04.03} Clocking Mode Register.
  4156. Cross reference with {6.05.02} Horizontal Total Register.
  4157. Cross reference with {6.05.07} End Horizontal Retrace Register.
  4158. Cross reference with {6.05.18} Vertical Retrace Start Register.
  4159. Cross reference with {6.05.19} Vertical Retrace End Register.
  4160. Cross reference with {6.07.19} Overscan Colour Register.
  4161. Cross reference with {6.10.04} Mode Control Register 2.
  4162. Cross reference with {6.10.07} CRTC Module Testing Register.
  4163.  
  4164.  
  4165.          This register is subject to write protection through option setting.
  4166.          The whole register is affected.
  4167.  
  4168.          See {6.10.07} CRTC Module Testing Register.
  4169.  
  4170.  
  4171. <4..0>   End Horizontal Blanking
  4172.          -----------------------
  4173.  
  4174.          This register specifies the value of the horizontal character counter
  4175.          when blanking finishes.  This measure is independant of the means by
  4176.          which the image is generated.  It is therefore valid for text mode or
  4177.          graphics mode.   The full register width is six bits, with the higher
  4178.          order bit stored elsewhere.
  4179.  
  4180.          See {6.05.07} End Horizontal Retrace Register.
  4181.  
  4182.          A discussion of vertical timing generation is available.
  4183.  
  4184.          See {6.05.02} Horizontal Total Register.
  4185.  
  4186.          This determines the start of the border colour generation.
  4187.  
  4188.          See {6.07.19} Overscan Colour Register.
  4189.  
  4190.          Note that the width of a character in text mode can be changed from
  4191.          8 pixels to 9 pixels which would change the apparent scan line time.
  4192.  
  4193.          See {6.04.03} Clocking Mode Register.
  4194.  
  4195.  
  4196. <6..5>   Display Enable Skew
  4197.          -------------------
  4198.  
  4199.          <=00>  0 character clock delay
  4200.          <=01>  1 character clock delay
  4201.          <=10>  2 character clock delay
  4202.          <=11>  3 character clock delay
  4203.  
  4204.          This setting permits compensation for internal delays in the data path
  4205.          of the VGA controller, due to pipelining.
  4206.  
  4207.  
  4208. <7>      Light Pen Register Enable
  4209.          -------------------------
  4210.  
  4211.          This bit is Reserved for the Trident 8900 chip.
  4212.          This bit is used for test with the UM587 chip.
  4213.          The following is valid for the Chips 82C456 chip.
  4214.  
  4215.          <=0>  Enable Lightpen Registers
  4216.                -------------------------
  4217.  
  4218.                The CRTC Registers at indexes 10h, 11h, function as light pen
  4219.                location registers.  In this mode, the register assignments
  4220.                are as follows:
  4221.  
  4222.                10h:  Lightpen High Register.
  4223.                      -----------------------
  4224.  
  4225.                      Read only register representing the character position at
  4226.                      which the lightpen became active.  This portion specifies
  4227.                      the 8 high order bits.
  4228.  
  4229.                      Effective only in MDA/Hercules modes, or when enabled as
  4230.                      described above.  This facility is not used much today,
  4231.                      essentially because of unfavourable results which do not
  4232.                      compare well with other pointing devices.
  4233.  
  4234.                      See {6.05.18} Vertical Retrace Start Register.
  4235.                      See {6.10.04} Mode Control Register 2.
  4236.  
  4237.                11h:  Lightpen Low Register.
  4238.                      ----------------------
  4239.  
  4240.                      Read only register representing the character position at
  4241.                      which the lightpen became active.  This portion specifies
  4242.                      the 8 low order bits.
  4243.  
  4244.                      Effective only in MDA/Hercules modes, or when enabled as
  4245.                      described above.  This facility is not used much today,
  4246.                      essentially because of unfavourable results which do not
  4247.                      compare well with other pointing devices.
  4248.  
  4249.                      See {6.05.19} Vertical Retrace End Register.
  4250.                      See {6.10.04} Mode Control Register 2.
  4251.  
  4252.          <=1>  Normal Operation
  4253.                ----------------
  4254.  
  4255.                The CRTC Registers at indexes 10h, 11h, function as normal.
  4256.  
  4257.                See {6.05.18} Vertical Retrace Start Register.
  4258.                See {6.05.19} Vertical Retrace End Register.
  4259.  
  4260.  
  4261.  
  4262.  
  4263. 6.05.06  Start Horizontal Retrace Pulse Register  { 3?5h    04h    R/W }
  4264. =======  ===============================================================
  4265.  
  4266.  
  4267. Cross reference with {6.04.03} Clocking Mode Register.
  4268. Cross reference with {6.05.02} Horizontal Total Register.
  4269. Cross reference with {6.05.04} Start Horizontal Blanking Register.
  4270. Cross reference with {6.05.05} End Horizontal Blanking Register.
  4271. Cross reference with {6.05.07} End Horizontal Retrace Register.
  4272. Cross reference with {6.10.07} CRTC Module Testing Register.
  4273.  
  4274.  
  4275.          This register is subject to write protection through option setting.
  4276.          The whole register is affected.
  4277.  
  4278.          See {6.10.07} CRTC Module Testing Register.
  4279.  
  4280.  
  4281. <7..0>   Start Horizontal Retrace Pulse
  4282.          ------------------------------
  4283.  
  4284.          This register specifies the value of the horizontal character counter
  4285.          when the horizontal retrace pulse starts.  This measure is independant
  4286.          of the means by which the image is generated.  It is therefore valid
  4287.          for text mode or graphics mode.
  4288.  
  4289.          This point determines where the scan line will end.  The display will
  4290.          have been blanked from a time before the horizontal retrace pulse was
  4291.          started, until some time after the horizontal retrace pulse finished.
  4292.  
  4293.          See {6.05.02} Horizontal Total Register.
  4294.          See {6.05.04} Start Horizontal Blanking Register.
  4295.          See {6.05.05} End Horizontal Blanking Register.
  4296.          See {6.05.07} End Horizontal Retrace Register.
  4297.  
  4298.          This register permits control of display screen horizontal centering.
  4299.  
  4300.          Note that the width of a character in text mode can be changed from
  4301.          8 pixels to 9 pixels which would change the apparent scan line time.
  4302.  
  4303.          See {6.04.03} Clocking Mode Register.
  4304.  
  4305.  
  4306.  
  4307.  
  4308. 6.05.07  End Horizontal Retrace Register          { 3?5h    05h    R/W }
  4309. =======  ===============================================================
  4310.  
  4311.  
  4312. Cross reference with {6.04.03} Clocking Mode Register.
  4313. Cross reference with {6.05.02} Horizontal Total Register.
  4314. Cross reference with {6.05.04} Start Horizontal Blanking Register.
  4315. Cross reference with {6.05.05} End Horizontal Blanking Register.
  4316. Cross reference with {6.05.06} Start Horizontal Retrace Pulse Register.
  4317. Cross reference with {6.10.07} CRTC Module Testing Register.
  4318.  
  4319.  
  4320.          This register is subject to write protection through option setting.
  4321.          The whole register is affected.
  4322.  
  4323.          See {6.10.07} CRTC Module Testing Register.
  4324.  
  4325.  
  4326. <4..0>   End Horizontal Retrace
  4327.          ----------------------
  4328.  
  4329.          This register specifies the value of the horizontal character counter
  4330.          when the horizontal retrace pulse ends.  This measure is independant
  4331.          of the means by which the image is generated.  It is therefore valid
  4332.          for text mode or graphics mode.
  4333.  
  4334.          This point determines when the scan line will start.  The display is
  4335.          blanked from a time before the horizontal retrace pulse was started,
  4336.          until some time after the horizontal retrace pulse was finished.
  4337.  
  4338.          See {6.05.02} Horizontal Total Register.
  4339.          See {6.05.04} Start Horizontal Blanking Register.
  4340.          See {6.05.05} End Horizontal Blanking Register.
  4341.          See {6.05.06} Start Horizontal Retrace Pulse Register.
  4342.  
  4343.          Note that the width of a character in text mode can be changed from
  4344.          8 pixels to 9 pixels which would change the apparent scan line time.
  4345.  
  4346.          See {6.04.03} Clocking Mode Register.
  4347.  
  4348.  
  4349. <6..5>   Horizontal Retrace Skew
  4350.          -----------------------
  4351.  
  4352.          <=00>  0 character clock delay
  4353.          <=01>  1 character clock delay
  4354.          <=10>  2 character clock delay
  4355.          <=11>  3 character clock delay
  4356.  
  4357.          This setting permits compensation for internal delays in the data path
  4358.          of the VGA controller, due to pipelining.
  4359.  
  4360.  
  4361. <7>      End Horizontal Blanking Bit 5
  4362.          -----------------------------
  4363.  
  4364.          This bit provides the most significant bit for this 6 bit register.
  4365.  
  4366.          See {6.05.05} End Horizontal Blanking Register.
  4367.  
  4368.  
  4369.  
  4370.  
  4371. 6.05.08  Vertical Total Register                  { 3?5h    06h    R/W }
  4372. =======  ===============================================================
  4373.  
  4374.  
  4375. Cross reference with {6.05.09} CRT Controller Overflow Register.
  4376. Cross reference with {6.05.18} Vertical Retrace Start Register.
  4377. Cross reference with {6.05.19} Vertical Retrace End Register.
  4378. Cross reference with {6.05.20} Vertical Display Enable End Register.
  4379. Cross reference with {6.05.23} Start Vertical Blanking Register.
  4380. Cross reference with {6.05.24} End Vertical Blanking Register.
  4381. Cross reference with {6.05.25} CRTC Mode Control Register.
  4382. Cross reference with {6.05.26} Line Compare Register.
  4383. Cross reference with {6.07.19} Overscan Colour Register.
  4384. Cross reference with {6.09.01} Miscellaneous Output Register.
  4385. Cross reference with {6.10.07} CRTC Module Testing Register.
  4386. Cross reference with {6.10.12} Clear Vertical Display Enable Register.
  4387.  
  4388.  
  4389.          This register is subject to write protection through option setting.
  4390.          The whole register is affected.
  4391.  
  4392.          See {6.10.07} CRTC Module Testing Register.
  4393.  
  4394.  
  4395. <7..0>   Vertical Total
  4396.          --------------
  4397.  
  4398.          This register specifies the lower eight bits of the ten bits effective
  4399.          width register, used to specify the total number of display image scan
  4400.          lines.  The two remaining high order bits are located elsewhere.
  4401.  
  4402.          See {6.05.09} CRT Controller Overflow Register.
  4403.  
  4404.          Because the hardware is pipelined, the number appearing in the ten bit
  4405.          wide register is the total scan line count minus two.
  4406.  
  4407.          When the number actually actually appearing in this extended register
  4408.          matches the contents of the character row counter, the preparations
  4409.          needed for reset of the latter register are put into effect.  After a
  4410.          further two scan line periods, the reset takes place.  For this reason
  4411.          the character row counter will continue to count past the value given
  4412.          by the extended Vertical Total Register.  This is pipelining at work.
  4413.  
  4414.          This register is used in conjunction with the character row counter.
  4415.          The character row counter is a principle timing reference, which gives
  4416.          control over all operations which are determined by the number of the
  4417.          current scan line being generated.  The character row counter changes
  4418.          at the end of each scan line which generates an active image display,
  4419.          to reflect the number of each scan line created.  This count operation
  4420.          can be changed on option, to count pairs of scan lines.  This option
  4421.          has the important property of changing the timing resolution of every
  4422.          aspect of vertical timing generation.
  4423.  
  4424.          See {6.05.25} CRTC Mode Control Register.
  4425.  
  4426.  
  4427.  
  4428.  
  4429.          Overview of relationship with other registers
  4430.          =============================================
  4431.  
  4432.          This register is used in conjunction with the character row counter,
  4433.          which is a principle timing reference.  This counter starts at zero
  4434.          and steadily increases as the display develops each new scan line.
  4435.          By convention, the value zero corresponds with the first scan line
  4436.          which actually develops displayable data for the frame.
  4437.  
  4438.          When the content of the Vertical Total register matches the character
  4439.          row counter, preparations are put into effect to reset the latter, to
  4440.          begin counting scan lines for a new frame.  Two scan lines later, the
  4441.          reset actually takes place.
  4442.  
  4443.          All the vertical timing is derived from values which match the counter
  4444.          as it increases from zero to the maximum value.  The value zero is by
  4445.          convention associated with the very first display image scan line in a
  4446.          frame.  This is not the same as the first scan line in a frame.  Prior
  4447.          to the display of this first image scan line the vertical retrace will
  4448.          have returned the notional position of the electron beams to the upper
  4449.          left of the display screen.
  4450.  
  4451.          Since this traversal across the screen would damage any image display
  4452.          if the electron beams were switched on, the vertical blanking period
  4453.          starts some time before, and extends to some time after, the vertical
  4454.          retrace period.  In this manner the electron beams are inhibited, so
  4455.          preserving the display with complete integrity.
  4456.  
  4457.          The character row counter controls the vertical blanking and retrace,
  4458.          before being reset to begin counting active image scan lines.  This is
  4459.          the reason why the physical display unit scan line does not correspond
  4460.          directly with the scan line in the character row counter.  There is a
  4461.          small offset between the two, such that when the character row counter
  4462.          is reset to zero, the display unit has already displayed some overscan
  4463.          lines immediately following the vertical retrace period.
  4464.  
  4465.          The active image display extends from scan line zero upto the maximum
  4466.          scan line specified by the Vertical Display Enable End Register.  The
  4467.          overscan colour is generated from this point onwards, until the onset
  4468.          of the vertical blanking period.  The vertical retrace period activity
  4469.          then takes place during vertical blanking.  When the vertical blanking
  4470.          period finishes, overscan colour is again produced, but this occurs at
  4471.          the top of the display, since retrace has occured.
  4472.  
  4473.          To make these points clear we give a value map which relates the value
  4474.          in the character row counter to the activity of the display.
  4475.  
  4476.          The actual values given in hex are taken from the settings used by the
  4477.          bios, when video mode 10h is in effect.  These values are illustrative
  4478.          of the conceptual approach required when formulating register values.
  4479.  
  4480.          Please note that these values may have to be encoded before actually
  4481.          being used.  For example some registers do not fully specify all the
  4482.          ten bits of the character row counter.  Sometimes, a setting appears
  4483.          split across two different registers.  The values here are functional
  4484.          values which do not take these coding conventions into account.  This
  4485.          point is mentioned to avoid possible confusion between the functional
  4486.          values and their coded representation in registers.
  4487.  
  4488.          See {6.05.08} Vertical Total Register. {This.}
  4489.          See {6.05.18} Vertical Retrace Start Register.
  4490.          See {6.05.19} Vertical Retrace End Register.
  4491.          See {6.05.20} Vertical Display Enable End Register.
  4492.          See {6.05.23} Start Vertical Blanking Register.
  4493.          See {6.05.24} End Vertical Blanking Register.
  4494.          See {6.05.26} Line Compare Register.
  4495.  
  4496.  
  4497.  
  4498.  
  4499.  Hex     Register name     Corresponding Display Activity
  4500.  ===     =============     ==============================
  4501.  
  4502.  
  4503.  00      [Zero]
  4504.  
  4505.          ------------>     Character Row Counter start........................
  4506.          ------------>     Overscan Colour end.............................  |
  4507.          ------------>     First image scan line start......              |  |
  4508.                                                            |              |  |
  4509.                                                            |              |  |
  4510.  ??      {6.05.26} Line Compare Register                   |              |  |
  4511.                                                            |              |  |
  4512.          ------------>     Start address of display        |              |  |
  4513.          ------------>     is reset to zero.  Makes        |              |  |
  4514.          ------------>     a new window in which it        |              |  |
  4515.          ------------>     is possible to completely       |              |  |
  4516.          ------------>     inhibit display panning.        |              |  |
  4517.                                                            |              |  |
  4518.                                                            |              |  |
  4519. 15d      {6.05.20} Vertical Display Enable End Register    |              |  |
  4520.                                                            |              |  |
  4521.          ------------>     Last image scan line end........|              |  |
  4522.          ------------>     Overscan Colour start...............           |  |
  4523.                                                               |           |  |
  4524.                                                               |           |  |
  4525. 163      {6.05.23} Start Vertical Blanking Register           |           |  |
  4526.                                                               |           |  |
  4527.          ------------>     Overscan Colour end................|           |  |                                            |
  4528.          ------------>     Display blanked start.....................     |  |
  4529.                                                                     |     |  |
  4530.                                                                     |     |  |
  4531. 183      {6.05.18} Vertical Retrace Start Register                  |     |  |
  4532.                                                                     |     |  |
  4533.          ------------>     Vertical Retrace start.................  |     |  |
  4534.                                                                  |  |     |  |
  4535.                                                                  |  |     |  |
  4536. 185      {6.05.19} Vertical Retrace End Register                 |  |     |  |
  4537.                                                                  |  |     |  |
  4538.          ------------>     Vertical Retrace end..................|  |     |  |
  4539.                                                                     |     |  |
  4540.                                                                     |     |  |
  4541. 1ba      {6.05.24} End Vertical Blanking Register                   |     |  |
  4542.                                                                     |     |  |
  4543.          ------------>     Display blanked end......................|     |  |
  4544.          ------------>     Overscan Colour start..........................|  |
  4545.                                                                              |
  4546.                                                                              |
  4547. 1bf      {6.05.08} Vertical Total Register - {A}                             |
  4548.                                                                              |
  4549.          ------------>     Character row counter                             |
  4550.          ------------>     prepared for reset to                             |
  4551.          ------------>     zero                                              |
  4552.                                                                              |
  4553.                                                                              |
  4554.          {6.05.08} Vertical Total Register - {B}                             |
  4555.                                                                              |
  4556. 1c1      ------------>     Character row counter is                          |
  4557.          ------------>     actually reset to zero............................|
  4558.  
  4559.  
  4560.  
  4561.  
  4562. 6.05.09  CRT Controller Overflow Register         { 3?5h    07h    R/W }
  4563. =======  ===============================================================
  4564.  
  4565.  
  4566. Cross reference with {6.05.08} Vertical Total Register.
  4567. Cross reference with {6.05.11} Maximum Scan Line Register.
  4568. Cross reference with {6.05.18} Vertical Retrace Start Register.
  4569. Cross reference with {6.05.20} Vertical Display Enable End Register.
  4570. Cross reference with {6.05.23} Start Vertical Blanking Register.
  4571. Cross reference with {6.05.26} Line Compare Register.
  4572. Cross reference with {6.10.07} CRTC Module Testing Register.
  4573.  
  4574.  
  4575.          This register provides for the high order bits needed to complete some
  4576.          wide internal registers of greater than eight bits total width.  This
  4577.          is necessary since the processor input output port transfer capability
  4578.          supports only eight bit transfers.
  4579.  
  4580.          This register is subject to write protection through option setting.
  4581.          The whole register is affected.
  4582.  
  4583.          See {6.10.07} CRTC Module Testing Register.
  4584.  
  4585.  
  4586. <0>      Vertical Total Bit 8
  4587.          --------------------
  4588.          See {6.05.08} Vertical Total Register.
  4589.  
  4590.  
  4591. <1>      Vertical Display Enable End Bit 8
  4592.          ---------------------------------
  4593.          See {6.05.20} Vertical Display Enable End Register.
  4594.  
  4595.  
  4596. <2>      Vertical Retrace Start Bit 8
  4597.          ----------------------------
  4598.          See {6.05.18} Vertical Retrace Start Register.
  4599.  
  4600.  
  4601. <3>      Start Vertical Blank Bit 8
  4602.          --------------------------
  4603.          See {6.05.23} Start Vertical Blanking Register.
  4604.  
  4605.          The highest bit of the ten bit Start Vertical Blank Register is found
  4606.          in the Maximum Scan Line Register.
  4607.  
  4608.          See {6.05.11} Maximum Scan Line Register.
  4609.  
  4610.  
  4611. <4>      Line Compare Bit 8
  4612.          ------------------
  4613.          See {6.05.26} Line Compare Register.
  4614.  
  4615.          The highest bit of the ten bit Line Compare Register is located in the
  4616.          Maximum Scan Line Register.
  4617.  
  4618.          See {6.05.11} Maximum Scan Line Register.
  4619.  
  4620.  
  4621. <5>      Vertical Total Bit 9
  4622.          --------------------
  4623.          See {6.05.08} Vertical Total Register.
  4624.  
  4625.  
  4626. <6>      Vertical Display Enable End Bit 9
  4627.          ---------------------------------
  4628.          See {6.05.20} Vertical Display Enable End Register.
  4629.  
  4630.  
  4631. <7>      Vertical Retrace Start Bit 9
  4632.          ----------------------------
  4633.          See {6.05.18} Vertical Retrace Start Register.
  4634.  
  4635.  
  4636.  
  4637.  
  4638. 6.05.10  Preset Row Scan Register                 { 3?5h    08h    R/W }
  4639. =======  ===============================================================
  4640.  
  4641.  
  4642. Cross reference with {6.04.03} Clocking Mode Register.
  4643. Cross reference with {6.05.11} Maximum Scan Line Register.
  4644. Cross reference with {6.05.14} Start Address High Register.
  4645. Cross reference with {6.05.15} Start Address Low Register.
  4646. Cross reference with {6.05.21} Offset Register.
  4647. Cross reference with {6.05.26} Line Compare Register.
  4648. Cross reference with {6.07.18} Attribute Mode Control Register.
  4649. Cross reference with {6.07.21} Horizontal PEL Panning Register.
  4650. Cross reference with {6.10.07} CRTC Module Testing Register.
  4651.  
  4652.  
  4653. <4..0>   Preset Row Scan
  4654.          ---------------
  4655.  
  4656.          This binary value determines the notional scan line within a character
  4657.          font, immediately after a vertical retrace has arrived at the display.
  4658.          When the display is operating in text mode, this value is used to give
  4659.          the correct position on the display for the first line of text.  Later
  4660.          lines of text have their position on the display controlled relative
  4661.          to the preceeding lines, using the controls provided for this purpose.
  4662.  
  4663.          See {6.05.11} Maximum Scan Line Register.
  4664.  
  4665.          This capability provides for the smooth vertical scrolling of lines of
  4666.          text.  During the generation of the first line of text on the display,
  4667.          some of the uppermost scan lines of a character font can be inhibited
  4668.          by use of this facility.  When successively more of the first line of
  4669.          text is ommitted in this manner, the result will give the visual idea
  4670.          that the whole screen of text is slowly being scrolled upwards.
  4671.  
  4672.          To make this situation more concrete, we will look at how a character
  4673.          display is generated by the VGA controller when text mode is in use.
  4674.  
  4675.          A character font contains 256 characters, each of which is 8 pixels in
  4676.          width, with 32 scan lines depth.  This means that 32 bytes, each of 8
  4677.          bits, will represent one character completely.  However most character
  4678.          fonts do not require the full 32 pixel by 8 pixel format.  In order to
  4679.          display all the 32 rows of 8 pixels, it is necessary to arrange that a
  4680.          conversion of each character code in a line of text takes place using
  4681.          the appropriate 8 consecutive pixels during each scan line.  This scan
  4682.          line indexing into the 32 byte array of pixel data representing a font
  4683.          can be performed by means of a special scan line counter reserved just
  4684.          for character generation purposes.
  4685.  
  4686.          If this is done, it is then necessary to decide how to initialise the
  4687.          scan line counter after a vertical retrace occurs.  During character
  4688.          generation, we must know the maximum value of scan line which is part
  4689.          of the character font in current use.  This permits any depth of font
  4690.          to be used even though the storage format provided by the hardware is
  4691.          standardised at 32 rows by 8 columns.  The maximum scan line used for
  4692.          text font generation is specified by the Maximum Scan Line Register.
  4693.  
  4694.          See {6.05.11} Maximum Scan Line Register.
  4695.  
  4696.  
  4697. <6..5>   Byte Panning Control
  4698.          --------------------
  4699.  
  4700.          The value of this bit field determines byte panning in text mode.  The
  4701.          effect is to shift the displayed image left by the specified number of
  4702.          eight or nine pixel groups.  The selection of eight or nine dot clocks
  4703.          is performed by the Clocking Mode Register, which directly determines
  4704.          the maximum number of pixels controlled for panning purposes.  The pan
  4705.          takes effect by shifting the screen image successively to the left of
  4706.          the screen, with increasing binary panning control values.
  4707.  
  4708.          See {6.04.03} Clocking Mode Register.
  4709.  
  4710.          This panning capability is fully complementary with the pixel panning
  4711.          control available using the Horizontal PEL Panning Register.
  4712.  
  4713.          See {6.07.21} Horizontal PEL Panning Register.
  4714.  
  4715.          Note that in graphics modes employing 256 colour packed pixel format,
  4716.          the Byte Panning Control and the Horizontal PEL Panning Register must
  4717.          not be used.  Instead, use the image start address to obtain a single
  4718.          pixel pan effect.  Where this technique is used the screen width must
  4719.          be increased by use of the Offset Register, so that panning does not
  4720.          cause the data from a scan line to become part of the following scan
  4721.          line.  This is the same as saying that panning can only modify a view
  4722.          to the extent that the view remains within a displayable image stored
  4723.          within the video memory.  See below for discussion.
  4724.  
  4725.          See {6.05.14} Start Address High Register.
  4726.          See {6.05.15} Start Address Low Register.
  4727.          See {6.05.21} Offset Register.
  4728.          See {6.10.07} CRTC Module Testing Register.
  4729.  
  4730.  
  4731.  
  4732.  
  4733.          Essential Display Panning Concepts
  4734.          ==================================
  4735.  
  4736.          In order to understand panning, it is necessary to understand the big
  4737.          difference in display image generation when in text mode as opposed to
  4738.          graphics mode.  This difference is absolutely fundamental, and arises
  4739.          because of the distinctions between the ways in which the information
  4740.          which comprises the displayed image is stored in image memory.
  4741.  
  4742.          In text mode, the image memory holds character codes and attributes,
  4743.          which, when combined together with font definitions for a character
  4744.          set, enable the VGA controller to generate characters to the display.
  4745.  
  4746.          Each character is represented by either 8 or 9 pixels in each of the
  4747.          scan lines in which it appears, depending upon the specified dot clock
  4748.          selection made by the Clocking Mode Register.
  4749.  
  4750.          See {6.04.03} Clocking Mode Register.
  4751.  
  4752.          If the pixels appearing at the extreme left of the display are removed
  4753.          from the display, then the result gives the impression of the complete
  4754.          screen image having been panned left.  This function is controlled by
  4755.          the Horizontal PEL Panning Register, which takes values dependant upon
  4756.          the maximum pan required, either 8 or 9 pixels:
  4757.  
  4758.              1.  8 pixel pan, binary value specifies left pan movement, with
  4759.                  number zero representing a pan of left zero positions.  The
  4760.                  pan magnitude is taken modulo 8 as in:
  4761.  
  4762.                  left_pan = (number_field + 0) mod 8
  4763.  
  4764.                  The pan range is therefore 0 .. 7 pixels.
  4765.  
  4766.              2.  9 pixel pan, binary value specifies a left pan movement of the
  4767.                  value plus one, with number 8 representing a left pan movement
  4768.                  of zero positions.  The pan magnitude is taken modulo 9 with
  4769.                  an offset of one as in:
  4770.  
  4771.                  left_pan = (number_field + 1) mod 9
  4772.  
  4773.                  The pan range is therefore 0 .. 8 pixels.
  4774.  
  4775.          Once the limit of pixel panning is reached, it is necessary to change
  4776.          the data used to generate the display.  This is where byte panning is
  4777.          used.  To achieve a smooth panning effect, the pixel panning register
  4778.          is gradually increased to the maximum, then changed to zero, whilst
  4779.          simultaneously increasing byte panning.  This enables panning to take
  4780.          place smoothly across large portions of the displayed image.
  4781.  
  4782.          In graphics mode there are two separate image generation methods used.
  4783.  
  4784.          Multi-plane graphics images are produced by reading the image memory
  4785.          planes using a single address, which yields four parallel bytes, one
  4786.          each from each memory plane.  These bytes together represent eight of
  4787.          the pixels for display.  By interpreting the same numbered bit in all
  4788.          these four bytes at the same time, it is possible to produce a coding
  4789.          for 16 separate colours.  In this way, the four bytes are shifted out
  4790.          to the display in parallel, so defining the colour of each successive
  4791.          pixel in the display image as one of a possible 16 distinct colours.
  4792.  
  4793.          For this type of image, the Horizontal PEL Panning Register operates
  4794.          exactly as described above, except that there is no 9 dot clock used.
  4795.          {This is only for use in text modes.}
  4796.  
  4797.          In packed pixel mode, graphics images are produced in a different way.
  4798.          There are actually three different types of packed pixel mode.  These
  4799.          are:
  4800.  
  4801.              1.  Colour 2 Packed Pixel Mode.    {Uses 1 bit per pixel.}
  4802.              2.  Colour 4 Packed Pixel Mode.    {Uses 2 bits per pixel.}
  4803.              3.  Colour 256 Packed Pixel Mode.  {Uses 8 bits per pixel.}
  4804.  
  4805.          For the Colour 2 Packed Pixel Mode, the image consists of individual
  4806.          pixels represented directly by the bits in a byte, thus the high order
  4807.          bit represents the leftmost pixel colour, foreground or background.
  4808.  
  4809.          This type of image is easily panned, exactly as described above for
  4810.          the 8 dot clock selection.
  4811.  
  4812.          The Colour 256 Packed Pixel Mode represents a single pixel colour in
  4813.          one complete byte of image memory.  In this case the bit shifting of
  4814.          the Horizontal PEL Panning Register is superfluous together with the
  4815.          Byte Panning Control.  Instead, the starting address of the display
  4816.          should be used to give pixel panning in both the horizontal and the
  4817.          vertical directions.
  4818.  
  4819.          Colour 4 Packed Pixel Mode uses the image memory planes in a modified
  4820.          multi-plane mode, which uses two of the four planes to specify one of
  4821.          four possible colour selections for each pixel.  Neighbouring memory
  4822.          planes are used, either planes (0,1) or (2,3).  In this situation the
  4823.          full Horizontal PEL Panning Register capability is used.  Only the 8
  4824.          dot clock selection is applicable.
  4825.  
  4826.          A facility is available which affords the possibility of creating two
  4827.          separate windows within a single screen display.  This has an impact
  4828.          on some aspects of pixel panning.
  4829.  
  4830.          The two windows are distinguished in that the first always specifies
  4831.          a non-zero starting address into the image memory, and is subject to
  4832.          panning control.  The second window always begins at a display image
  4833.          memory address of zero, and may either be panned in the same manner
  4834.          as the first window, or alternatively may be made immune to panning,
  4835.          as determined by option setting.
  4836.  
  4837.          See {6.05.14} Start Address High Register.
  4838.          See {6.05.15} Start Address Low Register.
  4839.          See {6.07.18} Attribute Mode Control Register.
  4840.  
  4841.          The scan line where the first window ends and where the second lower
  4842.          window starts is determined by the Line Compare Register.
  4843.  
  4844.          See {6.05.26} Line Compare Register.
  4845.  
  4846.          The control governing the second window which determines whether it
  4847.          responds to panning specified for the first upper window is applied
  4848.          by the Attribute Mode Control Register.
  4849.  
  4850.          See {6.07.18} Attribute Mode Control Register.
  4851.  
  4852.          A discussion of pixel panning is available.
  4853.  
  4854.          See {6.07.21} Horizontal PEL Panning Register.
  4855.  
  4856.  
  4857. <7>      Reserved.  Always <=0>.
  4858.          -----------------------
  4859.  
  4860.  
  4861.  
  4862.  
  4863. 6.05.11  Maximum Scan Line Register               { 3?5h    09h    R/W }
  4864. =======  ===============================================================
  4865.  
  4866.  
  4867. Cross reference with {6.05.09} CRT Controller Overflow Register.
  4868. Cross reference with {6.05.10} Preset Row Scan Register.
  4869. Cross reference with {6.05.23} Start Vertical Blanking Register.
  4870. Cross reference with {6.05.25} CRTC Mode Control Register.
  4871. Cross reference with {6.05.26} Line Compare Register.
  4872. Cross reference with {6.10.07} CRTC Module Testing Register.
  4873.  
  4874.  
  4875.          This register is subject to write protection through option setting.
  4876.          A single bit <7> only is affected.  {Double Scan Line Display.}
  4877.  
  4878.          See {6.10.07} CRTC Module Testing Register.
  4879.  
  4880.  
  4881. <4..0>   Maximum Scan Lines
  4882.          ------------------
  4883.  
  4884.          The binary value of this field determines the highest scan line to be
  4885.          used in generating characters from any currently selected font.  This
  4886.          binary value matches an internal scan line counter which commences at
  4887.          zero, so to permit generation of characters with 14 scan lines, the
  4888.          value 13 would be programmed into this field.  This internal counter
  4889.          keeps track of the scan line for character generation, so is separate
  4890.          from the character row counter that counts scan lines in the display.
  4891.          The internal counter is reset to zero when it has a value equal to the
  4892.          Maximum Scan Lines field.  It therefore continually cycles through all
  4893.          values from zero to the maximum.
  4894.  
  4895.          The effect of this field is to decide when it is necessary to commence
  4896.          reading the data in image memory associated with the following line of
  4897.          text.  Until that time, each line of text is repeatedly read and sent
  4898.          to the character generator logic, once for each scan line in the font
  4899.          being used.  In this manner, all the scan lines are built up and sent
  4900.          to the display to represent the image of one complete line of text.
  4901.  
  4902.  
  4903. <5>      Start Vertical Blank Bit 9
  4904.          --------------------------
  4905.  
  4906.          This bit represents bit 9 of the 10 bit wide representation for the
  4907.          Start Vertical Blank value.
  4908.  
  4909.          See {6.05.09} CRT Controller Overflow Register.
  4910.          See {6.05.23} Start Vertical Blanking Register.
  4911.  
  4912.  
  4913. <6>      Line Compare Bit 9
  4914.          ------------------
  4915.  
  4916.          This bit represents bit 9 of the 10 bit wide representation for the
  4917.          Line Compare Register value.
  4918.  
  4919.          See {6.05.09} CRT Controller Overflow Register.
  4920.          See {6.05.26} Line Compare Register.
  4921.  
  4922.  
  4923. <7>      Double Scan Line Display
  4924.          ------------------------
  4925.  
  4926.          <=0>  Each scan line is displayed once only.  This represents the
  4927.                normal operational value.
  4928.  
  4929.          <=1>  Each scan line is displayed twice so increasing the depth of the
  4930.                display by a factor of two despite using the same amount of data
  4931.                needed to specify only half the number of scan lines. This is a
  4932.                compatibility feature used for low resolution display emulation.
  4933.  
  4934.                The pixel aspect ratio doubles when using this setting.
  4935.  
  4936.                This capability advances the display memory address counter to
  4937.                the next scan line in image memory only every second scan line,
  4938.                so data is repeated exactly twice during successive scan lines.
  4939.                This means the display memory address counter is actually reset
  4940.                after the first scan line of every pair, so that the same data
  4941.                can be output during the second scan line of the pair.
  4942.  
  4943.                Warning: do not confuse this capability with that provided by
  4944.                the Horizontal Retrace Divisor.
  4945.  
  4946.                See {6.05.25} CRTC Mode Control Register.
  4947.  
  4948.  
  4949.  
  4950.  
  4951. 6.05.12  Cursor Start Register                    { 3?5h    0ah    R/W }
  4952. =======  ===============================================================
  4953.  
  4954.  
  4955. Cross reference with {6.05.13} Cursor End Register.
  4956. Cross reference with {6.05.16} Cursor Location High Register.
  4957. Cross reference with {6.05.17} Cursor Location Low Register.
  4958.  
  4959.  
  4960. <4..0>   Cursor Row Scan Start
  4961.          ---------------------
  4962.  
  4963.          This binary field represents the first scan line used to present the
  4964.          cursor when in text mode.  The very first scan line is numbered zero,
  4965.          corresponding with the first scan line in the character font used to
  4966.          produce the text.  It is therefore not a scan line relative to the
  4967.          start of the frame being displayed.
  4968.  
  4969.          The displayed cursor will extend from this value, through to the value
  4970.          specified in the Cursor Row Scan End field.
  4971.  
  4972.          The hardware generated cursor is only active in text mode.
  4973.  
  4974.          See {6.05.13} Cursor End Register.
  4975.          See {6.05.16} Cursor Location High Register.
  4976.          See {6.05.17} Cursor Location Low Register.
  4977.  
  4978.  
  4979. <5>      Cursor Enable
  4980.          -------------
  4981.  
  4982.          <=0>  Text mode hardware cursor is displayed.  Cursor on.
  4983.          <=1>  Text mode hardware cursor is inhibited.  Cursor off.
  4984.  
  4985.  
  4986. <7..6>   Reserved.  Always <=00>.
  4987.          ------------------------
  4988.  
  4989.  
  4990.  
  4991.  
  4992. 6.05.13  Cursor End Register                      { 3?5h    0bh    R/W }
  4993. =======  ===============================================================
  4994.  
  4995.  
  4996. Cross reference with {6.05.12} Cursor Start Register.
  4997. Cross reference with {6.05.16} Cursor Location High Register.
  4998. Cross reference with {6.05.17} Cursor Location Low Register.
  4999.  
  5000.  
  5001. <4..0>   Cursor Row Scan End
  5002.          -------------------
  5003.  
  5004.          This binary field represents the first scan line used to present the
  5005.          cursor when in text mode.  The very first scan line is numbered zero,
  5006.          corresponding with the first scan line in the character font used to
  5007.          produce the text.  It is therefore not a scan line relative to the
  5008.          start of the frame being displayed.
  5009.  
  5010.          The displayed cursor will extend from the value specified in the field
  5011.          Cursor Row Scan End, through to this value, inclusive.
  5012.  
  5013.          The hardware generated cursor is only active in text mode.
  5014.  
  5015.          See {6.05.12} Cursor Start Register.
  5016.          See {6.05.16} Cursor Location High Register.
  5017.          See {6.05.17} Cursor Location Low Register.
  5018.  
  5019.  
  5020. <6..5>   Cursor Skew Control
  5021.          -------------------
  5022.  
  5023.          This binary field specifies the amount of right skew applied to the
  5024.          cursor, when it is visible.  In this way, it is possible to displace
  5025.          the cursor to the right of the character where it would normally be
  5026.          produced.  This feature can sometimes be of benefit when very small
  5027.          characters are produced during high resolution screen operation.
  5028.  
  5029.          It should be used with care, however, since visual disorientation
  5030.          can result from over-use of the higher displacement values.
  5031.  
  5032.          The main motivation for this control is to compensate for internal
  5033.          pipeline delays in the VGA controller.
  5034.  
  5035.          See {6.05.16} Cursor Location High Register.
  5036.          See {6.05.17} Cursor Location Low Register.
  5037.  
  5038.  
  5039. <7>      Reserved.  Always <=0>.
  5040.          -----------------------
  5041.  
  5042.  
  5043.  
  5044.  
  5045. 6.05.14  Start Address High Register              { 3?5h    0ch    R/W }
  5046. =======  ===============================================================
  5047.  
  5048.  
  5049. Cross reference with {6.05.10} Preset Row Scan Register.
  5050. Cross reference with {6.05.15} Start Address Low Register.
  5051. Cross reference with {6.05.21} Offset Register.
  5052. Cross reference with {6.05.22} Underline Location Register.
  5053. Cross reference with {6.05.25} CRTC Mode Control Register.
  5054. Cross reference with {6.05.26} Line Compare Register.
  5055. Cross reference with {6.07.18} Attribute Mode Control Register.
  5056. Cross reference with {6.10.04} Mode Control Register 2.
  5057. Cross reference with {6.10.05} Mode Control Register 1.
  5058. Cross reference with {6.10.07} CRTC Module Testing Register.
  5059.  
  5060.  
  5061. <7..0>   Start Address High
  5062.          ------------------
  5063.  
  5064.          This binary value represents 8 of the possible 16 to 17 display start
  5065.          address bits.  The display generation uses this address to determine
  5066.          where to commence reading image memory.  This address corresponds to
  5067.          the upper left of the display screen.
  5068.  
  5069.          In the following display modes, addresses wrap as indicated:
  5070.          Colour Graphics Adapter    ==>   16K or 14 bits wide addressing.
  5071.          Monochrome Display Adapter ==>   32K or 15 bits wide addressing.
  5072.          Hercules mode              ==>   64K or 16 bits wide addressing.
  5073.  
  5074.          See {6.10.04} Mode Control Register 2.
  5075.  
  5076.          There may be some address alignment implications, depending upon the
  5077.          way in which memory addresses are used during the display generation
  5078.          process.
  5079.  
  5080.          See {6.05.22} Underline Location Register.
  5081.          See {6.05.25} CRTC Mode Control Register.
  5082.  
  5083.          The lower bits <7..0> are found in the Start Address Low Register.
  5084.  
  5085.          See {6.05.15} Start Address Low Register.
  5086.  
  5087.          The upper bit <16> is a switchable option.  Assume a maximum image
  5088.          size of 1024K arranged in four planes of 256K; it is possible with
  5089.          17 bits of start address to specify upto 128K of offset into image
  5090.          memory.  This is adequate to support two separate display pages.
  5091.  
  5092.          See {6.10.07} CRTC Module Testing Register.
  5093.  
  5094.          There is also a start address bit <19> available for configurations
  5095.          with more than 512K of image memory.  This bit defines which memory
  5096.          bank is to be used for display purposes, so is quite distinct from
  5097.          that accessible to the processor.  The display hardware is not able
  5098.          to address images larger than 512K unless 1024x768 256 colour mode
  5099.          is used.  For display images smaller than 512K, bit <19> is useful.
  5100.  
  5101.          See {6.10.05} Mode Control Register 1.
  5102.  
  5103.          During display operation, there is potential to reset the display
  5104.          image current address to zero, coincidently with the commencement
  5105.          of a new display scan line.  This facility is useful for providing
  5106.          two separate window areas on the display screen.  The first window
  5107.          possesses a start address which is greater than zero, and displays
  5108.          for the required number of scan lines.  Then, at a scan line given
  5109.          by the Line Compare Register, the current display address is reset
  5110.          to zero, thereby displaying the second window.
  5111.  
  5112.          See {6.05.26} Line Compare Register.
  5113.  
  5114.          This second window has the useful property that it can be protected
  5115.          from panning.  This means that during panning operations affecting
  5116.          the upper window, the lower window will either pan in the same way,
  5117.          or remain completely unchanged depending upon an option bit setting.
  5118.  
  5119.          See {6.07.18} Attribute Mode Control Register.
  5120.  
  5121.  
  5122.  
  5123.  
  5124. 6.05.15  Start Address Low Register               { 3?5h    0dh    R/W }
  5125. =======  ===============================================================
  5126.  
  5127.  
  5128. Cross reference with {6.05.10} Preset Row Scan Register.
  5129. Cross reference with {6.05.14} Start Address High Register.
  5130. Cross reference with {6.05.21} Offset Register.
  5131. Cross reference with {6.05.22} Underline Location Register.
  5132. Cross reference with {6.05.25} CRTC Mode Control Register.
  5133. Cross reference with {6.05.26} Line Compare Register.
  5134. Cross reference with {6.07.18} Attribute Mode Control Register.
  5135. Cross reference with {6.10.04} Mode Control Register 2.
  5136. Cross reference with {6.10.05} Mode Control Register 1.
  5137. Cross reference with {6.10.07} CRTC Module Testing Register.
  5138.  
  5139.  
  5140. <7..0>   Start Address Low
  5141.          -----------------
  5142.  
  5143.          This binary value represents 8 of the possible 16 to 17 display start
  5144.          address bits.  The display generation uses this address to determine
  5145.          where to commence reading image memory.  This address corresponds to
  5146.          the upper left of the display screen.
  5147.  
  5148.          In the following display modes, addresses wrap as indicated:
  5149.          Colour Graphics Adapter    ==>   16K or 14 bits wide addressing.
  5150.          Monochrome Display Adapter ==>   32K or 15 bits wide addressing.
  5151.          Hercules mode              ==>   64K or 16 bits wide addressing.
  5152.  
  5153.          See {6.10.04} Mode Control Register 2.
  5154.  
  5155.          There may be some address alignment implications, depending upon the
  5156.          way in which memory addresses are used during the display generation
  5157.          process.
  5158.  
  5159.          See {6.05.22} Underline Location Register.
  5160.          See {6.05.25} CRTC Mode Control Register.
  5161.  
  5162.          The upper bits <15..8> are found in the Start Address High Register.
  5163.  
  5164.          See {6.05.14} Start Address High Register.
  5165.  
  5166.          The upper bit <16> is a switchable option.  Assume a maximum image
  5167.          size of 1024K arranged in four planes of 256K; it is possible with
  5168.          17 bits of start address to specify upto 128K of offset into image
  5169.          memory.  This is adequate to support two separate display pages.
  5170.  
  5171.          See {6.10.07} CRTC Module Testing Register.
  5172.  
  5173.          There is also a start address bit <17> available for configurations
  5174.          with more than 512K of image memory.  This bit defines which memory
  5175.          bank is to be used for display purposes, so is quite distinct from
  5176.          that accessible to the processor.  The display hardware is not able
  5177.          to address images larger than 512K unless 1024x768 256 colour mode
  5178.          is used.  For display images smaller than 512K, bit <17> is useful.
  5179.  
  5180.          See {6.10.05} Mode Control Register 1.
  5181.  
  5182.          During display operation, there is potential to reset the display
  5183.          image current address to zero, coincidently with the commencement
  5184.          of a new display scan line.  This facility is useful for providing
  5185.          two separate window areas on the display screen.  The first window
  5186.          possesses a start address which is greater than zero, and displays
  5187.          for the required number of scan lines.  Then, at a scan line given
  5188.          by the Line Compare Register, the current display address is reset
  5189.          to zero, thereby displaying the second window.
  5190.  
  5191.          See {6.05.26} Line Compare Register.
  5192.  
  5193.          This second window has the useful property that it can be protected
  5194.          from panning.  This means that during panning operations affecting
  5195.          the upper window, the lower window will either pan in the same way,
  5196.          or remain completely unchanged depending upon an option bit setting.
  5197.  
  5198.          See {6.07.18} Attribute Mode Control Register.
  5199.  
  5200.  
  5201.  
  5202.  
  5203. 6.05.16  Cursor Location High Register            { 3?5h    0eh    R/W }
  5204. =======  ===============================================================
  5205.  
  5206.  
  5207. Cross reference with {6.05.12} Cursor Start Register.
  5208. Cross reference with {6.05.13} Cursor End Register.
  5209. Cross reference with {6.05.17} Cursor Location Low Register.
  5210. Cross reference with {6.10.04} Mode Control Register 2.
  5211.  
  5212.  
  5213. <7..0>   Cursor Location High
  5214.          --------------------
  5215.  
  5216.          This binary value represents an image memory address.  As the display
  5217.          is created, image data is read from image memory.  When this address
  5218.          is accessed in order to create the display, the cursor will be placed
  5219.          to coincide with the corresponding character position on the screen,
  5220.          subject only to any applied cursor right skew.
  5221.  
  5222.          A hardware cursor is only generated in text mode.
  5223.  
  5224.          See {6.05.12} Cursor Start Register.
  5225.          See {6.05.13} Cursor End Register.
  5226.          See {6.05.17} Cursor Location Low Register.
  5227.  
  5228.          In the following display modes, addresses wrap as indicated:
  5229.          Colour Graphics Adapter    ==>   16K or 14 bits wide addressing.
  5230.          Monochrome Display Adapter ==>   32K or 15 bits wide addressing.
  5231.          Hercules mode              ==>   64K or 16 bits wide addressing.
  5232.  
  5233.          See {6.10.04} Mode Control Register 2.
  5234.  
  5235.  
  5236.  
  5237.  
  5238. 6.05.17  Cursor Location Low Register             { 3?5h    0fh    R/W }
  5239. =======  ===============================================================
  5240.  
  5241.  
  5242. Cross reference with {6.05.12} Cursor Start Register.
  5243. Cross reference with {6.05.13} Cursor End Register.
  5244. Cross reference with {6.05.16} Cursor Location High Register.
  5245. Cross reference with {6.10.04} Mode Control Register 2.
  5246.  
  5247.  
  5248. <7..0>   Cursor Location Low
  5249.          -------------------
  5250.  
  5251.          This binary value represents an image memory address.  As the display
  5252.          is created, image data is read from image memory.  When this address
  5253.          is accessed in order to create the display, the cursor will be placed
  5254.          to coincide with the corresponding character position on the screen,
  5255.          subject only to any applied cursor right skew.
  5256.  
  5257.          A hardware cursor is only generated in text mode.
  5258.  
  5259.          See {6.05.12} Cursor Start Register.
  5260.          See {6.05.13} Cursor End Register.
  5261.          See {6.05.16} Cursor Location High Register.
  5262.  
  5263.          In the following display modes, addresses wrap as indicated:
  5264.          Colour Graphics Adapter    ==>   16K or 14 bits wide addressing.
  5265.          Monochrome Display Adapter ==>   32K or 15 bits wide addressing.
  5266.          Hercules mode              ==>   64K or 16 bits wide addressing.
  5267.  
  5268.          See {6.10.04} Mode Control Register 2.
  5269.  
  5270.  
  5271.  
  5272.  
  5273. 6.05.18  Vertical Retrace Start Register          { 3?5h    10h    R/W }
  5274. =======  ===============================================================
  5275.  
  5276.  
  5277. Cross reference with {6.05.05} End Horizontal Blanking Register.
  5278. Cross reference with {6.05.08} Vertical Total Register.
  5279. Cross reference with {6.05.09} CRT Controller Overflow Register.
  5280. Cross reference with {6.05.19} Vertical Retrace End Register.
  5281. Cross reference with {6.05.23} Start Vertical Blanking Register.
  5282. Cross reference with {6.05.24} End Vertical Blanking Register.
  5283. Cross reference with {6.05.25} CRTC Mode Control Register.
  5284. Cross reference with {6.10.07} CRTC Module Testing Register.
  5285.  
  5286.  
  5287.          This register is subject to write protection through option setting.
  5288.          The whole register is affected.
  5289.  
  5290.          See {6.10.07} CRTC Module Testing Register.
  5291.  
  5292.  
  5293. <7..0>   Vertical Retrace Start
  5294.          ----------------------
  5295.  
  5296.          This binary value represents the 8 lower bits of the 10 bit wide
  5297.          Vertical Retrace Start Register.  This register is compared with
  5298.          the character row counter which therefore matches when a certain
  5299.          scan line is displayed.  The upper bits are stored elsewhere.
  5300.  
  5301.          See {6.05.09} CRT Controller Overflow Register.
  5302.  
  5303.          When the match occurs, the vertical retrace period begins.  This
  5304.          generates the vertical retrace signal to the display unit, which
  5305.          then commences the return of the electron beam scanning position
  5306.          to the upper left of the display screen.  The vertical retrace
  5307.          period continues until the character row counter is of identical
  5308.          value with that in the Vertical Retrace End Register.
  5309.  
  5310.          See {6.05.19} Vertical Retrace End Register.
  5311.  
  5312.          At the time the vertical retrace commences, the vertical blanking
  5313.          period will already have begun.  This is so that the retrace will
  5314.          not disturb the image present on the screen.  Vertical blanking
  5315.          continues until after the vertical retrace period has ended.
  5316.  
  5317.          See {6.05.23} Start Vertical Blanking Register.
  5318.          See {6.05.24} End Vertical Blanking Register.
  5319.  
  5320.          The units in which vertical timing is measured can be changed by a
  5321.          factor of two upon option setting.
  5322.  
  5323.          See {6.05.25} CRTC Mode Control Register.
  5324.  
  5325.          A detailed discussion of vertical timing issues is available with
  5326.          a timing diagram.
  5327.  
  5328.          See {6.05.08} Vertical Total Register.
  5329.  
  5330.          The following is not true for the Trident 8900 chip.
  5331.          The following is valid for the Chips 82C456 chip.
  5332.  
  5333.          The Vertical Retrace Start Register can be made invisible at this
  5334.          index address, when the Lightpen High Register is placed at this
  5335.          same register index.
  5336.          For details see the Light Pen Register Enable description.
  5337.  
  5338.          See {6.05.05} End Horizontal Blanking Register.
  5339.  
  5340.  
  5341.  
  5342.  
  5343. 6.05.19  Vertical Retrace End Register            { 3?5h    11h    R/W }
  5344. =======  ===============================================================
  5345.  
  5346.  
  5347. Cross reference with {6.05.05} End Horizontal Blanking Register.
  5348. Cross reference with {6.05.08} Vertical Total Register.
  5349. Cross reference with {6.05.18} Vertical Retrace Start Register.
  5350. Cross reference with {6.05.23} Start Vertical Blanking Register.
  5351. Cross reference with {6.05.24} End Vertical Blanking Register.
  5352. Cross reference with {6.05.25} CRTC Mode Control Register.
  5353. Cross reference with {6.09.03} Input Status Register Zero.
  5354. Cross reference with {6.10.07} CRTC Module Testing Register.
  5355.  
  5356.  
  5357.          This register is subject to write protection through option setting.
  5358.          The whole register is affected.
  5359.  
  5360.          See {6.10.07} CRTC Module Testing Register.
  5361.  
  5362.  
  5363. <3..0>   Vertical Retrace End
  5364.          --------------------
  5365.  
  5366.          This binary value represents the 4 lower bits of the 10 bit wide
  5367.          character row counter.  The character row counter determines the
  5368.          current scan line being generated for the display.  When a match
  5369.          occurs in these lower four bits, the vertical retrace period end
  5370.          is signalled.  The comparison between these low bits only starts
  5371.          when the vertical retrace period has commenced, consequently the
  5372.          possibility of an ambiguous match cannot occur.  This coding has
  5373.          the property of limiting the maximum period to 15 scan lines.
  5374.  
  5375.          See {6.05.18} Vertical Retrace Start Register.
  5376.  
  5377.          At the time the vertical retrace commences, the vertical blanking
  5378.          period will already have begun.  This is so that the retrace will
  5379.          not disturb the image present on the screen.  Vertical blanking
  5380.          continues until after the vertical retrace period has ended.
  5381.  
  5382.          See {6.05.23} Start Vertical Blanking Register.
  5383.          See {6.05.24} End Vertical Blanking Register.
  5384.  
  5385.          The units in which vertical timing is measured can be changed by a
  5386.          factor of two upon option setting.
  5387.  
  5388.          See {6.05.25} CRTC Mode Control Register.
  5389.  
  5390.          A detailed discussion of vertical timing issues is available with
  5391.          a timing diagram.
  5392.  
  5393.          See {6.05.08} Vertical Total Register.
  5394.  
  5395.  
  5396. <4>      Clear Vertical Interrupt
  5397.          ------------------------
  5398.  
  5399.          This bit is cleared by hardware RESET.
  5400.  
  5401.          <=0>  Clear the vertical interrupt state.
  5402.          <=1>  Normal vertical interrupt state operation.
  5403.  
  5404.          This interrupt status is obtainable from a status bit provided for
  5405.          just this purpose.  It can be useful when interrupts are inhibited
  5406.          yet it is still necessary to obtain vertical timing information.
  5407.  
  5408.          See {6.09.03} Input Status Register Zero.
  5409.  
  5410.  
  5411. <5>      Enable Vertical Interrupt
  5412.          -------------------------
  5413.  
  5414.          This bit is cleared by hardware RESET.
  5415.  
  5416.          <=0>  Enable the vertical interrupt {assigned by hardware to IRQ2}.
  5417.                This will only occur if the programmable interrupt controller
  5418.                8259 was initialised appropriately, since all interrupts must
  5419.                first be routed through this chip before being serviced by an
  5420.                interrupt program in the processor.
  5421.  
  5422.          <=1>  Disable the vertical interrupt.
  5423.  
  5424.          This interrupt status is obtainable from a status bit provided for
  5425.          just this purpose.  It can be useful when interrupts are inhibited
  5426.          yet it is still necessary to obtain vertical timing information.
  5427.  
  5428.          See {6.09.03} Input Status Register Zero.
  5429.  
  5430.  
  5431. <6>      Refresh Bandwidth Select
  5432.          ------------------------
  5433.  
  5434.          <=0>  Generate 3 image memory refresh cycles per horizontal scan
  5435.                line.  These refresh cycles prevent data stored in dynamic
  5436.                RAM {random access memory} chips from being lost.
  5437.  
  5438.          <=1>  Generate 5 image memory refresh cycles per horizontal scan
  5439.                line.  If more refresh cycles are needed to keep the image
  5440.                memory intact, less time is available for processor access.
  5441.  
  5442.          This field is sometimes termed CPU Bandwidth Select, for reasons
  5443.          which will become apparent below.
  5444.  
  5445.          Small image memories require lower numbers of refresh periods than
  5446.          do larger memories with more data to refresh.
  5447.  
  5448.          The greater the refresh activity, the less opportunity there is to
  5449.          access the memory for processor reads and writes.  With high image
  5450.          resolution displays the issue of processor access to image memory
  5451.          can become critical in determining the display update speed.
  5452.  
  5453.          The processor can make a request to access image memory, which then
  5454.          cannot be granted immediately as all display activity has priority.
  5455.          A relatively long access delay can then ensue until the access is
  5456.          finally granted.  Although the delay is measured in microseconds,
  5457.          this still represents a significant delay for fast processors which
  5458.          could have executed possibly many instructions during this period.
  5459.  
  5460.          A memory can be either read, written or refreshed at any one time.
  5461.          The sequencer determines the moment by moment activity for all the
  5462.          image display RAM chips, thereby ensuring that the maximum use is
  5463.          made of image memory capability at all times.
  5464.  
  5465.          Bandwidth is a hardware term which is concerned with describing a
  5466.          rate at which information is transferred, or at which an activity
  5467.          is, or can be, performed.  Typically, bandwidth is measured using
  5468.          a number which represents the count of things taking place over a
  5469.          fixed time period, usually one second.  Because this measure is
  5470.          identical with the measure of frequency, the unit of bandwidth is
  5471.          the Hertz, or Hz.  Display memory bandwidth therefore describes
  5472.          the number of units of data which can be transferred into or out
  5473.          of the display memory, in one second.  It provides a broad measure
  5474.          of display unit capability.  However, like all broad measures, it
  5475.          should not be taken too seriously.
  5476.  
  5477.  
  5478. <7>      CRTC Register Protect
  5479.          ---------------------
  5480.  
  5481.          This bit is cleared by hardware RESET.
  5482.  
  5483.          <=0>  Enable writes to CRTC Registers at indexes 0 .. 7.
  5484.          <=1>  Disable writes to CRTC Registers at indexes 0 .. 7.
  5485.  
  5486.  
  5487.          The ability to protect certain important register groups can assist
  5488.          with emulation, by preventing programs from changing critical data.
  5489.  
  5490.          Typical use allows direct register writes from software, by keeping
  5491.          registers which cannot be changed intact, whilst permitting others
  5492.          to be modified.  This is an emulation issue only, so is of little
  5493.          importance for new software architecture implementations.
  5494.  
  5495.  
  5496.          See {6.05.02} Horizontal Total Register.                 {0}
  5497.          See {6.05.03} Horizontal Display Enable End Register.    {1}
  5498.          See {6.05.04} Start Horizontal Blanking Register.        {2}
  5499.          See {6.05.05} End Horizontal Blanking Register.          {3}
  5500.          See {6.05.06} Start Horizontal Retrace Pulse Register.   {4}
  5501.          See {6.05.07} End Horizontal Retrace Register.           {5}
  5502.          See {6.05.08} Vertical Total Register.                   {6}
  5503.          See {6.05.09} CRT Controller Overflow Register.          {7}
  5504.  
  5505.  
  5506.          The following is not true for the Trident 8900 chip.
  5507.          The following is valid for the Chips 82C456 chip.
  5508.  
  5509.          The Vertical Retrace End Register can be made invisible at this
  5510.          index address, when the Lightpen Low Register is placed at this
  5511.          same register index.
  5512.          For details see the Light Pen Register Enable description.
  5513.  
  5514.          See {6.05.05} End Horizontal Blanking Register.
  5515.  
  5516.  
  5517.  
  5518.  
  5519. 6.05.20  Vertical Display Enable End Register     { 3?5h    12h    R/W }
  5520. =======  ===============================================================
  5521.  
  5522.  
  5523. Cross reference with {6.05.08} Vertical Total Register.
  5524. Cross reference with {6.05.09} CRT Controller Overflow Register.
  5525. Cross reference with {6.05.25} CRTC Mode Control Register.
  5526. Cross reference with {6.07.19} Overscan Colour Register.
  5527. Cross reference with {6.10.12} Clear Vertical Display Enable Register.
  5528.  
  5529.  
  5530. <7..0>   Vertical Display Enable End
  5531.          ---------------------------
  5532.  
  5533.          This binary value represents the eight lower order bits of a ten bit
  5534.          width Vertical Display Enable End value.  This ten bit value is used
  5535.          in conjunction with the character row counter.  When a match between
  5536.          these two values occurs, the active portion of the display finishes.
  5537.  
  5538.          This happens when the current display scan line runs into the first
  5539.          non-display scan line.   At that time, the display unit produces the
  5540.          colour specified by the Overscan Colour Register.  Typically several
  5541.          scan lines, termed overscan lines, are produced both at a frame end
  5542.          and at a frame start.  The two high order bits are stored elsewhere.
  5543.  
  5544.          See {6.05.09} CRT Controller Overflow Register.
  5545.          See {6.07.19} Overscan Colour Register.
  5546.  
  5547.          The active part of the display image is produced from the time when
  5548.          the character row counter has the value zero, representing the first
  5549.          scan line of the image proper, through to the value in this register.
  5550.  
  5551.          The only time this is not true is when the vertical display enable
  5552.          state is cleared asynchronously by special command.
  5553.  
  5554.          See {6.10.12} Clear Vertical Display Enable Register.
  5555.  
  5556.          The units in which vertical timing is measured can be changed by a
  5557.          factor of two upon option setting.
  5558.  
  5559.          See {6.05.25} CRTC Mode Control Register.
  5560.  
  5561.          A discussion of vertical timing and image generation is available,
  5562.          with a timing diagram.
  5563.  
  5564.          See {6.05.08} Vertical Total Register.
  5565.  
  5566.  
  5567.  
  5568.  
  5569. 6.05.21  Offset Register                          { 3?5h    13h    R/W }
  5570. =======  ===============================================================
  5571.  
  5572.  
  5573. Cross reference with {6.05.10} Preset Row Scan Register.
  5574. Cross reference with {6.05.14} Start Address High Register.
  5575. Cross reference with {6.05.15} Start Address Low Register.
  5576. Cross reference with {6.05.22} Underline Location Register.
  5577. Cross reference with {6.05.25} CRTC Mode Control Register.
  5578.  
  5579.  
  5580. <7..0>   Display Image Offset
  5581.          --------------------
  5582.  
  5583.          The value of this field defines the image width for the complete image
  5584.          retained in the image memory.  This width is typically the same width
  5585.          as that of the image display, or possibly a greater width.
  5586.  
  5587.          This value employs a memory addressing unit of variable size according
  5588.          to the units of address employed by the display memory address counter
  5589.          determined by option settings:
  5590.  
  5591.  
  5592.          Display Memory Address Unit 2
  5593.          See {6.05.25} CRTC Mode Control Register.
  5594.  
  5595.          Display Memory Address Unit 4
  5596.          See {6.05.22} Underline Location Register.
  5597.  
  5598.  
  5599.          Display Memory Address Unit 4
  5600.          =----------------------------
  5601.  
  5602.               Display Memory Address Unit 2
  5603.          =    =----------------------------
  5604.  
  5605.                    Unit of display addressing
  5606.          =    =    ==========================--------------------
  5607.  
  5608.  
  5609.          0    0    Word mode addressing          { 2 byte units }
  5610.  
  5611.          0    1    Byte mode addressing          { 1 byte units }
  5612.  
  5613.          1    0    Double word mode addressing   { 4 byte units }
  5614.  
  5615.          1    1    Double word mode addressing   { 4 byte units }
  5616.  
  5617.  
  5618.          --------------------------------------------------------
  5619.  
  5620.  
  5621.          Whenever a new display scan line commences the current display address
  5622.          is adjusted to point to the data representing the new scan line.  This
  5623.          might involve skipping some of the data lying within the previous scan
  5624.          line.  This capability is provided so that an image much too large for
  5625.          display in a single screen can be maintained and manipulated easily in
  5626.          image memory.
  5627.  
  5628.          The screen can be made to display different portions of a much larger
  5629.          image by means of panning, in both the horizontal and vertical planes.
  5630.          In fact, for panning to work effectively, there must be a larger image
  5631.          present in image memory than that which can actually be displayed.
  5632.  
  5633.          See {6.05.10} Preset Row Scan Register.
  5634.  
  5635.          There is a circumstance where the value of the current display address
  5636.          register is not dependant upon the Display Image Offset value.  There
  5637.          is a facility which can be used to provide two windows within a single
  5638.          display screen.  The lower window can be made immune from panning.  In
  5639.          this situation, the display address is reset to zero.
  5640.  
  5641.          See {6.05.10} Preset Row Scan Register.
  5642.  
  5643.          Note that the display memory address counter is initialised with
  5644.          the value of the Start Address Register, which automatically has
  5645.          a value expressed in the same addressing units.
  5646.  
  5647.          See {6.05.14} Start Address High Register.
  5648.          See {6.05.15} Start Address Low Register.
  5649.  
  5650.  
  5651.  
  5652.  
  5653. 6.05.22  Underline Location Register              { 3?5h    14h    R/W }
  5654. =======  ===============================================================
  5655.  
  5656.  
  5657. Cross reference with {6.04.05} Character Map Select Register.
  5658. Cross reference with {6.05.14} Start Address High Register.
  5659. Cross reference with {6.05.15} Start Address Low Register.
  5660. Cross reference with {6.05.21} Offset Register.
  5661. Cross reference with {6.05.25} CRTC Mode Control Register.
  5662. Cross reference with {6.06.08} Miscellaneous Register.
  5663. Cross reference with {6.07.18} Attribute Mode Control Register.
  5664. Cross reference with {6.10.04} Mode Control Register 2.
  5665.  
  5666.  
  5667. <4..0>   Underline Location
  5668.          ------------------
  5669.  
  5670.          This field specifies which character font relative scan line will be
  5671.          used to display an underline invoked by a character attribute in the
  5672.          Monochrome Graphics Adapter, Colour Graphics Adapter or the Hercules
  5673.          modes.  The first scan line in a font is numbered zero.  The feature
  5674.          operates only in text mode.
  5675.  
  5676.          See {6.06.08} Miscellaneous Register.
  5677.  
  5678.          The underline attribute appears as follows in these modes.
  5679.  
  5680.          See {6.10.04} Mode Control Register 2.
  5681.  
  5682.  
  5683.          Character Attribute Byte, Monochrome Emulation Mode
  5684.          ===================================================
  5685.  
  5686.          For monochrome emulation mode, set the Display Generation Mode.
  5687.          See {6.07.18} Attribute Mode Control Register.
  5688.  
  5689.  
  5690.          <2..0>  Foreground
  5691.                  ----------
  5692.  
  5693.                  <=000>  Black
  5694.                  <=001>  Underline
  5695.                  <=111>  White
  5696.  
  5697.  
  5698.          <3>     Intensity
  5699.                  ---------
  5700.  
  5701.                  <=0>  Normal
  5702.                  <=1>  High Intensity {alternatively character set select}
  5703.  
  5704.                   See {6.04.05} Character Map Select Register.
  5705.  
  5706.  
  5707.          <6..4>  Background
  5708.                  ----------
  5709.  
  5710.                  <=000>  Black
  5711.                  <=111>  White
  5712.  
  5713.  
  5714.          <7>     Blink
  5715.                  -----
  5716.  
  5717.                  <=0>  Normal
  5718.                  <=1>  Blink {alternatively high intensity select}
  5719.  
  5720.                  See {6.07.18} Attribute Mode Control Register.
  5721.  
  5722.  
  5723.          Character Attribute Byte, Colour Emulation Mode
  5724.          ===============================================
  5725.  
  5726.          For colour emulation mode, set the Display Generation Mode.
  5727.          See {6.07.18} Attribute Mode Control Register.
  5728.  
  5729.  
  5730.          <0>     Foreground Blue
  5731.                  ---------------
  5732.  
  5733.                  <=0>  No blue colour
  5734.                  <=1>  Output blue colour
  5735.  
  5736.  
  5737.          <1>     Foreground Green
  5738.                  ----------------
  5739.  
  5740.                  <=0>  No green colour
  5741.                  <=1>  Output green colour
  5742.  
  5743.  
  5744.          <2>     Foreground Red
  5745.                  --------------
  5746.  
  5747.                  <=0>  No red colour
  5748.                  <=1>  Output red colour
  5749.  
  5750.  
  5751.          <3>     Intensity
  5752.                  ---------
  5753.  
  5754.                  <=0>  Normal
  5755.                  <=1>  High Intensity {alternatively character set select}
  5756.  
  5757.                   See {6.04.05} Character Map Select Register.
  5758.  
  5759.  
  5760.          <4>     Background Blue
  5761.                  ---------------
  5762.  
  5763.                  <=0>  No blue colour
  5764.                  <=1>  Output blue colour
  5765.  
  5766.  
  5767.          <5>     Background Green
  5768.                  ----------------
  5769.  
  5770.                  <=0>  No green colour
  5771.                  <=1>  Output green colour
  5772.  
  5773.  
  5774.          <6>     Background Red
  5775.                  --------------
  5776.  
  5777.                  <=0>  No red colour
  5778.                  <=1>  Output red colour
  5779.  
  5780.  
  5781.          <7>     Blink
  5782.                  -----
  5783.  
  5784.                  <=0>  Normal
  5785.                  <=1>  Blink {alternatively high intensity select}
  5786.  
  5787.                  See {6.07.18} Attribute Mode Control Register.
  5788.  
  5789.  
  5790. <5>      Display Address Dwell Count 4
  5791.          -----------------------------
  5792.  
  5793.          The display memory address counter increments the memory address at a
  5794.          rate dependant upon the character clock frequency.  It is possible to
  5795.          increment the display memory address every character clock, or permit
  5796.          a number of character clock periods to elapse before the increment is
  5797.          put into effect.  When the display address does not change with every
  5798.          change of character clock, the display address experiences dwell.  It
  5799.          is possible to change the dwell through option settings:
  5800.  
  5801.          Display Address Dwell Count 4  {This.}
  5802.  
  5803.          Display Address Dwell Count 2
  5804.  
  5805.          See {6.05.25} CRTC Mode Control Register.
  5806.  
  5807.  
  5808.          Display Address Dwell Count 4  {This.}
  5809.          =----------------------------
  5810.  
  5811.               Display Address Dwell Count 2
  5812.          =    =----------------------------
  5813.  
  5814.                    Unit of display address dwell
  5815.          =    =    =============================----------------------
  5816.  
  5817.  
  5818.          0    0    Dwell = 1    { 1 character clocking per increment }
  5819.  
  5820.          0    1    Dwell = 2    { 2 character clocking per increment }
  5821.  
  5822.          1    0    Dwell = 4    { 4 character clocking per increment }
  5823.  
  5824.          1    1    Dwell = 2    { 2 character clocking per increment }
  5825.  
  5826.  
  5827.          -------------------------------------------------------------
  5828.  
  5829.  
  5830.          <=0>  Provide a single display address increment after each character
  5831.                clock period.  This provides a new image memory address for all
  5832.                new character clock periods.
  5833.  
  5834.                If the image memory is arranged in multiplane format, this will
  5835.                permit all four planes to be read at the beginning of every new
  5836.                character period.  This is the usual way to access image memory
  5837.                in 16 colour multiplane format.  It does not waste image space.
  5838.  
  5839.                The alternative facilities provided elsewhere are dominant over
  5840.                this option setting.  See the table above.
  5841.  
  5842.                See {6.05.25} CRTC Mode Control Register.
  5843.  
  5844.          <=1>  Specifies that four character clock periods must elapse before
  5845.                the display address increment takes place.  Therefore a single
  5846.                image memory address is issued with four consecutive character
  5847.                clocks.
  5848.  
  5849.                This is useful where the first character clock loaded four data
  5850.                planes using the new address and it is simply required that any
  5851.                new address generated be generated four character clocks later.
  5852.                In this case the intention is that the first clock of the group
  5853.                will load data whilst the remaining three clocks remain unused.
  5854.  
  5855.                This would be the case where the unit of addressing of the image
  5856.                memory has been changed, so permitting a much larger image to be
  5857.                displayed, without needing a display memory address counter with
  5858.                an increased number of bits.
  5859.  
  5860.                See Display Memory Address Unit 4, immediately below.
  5861.  
  5862.                Alternatively, all image planes could be loaded at an identical
  5863.                image memory address on each new character clock, providing for
  5864.                repeated presentation of image data.  The image produced depends
  5865.                upon the image format, either multiplane or packed pixel.  Each
  5866.                situation would be examined individually for appropriate merit.
  5867.  
  5868.                The alternative facilities provided elsewhere are dominant over
  5869.                this option setting.  See the table above.
  5870.  
  5871.                See {6.05.25} CRTC Mode Control Register.
  5872.  
  5873.  
  5874. <6>      Display Memory Address Unit 4
  5875.          -----------------------------
  5876.  
  5877.          The display memory address counter employs a memory addressing
  5878.          unit of variable size according to option settings:
  5879.  
  5880.          Display Memory Address Unit 4  {This.}
  5881.  
  5882.          Display Memory Address Unit 2
  5883.          See {6.05.25} CRTC Mode Control Register.
  5884.  
  5885.  
  5886.          Display Memory Address Unit 4  {This.}
  5887.          =----------------------------
  5888.  
  5889.               Display Memory Address Unit 2
  5890.          =    =----------------------------
  5891.  
  5892.                    Unit of display addressing
  5893.          =    =    ==========================--------------------
  5894.  
  5895.  
  5896.          0    0    Word mode addressing          { 2 byte units }
  5897.  
  5898.          0    1    Byte mode addressing          { 1 byte units }
  5899.  
  5900.          1    0    Double word mode addressing   { 4 byte units }
  5901.  
  5902.          1    1    Double word mode addressing   { 4 byte units }
  5903.  
  5904.  
  5905.          --------------------------------------------------------
  5906.  
  5907.  
  5908.          <=0>  Provide no bit shift between the display memory address counter
  5909.                and the image memory address lines.  This means that an address
  5910.                is generated into the display memory with granularity specified
  5911.                by Display Memory Address Unit 2.  See the table above.
  5912.  
  5913.                See {6.05.25} CRTC Mode Control Register.
  5914.  
  5915.                With this option selected the bit width of the display memory
  5916.                address counter determines the maximum number of bytes in the
  5917.                display image.  No further bytes can contribute to the image,
  5918.                since the image address space is fixed by this finite counter
  5919.                width.  This can represent a problem with large images, using
  5920.                packed pixel display format with 256 colours, since each byte
  5921.                represents one pixel.  With 18 bits of address counter, image
  5922.                size is restricted to 256K/512K which may not be adequate.
  5923.  
  5924.                When the display generation employs multiplane mode, the 256K
  5925.                address capability is sufficient to give full access to every
  5926.                pixel that can be stored in the image memory.  This is because
  5927.                with 1024K of image memory, arranged in four parallel planes,
  5928.                256K of address capacity covers the entire address space.
  5929.  
  5930.                Note that the display memory address counter is initialised with
  5931.                the value of the Start Address Register, which automatically has
  5932.                a value expressed in the same addressing units.
  5933.  
  5934.                See {6.05.14} Start Address High Register.
  5935.                See {6.05.15} Start Address Low Register.
  5936.  
  5937.          <=1>  Left shift the display memory address counter by 2 bits before
  5938.                using the resulting address to access display memory.  In this
  5939.                way, each address is multiplied by four, so becoming a double
  5940.                word address.  This provides an effective increase of two bits
  5941.                in the addressing capability of the memory address counter.
  5942.  
  5943.                This option increases the maximum display image size to four
  5944.                times the original limit, which enables larger packed pixel
  5945.                images to be displayed at high resolution in 256 colours.
  5946.  
  5947.                Since the display memory address counter is 18 bits width, the
  5948.                adoption of two additional bits of addressing span provide for
  5949.                20 bits of total addressing capability.  This gives sufficient
  5950.                capacity to address a full 1024K display memory.
  5951.  
  5952.                A side effect of this greater memory addressing span is that it
  5953.                becomes impossible to address image data in a unit smaller than
  5954.                a group consisting of 4 bytes.  As a direct consequence of this
  5955.                the display hardware must always use load a single 4 byte group
  5956.                at each new display memory address counter value.  Only if this
  5957.                is done can the full image memory capacity be realised. In fact
  5958.                this method of addressing is ideally suited to packed pixel 256
  5959.                colour mode.
  5960.  
  5961.                Note that the display memory address counter is initialised with
  5962.                the value of the Start Address Register, which automatically has
  5963.                a value expressed in the same addressing units.
  5964.  
  5965.                See {6.05.14} Start Address High Register.
  5966.                See {6.05.15} Start Address Low Register.
  5967.  
  5968.                The alternative facilities provided elsewhere are inhibited with
  5969.                this option setting.  See the table above.
  5970.  
  5971.                See {6.05.25} CRTC Mode Control Register.
  5972.  
  5973.  
  5974. <7>      Reserved.  Always <=0>.
  5975.          -----------------------
  5976.  
  5977.  
  5978.  
  5979.  
  5980. 6.05.23  Start Vertical Blanking Register         { 3?5h    15h    R/W }
  5981. =======  ===============================================================
  5982.  
  5983.  
  5984. Cross reference with {6.05.08} Vertical Total Register.
  5985. Cross reference with {6.05.09} CRT Controller Overflow Register.
  5986. Cross reference with {6.05.11} Maximum Scan Line Register.
  5987. Cross reference with {6.05.18} Vertical Retrace Start Register.
  5988. Cross reference with {6.05.19} Vertical Retrace End Register.
  5989. Cross reference with {6.05.24} End Vertical Blanking Register.
  5990. Cross reference with {6.05.25} CRTC Mode Control Register.
  5991. Cross reference with {6.10.07} CRTC Module Testing Register.
  5992.  
  5993.  
  5994.          This register is subject to write protection through option setting.
  5995.          The whole register is affected.
  5996.  
  5997.          See {6.10.07} CRTC Module Testing Register.
  5998.  
  5999.  
  6000. <7..0>   Start Vertical Blanking
  6001.          -----------------------
  6002.  
  6003.          This binary field specifies the lower order 8 bits of the 10 bit width
  6004.          value representing the scan line at which vertical blanking commences.
  6005.          The two remaining bits are stored elsewhere.
  6006.  
  6007.          See {6.05.11} Maximum Scan Line Register.
  6008.          See {6.05.09} CRT Controller Overflow Register.
  6009.  
  6010.          The 10 bit value is compared with the character row counter until the
  6011.          values match.  The character row counter counts all active scan lines
  6012.          in the frame, commencing at zero, which is the first scan line to use
  6013.          image data in the display.
  6014.  
  6015.          When the match occurs the vertical blanking period begins.  During the
  6016.          blanking period the display electron beams which illuminate the screen
  6017.          are temporarily inhibited, for the entire period of vertical retrace.
  6018.  
  6019.          See {6.05.18} Vertical Retrace Start Register.
  6020.          See {6.05.19} Vertical Retrace End Register.
  6021.  
  6022.          The vertical retrace sends the notional position of the electron beams
  6023.          to the top left of the screen.  As this would damage the display image
  6024.          if the electron beams were operational, blanking prevents any problems
  6025.          of image quality by inhibiting the electron beams during retrace.
  6026.  
  6027.          The length of the blanking period is determined using a terminal value
  6028.          to indicate that blanking should finish.
  6029.  
  6030.          See {6.05.24} End Vertical Blanking Register.
  6031.  
  6032.          The units in which vertical timing is measured can be changed by a
  6033.          factor of two upon option setting.
  6034.  
  6035.          See {6.05.25} CRTC Mode Control Register.
  6036.  
  6037.          A discussion of vertical display timing is available together with a
  6038.          timing diagram.
  6039.  
  6040.          See {6.05.08} Vertical Total Register.
  6041.  
  6042.  
  6043.  
  6044.  
  6045. 6.05.24  End Vertical Blanking Register           { 3?5h    16h    R/W }
  6046. =======  ===============================================================
  6047.  
  6048.  
  6049. Cross reference with {6.05.08} Vertical Total Register.
  6050. Cross reference with {6.05.18} Vertical Retrace Start Register.
  6051. Cross reference with {6.05.19} Vertical Retrace End Register.
  6052. Cross reference with {6.05.23} Start Vertical Blanking Register.
  6053. Cross reference with {6.05.25} CRTC Mode Control Register.
  6054. Cross reference with {6.10.07} CRTC Module Testing Register.
  6055.  
  6056.  
  6057.          This register is subject to write protection through option setting.
  6058.          The whole register is affected.
  6059.  
  6060.          See {6.10.07} CRTC Module Testing Register.
  6061.  
  6062.  
  6063. <7..0>   End Vertical Blanking
  6064.          ---------------------
  6065.  
  6066.          This specifies a compare value for use with the character row counter
  6067.          giving the display scan line at which the vertical blanking period is
  6068.          deemed to be complete.  During the vertical blanking period, vertical
  6069.          retrace will have fully taken place.
  6070.  
  6071.          See {6.05.18} Vertical Retrace Start Register.
  6072.          See {6.05.19} Vertical Retrace End Register.
  6073.  
  6074.          The character row counter is actually of 10 bits width but the compare
  6075.          does not take place until after the vertical blanking period has begun
  6076.          so there is no ambiguity in operation.  Therefore the 8 value bits are
  6077.          sufficient under these circumstances to specify upto 255 scan lines of
  6078.          vertical blanking period.  This is such a large number it would never
  6079.          be used in practise.
  6080.  
  6081.          See {6.05.23} Start Vertical Blanking Register.
  6082.  
  6083.          The units in which vertical timing is measured can be changed by a
  6084.          factor of two upon option setting.
  6085.  
  6086.          See {6.05.25} CRTC Mode Control Register.
  6087.  
  6088.          A discussion of vertical display timing is available together with a
  6089.          timing diagram.
  6090.  
  6091.          See {6.05.08} Vertical Total Register.
  6092.  
  6093.  
  6094.  
  6095.  
  6096. 6.05.25  CRTC Mode Control Register               { 3?5h    17h    R/W }
  6097. =======  ===============================================================
  6098.  
  6099.  
  6100. Cross reference with {6.04.03} Clocking Mode Register.
  6101. Cross reference with {6.05.08} Vertical Total Register.
  6102. Cross reference with {6.05.11} Maximum Scan Line Register.
  6103. Cross reference with {6.05.14} Start Address High Register.
  6104. Cross reference with {6.05.15} Start Address Low Register.
  6105. Cross reference with {6.05.18} Vertical Retrace Start Register.
  6106. Cross reference with {6.05.19} Vertical Retrace End Register.
  6107. Cross reference with {6.05.20} Vertical Display Enable End Register.
  6108. Cross reference with {6.05.21} Offset Register.
  6109. Cross reference with {6.05.22} Underline Location Register.
  6110. Cross reference with {6.05.23} Start Vertical Blanking Register.
  6111. Cross reference with {6.05.24} End Vertical Blanking Register.
  6112. Cross reference with {6.05.26} Line Compare Register.
  6113. Cross reference with {6.10.07} CRTC Module Testing Register.
  6114.  
  6115.  
  6116.          This register is subject to write protection through option setting.
  6117.          A single bit <2> only is affected.  {Horizontal Retrace Divisor.}
  6118.  
  6119.          See {6.10.07} CRTC Module Testing Register.
  6120.  
  6121.  
  6122. <0>      Display Address 13 Remap Row 0
  6123.          ------------------------------
  6124.  
  6125.          <=0>  Replace the display memory address counter bit 13 with the
  6126.                character row counter bit 0.  This means that for even row
  6127.                scan line generation, image data addresses are not offset.
  6128.                Odd row scan lines incur an address offset with equivalent
  6129.                value of 8K bytes.  In this way there is an 8K offset with
  6130.                each alternate scan line display.  This facility provides
  6131.                an emulation capability for Colour Graphics Adapter image
  6132.                memory layout.  It is of little interest for construction
  6133.                of new software which aims for high execution speeds.
  6134.  
  6135.                See also Display Address 14 Remap Row 1, below.
  6136.  
  6137.          <=1>  No modification to display memory address counter bit 13
  6138.                takes place.  This is the normal setting for this option.
  6139.  
  6140.  
  6141. <1>      Display Address 14 Remap Row 1
  6142.          ------------------------------
  6143.  
  6144.          <=0>  Replace the display memory address counter bit 14 with the
  6145.                character row counter bit 1.  In this way, the pair number
  6146.                of the scan line being displayed changes the image memory
  6147.                address being used to generate the display.  On each pair
  6148.                change, an equivalent memory offset of 16K is introduced.
  6149.  
  6150.                This option is usually employed in conjunction with that
  6151.                of Display Address 13 Remap Row 0, in order to provide a
  6152.                four bank image memory layout.  This is usually used for
  6153.                Hercules adapter emulation.  It is of little interest in
  6154.                terms of new software aiming for high speed operation.
  6155.  
  6156.          <=1>  No modification to display memory address counter bit 14
  6157.                takes place.  This is the normal setting for this option.
  6158.  
  6159.  
  6160. <2>      Horizontal Retrace Divisor
  6161.          --------------------------
  6162.  
  6163.          <=0>  This option selects horizontal retrace as the source of the
  6164.                decision to increment the character row counter which keeps
  6165.                track of the scan line being generated for display.  Normal
  6166.                operation of the generation process takes place using this
  6167.                option setting.  The character row counter increments after
  6168.                every scan line of the active image is completed.
  6169.  
  6170.          <=1>  This option counts two horizontal retrace events before the
  6171.                increment of the character row counter takes place.  After
  6172.                two scan lines have completed, the character row counter is
  6173.                incremented by only one scan line.  In this way, the timing
  6174.                period for all vertical timing is increased to double the
  6175.                usual period.  At the same time, the maximum number of scan
  6176.                lines resolvable in the 10 bits width character row counter
  6177.                increases from 1024 to 2048.  This can be used to create a
  6178.                display with much higher vertical resolution.
  6179.  
  6180.                See {6.05.08} Vertical Total Register.
  6181.                See {6.05.18} Vertical Retrace Start Register.
  6182.                See {6.05.19} Vertical Retrace End Register.
  6183.                See {6.05.20} Vertical Display Enable End Register.
  6184.                See {6.05.23} Start Vertical Blanking Register.
  6185.                See {6.05.24} End Vertical Blanking Register.
  6186.                See {6.05.26} Line Compare Register.
  6187.  
  6188.                While this mode is operational, the display memory address
  6189.                counter operation is unaffected and so behaves as normal.
  6190.                This means that the image data is always read from display
  6191.                memory with continually increasing addresses.  Every scan
  6192.                line is built using image data unique to that scan line.
  6193.  
  6194.                Warning: do not confuse this capability with that provided
  6195.                by the Double Scan Line Display.
  6196.  
  6197.                See {6.05.11} Maximum Scan Line Register.
  6198.  
  6199.  
  6200.  
  6201.  
  6202. <3>      Display Address Dwell Count 2
  6203.          -----------------------------
  6204.  
  6205.          The display memory address counter increments the memory address at a
  6206.          rate dependant upon the character clock frequency.  It is possible to
  6207.          increment the display memory address every character clock, or permit
  6208.          a number of character clock periods to elapse before the increment is
  6209.          put into effect.  When the display address does not change with every
  6210.          change of character clock, the display address experiences dwell.  It
  6211.          is possible to change the dwell through option settings:
  6212.  
  6213.          Display Address Dwell Count 4
  6214.          See {6.05.22} Underline Location Register.
  6215.  
  6216.          Display Address Dwell Count 2  {This.}
  6217.  
  6218.  
  6219.          Display Address Dwell Count 4
  6220.          =----------------------------
  6221.  
  6222.               Display Address Dwell Count 2  {This.}
  6223.          =    =----------------------------
  6224.  
  6225.                    Unit of display address dwell
  6226.          =    =    =============================----------------------
  6227.  
  6228.  
  6229.          0    0    Dwell = 1    { 1 character clocking per increment }
  6230.  
  6231.          0    1    Dwell = 2    { 2 character clocking per increment }
  6232.  
  6233.          1    0    Dwell = 4    { 4 character clocking per increment }
  6234.  
  6235.          1    1    Dwell = 2    { 2 character clocking per increment }
  6236.  
  6237.  
  6238.          -------------------------------------------------------------
  6239.  
  6240.  
  6241.          <=0>  Provide a single display address increment after each character
  6242.                clock period.  This provides a new image memory address for all
  6243.                new character clock periods.
  6244.  
  6245.                If the image memory is arranged in multiplane format, this will
  6246.                permit all four planes to be read at the beginning of every new
  6247.                character period.  This is the usual way to access image memory
  6248.                in 16 colour multiplane format.  It does not waste image space.
  6249.  
  6250.                The alternative facilities provided elsewhere are available with
  6251.                this option setting.  See table above.
  6252.  
  6253.                See {6.05.22} Underline Location Register.
  6254.  
  6255.          <=1>  Specifies that two character clock periods must elapse before a
  6256.                new display memory address is produced by increment.  Thus just
  6257.                one new display memory address is produced each two consecutive
  6258.                character clocks.
  6259.  
  6260.                This is useful where the first character clock loaded two data
  6261.                planes using the new address and it is simply required that any
  6262.                new address generated be generated two character clocks later.
  6263.                In this case the intention is that the first clock of the group
  6264.                will load data while the remaining clock period remains unused.
  6265.  
  6266.                This would be the case where the unit of addressing of the image
  6267.                memory has been changed, so permitting a much larger image to be
  6268.                displayed, without needing a display memory address counter with
  6269.                an increased number of bits.
  6270.  
  6271.                See Display Memory Address Unit 2, below.
  6272.  
  6273.                The alternative facilities provided elsewhere are dominated by
  6274.                this option setting.  See table above.
  6275.  
  6276.                See {6.05.22} Underline Location Register.
  6277.  
  6278.  
  6279. <4>      Reserved.  Always <=0>.
  6280.          -----------------------
  6281.  
  6282.  
  6283. <5>      Display Address Unit 2 Remap
  6284.          ----------------------------
  6285.  
  6286.          <=0>  When option Display Memory Address Unit 2 {see below} is active,
  6287.                this selection specifies that the display memory address counter
  6288.                bit 0 will take on the value of memory address counter bit 13.
  6289.                Address counter bit 13 measures addresses in terms of 8K units.
  6290.                One 8K unit is sometimes termed a bank.
  6291.  
  6292.                The effect is to double the address span which can be achieved,
  6293.                by using bit 0 to specify which memory bank to select.  In word
  6294.                address mode, bit 0 is never used for address generation since
  6295.                byte addresses are always incremented by 2.  Therefore bit 0 is
  6296.                always left unchanged.
  6297.  
  6298.                When display image memory is organised as multiple planes, each
  6299.                of the four planes shares an identical, parallel address space.
  6300.                In this situation, each word address accesses all the planes in
  6301.                parallel, by using what amounts to an even byte address.  When
  6302.                the increment occurs the odd byte address situated between the
  6303.                two even addresses is skipped, so remaining inaccessible.
  6304.  
  6305.                This has the effect of wasting half the address space.  To avoid
  6306.                such waste, the display memory address counter bit 0 is used to
  6307.                differentiate between even and odd numbered byte addresses.  The
  6308.                display unit will only access even byte addresses initially, but
  6309.                after reading half an 8K bank, will proceed to read that bank by
  6310.                accessing only odd byte addresses.  In this way, the bank space
  6311.                is effectively doubled.
  6312.  
  6313.                The option of selecting bit 13 is decided by the maximum amount
  6314.                of image memory present.  Were only 64K bytes available, there
  6315.                would be 16K of multiplane memory address space present with 4
  6316.                bytes at each memory address.  In this situation 14 effective
  6317.                memory address counter bits <13..0> would provide 16K units of
  6318.                addressing.  With this option selected, that enables the whole
  6319.                of the image memory to be used for image generation.
  6320.  
  6321.                This option simply changes the significance and manner of use of
  6322.                the display memory address counter bits.  It should be used only
  6323.                for emulation purposes.  Note that use of this option cannot be
  6324.                entirely avoided when the Display Memory Address Unit 2 option
  6325.                is active.
  6326.  
  6327.          <=1>  When option Display Memory Address Unit 2 {see below} is active,
  6328.                this selection specifies that the display memory address counter
  6329.                bit 0 will take on the value of memory address counter bit 15.
  6330.                Address counter bit 15 measures addresses in terms of 32K units.
  6331.                One 32K unit is sometimes termed a bank.
  6332.  
  6333.                The effect is to double the address span which can be achieved,
  6334.                by using bit 0 to specify which memory bank to select.  In word
  6335.                address mode, bit 0 is never used for address generation since
  6336.                byte addresses are always incremented by 2.  Therefore bit 0 is
  6337.                always left unchanged.
  6338.  
  6339.                When display image memory is organised as multiple planes, each
  6340.                of the four planes shares an identical, parallel address space.
  6341.                In this situation, each word address accesses all the planes in
  6342.                parallel, by using what amounts to an even byte address.  When
  6343.                the increment occurs the odd byte address situated between the
  6344.                two even addresses is skipped, so remaining inaccessible.
  6345.  
  6346.                This has the effect of wasting half the address space.  To avoid
  6347.                such waste, the display memory address counter bit 0 is used to
  6348.                differentiate between even and odd numbered byte addresses.  The
  6349.                display unit will only access even byte addresses initially, but
  6350.                after reading half a 32K bank, will proceed to read that bank by
  6351.                accessing only odd byte addresses.  In this way, the bank space
  6352.                is effectively doubled.
  6353.  
  6354.                The option of selecting bit 15 is decided by the maximum amount
  6355.                of image memory present.  Where 256K bytes is available, there
  6356.                would be 64K of multiplane memory address space present with 4
  6357.                bytes at each memory address.  In this situation 16 effective
  6358.                memory address counter bits <15..0> would provide 64K units of
  6359.                addressing.  With this option selected, that enables the whole
  6360.                of the image memory to be used for image generation.
  6361.  
  6362.                This option simply changes the significance and manner of use of
  6363.                the display memory address counter bits.  It should be used only
  6364.                for emulation purposes.  Note that use of this option cannot be
  6365.                entirely avoided when the Display Memory Address Unit 2 option
  6366.                is active.
  6367.  
  6368.  
  6369. <6>      Display Memory Address Unit 2
  6370.          -----------------------------
  6371.  
  6372.          The display memory address counter employs a memory addressing
  6373.          unit of variable size according to option settings:
  6374.  
  6375.          Display Memory Address Unit 2  {This.}
  6376.  
  6377.          Display Memory Address Unit 4
  6378.          See {6.05.22} Underline Location Register.
  6379.  
  6380.  
  6381.          Display Memory Address Unit 4
  6382.          =----------------------------
  6383.  
  6384.               Display Memory Address Unit 2  {This.}
  6385.          =    =----------------------------
  6386.  
  6387.                    Unit of display addressing
  6388.          =    =    ==========================--------------------
  6389.  
  6390.  
  6391.          0    0    Word mode addressing          { 2 byte units }
  6392.  
  6393.          0    1    Byte mode addressing          { 1 byte units }
  6394.  
  6395.          1    0    Double word mode addressing   { 4 byte units }
  6396.  
  6397.          1    1    Double word mode addressing   { 4 byte units }
  6398.  
  6399.  
  6400.          --------------------------------------------------------
  6401.  
  6402.  
  6403.          <=0>  Left shift the display memory address counter by 1 bit, before
  6404.                using the resulting address to access display memory.  In this
  6405.                way, each address is multiplied by two, thus becoming a double
  6406.                byte address.  This provides an apparent effective increase of
  6407.                one bit in the memory address counter addressing capability.
  6408.  
  6409.                However, it also fails to use bit 0 of the resulting effective
  6410.                memory address, which would decrease the size of the resulting
  6411.                address space.  There is automatic capability to use the extra
  6412.                bit 0 to increase the size of the address space.  Note that it
  6413.                has the effect of returning the address space size to the same
  6414.                size it was before Display Memory Address Unit 2 became active.
  6415.  
  6416.                Thus this option simply changes the interpretation attributed
  6417.                to the display memory address counter, and does not increase
  6418.                the address range generated.  However, the organisation of the
  6419.                address space is changed.  Use this facility with due caution,
  6420.                probably only for emulation purposes.
  6421.  
  6422.                See Display Address Unit 2 Remap, immediately above.
  6423.  
  6424.                This option is often termed word address mode, since two bytes
  6425.                make up one single word.
  6426.  
  6427.                Note that the display memory address counter is initialised with
  6428.                the value of the Start Address Register, which automatically has
  6429.                a value expressed in the same addressing units.
  6430.  
  6431.                See {6.05.14} Start Address High Register.
  6432.                See {6.05.15} Start Address Low Register.
  6433.  
  6434.                The alternative facilities provided elsewhere are dominant over
  6435.                this option setting.  This is shown clearly in the table above.
  6436.  
  6437.                See {6.05.22} Underline Location Register.
  6438.  
  6439.  
  6440.          <=1>  Provide no bit shift between the display memory address counter
  6441.                and the image memory address lines.  This means that an address
  6442.                is generated into the display memory with a granularity of one
  6443.                single byte.  This option is often termed byte address mode.
  6444.  
  6445.                With this option selected the bit width of the display memory
  6446.                address counter determines the maximum number of bytes in the
  6447.                display image.  No further bytes can contribute to the image,
  6448.                since the image address space is fixed by this finite counter
  6449.                width.  This can represent a problem with large images, using
  6450.                packed pixel display format with 256 colours, since each byte
  6451.                represents one pixel.  With 18 bits of address counter, image
  6452.                size is restricted to 256K.
  6453.  
  6454.                Note that the display memory address counter is initialised with
  6455.                the value of the Start Address Register, which automatically has
  6456.                a value expressed in the same addressing units.
  6457.  
  6458.                See {6.05.14} Start Address High Register.
  6459.                See {6.05.15} Start Address Low Register.
  6460.  
  6461.                The alternative facilities provided elsewhere are dominant over
  6462.                this option setting.  This is shown clearly in the table above.
  6463.  
  6464.                See {6.05.22} Underline Location Register.
  6465.  
  6466.  
  6467. <7>      Horizontal/Vertical Retrace Reset
  6468.          ---------------------------------
  6469.  
  6470.          <=0>  Reset the horizontal and vertical retrace signals to the
  6471.                display unit.
  6472.  
  6473.          <=1>  Generate horizontal and vertical retrace signals to the
  6474.                display unit.  This is the usual setting for the option.
  6475.  
  6476.  
  6477.  
  6478.  
  6479.          A note on addresses produced by the display memory address counter
  6480.          ==================================================================
  6481.  
  6482.  
  6483.          Addresses are generated by the display memory address counter, but
  6484.          these addresses are then mapped to the actual memory address lines
  6485.          before being used.  The table shown below gives the detail of this
  6486.          mapping.
  6487.  
  6488.  
  6489.  
  6490.  
  6491.          Physical memory address used for display generation
  6492.          ====-----------------------------------------------
  6493.  
  6494.  
  6495.                  Display Memory Address Counter Bit
  6496.          ====    -------------------------------------------------
  6497.                                          |           |           |
  6498.                                          |           |           |
  6499.                  Byte Mode Addressing    |           |           |
  6500.          ====    ====---------------------           |           |
  6501.                                                      |           |
  6502.                                                      |           |
  6503.                          Word Mode Addressing        |           |
  6504.          ====    ====    ====-------------------------           |
  6505.                                                                  |
  6506.                                                                  |
  6507.                                  Double Word Mode Addressing     |
  6508.          ====    ====    ====    ====-----------------------------
  6509.  
  6510.  
  6511.                                          Comments
  6512.          ====    ====    ====    ====    ------------------------------------
  6513.  
  6514.  
  6515.          PA00    MA00     [1]     [2]    [1] is defined by the option
  6516.                                          Display Address Unit 2 Remap
  6517.          PA01    MA01    MA00     [3]    see above <5>.  This is only
  6518.                                          valid in word address mode.
  6519.          PA02    MA02    MA01    MA00
  6520.  
  6521.          PA03    MA03    MA02    MA01
  6522.                                          [2] is defined by the display
  6523.          PA04    MA04    MA03    MA02    mode in use.
  6524.  
  6525.          PA05    MA05    MA04    MA03    See Shift Load Two Control
  6526.                                              {6.04.03} Clocking Mode Register
  6527.          PA06    MA06    MA05    MA04    See Shift Load Four Control
  6528.                                              {6.04.03} Clocking Mode Register
  6529.          PA07    MA07    MA06    MA05
  6530.  
  6531.          PA08    MA08    MA07    MA06
  6532.                                          [3] is defined by the display
  6533.          PA09    MA09    MA08    MA07    mode in use.
  6534.  
  6535.          PA10    MA10    MA09    MA08    See Shift Load Two Control
  6536.                                              {6.04.03} Clocking Mode Register
  6537.          PA11    MA11    MA10    MA09    See Shift Load Four Control
  6538.                                              {6.04.03} Clocking Mode Register
  6539.          PA12    MA12    MA11    MA10
  6540.  
  6541.          PA13    MA13    MA12    MA11
  6542.  
  6543.          PA14    MA14    MA13    MA12
  6544.  
  6545.          PA15    MA15    MA14    MA13
  6546.  
  6547.          PA16    MA16    MA15    MA14
  6548.  
  6549.          PA17    MA17    MA16    MA15
  6550.  
  6551.          PA18    ----    MA17    MA16
  6552.  
  6553.          PA19    ----    ----    MA17
  6554.  
  6555.  
  6556.          --------------------------------------------------------------------
  6557.  
  6558.  
  6559.  
  6560.  
  6561. 6.05.26  Line Compare Register                    { 3?5h    18h    R/W }
  6562. =======  ===============================================================
  6563.  
  6564.  
  6565. Cross reference with {6.05.08} Vertical Total Register.
  6566. Cross reference with {6.05.09} CRT Controller Overflow Register.
  6567. Cross reference with {6.05.10} Preset Row Scan Register.
  6568. Cross reference with {6.05.11} Maximum Scan Line Register.
  6569. Cross reference with {6.05.14} Start Address High Register.
  6570. Cross reference with {6.05.15} Start Address Low Register.
  6571. Cross reference with {6.05.25} CRTC Mode Control Register.
  6572. Cross reference with {6.07.18} Attribute Mode Control Register.
  6573. Cross reference with {6.07.21} Horizontal PEL Panning Register.
  6574.  
  6575.  
  6576. <7..0>   Line Compare
  6577.          ------------
  6578.  
  6579.          This binary field represents the lower eight bits of the full 10 bit
  6580.          wide value of the Line Compare Register.  The 10 bit value specifies
  6581.          the scan line registered by the character row counter when a change
  6582.          should be made to a second display window in the two window screen.
  6583.          The higher order bits are held elsewhere.
  6584.  
  6585.          See {6.05.09} CRT Controller Overflow Register.
  6586.          See {6.05.11} Maximum Scan Line Register.
  6587.  
  6588.          The two windows are distinguished in that the first always specifies
  6589.          a non-zero starting address into the image memory, and is subject to
  6590.          panning control.  The second window always begins at a display image
  6591.          memory address of zero, and may either be panned in the same manner
  6592.          as the first window, or alternatively may be made immune to panning,
  6593.          as determined by option setting.
  6594.  
  6595.          When the match occurs with the character row counter, the display
  6596.          memory address counter is reset to zero, ready for display of the
  6597.          second, lower window.  Simultaneously, any panning controls which
  6598.          were in operation for the upper window are optionally cancelled,
  6599.          until the next frame display commences.
  6600.  
  6601.          See {6.05.14} Start Address High Register.
  6602.          See {6.05.15} Start Address Low Register.
  6603.          See {6.07.18} Attribute Mode Control Register.
  6604.  
  6605.          A discussion of pixel panning is available.
  6606.          See {6.05.10} Preset Row Scan Register.
  6607.          See {6.07.21} Horizontal PEL Panning Register.
  6608.  
  6609.          A discussion of vertical display timing generation is available with
  6610.          a timing diagram.
  6611.  
  6612.          See {6.05.08} Vertical Total Register.
  6613.  
  6614.          The units in which vertical timing is measured can be changed by a
  6615.          factor of two upon option setting.
  6616.  
  6617.          See {6.05.25} CRTC Mode Control Register.
  6618.  
  6619.  
  6620.  
  6621.  
  6622. 6.06  Register specifications: Graphics Controller
  6623. ====  ============================================
  6624.  
  6625.  
  6626. 6.06.01  Graphics Address Register    { 3ceh    ---    R/W }
  6627. =======  ===================================================
  6628.  
  6629.  
  6630. <3..0>   Graphics Register Address
  6631.          -------------------------
  6632.  
  6633.          Port 3cfh accesses the register pointed to by the index number in this
  6634.          bit field.  Index number zero is represented by <=0000>.
  6635.  
  6636.  
  6637. <7..4>   Reserved. Always <=0000>.
  6638.          -------------------------
  6639.  
  6640.  
  6641.  
  6642.  
  6643. 6.06.02  Set/Reset Register           { 3cfh    00h    R/W }
  6644. =======  ===================================================
  6645.  
  6646.  
  6647. Cross reference with {6.04.04} Map Mask Register.
  6648. Cross reference with {6.04.06} Sequencer Memory Mode Register.
  6649. Cross reference with {6.06.03} Enable Set/Reset Register.
  6650. Cross reference with {6.06.05} Data Rotate Register.
  6651. Cross reference with {6.06.07} Graphics Mode Register.
  6652. Cross reference with {6.06.10} Bit Mask Register.
  6653. Cross reference with {6.10.09} CPU Latch Read Back Register.
  6654.  
  6655.  
  6656. <0>      Set/Reset Data Image Plane 0
  6657.          ----------------------------
  6658.  
  6659.          During multiplane image memory write access operation by the processor
  6660.          this bit helps to determine the value written to the byte lying within
  6661.          display memory image plane 0.
  6662.  
  6663.          <=0>  The data value 0 is selected for image plane zero, so long as
  6664.                the plane is suitably enabled for this operation.
  6665.  
  6666.                See {6.06.03} Enable Set/Reset Register.
  6667.  
  6668.          <=1>  The data value 1 is selected for image plane zero, so long as
  6669.                the plane is suitably enabled for this operation.
  6670.  
  6671.                See {6.06.03} Enable Set/Reset Register.
  6672.  
  6673.          The precise effect of this bit is determined by the write mode used to
  6674.          perform the update operation.  There are four different write modes as
  6675.          follows:
  6676.  
  6677.  
  6678.          Write Mode 0
  6679.          ============
  6680.  
  6681.          At any single address, each image plane stores one eight bit byte so
  6682.          providing for 32 bits total storage spread across four planes.  Each
  6683.          bit position on each of the four planes provides a four bit value so
  6684.          that 16 colours can be represented.  In this way, eight neighbouring
  6685.          pixels are completely described by the 32 bits at a single address.
  6686.          This convention for image memory organisation is termed multiplane.
  6687.  
  6688.          Processor data for write arrive as an 8 bit wide value.  These bits
  6689.          are rotated.  The rotated bits are copied in parallel to data paths
  6690.          8 bits wide associated with each of the four image memory planes.
  6691.  
  6692.          Where Set/Reset Enable Image Plane 0 is set <=1>, all eight data path
  6693.          bits associated with image plane 0 are set to just one value given by
  6694.          the single bit Set/Reset Data Image Plane 0.  All other memory planes
  6695.          are processed in an identical manner.  Four output data paths result,
  6696.          each of eight bits width, making a total of 32 bits.
  6697.  
  6698.          These result data paths are then operated upon by a logic unit with
  6699.          capability to perform combining operations with corresponding eight
  6700.          bit contents of four read latches, one each per image memory plane.
  6701.          The read latches must be well defined for this processing to be of
  6702.          any value.  The combining operations are NO_OP, AND, OR, XOR.  The
  6703.          NO_OP passes the data through unchanged, ignoring read latch data,
  6704.          but the read latches are updated with the data as a consequence.
  6705.  
  6706.          Thereafter, each plane in parallel has the result of the previously
  6707.          described processing combined with the contents of the read latches
  6708.          (which must previously have been defined using a read operation).
  6709.  
  6710.          This combining operation selects for each image plane data path, and
  6711.          for each of eight bits in one data path, the value of the processing
  6712.          path bit or the value of the read latch bit, in identical position.
  6713.          The selection is based on all eight bits of a bit mask register used
  6714.          specially for just this purpose.  Any given bit position in the mask
  6715.          register will select either the process data path or the read latch
  6716.          output path, in identical manner, for the corresponding bit position
  6717.          in each of the four image planes.
  6718.  
  6719.          The output from this operation is another 32 bit wide data path, made
  6720.          up of four eight bit wide paths, one for each of four image planes.
  6721.          This final output data is written in a single write operation to each
  6722.          corresponding image plane in parallel, subject to plane write inhibit
  6723.          state.  Each plane can be write inhibited in complete independance of
  6724.          any other plane.  A write inhibit state prevents any write operations
  6725.          from modifying data within the corresponding image plane.
  6726.  
  6727.          Write mode 3 processes for relative colour.  By contrast, write mode
  6728.          0 should be seen as processing in terms of absolute colour.
  6729.  
  6730.          The use of the Set/Reset Enable and Set/Reset Data input is to specify
  6731.          a four bit colour value across a single bit position within all planes
  6732.          of the image memory, in parallel.  In this way, the processor supplied
  6733.          data is either used unchanged, is modified partially, or is completely
  6734.          ignored when deciding how to process for update.  The resulting output
  6735.          is used by the logic unit together with the read latch contents.  This
  6736.          provides extremely powerful colour processing capability when properly
  6737.          used.  This write mode is probably the most generally used write mode.
  6738.  
  6739.          See {6.06.07} Graphics Mode Register.
  6740.  
  6741.  
  6742.  
  6743.  
  6744.          Schematic Overview of Data Path for Write Mode 0
  6745.          ================================================
  6746.          ================================================
  6747.  
  6748.  
  6749.  
  6750.  
  6751.  Processor Data
  6752.  ===========---
  6753.  <7654.3210>
  6754.       |
  6755.  [All Planes]
  6756.       |
  6757.       |
  6758.       |
  6759.       |             Multiplane
  6760.       |             Rotation
  6761.       |             Select
  6762.       |             ==========-
  6763.       |             <7654.3210>
  6764.       |                  |
  6765.      .|             [All planes]
  6766.      |                   |
  6767.      |                   |
  6768.      | ..................|
  6769.      | |
  6770.      | |
  6771.      | |
  6772.  Data Rotation
  6773.  ===========--
  6774.  <7654.3210>
  6775.       |
  6776.  [All Planes]
  6777.       |
  6778.       |
  6779.       |
  6780.       | Copy all data into four identical data paths
  6781.       |.........................................................
  6782.       |                  |                  |                  |
  6783.   [Plane 0]          [Plane 1]          [Plane 2]          [Plane 3]
  6784.       |                  |                  |                  |
  6785.       |                  |                  |                  |
  6786.  .....|             .....|             .....|             .....|
  6787.  |                  |                  |                  |
  6788.  |                  |                  |                  |
  6789.  |                  |                  |                  |
  6790.  |  Force Value     |  Force Value     |  Force Value     |  Force Value
  6791.  |  Enable bit      |  Enable bit      |  Enable bit      |  Enable bit
  6792.  |  ===========     |  ===========     |  ===========     |  ===========
  6793.  |       |          |       |          |       |          |       |
  6794.  |   [Plane 0]      |   [Plane 1]      |   [Plane 2]      |   [Plane 3]
  6795.  |       |          |       |          |       |          |       |
  6796.  |       |          |       |          |       |          |       |
  6797.  | ......|          | ......|          | ......|          | ......|
  6798.  | |                | |                | |                | |
  6799.  | |                | |                | |                | |
  6800.  | |                | |                | |                | |
  6801.  | |  Force Value   | |  Force Value   | |  Force Value   | |  Force Value
  6802.  | |  Data bit      | |  Data bit      | |  Data bit      | |  Data bit
  6803.  | |  ===========   | |  ===========   | |  ===========   | |  ===========
  6804.  | |       |        | |       |        | |       |        | |       |
  6805.  | |   [Plane 0]    | |   [Plane 1]    | |   [Plane 2]    | |   [Plane 3]
  6806.  | |       |        | |       |        | |       |        | |       |
  6807.  | |       |        | |       |        | |       |        | |       |
  6808.  | |...    |        | |...    |        | |...    |        | |...    |
  6809.  |    |    |        |    |    |        |    |    |        |    |    |
  6810.  |    |    |        |    |    |        |    |    |        |    |    |
  6811.  |... | ...|        |... | ...|        |... | ...|        |... | ...|
  6812.     | | |              | | |              | | |              | | |
  6813.     | | |              | | |              | | |              | | |
  6814.     | | |              | | |              | | |              | | |
  6815.  Force Value        Force Value        Force Value        Force Value
  6816.  of each bit        of each bit        of each bit        of each bit
  6817.  to the same        to the same        to the same        to the same
  6818.  equal value        equal value        equal value        equal value
  6819.  ===========        ===========        ===========        ===========
  6820.  <7654.3210>        <7654.3210>        <7654.3210>        <7654.3210>
  6821.       |                  |                  |                  |
  6822.   [Plane 0]          [Plane 1]          [Plane 2]          [Plane 3]
  6823.       |                  |                  |                  |
  6824.       |                  |                  |                  |
  6825.    ...|               ...|               ...|               ...|
  6826.    |                  |                  |                  |
  6827.    |                  |                  |                  |
  6828.    |                  |                  |                  |
  6829.    |   Read Latch 0   |   Read Latch 1   |   Read Latch 2   |   Read Latch 3
  6830.    |   ===========-   |   ===========-   |   ===========-   |   ===========-
  6831.    |   <7654.3210>    |   <7654.3210>    |   <7654.3210>    |   <7654.3210>
  6832.    |        |         |        |         |        |         |        |
  6833.    |    [Plane 0]     |    [Plane 1]     |    [Plane 2]     |    [Plane 3]
  6834.    |        |         |        |         |        |         |        |
  6835.    |        |         |        |         |        |         |        |
  6836.    |.. .....|         |.. .....|         |.. .....|         |.. .....|
  6837.      | |                | |                | |                | |
  6838.      | |                | |                | |                | |
  6839.      | |                | |                | |                | |
  6840.      | |  Multiplane    | |  Multiplane    | |  Multiplane    | |  Multiplane
  6841.      | |  Function      | |  Function      | |  Function      | |  Function
  6842.      | |  Select        | |  Select        | |  Select        | |  Select
  6843.      | |  ===========   | |  ===========   | |  ===========   | |  ===========
  6844.      | |  <7654.3210>   | |  <7654.3210>   | |  <7654.3210>   | |  <7654.3210>
  6845.      | |       |        | |       |        | |       |        | |       |
  6846.      | |  [All planes]  | |  [All planes]  | |  [All planes]  | |  [All planes]
  6847.      | |       |        | |       |        | |       |        | |       |
  6848.      | |       |        | |       |        | |       |        | |       |
  6849.      | |       |        | |       |        | |       |        | |       |
  6850.      | | ......|        | | ......|        | | ......|        | | ......|
  6851.      | | |              | | |              | | |              | | |
  6852.      | | |              | | |              | | |              | | |
  6853.      | | |              | | |              | | |              | | |
  6854.      Logic Block        Logic Block        Logic Block        Logic Block
  6855.      ...NO_OP...        ...NO_OP...        ...NO_OP...        ...NO_OP...
  6856.      ...AND.....        ...AND.....        ...AND.....        ...AND.....
  6857.      ...OR......        ...OR......        ...OR......        ...OR......
  6858.      ...XOR.....        ...XOR.....        ...XOR.....        ...XOR.....
  6859.      ===========        ===========        ===========        ===========
  6860.      <7654.3210>        <7654.3210>        <7654.3210>        <7654.3210>
  6861.           |                  |                  |                  |
  6862.       [Plane 0]          [Plane 1]          [Plane 2]          [Plane 3]
  6863.           |                  |                  |                  |
  6864.           |                  |                  |                  |
  6865.    .......|           .......|           .......|           .......|
  6866.    |                  |                  |                  |
  6867.    |                  |                  |                  |
  6868.    |                  |                  |                  |
  6869.    |   Read Latch 0   |   Read Latch 1   |   Read Latch 2   |   Read Latch 3
  6870.    |   ===========-   |   ===========-   |   ===========-   |   ===========-
  6871.    |   <7654.3210>    |   <7654.3210>    |   <7654.3210>    |   <7654.3210>
  6872.    |        |         |        |         |        |         |        |
  6873.    |    [Plane 0]     |    [Plane 1]     |    [Plane 2]     |    [Plane 3]
  6874.    |        |         |        |         |        |         |        |
  6875.    |        |         |        |         |        |         |        |
  6876.    | .......|         | .......|         | .......|         | .......|
  6877.    | |                | |                | |                | |
  6878.    | |                | |                | |                | |
  6879.    | |                | |                | |                | |
  6880.    | |  Multiplane    | |  Multiplane    | |  Multiplane    | |  Multiplane
  6881.    | |  Select Bit    | |  Select Bit    | |  Select Bit    | |  Select Bit
  6882.    | |  Definition    | |  Definition    | |  Definition    | |  Definition
  6883.    | |  ===========   | |  ===========   | |  ===========   | |  ===========
  6884.    | |  <7654.3210>   | |  <7654.3210>   | |  <7654.3210>   | |  <7654.3210>
  6885.    | |       |        | |       |        | |       |        | |       |
  6886.    | |  [All Planes]  | |  [All Planes]  | |  [All Planes]  | |  [All Planes]
  6887.    | |       |        | |       |        | |       |        | |       |
  6888.    | |       |        | |       |        | |       |        | |       |
  6889.    | | ......|        | | ......|        | | ......|        | | ......|
  6890.    | | |              | | |              | | |              | | |
  6891.    | | |              | | |              | | |              | | |
  6892.    | | |              | | |              | | |              | | |
  6893.  Every output       Every output       Every output       Every output
  6894.  bit selected       bit selected       bit selected       bit selected
  6895.  using choice       using choice       using choice       using choice
  6896.  for that bit       for that bit       for that bit       for that bit
  6897.  ===========-       ===========-       ===========-       ===========-
  6898.  <7654.3210>        <7654.3210>        <7654.3210>        <7654.3210>
  6899.       |                  |                  |                  |
  6900.   [Plane 0]          [Plane 1]          [Plane 2]          [Plane 3]
  6901.       |                  |                  |                  |
  6902.       |                  |                  |                  |
  6903.       |                  |                  |                  |
  6904.       |  Plane 0         |  Plane 1         |  Plane 2         |  Plane 3
  6905.       |  Inhibit         |  Inhibit         |  Inhibit         |  Inhibit
  6906.       |   Write          |   Write          |   Write          |   Write
  6907.       |  =======         |  =======         |  =======         |  =======
  6908.       |     |            |     |            |     |            |     |
  6909.       |     |            |     |            |     |            |     |
  6910.       |     |            |     |            |     |            |     |
  6911.      -----------        -----------        -----------        -----------
  6912.      Write Logic        Write Logic        Write Logic        Write Logic
  6913.      for Plane 0        for Plane 1        for Plane 2        for Plane 3
  6914.        Memory             Memory             Memory             Memory
  6915.      -----------        -----------        -----------        -----------
  6916.  
  6917.  
  6918.  
  6919.  
  6920.          Key to schematic for Write Mode 0
  6921.          =================================
  6922.  
  6923.  
  6924.          --------------------------
  6925.          Multiplane Rotation Select
  6926.          --------------------------
  6927.  
  6928.              See {6.06.05} Data Rotate Register.
  6929.  
  6930.  
  6931.          ----------------------
  6932.          Force Value Enable bit
  6933.          ----------------------
  6934.  
  6935.              See {6.06.03} Enable Set/Reset Register.
  6936.  
  6937.  
  6938.          --------------------
  6939.          Force Value Data bit
  6940.          --------------------
  6941.  
  6942.              See {6.06.02} Set/Reset Register.  {This.}
  6943.  
  6944.  
  6945.          --------------------------
  6946.          Multiplane Function Select
  6947.          --------------------------
  6948.  
  6949.              See {6.06.05} Data Rotate Register.
  6950.  
  6951.  
  6952.          --------------------------------
  6953.          Multiplane Select Bit Definition
  6954.          --------------------------------
  6955.  
  6956.              See {6.06.10} Bit Mask Register.
  6957.  
  6958.  
  6959.          -----------------------
  6960.          Plane 'N' Inhibit Write
  6961.          -----------------------
  6962.  
  6963.              See {6.04.04} Map Mask Register.
  6964.  
  6965.  
  6966.  
  6967.  
  6968.          Write Mode 1
  6969.          ============
  6970.  
  6971.          At any single address, each image plane stores one eight bit byte so
  6972.          providing for 32 bits total storage spread across four planes.  Each
  6973.          bit position on each of the four planes provides a four bit value so
  6974.          that 16 colours can be represented.  In this way, eight neighbouring
  6975.          pixels are completely described by the 32 bits at a single address.
  6976.          This convention for image memory organisation is termed multiplane.
  6977.  
  6978.          There is no processor data involved in using write mode 1, however the
  6979.          processor must generate a read memory or write memory operation to the
  6980.          image memory space. This provides the control input required to effect
  6981.          the data transfers which are provided by this mode.
  6982.  
  6983.          Write mode 1 provides for a very fast multiplane image data movement
  6984.          between one region of image memory to another region within the same
  6985.          image memory.
  6986.  
  6987.          This copy capability is very flexible.  It can be used to perform an
  6988.          image copy, or an initialisation operation using constant image data
  6989.          to specify the value for the complete image.  In both cases, 32 bits,
  6990.          that is four bytes, one each per image plane are transferred, unless
  6991.          writes are inhibited to a particular plane.  Any individual plane is
  6992.          subject to write inhibit control, independantly of all other planes.
  6993.  
  6994.          To perform a true copy, a read address is generated to the multiplane
  6995.          image.  This will have the effect of loading four read latches with
  6996.          data from each of the four image planes.
  6997.  
  6998.          Then a write operation is generated onto the multiplane image.  This
  6999.          gives the effect of writing each of four image planes using the read
  7000.          latch data associated with each plane, in parallel.  In this way, a
  7001.          single write is able to transfer 32 bits of data simultaneously.
  7002.  
  7003.          This accounts for the large image transfer bandwidth available from
  7004.          this write mode.
  7005.  
  7006.          In order to initialise an image, it is necessary to load the four read
  7007.          latches once and then to repeatedly write them into the required image
  7008.          addresses.  This provides for very fast image initialisation.
  7009.  
  7010.          There is no use made of the Set/Reset Enable and Set/Reset Data during
  7011.          operations in write mode 1.
  7012.  
  7013.          Write mode 1 is mentioned in connection with Graphics Memory Access
  7014.          Mode and Processor Image Memory Access Mode Select.
  7015.  
  7016.          See {6.04.06} Sequencer Memory Mode Register.
  7017.  
  7018.  
  7019.  
  7020.  
  7021.          Schematic Overview of Data Path for Write Mode 1
  7022.          ================================================
  7023.          ================================================
  7024.  
  7025.  
  7026.  
  7027.  
  7028.  Read Latch 0       Read Latch 1       Read Latch 2       Read Latch 3
  7029.  ===========-       ===========-       ===========-       ===========-
  7030.  <7654.3210>        <7654.3210>        <7654.3210>        <7654.3210>
  7031.       |                  |                  |                  |
  7032.   [Plane 0]          [Plane 1]          [Plane 2]          [Plane 3]
  7033.       |                  |                  |                  |
  7034.       |                  |                  |                  |
  7035.       |                  |                  |                  |
  7036.       |  Plane 0         |  Plane 1         |  Plane 2         |  Plane 3
  7037.       |  Inhibit         |  Inhibit         |  Inhibit         |  Inhibit
  7038.       |   Write          |   Write          |   Write          |   Write
  7039.       |  =======         |  =======         |  =======         |  =======
  7040.       |     |            |     |            |     |            |     |
  7041.       |     |            |     |            |     |            |     |
  7042.       |     |            |     |            |     |            |     |
  7043.      -----------        -----------        -----------        -----------
  7044.      Write Logic        Write Logic        Write Logic        Write Logic
  7045.      for Plane 0        for Plane 1        for Plane 2        for Plane 3
  7046.        Memory             Memory             Memory             Memory
  7047.      -----------        -----------        -----------        -----------
  7048.  
  7049.  
  7050.  
  7051.  
  7052.          Key to schematic for Write Mode 1
  7053.          =================================
  7054.  
  7055.  
  7056.  
  7057.          -----------------------
  7058.          Plane 'N' Inhibit Write
  7059.          -----------------------
  7060.  
  7061.              See {6.04.04} Map Mask Register.
  7062.  
  7063.  
  7064.  
  7065.  
  7066.          Write Mode 2
  7067.          ============
  7068.  
  7069.          At any single address, each image plane stores one eight bit byte so
  7070.          providing for 32 bits total storage spread across four planes.  Each
  7071.          bit position on each of the four planes provides a four bit value so
  7072.          that 16 colours can be represented.  In this way, eight neighbouring
  7073.          pixels are completely described by the 32 bits at a single address.
  7074.          This convention for image memory organisation is termed multiplane.
  7075.  
  7076.          Processor data for write arrive as a 4 bit wide value.  Each of the
  7077.          bits are associated with a corresponding image plane, so bit 0 will
  7078.          provide data for use in conjunction with image plane 0, and so on.
  7079.  
  7080.          Each bit is copied into a data path of eight bits with each of these
  7081.          eight bits taking on the same value as the original bit.  The result
  7082.          is four data paths of eight bits, one data path for each of the four
  7083.          image planes.  Within a data path all eight bits are the same value,
  7084.          determined by the corresponding bit in the four bit processor data.
  7085.  
  7086.          These result data paths are then operated upon by a logic unit with
  7087.          capability to perform combining operations with corresponding eight
  7088.          bit contents of four read latches, one each per image memory plane.
  7089.          The read latches must be well defined for this processing to be of
  7090.          any value.  The combining operations are NO_OP, AND, OR, XOR.  The
  7091.          NO_OP passes the data through unchanged, ignoring read latch data.
  7092.  
  7093.          Thereafter, each plane in parallel has the result of the previously
  7094.          described processing combined with the contents of the read latches
  7095.          (which must previously have been defined using a read operation).
  7096.  
  7097.          This combining operation selects for each image plane data path, and
  7098.          for each of eight bits in one data path, the value of the processing
  7099.          path bit or the value of the read latch bit, in identical position.
  7100.          The selection is based on all eight bits of a bit mask register used
  7101.          specially for just this purpose.  Any given bit position in the mask
  7102.          register will select either the process data path or the read latch
  7103.          output path, in identical manner, for the corresponding bit position
  7104.          in each of the four image planes.
  7105.  
  7106.          The output from this operation is another 32 bit wide data path, made
  7107.          up of four eight bit wide paths, one for each of four image planes.
  7108.          This final output data is written in a single write operation to each
  7109.          corresponding image plane in parallel, subject to plane write inhibit
  7110.          state.  Each plane can be write inhibited in complete independance of
  7111.          any other plane.  A write inhibit state prevents any write operations
  7112.          from modifying data within the corresponding image plane.
  7113.  
  7114.          There is no use made of the Set/Reset Enable and Set/Reset Data during
  7115.          operations in write mode 2.
  7116.  
  7117.          See {6.06.07} Graphics Mode Register.
  7118.  
  7119.  
  7120.  
  7121.  
  7122.          Schematic Overview of Data Path for Write Mode 2
  7123.          ================================================
  7124.          ================================================
  7125.  
  7126.  
  7127.  
  7128.  
  7129.  Processor Data
  7130.  ===========---
  7131.  <----.3210>
  7132.        ||||
  7133.        ||||......................................................
  7134.        |||                                                      |
  7135.        |||....................................                  |
  7136.        ||                                    |                  |
  7137.        ||..................                  |                  |
  7138.        |                  |                  |                  |
  7139.        |                  |                  |                  |
  7140.        |                  |                  |                  |
  7141.   Repeat bit         Repeat bit         Repeat bit         Repeat bit
  7142.   value over         value over         value over         value over
  7143.   all 8 bits         all 8 bits         all 8 bits         all 8 bits
  7144.   ==========-        ==========-        ==========-        ==========-
  7145.   <7654.3210>        <7654.3210>        <7654.3210>        <7654.3210>
  7146.        |                  |                  |                  |
  7147.    [Plane 0]          [Plane 1]          [Plane 2]          [Plane 3]
  7148.        |                  |                  |                  |
  7149.        |                  |                  |                  |
  7150.    ....|              ....|              ....|              ....|
  7151.    |                  |                  |                  |
  7152.    |                  |                  |                  |
  7153.    |                  |                  |                  |
  7154.    |   Read Latch 0   |   Read Latch 1   |   Read Latch 2   |   Read Latch 3
  7155.    |   ===========-   |   ===========-   |   ===========-   |   ===========-
  7156.    |   <7654.3210>    |   <7654.3210>    |   <7654.3210>    |   <7654.3210>
  7157.    |        |         |        |         |        |         |        |
  7158.    |    [Plane 0]     |    [Plane 1]     |    [Plane 2]     |    [Plane 3]
  7159.    |        |         |        |         |        |         |        |
  7160.    |        |         |        |         |        |         |        |
  7161.    |.. .....|         |.. .....|         |.. .....|         |.. .....|
  7162.      | |                | |                | |                | |
  7163.      | |                | |                | |                | |
  7164.      | |                | |                | |                | |
  7165.      | |  Multiplane    | |  Multiplane    | |  Multiplane    | |  Multiplane
  7166.      | |  Function      | |  Function      | |  Function      | |  Function
  7167.      | |  Select        | |  Select        | |  Select        | |  Select
  7168.      | |  ===========   | |  ===========   | |  ===========   | |  ===========
  7169.      | |  <7654.3210>   | |  <7654.3210>   | |  <7654.3210>   | |  <7654.3210>
  7170.      | |       |        | |       |        | |       |        | |       |
  7171.      | |  [All planes]  | |  [All planes]  | |  [All planes]  | |  [All planes]
  7172.      | |       |        | |       |        | |       |        | |       |
  7173.      | |       |        | |       |        | |       |        | |       |
  7174.      | |       |        | |       |        | |       |        | |       |
  7175.      | | ......|        | | ......|        | | ......|        | | ......|
  7176.      | | |              | | |              | | |              | | |
  7177.      | | |              | | |              | | |              | | |
  7178.      | | |              | | |              | | |              | | |
  7179.      Logic Block        Logic Block        Logic Block        Logic Block
  7180.      ...NO_OP...        ...NO_OP...        ...NO_OP...        ...NO_OP...
  7181.      ...AND.....        ...AND.....        ...AND.....        ...AND.....
  7182.      ...OR......        ...OR......        ...OR......        ...OR......
  7183.      ...XOR.....        ...XOR.....        ...XOR.....        ...XOR.....
  7184.      ===========        ===========        ===========        ===========
  7185.      <7654.3210>        <7654.3210>        <7654.3210>        <7654.3210>
  7186.           |                  |                  |                  |
  7187.       [Plane 0]          [Plane 1]          [Plane 2]          [Plane 3]
  7188.           |                  |                  |                  |
  7189.           |                  |                  |                  |
  7190.    .......|           .......|           .......|           .......|
  7191.    |                  |                  |                  |
  7192.    |                  |                  |                  |
  7193.    |                  |                  |                  |
  7194.    |   Read Latch 0   |   Read Latch 1   |   Read Latch 2   |   Read Latch 3
  7195.    |   ===========-   |   ===========-   |   ===========-   |   ===========-
  7196.    |   <7654.3210>    |   <7654.3210>    |   <7654.3210>    |   <7654.3210>
  7197.    |        |         |        |         |        |         |        |
  7198.    |    [Plane 0]     |    [Plane 1]     |    [Plane 2]     |    [Plane 3]
  7199.    |        |         |        |         |        |         |        |
  7200.    |        |         |        |         |        |         |        |
  7201.    | .......|         | .......|         | .......|         | .......|
  7202.    | |                | |                | |                | |
  7203.    | |                | |                | |                | |
  7204.    | |                | |                | |                | |
  7205.    | |  Multiplane    | |  Multiplane    | |  Multiplane    | |  Multiplane
  7206.    | |  Select Bit    | |  Select Bit    | |  Select Bit    | |  Select Bit
  7207.    | |  Definition    | |  Definition    | |  Definition    | |  Definition
  7208.    | |  ===========   | |  ===========   | |  ===========   | |  ===========
  7209.    | |  <7654.3210>   | |  <7654.3210>   | |  <7654.3210>   | |  <7654.3210>
  7210.    | |       |        | |       |        | |       |        | |       |
  7211.    | |  [All Planes]  | |  [All Planes]  | |  [All Planes]  | |  [All Planes]
  7212.    | |       |        | |       |        | |       |        | |       |
  7213.    | |       |        | |       |        | |       |        | |       |
  7214.    | | ......|        | | ......|        | | ......|        | | ......|
  7215.    | | |              | | |              | | |              | | |
  7216.    | | |              | | |              | | |              | | |
  7217.    | | |              | | |              | | |              | | |
  7218.  Every output       Every output       Every output       Every output
  7219.  bit selected       bit selected       bit selected       bit selected
  7220.  using choice       using choice       using choice       using choice
  7221.  for that bit       for that bit       for that bit       for that bit
  7222.  ===========-       ===========-       ===========-       ===========-
  7223.  <7654.3210>        <7654.3210>        <7654.3210>        <7654.3210>
  7224.       |                  |                  |                  |
  7225.   [Plane 0]          [Plane 1]          [Plane 2]          [Plane 3]
  7226.       |                  |                  |                  |
  7227.       |                  |                  |                  |
  7228.       |                  |                  |                  |
  7229.       |  Plane 0         |  Plane 1         |  Plane 2         |  Plane 3
  7230.       |  Inhibit         |  Inhibit         |  Inhibit         |  Inhibit
  7231.       |   Write          |   Write          |   Write          |   Write
  7232.       |  =======         |  =======         |  =======         |  =======
  7233.       |     |            |     |            |     |            |     |
  7234.       |     |            |     |            |     |            |     |
  7235.       |     |            |     |            |     |            |     |
  7236.      -----------        -----------        -----------        -----------
  7237.      Write Logic        Write Logic        Write Logic        Write Logic
  7238.      for Plane 0        for Plane 1        for Plane 2        for Plane 3
  7239.        Memory             Memory             Memory             Memory
  7240.      -----------        -----------        -----------        -----------
  7241.  
  7242.  
  7243.  
  7244.  
  7245.          Key to schematic for Write Mode 2
  7246.          =================================
  7247.  
  7248.  
  7249.          --------------------------
  7250.          Multiplane Function Select
  7251.          --------------------------
  7252.  
  7253.              See {6.06.05} Data Rotate Register.
  7254.  
  7255.  
  7256.          --------------------------------
  7257.          Multiplane Select Bit Definition
  7258.          --------------------------------
  7259.  
  7260.              See {6.06.10} Bit Mask Register.
  7261.  
  7262.  
  7263.          -----------------------
  7264.          Plane 'N' Inhibit Write
  7265.          -----------------------
  7266.  
  7267.              See {6.04.04} Map Mask Register.
  7268.  
  7269.  
  7270.  
  7271.  
  7272.          Write Mode 3
  7273.          ============
  7274.  
  7275.          At any single address, each image plane stores one eight bit byte so
  7276.          providing for 32 bits total storage spread across four planes.  Each
  7277.          bit position on each of the four planes provides a four bit value so
  7278.          that 16 colours can be represented.  In this way, eight neighbouring
  7279.          pixels are completely described by the 32 bits at a single address.
  7280.          This convention for image memory organisation is termed multiplane.
  7281.  
  7282.          Processor write data is not used directly to determine image data in
  7283.          this mode.  Instead the eight bit data written from the processor is
  7284.          interpreted as a bit map with each bit corresponding to one pixel in
  7285.          multiplane image memory.  The value of the bit determines the result
  7286.          of a computation which ultimately provides the new pixel value to be
  7287.          associated with the bit.
  7288.  
  7289.          This computation permits a pixel to take on the value for background
  7290.          colour or the value for foreground colour depending upon the written
  7291.          bit value from the processor associated with the pixel.  This allows
  7292.          for modifying selected portions of an image by means of relative use
  7293.          of colour.  That is, the image can be modified such that the changes
  7294.          are visible no matter what the previous underlying image colours. In
  7295.          this way, important data can be written without fear of occlusion.
  7296.  
  7297.          Write mode 3 processes for relative colour.  By contrast, write mode
  7298.          0 should be seen as processing in terms of absolute colour.
  7299.  
  7300.          Processor data for write arrive as an 8 bit wide value.  These 8 bits
  7301.          are rotated.  The rotated bits are logically ANDed with eight bits of
  7302.          a register specially provided for purposes of specifying which pixels
  7303.          are to be modified, at a given image memory address.  The result then
  7304.          provides pixel modify permission for 8 pixels as an 8 bit wide value.
  7305.          This modify permission value is used later.
  7306.  
  7307.          The four eight bit read latch outputs associated with the four image
  7308.          memory planes are formed into four data paths, one per memory plane.
  7309.          These data paths are used as input to a logic unit, described later.
  7310.  
  7311.          Each of four bits in a specially provided register are used to define
  7312.          the value of all eight bits of a data path associated with one memory
  7313.          plane.  In this way, four bits define four data paths, and every data
  7314.          path consists of eight bits, all of which share the same value. There
  7315.          is a data path associated with each of the four memory image planes.
  7316.  
  7317.          These result data paths are then operated upon by a logic unit with
  7318.          capability to perform combining operations with corresponding eight
  7319.          bit contents of four read latches, one each per image memory plane.
  7320.          The read latches must be well defined for this processing to be of
  7321.          any value.  The combining operations are NO_OP, AND, OR, XOR.  The
  7322.          NO_OP passes the data through unchanged, ignoring read latch data.
  7323.  
  7324.          Thereafter, each plane in parallel has the result of the previously
  7325.          described processing combined with the contents of the read latches
  7326.          according to the pixel modify permission bits derived above.  These
  7327.          determine whether a pixel is preserved, or changed.  {We assume the
  7328.          read latches were loaded from the same pixel group currently being
  7329.          modifed.  Since the read latch data need not be defined this way it
  7330.          is prudent to point out the assumption.}
  7331.  
  7332.          This combining operation selects for each image plane data path, and
  7333.          for each of eight bits in one data path, the value of the processing
  7334.          path bit or the value of the read latch bit, in identical position.
  7335.          The selection is based on all eight bits of a permission value used
  7336.          specially for just this purpose.  This permission applies to all the
  7337.          memory image planes, but affects only the corresponding bit position
  7338.          in each plane.  Therefore each permission bit applies to four bits,
  7339.          each of identical bit number in each image memory plane.  These four
  7340.          bits will all take their value from the same data path chosen by the
  7341.          common permission bit.  Note that a data path is associated with one
  7342.          memory plane only.  This means that despite sharing a permission bit
  7343.          the resulting bits in each plane will be of distinct value.  This is
  7344.          a direct result of maintaining each data path in strict association
  7345.          with one single memory plane at all times.
  7346.  
  7347.          The output from this operation is another 32 bit wide data path, made
  7348.          up of four eight bit wide paths, one for each of four image planes.
  7349.          This final output data is written in a single write operation to each
  7350.          corresponding image plane in parallel, subject to plane write inhibit
  7351.          state.  Each plane can be write inhibited in complete independance of
  7352.          any other plane.  A write inhibit state prevents any write operations
  7353.          from modifying data within the corresponding image plane.
  7354.  
  7355.          Write mode 3 processes for relative colour.  By contrast, write mode
  7356.          0 should be seen as processing in terms of absolute colour.
  7357.  
  7358.          There is no use made of the Set/Reset Enable during operations in
  7359.          write mode 3.  However, despite this, the Set/Reset Data register
  7360.          provides the value for Data Source in the write mode 3 schematic.
  7361.          This value has the dimensions of a colour value but it is used in
  7362.          a potentially complex manner.  See schematic below.
  7363.  
  7364.          See {6.06.07} Graphics Mode Register.
  7365.  
  7366.          See Set/Reset Enable Image Plane 0, below.
  7367.  
  7368.  
  7369.  
  7370.  
  7371.          Schematic Overview of Data Path for Write Mode 3
  7372.          ================================================
  7373.          ================================================
  7374.  
  7375.  
  7376.  
  7377.  
  7378.  Processor Data
  7379.  ===========---
  7380.  <7654.3210>
  7381.       |
  7382.  [Permission]
  7383.       |
  7384.       |
  7385.       |
  7386.       |             Permission
  7387.       |             Rotation
  7388.       |             Select
  7389.       |             ==========-
  7390.       |             <7654.3210>
  7391.       |                  |
  7392.       |             [Permission]
  7393.       |                  |
  7394.       |                  |
  7395.       | .................|
  7396.       | |
  7397.       | |
  7398.       | |
  7399.   Data Rotation                            Applicable
  7400.   ===========--                            Permission
  7401.   <7654.3210>                              Selector
  7402.        |                                   ===========
  7403.   [Permission]                             <7654.3210>
  7404.        |                                        |
  7405.        |                                   [Permission]
  7406.        |                                        |
  7407.        |                                        |
  7408.        |...................    .................|
  7409.                           |    |
  7410.                           |    |
  7411.                           |    |
  7412.                         Permission
  7413.                         Resolution
  7414.                         ...AND....
  7415.                         ==========
  7416.                         <7654.3210>
  7417.                              |
  7418.                         [Permission]
  7419.                              |
  7420.                              |
  7421.                              |
  7422.                              |...............................................
  7423.                                                                             |
  7424.                                                                             |
  7425.   Multiplane                                                                |          |
  7426.   Data Source                                                               |            |
  7427.   ===========                                                               |            |
  7428.   <----.3210>                                                               |            |
  7429.         ||||                                                                |
  7430.         ||||                                                                |
  7431.         ||||......................................................          |
  7432.         |||                                                      |          |
  7433.         |||                                                      |          |
  7434.         |||....................................                  |          |
  7435.         ||                                    |                  |          |
  7436.         ||                                    |                  |          |
  7437.         ||..................                  |                  |          |
  7438.         |                  |                  |                  |          |
  7439.         |                  |                  |                  |          |
  7440.         |                  |                  |                  |          |
  7441.     [Plane 0]          [Plane 1]          [Plane 2]          [Plane 3]      |
  7442.         |                  |                  |                  |          |
  7443.         |                  |                  |                  |          |
  7444.         |                  |                  |                  |          |
  7445.    Repeat bit         Repeat bit         Repeat bit         Repeat bit      |
  7446.    value over         value over         value over         value over      |
  7447.    all 8 bits         all 8 bits         all 8 bits         all 8 bits      |
  7448.    ==========-        ==========         ==========         ==========      |
  7449.    <7654.3210>        <7654.3210         <7654.3210         <7654.3210      |
  7450.         |                  |                  |                  |          |
  7451.     [Plane 0]          [Plane 1]          [Plane 2]          [Plane 3]      |
  7452.         |                  |                  |                  |          |
  7453.         |                  |                  |                  |          |
  7454.  .......|           .......|           .......|           .......|          |
  7455.  |                  |                  |                  |                 |
  7456.  |                  |                  |                  |                 |
  7457.  |                  |                  |                  |                 |
  7458.  |                  |                  |                  |                 |
  7459.  |   Read Latch 0   |   Read Latch 1   |   Read Latch 2   |   Read Latch 3  |
  7460.  |   ===========-   |   ===========-   |   ===========-   |   ===========-  |
  7461.  |   <7654.3210>    |   <7654.3210>    |   <7654.3210>    |   <7654.3210>   |
  7462.  |        |         |        |         |        |         |        |        |
  7463.  |    [Plane 0]     |    [Plane 1]     |    [Plane 2]     |    [Plane 3]    |
  7464.  |        |         |        |         |        |         |        |        |
  7465.  |        |         |        |         |        |         |        |        |
  7466.  | .......|         | .......|         | .......|         | .......|        |
  7467.  | |                | |                | |                | |               |
  7468.  | |                | |                | |                | |               |
  7469.  | |                | |                | |                | |               |
  7470.  | | Multiplane     | | Multiplane     | | Multiplane     | | Multiplane    |
  7471.  | | Function       | | Function       | | Function       | | Function      |
  7472.  | | Select         | | Select         | | Select         | | Select        |
  7473.  | | ===========    | | ===========    | | ===========    | | ===========   |
  7474.  | | <7654.3210>    | | <7654.3210>    | | <7654.3210>    | | <7654.3210>   |
  7475.  | |      |         | |      |         | |      |         | |      |        |
  7476.  | | [All planes]   | | [All planes]   | | [All planes]   | | [All planes]  |
  7477.  | |      |         | |      |         | |      |         | |      |        |
  7478.  | |      |         | |      |         | |      |         | |      |        |
  7479.  | |      |         | |      |         | |      |         | |      |        |
  7480.  | |....  |         | |....  |         | |....  |         | |....  |        |
  7481.  |      | |         |      | |         |      | |         |      | |        |
  7482.  |      | |         |      | |         |      | |         |      | |        |
  7483.  |      | |         |      | |         |      | |         |      | |        |
  7484.  |..... | |         |..... | |         |..... | |         |..... | |        |
  7485.       | | |              | | |              | | |              | | |        |
  7486.       | | |              | | |              | | |              | | |        |
  7487.       | | |              | | |              | | |              | | |        |
  7488.    Logic Block        Logic Block        Logic Block        Logic Block     |
  7489.    ...NO_OP...        ...NO_OP...        ...NO_OP...        ...NO_OP...     |
  7490.    ...AND.....        ...AND.....        ...AND.....        ...AND.....     |
  7491.    ...OR......        ...OR......        ...OR......        ...OR......     |
  7492.    ...XOR.....        ...XOR.....        ...XOR.....        ...XOR.....     |
  7493.    ===========        ===========        ===========        ===========     |
  7494.    <7654.3210>        <7654.3210>        <7654.3210>        <7654.3210>     |
  7495.         |                  |                  |                  |          |
  7496.     [Plane 0]          [Plane 1]          [Plane 2]          [Plane 3]      |
  7497.        |                  |                  |                  |           |
  7498.        |                  |                  |                  |           |
  7499.   .....|             .....|             .....|             .....|           |
  7500.   |                  |                  |                  |                |
  7501.   |                  |                  |                  |                |
  7502.   |                  |                  |                  |                |
  7503.   |  Read Latch 0    |  Read Latch 1    |  Read Latch 2    |  Read Latch 3  |
  7504.   |  ===========-    |  ===========-    |  ===========-    |  ===========-  |
  7505.   |  <7654.3210>     |  <7654.3210>     |  <7654.3210>     |  <7654.3210>   |
  7506.   |       |          |       |          |       |          |       |        |
  7507.   |   [Plane 0]      |   [Plane 1]      |   [Plane 2]      |   [Plane 3]    |
  7508.   |       |          |       |          |       |          |       |        |
  7509.   |       |          |       |          |       |          |       |        |
  7510.   | ......|          | ......|          | ......|          | ......|        |
  7511.   | |                | |                | |                | |              |
  7512.   | |                | |                | |                | |              |
  7513.   | |                | |                | |                | |              |
  7514.   | |      ......... | | .............. | | .............. | | .............P
  7515.   | |      |         | |      |         | |      |         | |      |
  7516.   | |      |         | |      |         | |      |         | |      |
  7517.   | |      P         | |      P         | |      P         | |      P
  7518.  Every output       Every output       Every output       Every output
  7519.  bit selected       bit selected       bit selected       bit selected
  7520.  using choice       using choice       using choice       using choice
  7521.  for that bit       for that bit       for that bit       for that bit
  7522.  ===========-       ===========-       ===========-       ===========-
  7523.  <7654.3210>        <7654.3210>        <7654.3210>        <7654.3210>
  7524.       |                  |                  |                  |
  7525.   [Plane 0]          [Plane 1]          [Plane 2]          [Plane 3]
  7526.       |                  |                  |                  |
  7527.       |                  |                  |                  |
  7528.       |                  |                  |                  |
  7529.       |  Plane 0         |  Plane 1         |  Plane 2         |  Plane 3
  7530.       |  Inhibit         |  Inhibit         |  Inhibit         |  Inhibit
  7531.       |   Write          |   Write          |   Write          |   Write
  7532.       |  =======         |  =======         |  =======         |  =======
  7533.       |     |            |     |            |     |            |     |
  7534.       |     |            |     |            |     |            |     |
  7535.       |     |            |     |            |     |            |     |
  7536.     -----------        -----------        -----------        -----------
  7537.     Write Logic        Write Logic        Write Logic        Write Logic
  7538.     for Plane 0        for Plane 1        for Plane 2        for Plane 3
  7539.       Memory             Memory             Memory             Memory
  7540.     -----------        -----------        -----------        -----------
  7541.  
  7542.  
  7543.  
  7544.  
  7545.          Key to schematic for Write Mode 3
  7546.          =================================
  7547.  
  7548.  
  7549.          --------------------------
  7550.          Permission Rotation Select
  7551.          --------------------------
  7552.  
  7553.              See {6.06.05} Data Rotate Register.
  7554.  
  7555.  
  7556.          ------------------------------
  7557.          Applicable Permission Selector
  7558.          ------------------------------
  7559.  
  7560.              See {6.06.10} Bit Mask Register.
  7561.  
  7562.  
  7563.          ----------------------
  7564.          Multiplane Data Source
  7565.          ----------------------
  7566.  
  7567.              See {6.06.02} Set/Reset Register.
  7568.  
  7569.  
  7570.  
  7571.          --------------------------
  7572.          Multiplane Function Select
  7573.          --------------------------
  7574.  
  7575.              See {6.06.05} Data Rotate Register.
  7576.  
  7577.  
  7578.          -----------------------
  7579.          Plane 'N' Inhibit Write
  7580.          -----------------------
  7581.  
  7582.              See {6.04.04} Map Mask Register.
  7583.  
  7584.  
  7585.  
  7586.  
  7587. <1>      Set/Reset Data Image Plane 1
  7588.          ----------------------------
  7589.  
  7590.          As for Set/Reset Image Plane 0, immediately above.
  7591.  
  7592.          See Set/Reset Enable Image Plane 1, below.
  7593.  
  7594.  
  7595. <2>      Set/Reset Data Image Plane 2
  7596.          ----------------------------
  7597.  
  7598.          As for Set/Reset Image Plane 0, immediately above.
  7599.  
  7600.          See Set/Reset Enable Image Plane 2, below.
  7601.  
  7602.  
  7603. <3>      Set/Reset Data Image Plane 3
  7604.          ----------------------------
  7605.  
  7606.          As for Set/Reset Image Plane 0, immediately above.
  7607.  
  7608.          See Set/Reset Enable Image Plane 3, below.
  7609.  
  7610.  
  7611. <7..4>   Reserved.  Always <=0000>.
  7612.          --------------------------
  7613.  
  7614.  
  7615.  
  7616.  
  7617. 6.06.03  Enable Set/Reset Register    { 3cfh    01h    R/W }
  7618. =======  ===================================================
  7619.  
  7620.  
  7621. Cross reference with {6.06.02} Set/Reset Register.
  7622.  
  7623.  
  7624. <0>      Set/Reset Enable Image Plane 0
  7625.          ------------------------------
  7626.  
  7627.          During multiplane image memory write access operation by the processor
  7628.          this bit helps to determine the value written to the byte lying within
  7629.          display memory image plane 0.
  7630.  
  7631.          <=0>  Image plane zero is disabled from accepting any set/reset data,
  7632.                so long as the plane is able to support this operation.
  7633.  
  7634.                See {6.06.02} Set/Reset Register.
  7635.  
  7636.          <=1>  Image plane zero is enabled to accept set/reset data, so long as
  7637.                the plane is able to support this operation.
  7638.  
  7639.                See {6.06.02} Set/Reset Register.
  7640.  
  7641.  
  7642.          The precise effect of this bit is determined by the write mode used to
  7643.          perform the update operation.  There are four different write modes as
  7644.          follows:
  7645.  
  7646.  
  7647.          Write Mode 0
  7648.          ============
  7649.  
  7650.          At any single address, each image plane stores one eight bit byte so
  7651.          providing for 32 bits total storage spread across four planes.  Each
  7652.          bit position on each of the four planes provides a four bit value so
  7653.          that 16 colours can be represented.  In this way, eight neighbouring
  7654.          pixels are completely described by the 32 bits at a single address.
  7655.          This convention for image memory organisation is termed multiplane.
  7656.  
  7657.          Where Set/Reset Enable Image Plane 0 is set <=1>, all eight data path
  7658.          bits associated with image plane 0 are set to just one value given by
  7659.          the single bit Set/Reset Data Image Plane 0.  All other memory planes
  7660.          are processed in an identical manner.  Four output data paths result,
  7661.          each of eight bits width, making a total of 32 bits.  These data path
  7662.          outputs are then subjected to further processing, before any data are
  7663.          actually stored in image memory.
  7664.  
  7665.          The use of the Set/Reset Enable and Set/Reset Data input is to specify
  7666.          a four bit colour value across a single bit position within all planes
  7667.          of the image memory, in parallel.  In this way, the processor supplied
  7668.          data is either used unchanged, is modified partially, or is completely
  7669.          ignored when deciding how to process for update.  The resulting output
  7670.          is used by the logic unit together with the read latch contents.  This
  7671.          provides extremely powerful colour processing capability when properly
  7672.          used.  This write mode is probably the most generally used write mode.
  7673.  
  7674.          A schematic for write mode 0 is available.
  7675.  
  7676.          See {6.06.02} Set/Reset Register.
  7677.          See {6.06.07} Graphics Mode Register.
  7678.  
  7679.  
  7680.          Write Mode 1
  7681.          ============
  7682.  
  7683.          There is no use made of this bit value for write mode 1 operations.
  7684.  
  7685.          A schematic for write mode 1 is available.
  7686.  
  7687.          See {6.06.02} Set/Reset Register.
  7688.          See {6.06.07} Graphics Mode Register.
  7689.  
  7690.  
  7691.          Write Mode 2
  7692.          ============
  7693.  
  7694.          There is no use made of this bit value for write mode 2 operations.
  7695.  
  7696.          A schematic for write mode 2 is available.
  7697.  
  7698.          See {6.06.02} Set/Reset Register.
  7699.          See {6.06.07} Graphics Mode Register.
  7700.  
  7701.  
  7702.          Write Mode 3
  7703.          ============
  7704.  
  7705.          There is no use made of this bit value for write mode 3 operations.
  7706.  
  7707.          A schematic for write mode 3 is available.
  7708.  
  7709.          See {6.06.02} Set/Reset Register.
  7710.          See {6.06.07} Graphics Mode Register.
  7711.  
  7712.  
  7713. <1>      Set/Reset Enable Image Plane 1
  7714.          ------------------------------
  7715.  
  7716.          As for Set/Reset Enable Image Plane 0, immediately above.
  7717.  
  7718.          See {6.06.02} Set/Reset Register.
  7719.          See {6.06.07} Graphics Mode Register.
  7720.  
  7721.  
  7722. <2>      Set/Reset Enable Image Plane 2
  7723.          ------------------------------
  7724.  
  7725.          As for Set/Reset Enable Image Plane 0, immediately above.
  7726.  
  7727.          See {6.06.02} Set/Reset Register.
  7728.          See {6.06.07} Graphics Mode Register.
  7729.  
  7730.  
  7731.  
  7732. <3>      Set/Reset Enable Image Plane 3
  7733.          ------------------------------
  7734.  
  7735.          As for Set/Reset Enable Image Plane 0, immediately above.
  7736.  
  7737.          See {6.06.02} Set/Reset Register.
  7738.          See {6.06.07} Graphics Mode Register.
  7739.  
  7740.  
  7741. <7..4>   Reserved.  Always <=0000>.
  7742.          --------------------------
  7743.  
  7744.  
  7745.  
  7746.  
  7747. 6.06.04  Colour Compare Register      { 3cfh    02h    R/W }
  7748. =======  ===================================================
  7749.  
  7750.  
  7751. Cross reference with {6.06.06} Read Map Select Register.
  7752. Cross reference with {6.06.07} Graphics Mode Register.
  7753. Cross reference with {6.06.09} Colour Don't Care Register.
  7754.  
  7755.  
  7756. <0>      Colour Compare Plane 0
  7757.          ----------------------
  7758.  
  7759.          During multiplane image memory read access operation by the processor,
  7760.          this bit can determine the value of the byte representing the result
  7761.          returned to the processor.
  7762.  
  7763.          <=0>  Image plane zero is compared with the data value 0, so long as
  7764.                the plane is enabled to support this operation.
  7765.  
  7766.                See {6.06.09} Colour Don't Care Register.
  7767.  
  7768.          <=0>  Image plane zero is compared with the data value 1, so long as
  7769.                the plane is enabled to support this operation.
  7770.  
  7771.                See {6.06.09} Colour Don't Care Register.
  7772.  
  7773.          The effect of this bit is determined by the read mode used to perform
  7774.          the image memory read access operation.  Two different read modes are
  7775.          provided as follows:
  7776.  
  7777.  
  7778.          Read Mode 0
  7779.          ===========
  7780.  
  7781.          At any single address, each image plane stores one eight bit byte so
  7782.          providing for 32 bits total storage spread across four planes.  Each
  7783.          bit position on each of the four planes provides a four bit value so
  7784.          that 16 colours can be represented.  In this way, eight neighbouring
  7785.          pixels are completely described by the 32 bits at a single address.
  7786.          This convention for image memory organisation is termed multiplane.
  7787.  
  7788.          When read mode 0 is active, a read operation by the processor returns
  7789.          a single byte, which is associated with one of the four image planes.  The plan
  7790.          The particular image plane is selected by means of a special register
  7791.          provided specifically for this purpose.
  7792.  
  7793.          See {6.06.06} Read Map Select Register.
  7794.          See {6.06.07} Graphics Mode Register.
  7795.  
  7796.          In read mode 0, the Colour Compare Register plays no active role in
  7797.          processor read operation so the value of the Colour Compare Plane 0
  7798.          bit is irrelevant.
  7799.  
  7800.  
  7801.          Read Mode 1
  7802.          ===========
  7803.  
  7804.          At any single address, each image plane stores one eight bit byte so
  7805.          providing for 32 bits total storage spread across four planes.  Each
  7806.          bit position on each of the four planes provides a four bit value so
  7807.          that 16 colours can be represented.  In this way, eight neighbouring
  7808.          pixels are completely described by the 32 bits at a single address.
  7809.          This convention for image memory organisation is termed multiplane.
  7810.  
  7811.          It is often required to determine where the border pixels of an area
  7812.          are situated, perhaps in order to provide a colour fill function for
  7813.          a graphics software package.  Usually in such a situation, either of
  7814.          the colours associated with the foreground or background are a known
  7815.          constant.  The business of discovering the border pixels becomes one
  7816.          of tracing a region consisting of pixels with a known colour.
  7817.  
  7818.          There is a way of doing this, using read mode 0 to recover the four
  7819.          bytes of colour plane data at a given image memory address.  But it
  7820.          would then be necessary to change those four bytes into eight pixels
  7821.          each of 4 bits.  Whilst this is computationally simple, it is a very
  7822.          time consuming operation to perform, especially with large images.
  7823.  
  7824.          This is where read mode 1 can provide assistance.  Read mode 1 uses
  7825.          a colour match specification to inspect an eight pixel image memory
  7826.          address in parallel, producing a colour match bit for each pixel in
  7827.          the result byte.  A matching colour produces a set bit result.
  7828.  
  7829.          The match value for any plane can be made irrelevant by using a mask
  7830.          value for the plane indicating a colour match don't care.  Any don't
  7831.          care planes are considered to match under all circumstances.  So for
  7832.          some colour ranges it is possible to obtain sensible match behaviour
  7833.          even though the match result is expressed in a single bit.
  7834.  
  7835.          See {6.06.07} Graphics Mode Register.
  7836.          See {6.06.09} Colour Don't Care Register.
  7837.  
  7838.  
  7839. <1>      Colour Compare Plane 1
  7840.          ----------------------
  7841.  
  7842.          As for Colour Compare Plane 0, immediately above.
  7843.  
  7844.          See {6.06.06} Read Map Select Register.
  7845.          See {6.06.09} Colour Don't Care Register.
  7846.  
  7847.  
  7848. <2>      Colour Compare Plane 2
  7849.          ----------------------
  7850.  
  7851.          As for Colour Compare Plane 0, immediately above.
  7852.  
  7853.          See {6.06.06} Read Map Select Register.
  7854.          See {6.06.09} Colour Don't Care Register.
  7855.  
  7856.  
  7857. <3>      Colour Compare Plane 3
  7858.          ----------------------
  7859.  
  7860.          As for Colour Compare Plane 0, immediately above.
  7861.  
  7862.          See {6.06.06} Read Map Select Register.
  7863.          See {6.06.09} Colour Don't Care Register.
  7864.  
  7865.  
  7866. <7..4>   Reserved.  Always <=0000>.
  7867.          --------------------------
  7868.  
  7869.  
  7870.  
  7871.  
  7872. 6.06.05  Data Rotate Register         { 3cfh    03h    R/W }
  7873. =======  ===================================================
  7874.  
  7875.  
  7876. Cross reference with {6.06.02} Set/Reset Register.
  7877.  
  7878.  
  7879. <2..0>   Data Rotate
  7880.          -----------
  7881.  
  7882.          This binary value specifies the data rotate count for the following
  7883.          write modes {0,3}.  The rotation is to the right.
  7884.  
  7885.          There is a description of these modes available with a schematic of
  7886.          the data flow.
  7887.  
  7888.          See {6.06.02} Set/Reset Register.
  7889.  
  7890.  
  7891. <4..3>   Logic Unit Function Code
  7892.          ------------------------
  7893.  
  7894.          This binary field specifies the logic unit function code.  There are
  7895.          two data path inputs to the logic unit, each of which contains image
  7896.          memory plane data for each of the four memory planes.  One plane has
  7897.          eight data bits associated with it, making 32 bits total for each of
  7898.          two input data paths.  So the logic unit combines 64 input bits with
  7899.          a corresponding output of 32 result bits.
  7900.  
  7901.          The logic function always takes one input data path to be the memory
  7902.          read latches, with the other input depending on the particular write
  7903.          mode selected.
  7904.  
  7905.          The logic unit functions are effective in the following write modes
  7906.          {0,2,3} and are assigned as follows:
  7907.  
  7908.          <=00>  NO_OP.  No operation, the data passes straight through.  No use
  7909.                         is made of the read latch data input to the logic unit,
  7910.                         but THE READ LATCHES ARE UPDATED WITH THE DATA.
  7911.  
  7912.          <=01>  AND.    Logical AND, bit position for bit position between the
  7913.                         input data path and the read latch data path.
  7914.  
  7915.          <=10>  OR.     Logical OR, bit position for bit position between the
  7916.                         input data path and the read latch data path.
  7917.  
  7918.          <=11>  XOR.    Logical XOR, bit position for bit position between the
  7919.                         input data path and the read latch data path.
  7920.  
  7921.          See {6.06.02} Set/Reset Register.
  7922.  
  7923.  
  7924. <7..5>   Reserved.  Always <=000>.
  7925.          -------------------------
  7926.  
  7927.  
  7928.  
  7929.  
  7930. 6.06.06  Read Map Select Register     { 3cfh    04h    R/W }
  7931. =======  ===================================================
  7932.  
  7933.  
  7934. Cross reference with {6.06.04} Colour Compare Register.
  7935. Cross reference with {6.04.06} Sequencer Memory Mode Register.
  7936. Cross reference with {6.06.07} Graphics Mode Register.
  7937. Cross reference with {6.10.09} CPU Latch Read Back Register.
  7938.  
  7939.  
  7940.  
  7941. <1..0>   Read Map Select
  7942.          ---------------
  7943.  
  7944.          The binary value of this field represents the multiplane image memory
  7945.          plane from which the processor will read a byte of pixel data when in
  7946.          read mode 0.  The actual effect depends upon the display image memory
  7947.          organisation as follows:
  7948.  
  7949.  
  7950.          Processor Image Memory Access Mapping Select
  7951.          =-------------------------------------------
  7952.  
  7953.               Processor Image Memory Access Mode Select
  7954.          =    =----------------------------------------
  7955.  
  7956.                    Processor Display Memory Addressing
  7957.          =    =    ===================================------------------
  7958.  
  7959.  
  7960.          0    0    Text access; odd/even mode; the low order address bit
  7961.                    selects the pair of planes to access.  Even addresses
  7962.                    select the pair (0,2) and odd addresses (1,3).
  7963.  
  7964.                    In all other respects the memory organisation remains
  7965.                    multiplane.
  7966.  
  7967.                    Data transfers are by word from the processor in this
  7968.                    memory mode, with a character code and attribute byte
  7969.                    sent together.  Memory planes 2,3 are write inhibited
  7970.                    to preserve the character font data in plane 2.
  7971.  
  7972.                    The Read Map Select field bit 0 is not used for this
  7973.                    memory mode.  The remaining bit 1 selects a plane in
  7974.                    the pair of planes determined by the access address,
  7975.                    for read mode 0.
  7976.  
  7977.  
  7978.          0    1    Multiplane access; the planes are written by using a
  7979.                    write mode and read using a read mode.  The plane is
  7980.                    selected by means of special registers used by these
  7981.                    read and write modes.  This organisation supports 16
  7982.                    colours, with 8 pixels per byte across 4 planes at a
  7983.                    single image memory byte address.
  7984.  
  7985.                    Data transfers are single byte from the processor in
  7986.                    this memory mode.
  7987.  
  7988.                    The Read Map Select field denotes the plane number to
  7989.                    be read by a read mode 0 access, in this memory mode.
  7990.                    Planes 0 through 3 are therefore accessible.
  7991.  
  7992.  
  7993.          1    0    The two low order address bits are the plane address;
  7994.                    the remaining address bits are shifted down to become
  7995.                    a byte address into multiplane memory.  This supports
  7996.                    256 colour packed pixel mode, where a byte represents
  7997.                    the colour data for a single pixel.
  7998.  
  7999.                    Data transfers are single byte from the processor in
  8000.                    this memory mode.
  8001.  
  8002.                    All two bits of the Read Map Select field are ignored
  8003.                    in this memory mode, for read mode 0 access.
  8004.  
  8005.  
  8006.          1    1    The two low order address bits are the plane address;
  8007.                    the remaining address bits are shifted down to become
  8008.                    a byte address into multiplane memory.  This supports
  8009.                    256 colour packed pixel mode, where a byte represents
  8010.                    the colour data for a single pixel.
  8011.  
  8012.                    Data transfers are single byte from the processor in
  8013.                    this memory mode, for read mode 0 access.
  8014.  
  8015.                    All two bits of the Read Map Select field are ignored
  8016.                    in this memory mode.
  8017.  
  8018.  
  8019.          ---------------------------------------------------------------
  8020.  
  8021.  
  8022.          See {6.04.06} Sequencer Memory Mode Register.
  8023.          See {6.06.07} Graphics Mode Register.
  8024.  
  8025.          This field decides which cpu data latch to access during a cpu latch
  8026.          read back operation.  Each cpu data latch is associated with an image
  8027.          memory plane.
  8028.  
  8029.          See {6.10.09} CPU Latch Read Back Register.
  8030.  
  8031.          This field does not have any influence over processor read operations
  8032.          in read mode 1.  These are colour compare read operations.
  8033.  
  8034.          See {6.06.04} Colour Compare Register.
  8035.          See {6.06.07} Graphics Mode Register.
  8036.  
  8037.  
  8038. <7..2>   Reserved.  Always <=000000>.
  8039.          ----------------------------
  8040.  
  8041.  
  8042.  
  8043.  
  8044. 6.06.07  Graphics Mode Register       { 3cfh    05h    R/W }
  8045. =======  ===================================================
  8046.  
  8047.  
  8048. Cross reference with {6.04.03} Clocking Mode Register.
  8049. Cross reference with {6.04.04} Map Mask Register.
  8050. Cross reference with {6.04.06} Sequencer Memory Mode Register.
  8051. Cross reference with {6.06.02} Set/Reset Register.
  8052. Cross reference with {6.06.03} Enable Set/Reset Register.
  8053. Cross reference with {6.06.04} Colour Compare Register.
  8054. Cross reference with {6.06.05} Data Rotate Register.
  8055. Cross reference with {6.06.06} Read Map Select Register.
  8056. Cross reference with {6.06.08} Miscellaneous Register.
  8057. Cross reference with {6.06.09} Colour Don't Care Register.
  8058. Cross reference with {6.06.10} Bit Mask Register.
  8059. Cross reference with {6.07.18} Attribute Mode Control Register.
  8060. Cross reference with {6.07.20} Colour Plane Enable Register.
  8061. Cross reference with {6.07.21} Horizontal PEL Panning Register.
  8062. Cross reference with {6.09.01} Miscellaneous Output Register.
  8063. Cross reference with {6.10.04} Mode Control Register 2.
  8064. Cross reference with {6.10.09} CPU Latch Read Back Register.
  8065.  
  8066.  
  8067. <1..0>   Processor Write Mode
  8068.          --------------------
  8069.  
  8070.          The display may be used in either text mode or graphics mode.
  8071.          See {6.06.08} Miscellaneous Register.
  8072.  
  8073.          There is capability provided to read back the data written to
  8074.          the display image memory data latches by the processor.
  8075.  
  8076.          See {6.10.09} CPU Latch Read Back Register.
  8077.  
  8078.  
  8079.          <=00>  Write Mode 0
  8080.                 ------------
  8081.  
  8082.                 This write mode is used to process absolute colour values, when
  8083.                 image memory is in multiplane format.  There are many possible
  8084.                 types of image processing operations which can be achieved with
  8085.                 this write mode, which permits processor modification of any of
  8086.                 one through eight pixels per single access.  The data might be
  8087.                 stored in any of one to four image memory planes some or all of
  8088.                 which may be modified simultaneously as the result of one write
  8089.                 operation by the processor.  This write mode is the most often
  8090.                 used, because of the great flexibility it provides.  It is most
  8091.                 suitable for writing text whilst in graphics mode, which is one
  8092.                 of the most demanding operations the processor can perform with
  8093.                 a multiplane image.  In this write mode the read latch contents
  8094.                 have a very important role in either preserving existing memory
  8095.                 background image content, or in establishing a new background.
  8096.  
  8097.                 However, because there are so many processing operations which
  8098.                 are carried out in parallel, sometimes considerable thought is
  8099.                 required to produce the best results from this mode.  Otherwise
  8100.                 it is easy to program simply by ignoring most of the available
  8101.                 processing power.  If this approach is adopted, it is possible
  8102.                 to implement improved graphics algorithms as they are developed
  8103.                 provided always that simple functional interfaces are used with
  8104.                 the graphics software components.
  8105.  
  8106.                 This is an absolute colour processing update operation, whereas
  8107.                 write mode 3 provides for relative colour update operation.
  8108.  
  8109.                 There is a discussion of write mode 0 available, together with
  8110.                 a schematic of the data flow invlved.
  8111.  
  8112.                 See {6.06.02} Set/Reset Register.
  8113.  
  8114.                 A discussion of graphics shift register configuration with data
  8115.                 flow schematics is available.
  8116.  
  8117.                 See {6.04.03} Clocking Mode Register.
  8118.                 See table below.
  8119.                 See schematic diagrams below.
  8120.  
  8121.                 The registers used in this mode are as follows.
  8122.  
  8123.                 See {6.04.04} Map Mask Register.
  8124.                 See {6.06.02} Set/Reset Register.
  8125.                 See {6.06.03} Enable Set/Reset Register.
  8126.                 See {6.06.05} Data Rotate Register.
  8127.                 See {6.06.10} Bit Mask Register.
  8128.  
  8129.  
  8130.          <=01>  Write Mode 1
  8131.                 ------------
  8132.  
  8133.                 Write mode 1 provides the facilities for fast multiplane memory
  8134.                 image movement and initialisation.  This write mode ignores all
  8135.                 data written by the processor.  Instead it uses the associated
  8136.                 addresses generated by the processor, together with the type of
  8137.                 memory access (read, write) to control the internal processing
  8138.                 carried out by the VGA controller.  In this manner, great speed
  8139.                 of processing is achieved, since all internal data paths are 32
  8140.                 bits wide.
  8141.  
  8142.                 The processing ability possessed by this mode is minimal which
  8143.                 means that in practise, it is very easy to set up for use.  In
  8144.                 this way, it is a practical mode for use in high speed program
  8145.                 operation, with important application where large images must
  8146.                 be updated using predefined image components.  Such components
  8147.                 are generally held in a library, which is located within a part
  8148.                 of the display image memory which is not displayed directly.
  8149.  
  8150.                 The fast copy ability of this mode can replicate such standard
  8151.                 image parts wherever they are needed, with low overhead.
  8152.  
  8153.                 There is a discussion of write mode 1 available, together with
  8154.                 a schematic of the data flow invlved.
  8155.  
  8156.                 See {6.06.02} Set/Reset Register.
  8157.  
  8158.                 The registers used in this mode are as follows.
  8159.  
  8160.                 See {6.04.04} Map Mask Register.
  8161.  
  8162.  
  8163.          <=10>  Write Mode 2
  8164.                 ------------
  8165.  
  8166.                 This mode can write from one upto eight pixels with a processor
  8167.                 specified colour, when in multiplane image memory format.  This
  8168.                 enables complex colour change image updates to take place where
  8169.                 the processor must determine colour according to possibly quite
  8170.                 sophisticated criteria.  The read latch contents are important
  8171.                 in this mode for specifying the image for regions which are not
  8172.                 directly being modified.  The read latches may either be given
  8173.                 a single value, which is then subsequently used for many write
  8174.                 operations, or may be initialised immediately prior to a write
  8175.                 in order to preserve existing image data.
  8176.  
  8177.                 This mode can be used in line drawing where the colour of the
  8178.                 line must be changed frequently.  It can also be used to fill
  8179.                 an area with colour.  As logic operations can be performed in
  8180.                 this mode, it can find application in image animation.
  8181.  
  8182.                 There is a discussion of write mode 2 available, together with
  8183.                 a schematic of the data flow invlved.
  8184.  
  8185.                 See {6.06.02} Set/Reset Register.
  8186.  
  8187.                 A discussion of graphics shift register configuration with data
  8188.                 flow schematics is available.
  8189.  
  8190.                 See {6.04.03} Clocking Mode Register.
  8191.                 See table below.
  8192.                 See schematic diagrams below.
  8193.  
  8194.                 The registers used in this mode are as follows.
  8195.  
  8196.                 See {6.04.04} Map Mask Register.
  8197.                 See {6.06.05} Data Rotate Register.
  8198.                 See {6.06.10} Bit Mask Register.
  8199.  
  8200.  
  8201.          <=11>  Write Mode 3
  8202.                 ------------
  8203.  
  8204.                 Write mode 3 provides the capability for processing an image
  8205.                 according to the current colour data existing in that image.
  8206.  
  8207.                 The colour value for each pixel is processed by the logic unit
  8208.                 and the processor supplied data is then used to determine what
  8209.                 data source to use for the new pixel colour value.  The effect
  8210.                 is to selectively preserve or update the current pixel colour.
  8211.  
  8212.                 This type of processing is useful for update operations which
  8213.                 must guarantee that all new image data written must be visible
  8214.                 no matter what the colour distribution in the existing image.
  8215.  
  8216.                 This is a relative colour processing update operation, whereas
  8217.                 write mode 0 provides for absolute colour update operation.
  8218.  
  8219.                 There is a discussion of write mode 3 available, together with
  8220.                 a schematic of the data flow invlved.
  8221.  
  8222.                 See {6.06.02} Set/Reset Register.
  8223.  
  8224.                 A discussion of graphics shift register configuration with data
  8225.                 flow schematics is available.
  8226.  
  8227.                 See {6.04.03} Clocking Mode Register.
  8228.                 See table below.
  8229.                 See schematic diagrams below.
  8230.  
  8231.                 The registers used in this mode are as follows.
  8232.  
  8233.                 See {6.04.04} Map Mask Register.
  8234.                 See {6.06.02} Set/Reset Register.
  8235.                 See {6.06.05} Data Rotate Register.
  8236.                 See {6.06.10} Bit Mask Register.
  8237.  
  8238.  
  8239. <2>      Reserved.  Always <=0>.
  8240.          -----------------------
  8241.  
  8242.  
  8243. <3>      Processor Read Mode
  8244.          -------------------
  8245.  
  8246.          <=0>  Read Mode 0
  8247.                -----------
  8248.  
  8249.                This read mode returns a byte of pixel data from one of the four
  8250.                image memory planes in multiplane image format.  Each plane has
  8251.                responsibility for storing one bit of colour data for each pixel
  8252.                so a byte gives the setting of one colour bit over eight pixels.
  8253.  
  8254.                Sometimes it is useful to read data from just one of the planes,
  8255.                so that functionality is provided by read mode 0.  Any read will
  8256.                load the read latches from each of the four image memory planes
  8257.                when read mode 0 is operational.  This happens despite the fact
  8258.                that only one plane will deliver data to the processor.  Latches
  8259.                are selected for processor read using a special register.
  8260.  
  8261.                See {6.06.06} Read Map Select Register.
  8262.  
  8263.                When the logic unit is used during a write mode, it is possible
  8264.                to arrange for the read latches to be updated as a result of a
  8265.                NO_OP function code.
  8266.  
  8267.                See {6.06.02} Set/Reset Register.
  8268.  
  8269.                There is another discussion of read mode 0 available.
  8270.  
  8271.                See {6.06.04} Colour Compare Register.
  8272.  
  8273.  
  8274.          <=1>  Read Mode 1
  8275.                -----------
  8276.  
  8277.                This read mode provides for deciding on the colour value for a
  8278.                group of eight neighbouring pixels.  The four colour bits that
  8279.                make up each pixel are compared with a predetermined colour.
  8280.  
  8281.                The result of the comparison process over eight pixels is given
  8282.                as an eight bit byte, indicating whether or not the colour was
  8283.                present for each pixel.
  8284.  
  8285.                There are provisions for indicating that certain image planes
  8286.                are to be ignored for comparison purposes, and this read mode
  8287.                gives a considerable speed advantage for some operations such
  8288.                as colour fill.  Without read mode 1, colour boundary search
  8289.                operations would be extremely slow to execute.
  8290.  
  8291.                See {6.06.09} Colour Don't Care Register.
  8292.  
  8293.                Note that the image memory organisation must be multiplane if
  8294.                read mode 1 is to function.  A processor read using read mode
  8295.                1 will load all four read latches identically with the colour
  8296.                compare result.  This provides a way of initialising the read
  8297.                latches within a single processor instruction.
  8298.  
  8299.                If the colour don't care register is set to zero, the colour
  8300.                compare is guaranteed to succeed, independantly of the pixel
  8301.                data.  This will generate a full byte result where every bit
  8302.                is set to one.  In addition the all bits set pattern appears
  8303.                in all four read latches.  This can be very useful when used
  8304.                with a processor instruction which performs an image address
  8305.                read access, then performs a corresponding write access.  An
  8306.                example of this could be:
  8307.  
  8308.                    ;
  8309.                    ; Demonstrate multiple access to image memory when using
  8310.                    ; read mode 1 in order to initialise the read latches to
  8311.                    ; a value of all ones.
  8312.                    ;
  8313.  
  8314.                    and      [bx],al
  8315.  
  8316.                    ;
  8317.                    ; End example
  8318.                    ;
  8319.  
  8320.                In this example, the logical operation uses the image memory
  8321.                addressed through register 'bx' for both read and write.  In
  8322.                reading the image memory, the read latches are filled with 1
  8323.                bits, since the colour don't care register is set to zeros.
  8324.  
  8325.                The processor then combines this all bits set value with the
  8326.                value of register 'al', producing no change from that value.
  8327.                This value is then sent to the VGA controller using whatever
  8328.                write mode is in force which then stores the image memory at
  8329.                the same address previously accessed for read.
  8330.  
  8331.                It is also possible to arrange loading the read latches with 0
  8332.                bits, by using a colour don't care register value of all ones.
  8333.                It is also necessary to set the colour compare register to one
  8334.                particular colour value which is never used.  Then all compare
  8335.                operations will fail resulting in each read latch being set to
  8336.                all zero bits.
  8337.  
  8338.                Note that there are other ways of initialising the read latch
  8339.                registers.  It can be useful to write into image memory those
  8340.                initial values which will commonly be used.  These values can
  8341.                then be read prior to any image manipulation.  Until the read
  8342.                latches are modified by another processor read operation, the
  8343.                value they possess remains unchanged.  This property provides
  8344.                for writing fast executing software, since the problem with a
  8345.                separate initialisation on each write is the overhead of data
  8346.                bus speed (which is relatively low).
  8347.  
  8348.                When the logic unit is used during a write mode, it is possible
  8349.                to arrange for the read latches to be updated as a result of a
  8350.                NO_OP function code.
  8351.  
  8352.                See {6.06.02} Set/Reset Register.
  8353.  
  8354.                There is another discussion of read mode 1 available.
  8355.  
  8356.                See {6.06.04} Colour Compare Register.
  8357.  
  8358.  
  8359. <4>      Graphics Memory Access Mode
  8360.          ---------------------------
  8361.  
  8362.          <=0>  Graphics Memory Access Mode.  In graphics mode the image memory
  8363.                planes respond to addresses from the processor in parallel.  In
  8364.                this way, all four memory planes can be read or written using a
  8365.                single access.  The processor data transfer supports only 8 bit
  8366.                transfers, so various mechanisms are employed to map the 8 bits
  8367.                to each of the four bytes actually accessed.  In some cases, it
  8368.                is not necessary to perform any mapping of this type at all, as
  8369.                the processor is used only to generate an address which is then
  8370.                used internally for image manipulation.
  8371.  
  8372.                The manipulation is specified in advance and all that is needed
  8373.                is a stream of processor generated addresses to put the process
  8374.                into operation.  This type of operation is very fast to execute.
  8375.                It is discussed during the description of write mode 1.
  8376.  
  8377.                See {6.06.02} Set/Reset Register.
  8378.  
  8379.                Processor Image Memory Access Mapping Select must be set to zero
  8380.                for this setting to be effective.  See below.
  8381.  
  8382.                See {6.06.07} Graphics Mode Register.
  8383.  
  8384.          <=1>  Text Memory Access Mode.  This affects a data transfer from the
  8385.                processor to the image memory such that it is suitable for text
  8386.                mode operations.  The processor transfers 16 bits per access to
  8387.                image memory in text mode.  The data consists of a character in
  8388.                the current character set together with an attribute byte which
  8389.                exterts control over the character presentation on the display.
  8390.  
  8391.                For text mode display character codes occupy image memory plane
  8392.                zero with attribute data occupying plane one.  The image memory
  8393.                planes are paired (0,1) and (2,3).  The Text Memory Access Mode
  8394.                directs even address accesses to planes (0,2), with odd address
  8395.                accesses directed to planes (1,3).  In this way maximum ease of
  8396.                access is provided for textual data update.  This is sometimes
  8397.                termed odd/even mode.
  8398.  
  8399.                To use this mode effectively it is usual to disable writes to a
  8400.                pair of planes so permitting update to a two plane pair.
  8401.  
  8402.                See {6.04.04} Map Mask Register.
  8403.  
  8404.                Only processor writes to image memory are affected by this mode.
  8405.                That is, image memory organisation continues to be multiplane in
  8406.                all respects except as described above during write addressing.
  8407.  
  8408.  
  8409.          This option setting should be reflected in the setting applied within
  8410.          the sequencer, Processor Image Memory Access Mode Select.  Note these
  8411.          bits are of opposite sense.
  8412.  
  8413.          See {6.04.06} Sequencer Memory Mode Register.
  8414.  
  8415.  
  8416. <5>      Graphics Shift Register Mode
  8417.          ----------------------------
  8418.  
  8419.          <=0>  Normal shift register operation.  This is only available when
  8420.                the Graphics 256 Colour Control is set <=0>.  See table below
  8421.                for full details.
  8422.  
  8423.                A number of shift registers can be loaded together at one time
  8424.                which affords powerful possibilities.  The shift registers can
  8425.                change their interconnection when this occurs so as to support
  8426.                a number of different types of image generation.  See below.
  8427.  
  8428.                See {6.04.03} Clocking Mode Register.
  8429.  
  8430.          <=1>  The shift registers support 4 colour packed pixel mode.  This
  8431.                is only available when the Graphics 256 Colour Control is set
  8432.                <=0>.  See table below for full details.
  8433.  
  8434.                A number of shift registers can be loaded together at one time
  8435.                which affords powerful possibilities.  The shift registers can
  8436.                change their interconnection when this occurs so as to support
  8437.                a number of different types of image generation.  See below.
  8438.  
  8439.                See {6.04.03} Clocking Mode Register.
  8440.  
  8441.  
  8442. <6>      Graphics 256 Colour Control
  8443.          ---------------------------
  8444.  
  8445.          <=0>  The Graphics Shift Register Mode, above, controls the operation
  8446.                of the shift registers.  See table below for full details.
  8447.  
  8448.                A number of shift registers can be loaded together at one time
  8449.                which affords powerful possibilities.  The shift registers can
  8450.                change their interconnection when this occurs so as to support
  8451.                a number of different types of image generation.  See below.
  8452.  
  8453.                See {6.04.03} Clocking Mode Register.
  8454.  
  8455.          <=1>  The shift registers support the 256 colour packed pixel mode so
  8456.                the Graphics Shift Register Mode, above, performs no function.
  8457.  
  8458.                This option connects the shift registers so that 4 bits are sent
  8459.                together to a special register, then another 4 bits are received
  8460.                by that register, making 8 bits in total.  These 8 bits give the
  8461.                full colour code needed to represent 256 colours.  Since these 8
  8462.                bits are assembled from two 4 bit fields, it takes twice as long
  8463.                to create each 8 bit colour value as it would take to issue each
  8464.                4 bit colour value.  For this reason, the effective frequency of
  8465.                the dot clock is halved in this mode.  To produce a display with
  8466.                equivalent high resolution to a 16 colour multiplane display the
  8467.                dot clock frequency must be doubled.
  8468.  
  8469.                See {6.04.03} Clocking Mode Register.
  8470.                See table below for full details.
  8471.  
  8472.                The internal pixel palette is bypassed in this mode, due to two
  8473.                bits being transmitted in sequence from each of the four planes
  8474.                output lines.  This multiplexing prohibits the possibility that
  8475.                the internal colour palette could exert any colour control over
  8476.                the display.  However each of the shift register outputs should
  8477.                be enabled, so that the two bits can be safely transmitted into
  8478.                the shift register assembly latches.
  8479.  
  8480.                See {6.07.20} Colour Plane Enable Register.
  8481.                See table below.
  8482.                See schematic diagrams below.
  8483.  
  8484.                There are controls available to select dot clock frequency and
  8485.                dot clock division ratios.
  8486.  
  8487.                See {6.09.01} Miscellaneous Output Register.
  8488.                See {6.10.04} Mode Control Register 2.
  8489.  
  8490.                A number of shift registers can be loaded together at one time
  8491.                which affords powerful possibilities.  The shift registers can
  8492.                change their interconnection when this occurs so as to support
  8493.                a number of different types of image generation.  See below.
  8494.  
  8495.                See {6.04.03} Clocking Mode Register.
  8496.  
  8497.  
  8498. <7>      Reserved.  Always <=0>.
  8499.          -----------------------
  8500.  
  8501.  
  8502.  
  8503.  
  8504.          Shift Register Mode Control Summary
  8505.          ===================================
  8506.  
  8507.  
  8508.          Graphics 256 Colour Control
  8509.          =--------------------------
  8510.  
  8511.  
  8512.               Graphics Shift Register Mode
  8513.          =    =---------------------------
  8514.  
  8515.  
  8516.                    Colour Output Bit Plane Number
  8517.          =    =    =-----------------------------
  8518.  
  8519.  
  8520.                         Shift Register Operation Specification
  8521.          =    =    =    ======================================----------------
  8522.  
  8523.  
  8524.          =    =    =    shift direction    ------------------>    [output bit]
  8525.  
  8526.  
  8527.                         Bit 0         Bit 2         Bit 4         Bit 6
  8528.          =    =    =    ====-         ====-         ====-         ====-
  8529.  
  8530.                                Bit 1         Bit 3         Bit 5         Bit 7
  8531.          =    =    =           ====-         ====-         ====-         ====-
  8532.  
  8533.  
  8534.          =    =    =    ====   ====   ====   ====   ====   ====   ====   ====
  8535.  
  8536.  
  8537.          -------------------- multiplane 16 colour mode ---------------------
  8538.  
  8539.          0    0    0    p0b0   p0b1   p0b2   p0b3   p0b4   p0b5   p0b6   p0b7
  8540.  
  8541.                    1    p1b0   p1b1   p1b2   p1b3   p1b4   p1b5   p1b6   p1b7
  8542.  
  8543.                    2    p2b0   p2b1   p2b2   p2b3   p2b4   p2b5   p2b6   p2b7
  8544.  
  8545.                    3    p3b0   p3b1   p3b2   p3b3   p3b4   p3b5   p3b6   p3b7
  8546.  
  8547.  
  8548.          -------------------- packed pixel 4 colour mode --------------------
  8549.  
  8550.          0    1    0    p1b0   p1b2   p1b4   p1b6   p0b0   p0b2   p0b4   p0b6
  8551.  
  8552.                    1    p1b1   p1b3   p1b5   p1b7   p0b1   p0b3   p0b5   p0b7
  8553.  
  8554.                    2    p3b0   p3b2   p3b4   p3b6   p2b0   p2b2   p2b4   p2b6
  8555.  
  8556.                    3    p3b1   p3b3   p3b5   p3b7   p2b1   p2b3   p2b5   p2b7
  8557.  
  8558.  
  8559.          -------------------- packed pixel 256 colour mode ------------------
  8560.  
  8561.          1    0    0    p3b0   p3b4   p2b0   p2b4   p1b0   p1b4   p0b0   p0b4
  8562.  
  8563.                    1    p3b1   p3b5   p2b1   p2b5   p1b1   p1b5   p0b1   p0b5
  8564.  
  8565.                    2    p3b2   p3b6   p2b2   p2b6   p1b2   p1b6   p0b2   p0b6
  8566.  
  8567.                    3    p3b3   p3b7   p2b3   p2b7   p1b3   p1b7   p0b3   p0b7
  8568.  
  8569.  
  8570.          -------------------- packed pixel 256 colour mode ------------------
  8571.  
  8572.          1    1    0    p3b0   p3b4   p2b0   p2b4   p1b0   p1b4   p0b0   p0b4
  8573.  
  8574.                    1    p3b1   p3b5   p2b1   p2b5   p1b1   p1b5   p0b1   p0b5
  8575.  
  8576.                    2    p3b2   p3b6   p2b2   p2b6   p1b2   p1b6   p0b2   p0b6
  8577.  
  8578.                    3    p3b3   p3b7   p2b3   p2b7   p1b3   p1b7   p0b3   p0b7
  8579.  
  8580.  
  8581.          ------------------------------------------------------------------
  8582.  
  8583.  
  8584.          When the shift registers are not loaded every character clock, they
  8585.          are chained together such that the output from the preceeding shift
  8586.          register becomes the input to that of the following shift register.
  8587.  
  8588.          See {6.04.03} Clocking Mode Register.
  8589.  
  8590.          This organisation changes depending upon the shift register mode, so
  8591.          that monochrome bit map, 4 colour packed pixel and 256 colour packed
  8592.          pixel displays may be supported.  This organisation change takes the
  8593.          individual shift register bits and changes their interconnections so
  8594.          that the different functionality required can be supported.
  8595.  
  8596.          There are some important consequences of changes to the organisation
  8597.          of the shift register bits.  From the diagrams below it will be seen
  8598.          that in the rearranged modes, various output bits are not used.  The
  8599.          deselection of these bits is under control of a special register for
  8600.          just this purpose.  A deselected bit becomes a constant zero output,
  8601.          which is necessary to ensure stable indexing into the colour tables.
  8602.  
  8603.          See {6.07.20} Colour Plane Enable Register.
  8604.  
  8605.          The various organisations are detailed below, in diagramatic form.
  8606.  
  8607.  
  8608.  
  8609.  
  8610.          Individual Shift Register Connection, Multiplane 16 colour mode
  8611.          ===============================================================
  8612.  
  8613.  
  8614.  
  8615.  
  8616.          [Display Address]
  8617.          |
  8618.          |
  8619.          |
  8620.          |  [Load Clock]      --  derived from character clock
  8621.          |  |
  8622.          |  |
  8623.          |  |
  8624.          |  |  [Shift Clock]  --  dot clock
  8625.          |  |  |
  8626.          |  |  |
  8627.          |  |  |
  8628.          |  |  sc..........................................
  8629.          |  |  |                                          |       _______
  8630.          |  |  |                   Memory Plane 3         |...>...Shift 3
  8631.          |  lc...................>.| [plane 3, bit 7]...........>.| [7]
  8632.          |  |  |                   | [plane 3, bit 6].........>...| [6]
  8633.          |  |  |                   | [plane 3, bit 5]...........>.| [5]
  8634.          da......................>.| [plane 3, bit 4].........>...| [4]
  8635.          |  |  |                   | [plane 3, bit 3]...........>.| [3]
  8636.          |  |  |                   | [plane 3, bit 2].........>...| [2]
  8637.          |  |  |                   | [plane 3, bit 1]...........>.| [1]
  8638.          |  |  |                   | [plane 3, bit 0].........>...| [0]
  8639.          |  |  |                                                     |
  8640.          |  |  |                                                     |
  8641.          |  |  sc....................................                |
  8642.          |  |  |                                    |       _______  |
  8643.          |  |  |             Memory Plane 2         |...>...Shift 2  |
  8644.          |  lc.............>.| [plane 2, bit 7]...........>.| [7]    |
  8645.          |  |  |             | [plane 2, bit 6].........>...| [6]    |
  8646.          |  |  |             | [plane 2, bit 5]...........>.| [5]    |
  8647.          da................>.| [plane 2, bit 4].........>...| [4]    |
  8648.          |  |  |             | [plane 2, bit 3]...........>.| [3]    |
  8649.          |  |  |             | [plane 2, bit 2].........>...| [2]    |
  8650.          |  |  |             | [plane 2, bit 1]...........>.| [1]    |
  8651.          |  |  |             | [plane 2, bit 0].........>...| [0]    |
  8652.          |  |  |                                               |     |
  8653.          |  |  |                                               |     |
  8654.          |  |  sc..............................                |     |
  8655.          |  |  |                              |       _______  |     |
  8656.          |  |  |       Memory Plane 1         |...>...Shift 1  |     |
  8657.          |  lc.......>.| [plane 1, bit 7]...........>.| [7]    |     |
  8658.          |  |  |       | [plane 1, bit 6].........>...| [6]    |     |
  8659.          |  |  |       | [plane 1, bit 5]...........>.| [5]    |     |
  8660.          da..........>.| [plane 1, bit 4].........>...| [4]    |     |
  8661.          |  |  |       | [plane 1, bit 3]...........>.| [3]    |     |
  8662.          |  |  |       | [plane 1, bit 2].........>...| [2]    |     |
  8663.          |  |  |       | [plane 1, bit 1]...........>.| [1]    |     |
  8664.          |  |  |       | [plane 1, bit 0].........>...| [0]    |     |
  8665.          |  |  |                                         |     |     |
  8666.          |  |  |                                         |     |     |
  8667.          |  |  sc........................                |     |     |
  8668.          |  |                           |       _______  |     |     |
  8669.          |  |    Memory Plane 0         |...>...Shift 0  |     |     |
  8670.          |  lc.>.| [plane 0, bit 7]...........>.| [7]    |     |     |
  8671.          |       | [plane 0, bit 6].........>...| [6]    |     |     |
  8672.          |       | [plane 0, bit 5]...........>.| [5]    |     |     |
  8673.          da....>.| [plane 0, bit 4].........>...| [4]    |     |     |
  8674.                  | [plane 0, bit 3]...........>.| [3]    |     |     |
  8675.                  | [plane 0, bit 2].........>...| [2]    |     |     |
  8676.                  | [plane 0, bit 1]...........>.| [1]    |     |     |
  8677.                  | [plane 0, bit 0].........>...| [0]    |     |     |
  8678.                                                    |     |     |     |
  8679.                                                    |     |     |     |
  8680.                                                    |     |     |     |
  8681.                                                    |   Plane   |   Plane
  8682.                                                    |   1 Out   |   3 Out
  8683.                                                    |           |
  8684.                                                  Plane       Plane
  8685.                                                  0 Out       2 Out
  8686.  
  8687.                                                ===========================
  8688.  
  8689.                                                     16 colour output
  8690.                                                     delivered at full
  8691.                                                     dot clock frequency
  8692.  
  8693.                                                ===========================
  8694.  
  8695.  
  8696.          Note each of the output bits are associated with a particular image
  8697.          plane and each of these shift register output bits can individually
  8698.          be enabled or disabled.  This control is exerted by means of a zero
  8699.          bit substitution for the data bit that would normally be output.  A
  8700.          specially appointed control register is provided for this purpose.
  8701.  
  8702.          See {6.07.20} Colour Plane Enable Register.
  8703.  
  8704.  
  8705.          -------------------------------------------------------------------
  8706.  
  8707.  
  8708.  
  8709.  
  8710.          Individual Shift Register Connection, Packed Pixel 2 colour mode
  8711.          ================================================================
  8712.  
  8713.  
  8714.  
  8715.  
  8716.          [Display Address]
  8717.          |
  8718.          |
  8719.          |
  8720.          |  [Load Clock]      --  derived from character clock
  8721.          |  |
  8722.          |  |
  8723.          |  |
  8724.          |  |  [Shift Clock]  --  dot clock
  8725.          |  |  |
  8726.          |  |  |
  8727.          |  |  |
  8728.          |  |  sc..........................................
  8729.          |  |  |                                          |       ________
  8730.          |  |  |                   Memory Plane 3         |...>...Shift 3
  8731.          |  lc...................>.| [plane 3, bit 7]...........>.| [7]
  8732.          |  |  |                   | [plane 3, bit 6].........>...| [6]
  8733.          |  |  |                   | [plane 3, bit 5]...........>.| [5]
  8734.          da......................>.| [plane 3, bit 4].........>...| [4]
  8735.          |  |  |                   | [plane 3, bit 3]...........>.| [3]
  8736.          |  |  |                   | [plane 3, bit 2].........>...| [2]
  8737.          |  |  |                   | [plane 3, bit 1]...........>.| [1]
  8738.          |  |  |                   | [plane 3, bit 0].........>...| [0]
  8739.          |  |  |                                                     |
  8740.          |  |  |                                                     |
  8741.          |  |  |                                               ......|
  8742.          |  |  sc....................................          |     |
  8743.          |  |  |                                    |       ___|____ |
  8744.          |  |  |             Memory Plane 2         |...>...Shift 2  |
  8745.          |  lc.............>.| [plane 2, bit 7]...........>.| [7]    |
  8746.          |  |  |             | [plane 2, bit 6].........>...| [6]    |
  8747.          |  |  |             | [plane 2, bit 5]...........>.| [5]    |
  8748.          da................>.| [plane 2, bit 4].........>...| [4]    |
  8749.          |  |  |             | [plane 2, bit 3]...........>.| [3]    |
  8750.          |  |  |             | [plane 2, bit 2].........>...| [2]    |
  8751.          |  |  |             | [plane 2, bit 1]...........>.| [1]    |
  8752.          |  |  |             | [plane 2, bit 0].........>...| [0]    |
  8753.          |  |  |                                               |     |
  8754.          |  |  |                                               |     |
  8755.          |  |  |                                         ......|     |
  8756.          |  |  sc..............................          |     |     |
  8757.          |  |  |                              |       ___|____ |     |
  8758.          |  |  |       Memory Plane 1         |...>...Shift 1  |     |
  8759.          |  lc.......>.| [plane 1, bit 7]...........>.| [7]    |     |
  8760.          |  |  |       | [plane 1, bit 6].........>...| [6]    |     |
  8761.          |  |  |       | [plane 1, bit 5]...........>.| [5]    |     |
  8762.          da..........>.| [plane 1, bit 4].........>...| [4]    |     |
  8763.          |  |  |       | [plane 1, bit 3]...........>.| [3]    |     |
  8764.          |  |  |       | [plane 1, bit 2].........>...| [2]    |     |
  8765.          |  |  |       | [plane 1, bit 1]...........>.| [1]    |     |
  8766.          |  |  |       | [plane 1, bit 0].........>...| [0]    |     |
  8767.          |  |  |                                         |     |     |
  8768.          |  |  |                                         |     |     |
  8769.          |  |  |                                   ......|     |     |
  8770.          |  |  sc........................          |     |     |     |
  8771.          |  |                           |       ___|____ |     |     |
  8772.          |  |    Memory Plane 0         |...>...Shift 0  |     |     |
  8773.          |  lc.>.| [plane 0, bit 7]...........>.| [7]    |     |     |
  8774.          |       | [plane 0, bit 6].........>...| [6]    |     |     |
  8775.          |       | [plane 0, bit 5]...........>.| [5]    |     |     |
  8776.          da....>.| [plane 0, bit 4].........>...| [4]    |     |     |
  8777.                  | [plane 0, bit 3]...........>.| [3]    |     |     |
  8778.                  | [plane 0, bit 2].........>...| [2]    |     |     |
  8779.                  | [plane 0, bit 1]...........>.| [1]    |     |     |
  8780.                  | [plane 0, bit 0].........>...| [0]    |     |     |
  8781.                                                    |     |     |     |
  8782.                                                    |     |     |     |
  8783.                                                    |     |     |     |
  8784.                                                    |   Plane   |   Plane
  8785.                                                    |   1 Out   |   3 Out
  8786.                                                    |   [Not ]  |   [Not ]
  8787.                                                    |   [Used]  |   [Used]
  8788.                                                    |           |
  8789.                                                    |         Plane
  8790.                                                    |         2 Out
  8791.                                                    |         [Not ]
  8792.                                                    |         [Used]
  8793.                                                    |
  8794.                                                  Plane
  8795.                                                  0 Out
  8796.  
  8797.                                        ==========================
  8798.  
  8799.                                            Monochrome Output
  8800.                                            delivered at full
  8801.                                            dot clock frequency
  8802.  
  8803.                                        ==========================
  8804.  
  8805.  
  8806.          Note each of the output bits are associated with a particular image
  8807.          plane and each of these shift register output bits can individually
  8808.          be enabled or disabled.  This control is exerted by means of a zero
  8809.          bit substitution for the data bit that would normally be output.  A
  8810.          specially appointed control register is provided for this purpose.
  8811.  
  8812.          See {6.07.20} Colour Plane Enable Register.
  8813.  
  8814.  
  8815.          -------------------------------------------------------------------
  8816.  
  8817.  
  8818.  
  8819.  
  8820.          Individual Shift Register Connection, Packed Pixel 4 colour mode
  8821.          ================================================================
  8822.  
  8823.  
  8824.  
  8825.  
  8826.          [Display Address]
  8827.          |
  8828.          |
  8829.          |
  8830.          |  [Load Clock]      --  derived from character clock
  8831.          |  |
  8832.          |  |
  8833.          |  |
  8834.          |  |  [Shift Clock]  --  dot clock
  8835.          |  |  |
  8836.          |  |  |
  8837.          |  |  |
  8838.          |  |  sc..........................................
  8839.          |  |  |                                          |       ________
  8840.          |  |  |                   Memory Plane 3         |...>...Shift 3
  8841.          |  lc...................>.| [plane 3, bit 7]...........>.|    [7]
  8842.          |  |  |                   | [plane 3, bit 6].........>...| [6] |
  8843.          |  |  |                   | [plane 3, bit 5]...........>.|  | [5]
  8844.          da......................>.| [plane 3, bit 4].........>...| [4] |
  8845.          |  |  |                   | [plane 3, bit 3]...........>.|  | [3]
  8846.          |  |  |                   | [plane 3, bit 2].........>...| [2] |
  8847.          |  |  |                   | [plane 3, bit 1]...........>.|  | [1]
  8848.          |  |  |                   | [plane 3, bit 0].........>...| [0] |
  8849.          |  |  |                                                     |  |
  8850.          |  |  |                                                     |  |
  8851.          |  |  |                                               ......|  |
  8852.          |  |  |                                               |        |
  8853.          |  |  |                                               |  ......|
  8854.          |  |  |                                               |  |
  8855.          |  |  sc....................................          |  |
  8856.          |  |  |                                    |       ___|__|_
  8857.          |  |  |             Memory Plane 2         |...>...Shift 2
  8858.          |  lc.............>.| [plane 2, bit 7]...........>.|  | [7]
  8859.          |  |  |             | [plane 2, bit 6].........>...| [6] |
  8860.          |  |  |             | [plane 2, bit 5]...........>.|  | [5]
  8861.          da................>.| [plane 2, bit 4].........>...| [4] |
  8862.          |  |  |             | [plane 2, bit 3]...........>.|  | [3]
  8863.          |  |  |             | [plane 2, bit 2].........>...| [2] |
  8864.          |  |  |             | [plane 2, bit 1]...........>.|  | [1]
  8865.          |  |  |             | [plane 2, bit 0].........>...| [0] |
  8866.          |  |  |                                               |  |
  8867.          |  |  |                                               |  |
  8868.          |  |  |                                               |  |
  8869.          |  |  |                                         ......e  |
  8870.          |  |  |                                         |     |  |
  8871.          |  |  |                                         |     |  |
  8872.          |  |  |                                         |     e  |
  8873.          |  |  |                                         |  ......o...
  8874.          |  |  |                                         |  |  e     |
  8875.          |  |  |                                         |  |  |     |
  8876.          |  |  sc..............................          |  |  |     |
  8877.          |  |  |                              |       ___|__|_ |     |
  8878.          |  |  |       Memory Plane 1         |...>...Shift 1  |     |
  8879.          |  lc.......>.| [plane 1, bit 7]...........>.|  | [7] |     |
  8880.          |  |  |       | [plane 1, bit 6].........>...| [6] |  |     |
  8881.          |  |  |       | [plane 1, bit 5]...........>.|  | [5] |     |
  8882.          da..........>.| [plane 1, bit 4].........>...| [4] |  |     |
  8883.          |  |  |       | [plane 1, bit 3]...........>.|  | [3] |     |
  8884.          |  |  |       | [plane 1, bit 2].........>...| [2] |  |     |
  8885.          |  |  |       | [plane 1, bit 1]...........>.|  | [1] |     |
  8886.          |  |  |       | [plane 1, bit 0].........>...| [0] |  |     |
  8887.          |  |  |                                         |  |  |     |
  8888.          |  |  |                                         |  |  |     |
  8889.          |  |  |                                   ......|  |  |     |
  8890.          |  |  |                                   |        |  |     |
  8891.          |  |  |                                   |  ......|  |     |
  8892.          |  |  |                                   |  |        |     |
  8893.          |  |  sc........................          |  |        |     |
  8894.          |  |                           |       ___|__|_       |     |
  8895.          |  |    Memory Plane 0         |...>...Shift 0        |     |
  8896.          |  lc.>.| [plane 0, bit 7]...........>.|  | [7]       |     |
  8897.          |       | [plane 0, bit 6].........>...| [6] |        |     |
  8898.          |       | [plane 0, bit 5]...........>.|  | [5]       |     |
  8899.          da....>.| [plane 0, bit 4].........>...| [4] |        |     |
  8900.                  | [plane 0, bit 3]...........>.|  | [3]       |     |
  8901.                  | [plane 0, bit 2].........>...| [2] |        |     |
  8902.                  | [plane 0, bit 1]...........>.|  | [1]       |     |
  8903.                  | [plane 0, bit 0].........>...| [0] |        |     |
  8904.                                                    |  |        |     |
  8905.                                                    |  |        |     |
  8906.                          ..........................|  |        |     |
  8907.                          |                            |        |     |
  8908.                          |                ............|        |   Plane
  8909.                          |                |                    |   3 Out
  8910.                          |                |                    |   2 Out
  8911.                          |                |                    |   ODD
  8912.                          |                |                    |   [Not ]
  8913.                          |                |                    |   [Used]
  8914.                          |                |                    |
  8915.                          |                |                   Plane
  8916.                          |                |                   3 Out
  8917.                          |                |                   2 Out
  8918.                          |                |                   EVEN
  8919.                          |                |                   [Not ]
  8920.                          |                |                   [Used]
  8921.                          |                |
  8922.                        Plane            Plane
  8923.                        1 Out            1 Out
  8924.                        0 Out            0 Out
  8925.                        EVEN             ODD
  8926.  
  8927.  
  8928.                      ==========================
  8929.  
  8930.                          4 colour output
  8931.                          delivered at full
  8932.                          dot clock frequency
  8933.  
  8934.                      ==========================
  8935.  
  8936.  
  8937.          Note each of the output bits are associated with a particular image
  8938.          plane and each of these shift register output bits can individually
  8939.          be enabled or disabled.  This control is exerted by means of a zero
  8940.          bit substitution for the data bit that would normally be output.  A
  8941.          specially appointed control register is provided for this purpose.
  8942.  
  8943.          See {6.07.20} Colour Plane Enable Register.
  8944.  
  8945.  
  8946.          -------------------------------------------------------------------
  8947.  
  8948.  
  8949.  
  8950.  
  8951.          Individual Shift Register Connection, Packed Pixel 256 colour mode
  8952.          ==================================================================
  8953.  
  8954.  
  8955.  
  8956.  
  8957.          [Display Address]
  8958.          |
  8959.          |
  8960.          |
  8961.          |  [Load Clock]      --  derived from character clock
  8962.          |  |
  8963.          |  |
  8964.          |  |
  8965.          |  |  [Shift Clock]  --  dot clock
  8966.          |  |  |
  8967.          |  |  |
  8968.          |  |  |
  8969.          |  |  sc..........................
  8970.          |  |  |                          |       ______________
  8971.          |  |  |   Memory Plane 3         |...>...Shift 3
  8972.          |  lc...>.| [plane 3, bit 0]...........>.|..........[0]
  8973.          |  |  |   | [plane 3, bit 1].........>...|.......[1] |
  8974.          |  |  |   | [plane 3, bit 2]...........>.|....[2] |  |
  8975.          da......>.| [plane 3, bit 3].........>...|.[3] |  |  |
  8976.          |  |  |   | [plane 3, bit 4]...........>.|..|..|..|.[4]
  8977.          |  |  |   | [plane 3, bit 5].........>...|..|..|.[5] |
  8978.          |  |  |   | [plane 3, bit 6]...........>.|..|.[6] |  |
  8979.          |  |  |   | [plane 3, bit 7].........>...|.[7] |  |  |
  8980.          |  |  |                                     |  |  |  |
  8981.          |  |  |                                     |  |  |  |
  8982.          |  |  |                                     |  |  |  |
  8983.          |  |  |                                     |  |  |  |
  8984.          |  |  |                                     |  |  |  |
  8985.          |  |  sc..........................          |  |  |  |
  8986.          |  |  |                          |       ___|__|__|__|_
  8987.          |  |  |   Memory Plane 2         |...>...Shift 2  |  |
  8988.          |  lc...>.| [plane 2, bit 0]...........>.|..|..|..|.[0]
  8989.          |  |  |   | [plane 2, bit 1].........>...|..|..|.[1] |
  8990.          |  |  |   | [plane 2, bit 2]...........>.|..|.[2] |  |
  8991.          da......>.| [plane 2, bit 3].........>...|.[3] |  |  |
  8992.          |  |  |   | [plane 2, bit 4]...........>.|..|..|..|.[4]
  8993.          |  |  |   | [plane 2, bit 5].........>...|..|..|.[5] |
  8994.          |  |  |   | [plane 2, bit 6]...........>.|..|.[6] |  |
  8995.          |  |  |   | [plane 2, bit 7].........>...|.[7] |  |  |
  8996.          |  |  |                                     |  |  |  |
  8997.          |  |  |                                     |  |  |  |
  8998.          |  |  |                                     |  |  |  |
  8999.          |  |  |                                     |  |  |  |
  9000.          |  |  |                                     |  |  |  |
  9001.          |  |  sc..........................          |  |  |  |
  9002.          |  |  |                          |       ___|__|__|__|_
  9003.          |  |  |   Memory Plane 1         |...>...Shift 1  |  |
  9004.          |  lc...>.| [plane 1, bit 0]...........>.|..|..|..|.[0]
  9005.          |  |  |   | [plane 1, bit 1].........>...|..|..|.[1] |
  9006.          |  |  |   | [plane 1, bit 2]...........>.|..|.[2] |  |
  9007.          da......>.| [plane 1, bit 3].........>...|.[3] |  |  |
  9008.          |  |  |   | [plane 1, bit 4]...........>.|..|..|..|.[4]
  9009.          |  |  |   | [plane 1, bit 5].........>...|..|..|.[5] |
  9010.          |  |  |   | [plane 1, bit 6]...........>.|..|.[6] |  |
  9011.          |  |  |   | [plane 1, bit 7].........>...|.[7] |  |  |
  9012.          |  |  |                                     |  |  |  |
  9013.          |  |  |                                     |  |  |  |
  9014.          |  |  |                                     |  |  |  |
  9015.          |  |  |                                     |  |  |  |
  9016.          |  |  |                                     |  |  |  |
  9017.          |  |  sc..........................          |  |  |  |
  9018.          |  |  |                          |       ___|__|__|__|_
  9019.          |  |  |   Memory Plane 0         |...>...Shift 0  |  |
  9020.          |  lc...>.| [plane 0, bit 0]...........>.|..|..|..|.[0]
  9021.          |     |   | [plane 0, bit 1].........>...|..|..|.[1] |
  9022.          |     |   | [plane 0, bit 2]...........>.|..|.[2] |  |
  9023.          da......>.| [plane 0, bit 3].........>...|.[3] |  |  |
  9024.                |   | [plane 0, bit 4]...........>.|..|..|..|.[4]
  9025.                |   | [plane 0, bit 5].........>...|..|..|.[5] |
  9026.                |   | [plane 0, bit 6]...........>.|..|.[6] |  |
  9027.                |   | [plane 0, bit 7].........>...|.[7] |  |  |
  9028.                |                                     |  |  |  |
  9029.                |                                     |  |  |  |
  9030.                |                                     |  |  |  |
  9031.                |                                     |  |  |  |
  9032.                |                                ___________________
  9033.                |
  9034.                |                                 these are the 4
  9035.                |                                 plane output bits
  9036.                |                                 which have little
  9037.                |                                 significance for
  9038.                |                                 256 colour mode
  9039.                |                                 (see note below)
  9040.                |                                ___________________
  9041.                |                                     |  |  |  |
  9042.                |                                     |  |  |  |
  9043.                |                                     |  |  |  |
  9044.                |                                     |  |  |  |
  9045.            ____|______                               |  |  |  |
  9046.            Divide by 2                               |  |  |  |
  9047.            | ODD.....|..........................     |  |  |  |
  9048.            | EVEN....|.....                    |     |  |  |  |
  9049.                           |                    |     |  |  |  |
  9050.                           |                    |     |  |  |  |
  9051.                           |     ...............|.....a  |  |  |
  9052.                           |     |  ............|.....|..b  |  |
  9053.                           |     |  |  .........|.....|..|..c  |
  9054.                           |     |  |  |  ......|.....|..|..|..d
  9055.                           |     |  |  |  |     |     |  |  |  |
  9056.                           |     |  |  |  |     |     |  |  |  |
  9057.                           |     |  |  |  |     |     |  |  |  |
  9058.                           |     |  |  |  |     |     |  |  |  |
  9059.                           |    _|__|__|__|_    |    _|__|__|__|_
  9060.                           |   |Latch 4 bits    |   |Latch 4 bits
  9061.                           |.>.|making 8 bit    |.>.|making 8 bit
  9062.                               |256 colours         |256 colours
  9063.                                <7><6><5><4>         <3><2><1><0>
  9064.                                 |  |  |  |           |  |  |  |
  9065.                                 |  |  |  |           |  |  |  |
  9066.                                 |  |  |  |           |  |  |  |
  9067.                                 |  |  |  |           |  |  |  |
  9068.  
  9069.                                =================================
  9070.  
  9071.                                      256 colour output
  9072.                                      delivered at only half
  9073.                                      the dot clock frequency
  9074.  
  9075.                                =================================
  9076.  
  9077.  
  9078.  
  9079.  
  9080.          Important note: the concept of output bits corresponding with each
  9081.          display memory image plane is redundant in 256 colour packed pixel
  9082.          mode.  Two distinct colour bits flow from each of four output bits
  9083.          during the two dot clock period necessary to build an 8 bit colour
  9084.          value.  For this reason, the internal colour palette cannot effect
  9085.          any colour control for 256 colour packed pixel modes. So that each
  9086.          of the four shift register output bits can deliver two colour bits
  9087.          making a total of 8 bits per pixel the colour plane outputs should
  9088.          all be enabled during 256 colour modes.
  9089.  
  9090.          See {6.07.20} Colour Plane Enable Register.
  9091.  
  9092.  
  9093.          -------------------------------------------------------------------
  9094.  
  9095.  
  9096.  
  9097.  
  9098. 6.06.08  Miscellaneous Register       { 3cfh    06h    R/W }
  9099. =======  ===================================================
  9100.  
  9101.  
  9102. Cross reference with {6.04.03} Clocking Mode Register.
  9103. Cross reference with {6.04.05} Character Map Select Register.
  9104. Cross reference with {6.05.22} Underline Location Register.
  9105. Cross reference with {6.06.07} Graphics Mode Register.
  9106. Cross reference with {6.07.18} Attribute Mode Control Register.
  9107. Cross reference with {6.09.01} Miscellaneous Output Register.
  9108. Cross reference with {6.10.05} Mode Control Register 1.
  9109.  
  9110.  
  9111. <0>      Display Generation Mode
  9112.          -----------------------
  9113.  
  9114.          <=0>  Text Mode
  9115.                ---------
  9116.  
  9117.                Hardware character generation is invoked for display generation.
  9118.                There is no capability to generate graphics in the usual manner
  9119.                but a software technique can be used, giving a limited graphics
  9120.                capability.  The technique depends upon assigning characters to
  9121.                a display area, then re-writing the character fonts assigned to
  9122.                those characters.  In this manner a limited graphics capability
  9123.                can be supported within a relatively small area of the display.
  9124.  
  9125.                The text mode display stores character codes in memory plane 0,
  9126.                with their associated attribute bytes in plane 1.  The hardware
  9127.                expects character font data to be stored at specified addresses
  9128.                in plane 2.  Memory plane 3 is unused in this display mode.
  9129.  
  9130.                The main characteristics of this mode are high speed operation,
  9131.                with very low associated host processor overhead.  A number of
  9132.                separate pages of text can be maintained, and switched between
  9133.                at high speed.  This is the ideal mode to employ where no true
  9134.                graphics capability is required, other than that provided with
  9135.                the specially reserved graphics drawing characters.  Two fonts
  9136.                can be used within one display screen, each font consisting of
  9137.                256 characters in total.  User defined fonts can be used, when
  9138.                occasion demands.
  9139.  
  9140.                See {6.04.03} Clocking Mode Register.
  9141.                See {6.04.05} Character Map Select Register.
  9142.                See {6.05.22} Underline Location Register.
  9143.  
  9144.          <=1>  Graphics Mode
  9145.                -------------
  9146.  
  9147.                The display will be generated with reference to an image memory,
  9148.                organised as a collection of pixel data.  There is no capability
  9149.                for the support of hardware text generation, but software can be
  9150.                written to support multiple character fonts and any size of font
  9151.                necessary for the application.
  9152.  
  9153.                Display image memory organisation is dependant upon the range of
  9154.                colours available for definition of a pixel.  The principle mode
  9155.                options include:
  9156.  
  9157.  
  9158.                    1.    Multiplane 16 Colour
  9159.                          --------------------
  9160.  
  9161.                          The display memory is arranged as four parallel planes
  9162.                          each of which holds data for eight pixels by splitting
  9163.                          four colour bits across four planes.  Each plane gives
  9164.                          access to a single byte when presented with an address
  9165.                          so with parallel address spaces, each access returns 4
  9166.                          bytes.  The 32 bits specify 4 bits of colour data, for
  9167.                          each of eight pixels.
  9168.  
  9169.                          See {6.06.07} Graphics Mode Register.
  9170.  
  9171.                    2.    Packed pixel Monochrome
  9172.                          -----------------------
  9173.  
  9174.                          The display memory is arranged as a linear array which
  9175.                          is addressed in a manner corresponding directly to the
  9176.                          screen pixel display.  One bit per pixel specifies any
  9177.                          colour required, from a large available palette.  This
  9178.                          choice is normally restricted by making black the fore
  9179.                          ground colour.  The display image is easily managed as
  9180.                          it is of small size.  A large number of distinct pages
  9181.                          can be maintained and quickly switched for one another
  9182.                          which is very useful for hierarchical design systems.
  9183.  
  9184.                          See {6.06.07} Graphics Mode Register.
  9185.  
  9186.                    3.    Packed Pixel 4 Colour
  9187.                          ---------------------
  9188.  
  9189.                          This display mode requires double the amount of memory
  9190.                          compared with monochrome mode, but provides 4 colours,
  9191.                          which can be much more flexible in some applications.
  9192.  
  9193.                          Each pixel is represented by two neighbouring bits, so
  9194.                          four pixels are collected together in one byte.  There
  9195.                          are special hardware capabilities available, to decode
  9196.                          this special colour representation.
  9197.  
  9198.                          Since images are still very compact large displays can
  9199.                          be manipulated without great memory overhead; a number
  9200.                          of distinct pages can be held in memory and swapped at
  9201.                          high speed.
  9202.  
  9203.                          See {6.06.07} Graphics Mode Register.
  9204.  
  9205.                    4.    Packed Pixel 256 Colour
  9206.                          -----------------------
  9207.  
  9208.                          This display mode ensures the highest image resolution
  9209.                          and complexity.  As a result the display memory needed
  9210.                          is larger than with any other mode.  This can mean the
  9211.                          quantity of data accessed when changing an image is an
  9212.                          important determinant of processing speed.  A pixel is
  9213.                          represented by a single byte of data.  In this way, it
  9214.                          is the simplest mode, from the point of view of memory
  9215.                          organisation.
  9216.  
  9217.                          See {6.06.07} Graphics Mode Register.
  9218.  
  9219.  
  9220. <1>      Memory Plane Pairing Control
  9221.          ----------------------------
  9222.  
  9223.          <=0>  No plane pairing.  Address bit 0 is not replaced.
  9224.  
  9225.          <=1>  Memory planes are paired.  The processor address bit 0 gives the
  9226.                plane pair to access.  Even addresses access planes (0,2) whilst
  9227.                odd addresses access planes (1,3).  Address bit 0 is replaced by
  9228.                a higher order address bit.
  9229.  
  9230.          This is similar to Processor Image Memory Access Mode Select.
  9231.          See {6.04.06} Sequencer Memory Mode Register.
  9232.  
  9233.  
  9234. <3..2>   Memory Map Mode
  9235.          ---------------
  9236.  
  9237.          This field specifies the mapping of the display image memory into the
  9238.          processor memory address space.  This changes the range of processor
  9239.          addresses which are recognised as being display memory references.
  9240.  
  9241.          <=00>  Host processor address range is {a0000h .. bffffh}.
  9242.  
  9243.          <=01>  Host processor address range is {a0000h .. affffh}.
  9244.  
  9245.                 High resolution graphics controls require this processor map
  9246.                 for correct operation {Trident 8900 only}.
  9247.  
  9248.                 See {6.10.05} Mode Control Register 1.
  9249.  
  9250.          <=10>  Host processor address range is {b0000h .. b7fffh}.
  9251.  
  9252.          <=11>  Host processor address range is {b8000h .. bffffh}.
  9253.  
  9254.  
  9255. <7..4>   Reserved.  Always <=0000>.
  9256.          --------------------------
  9257.  
  9258.  
  9259.  
  9260.  
  9261. 6.06.09  Colour Don't Care Register   { 3cfh    07h    R/W }
  9262. =======  ===================================================
  9263.  
  9264.  
  9265. Cross reference with {6.06.04} Colour Compare Register.
  9266. Cross reference with {6.06.06} Read Map Select Register.
  9267. Cross reference with {6.06.07} Graphics Mode Register.
  9268.  
  9269.  
  9270. <0>      Colour Don't Care Plane 0
  9271.          -------------------------
  9272.  
  9273.          During multiplane image memory read access operation by the processor,
  9274.          this bit can determine the value of the byte representing the result
  9275.          returned to the processor.
  9276.  
  9277.          <=0>  Image plane zero data is not actively used for colour comparison
  9278.                rather it is considered to have generated an unconditional match
  9279.                with the colour data value specified, assuming read mode 1.
  9280.  
  9281.                See {6.06.04} Colour Compare Register.
  9282.  
  9283.          <=1>  Image plane zero is actively compared with the colour data value
  9284.                specified.  The result depends directly on data from this plane,
  9285.                assuming read mode 1.
  9286.  
  9287.                See {6.06.04} Colour Compare Register.
  9288.  
  9289.          The effect of this bit is determined by the read mode used to perform
  9290.          the image memory read access operation.  Two different read modes are
  9291.          provided as follows:
  9292.  
  9293.  
  9294.          Read Mode 0
  9295.          ===========
  9296.  
  9297.          At any single address, each image plane stores one eight bit byte so
  9298.          providing for 32 bits total storage spread across four planes.  Each
  9299.          bit position on each of the four planes provides a four bit value so
  9300.          that 16 colours can be represented.  In this way, eight neighbouring
  9301.          pixels are completely described by the 32 bits at a single address.
  9302.          This convention for image memory organisation is termed multiplane.
  9303.  
  9304.          When read mode 0 is active, a read operation by the processor returns
  9305.          a single byte, which is associated with one of the four image planes.  The plan
  9306.          The particular image plane is selected by means of a special register
  9307.          provided specifically for this purpose.
  9308.  
  9309.          See {6.06.06} Read Map Select Register.
  9310.          See {6.06.07} Graphics Mode Register.
  9311.  
  9312.          In read mode 0, the Colour Compare Register plays no active role in
  9313.          processor read operation so the value of the Colour Compare Plane 0
  9314.          bit and the Colour Don't Care Plane 0 bit is irrelevant.
  9315.  
  9316.  
  9317.          Read Mode 1
  9318.          ===========
  9319.  
  9320.          At any single address, each image plane stores one eight bit byte so
  9321.          providing for 32 bits total storage spread across four planes.  Each
  9322.          bit position on each of the four planes provides a four bit value so
  9323.          that 16 colours can be represented.  In this way, eight neighbouring
  9324.          pixels are completely described by the 32 bits at a single address.
  9325.          This convention for image memory organisation is termed multiplane.
  9326.  
  9327.          It is often required to determine where the border pixels of an area
  9328.          are situated, perhaps in order to provide a colour fill function for
  9329.          a graphics software package.  Usually in such a situation, either of
  9330.          the colours associated with the foreground or background are a known
  9331.          constant.  The business of discovering the border pixels becomes one
  9332.          of tracing a region consisting of pixels with a known colour.
  9333.  
  9334.          There is a way of doing this, using read mode 0 to recover the four
  9335.          bytes of colour plane data at a given image memory address.  But it
  9336.          would then be necessary to change those four bytes into eight pixels
  9337.          each of 4 bits.  Whilst this is computationally simple, it is a very
  9338.          time consuming operation to perform, especially with large images.
  9339.  
  9340.          This is where read mode 1 can provide assistance.  Read mode 1 uses
  9341.          a colour match specification to inspect an eight pixel image memory
  9342.          address in parallel, producing a colour match bit for each pixel in
  9343.          the result byte.  A matching colour produces a set bit result.
  9344.  
  9345.          The match value for any plane can be made irrelevant by using a mask
  9346.          value for the plane indicating a colour match don't care.  Any don't
  9347.          care planes are considered to match under all circumstances.  So for
  9348.          some colour ranges it is possible to obtain sensible match behaviour
  9349.          even though the match result is expressed in a single bit.
  9350.  
  9351.          See {6.06.04} Colour Compare Register.
  9352.          See {6.06.07} Graphics Mode Register.
  9353.  
  9354.  
  9355. <1>      Colour Don't Care Plane 1
  9356.          -------------------------
  9357.  
  9358.          As for Colour Don't Care Plane 0, immediately above.
  9359.  
  9360.          See {6.06.04} Colour Compare Register.
  9361.          See {6.06.07} Graphics Mode Register.
  9362.  
  9363.  
  9364. <2>      Colour Don't Care Plane 2
  9365.          -------------------------
  9366.  
  9367.          As for Colour Don't Care Plane 0, immediately above.
  9368.  
  9369.          See {6.06.04} Colour Compare Register.
  9370.          See {6.06.07} Graphics Mode Register.
  9371.  
  9372.  
  9373. <3>      Colour Don't Care Plane 3
  9374.          -------------------------
  9375.  
  9376.          As for Colour Don't Care Plane 0, immediately above.
  9377.  
  9378.          See {6.06.04} Colour Compare Register.
  9379.          See {6.06.07} Graphics Mode Register.
  9380.  
  9381.  
  9382. <7..4>   Reserved.  Always <=0000>.
  9383.          --------------------------
  9384.  
  9385.  
  9386.  
  9387.  
  9388. 6.06.10  Bit Mask Register            { 3cfh    08h    R/W }
  9389. =======  ===================================================
  9390.  
  9391.  
  9392. Cross reference with {6.06.02} Set/Reset Register.
  9393.  
  9394.  
  9395. <0>   Update Value Source Bit 0
  9396.       -------------------------
  9397.  
  9398.       <=0>  This bit position in all write enabled planes will be sourced from
  9399.             the current read latch contents associated with those planes.  The
  9400.             interpretation of this bit can be simplified when the read latches
  9401.             have been loaded with the original image data.  In that case, this
  9402.             option signifies that this pixel number will be write inhibited in
  9403.             all four image memory planes.
  9404.  
  9405.             This bit is used in write modes (0, 2, 3).
  9406.  
  9407.             See {6.06.02} Set/Reset Register.
  9408.  
  9409.       <=1>  This bit position in all write enabled planes will be sourced from
  9410.             the logic unit output data path associated with those planes.  The
  9411.             interpretation of this bit can be simplified when the read latches
  9412.             have been loaded with the original image data.  In that case, this
  9413.             option signifies that this pixel number will be enabled for write,
  9414.             across all the four image memory planes.
  9415.  
  9416.             This bit is used in write modes (0, 2, 3).
  9417.  
  9418.             See {6.06.02} Set/Reset Register.
  9419.  
  9420.  
  9421. <1>   Update Value Source Bit 1
  9422.       -------------------------
  9423.  
  9424.             This bit is used in write modes (0, 2, 3).
  9425.  
  9426.             See Update Value Source Bit 0, immediately above.
  9427.             See {6.06.02} Set/Reset Register.
  9428.  
  9429.  
  9430. <2>   Update Value Source Bit 2
  9431.       -------------------------
  9432.  
  9433.             This bit is used in write modes (0, 2, 3).
  9434.  
  9435.             See Update Value Source Bit 0, immediately above.
  9436.             See {6.06.02} Set/Reset Register.
  9437.  
  9438.  
  9439. <3>   Update Value Source Bit 3
  9440.       -------------------------
  9441.  
  9442.             This bit is used in write modes (0, 2, 3).
  9443.  
  9444.             See Update Value Source Bit 0, immediately above.
  9445.             See {6.06.02} Set/Reset Register.
  9446.  
  9447.  
  9448. <4>   Update Value Source Bit 4
  9449.       -------------------------
  9450.  
  9451.             This bit is used in write modes (0, 2, 3).
  9452.  
  9453.             See Update Value Source Bit 0, immediately above.
  9454.             See {6.06.02} Set/Reset Register.
  9455.  
  9456.  
  9457. <5>   Update Value Source Bit 5
  9458.       -------------------------
  9459.  
  9460.             This bit is used in write modes (0, 2, 3).
  9461.  
  9462.             See Update Value Source Bit 0, immediately above.
  9463.             See {6.06.02} Set/Reset Register.
  9464.  
  9465.  
  9466. <6>   Update Value Source Bit 6
  9467.       -------------------------
  9468.  
  9469.             This bit is used in write modes (0, 2, 3).
  9470.  
  9471.             See Update Value Source Bit 0, immediately above.
  9472.             See {6.06.02} Set/Reset Register.
  9473.  
  9474.  
  9475. <7>   Update Value Source Bit 7
  9476.       -------------------------
  9477.  
  9478.             This bit is used in write modes (0, 2, 3).
  9479.  
  9480.             See Update Value Source Bit 0, immediately above.
  9481.             See {6.06.02} Set/Reset Register.
  9482.  
  9483.  
  9484.  
  9485.  
  9486. 6.07  Register specifications: Attribute Controller
  9487. ====  =============================================
  9488.  
  9489.  
  9490. 6.07.01  Attribute Address Register       { 3c0h/I/W  3c0h/R  ---  R/W }
  9491. =======  ===================================================================
  9492.  
  9493.  
  9494. Cross reference with {6.09.01} Miscellaneous Output Register.
  9495. Cross reference with {6.09.04} Input Status Register One.
  9496. Cross reference with {6.10.10} Attribute State Read Back Register.
  9497. Cross reference with {6.10.11} Attribute Index Read Back Register.
  9498.  
  9499.  
  9500. <4..0>   Attribute Address
  9501.          -----------------
  9502.  
  9503.          The attribute controller address register defines the index number of
  9504.          the register in the internal register array.  All reads and writes to
  9505.          the attribute controller are made to this selected register.
  9506.  
  9507.          Port 3c0h is used for writes to both the Attribute Address Register,
  9508.          and to the selected register array index.  Port 3c0h is also used to
  9509.          read the Attribute Address Register.  The selected internal register
  9510.          index can always be read using port 3c1h.
  9511.  
  9512.          In this scheme, port 3c0h is used for writing the index value for the
  9513.          internal register access control, and also for writing the value into
  9514.          the selected register.  Obviously there must be a means for resolving
  9515.          this ambiguity of write access.
  9516.  
  9517.          There is an internal state which chooses whether to write the index
  9518.          value, or the register being indexed.  This state can be reset with
  9519.          a read to port 3?ah {where ? represents either hex 'b' or hex 'd'},
  9520.          so that the next write is to the Attribute Address Register rather
  9521.          than to an indexed internal register.
  9522.  
  9523.          See {6.09.01} Miscellaneous Output Register.
  9524.          See {6.09.04} Input Status Register One.
  9525.  
  9526.          Having written the Attribute Address (that is, the register index),
  9527.          successive writes are to the indexed register, then to the value of
  9528.          the index, and so on, alternately.  This is very useful when a word
  9529.          is written to port 3c0h, since the first byte controls the index of
  9530.          the register, which is then written into by the second byte.
  9531.  
  9532.          The internal register index value can be obtained, as can the state
  9533.          which determines index access or register access for write purposes.
  9534.  
  9535.          See {6.10.10} Attribute State Read Back Register.
  9536.          See {6.10.11} Attribute Index Read Back Register.
  9537.  
  9538.          Note that no official documentation describes the existance of this
  9539.          decode of port 3c1h for such write purposes.  However, the hardware
  9540.          does respond correctly in this manner.  This is a standard feature.
  9541.  
  9542.  
  9543. <5>      Palette Control
  9544.          ---------------
  9545.  
  9546.          <=0>  Disable the generation of a video signal, permitting processor
  9547.                access to the attribute controller colour registers.  Note the
  9548.                display will become unstable, should this option be set whilst
  9549.                the active image is being generated.  For this reason vertical
  9550.                retrace should be active for the duration of this setting.
  9551.  
  9552.          <=1>  Enable video signal generation and prevent processor access to
  9553.                the attribute controller colour registers.
  9554.  
  9555.  
  9556. <7..6>   Reserved.  Always <=00>.
  9557.          ------------------------
  9558.  
  9559.  
  9560.  
  9561.  
  9562. 6.07.02  Palette Register 00              { 3c0h/I/W  3c1h/R  00h  R/W }
  9563. =======  ===================================================================
  9564.  
  9565.  
  9566. Cross reference with {6.06.07} Graphics Mode Register.
  9567. Cross reference with {6.07.03} Palette Register 01.
  9568. Cross reference with {6.07.04} Palette Register 02.
  9569. Cross reference with {6.07.05} Palette Register 03.
  9570. Cross reference with {6.07.06} Palette Register 04.
  9571. Cross reference with {6.07.07} Palette Register 05.
  9572. Cross reference with {6.07.08} Palette Register 06.
  9573. Cross reference with {6.07.09} Palette Register 07.
  9574. Cross reference with {6.07.10} Palette Register 08.
  9575. Cross reference with {6.07.11} Palette Register 09.
  9576. Cross reference with {6.07.12} Palette Register 10.
  9577. Cross reference with {6.07.13} Palette Register 11.
  9578. Cross reference with {6.07.14} Palette Register 12.
  9579. Cross reference with {6.07.15} Palette Register 13.
  9580. Cross reference with {6.07.16} Palette Register 14.
  9581. Cross reference with {6.07.17} Palette Register 15.
  9582. Cross reference with {6.07.18} Attribute Mode Control Register.
  9583. Cross reference with {6.07.20} Colour Plane Enable Register.
  9584. Cross reference with {6.07.22} Colour Select Register.
  9585. Cross reference with {6.08.01} DAC Pixel Mask Register.
  9586. Cross reference with {6.08.05} DAC Data Register.
  9587.  
  9588.  
  9589. <5..0>   Colour Value
  9590.          ------------
  9591.  
  9592.          This binary field expresses the value of an index into the DAC colour
  9593.          table.  {DAC is an acronym for Digital to Analogue Converter.}  A DAC
  9594.          converts eight bit digital colour information to analogue red, green,
  9595.          blue information from which all required colours can be mixed.  There
  9596.          is a great deal of context surrounding colour generation, which needs
  9597.          to be understood before the palette operation can become clear.
  9598.  
  9599.          The manner in which pixel colour is converted into display colour is
  9600.          actually non-trivial, offering powerful control facilities which are
  9601.          suitable for high speed animation.  We now describe all the features
  9602.          for colour control of an image working forewards from the pixel data
  9603.          and backwards from the displayed colours.
  9604.  
  9605.          The size of a pixel in bits determines the range of colours which can
  9606.          be generated within any displayed image.  However, the actual colours
  9607.          displayed can be composed from a very wide range of possible colours.
  9608.  
  9609.          To see how this can be, we look at the DACs which generate colour out
  9610.          to the display unit.  Each DAC accepts 8 bits of digital code thereby
  9611.          producing 8 bits of analogue signal into one of the three colour guns
  9612.          in the display tube.  So all combinations of three 8 bit colours will
  9613.          give a colour spectrum of 24 bits resolution. This gives a full range
  9614.          of 16_777_216 colours in total.
  9615.  
  9616.          The three DAC units accept 8 bit digital colour code from a specially
  9617.          designed memory unit, which stores for each of 256 addresses, 24 bits
  9618.          of colour data.  Each 24 bit block contains three groups of eight bit
  9619.          colour data, associated respectively with the red green and blue DAC.
  9620.          The 256 addresses can be fully determined with an 8 bit digital code.
  9621.  
  9622.          The 256 colour memory unit is termed an external colour palette.  It
  9623.          is this palette which governs the true colours actually sent into the
  9624.          display unit.  Since the external colour palette converts 8 bit codes
  9625.          into displayed colours, it is clear that no display can use more than
  9626.          256 distinct colours.
  9627.  
  9628.          See {6.08.05} DAC Data Register.
  9629.  
  9630.          There is another colour palette memory unit, which provides for just
  9631.          16 separate addresses.  This colour palette is the internal palette,
  9632.          which is located within the VGA controller.  It is distinguished from
  9633.          the external colour palette by being termed simply the colour palette.
  9634.          It stores 6 bits of colour data for each of the 16 addresses.  Only 4
  9635.          bits of digital code are needed to completely represent 16 addresses.
  9636.  
  9637.          Display image memory is split into four separately accessible planes,
  9638.          each of which is associated with a shift register, which presents bit
  9639.          data to an output bit corresponding with the same plane.  In this way
  9640.          data from image memory is converted into a serial data stream so that
  9641.          parallel bits in the stream specify a colour to display.
  9642.  
  9643.          See {6.06.07} Graphics Mode Register.
  9644.  
  9645.          These parallel bits are used to index the colour palette, which gives
  9646.          the 4 bits of address needed to completely range over every entry the
  9647.          colour palette contains.  As a result of this, the colour palette can
  9648.          deliver a 6 bit code output.  This 6 bit code is combined with 2 bits
  9649.          from a special register to make the 8 bit code needed by the external
  9650.          colour palette to generate real colour signals into the display unit.
  9651.  
  9652.          See {6.07.22} Colour Select Register.
  9653.  
  9654.          Note that the number of displayed colours is now constrained to 4 bit
  9655.          colour specified by pixel representation, rather than the 8 bits used
  9656.          as input to the external colour palette.
  9657.  
  9658.          That is the overview.  In practise, things can be more involved.
  9659.  
  9660.          In multiplane 16 colour mode, the situation is altered slightly by
  9661.          virtue of there being a choice of formation of the 8 bit code sent
  9662.          into the external colour palette.  The shift register outputs sent
  9663.          to the internal colour palette can be individually inhibited.  The
  9664.          effect of this is to reduce the number of displayed colours whilst
  9665.          increasing the quantity of image information available.  Therefore
  9666.          each of the four image memory planes, can be individually selected
  9667.          for display.  This display will be monochrome, but 4 images can be
  9668.          defined, maintained and rapidly switched between.
  9669.  
  9670.          See {6.07.20} Colour Plane Enable Register.
  9671.  
  9672.          We will assume for the moment that all 4 colour bits are operational
  9673.          so the display will be in 16 colours. There are two separate methods
  9674.          for determining how the pixel data becomes display colour.
  9675.  
  9676.          The first method mixes just 2 additional bits with the 6 bits output
  9677.          from the colour palette.  This provides a three way control for each
  9678.          displayed colour.  The two additional bits provide instant selection
  9679.          between 4 distinct colour maps, so by modifying these 2 bits, colour
  9680.          modification of the entire image will instantly take place.  Also it
  9681.          is possible to change the contents of the colour palette so that the
  9682.          colours generated change.  External colour palette data changes will
  9683.          also alter the displayed image colour at any time but the larger the
  9684.          palette, the longer it takes to modify.
  9685.  
  9686.          See {6.07.18} Attribute Mode Control Register.
  9687.          See {6.07.22} Colour Select Register.
  9688.  
  9689.          The second code formation method mixes 4 additional bits with the
  9690.          lowest 4 bits from the colour palette output.  This provides more
  9691.          capability to instantly change the colour mapping between upto 16
  9692.          separate colour assignments, each of a full 16 colours.
  9693.  
  9694.          See {6.07.18} Attribute Mode Control Register.
  9695.          See {6.07.22} Colour Select Register.
  9696.  
  9697.          When the display is generated in 256 colour packed pixel mode the
  9698.          shift register outputs become completely divorced from notions of
  9699.          image plane association.  Instead, the colour palette is ignored,
  9700.          with the shift register outputs driving the 8 bit external colour
  9701.          palette inputs directly.  In this case, only by changing the data
  9702.          held in the external colour palette can the display colour change
  9703.          be effected.  However, there is potential to reduce the number of
  9704.          displayed colours, which results in greater ability to change the
  9705.          actual colour set displayed.  This happens by means of inhibition
  9706.          of some of the 8 bits input to the external colour palette.  When
  9707.          only 7 bits are actually in use, changing the bit 7 for bit 8 can
  9708.          radically alter the colour display.  If more bits are kept out of
  9709.          immediate use, the greater the potential for rapid changes in the
  9710.          display colour set.
  9711.  
  9712.          See {6.08.01} DAC Pixel Mask Register.
  9713.  
  9714.  
  9715. <7..6>   Reserved.  Always <=00>.
  9716.          ------------------------
  9717.  
  9718.  
  9719.  
  9720.  
  9721.          Schematic Data Flow From Shift Register Outputs to Display Colours
  9722.          ==================================================================
  9723.  
  9724.          Scheme A:  Colour Select Register provides 2 additional bits.
  9725.          =============================================================
  9726.  
  9727.          See {6.07.22} Colour Select Register.
  9728.  
  9729.  
  9730.  
  9731.  
  9732.          Colour Select
  9733.          ===========--
  9734.          <----.32-->
  9735.                ||
  9736.                ||
  9737.                ||
  9738.                ||            Multiplane
  9739.                ||            Shift Register
  9740.                ||            Colour Outputs
  9741.                ||            ===========---
  9742.                ||            <----.3210>
  9743.                ||                  ||||
  9744.                ||                  ||||
  9745.                ||                  ||||
  9746.                ||                  ||||
  9747.                ||                  ||||          [Internal]
  9748.                ||                  ||||          Colour
  9749.                ||                  ||||          Palette
  9750.                ||                  ||||          ===========
  9751.                ||                  ||||     <0>  | 00
  9752.                ||                  ||||........>.| 01
  9753.                ||                  |||.......>...| 02
  9754.                ||                  ||..........>.|  .
  9755.                ||                  |.........>...|  .
  9756.                ||                           <3>  |  .
  9757.                ||                                |  .
  9758.                ||                                | 13
  9759.                ||                                | 14
  9760.                ||                                | 15
  9761.                ||                                ===========
  9762.                ||                                <--54.3210>
  9763.                ||                                   || ||||
  9764.                ||                                   || ||||
  9765.                ||                                   || ||||
  9766.                ||...................................|| ||||
  9767.                |...................................||| ||||
  9768.                                                   |||| ||||
  9769.                                                   |||| ||||
  9770.                                                   |||| ||||
  9771.                                                   |||| ||||
  9772.          DAC Pixel Mask                           |||| ||||
  9773.          ===========---                           |||| ||||
  9774.          <7654.3210>                              |||| ||||
  9775.           |||| ||||                               |||| ||||
  9776.           |||| ||||                               |||| ||||
  9777.           |||| ||||                               |||| ||||
  9778.           |||| ||||                               |||| ||||
  9779.           |||| ||||                             -------------
  9780.           |||| ||||.........................>...| mask bit0 |
  9781.           |||| |||........................>.....| mask bit1 |
  9782.           |||| ||...........................>...| mask bit2 |
  9783.           |||| |..........................>.....| mask bit3 |
  9784.           ||||..............................>...| mask bit4 |
  9785.           |||.............................>.....| mask bit5 |
  9786.           ||................................>...| mask bit6 |
  9787.           |...............................>.....| mask bit7 |
  9788.                                                 -------------
  9789.                                                   |||| ||||
  9790.                                                   |||| ||||
  9791.                                                   |||| ||||
  9792.                                                   |||| ||||
  9793.                                                 [256 Colours]
  9794.                                                   |||| ||||
  9795.                                                   |||| ||||
  9796.                                                   |||| ||||
  9797.                                                   |||| ||||
  9798.          .........................................|||| ||||
  9799.          |.........................................||| ||||
  9800.          ||.........................................|| ||||
  9801.          |||.........................................| ||||
  9802.          |||| .........................................||||
  9803.          |||| |.........................................|||
  9804.          |||| ||.........................................||
  9805.          |||| |||.........................................|
  9806.          |||| ||||
  9807.          |||| ||||
  9808.          |||| ||||
  9809.          |||| ||||
  9810.          |||| ||||           External Colour Palette
  9811.          |||| ||||           RED        GREEN      BLUE
  9812.          |||| ||||      <0>  =================================
  9813.          |||| ||||.........>.| 000      | 000      | 000
  9814.          |||| |||........>...| 001      | 001      | 001
  9815.          |||| ||...........>.| 002      | 002      | 002
  9816.          |||| |..........>...|  .       |  .       |  .
  9817.          ||||..............>.|  .       |  .       |  .
  9818.          |||.............>...|  .       |  .       |  .
  9819.          ||................>.|  .       |  .       |  .
  9820.          |...............>...| 253      | 253      | 253
  9821.                         <7>  | 254      | 254      | 254
  9822.                              | 255      | 255      | 255
  9823.                              =================================
  9824.                              <7654.3210><7654.3210><7654.3210>
  9825.                               |||| ||||  |||| ||||  |||| ||||
  9826.                               |||| ||||  |||| ||||  |||| ||||
  9827.                               |||| ||||  |||| ||||  |||| ||||
  9828.                               |||| ||||  |||| ||||  |||| ||||
  9829.                               |||| ||||  |||| ||||  ==========
  9830.                               |||| ||||  |||| ||||  BLUE DAC |
  9831.                               |||| ||||  |||| ||||  inputs   |..>......
  9832.                               |||| ||||  |||| ||||  ==========        |
  9833.                               |||| ||||  ===========                  |
  9834.                               |||| ||||  GREEN DAC |                  |
  9835.                               |||| ||||  inputs    |..>.........>.... |
  9836.                               |||| ||||  ===========                | |
  9837.                               =========                             | |
  9838.                               RED DAC |                             | |
  9839.                               inputs  |..>............>.........>.. | |
  9840.                               =========                           | | |
  9841.                                                                   | | |
  9842.                                                                   | | |
  9843.                                                                   | | |
  9844.                                                                   | | |
  9845.                                                                  ========
  9846.                                                                  Analogue
  9847.                                                                   Output
  9848.                                                                  ========
  9849.  
  9850.  
  9851.  
  9852.  
  9853.          See {6.06.07} Graphics Mode Register.
  9854.          See {6.07.22} Colour Select Register.
  9855.          See {6.08.01} DAC Pixel Mask Register.
  9856.  
  9857.  
  9858.  
  9859.  
  9860.          -------------------------------------------------------------------
  9861.  
  9862.  
  9863.  
  9864.  
  9865.          Schematic Data Flow From Shift Register Outputs to Display Colours
  9866.          ==================================================================
  9867.  
  9868.          Scheme B:  Colour Select Register provides 4 additional bits.
  9869.          =============================================================
  9870.  
  9871.          See {6.07.22} Colour Select Register.
  9872.  
  9873.  
  9874.  
  9875.  
  9876.          Colour Select
  9877.          ===========--
  9878.          <----.3210>
  9879.                ||||
  9880.                ||||
  9881.                ||||
  9882.                ||||          Multiplane
  9883.                ||||          Shift Register
  9884.                ||||          Colour Outputs
  9885.                ||||          ===========---
  9886.                ||||          <----.3210>
  9887.                ||||                ||||
  9888.                ||||                ||||
  9889.                ||||                ||||
  9890.                ||||                ||||
  9891.                ||||                ||||          [Internal]
  9892.                ||||                ||||          Colour
  9893.                ||||                ||||          Palette
  9894.                ||||                ||||          ===========
  9895.                ||||                ||||     <0>  | 00
  9896.                ||||                ||||........>.| 01
  9897.                ||||                |||.......>...| 02
  9898.                ||||                ||..........>.|  .
  9899.                ||||                |.........>...|  .
  9900.                ||||                         <3>  |  .
  9901.                ||||                              |  .
  9902.                ||||                              | 13
  9903.                ||||                              | 14
  9904.                ||||                              | 15
  9905.                ||||                              ===========
  9906.                ||||                              <----.3210>
  9907.                ||||                                    ||||
  9908.                ||||                                    ||||
  9909.                ||||................................... ||||
  9910.                |||...................................| ||||
  9911.                ||...................................|| ||||
  9912.                |...................................||| ||||
  9913.                                                   |||| ||||
  9914.                                                   |||| ||||
  9915.                                                   |||| ||||
  9916.                                                   |||| ||||
  9917.          DAC Pixel Mask                           |||| ||||
  9918.          ===========---                           |||| ||||
  9919.          <7654.3210>                              |||| ||||
  9920.           |||| ||||                               |||| ||||
  9921.           |||| ||||                               |||| ||||
  9922.           |||| ||||                               |||| ||||
  9923.           |||| ||||                               |||| ||||
  9924.           |||| ||||                             -------------
  9925.           |||| ||||.........................>...| mask bit0 |
  9926.           |||| |||........................>.....| mask bit1 |
  9927.           |||| ||...........................>...| mask bit2 |
  9928.           |||| |..........................>.....| mask bit3 |
  9929.           ||||..............................>...| mask bit4 |
  9930.           |||.............................>.....| mask bit5 |
  9931.           ||................................>...| mask bit6 |
  9932.           |...............................>.....| mask bit7 |
  9933.                                                 -------------
  9934.                                                   |||| ||||
  9935.                                                   |||| ||||
  9936.                                                   |||| ||||
  9937.                                                   |||| ||||
  9938.                                                 [256 Colours]
  9939.                                                   |||| ||||
  9940.                                                   |||| ||||
  9941.                                                   |||| ||||
  9942.                                                   |||| ||||
  9943.          .........................................|||| ||||
  9944.          |.........................................||| ||||
  9945.          ||.........................................|| ||||
  9946.          |||.........................................| ||||
  9947.          |||| .........................................||||
  9948.          |||| |.........................................|||
  9949.          |||| ||.........................................||
  9950.          |||| |||.........................................|
  9951.          |||| ||||
  9952.          |||| ||||
  9953.          |||| ||||
  9954.          |||| ||||
  9955.          |||| ||||           External Colour Palette
  9956.          |||| ||||           RED        GREEN      BLUE
  9957.          |||| ||||      <0>  =================================
  9958.          |||| ||||.........>.| 000      | 000      | 000
  9959.          |||| |||........>...| 001      | 001      | 001
  9960.          |||| ||...........>.| 002      | 002      | 002
  9961.          |||| |..........>...|  .       |  .       |  .
  9962.          ||||..............>.|  .       |  .       |  .
  9963.          |||.............>...|  .       |  .       |  .
  9964.          ||................>.|  .       |  .       |  .
  9965.          |...............>...| 253      | 253      | 253
  9966.                         <7>  | 254      | 254      | 254
  9967.                              | 255      | 255      | 255
  9968.                              =================================
  9969.                              <7654.3210><7654.3210><7654.3210>
  9970.                               |||| ||||  |||| ||||  |||| ||||
  9971.                               |||| ||||  |||| ||||  |||| ||||
  9972.                               |||| ||||  |||| ||||  |||| ||||
  9973.                               |||| ||||  |||| ||||  |||| ||||
  9974.                               |||| ||||  |||| ||||  ==========
  9975.                               |||| ||||  |||| ||||  BLUE DAC |
  9976.                               |||| ||||  |||| ||||  inputs   |..>......
  9977.                               |||| ||||  |||| ||||  ==========        |
  9978.                               |||| ||||  ===========                  |
  9979.                               |||| ||||  GREEN DAC |                  |
  9980.                               |||| ||||  inputs    |..>.........>.... |
  9981.                               |||| ||||  ===========                | |
  9982.                               =========                             | |
  9983.                               RED DAC |                             | |
  9984.                               inputs  |..>............>.........>.. | |
  9985.                               =========                           | | |
  9986.                                                                   | | |
  9987.                                                                   | | |
  9988.                                                                   | | |
  9989.                                                                   | | |
  9990.                                                                  ========
  9991.                                                                  Analogue
  9992.                                                                   Output
  9993.                                                                  ========
  9994.  
  9995.  
  9996.  
  9997.  
  9998.          See {6.06.07} Graphics Mode Register.
  9999.          See {6.07.22} Colour Select Register.
  10000.          See {6.08.01} DAC Pixel Mask Register.
  10001.  
  10002.  
  10003.  
  10004.  
  10005.          -------------------------------------------------------------------
  10006.  
  10007.  
  10008.  
  10009.  
  10010.          Schematic Data Flow From Shift Register Outputs to Display Colours
  10011.          ==================================================================
  10012.  
  10013.          Scheme C:  Packed Pixel 256 Colour Format
  10014.          =========================================
  10015.  
  10016.  
  10017.  
  10018.  
  10019.                                                  Packed Pixel
  10020.                                                  Shift Register
  10021.                                                  Assembly Latch
  10022.                                                  Colour Outputs
  10023.                                                  ===========
  10024.                                                  <7654.3210>
  10025.                                                   |||| ||||
  10026.                                                   |||| ||||
  10027.                                                   |||| ||||
  10028.                                                   |||| ||||
  10029.          DAC Pixel Mask                           |||| ||||
  10030.          ===========---                           |||| ||||
  10031.          <7654.3210>                              |||| ||||
  10032.           |||| ||||                               |||| ||||
  10033.           |||| ||||                               |||| ||||
  10034.           |||| ||||                               |||| ||||
  10035.           |||| ||||                               |||| ||||
  10036.           |||| ||||                             -------------
  10037.           |||| ||||.........................>...| mask bit0 |
  10038.           |||| |||........................>.....| mask bit1 |
  10039.           |||| ||...........................>...| mask bit2 |
  10040.           |||| |..........................>.....| mask bit3 |
  10041.           ||||..............................>...| mask bit4 |
  10042.           |||.............................>.....| mask bit5 |
  10043.           ||................................>...| mask bit6 |
  10044.           |...............................>.....| mask bit7 |
  10045.                                                 -------------
  10046.                                                   |||| ||||
  10047.                                                   |||| ||||
  10048.                                                   |||| ||||
  10049.                                                   |||| ||||
  10050.                                                 [256 Colours]
  10051.                                                   |||| ||||
  10052.                                                   |||| ||||
  10053.                                                   |||| ||||
  10054.                                                   |||| ||||
  10055.          .........................................|||| ||||
  10056.          |.........................................||| ||||
  10057.          ||.........................................|| ||||
  10058.          |||.........................................| ||||
  10059.          |||| .........................................||||
  10060.          |||| |.........................................|||
  10061.          |||| ||.........................................||
  10062.          |||| |||.........................................|
  10063.          |||| ||||
  10064.          |||| ||||
  10065.          |||| ||||
  10066.          |||| ||||
  10067.          |||| ||||           External Colour Palette
  10068.          |||| ||||           RED        GREEN      BLUE
  10069.          |||| ||||      <0>  =================================
  10070.          |||| ||||.........>.| 000      | 000      | 000
  10071.          |||| |||........>...| 001      | 001      | 001
  10072.          |||| ||...........>.| 002      | 002      | 002
  10073.          |||| |..........>...|  .       |  .       |  .
  10074.          ||||..............>.|  .       |  .       |  .
  10075.          |||.............>...|  .       |  .       |  .
  10076.          ||................>.|  .       |  .       |  .
  10077.          |...............>...| 253      | 253      | 253
  10078.                         <7>  | 254      | 254      | 254
  10079.                              | 255      | 255      | 255
  10080.                              =================================
  10081.                              <7654.3210><7654.3210><7654.3210>
  10082.                               |||| ||||  |||| ||||  |||| ||||
  10083.                               |||| ||||  |||| ||||  |||| ||||
  10084.                               |||| ||||  |||| ||||  |||| ||||
  10085.                               |||| ||||  |||| ||||  |||| ||||
  10086.                               |||| ||||  |||| ||||  ==========
  10087.                               |||| ||||  |||| ||||  BLUE DAC |
  10088.                               |||| ||||  |||| ||||  inputs   |..>......
  10089.                               |||| ||||  |||| ||||  ==========        |
  10090.                               |||| ||||  ===========                  |
  10091.                               |||| ||||  GREEN DAC |                  |
  10092.                               |||| ||||  inputs    |..>.........>.... |
  10093.                               |||| ||||  ===========                | |
  10094.                               =========                             | |
  10095.                               RED DAC |                             | |
  10096.                               inputs  |..>............>.........>.. | |
  10097.                               =========                           | | |
  10098.                                                                   | | |
  10099.                                                                   | | |
  10100.                                                                   | | |
  10101.                                                                   | | |
  10102.                                                                  ========
  10103.                                                                  Analogue
  10104.                                                                   Output
  10105.                                                                  ========
  10106.  
  10107.  
  10108.  
  10109.  
  10110.          See {6.06.07} Graphics Mode Register.
  10111.          See {6.08.01} DAC Pixel Mask Register.
  10112.  
  10113.  
  10114.  
  10115.  
  10116.          -------------------------------------------------------------------
  10117.  
  10118.  
  10119.  
  10120.  
  10121. 6.07.03  Palette Register 01              { 3c0h/I/W  3c1h/R  01h  R/W }
  10122. =======  ===================================================================
  10123.  
  10124.  
  10125. Cross reference with {6.07.02} Palette Register 00.
  10126.  
  10127.  
  10128.          See {6.07.02} Palette Register 00.
  10129.  
  10130.  
  10131.  
  10132.  
  10133. 6.07.04  Palette Register 02              { 3c0h/I/W  3c1h/R  02h  R/W }
  10134. =======  ===================================================================
  10135.  
  10136.  
  10137. Cross reference with {6.07.02} Palette Register 00.
  10138.  
  10139.  
  10140.          See {6.07.02} Palette Register 00.
  10141.  
  10142.  
  10143.  
  10144.  
  10145. 6.07.05  Palette Register 03              { 3c0h/I/W  3c1h/R  03h  R/W }
  10146. =======  ===================================================================
  10147.  
  10148.  
  10149. Cross reference with {6.07.02} Palette Register 00.
  10150.  
  10151.  
  10152.          See {6.07.02} Palette Register 00.
  10153.  
  10154.  
  10155.  
  10156.  
  10157. 6.07.06  Palette Register 04              { 3c0h/I/W  3c1h/R  04h  R/W }
  10158. =======  ===================================================================
  10159.  
  10160.  
  10161. Cross reference with {6.07.02} Palette Register 00.
  10162.  
  10163.  
  10164.          See {6.07.02} Palette Register 00.
  10165.  
  10166.  
  10167.  
  10168.  
  10169. 6.07.07  Palette Register 05              { 3c0h/I/W  3c1h/R  05h  R/W }
  10170. =======  ===================================================================
  10171.  
  10172.  
  10173. Cross reference with {6.07.02} Palette Register 00.
  10174.  
  10175.  
  10176.          See {6.07.02} Palette Register 00.
  10177.  
  10178.  
  10179.  
  10180.  
  10181. 6.07.08  Palette Register 06              { 3c0h/I/W  3c1h/R  06h  R/W }
  10182. =======  ===================================================================
  10183.  
  10184.  
  10185. Cross reference with {6.07.02} Palette Register 00.
  10186.  
  10187.  
  10188.          See {6.07.02} Palette Register 00.
  10189.  
  10190.  
  10191.  
  10192.  
  10193. 6.07.09  Palette Register 07              { 3c0h/I/W  3c1h/R  07h  R/W }
  10194. =======  ===================================================================
  10195.  
  10196.  
  10197. Cross reference with {6.07.02} Palette Register 00.
  10198.  
  10199.  
  10200.          See {6.07.02} Palette Register 00.
  10201.  
  10202.  
  10203.  
  10204.  
  10205. 6.07.10  Palette Register 08              { 3c0h/I/W  3c1h/R  08h  R/W }
  10206. =======  ===================================================================
  10207.  
  10208.  
  10209. Cross reference with {6.07.02} Palette Register 00.
  10210.  
  10211.  
  10212.          See {6.07.02} Palette Register 00.
  10213.  
  10214.  
  10215.  
  10216.  
  10217. 6.07.11  Palette Register 09              { 3c0h/I/W  3c1h/R  09h  R/W }
  10218. =======  ===================================================================
  10219.  
  10220.  
  10221. Cross reference with {6.07.02} Palette Register 00.
  10222.  
  10223.  
  10224.          See {6.07.02} Palette Register 00.
  10225.  
  10226.  
  10227.  
  10228.  
  10229. 6.07.12  Palette Register 10              { 3c0h/I/W  3c1h/R  0ah  R/W }
  10230. =======  ===================================================================
  10231.  
  10232.  
  10233. Cross reference with {6.07.02} Palette Register 00.
  10234.  
  10235.  
  10236.          See {6.07.02} Palette Register 00.
  10237.  
  10238.  
  10239.  
  10240.  
  10241. 6.07.13  Palette Register 11              { 3c0h/I/W  3c1h/R  0bh  R/W }
  10242. =======  ===================================================================
  10243.  
  10244.  
  10245. Cross reference with {6.07.02} Palette Register 00.
  10246.  
  10247.  
  10248.          See {6.07.02} Palette Register 00.
  10249.  
  10250.  
  10251.  
  10252.  
  10253. 6.07.14  Palette Register 12              { 3c0h/I/W  3c1h/R  0ch  R/W }
  10254. =======  ===================================================================
  10255.  
  10256.  
  10257. Cross reference with {6.07.02} Palette Register 00.
  10258.  
  10259.  
  10260.          See {6.07.02} Palette Register 00.
  10261.  
  10262.  
  10263.  
  10264.  
  10265. 6.07.15  Palette Register 13              { 3c0h/I/W  3c1h/R  0dh  R/W }
  10266. =======  ===================================================================
  10267.  
  10268.  
  10269. Cross reference with {6.07.02} Palette Register 00.
  10270.  
  10271.  
  10272.          See {6.07.02} Palette Register 00.
  10273.  
  10274.  
  10275.  
  10276.  
  10277. 6.07.16  Palette Register 14              { 3c0h/I/W  3c1h/R  0eh  R/W }
  10278. =======  ===================================================================
  10279.  
  10280.  
  10281. Cross reference with {6.07.02} Palette Register 00.
  10282.  
  10283.  
  10284.          See {6.07.02} Palette Register 00.
  10285.  
  10286.  
  10287.  
  10288.  
  10289. 6.07.17  Palette Register 15              { 3c0h/I/W  3c1h/R  0fh  R/W }
  10290. =======  ===================================================================
  10291.  
  10292.  
  10293. Cross reference with {6.07.02} Palette Register 00.
  10294.  
  10295.  
  10296.          See {6.07.02} Palette Register 00.
  10297.  
  10298.  
  10299.  
  10300.  
  10301. 6.07.18  Attribute Mode Control Register  { 3c0h/I/W  3c1h/R  10h  R/W }
  10302. =======  ==================================================================
  10303.  
  10304.  
  10305. Cross reference with {6.04.03} Clocking Mode Register.
  10306. Cross reference with {6.04.05} Character Map Select Register.
  10307. Cross reference with {6.05.10} Preset Row Scan Register.
  10308. Cross reference with {6.05.14} Start Address High Register.
  10309. Cross reference with {6.05.15} Start Address Low Register.
  10310. Cross reference with {6.05.22} Underline Location Register.
  10311. Cross reference with {6.05.26} Line Compare Register.
  10312. Cross reference with {6.06.07} Graphics Mode Register.
  10313. Cross reference with {6.06.08} Miscellaneous Register.
  10314. Cross reference with {6.07.02} Palette Register 00.
  10315. Cross reference with {6.07.21} Horizontal PEL Panning Register.
  10316. Cross reference with {6.07.22} Colour Select Register.
  10317. Cross reference with {6.09.01} Miscellaneous Output Register.
  10318. Cross reference with {6.10.04} Mode Control Register 2.
  10319.  
  10320.  
  10321. <0>      Display Generation Mode
  10322.          -----------------------
  10323.  
  10324.          See {6.06.08} Miscellaneous Register.
  10325.  
  10326.          <=0>  Text Mode
  10327.                ---------
  10328.  
  10329.                Hardware character generation is invoked for display generation.
  10330.                There is no capability to generate graphics in the usual manner
  10331.                but a software technique can be used, giving a limited graphics
  10332.                capability.  The technique depends upon assigning characters to
  10333.                a display area, then re-writing the character fonts assigned to
  10334.                those characters.  In this manner a limited graphics capability
  10335.                can be supported within a relatively small area of the display.
  10336.  
  10337.                The text mode display stores character codes in memory plane 0,
  10338.                with their associated attribute bytes in plane 1.  The hardware
  10339.                expects character font data to be stored at specified addresses
  10340.                in plane 2.  Memory plane 3 is unused in this display mode.
  10341.  
  10342.                The main characteristics of this mode are high speed operation,
  10343.                with very low associated host processor overhead.  A number of
  10344.                separate pages of text can be maintained, and switched between
  10345.                at high speed.  This is the ideal mode to employ where no true
  10346.                graphics capability is required, other than that provided with
  10347.                the specially reserved graphics drawing characters.  Two fonts
  10348.                can be used within one display screen, each font consisting of
  10349.                256 characters in total.  User defined fonts can be used, when
  10350.                occasion demands.
  10351.  
  10352.                See {6.04.03} Clocking Mode Register.
  10353.                See {6.04.05} Character Map Select Register.
  10354.                See {6.05.22} Underline Location Register.
  10355.  
  10356.          <=1>  Graphics Mode
  10357.                -------------
  10358.  
  10359.                The display will be generated with reference to an image memory,
  10360.                organised as a collection of pixel data.  There is no capability
  10361.                for the support of hardware text generation, but software can be
  10362.                written to support multiple character fonts and any size of font
  10363.                necessary for the application.
  10364.  
  10365.                Display image memory organisation is dependant upon the range of
  10366.                colours available for definition of a pixel.  The principle mode
  10367.                options include:
  10368.  
  10369.  
  10370.                    1.    Multiplane 16 Colour
  10371.                          --------------------
  10372.  
  10373.                          The display memory is arranged as four parallel planes
  10374.                          each of which holds data for eight pixels by splitting
  10375.                          four colour bits across four planes.  Each plane gives
  10376.                          access to a single byte when presented with an address
  10377.                          so with parallel address spaces, each access returns 4
  10378.                          bytes.  The 32 bits specify 4 bits of colour data, for
  10379.                          each of eight pixels.
  10380.  
  10381.                          See {6.06.07} Graphics Mode Register.
  10382.  
  10383.                    2.    Packed pixel Monochrome
  10384.                          -----------------------
  10385.  
  10386.                          The display memory is arranged as a linear array which
  10387.                          is addressed in a manner corresponding directly to the
  10388.                          screen pixel display.  One bit per pixel specifies any
  10389.                          colour required, from a large available palette.  This
  10390.                          choice is normally restricted by making black the fore
  10391.                          ground colour.  The display image is easily managed as
  10392.                          it is of small size.  A large number of distinct pages
  10393.                          can be maintained and quickly switched for one another
  10394.                          which is very useful for hierarchical design systems.
  10395.  
  10396.                          See {6.06.07} Graphics Mode Register.
  10397.  
  10398.                    3.    Packed Pixel 4 Colour
  10399.                          ---------------------
  10400.  
  10401.                          This display mode requires double the amount of memory
  10402.                          compared with monochrome mode, but provides 4 colours,
  10403.                          which can be much more flexible in some applications.
  10404.  
  10405.                          Each pixel is represented by two neighbouring bits, so
  10406.                          four pixels are collected together in one byte.  There
  10407.                          are special hardware capabilities available, to decode
  10408.                          this special colour representation.
  10409.  
  10410.                          Since images are still very compact large displays can
  10411.                          be manipulated without great memory overhead; a number
  10412.                          of distinct pages can be held in memory and swapped at
  10413.                          high speed.
  10414.  
  10415.                          See {6.06.07} Graphics Mode Register.
  10416.  
  10417.                    4.    Packed Pixel 256 Colour
  10418.                          -----------------------
  10419.  
  10420.                          This display mode ensures the highest image resolution
  10421.                          and complexity.  As a result the display memory needed
  10422.                          is larger than with any other mode.  This can mean the
  10423.                          quantity of data accessed when changing an image is an
  10424.                          important determinant of processing speed.  A pixel is
  10425.                          represented by a single byte of data.  In this way, it
  10426.                          is the simplest mode, from the point of view of memory
  10427.                          organisation.
  10428.  
  10429.                          See {6.06.07} Graphics Mode Register.
  10430.  
  10431.  
  10432. <1>      Display Generation Mode
  10433.          -----------------------
  10434.  
  10435.          <=0>  Select colour display attribute definitions for supporting
  10436.                colour emulation mode.
  10437.  
  10438.          <=1>  Select monochrome display attribute definitions for supporting
  10439.                monochrome emulation mode.
  10440.  
  10441.          This selection governs the treatment of attribute byte decoding, in
  10442.          text mode.  Differences exist in expressive capability of attributes
  10443.          depending upon whether monochrome or colour emulation is active.
  10444.  
  10445.          To see these differences, consult the specification of the attribute
  10446.          byte under both emulation schemes.
  10447.  
  10448.          See {6.05.22} Underline Location Register.
  10449.  
  10450.  
  10451. <2>      Line Graphics Character Code Control
  10452.          ------------------------------------
  10453.  
  10454.          <=0>  When using 9 dot character clocks, this option specifies that
  10455.                the ninth dot will always be set to the background colour for
  10456.                character generation in text mode.  This setting implies that
  10457.                there are no special continuous line graphics characters used
  10458.                in the character font.
  10459.  
  10460.                See {6.04.03} Clocking Mode Register.
  10461.  
  10462.          <=1>  When using 9 dot character clocks, and a graphics character is
  10463.                to be generated in text mode with a code value between hex 'c0'
  10464.                and hex 'df' inclusive the ninth dot will be displayed exactly
  10465.                as was the eighth dot.  This provides for character fonts with
  10466.                the full eight pixels width, without any problems of merging.
  10467.  
  10468.                Where continuous line graphics are used, however, merging must
  10469.                occur selectively for all the graphics character codes.  These
  10470.                graphic codes are not always present in all character sets, so
  10471.                there must be a means to disable them selectively.
  10472.  
  10473.                See {6.04.03} Clocking Mode Register.
  10474.  
  10475.  
  10476. <3>      Text Mode Attribute Select
  10477.          --------------------------
  10478.  
  10479.          <=0>  The text mode attribute byte associated with each character for
  10480.                display defines bit <7> in one of two different ways: with this
  10481.                option selection, bit <7> specifies background intensity.  When
  10482.                the intensity bit is set a high background colour luminosity is
  10483.                displayed, drawing attention to the foreground text display.
  10484.  
  10485.                See {6.05.22} Underline Location Register.
  10486.  
  10487.          <=1>  The text mode attribute byte associated with each character for
  10488.                display defines bit <7> in one of two different ways: with this
  10489.                option selection, bit <7> specifies background blink.  When the
  10490.                blink bit is set, the background switches on and off, driven by
  10491.                the vertical retrace signal.  In this manner attention is drawn
  10492.                to the text display in the foreground.
  10493.  
  10494.                See {6.05.22} Underline Location Register.
  10495.  
  10496.  
  10497. <4>      Reserved.  Always <=0>.
  10498.          -----------------------
  10499.  
  10500.  
  10501. <5>      Split Screen Panning Control
  10502.          ----------------------------
  10503.  
  10504.          <=0>  Scroll both screens horizontally {this is panning} in the same
  10505.                manner, as defined by the various control registers.  This has
  10506.                utility only when a split screen display is operational.
  10507.  
  10508.          <=1>  Scroll only the upper screen {that is upper window} of a split
  10509.                screen display in the horizontal direction, leaving the screen
  10510.                in the lower position intact.  This only has significance when
  10511.                a split screen display creates an upper and lower window.
  10512.  
  10513.          See {6.05.10} Preset Row Scan Register.
  10514.          See {6.05.14} Start Address High Register.
  10515.          See {6.05.15} Start Address Low Register.
  10516.          See {6.05.26} Line Compare Register.
  10517.          See {6.07.21} Horizontal PEL Panning Register.
  10518.  
  10519.  
  10520. <6>      Shift Register 256 Colour Assembly Latch
  10521.          ----------------------------------------
  10522.  
  10523.          <=0>  The 4 bit shift register output bits are sent for translation
  10524.                into the internal 16 address colour palette, producing 6 bits
  10525.                of colour output.  These bits are increased to 8 bits through
  10526.                various options, and the resulting 8 bit code is presented to
  10527.                the external colour palette, which drives the display unit.
  10528.  
  10529.                See External Colour Palette Input Select, immediately below.
  10530.  
  10531.                This setting should be used for 2 colour, 4 colour, 16 colour
  10532.                displays, in either graphics mode or text mode.
  10533.  
  10534.                See {6.06.07} Graphics Mode Register.
  10535.                See {6.06.08} Miscellaneous Register.
  10536.  
  10537.          <=1>  The 4 bit shift register output bits do not go to the internal
  10538.                colour palette for translation.  Instead, using two successive
  10539.                dot clock periods 4 bits of shift register output are combined
  10540.                together to produce one 8 bit pixel colour value.  Every other
  10541.                dot clock produces a new 256 colour pixel which is sent direct
  10542.                to the external colour palette and thence the display unit.
  10543.  
  10544.                This setting should only ever be used to produce packed pixel
  10545.                displays supporting 256 colours.  There are implications for
  10546.                the dot clock frequency when this mode is employed.
  10547.  
  10548.                See {6.06.07} Graphics Mode Register.
  10549.  
  10550.                There are controls available to select dot clock frequency and
  10551.                dot clock division ratios.
  10552.  
  10553.                See {6.09.01} Miscellaneous Output Register.
  10554.                See {6.10.04} Mode Control Register 2.
  10555.  
  10556.  
  10557. <7>      External Colour Palette Input Select
  10558.          ------------------------------------
  10559.  
  10560.          <=0>  For all display modes other than 256 colour packed pixel mode,
  10561.                this option selects the source of bits <5..4> which are output
  10562.                to the external colour palette for driving the display unit.
  10563.  
  10564.                With this option, these bits are sourced from the internal
  10565.                colour palette output bits <5..4>.  In this case there are
  10566.                two bits provided by a register to make up these 6 bits to
  10567.                the 8 bits required to drive the external colour palette.
  10568.  
  10569.                See {6.07.22} Colour Select Register.
  10570.  
  10571.          <=1>  For all display modes other than 256 colour packed pixel mode,
  10572.                this option selects the source of bits <5..4> which are output
  10573.                to the external colour palette for driving the display unit.
  10574.  
  10575.                For this option setting, these bits are sourced from a special
  10576.                register provided for the purpose.  This register normally has
  10577.                responsibility for providing two additional bits to make the 8
  10578.                bit group needed for input to the external colour palette.  In
  10579.                this case, the register provides the original two bits with an
  10580.                extra two bits, making four in total.  Under this circumstance
  10581.                the internal colour palette output is restricted to four bits,
  10582.                instead of the usual six bits.  These four bits are the lowest
  10583.                significance bits.
  10584.  
  10585.                See {6.07.22} Colour Select Register.
  10586.  
  10587.          Note that the Shift Register 256 Colour Assembly Latch must be <=0>
  10588.          if this option is to have any effect.  See immediately above.
  10589.  
  10590.          See Shift Register 256 Colour Assembly Latch, immediately above.
  10591.          See {6.06.07} Graphics Mode Register.
  10592.  
  10593.  
  10594.  
  10595.  
  10596. 6.07.19  Overscan Colour Register         { 3c0h/I/W  3c1h/R  11h  R/W }
  10597. =======  ===================================================================
  10598.  
  10599.  
  10600. Cross reference with {6.05.02} Horizontal Total Register.
  10601. Cross reference with {6.05.03} Horizontal Display Enable End Register.
  10602. Cross reference with {6.05.04} Start Horizontal Blanking Register.
  10603. Cross reference with {6.05.05} End Horizontal Blanking Register.
  10604. Cross reference with {6.05.08} Vertical Total Register.
  10605. Cross reference with {6.05.20} Vertical Display Enable End Register.
  10606.  
  10607.  
  10608. <7..0>   Overscan Colour
  10609.          ---------------
  10610.  
  10611.          At times when the active image is not being produced, and yet there
  10612.          is no blanking in progress the external colour palette must produce
  10613.          some displayable colour.  The selection of this colour is performed
  10614.          by the binary field in this register.
  10615.  
  10616.          A discussion of horizontal image scan line generation is available.
  10617.          This is appropriate to border colour generation on the boundaries
  10618.          of each active image scan line.
  10619.  
  10620.          See {6.05.02} Horizontal Total Register.
  10621.          See {6.05.03} Horizontal Display Enable End Register.
  10622.          See {6.05.04} Start Horizontal Blanking Register.
  10623.          See {6.05.05} End Horizontal Blanking Register.
  10624.          See {6.05.20} Vertical Display Enable End Register.
  10625.  
  10626.          A discussion of vertical timing generation is available.  This is
  10627.          useful to appreciate border colour generation during non-active
  10628.          image scan line generation.
  10629.  
  10630.          See {6.05.08} Vertical Total Register.
  10631.  
  10632.  
  10633.  
  10634.  
  10635. 6.07.20  Colour Plane Enable Register     { 3c0h/I/W  3c1h/R  12h  R/W }
  10636. =======  ===============================================================
  10637.  
  10638.  
  10639. Cross reference with {6.06.07} Graphics Mode Register.
  10640. Cross reference with {6.07.02} Palette Register 00.
  10641. Cross reference with {6.09.04} Input Status Register One.
  10642.  
  10643.  
  10644. <0>      Colour Plane Enable 0
  10645.          ---------------------
  10646.  
  10647.          <=0>  Disable all output from a shift register(s) associated with this
  10648.                image memory plane.  The output is set to be a constant zero bit
  10649.                to provide a stable input to the colour tables.
  10650.  
  10651.          <=1>  Enable shift register(s) output associated with this image plane
  10652.                so the data shifted out will provide input to the colour tables.
  10653.  
  10654.          There is discussion of shift register operation together with diagrams
  10655.          showing shift register data paths and output data paths.
  10656.  
  10657.          See {6.06.07} Graphics Mode Register.
  10658.  
  10659.  
  10660. <1>      Colour Plane Enable 1
  10661.          ---------------------
  10662.  
  10663.          <=0>  Disable all output from a shift register(s) associated with this
  10664.                image memory plane.  The output is set to be a constant zero bit
  10665.                to provide a stable input to the colour tables.
  10666.  
  10667.          <=1>  Enable shift register(s) output associated with this image plane
  10668.                so the data shifted out will provide input to the colour tables.
  10669.  
  10670.          There is discussion of shift register operation together with diagrams
  10671.          showing shift register data paths and output data paths.
  10672.  
  10673.          See {6.06.07} Graphics Mode Register.
  10674.  
  10675.  
  10676. <2>      Colour Plane Enable 2
  10677.          ---------------------
  10678.  
  10679.          <=0>  Disable all output from a shift register(s) associated with this
  10680.                image memory plane.  The output is set to be a constant zero bit
  10681.                to provide a stable input to the colour tables.
  10682.  
  10683.          <=1>  Enable shift register(s) output associated with this image plane
  10684.                so the data shifted out will provide input to the colour tables.
  10685.  
  10686.          There is discussion of shift register operation together with diagrams
  10687.          showing shift register data paths and output data paths.
  10688.  
  10689.          See {6.06.07} Graphics Mode Register.
  10690.  
  10691.  
  10692. <3>      Colour Plane Enable 3
  10693.          ---------------------
  10694.  
  10695.          <=0>  Disable all output from a shift register(s) associated with this
  10696.                image memory plane.  The output is set to be a constant zero bit
  10697.                to provide a stable input to the colour palette.
  10698.  
  10699.          <=1>  Enable shift register(s) output associated with this image plane
  10700.                so the data shifted out will provide input to the colour tables.
  10701.  
  10702.          There is discussion of shift register operation together with diagrams
  10703.          showing shift register data paths and output data paths.
  10704.  
  10705.          See {6.06.07} Graphics Mode Register.
  10706.  
  10707.  
  10708. <5..4>   Display Status Select
  10709.          ---------------------
  10710.  
  10711.          This binary field selects two of the eight colour select output bits
  10712.          to be read back using the register reserved for this use.  Which are
  10713.          selected are detailed by the table below.
  10714.  
  10715.          See {6.09.04} Input Status Register One.
  10716.  
  10717.  
  10718.          Display Status Select
  10719.          =====----------------
  10720.  
  10721.                         Input Status Register One, bit 5
  10722.          =====          ==------------------------------
  10723.  
  10724.                                     Input Status Register One, bit 4
  10725.          =====          ==          ==------------------------------
  10726.  
  10727.  
  10728.          <=00>          c2          c0
  10729.  
  10730.          <=01>          c5          c4
  10731.  
  10732.          <=10>          c3          c1
  10733.  
  10734.          <=11>          c7          c6
  10735.  
  10736.  
  10737.          ------------------------------------------------------------
  10738.  
  10739.  
  10740. <7..6>   Reserved.  Always <=00>.
  10741.          ------------------------
  10742.  
  10743.  
  10744.  
  10745.  
  10746. 6.07.21  Horizontal PEL Panning Register  { 3c0h/I/W  3c1h/R  13h  R/W }
  10747. =======  ===============================================================
  10748.  
  10749.  
  10750. Cross reference with {6.04.03} Clocking Mode Register.
  10751. Cross reference with {6.05.10} Preset Row Scan Register.
  10752. Cross reference with {6.05.26} Line Compare Register.
  10753. Cross reference with {6.06.07} Graphics Mode Register.
  10754. Cross reference with {6.07.18} Attribute Mode Control Register.
  10755.  
  10756.  
  10757. <3..0>   Horizontal PEL Panning
  10758.          ----------------------
  10759.  
  10760.          PEL panning {Picture ELement panning} operates in both graphics mode
  10761.          and text mode displays, so it is always operational.  Panning shifts
  10762.          the entire display image to the left of the screen loosing pixels on
  10763.          the left and introducing new pixels to the right.  It is implemented
  10764.          in hardware by missing out pixels at the beginning of a scan line so
  10765.          that the scan line active display starts at a point after the actual
  10766.          start of image data for the scan line.  This means of course, that a
  10767.          scan line to be panned in this way must be wider than the screen, so
  10768.          that there is always some data which cannot be displayed.  It is the
  10769.          hidden data which is brought into view by the panning process.
  10770.  
  10771.          There is a discussion of panning elsewhere, which is concerned with
  10772.          byte panning controls which can be used with pixel panning controls
  10773.          to achieve continuous, smooth horizontal panning.
  10774.  
  10775.          See {6.05.10} Preset Row Scan Register.
  10776.  
  10777.          The value provided in order to control pixel panning varies depending
  10778.          upon the way the display is generated.  In particular, there may be 8
  10779.          or 9 dot clock periods per character clock period.  This reflects the
  10780.          fact that in text mode displays, there is a choice for interpretation
  10781.          of a character font.  When the full 8 pixel width of a font expresses
  10782.          a true 8 pixel width character shape, then an extra pixel must be put
  10783.          into the display after each character position, so that characters do
  10784.          not merge with each other.  This is the motivation for providing nine
  10785.          dot clock periods per character clock.  When a character font ignores
  10786.          the 8th pixel, setting it always to the background colour there is no
  10787.          need to provide for character separation by hardware.  In this case 8
  10788.          dot clock periods per character clock period are all that is required.
  10789.  
  10790.          See {6.04.03} Clocking Mode Register.
  10791.  
  10792.          The type of graphics display generation scheme also affects the value
  10793.          used to control pixel panning operation.  This arises because panning
  10794.          is implemented in hardware by means of special shift registers, which
  10795.          use the structure of a serial data stream to shift the image.  In the
  10796.          most commonly used display mode, 16 colour multiplane mode each pixel
  10797.          is represented by one position in the panning shift registers.  Where
  10798.          a pixel occupies more than one panning shift register position, shift
  10799.          values must change accordingly.  This affects the behaviour of images
  10800.          built using 9 dot clocks, and those using packed pixel modes with the
  10801.          pixel represented by more than one bit.
  10802.  
  10803.  
  10804.  
  10805.  
  10806.          Control Value for Horizontal Pixel Panning
  10807.          ===---------------------------------------
  10808.  
  10809.  
  10810.                 Actual panned distance, in pixels, on screen
  10811.          ===    ===============================================================
  10812.  
  10813.  
  10814.                 Text Mode, 8 dot clock character period
  10815.          ===    ===------------------------------------
  10816.  
  10817.  
  10818.                        Text Mode, 9 dot clock character period
  10819.          ===    ===    ===------------------------------------
  10820.  
  10821.  
  10822.                               Multiplane 16 colour mode
  10823.          ===    ===    ===    ===----------------------
  10824.  
  10825.  
  10826.                                      Packed Pixel 2 colour mode
  10827.          ===    ===    ===    ===    ===-----------------------
  10828.  
  10829.  
  10830.                                             Packed Pixel 4 colour mode
  10831.          ===    ===    ===    ===    ===    ===-----------------------
  10832.  
  10833.  
  10834.                                                    Packed Pixel 256 colour mode
  10835.          ===    ===    ===    ===    ===    ===    ===-------------------------
  10836.  
  10837.  
  10838.           0      0      1 !    0      0      0      0 !
  10839.  
  10840.           1      1      2 !    1      1      1      * !
  10841.  
  10842.           2      2      3 !    2      2      2      1 !
  10843.  
  10844.           3      3      4 !    3      3      3      * !
  10845.  
  10846.           4      4      5 !    4      4      4      2 !
  10847.  
  10848.           5      5      6 !    5      5      5      * !
  10849.  
  10850.           6      6      7 !    6      6      6      3 !
  10851.  
  10852.           7      7      8 !    7      7      7      * !
  10853.  
  10854.           8      0      0 !    0      0      0      * !
  10855.  
  10856.  
  10857.          Notes:
  10858.          ======
  10859.  
  10860.  
  10861.          !  specifies that this entry is different from the majority of entries
  10862.             and that special attention should be given to the entry as a result
  10863.             of this.
  10864.  
  10865.  
  10866.          *  specifies that the entry is 'not applicable'.  This arises because
  10867.             of the way packed pixel 256 colour mode uses two dot clock periods
  10868.             to construct an 8 bit colour code.  Each dot clock makes the shift
  10869.             registers deliver one packet of 4 bits of colour code.  After each
  10870.             two consecutive dot clocks, two four bit packets are combined with
  10871.             the required 8 bit colour code as a result.  Therefore a two place
  10872.             shift is required per pixel in 256 colour packed pixel mode.  This
  10873.             'not applicable' entry should be avoided since it will not produce
  10874.             the expected results.
  10875.  
  10876.             See {6.06.07} Graphics Mode Register.
  10877.  
  10878.  
  10879.          Formulae concerned with 8 dot clock character periods and 9 dot clock
  10880.          character periods are as follows:
  10881.  
  10882.             left_pan = (number_field + 0) mod 8
  10883.             left_pan = (number_field + 1) mod 9
  10884.  
  10885.             See {6.04.03} Clocking Mode Register.
  10886.  
  10887.  
  10888.          ----------------------------------------------------------------------
  10889.  
  10890.  
  10891. <7..4>   Reserved.  Always <=0000>.
  10892.          --------------------------
  10893.  
  10894.  
  10895.  
  10896.  
  10897. 6.07.22  Colour Select Register           { 3c0h/I/W  3c1h/R  14h  R/W }
  10898. =======  ===============================================================
  10899.  
  10900.  
  10901. Cross reference with {6.07.02} Palette Register 00.
  10902. Cross reference with {6.07.18} Attribute Mode Control Register.
  10903.  
  10904.  
  10905.          The Colour Select Register provides additional colour definition bits
  10906.          which are used to increase the either 4 or 6 bits output, produced by
  10907.          the internal colour palette, to the 8 colour bits as required for the
  10908.          external colour palette input.
  10909.  
  10910.          The number of bits produced by the internal colour palette is selected
  10911.          by means of a control bit, which also governs the number of bits taken
  10912.          from the Colour Select Register.  This is arranged so that there are 8
  10913.          bits of resulting colour code, under all circumstances.  This control
  10914.          is provided by the bit External Colour Palette Input Select.
  10915.  
  10916.          See {6.07.18} Attribute Mode Control Register.
  10917.  
  10918.          However, when the packed pixel 256 colour mode is in use, there is no
  10919.          need to provide any additional colour data as all 8 bits required for
  10920.          input to the external colour palette come directly from display image
  10921.          memory.  Then there is no use for the Colour Select Register.  Option
  10922.          control is governed by the Shift Register 256 Colour Assembly Latch.
  10923.  
  10924.          See {6.07.18} Attribute Mode Control Register.
  10925.  
  10926.          A detailed discussion with schematics is available for the data flow
  10927.          between the memory image plane shift register outputs and the display
  10928.          unit analogue colour inputs.
  10929.  
  10930.          See {6.07.02} Palette Register 00.
  10931.  
  10932.  
  10933. <1..0>   External colour palette bits <5..4>
  10934.          -----------------------------------
  10935.  
  10936.          In all display generation modes except packed pixel 256 colour mode,
  10937.          these bits are always available for optional use, controlled by the
  10938.          Attribute Mode Control Register.  When selected for use, these bits
  10939.          replace the internal colour palette output bits <5..4> becoming the
  10940.          bits <5..4> input to the external colour palette.
  10941.  
  10942.          See {6.07.18} Attribute Mode Control Register.
  10943.  
  10944.  
  10945. <3..2>   External colour palette bits <7..6>
  10946.          -----------------------------------
  10947.  
  10948.          In all display generation modes except packed pixel 256 colour mode,
  10949.          these bits are always available for unconditional use.  They become
  10950.          bits <7..6> input to the external colour palette.
  10951.  
  10952.          See {6.07.02} Palette Register 00.
  10953.  
  10954.  
  10955. <7..4>   Reserved.  Always <=0000>.
  10956.          --------------------------
  10957.  
  10958.  
  10959.  
  10960.  
  10961. 6.08  Register specifications: DAC Support Logic
  10962. ====  ==========================================
  10963.  
  10964.  
  10965. 6.08.01  DAC Pixel Mask Register          { 3c6h   R/W }
  10966. =======  ===============================================
  10967.  
  10968.  
  10969. Cross reference with {6.07.02} Palette Register 00.
  10970. Cross reference with {6.08.02} DAC Status Register.
  10971.  
  10972.  
  10973. <0>      DAC Pixel Mask 0 {Digital to Analogue Converter Pixel Mask}
  10974.          -----------------------------------------------------------
  10975.  
  10976.          The shift registers produce an output stream of width dependant upon
  10977.          the display generation mode in use.  No matter what this data output
  10978.          width actually is, ultimately it will be expanded into the 8 bits of
  10979.          colour data required as input by the external colour palette.  Where
  10980.          it is required that a reduction in addressing into this 256 location
  10981.          memory be put into effect, it is possible to substitute zero bits in
  10982.          place of specified colour input bits.  The substitution is permitted
  10983.          or disabled by means of this DAC Pixel Mask Register, with a bit for
  10984.          bit control correspondance.
  10985.  
  10986.          <=0>  Send zero into the external colour palette at this input bit
  10987.                position.
  10988.  
  10989.          <=1>  Permit colour data at this input bit position to flow freely
  10990.                into the external colour palette.
  10991.  
  10992.          A detailed discussion of colour generation is available, with data
  10993.          flow schematics.
  10994.  
  10995.          See {6.07.02} Palette Register 00.
  10996.  
  10997.          By selectively enabling and disabling individual colour select bits,
  10998.          an image can be manipulated for different colour sets very rapidly.
  10999.          Also, multiple images can be associated with different colour data,
  11000.          and combined in different ways using this masking control technique.
  11001.  
  11002.          Note that if the external colour palette is correctly initialised it
  11003.          is possible to associate multiple images with identical colour sets,
  11004.          thereby making multiple image animation sequences possible.  This is
  11005.          possible only by using identical colour definitions, repeated across
  11006.          many distinct addresses.
  11007.  
  11008.          For operational purposes it should be noted that accesses to the
  11009.          DAC Pixel Mask Register are not relevant for DAC Status Register
  11010.          purposes.
  11011.  
  11012.          See {6.08.02} DAC Status Register.
  11013.  
  11014.  
  11015. <1>      DAC Pixel Mask 1 {Digital to Analogue Converter Pixel Mask}
  11016.          -----------------------------------------------------------
  11017.  
  11018.          As for DAC Pixel Mask 0 above.
  11019.  
  11020.  
  11021. <2>      DAC Pixel Mask 2 {Digital to Analogue Converter Pixel Mask}
  11022.          -----------------------------------------------------------
  11023.  
  11024.          As for DAC Pixel Mask 0 above.
  11025.  
  11026.  
  11027. <3>      DAC Pixel Mask 3 {Digital to Analogue Converter Pixel Mask}
  11028.          -----------------------------------------------------------
  11029.  
  11030.          As for DAC Pixel Mask 0 above.
  11031.  
  11032.  
  11033. <4>      DAC Pixel Mask 4 {Digital to Analogue Converter Pixel Mask}
  11034.          -----------------------------------------------------------
  11035.  
  11036.          As for DAC Pixel Mask 0 above.
  11037.  
  11038.  
  11039. <5>      DAC Pixel Mask 5 {Digital to Analogue Converter Pixel Mask}
  11040.          -----------------------------------------------------------
  11041.  
  11042.          As for DAC Pixel Mask 0 above.
  11043.  
  11044.  
  11045. <6>      DAC Pixel Mask 6 {Digital to Analogue Converter Pixel Mask}
  11046.          -----------------------------------------------------------
  11047.  
  11048.          As for DAC Pixel Mask 0 above.
  11049.  
  11050.  
  11051. <7>      DAC Pixel Mask 7 {Digital to Analogue Converter Pixel Mask}
  11052.          -----------------------------------------------------------
  11053.  
  11054.          As for DAC Pixel Mask 0 above.
  11055.  
  11056.  
  11057.  
  11058.  
  11059. 6.08.02  DAC Status Register              { 3c7h   R-- }
  11060. =======  ===============================================
  11061.  
  11062.  
  11063. Cross reference with {6.08.01} DAC Pixel Mask Register.
  11064. Cross reference with {6.08.03} DAC Read Data Address Register.
  11065. Cross reference with {6.08.04} DAC Write Data Address Register.
  11066. Cross reference with {6.08.05} DAC Data Register.
  11067.  
  11068.  
  11069. <1..0>   DAC Status
  11070.          ----------
  11071.  
  11072.          <=00>  The last access to the DAC Data Register was a processor write
  11073.                 access.
  11074.  
  11075.          <=01>  This value significance is not assigned.
  11076.  
  11077.          <=10>  This value significance is not assigned.
  11078.  
  11079.          <=11>  The last access to the DAC Data Register was a processor read
  11080.                 access.
  11081.  
  11082.          This binary field indicates the type of transaction last performed by
  11083.          the processor on the DAC Data Register.  This information can be used
  11084.          in a situation when an interrupt routine periodically writes into the
  11085.          external colour palette, to modify the colour data held there.  After
  11086.          such a write sequence has been completed in the interrupt routine, it
  11087.          is important that any read or write activity which was in progress at
  11088.          the time of the interrupt is restored transparently.  In practise, an
  11089.          interrupt routine might well need to read and write colour data; this
  11090.          situation is taken care of equally well by the DAC Status Register if
  11091.          it is correctly used.
  11092.  
  11093.          See {6.08.05} DAC Data Register.
  11094.  
  11095.          An interrupt routine executes without synchronisation to main program
  11096.          code.  This program could read from or write to the DAC Data Register
  11097.          at any time, so when the interrupt occurs, the transaction state with
  11098.          the DAC Data Register is effectively unknown.  Despite this, any such
  11099.          trnsaction must be permitted to continue undisturbed, after interrupt
  11100.          program execution is complete.
  11101.  
  11102.          It is this problem which the DAC Status Register is designed to give
  11103.          the solution to.
  11104.  
  11105.          When the interrupt program gains control, there could be either of a
  11106.          read transaction or a write transaction in progress from the program
  11107.          which was executing immediately prior to the interrupt.  Whilst this
  11108.          program would typically be the main program it could also be another
  11109.          interrupt program, assigned to a different, lower interrupt level.
  11110.  
  11111.          The first job the newly entered interrupt program must perform is to
  11112.          secure the status of that program which has just had control wrested
  11113.          from it.  This involves determining which type of transaction was in
  11114.          progress at the time of interrupt.  By using the DAC Status Register
  11115.          an indication is given as to the type of transaction, which was last
  11116.          in progress.  This transaction might well be complete or it could be
  11117.          still in progress.  This point is unknown but does not matter if the
  11118.          object is only to preserve the status of the DAC Data Register.
  11119.  
  11120.          Any read or write sequence involving the DAC Data Register begins by
  11121.          means of a write from the processor into either of the two registers
  11122.          DAC Read Data Address Register, or DAC Write Data Address Register.
  11123.          This write to a particular address register is used to associate the
  11124.          DAC Data Register with the appropriate transaction type, either read
  11125.          or write.  It is also used to specify which of the address registers
  11126.          should be associated with the autoincrement capability that provides
  11127.          for long transfers of one type without need to update the addressing
  11128.          register for that transaction type.
  11129.  
  11130.          The read address is initialised prior to any read sequence, with the
  11131.          write address set prior to any write sequence.  During that sequence
  11132.          the relevant address register is updated automatically, so that long
  11133.          data transfers in either direction can occur without the overhead of
  11134.          resetting the address register.  This makes for fast program running
  11135.          times and eases programming overheads.
  11136.  
  11137.          However, after any other transaction type is used, the autoincrement
  11138.          feature is switched off.  This means that writing a value to another
  11139.          address register or performing a transaction of the opposite type is
  11140.          sufficient to switch off autoincrement to the address register being
  11141.          presently used.  This has the effect of freezing an address register
  11142.          which in turn provides for recovering the present contents and later
  11143.          reinstating them, for example, after an interrupt has completed.
  11144.  
  11145.          It should now be clear that for an interrupt program to preserve any
  11146.          existing read or write sequence on the DAC Data Register it is quite
  11147.          enough to determine the last transaction type, and then to read from
  11148.          the associated address register the current read or write address in
  11149.          use by the previously executing program.  After the interrupt, there
  11150.          is no difficulty in restoring the DAC Data Register program state by
  11151.          using the preserved value from interrupt entry time.
  11152.  
  11153.          See {6.08.03} DAC Read Data Address Register.
  11154.          See {6.08.04} DAC Write Data Address Register.
  11155.  
  11156.          For operational purposes it should be noted that accesses to the
  11157.          DAC Pixel Mask Register are not relevant for DAC Status Register
  11158.          purposes.
  11159.  
  11160.          See {6.08.01} DAC Pixel Mask Register.
  11161.  
  11162.  
  11163. <7..2>   Reserved.  Always <=000000>.
  11164.          ----------------------------
  11165.  
  11166.  
  11167.  
  11168.  
  11169. 6.08.03  DAC Read Data Address Register   { 3c7h   W-- }
  11170. =======  ===============================================
  11171.  
  11172.  
  11173. Cross reference with {6.08.02} DAC Status Register.
  11174. Cross reference with {6.08.04} DAC Write Data Address Register.
  11175. Cross reference with {6.08.05} DAC Data Register.
  11176.  
  11177.  
  11178. <7..0>   DAC Read Data Address
  11179.          ---------------------
  11180.  
  11181.          This binary field determines the initial value for the address index
  11182.          into the external colour palette, at which processor reads will take
  11183.          place.  The external colour palette contains 256 distinct addresses,
  11184.          each of which holds three colour values of up to 8 bits each for the
  11185.          colours read, green and blue.  Typically either 6 bits or 8 bits for
  11186.          each colour intensity are provided, depending upon the hardware.
  11187.  
  11188.          Setting a new DAC Read Data Address value has the effect of freezing
  11189.          the current value of the DAC Write Data Address, and also associates
  11190.          the address autoincrement operation with the read transaction on the
  11191.          DAC Data Register.
  11192.  
  11193.          See {6.08.04} DAC Write Data Address Register.
  11194.          See {6.08.05} DAC Data Register.
  11195.  
  11196.          At this point, the processor can perform three read transactions on
  11197.          the DAC Data Register, after which an automatic increment will make
  11198.          the address point to the next group of three intensity values.  The
  11199.          possibility of an interrupt occuring during this 3 consecutive read
  11200.          sequence must be taken into account as the hardware state cannot be
  11201.          interrogated to discover which of the three colours was the last to
  11202.          be transferred.  In practise, most programs adopt a policy eshewing
  11203.          use of interrupts during the three colour data transfer.  This will
  11204.          effectively prevent such a transfer from being interrupted, and the
  11205.          problems of an unknown hardware transfer state simply disappear.
  11206.  
  11207.          The current read address can be discovered at any time, by virtue of
  11208.          a read on the DAC Write Data Address Register.  This is necessary to
  11209.          recover the hardware state at time of entry to an interrupt routine.
  11210.  
  11211.          See {6.08.04} DAC Write Data Address Register.
  11212.  
  11213.          The address register in use {either read or write} can also be found
  11214.          by using a special status register.
  11215.  
  11216.          See {6.08.02} DAC Status Register.
  11217.  
  11218.  
  11219.  
  11220.  
  11221. 6.08.04  DAC Write Data Address Register  { 3c8h   R/W }
  11222. =======  ===============================================
  11223.  
  11224.  
  11225. Cross reference with {6.08.02} DAC Status Register.
  11226. Cross reference with {6.08.03} DAC Read Data Address Register.
  11227. Cross reference with {6.08.05} DAC Data Register.
  11228.  
  11229.  
  11230. <7..0>   DAC Write Data Address
  11231.          ----------------------
  11232.  
  11233.          This binary field determines the initial value for the address index
  11234.          into the external colour palette at which processor writes will take
  11235.          place.  The external colour palette contains 256 distinct addresses,
  11236.          each of which holds three colour values of up to 8 bits each for the
  11237.          colours read, green and blue.  Typically either 6 bits or 8 bits for
  11238.          each colour intensity are provided, depending upon the hardware.
  11239.  
  11240.          Updating the DAC Write Data Address value has the effect of freezing
  11241.          the current value of the DAC Read Data Address which also associates
  11242.          the address autoincrement feature with any write transaction, to the
  11243.          DAC Data Register.
  11244.  
  11245.          See {6.08.03} DAC Read Data Address Register.
  11246.          See {6.08.05} DAC Data Register.
  11247.  
  11248.          At this point the processor can perform three write transactions on
  11249.          the DAC Data Register, after which an automatic increment will make
  11250.          the address point to the next group of three intensity values.  The
  11251.          possibility of an interrupt occuring during these three consecutive
  11252.          writes must be carefully considered as the hardware state cannot be
  11253.          interrogated to discover which of the three colours was the last to
  11254.          be transferred.  In practise, most programs adopt a policy eshewing
  11255.          use of interrupts during the three colour data transfer.  This will
  11256.          effectively prevent such a transfer from being interrupted, and the
  11257.          problems of an unknown hardware transfer state simply disappear.
  11258.  
  11259.          The current write address can be discovered at any time by virtue of
  11260.          a read on the DAC Write Data Address Register.  This is necessary to
  11261.          recover the hardware state at time of entry to an interrupt routine.
  11262.  
  11263.          See {6.08.04} DAC Write Data Address Register.
  11264.  
  11265.          The address register in use {either read or write} can also be found
  11266.          by using a special status register.
  11267.  
  11268.          See {6.08.02} DAC Status Register.
  11269.  
  11270.  
  11271.  
  11272.  
  11273. 6.08.05  DAC Data Register                { 3c9h   R/W }
  11274. =======  ===============================================
  11275.  
  11276.  
  11277. Cross reference with {6.07.02} Palette Register 00.
  11278. Cross reference with {6.08.02} DAC Status Register.
  11279. Cross reference with {6.08.03} DAC Read Data Address Register.
  11280. Cross reference with {6.08.04} DAC Write Data Address Register.
  11281.  
  11282.  
  11283. <7..0>   DAC Data
  11284.          --------
  11285.  
  11286.          All processor read and write operations which transfer colour values
  11287.          to and from the external colour palette are implemented using access
  11288.          to this register.  The actual read or write address accessed is that
  11289.          specified in the address register for either read or write functions.
  11290.  
  11291.          See {6.08.03} DAC Read Data Address Register.
  11292.          See {6.08.04} DAC Write Data Address Register.
  11293.  
  11294.          The external colour palette accepts an 8 bit value which ranges over
  11295.          256 separate addresses.  Each address stores three colour values for
  11296.          red, green and blue intensities, respectively.  Since each colour is
  11297.          of either 6 or 8 bits width to completely access all the colour data
  11298.          at any given address, 3 byte sized transfers are used, in the strict
  11299.          order red, green, blue.  The processor must issue 3 consecutive read
  11300.          or write transactions to complete the access to the data at a single
  11301.          address.  This can mean in practise that during the 3 byte transfer,
  11302.          interrupts remain inhibited so that no indeterminate length accesses
  11303.          can occur, so avoiding the hardware entering an unknown state.
  11304.  
  11305.          To prevent the hardware entering an unknown state, all transactions
  11306.          must first determine the current transaction type and address, then
  11307.          initialise the relevent read or write address register fro the type
  11308.          of intended transaction, before proceeding.
  11309.  
  11310.          The current access address can be discovered at any time by means of
  11311.          a read on the DAC Write Data Address Register.  This is necessary to
  11312.          recover the hardware state at time of entry to an interrupt routine.
  11313.  
  11314.          See {6.08.04} DAC Write Data Address Register.
  11315.  
  11316.          The address register in use {either read or write} can also be found
  11317.          by using a special status register.  This is sometimes necessary for
  11318.          purposes of determining the hardware state at the time of activation
  11319.          of an interrupt routine.
  11320.  
  11321.          See {6.08.02} DAC Status Register.
  11322.  
  11323.          A discussion of the role of the external colour palette is available
  11324.          elsewhere.
  11325.  
  11326.          See {6.07.02} Palette Register 00.
  11327.  
  11328.  
  11329.  
  11330.  
  11331. 6.09  Register specifications: General Registers
  11332. ====  ==========================================
  11333.  
  11334.  
  11335. 6.09.01  Miscellaneous Output Register  { 3c2h  W-- }
  11336. =======  ============================================
  11337.  
  11338.  
  11339. Cross reference with {6.04.03} Clocking Mode Register.
  11340. Cross reference with {6.04.06} Sequencer Memory Mode Register.
  11341. Cross reference with {6.05.01} CRT Controller Address Register.
  11342. Cross reference with {6.05.02} Horizontal Total Register.
  11343. Cross reference with {6.05.08} Vertical Total Register.
  11344. Cross reference with {6.06.07} Graphics Mode Register.
  11345. Cross reference with {6.06.08} Miscellaneous Register.
  11346. Cross reference with {6.07.01} Attribute Address Register.
  11347. Cross reference with {6.07.18} Attribute Mode Control Register.
  11348. Cross reference with {6.09.02} Miscellaneous Output Register.
  11349. Cross reference with {6.09.04} Input Status Register One.
  11350. Cross reference with {6.10.04} Mode Control Register 2.
  11351. Cross reference with {6.10.07} CRTC Module Testing Register.
  11352.  
  11353.  
  11354.          This register is subject to write protection through option setting.
  11355.          The whole register is affected.
  11356.  
  11357.          See {6.10.07} CRTC Module Testing Register.
  11358.  
  11359.          This register can be read back using a different input output port
  11360.          address provided specially for this purpose.
  11361.  
  11362.          See {6.09.02} Miscellaneous Output Register.
  11363.  
  11364.  
  11365. <0>      Input Output Address Select
  11366.          ---------------------------
  11367.  
  11368.          <=0>  Select the CRT Controller input/output port address to be
  11369.                hex '3b?', where '?' is some hex digit.
  11370.  
  11371.                See {6.05.01} CRT Controller Address Register.
  11372.  
  11373.                Also select the Input Status Register One port address to
  11374.                hex '3ba'.
  11375.  
  11376.                See {6.09.04} Input Status Register One.
  11377.  
  11378.          <=1>  Select the CRT Controller input/output port address to be
  11379.                hex '3d?', where '?' is some hex digit.
  11380.  
  11381.                See {6.05.01} CRT Controller Address Register.
  11382.  
  11383.                Also select the Input Status Register One port address to
  11384.                hex '3da'.
  11385.  
  11386.                See {6.09.04} Input Status Register One.
  11387.  
  11388.  
  11389. <1>      Display Memory Access Enable
  11390.          ----------------------------
  11391.  
  11392.          This control can be used to prevent image memory from responding
  11393.          to processor generated addresses, in circumstances where another
  11394.          device is (temporarily) enabled for the same address span.
  11395.  
  11396.          <=0>  Disable processor access to display image memory.
  11397.  
  11398.          <=1>  Enable processor access to display image memory.
  11399.  
  11400.          There are controls available to select the address range employed
  11401.          for processor access to display image memory.
  11402.  
  11403.          See {6.06.08} Miscellaneous Register.
  11404.  
  11405.  
  11406. <3..2>   Dot Clock Frequency Select
  11407.          --------------------------
  11408.  
  11409.          Dot clock selection controls horizontal pixel resolution and also
  11410.          character clock generation.  The clock frequency control modifies
  11411.          the dot clock period in conjunction with a programmable dot clock
  11412.          division ratio select.  This resulting dot clock is then used for
  11413.          character clock definition.  The character clock specifies a scan
  11414.          line period, which in turn determines the frame period for a full
  11415.          image display to be produced.  This frame period then decides the
  11416.          display refresh rate.  The dot clock is a master timing reference.
  11417.  
  11418.          <=00>  Clock select 25.175 MHz clock for
  11419.                 640 total Horizontal Pixels.
  11420.  
  11421.          <=01>  Clock select 28.322 MHz clock for
  11422.                 720 total Horizontal Pixels.
  11423.  
  11424.          <=10>  Clock select external user clock
  11425.                 up to a maximum of 65.000 MHz.
  11426.  
  11427.          <=11>  Clock select external user clock
  11428.                 up to a maximum of 65.000 MHz.
  11429.  
  11430.          See {6.04.03} Clocking Mode Register
  11431.          See {6.05.02} Horizontal Total Register.
  11432.          See {6.05.08} Vertical Total Register.
  11433.          See {6.06.07} Graphics Mode Register.
  11434.          See {6.10.04} Mode Control Register 2.
  11435.  
  11436.  
  11437. <4>      Reserved.  Always <=0>.
  11438.          -----------------------
  11439.  
  11440.  
  11441. <5>      Address Extension Bit
  11442.          ---------------------
  11443.  
  11444.          <=0>  Select the low 64K page.
  11445.  
  11446.          <=1>  Select the high 64K page.
  11447.  
  11448.          This bit is the 64K page bit for the Text Memory Access Mode.  For
  11449.          more details consult Processor Image Memory Access Mode Select.
  11450.  
  11451.          See {6.04.06} Sequencer Memory Mode Register.
  11452.  
  11453.          This option controls processor access to display image memory, and
  11454.          offers a larger number of possible display pages in text mode.  It
  11455.          is only used in conjunction with text mode displays.
  11456.  
  11457.          See {6.06.08} Miscellaneous Register.
  11458.  
  11459.  
  11460. <6>      Horizontal Synchronisation Signal Polarity
  11461.          ------------------------------------------
  11462.  
  11463.          This polarity with Vertical Synchronisation Signal Polarity, below,
  11464.          encodes the vertical scan line count for the display unit.  This is
  11465.          an aid to the display unit, in helping to select the vertical frame
  11466.          rate.  See table below.
  11467.  
  11468.          <=0>  Positive horizontal retrace signal select.
  11469.  
  11470.          <=1>  Negative horizontal retrace signal select.
  11471.  
  11472.  
  11473. <7>      Vertical Synchronisation Signal Polarity
  11474.          ----------------------------------------
  11475.  
  11476.          This polarity with Horizontal Synchronisation Signal Polarity below
  11477.          encodes the vertical scan line count for the display unit.  This is
  11478.          an aid to the display unit, in helping to select the vertical frame
  11479.          rate.  See table below.
  11480.  
  11481.          <=0>  Positive vertical retrace signal select.
  11482.  
  11483.          <=1>  Negative vertical retrace signal select.
  11484.  
  11485.  
  11486.  
  11487.  
  11488.          Encoding of Vertical Scan Line Count for Display Unit
  11489.          =====================================================
  11490.  
  11491.  
  11492.          Vertical Synchronisation Signal Polarity
  11493.          =---------------------------------------
  11494.  
  11495.               Horizontal Synchronisation Signal Polarity
  11496.          =    =-----------------------------------------
  11497.  
  11498.                    Vertical Display Size
  11499.          =    =    ===----------------------------------------
  11500.  
  11501.  
  11502.          0    0    reserved, not used at present
  11503.  
  11504.          0    1    400 scan lines
  11505.  
  11506.          1    0    350 scan lines
  11507.  
  11508.          1    1    480 scan lines
  11509.  
  11510.  
  11511.          -----------------------------------------------------
  11512.  
  11513.  
  11514.  
  11515.  
  11516. 6.09.02  Miscellaneous Output Register  { 3cch  --R }
  11517. =======  ============================================
  11518.  
  11519.  
  11520. Cross reference with {6.09.01} Miscellaneous Output Register.
  11521.  
  11522.  
  11523. <7..0>   Miscellaneous Output
  11524.          --------------------
  11525.  
  11526.          This is a read only register, provided for use with the write
  11527.          only Miscellaneous Output Register.
  11528.  
  11529.          The value in this register can be written using the different
  11530.          input output port address provided for this purpose.
  11531.  
  11532.          See {6.09.01} Miscellaneous Output Register.
  11533.  
  11534.  
  11535.  
  11536.  
  11537. 6.09.03  Input Status Register Zero     { 3c2h  R-- }
  11538. =======  ============================================
  11539.  
  11540.  
  11541. Cross reference with {6.05.19} Vertical Retrace End Register.
  11542. Cross reference with {6.09.04} Input Status Register One.
  11543. Cross reference with {10.02}   Monitor auto-detection operation.
  11544.  
  11545.  
  11546. <3..0>   Reserved.  Always <=0000>.
  11547.          --------------------------
  11548.  
  11549.  
  11550. <4>      Monitor Detect Status Bit
  11551.          -------------------------
  11552.  
  11553.          <=0>  There is a high video signal current flowing at this time.  This
  11554.                is a real-time scan line status, which comes directly from video
  11555.                DAC output measurement.
  11556.  
  11557.          <=1>  There is a low video signal current flowing at this time.  This
  11558.                is a real-time scan line status which comes directly from video
  11559.                DAC output measurement.
  11560.  
  11561.          This read only bit provides an indication of the video signal current
  11562.          flow into a display unit during active video signal generation.  This
  11563.          provides information to determine which of a monochrome display unit,
  11564.          or a colour display unit is connected to the image generator.  Use of
  11565.          this bit is in practise non-trivial, as is described elsewhere.  This
  11566.          is a facility which must only be used when the original documentation
  11567.          from the VGA subsystem manufacturer is available.
  11568.  
  11569.          See {10.02} Monitor auto-detection operation.
  11570.  
  11571.  
  11572. <6..5>   Reserved.  Always <=00>.
  11573.          ------------------------
  11574.  
  11575.  
  11576. <7>      CRT Controller Interrupt State
  11577.          ------------------------------
  11578.  
  11579.          <=0>  There is no current vertical retrace interrupt active, which is
  11580.                because there really is no vertical retrace at present, or this
  11581.                status is itself permanently inactive through option selection.
  11582.  
  11583.                See {6.05.19} Vertical Retrace End Register.
  11584.  
  11585.          <=1>  A vertical retrace interrupt is pending.  This interrupt can be
  11586.                received by the processor only where 8259 interrupt hardware is
  11587.                correctly initialised.  This status can always be accessed by a
  11588.                continuous polling operation by software, providing always that
  11589.                this status is itself enabled by option selection.
  11590.  
  11591.                See {6.05.19} Vertical Retrace End Register.
  11592.  
  11593.          This status bit can be used to synchronise software operation with the
  11594.          display unit frame production.  In this manner, certain critical types
  11595.          of operation can be made to occur during frame flyback time.  This has
  11596.          the effect of preventing any visual disturbance to the display screen,
  11597.          which is psychologically far better for the user of the display unit.
  11598.  
  11599.          See {6.09.04} Input Status Register One.
  11600.          See {10.02}   Monitor auto-detection operation.
  11601.  
  11602.  
  11603.  
  11604.  
  11605. 6.09.04  Input Status Register One      { 3?ah  R-- }
  11606. =======  ============================================
  11607.  
  11608.  
  11609. Cross reference with {6.07.01} Attribute Address Register.
  11610. Cross reference with {6.07.20} Colour Plane Enable Register.
  11611. Cross reference with {6.09.01} Miscellaneous Output Register.
  11612. Cross reference with {6.09.03} Input Status Register Zero.
  11613. Cross reference with {10.02}   Monitor auto-detection operation.
  11614.  
  11615.  
  11616.          The input/output port address of this register can be modified under
  11617.          program control by unsing the Input Output Address Select option bit
  11618.          in the Miscellaneous Output Register.  The selectable port addresses
  11619.          are either hex '3ba' or alternatively, hex '3da'.
  11620.  
  11621.          See {6.09.01} Miscellaneous Output Register.
  11622.  
  11623.          A read of this register resets the write state associated with the
  11624.          attribute controller write port 3c0h.  This ensures that the first
  11625.          write to port 3c0h will select the Attribute Address Register thus
  11626.          permitting specification of the index for the internal register to
  11627.          be accessed next.
  11628.  
  11629.          See {6.07.01} Attribute Address Register.
  11630.  
  11631.  
  11632. <0>      Inverted Display Enable Status
  11633.          ------------------------------
  11634.  
  11635.          <=0>  This represents the active image scan line display time, where
  11636.                the display is not blanked.  This status is set dynamically in
  11637.                real-time, so can be used by software to synchronise operation
  11638.                with display activity.
  11639.  
  11640.          <=1>  The display is in a blanking period.  This might be either of
  11641.                horizontal or vertical blanking.  It is possible to decide on
  11642.                the basis of the vertical interrupt state, or by using timing
  11643.                information to make the deduction.
  11644.  
  11645.                See Vertical Retrace State, below.
  11646.                See {6.09.03} Input Status Register Zero.
  11647.  
  11648.  
  11649. <1>      Reserved.  Always <=0>.
  11650.          -----------------------
  11651.  
  11652.  
  11653. <2>      Reserved.  Always <=0>.  {Trident 8900 <=1>.}
  11654.          -----------------------
  11655.  
  11656.  
  11657. <3>      Vertical Retrace State
  11658.          ----------------------
  11659.  
  11660.          <=0>  The display is in an active state, which might in practise mean
  11661.                that information is being displayed, or a horizontal retrace is
  11662.                in progress.  However, there is no vertical retrace active.
  11663.  
  11664.          <=1>  The display is in a vertical retrace period.  The exact time at
  11665.                which the display entered this state can be determined by means
  11666.                of software continuously inspecting this state, until the start
  11667.                of vertical retrace is detected.  If the software maintains all
  11668.                operations in approximate synchronism thereafter, a synchronise
  11669.                becomes possible in a comparatively short time after each frame
  11670.                is completed.
  11671.  
  11672.  
  11673. <5..4>   Video Sampling State
  11674.          --------------------
  11675.  
  11676.          <=00>  Sampled digital video data as selected by option.
  11677.          <=01>  Sampled digital video data as selected by option.
  11678.          <=10>  Sampled digital video data as selected by option.
  11679.          <=11>  Sampled digital video data as selected by option.
  11680.  
  11681.          These two bits have a significance determined by an option setting.
  11682.          They are provided for diagnotic use, and can be used to sample the
  11683.          bits sent out from the attribute controller to the external colour
  11684.          palette.  There are 8 bits sent in total so there must be means to
  11685.          select those to be sampled.
  11686.  
  11687.          See {6.07.20} Colour Plane Enable Register.
  11688.  
  11689.  
  11690. <7..6>   Reserved.  Always <=00>.
  11691.          ------------------------
  11692.  
  11693.  
  11694.  
  11695.  
  11696. 6.10  Register specifications: Special Registers
  11697. ====  ==========================================
  11698.       Trident 8900 only
  11699. ====  ==========================================
  11700.       standard register officially undocumented
  11701. ====  ==========================================
  11702.  
  11703.  
  11704. 6.10.01  Hardware Version Register {new definition}  { 3c5h    0bh    R-- }
  11705. =======  ==================================================================
  11706.          Trident 8900 only
  11707. =======  ==================================================================
  11708.  
  11709.  
  11710. Cross reference with {6.10.04} Mode Control Register 2.
  11711. Cross reference with {6.10.05} Mode Control Register 1.
  11712.  
  11713.  
  11714.          Note that reading this register has a special side effect for Trident
  11715.          8900 VGA controller chips.
  11716.  
  11717.          The definitions for the two mode control registers are transformed to
  11718.          their new definitions.
  11719.  
  11720.          See {6.10.04} Mode Control Register 2.
  11721.          See {6.10.05} Mode Control Register 1.
  11722.  
  11723.  
  11724. <3..0>   Chip version identification   {Trident}
  11725.          ---------------------------
  11726.  
  11727.          <=0000>  Unassigned.
  11728.          <=0001>  Unassigned.
  11729.          <=0010>  Trident 8800CS
  11730.          <=0011>  Trident 8900B
  11731.          <=0100>  Trident 8900C
  11732.          <=0101>  Unassigned.
  11733.          <=0110>  Unassigned.
  11734.          <=0111>  Unassigned.
  11735.          <=1000>  Unassigned.
  11736.          <=1001>  Unassigned.
  11737.          <=1010>  Unassigned.
  11738.          <=1011>  Unassigned.
  11739.          <=1100>  Unassigned.
  11740.          <=1101>  Unassigned.
  11741.          <=1110>  Unassigned.
  11742.          <=1111>  Unassigned.
  11743.  
  11744.  
  11745. <7..4>   Reserved.
  11746.          ---------
  11747.  
  11748.  
  11749.  
  11750.  
  11751. 6.10.02  Version Selector Register {old definition}  { 3c5h    0bh    --W }
  11752. =======  ==================================================================
  11753.          Trident 8900 only
  11754. =======  ==================================================================
  11755.  
  11756.  
  11757. Cross reference with {6.10.04} Mode Control Register 2.
  11758. Cross reference with {6.10.05} Mode Control Register 1.
  11759.  
  11760.  
  11761.          Note that writing this register has a special side effect for Trident
  11762.          8900 VGA controller chips.
  11763.  
  11764.          The definitions for the two mode control registers are transformed to
  11765.          their old definitions.  The data written is irrelevant, as it will be
  11766.          ignored.  It is the write operation which indicates the definition is
  11767.          to be changed.
  11768.  
  11769.          See {6.10.04} Mode Control Register 2.
  11770.          See {6.10.05} Mode Control Register 1.
  11771.  
  11772.  
  11773.  
  11774.  
  11775. 6.10.03  Configuration Port Register 1               { 3c5h    0ch    R/W }
  11776. =======  ==================================================================
  11777.          Trident 8900 only
  11778. =======  ==================================================================
  11779.  
  11780.  
  11781. Cross reference with {6.10.05} Mode Control Register 1. {Old definition.}
  11782. Cross reference with {6.10.05} Mode Control Register 1. {New definition.}
  11783.  
  11784.  
  11785.          This register is read/write only for Trident 8900.
  11786.          This register can be write protected by option setting.
  11787.  
  11788.          See {6.10.05} Mode Control Register 1.  {New definition.}
  11789.  
  11790.          There are two separate definitions for this register, as
  11791.          determined by the NMI state option setting.
  11792.  
  11793.          See {6.10.05} Mode Control Register 1.  {Old definition.}
  11794.  
  11795.  
  11796. -----------------------------------------------------------------------------
  11797.          Definition {only when NMI disabled}
  11798. -----------------------------------------------------------------------------
  11799.  
  11800.  
  11801. <0>      Address Decode Source
  11802.          ---------------------
  11803.  
  11804.          <=0>  Employ latched system address for A16 decode.
  11805.          <=1>  Employ unlatched A19..A17 system address for A16 decode.
  11806.  
  11807.  
  11808. <1>      ROM Chip Count Specify
  11809.          ----------------------
  11810.  
  11811.          <=0>  Two BIOS ROM chips present.
  11812.          <=1>  One BIOS ROM chip present.
  11813.  
  11814.  
  11815. <2>      Reserved.
  11816.          ---------
  11817.  
  11818.  
  11819. <3>      ROM Address Span Specify
  11820.          ------------------------
  11821.  
  11822.          <=0>  Decode 24K ROM BIOS address space.
  11823.          <=1>  Decode 32K ROM BIOS address space.
  11824.  
  11825.  
  11826. <4>      VGA Control Port Specify
  11827.          ------------------------
  11828.  
  11829.          <=0>  Select hex '46e8' as VGA Control Port.
  11830.                This is a standard plug-in board control port address.
  11831.  
  11832.          <=1>  Select hex '3c3' as VGA Control Port.
  11833.                This is a standard motherboard control port address.
  11834.  
  11835.  
  11836. <6..5>   DRAM Configuration
  11837.          ------------------
  11838.  
  11839.          <=00>  64K  by 4 bits {either 8 or 16 chips}.
  11840.          <=01>  256K by 4 bits {2 chips}.
  11841.          <=10>  256K by 4 bits {4 chips}.
  11842.          <=11>  256K by 4 bits {8 chips}.
  11843.  
  11844.  
  11845. <7>      DRAM Access Width
  11846.          -----------------
  11847.  
  11848.          <=0>  8 bit memory access.
  11849.          <=1>  16 bit memory access.
  11850.  
  11851.  
  11852. -----------------------------------------------------------------------------
  11853.  
  11854.  
  11855.  
  11856.  
  11857. -----------------------------------------------------------------------------
  11858.          Definition {only when NMI enabled}
  11859. -----------------------------------------------------------------------------
  11860.  
  11861.  
  11862. <0>      Software Status
  11863.          ---------------
  11864.  
  11865.          Read and write to this bit by software to store a binary status flag.
  11866.  
  11867.  
  11868. <1>      NMI State {Non Maskable Interrupt State}
  11869.          ----------------------------------------
  11870.  
  11871.          This state has influence over the interpretation of this register.
  11872.          This interpretation only exists when the NMI state is set <=1>.
  11873.          Therefore the NMI state can only be turned off here.
  11874.  
  11875.          <=0>  NMI Disable.
  11876.                Remove this interpretation of the register.
  11877.  
  11878.          <=1>  NMI Enable.
  11879.                Consistent with this register interpretation.
  11880.  
  11881.  
  11882. <3..2>   Testing Bits
  11883.          ------------
  11884.  
  11885.          <=00>  Manufacturing test.
  11886.          <=01>  Manufacturing test.
  11887.          <=10>  Manufacturing test.
  11888.          <=11>  Normal operation.
  11889.  
  11890.  
  11891. <7..4>   NMI Vector Enable
  11892.          -----------------
  11893.  
  11894.          <=0000>  No NMI vector specified.
  11895.          <=0001>  NMI vector is specifed as hex '3x8'.
  11896.          <=0010>  NMI vector is specifed as hex '3d9'.
  11897.          <=0011>  Illegal value.
  11898.          <=0100>  NMI vector is specifed as hex '3dd'.
  11899.          <=0101>  Illegal value.
  11900.          <=0110>  Illegal value.
  11901.          <=0111>  Illegal value.
  11902.          <=1000>  NMI vector is specifed as hex '3bf'.
  11903.          <=1001>  Illegal value.
  11904.          <=1010>  Illegal value.
  11905.          <=1011>  Illegal value.
  11906.          <=1100>  Illegal value.
  11907.          <=1101>  Illegal value.
  11908.          <=1110>  Illegal value.
  11909.          <=1111>  Illegal value.
  11910.  
  11911.  
  11912. -----------------------------------------------------------------------------
  11913.  
  11914.  
  11915.  
  11916.  
  11917. 6.10.04  Mode Control Register 2                     { 3c5h    0dh    R/W }
  11918. =======  ==================================================================
  11919.          Trident 8900 only
  11920. =======  ==================================================================
  11921.  
  11922.  
  11923. Cross reference with {6.04.03} Clocking Mode Register.
  11924. Cross reference with {6.04.05} Character Map Select Register.
  11925. Cross reference with {6.05.05} End Horizontal Blanking Register.
  11926. Cross reference with {6.05.14} Start Address High Register.
  11927. Cross reference with {6.05.15} Start Address Low Register.
  11928. Cross reference with {6.05.16} Cursor Location High Register.
  11929. Cross reference with {6.05.17} Cursor Location Low Register.
  11930. Cross reference with {6.05.22} Underline Location Register.
  11931. Cross reference with {6.06.07} Graphics Mode Register.
  11932. Cross reference with {6.07.18} Attribute Mode Control Register.
  11933. Cross reference with {6.09.01} Miscellaneous Output Register.
  11934. Cross reference with {6.10.01} Hardware Version Register {new definition}.
  11935. Cross reference with {6.10.02} Version Selector Register {old definition}.
  11936. Cross reference with {6.10.07} CRTC Module Testing Register.
  11937.  
  11938.  
  11939.          This register has two different interpretations depending upon the
  11940.          last transaction to either of the following registers:
  11941.  
  11942.          See {6.10.01} Hardware Version Register {new definition}.
  11943.          See {6.10.02} Version Selector Register {old definition}.
  11944.  
  11945.  
  11946. -----------------------------------------------------------------------------
  11947.          New Definition
  11948. -----------------------------------------------------------------------------
  11949.          See {6.10.01} Hardware Version Register {new definition}.
  11950.  
  11951.  
  11952. <0>      Dot Clock Extended Select
  11953.          -------------------------
  11954.  
  11955.          This bit extends the clock frequency select bits already available
  11956.          elsewhere from 2 bits to 3 bits.  This bit is the high order bit.
  11957.  
  11958.          See {6.09.01} Miscellaneous Output Register.
  11959.  
  11960.          <=0>  Select normal clocks.
  11961.          <=1>  Select extended clocks.
  11962.  
  11963.  
  11964. <2..1>   Dot Clock Division Ratio Select
  11965.          -------------------------------
  11966.  
  11967.          The dot clock frequency can be selectively divided to provide other
  11968.          useful frequencies without need for additional oscillators.
  11969.  
  11970.          <=00>  No division.
  11971.          <=01>  Division ratio is 2.0
  11972.          <=10>  Division ratio is 4.0
  11973.          <=11>  Division ratio is 1.5
  11974.  
  11975.          See {6.04.03} Clocking Mode Register.
  11976.  
  11977.  
  11978. <3>      Software Status
  11979.          ---------------
  11980.  
  11981.          Read and write to this bit by software to store a binary status flag.
  11982.  
  11983.  
  11984. <5..4>   Software Status
  11985.          ---------------
  11986.  
  11987.          Read and write to these bits by software to store a pair of binary
  11988.          status flags.
  11989.  
  11990.  
  11991. <7..6>   General Purpose Outputs
  11992.          -----------------------
  11993.  
  11994.          No documented function.  There are two VGA controller chip outputs
  11995.          which can be used to control aspects of a subsystem as the designer
  11996.          wishes.  These bits control the logic levels on these two hardware
  11997.          lines.  Their use is therefore totally design specific.  These are
  11998.          Trident 8900 outputs only.
  11999.  
  12000.  
  12001. -----------------------------------------------------------------------------
  12002.  
  12003.  
  12004.  
  12005.  
  12006. -----------------------------------------------------------------------------
  12007.          Old Definition
  12008. -----------------------------------------------------------------------------
  12009.          See {6.10.02} Version Selector Register {old definition}.
  12010.  
  12011.  
  12012. <2..0>   Video Generation Mode Select
  12013.          ----------------------------
  12014.  
  12015.          <=000>  VGA mode {with analogue monitor} select.
  12016.          <=001>  Not used.
  12017.          <=010>  EGA mode {with analogue monitor} select.
  12018.          <=011>  EGA mode {with TTL monitor} select.
  12019.          <=100>  CGA, MDA, Hercules modes {with analogue monitor} select.
  12020.          <=101>  CGA, MDA, Hercules modes {with TTL monitor} select.
  12021.          <=110>  Not used.
  12022.          <=111>  Not used.
  12023.  
  12024.          These options can alter the significance of an option bit in
  12025.          another register.  {Multipurpose Select bit.}
  12026.  
  12027.          See {6.10.07} CRTC Module Testing Register.
  12028.  
  12029.  
  12030. <3>      Processor Bandwidth during Blanking
  12031.          -----------------------------------
  12032.  
  12033.          <=0>  Normal access.
  12034.          <=1>  Provide full bandwidth during blanking.
  12035.  
  12036.  
  12037. <4>      Memory Plane Architecture Select
  12038.          --------------------------------
  12039.  
  12040.          <=0>  Planes 0 .. 3 active.
  12041.          <=1>  Planes 0 .. 7 active.
  12042.  
  12043.  
  12044. <5>      DRAM Clock Control
  12045.  
  12046.          <=0>  Enable  DRAM clock.
  12047.          <=1>  Inhibit DRAM clock.
  12048.  
  12049.  
  12050. <7..6>   Character Set Select High Extend
  12051.          --------------------------------
  12052.  
  12053.          These bits are used to select the character set base address in the
  12054.          display image memory plane 2.  hey provide two high order bits such
  12055.          that 4 times the number of character fonts can be selected over the
  12056.          basic VGA architecture.
  12057.  
  12058.          See {6.04.05} Character Map Select Register.
  12059.  
  12060.  
  12061. -----------------------------------------------------------------------------
  12062.  
  12063.  
  12064.  
  12065.  
  12066. 6.10.05  Mode Control Register 1                     { 3c5h    0eh    R/W }
  12067. =======  ==================================================================
  12068.          Trident 8900 only
  12069. =======  ==================================================================
  12070.  
  12071. Cross reference with {6.04.06} Sequencer Memory Mode Register.
  12072. Cross reference with {6.05.14} Start Address High Register.
  12073. Cross reference with {6.05.15} Start Address Low Register.
  12074. Cross reference with {6.06.08} Miscellaneous Register.
  12075. Cross reference with {6.10.01} Hardware Version Register {new definition}.
  12076. Cross reference with {6.10.02} Version Selector Register {old definition}.
  12077. Cross reference with {6.10.03} Configuration Port Register 1.
  12078. Cross reference with {6.10.06} Power-up Mode Register 2.
  12079. Cross reference with {6.10.13} Source Address Register.
  12080. Cross reference with {6.10.14} Source Address Enable Register.
  12081.  
  12082.  
  12083.          This register has two different interpretations depending upon the
  12084.          last transaction to either of the following registers:
  12085.  
  12086.          See {6.10.01} Hardware Version Register {new definition}.
  12087.          See {6.10.02} Version Selector Register {old definition}.
  12088.  
  12089.          The interpretations and layout of the Source Address Register match
  12090.          exactly those for this register, provided the facility is enabled.
  12091.  
  12092.          See {6.10.13} Source Address Register.
  12093.          See {6.10.14} Source Address Enable Register.
  12094.  
  12095.  
  12096. -----------------------------------------------------------------------------
  12097.          New Definition
  12098. -----------------------------------------------------------------------------
  12099.          See {6.10.01} Hardware Version Register {new definition}.
  12100.  
  12101.  
  12102.          This new definition is suitable for high resolution graphics use.
  12103.          To use the features correctly, the processor display image memory
  12104.          must be set to hex 'a0000' for 64K bytes length.
  12105.  
  12106.          See {6.06.08} Miscellaneous Register.
  12107.  
  12108.  
  12109. <0>      Segment Selector
  12110.          ----------------
  12111.  
  12112.          <=0>  Select lower 64K of 128K page.
  12113.          <=1>  Select upper 64K of 128K page.
  12114.  
  12115.  
  12116. <1>      Page Selector
  12117.          -------------
  12118.  
  12119.          Caution!  These bits are WRITTEN with opposite polarity to that which
  12120.          is actually required.
  12121.  
  12122.          READ SENSE !
  12123.          <=0>  Selected bank is LOWER 128K of 256K bank.
  12124.          <=1>  Selected bank is upper 128K of 256K bank.
  12125.  
  12126.          WRITE SENSE !
  12127.          <=0>  Select UPPER 128K of 256K bank.
  12128.          <=1>  Select lower 128K of 256K bank.
  12129.  
  12130.  
  12131. <3..2>   Bank Selector
  12132.          -------------
  12133.  
  12134.          <=00>  Select 256K bank 0.  {Power on default, lowest memory bank}
  12135.          <=01>  Select 256K bank 1.
  12136.          <=10>  Select 256K bank 2.
  12137.          <=11>  Select 256K bank 3.  {Highest memory bank}
  12138.  
  12139.  
  12140. <6..4>   Software Status
  12141.          ---------------
  12142.  
  12143.          Read and write to these bits by software to store a triple of binary
  12144.          status flags.
  12145.  
  12146.          These bits can be made subject to write protection by the option
  12147.          Write Protection State, immediately below.
  12148.  
  12149.  
  12150. <7>      Write Protection State
  12151.          ----------------------
  12152.  
  12153.          This state controls write protection for Software Status, immediately
  12154.          above, in addition to some other registers.
  12155.  
  12156.          See {6.10.03} Configuration Port Register 1.
  12157.          See {6.10.06} Power-up Mode Register 2.
  12158.  
  12159.          <=0>  Write Protect.  {Default}
  12160.          <=1>  Write Permit.
  12161.  
  12162.  
  12163. -----------------------------------------------------------------------------
  12164.  
  12165.  
  12166.  
  12167.  
  12168. -----------------------------------------------------------------------------
  12169.          Old Definition
  12170. -----------------------------------------------------------------------------
  12171.          See {6.10.02} Version Selector Register {old definition}.
  12172.  
  12173.  
  12174. <0>      Display Access Bank Selector
  12175.          ----------------------------
  12176.  
  12177.          This bit controls addresses for display generation only,
  12178.          not for display image memory processor access.
  12179.  
  12180.          <=0>  Select lower 512K bank.  {Default}
  12181.          <=1>  Select upper 512K bank.
  12182.  
  12183.  
  12184. <2..1>   Processor Access Bank Selector
  12185.          ------------------------------
  12186.  
  12187.          This bit controls addresses for processor access only,
  12188.          not for display generation.
  12189.  
  12190.          <=00>  Select 256K bank 0.  {Power on default, lowest memory bank}
  12191.          <=01>  Select 256K bank 1.
  12192.          <=10>  Select 256K bank 2.
  12193.          <=11>  Select 256K bank 3.  {Highest memory bank}
  12194.  
  12195.  
  12196. <3>      DRAM Access Width
  12197.          -----------------
  12198.  
  12199.          <=0>  8 bit memory access.
  12200.          <=1>  16 bit memory access.
  12201.  
  12202.  
  12203. <4>      Reserved for Dot Clock Extended Select
  12204.          --------------------------------------
  12205.  
  12206.          Not implemented at present {Trident 8900}.
  12207.  
  12208.  
  12209. <5>      NMI State {Non Maskable Interrupt State}
  12210.          ----------------------------------------
  12211.  
  12212.          This state has influence over the interpretation of other registers.
  12213.  
  12214.          See {6.10.03} Configuration Port Register 1.
  12215.  
  12216.          <=0>  NMI Enable.
  12217.          <=1>  NMI Disable.
  12218.  
  12219.  
  12220. <6>      Interrupt Request Polarity Select
  12221.          ---------------------------------
  12222.  
  12223.          <=0>  Positive logic polarity.
  12224.          <=1>  Negative logic polarity.
  12225.  
  12226.  
  12227. <7>      Clock Pins Function Select
  12228.          --------------------------
  12229.  
  12230.          There are two clock pins available for the Trident 8900, which can be
  12231.          used either to select an external oscillator, or to accept oscillator
  12232.          outputs.  They are denoted CLK2, CLK3.
  12233.  
  12234.          When used to select an external oscillator these pins output from the
  12235.          VGA controller to the external environment.
  12236.  
  12237.          When accepting external oscillator generated clock signals, the pins
  12238.          act as input pins.
  12239.  
  12240.          <=0>  Select INPUT operation for CLK2, CLK3 pins.
  12241.          <=1>  Select OUTPUT operation for CLK2, CLK3 pins.
  12242.  
  12243.  
  12244. -----------------------------------------------------------------------------
  12245.  
  12246.  
  12247.  
  12248.  
  12249. 6.10.06  Power-up Mode Register 2                    { 3c5h    0fh    R/W }
  12250. =======  ==================================================================
  12251.          Trident 8900 only
  12252. =======  ==================================================================
  12253.  
  12254.  
  12255. Cross reference with {6.10.05} Mode Control Register 1. {New Definition}
  12256.  
  12257.  
  12258.  
  12259. <3..0>   DIP Switch Image
  12260.          ----------------
  12261.  
  12262.          These bits are a copy of the configuration DIP switch settings.
  12263.          Note the inverted polarity!
  12264.  
  12265.          <=0>  DIP switch is ON.
  12266.          <=1>  DIP switch is OFF.
  12267.  
  12268.  
  12269. <4>      Bus Protocol Select
  12270.          -------------------
  12271.  
  12272.          <=0>  Micro channel bus protocol is selected.
  12273.          <=1>  ISA PC/AT bus protocol is selected.
  12274.  
  12275.  
  12276. <5>      Input Output Address Map Select
  12277.          -------------------------------
  12278.  
  12279.          <=0>  Select alternate input output address map at hex '2xx'.
  12280.          <=1>  Select ISA input output address map at hex '3xx'.
  12281.  
  12282.  
  12283. <6>      ROM BIOS Address Decode Enable
  12284.          ------------------------------
  12285.  
  12286.          <=0>  ROM address decode is disabled.
  12287.          <=1>  ROM address decode is enabled.
  12288.  
  12289.  
  12290. <7>      ROM BIOS Data Path Width
  12291.          ------------------------
  12292.  
  12293.          <=0>  8 bit wide BIOS ROM.
  12294.          <=1>  16 bit BIOS ROM.
  12295.  
  12296.  
  12297.  
  12298.  
  12299. 6.10.07  CRTC Module Testing Register                { 3?5h    1eh    R/W }
  12300. =======  ==================================================================
  12301.          Trident 8900 only
  12302. =======  ==================================================================
  12303.  
  12304.  
  12305. Cross reference with {6.05.01} CRT Controller Address Register.
  12306. Cross reference with {6.05.02} Horizontal Total Register.
  12307. Cross reference with {6.05.03} Horizontal Display Enable End Register.
  12308. Cross reference with {6.05.04} Start Horizontal Blanking Register.
  12309. Cross reference with {6.05.05} End Horizontal Blanking Register.
  12310. Cross reference with {6.05.06} Start Horizontal Retrace Pulse Register.
  12311. Cross reference with {6.05.07} End Horizontal Retrace Register.
  12312. Cross reference with {6.05.08} Vertical Total Register.
  12313. Cross reference with {6.05.09} CRT Controller Overflow Register.
  12314. Cross reference with {6.05.10} Preset Row Scan Register.
  12315. Cross reference with {6.05.11} Maximum Scan Line Register.
  12316. Cross reference with {6.05.14} Start Address High Register.
  12317. Cross reference with {6.05.15} Start Address Low Register.
  12318. Cross reference with {6.05.18} Vertical Retrace Start Register.
  12319. Cross reference with {6.05.19} Vertical Retrace End Register.
  12320. Cross reference with {6.05.23} Start Vertical Blanking Register.
  12321. Cross reference with {6.05.24} End Vertical Blanking Register.
  12322. Cross reference with {6.05.25} CRTC Mode Control Register.
  12323. Cross reference with {6.09.01} Miscellaneous Output Register.
  12324. Cross reference with {6.10.04} Mode Control Register 2. {Old Definition}
  12325.  
  12326.  
  12327. <0>      Horizontal Clock Select
  12328.          -----------------------
  12329.  
  12330.          <=0>  Normal operation.  {Power on default}
  12331.          <=1>  Manufacturing test.
  12332.  
  12333.  
  12334. <1>      Character Clock Select
  12335.          ----------------------
  12336.  
  12337.          <=0>  Normal operation.  {Power on default}
  12338.          <=1>  Manufacturing test.
  12339.  
  12340.  
  12341. <2>      Interlace Enable
  12342.          ----------------
  12343.  
  12344.          <=0>  Non-interlace display generation mode.  {Power on default}
  12345.          <=1>  Interlace display generation mode.
  12346.  
  12347.  
  12348. <3>      Multipurpose Select
  12349.          -------------------
  12350.  
  12351.          --------------------------------------------------------------------
  12352.  
  12353.          Vertical Retrace Clock Edge Select
  12354.          ==================================
  12355.  
  12356.          This operates only in CGA, MDA modes.
  12357.  
  12358.          See {6.10.04} Mode Control Register 2. {Old Definition}
  12359.  
  12360.          <=0>  Vertical retrace on rising clock edge.  {Power on default}
  12361.          <=1>  Vertical retrace on falling clock edge.
  12362.  
  12363.          --------------------------------------------------------------------
  12364.  
  12365.          Font Load Address Select
  12366.          ========================
  12367.  
  12368.          This operates only in EGA, VGA modes.
  12369.  
  12370.          See {6.10.04} Mode Control Register 2. {Old Definition}
  12371.  
  12372.          <=0>  Load from low address.
  12373.          <=1>  Load from high address.
  12374.  
  12375.          --------------------------------------------------------------------
  12376.  
  12377.  
  12378. <4>      CRT Controller Register Protection State
  12379.          ----------------------------------------
  12380.  
  12381.          <=0>  No protection.  {Power on default}
  12382.          <=1>  Protection applied.
  12383.  
  12384.  
  12385.          The following register indexes are protected:
  12386.  
  12387.  
  12388.          Register Index
  12389.          ===-----------
  12390.  
  12391.                 Bit Numbers
  12392.          ===    ===--------
  12393.  
  12394.                        Register Description and Bit Description
  12395.          ===    ===    ========================================----------------
  12396.  
  12397.          00h    0-7    {6.05.02} Horizontal Total Register.
  12398.  
  12399.          01h    0-7    {6.05.03} Horizontal Display Enable End Register.
  12400.  
  12401.          02h    0-7    {6.05.04} Start Horizontal Blanking Register.
  12402.  
  12403.          03h    0-7    {6.05.05} End Horizontal Blanking Register.
  12404.  
  12405.          04h    0-7    {6.05.06} Start Horizontal Retrace Pulse Register.
  12406.  
  12407.          05h    0-7    {6.05.07} End Horizontal Retrace Register.
  12408.  
  12409.          06h    0-7    {6.05.08} Vertical Total Register.
  12410.  
  12411.          07h    0-7    {6.05.09} CRT Controller Overflow Register.
  12412.  
  12413.          09h     7     {6.05.11} Maximum Scan Line Register.
  12414.                          bit --> Double Scan Line Display.
  12415.  
  12416.          10h    0-7    {6.05.18} Vertical Retrace Start Register.
  12417.  
  12418.          11h    0-7    {6.05.19} Vertical Retrace End Register.
  12419.  
  12420.          15h    0-7    {6.05.23} Start Vertical Blanking Register.
  12421.  
  12422.          16h    0-7    {6.05.24} End Vertical Blanking Register.
  12423.  
  12424.          17h     2     {6.05.25} CRTC Mode Control Register.
  12425.                          bit --> Horizontal Retrace Divisor.
  12426.  
  12427.          ----------------------------------------------------------------------
  12428.  
  12429.  
  12430. <5>      Start Address Extension Bit 16
  12431.          ------------------------------
  12432.  
  12433.          This feature must be enabled.  See Start Address Extension Enable,
  12434.          almost immediately below.
  12435.  
  12436.          See {6.05.14} Start Address High Register.
  12437.          See {6.05.15} Start Address Low Register.
  12438.  
  12439.  
  12440. <6>      Miscellaneous Output Register Protect State
  12441.          -------------------------------------------
  12442.  
  12443.          <=0>  No protection.  {Power on default}
  12444.          <=1>  Protection applied.
  12445.  
  12446.          See {6.09.01} Miscellaneous Output Register.
  12447.  
  12448.  
  12449.  
  12450. <7>      Start Address Extension Enable
  12451.          ------------------------------
  12452.  
  12453.          This feature is not an ISA feature, so must be specially enabled by
  12454.          means of this option setting, before use.
  12455.  
  12456.          <=0>  Disable start address extension bit 16.
  12457.          <=1>  Enable start address extension bit 16.
  12458.  
  12459.  
  12460.  
  12461.  
  12462. 6.10.08  Software Programming Register               { 3?5h    1fh    R/W }
  12463. =======  ==================================================================
  12464.          Trident 8900 only
  12465. =======  ==================================================================
  12466.  
  12467.  
  12468. Cross reference with {6.05.01} CRT Controller Address Register.
  12469.  
  12470.  
  12471.          This register provides means for storage and retrieval of software
  12472.          status associated, typically, with BIOS operation.
  12473.  
  12474.  
  12475. <1..0>   Reserved for BIOS use.
  12476.          ----------------------
  12477.  
  12478.          <=00>  Memory size is 256K bytes.
  12479.          <=01>  Memory size is 512K bytes.
  12480.          <=10>  Memory size is 768K bytes.
  12481.          <=11>  Memory size is 1024K bytes.
  12482.  
  12483.  
  12484. <3..2>   Software Status Bits
  12485.          --------------------
  12486.  
  12487.          Used for software defined purposes.
  12488.  
  12489.  
  12490. <7..4>   Reserved for BIOS use.  Do NOT disturb.
  12491.          ---------------------------------------
  12492.  
  12493.  
  12494.  
  12495.  
  12496. 6.10.09  CPU Latch Read Back Register                { 3?5h    22h    R-- }
  12497. =======  ==================================================================
  12498.          standard register officially undocumented
  12499. =======  ==================================================================
  12500.  
  12501.  
  12502. Cross reference with {6.06.02} Set/Reset Register.
  12503. Cross reference with {6.06.06} Read Map Select Register.
  12504. Cross reference with {6.06.07} Graphics Mode Register.
  12505.  
  12506.  
  12507.          This is a standard VGA controller register which was never
  12508.          officially documented.
  12509.  
  12510.  
  12511. <7..0>   CPU Latch Read Back
  12512.          -------------------
  12513.  
  12514.          This register provides access to the four data latches used in the
  12515.          data path between the processor and the display image memory.  The
  12516.          latch number directly associates with the image memory plane which
  12517.          receives data from the latch during memory writes by the processor
  12518.          so this plane is specified by the Read Map Select Register.
  12519.  
  12520.          See {6.06.02} Set/Reset Register.
  12521.          See {6.06.06} Read Map Select Register.
  12522.          See {6.06.07} Graphics Mode Register.
  12523.  
  12524.  
  12525.  
  12526.  
  12527. 6.10.10  Attribute State Read Back Register          { 3?5h    24h    R-- }
  12528. =======  ==================================================================
  12529.          standard register officially undocumented
  12530. =======  ==================================================================
  12531.  
  12532.  
  12533. Cross reference with {6.07.01} Attribute Address Register.
  12534. Cross reference with {6.10.11} Attribute Index Read Back Register.
  12535.  
  12536.  
  12537.          This is a standard VGA controller register which was never
  12538.          officially documented.
  12539.  
  12540.  
  12541. -------------------------------------------------------------------------------
  12542.          standard register officially undocumented
  12543. -------------------------------------------------------------------------------
  12544.  
  12545.  
  12546. <4..0>   Attribute Controller Index
  12547.          --------------------------
  12548.  
  12549.          This provides the index value which selects an attribute controller
  12550.          register so that the processor can obtain access.  This value is
  12551.          defined by writing to the attribute controller address register and
  12552.          the appropriate internal associated state must be defined.
  12553.  
  12554.          See {6.07.01} Attribute Address Register.
  12555.  
  12556.  
  12557. <5>      Colour Palette Address Source {Internal palette}
  12558.          -----------------------------
  12559.  
  12560.          <=0>  Colour palette is accessed only by the processor, no video can
  12561.                be generated.
  12562.  
  12563.          <=1>  Colour palette generates video, processor access is denied.
  12564.  
  12565.  
  12566. <6>      Reserved.
  12567.          ---------
  12568.  
  12569.  
  12570. <7>      Attribute State Read Back
  12571.          -------------------------
  12572.  
  12573.          <=0>  This specifies that the Attribute controller is set to point to
  12574.                the attribute controller address register.  This permits a new
  12575.                attribute controller register index value to be specified.
  12576.  
  12577.          <=1>  This specifies that the Attribute controller is set to point to
  12578.                one particular internal attribute controller register.  This is
  12579.                specified by the index value in the address register, and it is
  12580.                this indexed register which will be accessed by the processor.
  12581.  
  12582.  
  12583. -------------------------------------------------------------------------------
  12584.  
  12585.  
  12586.  
  12587.  
  12588. -------------------------------------------------------------------------------
  12589.          Trident 8900 only
  12590. -------------------------------------------------------------------------------
  12591.          See {6.10.11} Attribute Index Read Back Register.
  12592.  
  12593.  
  12594. <6..0>   Reserved.  Undefined.
  12595.          ---------------------
  12596.  
  12597.  
  12598. <7>      Attribute State Read Back
  12599.          -------------------------
  12600.  
  12601.          <=0>  This specifies that the Attribute controller is set to point to
  12602.                the attribute controller address register.  This permits a new
  12603.                attribute controller register index value to be specified.
  12604.  
  12605.          <=1>  This specifies that the Attribute controller is set to point to
  12606.                one particular internal attribute controller register.  This is
  12607.                specified by the index value in the address register, and it is
  12608.                this indexed register which will be accessed by the processor.
  12609.  
  12610.  
  12611. -------------------------------------------------------------------------------
  12612.  
  12613.  
  12614.  
  12615.  
  12616. 6.10.11  Attribute Index Read Back Register          { 3?5h    26h    R-- }
  12617. =======  ==================================================================
  12618.          Trident 8900 only
  12619. =======  ==================================================================
  12620.  
  12621.  
  12622. Cross reference with {6.07.01} Attribute Address Register.
  12623. Cross reference with {6.10.10} Attribute State Read Back Register.
  12624.  
  12625.  
  12626. <4..0>   Attribute Index
  12627.          ---------------
  12628.  
  12629.          This binary field indicates the index value which determines which of
  12630.          the internal registers will be accessed by the processor assuming the
  12631.          correct required internal state is present.
  12632.  
  12633.          See {6.07.01} Attribute Address Register.
  12634.  
  12635.          An alternative ISA register may be available on non-Trident hardware,
  12636.          which may provide a slightly more standard way to obtain this data.
  12637.  
  12638.          See {6.10.10} Attribute State Read Back Register.
  12639.  
  12640.  
  12641. <7..5>   Reserved.
  12642.          ---------
  12643.  
  12644.  
  12645.  
  12646.  
  12647. 6.10.12  Clear Vertical Display Enable Register      { 3?5h    3nh    W-- }
  12648. =======  ==================================================================
  12649.          standard register officially undocumented
  12650. =======  ==================================================================
  12651.  
  12652.  
  12653. Note: the index address 'n' indicates any value, that is, a don't care value.
  12654.  
  12655.  
  12656. Cross reference with {6.05.01} CRT Controller Address Register.
  12657. Cross reference with {6.05.08} Vertical Total Register.
  12658. Cross reference with {6.05.20} Vertical Display Enable End Register.
  12659.  
  12660.  
  12661.          This is a standard VGA controller register which was never
  12662.          officially documented.
  12663.  
  12664.  
  12665. <0>      Clear Vertical Display Enable
  12666.          -----------------------------
  12667.  
  12668.          <=0>  Do not clear the vertical display enable state.
  12669.  
  12670.                See {6.05.08} Vertical Total Register.
  12671.                See {6.05.20} Vertical Display Enable End Register.
  12672.  
  12673.          <=1>  Clear the vertical display enable state.  This has the effect
  12674.                of immediately blanking the screen and causes the generation
  12675.                of display data to terminate.  The sequencer then changes the
  12676.                image memory timing so permitting greater bandwidth access by
  12677.                the processor.  The display will be subject to disturbance if
  12678.                appropriate synchronisation is not provided.  In any case the
  12679.                use of this facility will produce some flicker.
  12680.  
  12681.                The character row counter achievement of the vertical total in
  12682.                the usual manner will set the vertical display enable state so
  12683.                permitting normal production of the following display frame.
  12684.  
  12685.                See {6.05.08} Vertical Total Register.
  12686.                See {6.05.20} Vertical Display Enable End Register.
  12687.  
  12688.                This might be used to temporarily increase the processor speed
  12689.                of image update at the expense of display disturbance.
  12690.  
  12691.  
  12692.  
  12693. <7..1>   Unused.  Any value can be present.
  12694.          ----------------------------------
  12695.  
  12696.  
  12697.  
  12698.  
  12699. 6.10.13  Source Address Register                     { 3cfh    0eh    R/W }
  12700. =======  ==================================================================
  12701.          Trident 8900 only
  12702. =======  ==================================================================
  12703.  
  12704.  
  12705. Cross reference with {6.10.05} Mode Control Register 1.
  12706. Cross reference with {6.10.14} Source Address Enable Register.
  12707.  
  12708.  
  12709.          There is a difficulty of low speed when manipulating large graphics
  12710.          images across memory bank boundaries.  This arises when an image is
  12711.          located in a number of display memory banks, only one of which will
  12712.          be accessible to the processor at any given moment.
  12713.  
  12714.          In this situation, it is often required to copy a part of the image
  12715.          from one bank into another.  This entails performing a read, then a
  12716.          change of processor mapping into the display memory following which
  12717.          a corresponding processor write can take place.
  12718.  
  12719.          Needless to say, this whole operation is cumbersome in the extreme.
  12720.  
  12721.          For this reason, it is possible to specify a source and destination
  12722.          bank selection invoked by processor read write access respectively.
  12723.          In this way any processor read is directed to the source address in
  12724.          the source bank while a write access is directed to the destination
  12725.          bank in similar manner.
  12726.  
  12727.          This Source Address Register specifies the details of the source
  12728.          address, while the Mode Control Register 1 specifies all details
  12729.          for the destination address.
  12730.  
  12731.          See {6.10.05} Mode Control Register 1.
  12732.  
  12733.          This facility must be enabled appropriately before use, since it is
  12734.          not a standard VGA controller capability.
  12735.  
  12736.          See {6.10.14} Source Address Enable Register.
  12737.  
  12738.  
  12739.  
  12740.  
  12741. 6.10.14  Source Address Enable Register              { 3cfh    0fh    R/W }
  12742. =======  ==================================================================
  12743.          Trident 8900 only
  12744. =======  ==================================================================
  12745.  
  12746.  
  12747. Cross reference with {6.10.05} Mode Control Register 1.
  12748. Cross reference with {6.10.13} Source Address Register.
  12749.  
  12750.  
  12751.          This register controls the apparent existance of a very useful feature
  12752.          which can greatly speed up graphics programming image manipulations if
  12753.          correctly used.
  12754.  
  12755.          See {6.10.05} Mode Control Register 1.
  12756.          See {6.10.13} Source Address Register.
  12757.  
  12758.  
  12759. <0>      Source Address Enable
  12760.          ---------------------
  12761.  
  12762.          <=0>  Disable the Source Address Register.
  12763.          <=1>  Enable the  Source Address Register.
  12764.  
  12765.  
  12766. <7..1>   Reserved.  Always <=0000000>.
  12767.          -----------------------------
  12768.  
  12769.  
  12770.  
  12771.  
  12772. 6.s   Summary
  12773. ====  =======
  12774.  
  12775. Details have been given of some special registers which provide for the most
  12776. part, proprietary features concerned with VGA architecture extension.  These
  12777. proprietary details relate in this case to the Trident 8900 chip.
  12778.  
  12779. There are however, certain features described here which are standard in that
  12780. the ISA contains these features, yet they remain officially undocumented.  It
  12781. has only been possible to decide on their existance, by means of a program of
  12782. reverse engineering.  This analyses a semiconductor chip in order to obtain a
  12783. complete logic schematic from the circuit physical structure.
  12784.  
  12785. Using these undocumented yet standard features may cause difficulty because
  12786. companies which design their compatible products on the basis of documented
  12787. interfaces may not have performed the reverse engineering necessary to make
  12788. a fully hardware compatible product.
  12789.  
  12790. The simple fact is with a device as complex as the VGA controller, it is very
  12791. important to obtain original technical material before starting any serious
  12792. programming work.  Most importantly, before purchase of a VGA controller, is
  12793. the possibility for review of such technical material as may be available in
  12794. order to assess it for quality.
  12795.  
  12796.  
  12797.  
  12798.  
  12799. 7.    VGA controller: architecture
  12800. ====  ============================
  12801.  
  12802.  
  12803. 7.01  Controller timing generator:  { Sequencer }
  12804. ====  ===========================================
  12805.  
  12806.  
  12807. The video graphics array controller is a complex collection of distinct logic
  12808. blocks each of which has various connections to other such blocks.  Since the
  12809. notion of time used by each logic block must agree with that used by associated
  12810. blocks a special set of timing, that is, clock pulses is distributed throughout
  12811. the device.  Each clock pulse keeps all the logic which uses it in common step,
  12812. so that all the events which must be maintained in lock-step remain so at all
  12813. times.  This is the purpose of a clock pulse.  It regulates the changing flow
  12814. of events within a logic circuit.
  12815.  
  12816. There will be more than one clock pulse needed by such a complex device as the
  12817. VGA controller chip, so it becomes important for each clock pulse to maintain
  12818. a particular relationship with all other clock pulses.  This is so as to permit
  12819. the reliable and timely flow of information between circuitry which determines
  12820. events using distinct time scales.  These time scales are naturally represented
  12821. by the different periods associated with each of the separate clock pulses.  As
  12822. an example of just two distinct time scales we will be interested in using, we
  12823. can think of the horizontal and vertical synchronisation pulses that the image
  12824. generator regularly sends to a display unit.  In this way, we can see that the
  12825. synchronisation signals are really just special clock pulses sent by the image
  12826. generator to the display unit in order to keep the display unit in lock-step,
  12827. therefore ensuring the correct image is displayed at all times.
  12828.  
  12829. There are essentially two distinct image generation modes available.  Text mode
  12830. creates a text image on the display, possibly using a variety of character sets
  12831. whilst graphics mode dispenses with characters, and presents purely graphical
  12832. images.  These two modes are handled quite differently within the controller.
  12833. Note that it is still possible to present text for display while using graphics
  12834. modes, but in this case, software will have to prepare the character outlines
  12835. ready for display.  The distinction between graphics mode presentation of text
  12836. and text mode presentation of text is simply that in the latter, hardware takes
  12837. care of all the character formation chores, which results in much faster output
  12838. of text than would be possible using software in graphics mode.  Of course, it
  12839. is only possible to create text in text mode, whereas text and graphics can be
  12840. created in graphics mode.
  12841.  
  12842. The sequencer generates a number of timing signals, that is, clock pulses.  We
  12843. list the more interesting ones below:-
  12844.  
  12845.   1.  Dot_clock
  12846.   2.  Character_clock
  12847.  
  12848. The dot clock is the fundamental unit of timing from which all other timing is
  12849. derived for image generation.  This clock defines the amount of time available
  12850. for displaying one pixel.  It therefore determines the image information output
  12851. frequency from the image generator to the display unit.  Each time this clock
  12852. marks a new pixel period, the image generator must transmit all information for
  12853. defining the next pixel to the display.  {There is one exception to this which
  12854. distinguishes 256 colour packed pixel mode from other graphics display modes.}
  12855.  
  12856. Facilities are provided to change the oscillator associated with the dot clock
  12857. which has the effect of selecting a different dot clock frequency.  Also it is
  12858. possible to invoke a frequency division on the selected oscillator frequency,
  12859. in order to produce new frequencies without using more oscillator units.
  12860.  
  12861. The character clock is derived from the dot clock, and one period of this clock
  12862. represents the width of a single character output to the display unit.  This is
  12863. only relevant when the image generator is operating in text mode. The character
  12864. clock can either represent characters of width 8 pixels width, or alternatively
  12865. of 9 pixels width.
  12866.  
  12867. The character clock represents the unit of timing for display unit purposes and
  12868. this is true in either of text display mode or graphics display mode.
  12869.  
  12870.  
  12871.  
  12872.  
  12873. 7.02  Display timing generator:  { CRT Controller }
  12874. ====  =============================================
  12875.  
  12876.  
  12877. The Cathode Ray Tube Controller accepts the Character_clock from the Sequencer
  12878. and generates the synchronisation signals required to keep the display unit in
  12879. lock-step with the image generator.  All the timing for horizontal and vertical
  12880. synchronisation is defined in terms of character widths.  For this reason, the
  12881. CRT Controller is also responsible for generating the hardware cursor which can
  12882. only appear in character aligned positions within the display image.  Some of
  12883. the signals developed by the CRT controller are:
  12884.  
  12885.   1.  Horizontal Synchronisation
  12886.   2.  Horizontal Blanking
  12887.   3.  Vertical Synchronisation
  12888.   4.  Vertical Blanking
  12889.   5.  Display Enable
  12890.   6.  Cursor Enable
  12891.   7.  Underline Enable
  12892.   8.  Increment Horizontal Character Counter
  12893.   9.  Reset Horizontal Character Counter
  12894.  10.  Increment Character Row Counter
  12895.  11.  Reset Character Row Counter
  12896.  12.  Increment Character Font Scan Line Counter
  12897.  13.  Reset Character Font Scan Line Counter
  12898.  14.  Increment Display Memory Address Counter
  12899.  15.  Reset Display Memory Address Counter
  12900.  
  12901. The effect of these signals is explored fully, in the main body of the text.
  12902. These control the intimate details of all information required from display
  12903. image memory in text or graphics mode display generation.  A display address
  12904. is generated by the CRT Controller which then provides the display image data
  12905. to the graphics controller, and thence to the attribute controller.
  12906.  
  12907.  
  12908.  
  12909.  
  12910. 7.03  Image information processor:  { Graphics Controller }
  12911. ====  =====================================================
  12912.  
  12913.  
  12914. The Graphics Controller acts as an interface between the processor and display
  12915. image memory, and also between the CRT Controller and display image memory.  A
  12916. simultaneous access attempt by both the processor and the CRT Controller gives
  12917. the access to the CRT Controller in all cases.
  12918.  
  12919. The Graphics Controller provides the processor with extensive image processing
  12920. ability for various graphics display modes which are available.  Facilities to
  12921. efficiently process multiplane image data are provided, with very low overhead.
  12922.  
  12923. The Graphics Controller provides pixel panning capability for generated image
  12924. data, which does not depend upon text mode or graphics mode operation.  Shift
  12925. registers provide conversion of multiplane display image memory format to the
  12926. serial multiplane parallel format required by the attribute controller.  They
  12927. have special functionality built in so that a wide range of these conversions
  12928. can be easily handled.  Shift register interconnections and architecture will
  12929. change depending upon the graphics mode in use.
  12930.  
  12931.  
  12932.  
  12933.  
  12934. 7.04  Image presentation processor:  { Attribute Controller }
  12935. ====  =======================================================
  12936.  
  12937.  
  12938. The Attribute Controller accepts image data from the Graphics Controller and
  12939. processes it before sending it out to the digital to analogue converters for
  12940. final display.  This involves performing colour selection code translation,
  12941. so that less image memory can be used for storage of images which use small
  12942. sets of colours.  The translation uses an internal colour palette register
  12943. which accepts a 4 bit colour code and produces either a 4 or 6 bit output.
  12944.  
  12945. Bit shift pixel panning is implemented, to be used in conjuction with those
  12946. complementary facilities provided by the Graphics Controller.  Selection of
  12947. display colour during blanking periods is also performed.
  12948.  
  12949. In text mode display generation, the attribute byte which is associated with
  12950. every text character is processed into the video data, to provide a blinking
  12951. cursor, underlining of text, and colour selection functions.
  12952.  
  12953. The output from the Attribute Controller is a stream of 8 bit wide image data
  12954. which specifies a pixel colour, suitable for input to the DAC Support Logic.
  12955.  
  12956.  
  12957.  
  12958.  
  12959. 7.05  Colour presentation processor:  { DAC Support Logic }
  12960. ====  =====================================================
  12961.  
  12962.  
  12963. The Digital to Analogue Converter support logic accepts 8 bit colour data, and
  12964. translates it into either 18 bit or 24 bit colour data, to drive three primary
  12965. colour electron guns in the display unit.  The translation is performed with a
  12966. large look-up table memory unit, termed the external colour palette.  This can
  12967. control the displayed colour set with a great degree of finess.  There is also
  12968. the possibility provided to edit some of the 8 bits of input data substituting
  12969. zero bits for data bits on option.  This provides for animation effects or for
  12970. multiple image storage with very fast recall.  This can be very useful for the
  12971. support of hierarchical design systems.
  12972.  
  12973.  
  12974.  
  12975.  
  12976. 7.s   Summary
  12977. ====  =======
  12978.  
  12979.  
  12980. A very brief sketch has been given for each of the major logic blocks involved
  12981. in producing a display image from data supplied by a processor.  The functions
  12982. described are explored in considerable detail in the main body of the text.
  12983.  
  12984.  
  12985.  
  12986.  
  12987. 8.    VGA controller: Text
  12988. ====  ====================
  12989.  
  12990. 8.01  Text image generation
  12991. 8.02  Text font representation
  12992. 8.03  Text attribute representation
  12993. 8.04  Text character set extensions
  12994. 8.05  Text mode support for graphics
  12995.  
  12996.  
  12997.       Chapter in preparation.  Should be available for second edition.
  12998.       ----------------------------------------------------------------
  12999.  
  13000.  
  13001.  
  13002.  
  13003. 9.    VGA controller: Graphics
  13004. ====  ========================
  13005.  
  13006. 9.01  Graphic image generation
  13007. 9.02  Graphic multi-plane memory
  13008. 9.03  Graphic packed pixel memory
  13009. 9.04  Graphic line drawing
  13010. 9.05  Graphic object drawing
  13011.  
  13012.  
  13013.       Chapter in preparation.  Should be available for second edition.
  13014.       ----------------------------------------------------------------
  13015.  
  13016.  
  13017.  
  13018.  
  13019. 10.    VGA controller: Hardware Interface
  13020. ===    ==================================
  13021.  
  13022.  
  13023. 10.01  Hardware connector layout
  13024. =====  =========================
  13025.  
  13026.  
  13027. This information is provided for completeness only.  It is intended only as a
  13028. guide.  Further information should be sought if either serious design work or
  13029. diagnostic work needs to be performed.
  13030.  
  13031. The VGA subsystem pulls the Identity signal lines to +5V through a resistor.
  13032. The display then selectively connects these lines to ground.  The VGA then
  13033. detects the signal level and interprets the code in the appropriate manner.
  13034. Details are available on the coding scheme employed.
  13035.  
  13036. See {10.03} Monitor auto-configuration operation.
  13037.  
  13038.  
  13039.  
  13040.  
  13041.        Video Connector Pinouts
  13042.        =======================
  13043.  
  13044.  
  13045.        Pin Number  { 9 pin connector }
  13046.        ==-----------------------------
  13047.  
  13048.              Pin Number  { standard 15 pin connector }
  13049.        ==    ==---------------------------------------
  13050.  
  13051.                    Signal Description
  13052.        ==    ==    ==================---------------------------------------
  13053.  
  13054.  
  13055.         1     1    Red intensity             {analogue 75 ohms}
  13056.         2     2    Green intensity           {analogue 75 ohms}
  13057.         3     3    Blue intensity            {analogue 75 ohms}
  13058.         -     4    Identity bit 2            {logic pullup to +5V by VGA}
  13059.         -     5    Self test / must be grounded for use with 9 pin connector
  13060.         6     6    Red intensity ground      {analogue 75 ohms}
  13061.         7     7    Green intensity ground    {analogue 75 ohms}
  13062.         8     8    Blue intensity ground     {analogue 75 ohms}
  13063.         -     9    -  no connection
  13064.         9    10    Synch ground
  13065.         -    11    Identity bit 0            {logic pullup to +5V by VGA}
  13066.         -    12    Identity bit 1            {logic pullup to +5V by VGA}
  13067.         4    13    Horizontal synch
  13068.         5    14    Vertical synch
  13069.         -    15    -  no connection
  13070.  
  13071.  
  13072.        ---------------------------------------------------------------------
  13073.  
  13074.  
  13075.  
  13076.  
  13077. 10.02  Monitor auto-detection operation
  13078. =====  ================================
  13079.  
  13080.  
  13081. A VGA subsystem can be arranged to detect whether a monochrome display unit or
  13082. alternatively, a colour display unit is in use.  This is made possible through
  13083. sensing the current flow in the lines carrying the analogue red green and blue
  13084. pixel intensity signals from the image generator to the display unit.
  13085.  
  13086. A colour display unit will make use of each one of these three signals, which
  13087. can be detected by suitable hardware measurement of current flow.  However, a
  13088. monochrome display unit will only use the green signal.  This difference will
  13089. cause the video subsystem to select an operational mode suitable for the unit
  13090. in use.
  13091.  
  13092. A simplified schematic is given below showing the arrangement provided for the
  13093. measurement of output current.  Note that the software must read the status at
  13094. the active video image generation time within a scan line.  This is decided by
  13095. means of the display enable status bit.  This bit should be monitored so as to
  13096. achieve synchonism with the program.  Then, the measurement can be confidently
  13097. made during the active display period of the horizontal scan.  This involves a
  13098. synchronisation with the vertical retrace so that the complete activity of the
  13099. display can be accurately predicted in advance of the measurement.
  13100.  
  13101. See {6.09.04} Input Status Register One.
  13102.  
  13103. The software interface for this hardware detection operation is provided by a
  13104. single status bit.
  13105.  
  13106. See {6.09.03} Input Status Register Zero.
  13107.  
  13108.  
  13109.  
  13110.  
  13111.        Schematic of Video Output Current Measurement
  13112.        =============================================
  13113.  
  13114.  
  13115.  
  13116.  
  13117.        ---------
  13118.        | DAC   |                   Red into
  13119.        | RED   |...........r....>  Display
  13120.        ---------           |       Unit
  13121.                            |
  13122.                            |
  13123.                            |
  13124.        ---------           |
  13125.        | DAC   |           |       Green into
  13126.        | GREEN |........g.......>  Display
  13127.        ---------        |  |       Unit
  13128.                         |  |
  13129.                         |  |
  13130.                         |  |
  13131.        ---------        |  |
  13132.        | DAC   |        |  |       Blue into
  13133.        | BLUE  |.....b..........>  Display
  13134.        ---------     |  |  |       Unit
  13135.                      |  |  |
  13136.                      |  |  |
  13137.                      |  |  |
  13138.                      |  |  |
  13139.                      |  |  |      |-----*
  13140.        ---------     |  |  r....>.| +      *
  13141.        | VOLT  |     |  |         | compare   *............
  13142.        | REFER-|..v.............>.| -      *              |
  13143.        | ENCE  |  |  |  |         |-----*                 |
  13144.        ---------  |  |  |                                 |
  13145.                   |  |  |                                 |
  13146.                   |  |  |                                 |
  13147.                   |  |  |                                 |
  13148.                   |  |  |         |-----*                 |
  13149.                   |  |  g.......>.| +      *              |
  13150.                   |  |            | compare   *.........  |
  13151.                   v.............>.| -      *           |  |
  13152.                   |  |            |-----*              |  |
  13153.                   |  |                                 |  |
  13154.                   |  |                                 |  |
  13155.                   |  |                                 |  |
  13156.                   |  |                                 |  |
  13157.                   |  |            |-----*              |  |
  13158.                   |  b..........>.| +      *           |  |
  13159.                   |               | compare   *......  |  |
  13160.                   v.............>.| -      *        |  |  |
  13161.                                   |-----*           |  |  |
  13162.                                                     |  |  |
  13163.                                                     |  |  |
  13164.                                                     |  |  |
  13165.                                                     |  |  |
  13166.                                                  =============
  13167.                                                     NOR GATE
  13168.                                                  =============
  13169.                                                        |
  13170.                                                        |
  13171.                                                        |
  13172.                                                        |
  13173.                                                        |
  13174.                                                =================
  13175.  
  13176.                                                STATUS BIT OUTPUT
  13177.  
  13178.                                                =================
  13179.  
  13180.  
  13181.        ---------------------------------------------------------
  13182.  
  13183.  
  13184.  
  13185.  
  13186. 10.03  Monitor auto-configuration operation
  13187. =====  ====================================
  13188.  
  13189.  
  13190. There is another means for determining the type of display unit attached to a
  13191. VGA subsystem.  This depends on a simple code provided by the display unit to
  13192. the VGA subsystem, according to a predefined convention.
  13193.  
  13194.  
  13195.        Identity bit 2
  13196.        =-------------
  13197.  
  13198.             Identity bit 1
  13199.        =    =-------------
  13200.  
  13201.                  Identity bit 0
  13202.        =    =    =-------------
  13203.  
  13204.                       Significance
  13205.        =    =    =    ============--------------------------------------
  13206.  
  13207.  
  13208.        0    0    0    --  unassigned
  13209.  
  13210.        0    0    1    --  unassigned
  13211.  
  13212.        0    1    0    Interlaced colour display unit is connected
  13213.  
  13214.        0    1    1    --  unassigned
  13215.  
  13216.        1    0    0    --  unassigned
  13217.  
  13218.        1    0    1    Monochrome display unit is connected
  13219.  
  13220.        1    1    0    Non-interlaced colour display unit is connected
  13221.  
  13222.        1    1    1    No display unit connected to VGA subsystem
  13223.  
  13224.  
  13225.        -----------------------------------------------------------------
  13226.  
  13227.  
  13228. Note that strapping an identity signal line to ground has the effect of sending
  13229. a binary zero to the VGA subsystem sensing logic.
  13230.  
  13231. See {10.01} Hardware connector layout.
  13232.  
  13233.  
  13234.  
  13235.  
  13236. 10.s   Summary
  13237. ====   =======
  13238.  
  13239.  
  13240. A brief description of some of the hardware connections between a VGA subsystem
  13241. and a corresponding display unit has been given.
  13242.  
  13243.  
  13244.  
  13245.  
  13246. References  {in alphabetic order by company name}
  13247. ===============================================================================
  13248.  
  13249.  
  13250. 001    82C456 Enhanced Flat Panel/CRT VGA Controller Data Sheet
  13251.        Chips and Technologies Inc.
  13252.  
  13253.  
  13254. 002    HT216 VGA Controller
  13255.        Headland Technology Inc.
  13256.  
  13257.  
  13258. 003    iAPX 86/88, 186/188 User's Manual, Programmer's Reference
  13259.        Intel Corporation
  13260.  
  13261.  
  13262. 004    TVGA8900C Technical Reference Manual
  13263.        Trident Microsystems
  13264.  
  13265.  
  13266. 005    Computer IC's 1990-1991 Data Book
  13267.        United Microelectronics Corporation
  13268.  
  13269.  
  13270. 006    WD90C20/WD90C22 VGA Flat Panel Display Controllers
  13271.        Western Digital Corporation
  13272.  
  13273.  
  13274. 007    Many other documents were consulted, being too numerous to mention.
  13275.        These generally clarified only a single point, which in many cases
  13276.        could only be understood in combination with many other documents.
  13277.        It is felt that mentioning all of these could only add to the very
  13278.        great confusion surrounding this whole area of subject matter.  In
  13279.        some cases documents were found to be self contradictory.  Some of
  13280.        the documents were found to be factually correct, but no framework
  13281.        was provided for practical use and understanding of the material.
  13282.  
  13283.        Very often, there was no cross reference between different aspects
  13284.        of the VGA operation.  This presents what is felt by the author to
  13285.        be a difficult situation.  It is hoped that this work will address
  13286.        the worst of these problems, and provide a useful framework within
  13287.        which real knowledge can be gained.
  13288.  
  13289.        At the same time, the reader should appreciate that there are many
  13290.        different proprietary products in the marketplace with each giving
  13291.        proprietary extensions to the basic architecture.  It is vital for
  13292.        all serious work, that the user obtain all official technical data
  13293.        direct from the manufacturer concerned.  That is, unless only BIOS
  13294.        access is to be gained to the VGA facilities provided.  However it
  13295.        would be prudent even in this case to obtain technical data, since
  13296.        every BIOS is different, by definition.  The best way to avoid any
  13297.        implementation problems is to remain as well informed as possible.
  13298.  
  13299.  
  13300.  
  13301.  
  13302. Glossary
  13303. ===============================================================================
  13304.  
  13305.  
  13306. Please note that this glossary is vestigial in the extreme with the motivation
  13307. for including it at all being completeness.  However, it is unlikely that this
  13308. paucity will impact significantly on the useability of this text, since jargon
  13309. is relatively scarcely used.  In those places where jargon is introduced there
  13310. is normally an explanation provided, except for those terms which are so basic
  13311. that a reader of this document must be expected to have knowledge of them.
  13312.  
  13313.  
  13314.  
  13315.  
  13316. 80x86
  13317. -------------
  13318.              A family of related processor chips, produced by Intel Corp.  This
  13319.              processor family is important because it is used as the basis for
  13320.              all industry standard architecture computer systems.
  13321.  
  13322.  
  13323. Analogue
  13324. -------------
  13325.              A coding and interpretation scheme which does not rely on discrete
  13326.              steps.  Instead, continuous variation of some characteristic such
  13327.              as voltage or current is used as the analogue of a represented
  13328.              value.  Hence analogue, as opposed to digital, representation.  A
  13329.              significant practical advantage of this representation is the lack
  13330.              of need for more than two wire connections, which can save expense
  13331.              for suitable systems.  A display monitor might accept analogue or
  13332.              digital signals, but will be able to support many more colours if
  13333.              an analogue video signal is used.  Contrast this with digital.
  13334.  
  13335.  
  13336. BIOS
  13337. -------------
  13338.              Basic Input Output System.  This is a program which provides a set
  13339.              of services (usually standardised) to other programs.  VGA systems
  13340.              usually have their own BIOS which permits the VGA to support those
  13341.              interfaces usually provided by an industry compatible architecture
  13342.              computer system to the software running on it.
  13343.  
  13344.  
  13345. Blanking
  13346. -------------
  13347.              The action of display unit operation inhibition, during the time
  13348.              required to reinitialise the display ready for production of the
  13349.              next part of the image.  This is needed because an image is made
  13350.              up from a number of scan lines which are displayed left to right
  13351.              on the screen.  To begin again at the left side the display must
  13352.              be inhibited, to prevent the retrace from disturbing the image.
  13353.              In practise, there are horizontal and vertical blanking periods,
  13354.              which perform a similar function in orthogonal directions.
  13355.  
  13356.  
  13357. Bus
  13358. -------------
  13359.              A means for transmitting and receiving information at high speed
  13360.              within the confines of a single computer system.  Bus types that
  13361.              are used with VGA controllers fall into two categories.  Either
  13362.              the ISA PC/AT bus is used, or sometimes, Micro channel bus.  The
  13363.              latter is proprietary to IBM and is not so widely used by other
  13364.              manufacturers.
  13365.  
  13366.  
  13367. CGA
  13368. -------------
  13369.              Colour Graphics Array.  A rather old, but still widely used video
  13370.              graphics standard which is principally of interest for emulation.
  13371.  
  13372.  
  13373. Chip
  13374. -------------
  13375.              A highly integrated electronic device which is implemented as a
  13376.              silicon integrated circuit.  This makes possible the practical
  13377.              realisation of very complex circuits, such as processor chips
  13378.              and VGA controller chips.
  13379.  
  13380.  
  13381. Clock
  13382. -------------
  13383.              Almost all electronic systems operate by means of a regular signal
  13384.              which regulates in a uniform fashion, each information flow within
  13385.              the component circuits.  Since this signal has a constant form, it
  13386.              has come to be known as a clock signal, or sometimes clock pulse.
  13387.  
  13388.              The practical significance of a clock is that it controls the data
  13389.              rate within a system.  For this reason selecting a clock frequency is
  13390.              is vitally important for determining the quantity of data which is
  13391.              processed by, or transmitted from, a VGA controller.
  13392.  
  13393.              It is possible to derive a clock of lower frequency, directly from
  13394.              a master clock of higher frequency.  In the VGA controller this is
  13395.              a very common occurence.
  13396.  
  13397.  
  13398. CRT
  13399. -------------
  13400.              Cathode Ray Tube.  An important display technology which has been
  13401.              vitally important in establishing currently used video generation
  13402.              concepts and signal conventions.  See tube.
  13403.  
  13404.  
  13405. DAC
  13406. -------------
  13407.              Digital to Analogue Converter.  This is an electronic device which
  13408.              is able to convert a digital code into a high precision analogue
  13409.              signal suitable for describing an image in a form acceptable by a
  13410.              display unit.  These devices operate at very high speed.
  13411.  
  13412.  
  13413. Digital
  13414. -------------
  13415.              A coding and interpretation scheme which relies upon discrete step
  13416.              representation of values typically using a binary coding alphabet.
  13417.              Each digit is represented by a signal value over two wires.  This
  13418.              means that the scheme is very robust, but there is an attendant
  13419.              overhead cost in terms of the number of connections which must be
  13420.              made in order to convey digital information.  Contrast this with
  13421.              analogue.
  13422.  
  13423.  
  13424. DIP Switch
  13425. -------------
  13426.              Dual In-line Plastic Switch.  This is a miniture electronic switch
  13427.              component which is used to provide selectable option settings with
  13428.              hardware configuration use.  Typically a bank of 4, 6, or 8 of the
  13429.              switches are employed, with each governing one particular feature.
  13430.              Such features are generally set once and then forgotten since they
  13431.              control hardware compatibility which does not often need changing.
  13432.  
  13433.  
  13434. Display Unit
  13435. -------------
  13436.              A device which accepts information and produces a visual image as
  13437.              a translation of that information.  See monitor.
  13438.  
  13439.  
  13440. Dot
  13441. -------------
  13442.              A term used to describe a monochrome pixel.  This term arises in
  13443.              connection with the dot clock which is a principle timing source
  13444.              for VGA controller and also therefore, display unit operation.
  13445.  
  13446.  
  13447. DRAM
  13448. -------------
  13449.              Dynamic Random Access Memory.  A type of memory technology which
  13450.              stores data using a charged capacitor.  As charge will leak from
  13451.              a capacitor, every so often all the stored data must be read out
  13452.              and replaced afresh, thereby restoring the charge strength.  The
  13453.              process which performs the charge restitution is termed refresh.
  13454.              The refresh must be completed by accessing every DRAM address in
  13455.              a short period of time termed the refresh period.  This time for
  13456.              refresh is measured in a small number of milli-seconds.  See RAM.
  13457.  
  13458.  
  13459. EGA
  13460. -------------
  13461.              Extended Graphics Array.  This is a video graphics standard which
  13462.              is becoming less important in numerical terms of installed system
  13463.              count, as time goes on.  Emulation may be important for EGA.
  13464.  
  13465.  
  13466. Emulation
  13467. -------------
  13468.              The capability of a particular electronic device to mimic exactly
  13469.              another, different electronic device so that the operation of the
  13470.              former is indestinguishable from that of the latter.  This can be
  13471.              important for maintaining compatibility between software produced
  13472.              over a long period of time, and a wide range of computer systems.
  13473.  
  13474.  
  13475. Hercules
  13476. -------------
  13477.              A Hercules Computer Technology trademark.  This company produces
  13478.              video graphics image generators and Hercules refers particularly
  13479.              to a widely used product for which emulation can be helpful.
  13480.  
  13481.  
  13482. Hardware
  13483. -------------
  13484.              A description of electronic components, usually assembled into an
  13485.              electronic system, or subsystem.  This represents an unchangeable
  13486.              structure which may provide facilities for selection of different
  13487.              interconnection schemes between constituent components.  Any type
  13488.              of ability to vary the apparent internal structure, and therefore
  13489.              the externally visible behaviour of hardware is normally referred
  13490.              to as programmability.  Such hardware may be programmed.  Control
  13491.              of such hardware is exercised by a program which is distinguished
  13492.              from hardware by the term software.
  13493.  
  13494.  
  13495. IBM
  13496. -------------
  13497.              Inernational Business Machines, Corp.  This company was the first
  13498.              to introduce MDA, CGA, EGA, VGA graphics controllers, with their
  13499.              associated display units.  Many companies follow IBM in building
  13500.              products which are deemed IBM Compatible.  VGA controller chips
  13501.              are a good example of this, although compatibility does have many
  13502.              limits in practise.
  13503.  
  13504.  
  13505. Image Generator
  13506. -------------
  13507.              An electronic device which accepts control information and image
  13508.              information from a processor and translates this into a form of
  13509.              information acceptable as input to a display unit.
  13510.  
  13511.  
  13512. ISA
  13513. -------------
  13514.              Industry Standard Architecture.  This refers to a particular type
  13515.              of computer system usually built from widely available components
  13516.              which ideally fit together easily to produce a standard device of
  13517.              known capability.  In practise, there may be difficulties because
  13518.              of subtle incompatibility between various components.  Usually it
  13519.              is possible to provide a certain set of capabilities adequate for
  13520.              most practical purposes, in this manner.
  13521.  
  13522.  
  13523. MDA
  13524. -------------
  13525.              Monochrome Display Adaptor. This is a video graphics standard that
  13526.              has been important in times past, but which is now of interest for
  13527.              emulation purposes.
  13528.  
  13529.  
  13530. Micro channel
  13531. -------------
  13532.              A type of bus, which is proprietary to IBM.
  13533.  
  13534.  
  13535. Monitor
  13536. -------------
  13537.              An alternative term for display unit.
  13538.  
  13539.  
  13540. MultiSync
  13541. -------------
  13542.              A Nippon Electric Company (NEC) trademark.  Describes a family of
  13543.              display units which are able to accept a number of distinct video
  13544.              signals with different characteristics.  Importantly, the rate at
  13545.              which image information is transferred to the display unit can be
  13546.              changed so providing for a much higher definition image.  This is
  13547.              achieved without any changes to the display unit, which can adapt
  13548.              to the video signals by analysing them.  This automatically gives
  13549.              rise to any changes necessary in the display unit operation.
  13550.  
  13551.  
  13552. NMI
  13553. -------------
  13554.              Non Maskable Interrupt.  This is a higher priority interrupt than
  13555.              any other interrupt available to the processor.  Specifically, it
  13556.              is of higher priority than all maskable interrupts.  This fact is
  13557.              often used to provide emulation facilities in software, triggered
  13558.              by certain hardware conditions.  For example, write protection of
  13559.              special registers useful in emulation, is often achieved by using
  13560.              NMI interrupts in conjunction with special handler programs.
  13561.  
  13562.  
  13563. PC/AT
  13564. -------------
  13565.              Personal Computer, Model AT.  This type of IBM compatible computer
  13566.              is one of the most ubiquitous in the world.  Because of the force
  13567.              of sheer numbers, many software and hardware products have been
  13568.              built for use with this type of machine.  VGA controller chips are
  13569.              normally configured for use with the bus provided by this machine.
  13570.  
  13571.  
  13572. Pixel
  13573. -------------
  13574.              Picture ELement.  A display screen is made up from large numbers
  13575.              of elementary displayable elements.  Every element is controlled
  13576.              quite independantly of all other elements.  Since the assemblage
  13577.              of all the available elements constitutes a picture the smallest
  13578.              picture component has become known as a pixel.  See dot.
  13579.  
  13580.  
  13581. Processor
  13582. -------------
  13583.              The computational device which acts as the seat of all activity in
  13584.              a computer system.  Sometimes known as the CPU.  The processor is
  13585.              the main determinant of capability for a computer system.  It is
  13586.              implemented as a highly integrated electronic device.
  13587.  
  13588.  
  13589. RAM
  13590. -------------
  13591.              Random Access Memory.  This type of memory technology is able to
  13592.              store and retrieve information at high speed and is able to give
  13593.              access to any address in the same uniform access time.  There is
  13594.              no constraint such as sequential access to addresses, hence the
  13595.              term random.  Any address can be accessed at any time with equal
  13596.              facility.  Used for storing video image information in a digital
  13597.              form suitable for manipulation by an image generator.  See DRAM.
  13598.  
  13599.  
  13600. Refresh
  13601. -------------
  13602.              A process used to maintain the information stored in a DRAM.  For
  13603.              more details see the entries for RAM, and for DRAM.
  13604.  
  13605.  
  13606. ROM
  13607. -------------
  13608.              Read Only Memory.  This type of memory technology is manufactured
  13609.              complete with all the information it is to contain.  This data is
  13610.              immune to change so permanently required information such as font
  13611.              data describing the shape of the characters in a character set is
  13612.              usefully stored in this type of device.  A BIOS is usually stored
  13613.              in a ROM.  Contrast with RAM, DRAM.
  13614.  
  13615.  
  13616. Software
  13617. -------------
  13618.              The information associated with a particular function obtained by
  13619.              programming hardware, so that some required external behaviour is
  13620.              made available.  See hardware.
  13621.  
  13622.  
  13623. Standard
  13624. -------------
  13625.              A term applied to many computer systems and their components.  It
  13626.              is rather doubtful that this term actually means anything at all.
  13627.              It has been the subject of so much abuse by so many, for so long,
  13628.              that it has become almost meaningless.  See ISA.  In practise, it
  13629.              is possible to find some particular products or interfaces which
  13630.              are ubiquitous to the point of becoming a 'de facto' standard.
  13631.              In these cases the term may have some use, providing it indicates
  13632.              demonstrable compatibility with some readily obtained reference.
  13633.  
  13634.  
  13635. Synchronisation
  13636. -------------
  13637.              The state in which one electronic system is operated as though it
  13638.              was actually receiving clocking information from another separate
  13639.              system.  This apparent synchronism between the respective clocks,
  13640.              gives rise to the term synchronisation when describing the state.
  13641.              It is vitally important that a display unit operate with absolute
  13642.              synchronisation to the image generator from which it receives the
  13643.              input video signals.
  13644.  
  13645.  
  13646. TTL
  13647. -------------
  13648.              Transistor Transistor Logic, a logic family which gives rise to a
  13649.              characteristic interface for digital signals known as TTL.  These
  13650.              signals have certain well specified characteristics, so can be of
  13651.              use in transmission of digital information between systems.  Some
  13652.              display units accept digital data using TTL compatible signals.
  13653.  
  13654.  
  13655. Tube
  13656. -------------
  13657.              The common term for a display tube or CRT.  See CRT.
  13658.  
  13659.  
  13660. VGA
  13661. -------------
  13662.              Video Graphics Array.  This is the most important video graphics
  13663.              standard at the time of writing.  Inexpensive to produce this is
  13664.              becoming numerically the most common display generation scheme.
  13665.              It is capable of simple extension, but supports a common set of
  13666.              facilities.  It is particularly interesting for support given to
  13667.              emulation of other graphics standards.  It is more than adequate
  13668.              for almost all applications except the most demanding.
  13669.  
  13670.  
  13671. VGA Controller
  13672. -------------
  13673.              This is a highly integrated electronic device which contains all
  13674.              the logic functions required to implement a VGA controller which
  13675.              is the image generator for producing VGA video information ready
  13676.              for display.
  13677.  
  13678.  
  13679. Video
  13680. -------------
  13681.              An electronic signal carrying picture information into a display
  13682.              unit.  This information is in a form suitable for translation by
  13683.              a display unit into an image readily comprehensible to the eye.
  13684.  
  13685.  
  13686.  
  13687.  
  13688. Index
  13689. ===============================================================================
  13690.  
  13691.  
  13692. There are extensive cross references provided for all the VGA hardware register
  13693. descriptions, and these cross references do not rely on any concepts of page or
  13694. line numbers.   This is done with a purpose.  Many different page sizes can be
  13695. produced by current printing equipment, so it is suggested that the user employ
  13696. a readily available indexing program if a conventional index is really needed.
  13697.  
  13698. This will of course, depend entirely upon the page format selected by the user
  13699. in printing the document.  Guidelines for obtaining a print are available.
  13700.  
  13701. See {0.06} Obtaining a print of this document.
  13702.  
  13703. The contents list gives a useful overview of the chapter and section contents,
  13704. which, when used with the extensive cross references provides for an entirely
  13705. practical navigation aid around the text.  For this reason it is not envisaged
  13706. that any users will find the need to produce a conventional index.
  13707.  
  13708. There are two indexes included below.  The first is concerned with a complete
  13709. list of all the functional register groups available to the VGA programmer.
  13710. The second expands on the first, by including each of the bit fields present
  13711. in each register.  The format in both cases is the same as that for the entry
  13712. proper, in the main body of the text.  Details of input output port addresses
  13713. are therefore included, with register index values if needed, and read, write
  13714. or index functionality as appropriate.
  13715.  
  13716.  
  13717.  
  13718.  
  13719. Complete Register Listing By Functional Grouping
  13720. ------------------------------------------------
  13721.  
  13722.  
  13723.  
  13724.  
  13725. Sequencer Registers
  13726. ------------------------------------------------------------------------------
  13727.  
  13728. 6.04.01  Sequencer Address Register      { 3c4h    ---    R/W }
  13729.  
  13730. 6.04.02  Reset Register                  { 3c5h    00h    R/W }
  13731.  
  13732. 6.04.03  Clocking Mode Register          { 3c5h    01h    R/W }
  13733.  
  13734. 6.04.04  Map Mask Register               { 3c5h    02h    R/W }
  13735.  
  13736. 6.04.05  Character Map Select Register   { 3c5h    03h    R/W }
  13737.  
  13738. 6.04.06  Sequencer Memory Mode Register  { 3c5h    04h    R/W }
  13739.  
  13740. 6.04.07  ................................{ 3c5h    07h    R/W }
  13741. 6.04.07  Horizontal Character Counter Reset Register...........
  13742.  
  13743. ------------------------------------------------------------------------------
  13744.  
  13745.  
  13746.  
  13747.  
  13748. CRT Controller Registers
  13749. ------------------------------------------------------------------------------
  13750.  
  13751. 6.05.01  CRT Controller Address Register          { 3?4h    ---    R/W }
  13752.  
  13753. 6.05.02  Horizontal Total Register                { 3?5h    00h    R/W }
  13754.  
  13755. 6.05.03  Horizontal Display Enable End Register   { 3?5h    01h    R/W }
  13756.  
  13757. 6.05.04  Start Horizontal Blanking Register       { 3?5h    02h    R/W }
  13758.  
  13759. 6.05.05  End Horizontal Blanking Register         { 3?5h    03h    R/W }
  13760.  
  13761. 6.05.06  Start Horizontal Retrace Pulse Register  { 3?5h    04h    R/W }
  13762.  
  13763. 6.05.07  End Horizontal Retrace Register          { 3?5h    05h    R/W }
  13764.  
  13765. 6.05.08  Vertical Total Register                  { 3?5h    06h    R/W }
  13766.  
  13767. 6.05.09  CRT Controller Overflow Register         { 3?5h    07h    R/W }
  13768.  
  13769. 6.05.10  Preset Row Scan Register                 { 3?5h    08h    R/W }
  13770.  
  13771. 6.05.11  Maximum Scan Line Register               { 3?5h    09h    R/W }
  13772.  
  13773. 6.05.12  Cursor Start Register                    { 3?5h    0ah    R/W }
  13774.  
  13775. 6.05.13  Cursor End Register                      { 3?5h    0bh    R/W }
  13776.  
  13777. 6.05.14  Start Address High Register              { 3?5h    0ch    R/W }
  13778.  
  13779. 6.05.15  Start Address Low Register               { 3?5h    0dh    R/W }
  13780.  
  13781. 6.05.16  Cursor Location High Register            { 3?5h    0eh    R/W }
  13782.  
  13783. 6.05.17  Cursor Location Low Register             { 3?5h    0fh    R/W }
  13784.  
  13785. 6.05.18  Vertical Retrace Start Register          { 3?5h    10h    R/W }
  13786.  
  13787. 6.05.19  Vertical Retrace End Register            { 3?5h    11h    R/W }
  13788.  
  13789. 6.05.20  Vertical Display Enable End Register     { 3?5h    12h    R/W }
  13790.  
  13791. 6.05.21  Offset Register                          { 3?5h    13h    R/W }
  13792.  
  13793. 6.05.22  Underline Location Register              { 3?5h    14h    R/W }
  13794.  
  13795. 6.05.23  Start Vertical Blanking Register         { 3?5h    15h    R/W }
  13796.  
  13797. 6.05.24  End Vertical Blanking Register           { 3?5h    16h    R/W }
  13798.  
  13799. 6.05.25  CRTC Mode Control Register               { 3?5h    17h    R/W }
  13800.  
  13801. 6.05.26  Line Compare Register                    { 3?5h    18h    R/W }
  13802.  
  13803. ------------------------------------------------------------------------------
  13804.  
  13805.  
  13806.  
  13807.  
  13808. Graphics Controller Registers
  13809. ------------------------------------------------------------------------------
  13810.  
  13811. 6.06.01  Graphics Address Register    { 3ceh    ---    R/W }
  13812.  
  13813. 6.06.02  Set/Reset Register           { 3cfh    00h    R/W }
  13814.  
  13815. 6.06.03  Enable Set/Reset Register    { 3cfh    01h    R/W }
  13816.  
  13817. 6.06.04  Colour Compare Register      { 3cfh    02h    R/W }
  13818.  
  13819. 6.06.05  Data Rotate Register         { 3cfh    03h    R/W }
  13820.  
  13821. 6.06.06  Read Map Select Register     { 3cfh    04h    R/W }
  13822.  
  13823. 6.06.07  Graphics Mode Register       { 3cfh    05h    R/W }
  13824.  
  13825. 6.06.08  Miscellaneous Register       { 3cfh    06h    R/W }
  13826.  
  13827. 6.06.09  Colour Don't Care Register   { 3cfh    07h    R/W }
  13828.  
  13829. 6.06.10  Bit Mask Register            { 3cfh    08h    R/W }
  13830.  
  13831. ------------------------------------------------------------------------------
  13832.  
  13833.  
  13834.  
  13835.  
  13836. Attribute Controller Registers
  13837. ------------------------------------------------------------------------------
  13838.  
  13839. 6.07.01  Attribute Address Register       { 3c0h/I/W  3c0h/R  ---  R/W }
  13840.  
  13841. 6.07.02  Palette Register 00              { 3c0h/I/W  3c1h/R  00h  R/W }
  13842.  
  13843. 6.07.03  Palette Register 01              { 3c0h/I/W  3c1h/R  01h  R/W }
  13844.  
  13845. 6.07.04  Palette Register 02              { 3c0h/I/W  3c1h/R  02h  R/W }
  13846.  
  13847. 6.07.05  Palette Register 03              { 3c0h/I/W  3c1h/R  03h  R/W }
  13848.  
  13849. 6.07.06  Palette Register 04              { 3c0h/I/W  3c1h/R  04h  R/W }
  13850.  
  13851. 6.07.07  Palette Register 05              { 3c0h/I/W  3c1h/R  05h  R/W }
  13852.  
  13853. 6.07.08  Palette Register 06              { 3c0h/I/W  3c1h/R  06h  R/W }
  13854.  
  13855. 6.07.09  Palette Register 07              { 3c0h/I/W  3c1h/R  07h  R/W }
  13856.  
  13857. 6.07.10  Palette Register 08              { 3c0h/I/W  3c1h/R  08h  R/W }
  13858.  
  13859. 6.07.11  Palette Register 09              { 3c0h/I/W  3c1h/R  09h  R/W }
  13860.  
  13861. 6.07.12  Palette Register 10              { 3c0h/I/W  3c1h/R  0ah  R/W }
  13862.  
  13863. 6.07.13  Palette Register 11              { 3c0h/I/W  3c1h/R  0bh  R/W }
  13864.  
  13865. 6.07.14  Palette Register 12              { 3c0h/I/W  3c1h/R  0ch  R/W }
  13866.  
  13867. 6.07.15  Palette Register 13              { 3c0h/I/W  3c1h/R  0dh  R/W }
  13868.  
  13869. 6.07.16  Palette Register 14              { 3c0h/I/W  3c1h/R  0eh  R/W }
  13870.  
  13871. 6.07.17  Palette Register 15              { 3c0h/I/W  3c1h/R  0fh  R/W }
  13872.  
  13873. 6.07.18  Attribute Mode Control Register  { 3c0h/I/W  3c1h/R  10h  R/W }
  13874.  
  13875. 6.07.19  Overscan Colour Register         { 3c0h/I/W  3c1h/R  11h  R/W }
  13876.  
  13877. 6.07.20  Colour Plane Enable Register     { 3c0h/I/W  3c1h/R  12h  R/W }
  13878.  
  13879. 6.07.21  Horizontal PEL Panning Register  { 3c0h/I/W  3c1h/R  13h  R/W }
  13880.  
  13881. 6.07.22  Colour Select Register           { 3c0h/I/W  3c1h/R  14h  R/W }
  13882.  
  13883. ------------------------------------------------------------------------------
  13884.  
  13885.  
  13886.  
  13887.  
  13888. DAC Registers
  13889. ------------------------------------------------------------------------------
  13890.  
  13891. 6.08.01  DAC Pixel Mask Register          { 3c6h   R/W }
  13892.  
  13893. 6.08.02  DAC Status Register              { 3c7h   R-- }
  13894.  
  13895. 6.08.03  DAC Read Data Address Register   { 3c7h   W-- }
  13896.  
  13897. 6.08.04  DAC Write Data Address Register  { 3c8h   R/W }
  13898.  
  13899. 6.08.05  DAC Data Register                { 3c9h   R/W }
  13900.  
  13901. ------------------------------------------------------------------------------
  13902.  
  13903.  
  13904.  
  13905.  
  13906. General Registers
  13907. ------------------------------------------------------------------------------
  13908.  
  13909. 6.09.01  Miscellaneous Output Register  { 3c2h  W-- }
  13910.  
  13911. 6.09.02  Miscellaneous Output Register  { 3cch  --R }
  13912.  
  13913. 6.09.03  Input Status Register Zero     { 3c2h  R-- }
  13914.  
  13915. 6.09.04  Input Status Register One      { 3?ah  R-- }
  13916.  
  13917. ------------------------------------------------------------------------------
  13918.  
  13919.  
  13920.  
  13921.  
  13922. Special Registers
  13923. ------------------------------------------------------------------------------
  13924.  
  13925. 6.10.01  Hardware Version Register {new definition}  { 3c5h    0bh    R-- }
  13926.  
  13927. 6.10.02  Version Selector Register {old definition}  { 3c5h    0bh    --W }
  13928.  
  13929. 6.10.03  Configuration Port Register 1               { 3c5h    0ch    R/W }
  13930.  
  13931. 6.10.04  Mode Control Register 2                     { 3c5h    0dh    R/W }
  13932.  
  13933. 6.10.05  Mode Control Register 1                     { 3c5h    0eh    R/W }
  13934.  
  13935. 6.10.06  Power-up Mode Register 2                    { 3c5h    0fh    R/W }
  13936.  
  13937. 6.10.07  CRTC Module Testing Register                { 3?5h    1eh    R/W }
  13938.  
  13939. 6.10.08  Software Programming Register               { 3?5h    1fh    R/W }
  13940.  
  13941. 6.10.09  CPU Latch Read Back Register                { 3?5h    22h    R-- }
  13942.  
  13943. 6.10.10  Attribute State Read Back Register          { 3?5h    24h    R-- }
  13944.  
  13945. 6.10.11  Attribute Index Read Back Register          { 3?5h    26h    R-- }
  13946.  
  13947. 6.10.12  Clear Vertical Display Enable Register      { 3?5h    3nh    W-- }
  13948.  
  13949. 6.10.13  Source Address Register                     { 3cfh    0eh    R/W }
  13950.  
  13951. 6.10.14  Source Address Enable Register              { 3cfh    0fh    R/W }
  13952.  
  13953. ------------------------------------------------------------------------------
  13954.  
  13955.  
  13956.  
  13957.  
  13958. Complete Register Listing Including Bit Fields
  13959. ----------------------------------------------
  13960.  
  13961.  
  13962.  
  13963.  
  13964. Sequencer Registers
  13965. ------------------------------------------------------------------------------
  13966.  
  13967.  
  13968. 6.04.01  Sequencer Address Register      { 3c4h    ---    R/W }
  13969.          ------------------------------------------------------
  13970.          <3..0>   Sequencer Register Address
  13971.          <7..4>   Reserved. Always <=0000>.
  13972.          ------------------------------------------------------
  13973.  
  13974.  
  13975. 6.04.02  Reset Register                  { 3c5h    00h    R/W }
  13976.          ------------------------------------------------------
  13977.          <0>      Fast Reset Command
  13978.          <1>      Safe Reset Command
  13979.          <7..2>   Reserved. Always <=000000>.
  13980.          ------------------------------------------------------
  13981.  
  13982.  
  13983. 6.04.03  Clocking Mode Register          { 3c5h    01h    R/W }
  13984.          ------------------------------------------------------
  13985.          <0>      Character Dot Clock Select
  13986.          <1>      Reserved.  Always <=0>.
  13987.          <2>      Shift Load Two Control
  13988.          <3>      Dot Clock Divide by Two Enable
  13989.          <4>      Shift Load Four Control
  13990.          <5>      Screen Inhibit
  13991.          <7..6>   Reserved.  Always <=00>.
  13992.          ------------------------------------------------------
  13993.  
  13994.  
  13995. 6.04.04  Map Mask Register               { 3c5h    02h    R/W }
  13996.          ------------------------------------------------------
  13997.          <0>      Map Plane 0 Write Enable Control
  13998.          <1>      Map Plane 1 Write Enable Control
  13999.          <2>      Map Plane 2 Write Enable Control
  14000.          <3>      Map Plane 3 Write Enable Control
  14001.          <7..4>   Reserved.  Always <=0000>.
  14002.          ------------------------------------------------------
  14003.  
  14004.  
  14005. 6.04.05  Character Map Select Register   { 3c5h    03h    R/W }
  14006.          ------------------------------------------------------
  14007.          <0>      Character Font Memory Map 'B' Partial Offset 16K byte
  14008.          <1>      Character Font Memory Map 'B' Partial Offset 32K byte
  14009.          <2>      Character Font Memory Map 'A' Partial Offset 16K byte
  14010.          <3>      Character Font Memory Map 'A' Partial Offset 32K byte
  14011.          <4>      Character Font Memory Map 'B' Partial Offset 08K byte
  14012.          <5>      Character Font Memory Map 'A' Partial Offset 08K byte
  14013.          <7..6>   Reserved.  Always <=00>.
  14014.          ------------------------------------------------------
  14015.  
  14016.  
  14017. 6.04.06  Sequencer Memory Mode Register  { 3c5h    04h    R/W }
  14018.          ------------------------------------------------------
  14019.          <0>      Reserved.  Always <=0>.
  14020.          <1>      Memory Size Specification
  14021.          <2>      Processor Image Memory Access Mode Select
  14022.          <3>      Processor Image Memory Access Mapping Select
  14023.          <7..4>   Reserved.  Always <=0000>.
  14024.          ------------------------------------------------------
  14025.  
  14026.  
  14027. 6.04.07  Horizontal Character Counter Reset Register...........
  14028. 6.04.07  ................................{ 3c5h    07h    R/W }
  14029.          ------------------------------------------------------
  14030.          <7..0>   Horizontal Character Counter Reset
  14031.          ------------------------------------------------------
  14032.  
  14033.  
  14034. ------------------------------------------------------------------------------
  14035.  
  14036.  
  14037.  
  14038.  
  14039. CRT Controller Registers
  14040. ------------------------------------------------------------------------------
  14041.  
  14042.  
  14043. 6.05.01  CRT Controller Address Register          { 3?4h    ---    R/W }
  14044.          ---------------------------------------------------------------
  14045.          <5..0>   CRT Controller Register Address
  14046.          <7..6>   Reserved.  Always <=00>.
  14047.          ---------------------------------------------------------------
  14048.  
  14049.  
  14050. 6.05.02  Horizontal Total Register                { 3?5h    00h    R/W }
  14051.          ---------------------------------------------------------------
  14052.          <7..0>   Horizontal Total
  14053.          ---------------------------------------------------------------
  14054.  
  14055.  
  14056. 6.05.03  Horizontal Display Enable End Register   { 3?5h    01h    R/W }
  14057.          ---------------------------------------------------------------
  14058.          <7..0>   Horizontal Display Enable
  14059.          ---------------------------------------------------------------
  14060.  
  14061.  
  14062. 6.05.04  Start Horizontal Blanking Register       { 3?5h    02h    R/W }
  14063.          ---------------------------------------------------------------
  14064.          <7..0>   Start Horizontal Blanking
  14065.          ---------------------------------------------------------------
  14066.  
  14067.  
  14068. 6.05.05  End Horizontal Blanking Register         { 3?5h    03h    R/W }
  14069.          ---------------------------------------------------------------
  14070.          <4..0>   End Horizontal Blanking
  14071.          <6..5>   Display Enable Skew
  14072.          <7>      Light Pen Register Enable
  14073.          ---------------------------------------------------------------
  14074.  
  14075.  
  14076. 6.05.06  Start Horizontal Retrace Pulse Register  { 3?5h    04h    R/W }
  14077.          ---------------------------------------------------------------
  14078.          <7..0>   Start Horizontal Retrace Pulse
  14079.          ---------------------------------------------------------------
  14080.  
  14081.  
  14082. 6.05.07  End Horizontal Retrace Register          { 3?5h    05h    R/W }
  14083.          ---------------------------------------------------------------
  14084.          <4..0>   End Horizontal Retrace
  14085.          <6..5>   Horizontal Retrace Skew
  14086.          <7>      End Horizontal Blanking Bit 5
  14087.          ---------------------------------------------------------------
  14088.  
  14089.  
  14090. 6.05.08  Vertical Total Register                  { 3?5h    06h    R/W }
  14091.          ---------------------------------------------------------------
  14092.          <7..0>   Vertical Total
  14093.          ---------------------------------------------------------------
  14094.  
  14095.  
  14096. 6.05.09  CRT Controller Overflow Register         { 3?5h    07h    R/W }
  14097.          ---------------------------------------------------------------
  14098.          <0>      Vertical Total Bit 8
  14099.          <1>      Vertical Display Enable End Bit 8
  14100.          <2>      Vertical Retrace Start Bit 8
  14101.          <3>      Start Vertical Blank Bit 8
  14102.          <4>      Line Compare Bit 8
  14103.          <5>      Vertical Total Bit 9
  14104.          <6>      Vertical Display Enable End Bit 9
  14105.          <7>      Vertical Retrace Start Bit 9
  14106.          ---------------------------------------------------------------
  14107.  
  14108.  
  14109. 6.05.10  Preset Row Scan Register                 { 3?5h    08h    R/W }
  14110.          ---------------------------------------------------------------
  14111.          <4..0>   Preset Row Scan
  14112.          <6..5>   Byte Panning Control
  14113.          <7>      Reserved.  Always <=0>.
  14114.          ---------------------------------------------------------------
  14115.  
  14116.  
  14117. 6.05.11  Maximum Scan Line Register               { 3?5h    09h    R/W }
  14118.          ---------------------------------------------------------------
  14119.          <4..0>   Maximum Scan Lines
  14120.          <5>      Start Vertical Blank Bit 9
  14121.          <6>      Line Compare Bit 9
  14122.          <7>      Double Scan Line Display
  14123.          ---------------------------------------------------------------
  14124.  
  14125.  
  14126. 6.05.12  Cursor Start Register                    { 3?5h    0ah    R/W }
  14127.          ---------------------------------------------------------------
  14128.          <4..0>   Cursor Row Scan Start
  14129.          <5>      Cursor Enable
  14130.          <7..6>   Reserved.  Always <=00>.
  14131.          ---------------------------------------------------------------
  14132.  
  14133.  
  14134. 6.05.13  Cursor End Register                      { 3?5h    0bh    R/W }
  14135.          ---------------------------------------------------------------
  14136.          <4..0>   Cursor Row Scan End
  14137.          <6..5>   Cursor Skew Control
  14138.          <7>      Reserved.  Always <=0>.
  14139.          ---------------------------------------------------------------
  14140.  
  14141.  
  14142. 6.05.14  Start Address High Register              { 3?5h    0ch    R/W }
  14143.          ---------------------------------------------------------------
  14144.          <7..0>   Start Address High
  14145.          ---------------------------------------------------------------
  14146.  
  14147.  
  14148. 6.05.15  Start Address Low Register               { 3?5h    0dh    R/W }
  14149.          ---------------------------------------------------------------
  14150.          <7..0>   Start Address Low
  14151.          ---------------------------------------------------------------
  14152.  
  14153.  
  14154. 6.05.16  Cursor Location High Register            { 3?5h    0eh    R/W }
  14155.          ---------------------------------------------------------------
  14156.          <7..0>   Cursor Location High
  14157.          ---------------------------------------------------------------
  14158.  
  14159.  
  14160. 6.05.17  Cursor Location Low Register             { 3?5h    0fh    R/W }
  14161.          ---------------------------------------------------------------
  14162.          <7..0>   Cursor Location Low
  14163.          ---------------------------------------------------------------
  14164.  
  14165.  
  14166. 6.05.18  Vertical Retrace Start Register          { 3?5h    10h    R/W }
  14167.          ---------------------------------------------------------------
  14168.          <7..0>   Vertical Retrace Start
  14169.          ---------------------------------------------------------------
  14170.  
  14171.  
  14172. 6.05.19  Vertical Retrace End Register            { 3?5h    11h    R/W }
  14173.          ---------------------------------------------------------------
  14174.          <3..0>   Vertical Retrace End
  14175.          <4>      Clear Vertical Interrupt
  14176.          <5>      Enable Vertical Interrupt
  14177.          <6>      Refresh Bandwidth Select
  14178.          <7>      CRTC Register Protect
  14179.          ---------------------------------------------------------------
  14180.  
  14181.  
  14182. 6.05.20  Vertical Display Enable End Register     { 3?5h    12h    R/W }
  14183.          ---------------------------------------------------------------
  14184.          <7..0>   Vertical Display Enable End
  14185.          ---------------------------------------------------------------
  14186.  
  14187.  
  14188. 6.05.21  Offset Register                          { 3?5h    13h    R/W }
  14189.          ---------------------------------------------------------------
  14190.          <7..0>   Display Image Offset
  14191.          ---------------------------------------------------------------
  14192.  
  14193.  
  14194. 6.05.22  Underline Location Register              { 3?5h    14h    R/W }
  14195.          ---------------------------------------------------------------
  14196.          <4..0>   Underline Location
  14197.          <5>      Display Address Dwell Count 4
  14198.          <6>      Display Memory Address Unit 4
  14199.          <7>      Reserved.  Always <=0>.
  14200.          ---------------------------------------------------------------
  14201.  
  14202.  
  14203. 6.05.23  Start Vertical Blanking Register         { 3?5h    15h    R/W }
  14204.          ---------------------------------------------------------------
  14205.          <7..0>   Start Vertical Blanking
  14206.          ---------------------------------------------------------------
  14207.  
  14208.  
  14209. 6.05.24  End Vertical Blanking Register           { 3?5h    16h    R/W }
  14210.          ---------------------------------------------------------------
  14211.          <7..0>   End Vertical Blanking
  14212.          ---------------------------------------------------------------
  14213.  
  14214.  
  14215. 6.05.25  CRTC Mode Control Register               { 3?5h    17h    R/W }
  14216.          ---------------------------------------------------------------
  14217.          <0>      Display Address 13 Remap Row 0
  14218.          <1>      Display Address 14 Remap Row 1
  14219.          <2>      Horizontal Retrace Divisor
  14220.          <3>      Display Address Dwell Count 2
  14221.          <4>      Reserved.  Always <=0>.
  14222.          <5>      Display Address Unit 2 Remap
  14223.          <6>      Display Memory Address Unit 2
  14224.          <7>      Horizontal/Vertical Retrace Reset
  14225.          ---------------------------------------------------------------
  14226.  
  14227.  
  14228. 6.05.26  Line Compare Register                    { 3?5h    18h    R/W }
  14229.          ---------------------------------------------------------------
  14230.          <7..0>   Line Compare
  14231.          ---------------------------------------------------------------
  14232.  
  14233.  
  14234. ------------------------------------------------------------------------------
  14235.  
  14236.  
  14237.  
  14238.  
  14239. Graphics Controller Registers
  14240. ------------------------------------------------------------------------------
  14241.  
  14242.  
  14243. 6.06.01  Graphics Address Register    { 3ceh    ---    R/W }
  14244.          ---------------------------------------------------
  14245.          <3..0>   Graphics Register Address
  14246.          <7..4>   Reserved. Always <=0000>.
  14247.          ---------------------------------------------------
  14248.  
  14249.  
  14250. 6.06.02  Set/Reset Register           { 3cfh    00h    R/W }
  14251.          ---------------------------------------------------
  14252.          <0>      Set/Reset Data Image Plane 0
  14253.          <1>      Set/Reset Data Image Plane 1
  14254.          <2>      Set/Reset Data Image Plane 2
  14255.          <3>      Set/Reset Data Image Plane 3
  14256.          <7..4>   Reserved.  Always <=0000>.
  14257.          ---------------------------------------------------
  14258.  
  14259.  
  14260. 6.06.03  Enable Set/Reset Register    { 3cfh    01h    R/W }
  14261.          ---------------------------------------------------
  14262.          <0>      Set/Reset Enable Image Plane 0
  14263.          <1>      Set/Reset Enable Image Plane 1
  14264.          <2>      Set/Reset Enable Image Plane 2
  14265.          <3>      Set/Reset Enable Image Plane 3
  14266.          <7..4>   Reserved.  Always <=0000>.
  14267.          ---------------------------------------------------
  14268.  
  14269.  
  14270. 6.06.04  Colour Compare Register      { 3cfh    02h    R/W }
  14271.          ---------------------------------------------------
  14272.          <0>      Colour Compare Plane 0
  14273.          <1>      Colour Compare Plane 1
  14274.          <2>      Colour Compare Plane 2
  14275.          <3>      Colour Compare Plane 3
  14276.          <7..4>   Reserved.  Always <=0000>.
  14277.          ---------------------------------------------------
  14278.  
  14279.  
  14280. 6.06.05  Data Rotate Register         { 3cfh    03h    R/W }
  14281.          ---------------------------------------------------
  14282.          <2..0>   Data Rotate
  14283.          <4..3>   Logic Unit Function Code
  14284.          <7..5>   Reserved.  Always <=000>.
  14285.          ---------------------------------------------------
  14286.  
  14287.  
  14288. 6.06.06  Read Map Select Register     { 3cfh    04h    R/W }
  14289.          ---------------------------------------------------
  14290.          <1..0>   Read Map Select
  14291.          <7..2>   Reserved.  Always <=000000>.
  14292.          ---------------------------------------------------
  14293.  
  14294.  
  14295. 6.06.07  Graphics Mode Register       { 3cfh    05h    R/W }
  14296.          ---------------------------------------------------
  14297.          <1..0>   Processor Write Mode
  14298.          <2>      Reserved.  Always <=0>.
  14299.          <3>      Processor Read Mode
  14300.          <4>      Graphics Memory Access Mode
  14301.          <5>      Graphics Shift Register Mode
  14302.          <6>      Graphics 256 Colour Control
  14303.          <7>      Reserved.  Always <=0>.
  14304.          ---------------------------------------------------
  14305.  
  14306.  
  14307. 6.06.08  Miscellaneous Register       { 3cfh    06h    R/W }
  14308.          ---------------------------------------------------
  14309.          <0>      Display Generation Mode
  14310.          <1>      Memory Plane Pairing Control
  14311.          <3..2>   Memory Map Mode
  14312.          <7..4>   Reserved.  Always <=0000>.
  14313.          ---------------------------------------------------
  14314.  
  14315.  
  14316. 6.06.09  Colour Don't Care Register   { 3cfh    07h    R/W }
  14317.          ---------------------------------------------------
  14318.          <0>      Colour Don't Care Plane 0
  14319.          <1>      Colour Don't Care Plane 1
  14320.          <2>      Colour Don't Care Plane 2
  14321.          <3>      Colour Don't Care Plane 3
  14322.          <7..4>   Reserved.  Always <=0000>.
  14323.          ---------------------------------------------------
  14324.  
  14325.  
  14326. 6.06.10  Bit Mask Register            { 3cfh    08h    R/W }
  14327.          ---------------------------------------------------
  14328.          <0>   Update Value Source Bit 0
  14329.          <1>   Update Value Source Bit 1
  14330.          <2>   Update Value Source Bit 2
  14331.          <3>   Update Value Source Bit 3
  14332.          <4>   Update Value Source Bit 4
  14333.          <5>   Update Value Source Bit 5
  14334.          <6>   Update Value Source Bit 6
  14335.          <7>   Update Value Source Bit 7
  14336.          ---------------------------------------------------
  14337.  
  14338.  
  14339. ------------------------------------------------------------------------------
  14340.  
  14341.  
  14342.  
  14343.  
  14344. Attribute Controller Registers
  14345. ------------------------------------------------------------------------------
  14346.  
  14347.  
  14348. 6.07.01  Attribute Address Register       { 3c0h/I/W  3c0h/R  ---  R/W }
  14349.          ---------------------------------------------------------------
  14350.          <4..0>   Attribute Address
  14351.          <5>      Palette Control
  14352.          <7..6>   Reserved.  Always <=00>.
  14353.          ---------------------------------------------------------------
  14354.  
  14355.  
  14356. 6.07.02  Palette Register 00              { 3c0h/I/W  3c1h/R  00h  R/W }
  14357.          ---------------------------------------------------------------
  14358.          <5..0>   Colour Value
  14359.          <7..6>   Reserved.  Always <=00>.
  14360.          ---------------------------------------------------------------
  14361.  
  14362.  
  14363. 6.07.03  Palette Register 01              { 3c0h/I/W  3c1h/R  01h  R/W }
  14364.          ---------------------------------------------------------------
  14365.          <5..0>   Colour Value
  14366.          <7..6>   Reserved.  Always <=00>.
  14367.          ---------------------------------------------------------------
  14368.  
  14369.  
  14370. 6.07.04  Palette Register 02              { 3c0h/I/W  3c1h/R  02h  R/W }
  14371.          ---------------------------------------------------------------
  14372.          <5..0>   Colour Value
  14373.          <7..6>   Reserved.  Always <=00>.
  14374.          ---------------------------------------------------------------
  14375.  
  14376.  
  14377. 6.07.05  Palette Register 03              { 3c0h/I/W  3c1h/R  03h  R/W }
  14378.          ---------------------------------------------------------------
  14379.          <5..0>   Colour Value
  14380.          <7..6>   Reserved.  Always <=00>.
  14381.          ---------------------------------------------------------------
  14382.  
  14383.  
  14384. 6.07.06  Palette Register 04              { 3c0h/I/W  3c1h/R  04h  R/W }
  14385.          ---------------------------------------------------------------
  14386.          <5..0>   Colour Value
  14387.          <7..6>   Reserved.  Always <=00>.
  14388.          ---------------------------------------------------------------
  14389.  
  14390.  
  14391. 6.07.07  Palette Register 05              { 3c0h/I/W  3c1h/R  05h  R/W }
  14392.          ---------------------------------------------------------------
  14393.          <5..0>   Colour Value
  14394.          <7..6>   Reserved.  Always <=00>.
  14395.          ---------------------------------------------------------------
  14396.  
  14397.  
  14398. 6.07.08  Palette Register 06              { 3c0h/I/W  3c1h/R  06h  R/W }
  14399.          ---------------------------------------------------------------
  14400.          <5..0>   Colour Value
  14401.          <7..6>   Reserved.  Always <=00>.
  14402.          ---------------------------------------------------------------
  14403.  
  14404.  
  14405. 6.07.09  Palette Register 07              { 3c0h/I/W  3c1h/R  07h  R/W }
  14406.          ---------------------------------------------------------------
  14407.          <5..0>   Colour Value
  14408.          <7..6>   Reserved.  Always <=00>.
  14409.          ---------------------------------------------------------------
  14410.  
  14411.  
  14412. 6.07.10  Palette Register 08              { 3c0h/I/W  3c1h/R  08h  R/W }
  14413.          ---------------------------------------------------------------
  14414.          <5..0>   Colour Value
  14415.          <7..6>   Reserved.  Always <=00>.
  14416.          ---------------------------------------------------------------
  14417.  
  14418.  
  14419. 6.07.11  Palette Register 09              { 3c0h/I/W  3c1h/R  09h  R/W }
  14420.          ---------------------------------------------------------------
  14421.          <5..0>   Colour Value
  14422.          <7..6>   Reserved.  Always <=00>.
  14423.          ---------------------------------------------------------------
  14424.  
  14425.  
  14426. 6.07.12  Palette Register 10              { 3c0h/I/W  3c1h/R  0ah  R/W }
  14427.          ---------------------------------------------------------------
  14428.          <5..0>   Colour Value
  14429.          <7..6>   Reserved.  Always <=00>.
  14430.          ---------------------------------------------------------------
  14431.  
  14432.  
  14433. 6.07.13  Palette Register 11              { 3c0h/I/W  3c1h/R  0bh  R/W }
  14434.          ---------------------------------------------------------------
  14435.          <5..0>   Colour Value
  14436.          <7..6>   Reserved.  Always <=00>.
  14437.          ---------------------------------------------------------------
  14438.  
  14439.  
  14440. 6.07.14  Palette Register 12              { 3c0h/I/W  3c1h/R  0ch  R/W }
  14441.          ---------------------------------------------------------------
  14442.          <5..0>   Colour Value
  14443.          <7..6>   Reserved.  Always <=00>.
  14444.          ---------------------------------------------------------------
  14445.  
  14446.  
  14447. 6.07.15  Palette Register 13              { 3c0h/I/W  3c1h/R  0dh  R/W }
  14448.          ---------------------------------------------------------------
  14449.          <5..0>   Colour Value
  14450.          <7..6>   Reserved.  Always <=00>.
  14451.          ---------------------------------------------------------------
  14452.  
  14453.  
  14454. 6.07.16  Palette Register 14              { 3c0h/I/W  3c1h/R  0eh  R/W }
  14455.          ---------------------------------------------------------------
  14456.          <5..0>   Colour Value
  14457.          <7..6>   Reserved.  Always <=00>.
  14458.          ---------------------------------------------------------------
  14459.  
  14460.  
  14461. 6.07.17  Palette Register 15              { 3c0h/I/W  3c1h/R  0fh  R/W }
  14462.          ---------------------------------------------------------------
  14463.          <5..0>   Colour Value
  14464.          <7..6>   Reserved.  Always <=00>.
  14465.          ---------------------------------------------------------------
  14466.  
  14467.  
  14468. 6.07.18  Attribute Mode Control Register  { 3c0h/I/W  3c1h/R  10h  R/W }
  14469.          ---------------------------------------------------------------
  14470.          <0>      Display Generation Mode
  14471.          <1>      Display Generation Mode
  14472.          <2>      Line Graphics Character Code Control
  14473.          <3>      Text Mode Attribute Select
  14474.          <4>      Reserved.  Always <=0>.
  14475.          <5>      Split Screen Panning Control
  14476.          <6>      Shift Register 256 Colour Assembly Latch
  14477.          <7>      External Colour Palette Input Select
  14478.          ---------------------------------------------------------------
  14479.  
  14480.  
  14481. 6.07.19  Overscan Colour Register         { 3c0h/I/W  3c1h/R  11h  R/W }
  14482.          ---------------------------------------------------------------
  14483.          <7..0>   Overscan Colour
  14484.          ---------------------------------------------------------------
  14485.  
  14486.  
  14487. 6.07.20  Colour Plane Enable Register     { 3c0h/I/W  3c1h/R  12h  R/W }
  14488.          ---------------------------------------------------------------
  14489.          <0>      Colour Plane Enable 0
  14490.          <1>      Colour Plane Enable 1
  14491.          <2>      Colour Plane Enable 2
  14492.          <3>      Colour Plane Enable 3
  14493.          <5..4>   Display Status Select
  14494.          <7..6>   Reserved.  Always <=00>.
  14495.          ---------------------------------------------------------------
  14496.  
  14497.  
  14498. 6.07.21  Horizontal PEL Panning Register  { 3c0h/I/W  3c1h/R  13h  R/W }
  14499.          ---------------------------------------------------------------
  14500.          <3..0>   Horizontal PEL Panning
  14501.          <7..4>   Reserved.  Always <=0000>.
  14502.          ---------------------------------------------------------------
  14503.  
  14504.  
  14505. 6.07.22  Colour Select Register           { 3c0h/I/W  3c1h/R  14h  R/W }
  14506.          ---------------------------------------------------------------
  14507.          <1..0>   External colour palette bits <5..4>
  14508.          <3..2>   External colour palette bits <7..6>
  14509.          <7..4>   Reserved.  Always <=0000>.
  14510.          ---------------------------------------------------------------
  14511.  
  14512.  
  14513. ------------------------------------------------------------------------------
  14514.  
  14515.  
  14516.  
  14517.  
  14518. DAC Registers
  14519. ------------------------------------------------------------------------------
  14520.  
  14521.  
  14522. 6.08.01  DAC Pixel Mask Register          { 3c6h   R/W }
  14523.          -----------------------------------------------
  14524.          <0>      DAC Pixel Mask 0 {Digital to Analogue Converter Pixel Mask}
  14525.          <1>      DAC Pixel Mask 1 {Digital to Analogue Converter Pixel Mask}
  14526.          <2>      DAC Pixel Mask 2 {Digital to Analogue Converter Pixel Mask}
  14527.          <3>      DAC Pixel Mask 3 {Digital to Analogue Converter Pixel Mask}
  14528.          <4>      DAC Pixel Mask 4 {Digital to Analogue Converter Pixel Mask}
  14529.          <5>      DAC Pixel Mask 5 {Digital to Analogue Converter Pixel Mask}
  14530.          <6>      DAC Pixel Mask 6 {Digital to Analogue Converter Pixel Mask}
  14531.          <7>      DAC Pixel Mask 7 {Digital to Analogue Converter Pixel Mask}
  14532.          -----------------------------------------------
  14533.  
  14534.  
  14535. 6.08.02  DAC Status Register              { 3c7h   R-- }
  14536.          -----------------------------------------------
  14537.          <1..0>   DAC Status
  14538.          <7..2>   Reserved.  Always <=000000>.
  14539.          -----------------------------------------------
  14540.  
  14541.  
  14542. 6.08.03  DAC Read Data Address Register   { 3c7h   W-- }
  14543.          -----------------------------------------------
  14544.          <7..0>   DAC Read Data Address
  14545.          -----------------------------------------------
  14546.  
  14547.  
  14548. 6.08.04  DAC Write Data Address Register  { 3c8h   R/W }
  14549.          -----------------------------------------------
  14550.          <7..0>   DAC Write Data Address
  14551.          -----------------------------------------------
  14552.  
  14553.  
  14554. 6.08.05  DAC Data Register                { 3c9h   R/W }
  14555.          -----------------------------------------------
  14556.          <7..0>   DAC Data
  14557.          -----------------------------------------------
  14558.  
  14559.  
  14560. ------------------------------------------------------------------------------
  14561.  
  14562.  
  14563.  
  14564.  
  14565. General Registers
  14566. ------------------------------------------------------------------------------
  14567.  
  14568.  
  14569. 6.09.01  Miscellaneous Output Register  { 3c2h  W-- }
  14570.          --------------------------------------------
  14571.          <0>      Input Output Address Select
  14572.          <1>      Display Memory Access Enable
  14573.          <3..2>   Dot Clock Frequency Select
  14574.          <4>      Reserved.  Always <=0>.
  14575.          <5>      Address Extension Bit
  14576.          <6>      Horizontal Synchronisation Signal Polarity
  14577.          <7>      Vertical Synchronisation Signal Polarity
  14578.          --------------------------------------------
  14579.  
  14580.  
  14581. 6.09.02  Miscellaneous Output Register  { 3cch  --R }
  14582.          --------------------------------------------
  14583.          <7..0>   Miscellaneous Output
  14584.          --------------------------------------------
  14585.  
  14586.  
  14587. 6.09.03  Input Status Register Zero     { 3c2h  R-- }
  14588.          --------------------------------------------
  14589.          <3..0>   Reserved.  Always <=0000>.
  14590.          <4>      Monitor Detect Status Bit
  14591.          <6..5>   Reserved.  Always <=00>.
  14592.          <7>      CRT Controller Interrupt State
  14593.          --------------------------------------------
  14594.  
  14595.  
  14596. 6.09.04  Input Status Register One      { 3?ah  R-- }
  14597.          --------------------------------------------
  14598.          <0>      Inverted Display Enable Status
  14599.          <1>      Reserved.  Always <=0>.
  14600.          <2>      Reserved.  Always <=0>.  {Trident 8900 <=1>.}
  14601.          <3>      Vertical Retrace State
  14602.          <5..4>   Video Sampling State
  14603.          <7..6>   Reserved.  Always <=00>.
  14604.          --------------------------------------------
  14605.  
  14606.  
  14607. ------------------------------------------------------------------------------
  14608.  
  14609.  
  14610.  
  14611.  
  14612. Special Registers
  14613. ------------------------------------------------------------------------------
  14614.  
  14615.  
  14616. 6.10.01  Hardware Version Register {new definition}  { 3c5h    0bh    R-- }
  14617. ---------------------------------------------------------------------------
  14618.          Trident 8900 only
  14619.          ------------------------------------------------------------------
  14620.          <3..0>   Chip version identification   {Trident}
  14621.          <7..4>   Reserved.
  14622.          ------------------------------------------------------------------
  14623.  
  14624.  
  14625. 6.10.02  Version Selector Register {old definition}  { 3c5h    0bh    --W }
  14626. ---------------------------------------------------------------------------
  14627.          Trident 8900 only
  14628.          ------------------------------------------------------------------
  14629.          see main text body for details
  14630.          ------------------------------------------------------------------
  14631.  
  14632.  
  14633. 6.10.03  Configuration Port Register 1               { 3c5h    0ch    R/W }
  14634. ---------------------------------------------------------------------------
  14635.          Trident 8900 only
  14636.          ------------------------------------------------------------------
  14637.          Definition {only when NMI disabled}
  14638.          ------------------------------------------------------------------
  14639.          <0>      Address Decode Source
  14640.          <1>      ROM Chip Count Specify
  14641.          <2>      Reserved.
  14642.          <3>      ROM Address Span Specify
  14643.          <4>      VGA Control Port Specify
  14644.          <6..5>   DRAM Configuration
  14645.          <7>      DRAM Access Width
  14646.          ------------------------------------------------------------------
  14647.          Definition {only when NMI enabled}
  14648.          ------------------------------------------------------------------
  14649.          <0>      Software Status
  14650.          <1>      NMI State {Non Maskable Interrupt State}
  14651.          <3..2>   Testing Bits
  14652.          <7..4>   NMI Vector Enable
  14653.          ------------------------------------------------------------------
  14654.  
  14655.  
  14656. 6.10.04  Mode Control Register 2                     { 3c5h    0dh    R/W }
  14657. ---------------------------------------------------------------------------
  14658.          Trident 8900 only
  14659.          ------------------------------------------------------------------
  14660.          New Definition
  14661.          ------------------------------------------------------------------
  14662.          <0>      Dot Clock Extended Select
  14663.          <2..1>   Dot Clock Division Ratio Select
  14664.          <3>      Software Status
  14665.          <5..4>   Software Status
  14666.          <7..6>   General Purpose Outputs
  14667.          ------------------------------------------------------------------
  14668.          Old Definition
  14669.          ------------------------------------------------------------------
  14670.          <2..0>   Video Generation Mode Select
  14671.          <3>      Processor Bandwidth during Blanking
  14672.          <4>      Memory Plane Architecture Select
  14673.          <5>      DRAM Clock Control
  14674.          <7..6>   Character Set Select High Extend
  14675.          ------------------------------------------------------------------
  14676.  
  14677.  
  14678. 6.10.05  Mode Control Register 1                     { 3c5h    0eh    R/W }
  14679. ---------------------------------------------------------------------------
  14680.          Trident 8900 only
  14681.          ------------------------------------------------------------------
  14682.          New Definition
  14683.          ------------------------------------------------------------------
  14684.          <0>      Segment Selector
  14685.          <1>      Page Selector
  14686.          <3..2>   Bank Selector
  14687.          <6..4>   Software Status
  14688.          <7>      Write Protection State
  14689.          ------------------------------------------------------------------
  14690.          Old Definition
  14691.          ------------------------------------------------------------------
  14692.          <0>      Display Access Bank Selector
  14693.          <2..1>   Processor Access Bank Selector
  14694.          <3>      DRAM Access Width
  14695.          <4>      Reserved for Dot Clock Extended Select
  14696.          <5>      NMI State {Non Maskable Interrupt State}
  14697.          <6>      Interrupt Request Polarity Select
  14698.          <7>      Clock Pins Function Select
  14699.          ------------------------------------------------------------------
  14700.  
  14701.  
  14702. 6.10.06  Power-up Mode Register 2                    { 3c5h    0fh    R/W }
  14703. ---------------------------------------------------------------------------
  14704.          Trident 8900 only
  14705.          ------------------------------------------------------------------
  14706.          <3..0>   DIP Switch Image
  14707.          <4>      Bus Protocol Select
  14708.          <5>      Input Output Address Map Select
  14709.          <6>      ROM BIOS Address Decode Enable
  14710.          <7>      ROM BIOS Data Path Width
  14711.          ------------------------------------------------------------------
  14712.  
  14713.  
  14714. 6.10.07  CRTC Module Testing Register                { 3?5h    1eh    R/W }
  14715. ---------------------------------------------------------------------------
  14716.          Trident 8900 only
  14717.          ------------------------------------------------------------------
  14718.          <0>      Horizontal Clock Select
  14719.          <1>      Character Clock Select
  14720.          <2>      Interlace Enable
  14721.          <3>      Multipurpose Select
  14722.          <4>      CRT Controller Register Protection State
  14723.          <5>      Start Address Extension Bit 16
  14724.          <6>      Miscellaneous Output Register Protect State
  14725.          <7>      Start Address Extension Enable
  14726.          ------------------------------------------------------------------
  14727.  
  14728.  
  14729. 6.10.08  Software Programming Register               { 3?5h    1fh    R/W }
  14730. ---------------------------------------------------------------------------
  14731.          Trident 8900 only
  14732.          ------------------------------------------------------------------
  14733.          <1..0>   Reserved for BIOS use.
  14734.          <3..2>   Software Status Bits
  14735.          <7..4>   Reserved for BIOS use.  Do NOT disturb.
  14736.          ------------------------------------------------------------------
  14737.  
  14738.  
  14739. 6.10.09  CPU Latch Read Back Register                { 3?5h    22h    R-- }
  14740. ---------------------------------------------------------------------------
  14741.          standard register officially undocumented
  14742.          ------------------------------------------------------------------
  14743.          <7..0>   CPU Latch Read Back
  14744.          ------------------------------------------------------------------
  14745.  
  14746.  
  14747. 6.10.10  Attribute State Read Back Register          { 3?5h    24h    R-- }
  14748. ---------------------------------------------------------------------------
  14749.          standard register officially undocumented
  14750.          ------------------------------------------------------------------
  14751.          <4..0>   Attribute Controller Index
  14752.          <5>      Colour Palette Address Source {Internal palette}
  14753.          <6>      Reserved.
  14754.          <7>      Attribute State Read Back
  14755.          ------------------------------------------------------------------
  14756.          Trident 8900 only
  14757.          ------------------------------------------------------------------
  14758.          <6..0>   Reserved.  Undefined.
  14759.          <7>      Attribute State Read Back
  14760.          ------------------------------------------------------------------
  14761.  
  14762.  
  14763. 6.10.11  Attribute Index Read Back Register          { 3?5h    26h    R-- }
  14764. ---------------------------------------------------------------------------
  14765.          Trident 8900 only
  14766.          ------------------------------------------------------------------
  14767.          <4..0>   Attribute Index
  14768.          <7..5>   Reserved.
  14769.          ------------------------------------------------------------------
  14770.  
  14771.  
  14772. 6.10.12  Clear Vertical Display Enable Register      { 3?5h    3nh    W-- }
  14773. ---------------------------------------------------------------------------
  14774.          standard register officially undocumented
  14775.          ------------------------------------------------------------------
  14776.          <0>      Clear Vertical Display Enable
  14777.          <7..1>   Unused.  Any value can be present.
  14778.          ------------------------------------------------------------------
  14779.  
  14780.  
  14781. 6.10.13  Source Address Register                     { 3cfh    0eh    R/W }
  14782. ---------------------------------------------------------------------------
  14783.          Trident 8900 only
  14784.          ------------------------------------------------------------------
  14785.          see main text body for details
  14786.          ------------------------------------------------------------------
  14787.  
  14788.  
  14789. 6.10.14  Source Address Enable Register              { 3cfh    0fh    R/W }
  14790. ---------------------------------------------------------------------------
  14791.          Trident 8900 only
  14792.          ------------------------------------------------------------------
  14793.          <0>      Source Address Enable
  14794.          <7..1>   Reserved.  Always <=0000000>.
  14795.          ------------------------------------------------------------------
  14796.  
  14797.  
  14798. ------------------------------------------------------------------------------
  14799.  
  14800.  
  14801.  
  14802.  
  14803. Thank you for using this reference work.  If you have any useful comments which
  14804. others would benefit from, please do take a little of your valuable time to let
  14805. me know your thoughts.  Only by so doing will this work improve over time.  The
  14806. author really wants to hear!
  14807.  
  14808.  
  14809. [End of file: vga.doc]
  14810.  
  14811.