3.3 Graphics Processor
Total Page:16
File Type:pdf, Size:1020Kb
SR PT01 Form 1 WAIVER THE UNIVERSITY OF NEW SOUTH WALES DECLARATION RELATING TO DISPOSITION OF PROJECT REPORT /THESIS This is to certify that I .. cQ/t:J6 ; .."ZH~Io.Jf! . being a candidate for the degree oL ... MA-S..tet'. c>F ... SC~III.C..~ .. am fully aware of the policy of the University relating to the retention and use of higher degree project reports and theses, namely that the University retains the copies submitted for examination and is free to allow them to be consulted or borrowed. Subject to the provisions of the Copyright Act, 1968, the University may issue a project report or thesis in whole or in part, in photostat or microfilm or other copying medium. In the light of these provisions I grant the University Librarian permission to publish, or to authorize the publication of my project report/thesis, in whole or in part. l also authorize the publication by University Microfilms of a 350 word abstract in Dissertation Abstracts International (applicable to doctorates only). SiJ,:nature Witness v Date ..../'t-4 .......... -Zl9 THE DEVELOPMENT OF A HIGH-PERFORMANCE NAPLPS VIDEOTEX DECODER A THESIS SUBMITTED TO THE DEPARTMENT OF COMPUTER SCIENCE UNIVERSITY COLLEGE THE UNIVERSITY OF NEW SOUTH WALES AUSTRALIAN DEFENCE FORCE ACADEMY FOR THE DEGREE OF MASTER OF SCIENCE By Qing Zhong April1988 2 OMAR 1989 USRARY SR.P.TlO CERTIFICATE OF ORIGINALITY I hereby declare that this thesis is my own work and that, to the best of my knowledge and belief, it contains no material previously published or written by another person nor material which to a substantial extent has been accepted for the award of any other degree or diploma of a university or other institute of higher learning, except where due acknowledgement is made in the text of the thesis. (Signed) .IL_ _ _ _____J I..... • • © Copyright 1988 by Qing Zhong 11 Acknowledgments I would like to thank my supervisor Dr. G. W. Gerrity for his encouragement, patience, invaluable assistance, and being such a good friend. I would also like to extend my thanks to Dr. C. Lokan, and Dr. A. P. Seneviratne for their helpful comments. I want to express my thanks to the following people who have helped me in many areas and given me advice on various topics: Dr. C. W. Johnson, Mr. L. P. Brown, Mr. W. K. Ung, Mr. C. Vance, Mrs. W. A. Nelowkin, Mr. G. Collin, Mr. P. O'Keeffe, Mr. A. Lagos, Mr. C. Stevens, Mr. P. Tang. I gratefully acknowledge the financial assistance of a University Scholarship. Ill Abstract This thesis reports the development of a high-performance NAPLPS videotex pro tocol decoder. Various measurements were made to quantify the performance of the decoder and to identify the performance bottlenecks. The results show conclu sively that the bottlenecks are in the system software, and much of the complexity of the software is in fact the direct result of the poor match between the graphics features supported by the graphics processor used, and those required to imple ment NAPLPS efficiently. It suggests a number of techniques, such as optimised hardware support, which can be applied to remove these bottlenecks. A number of implementation issues such as the scope, interpretation, and verification of the NAPLPS standard are discussed. The limitations and suitability of the NAPLPS standard with respect to user interaction and animation are investigated. Some short-term and long-term solu tions for providing better user interaction and animation are suggested. iv Contents Acknowledgments iii Abstract iv 1 Background 1 2 Overview of NAPLPS 6 2.1 Videotex Service and NAPLPS 6 2.2 Background . 7 2.3 Basic Features 9 2.4 NAPLPS ... 10 2.4.1 Code-Extension . 10 2.4.2 The Unit Screen and Fixed-Point Binary Format 13 2.4.3 Text conversion . 14 2.4.4 Graphics .... 15 2.4.5 The Logical Pel . 17 2.4.6 Colour Control 17 2.4.7 Control .. 19 2.4.8 User Input 19 2.4.9 Macros ... 19 v 2.5 Conformation and Service Reference Model . 20 3 System Hardware 21 3.1 Introduction . ..... 21 3.1.1 Graphics Display 21 3.2 Raster Graphics System 34 3.2.1 Colour Lookup Table . 35 3.2.2 Graphics Functions . 37 3.3 Graphics Processor . 41 3.3.1 ACRTC ... 43 3.3.2 System Hardware Design 48 4 Software 51 4.1 Basic Principles of Implementing NAPLPS features . 55 4.1.1 Macros .... 55 4.1.2 Character Sets 56 4.1.3 DRCS ..... 56 4.1.4 Filled Graphic Primitives 57 4.1.5 Logical Pel ....... 58 5 Performance Analysis 60 5.1 Graphics Execution Speed Measurements 60 5.1.1 Maximum character-Parsing speed 60 5.1.2 Character-Display Speed. 61 5.1.3 Point-Drawing Speed ... 62 5.1.4 Rectangle-Drawing Speed 64 Vl 5.1.5 Polygon-Drawing Speed 65 5.1.6 Line-Drawing Speed 65 5.1. 7 Arc-Drawing Speed . 67 5.2 Analysis and Discussion .. 69 5.2.1 Bottlenecks and Possible Improvements 69 5.2.2 Cost/Performance Tradeoffs ...... 71 6 Extensions to NAPLPS standard 72 6.1 Introduction ..... 72 6.2 Animation Techniques 74 6.2.1 Animation techniques 74 6.3 User Interface .... 77 6.4 Temporary Solution 79 6.4.1· Technical Details 81 7 Discussion 83 7.1 NAPLPS standard 83 7.1.1 Scope of the standard 83 7 .1.2 Protocol Error Sequences 84 7.1.3 Interpretation and Verification of the NAPLPS standard. 85 7.2 Decoding Algorithms and Optimised Hardware Support 86 7.2.1 Logical Pel ... 86 7.2.2 Filling Polygons 92 7.3 Test Data 97 7.4 Cost 97 7.4.1 Hardware-Component Cost 97 Vll 7 .4.2 Software Cost . 99 7.5 Improvements ..... 99 7.5.1 Software Performance 99 7.5.2 Error Checking .... 100 7.5.3 ACRTC Register Set-up Values . 101 7.6 Use Better Graphics Controllers ..... 102 8 Conclusion 103 A Listings 105 ... Vlll List of Figures 1.1 PAL System . 2 2.1 Videotex Service ....................... 7 2.2 The Seven Functionally Separate Layers of the OSI Model . 8 2.3 7-Bit In-Use Table . 11 2.4 Code Extension in a 7-Bit Environment 12 2.5 The Unit Screen ........ 13 2.6 The Fixed-Point Binary Format. 14 2.7 Two-Dimensional Mode 14 2.8 PDI Command Format . 15 2.9 PDI Drawing Primitives 16 2.10 A Figure Drawn by Using Incremental Lines . 16 2.11 The Logical Pel . 17 2.12 A Filled Rectangle 18 2.13 NAPLPS Colour Encoding. 18 2.14 Textured Lines Drawn in Two Different Colour Modes 19 3.1 Mapping of Frame Buffer to Display Screen. (a) A Monochrome Display. (b) A Colour Display. 23 3.2 Arrangement of a Typical DRAM. 24 IX 3.3 Read Cycle Timing . 25 3.4 Write Cycle Timing 25 3.5 Page Mode Operation 26 3.6 Nibble Mode Operation 27 3. 7 Static-Column Decoding Operation . 28 3.8 Ripple Mode Operation . 28 3.9 Packed-Pixel Architecture 30 3.10 Planar Architecture . 30 3.11 Colour Expansion Operation 32 3.12 Translation . 33 3.13 Pixel and Planar Architecture 34 3.14 A Control Processor Driven Graphics System 34 3.15 A Graphics Processor Driven Graphics System 35 3.16 Dual-port Memory . 36 3.17 A Graphics Processor Driven Graphics System (Note the frame buffer has a dedicated port to the graphics processor.) . 36 3.18 A Colour Graphics Display System with Colour Lookup Table. 37 3.19 Texas Instruments TMS4161 Dual-port RAM 39 3.20 ACRTC Function Block Diagram . 43 3.21 ACRTC Interleaved Access Mode (**display data read from frame buffer) . 45 3.22 Early-Write Cycle 46 3.23 Early-Write and Read Cycles 47 3.24 RAS-CAS Generation Circuitry . 48 3.25 Block Diagram of a NAPLPS Decoder 50 X 4.1 Software Structure. (a) Code Generation (b) Code In Use 53 4.2 ACRTC PATTERN Command 56 4.3 ACRTC PAINT Command 57 4.4 Direct Fill . 59 4.5 Effect of line width Generated by Drawing Multiple Lines 59 6.1 Colour Cycling ......... 74 6.2 Simple Colour Table Animation . 75 6.3 Complex Colour Table Animation. 75 6.4 QingBox .............. 79 7.1 Draw a Line By Using Fill Method 87 7.2 An Arc .......... 87 7.3 Start and End Pels Overlay 88 7.4 Line Texture and Dot Space . 89 7.5 Line Drawn In Colour Mode 2. 90 7.6 A Textured Arc ........ 91 7. 7 Isolated Pixels Due to Quantization Errors 93 7.8 A New Scheme For Filling Primitives. 95 7.9 Direct Fill .. 96 7.10 Clipping Arc 100 Xl List of Tables 5.1 Character Display Speeds 61 5.2 Point Drawing Speed . 63 5.3 Rectangle (outlined) Drawing Speed 64 5.4 Rectangle (filled) Drawing Speed 65 5.5 Polygon (144 vertices) Fill Speed 66 5.6 Polygon (256 vertices) Fill Speed 66 5.7 Line Drawing Speed ...... 67 5.8 Arc (outlined) Drawing Speed . 68 5.9 Arc (filled) Drawing Speed ... 68 5.10 Arc (outlined) Drawing Speed . 69 5.11 Arc (filled) Drawing Speed ... 70 Xll Chapter 1 Background In conjunction with a computer-aided instruction project, the primary objective of this master thesis is to investigate the possibility of providing a low-cost, yet high-performance, graphics terminal to be used for presenting lesson materials. Most commercially-available computer-aided instruction, authoring and pre sentation systems have serious deficiencies which have inhibited them from gain ing wide acceptance.