JPS62133487A - Linear drawing system for display - Google Patents

Linear drawing system for display

Info

Publication number
JPS62133487A
JPS62133487A JP60272581A JP27258185A JPS62133487A JP S62133487 A JPS62133487 A JP S62133487A JP 60272581 A JP60272581 A JP 60272581A JP 27258185 A JP27258185 A JP 27258185A JP S62133487 A JPS62133487 A JP S62133487A
Authority
JP
Japan
Prior art keywords
memory
data
straight line
graphic memory
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP60272581A
Other languages
Japanese (ja)
Inventor
禎司 桑原
敏彦 小倉
青津 広明
啓一 中根
信輝 浅井
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP60272581A priority Critical patent/JPS62133487A/en
Publication of JPS62133487A publication Critical patent/JPS62133487A/en
Pending legal-status Critical Current

Links

Abstract

(57)【要約】本公報は電子出願前の出願データであるた
め要約のデータは記録されません。
(57) [Summary] This bulletin contains application data before electronic filing, so abstract data is not recorded.

Description

【発明の詳細な説明】 〔発明の利用分野〕 本発明は、ビットマツプディスプレイにおける図形描画
方式に係り、特に直線を高速に描画することのできる、
かかる直線描画方式に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Application of the Invention] The present invention relates to a graphic drawing method in a bitmap display, and in particular to a method for drawing straight lines at high speed.
This invention relates to such a straight line drawing method.

〔発明の背景〕[Background of the invention]

従来ラスターオペレーションを高速に実現する手段とし
て特開昭59−101696号公報等に記載されている
様な発明がある。ラスターオペレーションは、グラフィ
ックメモリにおける内容更新がその処理速度を大きく左
右するため、上記の様な発明は極めて有用である。
Conventionally, there is an invention as described in Japanese Patent Application Laid-Open No. 101696/1983 as a means for realizing raster operations at high speed. Since the processing speed of raster operations is greatly influenced by updating the contents in the graphic memory, the invention as described above is extremely useful.

ところがディスプレイにおける直線の描画には、該直線
上のドツトの発生と、発生した該ドツトのグラフィック
メモリへの書き込み、と言う2つの処理を必要とし、上
述の発明を適用する様なシステムでは、直線上のドツト
発生をハードウェアで高速化しているのが普通である。
However, drawing a straight line on a display requires two processes: generating dots on the straight line and writing the generated dots into the graphic memory. Usually, the above dot generation is sped up using hardware.

つまり上述の発明は、CAD (Computer A
idedDesign )のようなかなり高置なグラフ
ィックスを必要とする比較的高価格なシステムを前提と
したものであった。
In other words, the above invention is based on CAD (Computer A).
It was intended for use with relatively expensive systems that require fairly sophisticated graphics, such as IDEdDesign.

ワードプロセッサや中級パーソナルコンピュータでは、
直線上のドツト発生はソフトウェアで行い、発生したド
ツトをCPUがグラフィックメモリに書き込むため、図
形描画の処理速度は遅い。
Word processors and intermediate personal computers
The generation of dots on a straight line is performed by software, and the CPU writes the generated dots into the graphic memory, so the processing speed of graphic drawing is slow.

特にディスプレイに高精細なCRTを使用するようにな
り、グラフィックスにおける処理速度の不十分さが目立
つようになってきたが、上記発明はワードプロセッサの
如き低価格な機器において適用できる程安価なものでは
ないので、低価格なシステムにおいても適用できるよう
な、コストの余りかからない高速な直線描画方式が必要
とされていた。
In particular, as high-definition CRTs are used for displays, the insufficient processing speed of graphics has become noticeable, but the above invention is not cheap enough to be applied to low-cost equipment such as word processors. Therefore, there was a need for an inexpensive, high-speed linear drawing method that could be applied even to low-cost systems.

次に、直線上のドツト発生(直線発生)をソフトウェア
で行う従来の技術について説明する。
Next, a conventional technique for generating dots on a straight line (straight line generation) using software will be explained.

第9図は、一般KDDA(Digital Diffe
rential Analyser 、 デジタル微分
解析機)と呼ばれているアルゴリズムを用いた直線描画
の従来のプログラムを示すフローチャートでおる。
Figure 9 shows a general KDDA (Digital Diffe)
This is a flowchart showing a conventional program for drawing straight lines using an algorithm called a rental analyzer (digital differential analyzer).

すなわち、同フローは、始点座標が(x、yLでX方向
の長さがΔx、y方向の長さがΔyで、ΔX≧Δy>O
の条件が成立する場合の直線を発生(描画)するプログ
ラムのフp−である。
In other words, in the same flow, the starting point coordinates are (x, yL, the length in the X direction is Δx, the length in the y direction is Δy, and ΔX≧Δy>O
This is a program file p- that generates (draws) a straight line when the following conditions are met.

このプログラムでは直線上の座標(XI、yi)を順次
発生(描画)する。ここで1≦i≦ΔXであり、xj−
xj−1+ 1 (2<J <Δx、x1−x)である
。yHは、図中のステップ81において、eの値がOよ
り大きければ、Yi−jの値より1つ増加するが、eの
値が0より太き(なれば、Yi−1と同じ値でちる。
This program sequentially generates (draws) coordinates (XI, yi) on a straight line. Here, 1≦i≦ΔX, and xj−
xj-1+1 (2<J<Δx, x1-x). In step 81 in the figure, if the value of e is larger than O, yH increases by one from the value of Yi-j, but if the value of e is thicker than 0 (then it is the same value as Yi-1). Chiru.

このプログラムで使用されているアルゴリズムは単純で
複雑な計算を必要としないので直線上の一点一点の座標
の算出は比較的高速に行なえるが、同図のステップ80
における(x、y)位置に点を描画するという描画処理
では、第10図のステップ1001〜1004に見られ
る様にグラフィックメモリから計算で求めた所定アドレ
スのワード・データを読み出し、その中の1ビツトだけ
を書き換えて再びグラフィックメモリに書き込むと言う
処理が必要であり、しかも(x、y)座標発生からグラ
フィックメモリのデータ更新ま、での上述のような処理
をΔχ回繰り返さなければならないので、これらの処理
を全てCPUで実行していたのでは高速な処理が期待で
きないわけである。
The algorithm used in this program is simple and does not require complicated calculations, so the coordinates of each point on a straight line can be calculated relatively quickly.
In the drawing process of drawing a point at the (x, y) position in FIG. 10, as shown in steps 1001 to 1004 in FIG. It is necessary to rewrite only the bits and write them into the graphic memory again, and the above-mentioned process from generating the (x, y) coordinates to updating the data in the graphic memory must be repeated Δχ times. If all of these processes are executed by the CPU, high-speed processing cannot be expected.

直線発生の別の方法として、Run Length法と
呼ばれる方法が従来からある。Run Length法
による直線描画処理のプログラムの流れを第11図にプ
ログラム700として示す。
Another conventional method for generating straight lines is a method called the Run Length method. The flow of a program for straight line drawing processing using the Run Length method is shown as a program 700 in FIG.

この方法では第12図に示すような直線を描画する時に
、まず水平線分900の始点座標(x+y)と長さtを
算出し、しかるべき後に第11図のステップ90におい
て、水平線分900上の点を描画する。
In this method, when drawing a straight line as shown in FIG. 12, first the starting point coordinates (x+y) and length t of the horizontal line segment 900 are calculated, and then, in step 90 of FIG. Draw a point.

このステップ90に見られる点の描画処理の詳細を第1
5図のサブルーチン800に示す。第8図のステップ1
00の処理は、第9図のステップ80の処理と全く同じ
処理であり、換言すれば第10図のサプルーチ/100
0に示される処理である。
The details of the point drawing process seen in step 90 are explained in the first section.
This is shown in subroutine 800 in FIG. Step 1 in Figure 8
The processing of step 00 is exactly the same as the processing of step 80 in FIG.
This is the process shown in 0.

以上、従来から知られているソフトウェアによる直線発
生(描画)の方法を2つ簡単に説明したわけであるが、
何れの方法においても、すでに説明したように、直線上
の一点一点の座標の描画処理(ピット処理)に多くのス
テップを要し、かかるステップをCPUで実行している
限り、高速な直線描画は期待できないという欠点があっ
た。
Above, we have briefly explained two methods of generating (drawing) straight lines using software that have been known in the past.
As explained above, in either method, many steps are required to draw the coordinates of each point on the straight line (pit processing), and as long as these steps are executed by the CPU, it is possible to draw the coordinates of each point on the straight line at high speed. The drawback was that the drawing quality was unpredictable.

またソフトウェアによる直線描画の低速性を改善して高
速化するためにハードウェアを用いる従来提案された発
明は、高級な機器(高価な機器Xは適用可能であるが、
ワードプロセッサや中級パーソナルコンピュータの如き
低価格機器に対しては、コストの面で適用困難であるこ
とは先にも説明した。
In addition, previously proposed inventions that use hardware to improve the slowness of straight line drawing by software and speed it up are applicable to high-end equipment (expensive equipment
As previously explained, it is difficult to apply this method to low-cost equipment such as word processors and intermediate-level personal computers due to cost considerations.

〔発明の目的〕[Purpose of the invention]

本発明は、上述のような従来の技術的事情にかんがみ、
なされたものであり、従って本発明の目的は、ワードプ
ロセッサや中級パーソナルコンピュータなどの低価格機
器に対しても適用できる程度にコスト低廉であり、しか
も高速な直線描画を期待できるハードウェアを利用した
ディスプレイにおける直線描画方式を提供することにあ
る。
In view of the conventional technical circumstances as described above, the present invention
Therefore, the object of the present invention is to provide a display using hardware that is low in cost enough to be applied to low-cost equipment such as word processors and intermediate-level personal computers, and that can be expected to perform high-speed straight line drawing. The purpose of this invention is to provide a straight line drawing method for

〔発明の概要〕[Summary of the invention]

本発明では、Run Length法で求めた線分(つ
まり始点座BAA x t yとそこからの長さ)を一
度にグラフィックメモリに書き込む事のできる最大の長
さく1ワードを16ビツトとすると、16ドツトがこの
最大長になる)の線分に分割して、分割した線分を一度
の書き込み動作でグラフィックメモリに書き込むための
ハードウェアを設けることにより、従来のRun Le
ngth法の長所を利用すると共に、メモリへの書き込
み動作の効率化を図り、結果として高速な直線描画方式
を実現している。
In the present invention, the maximum length that can be written to the graphic memory at once is 16 bits per word, which is the line segment obtained by the Run Length method (that is, the starting point BAA x t y and the length from there). The conventional Run Le
In addition to utilizing the advantages of the NGTH method, the writing operation to the memory is made more efficient, and as a result, a high-speed straight line drawing method is realized.

説明を若干付加する。直線発生のアルゴリズムには何8
1類かあるが、先に説明したDDAによるものが特に有
名であり、多くのシステムで実現されている。その他の
アルゴリズムに、これも先に説明したがRun Len
gthを利用したものがあり、このRun Lengt
h法は、直線を構成する水平線。
Add some explanation. What is the algorithm for straight line generation?
There is one type, but the one based on DDA described above is particularly famous and is implemented in many systems. Other algorithms include Run Len, which was also explained earlier.
There is one that uses gth, and this Run Lengt
The h method is a horizontal line that makes up a straight line.

垂直線の長さを次々と発生していくので、1ドツトずつ
発生してい<DDA方式より、繰り返し計算の回数が少
なくなる場合が多く、特にソフトウェアによる直線発生
の場合には有利である。
Since the length of the vertical line is generated one after another, the number of repeated calculations is often smaller than the DDA method, which generates one dot at a time, and is particularly advantageous when straight lines are generated by software.

ところが、現状ではRun Lengthで求めた線分
を実際のグラフィックメモリに展開するためには、CP
Uによるビット処理(描画処理)が不可欠となるが、C
PUによるビット処理は先にも述べたように時間がかか
るため、このRun Length法の有利な点がうま
く生かされているとは言えなかったわけである。
However, currently, in order to expand the line segment determined by Run Length into the actual graphic memory, it is necessary to use the CP
Bit processing (drawing processing) by U is essential, but C
As mentioned above, bit processing by the PU takes time, so the advantages of the Run Length method cannot be effectively utilized.

そこで本発明は、この点を解決するため、与えられた線
分を高速にグラフィックメモリに展開する手段として、
比較的回路規模が小さく、コストも低廉な・・−ドウエ
アを開発して提案したものと云うことができる。
Therefore, in order to solve this problem, the present invention provides a means for rapidly expanding a given line segment into a graphic memory.
It can be said that we have developed and proposed hardware that has a relatively small circuit scale and low cost.

〔発明の実施例〕[Embodiments of the invention]

次に図を参照して本発明の詳細な説明する。 The present invention will now be described in detail with reference to the drawings.

先ず、本発明をワードプロセッサに適用する場合を想定
し、第2図を参照してワードプロセッサの構成概要を説
明する。
First, assuming that the present invention is applied to a word processor, an outline of the configuration of the word processor will be explained with reference to FIG.

すなわち、第2図は、本発明の実施対象としてのワード
プロセッサのハードウェア構成の一例を示すブロック図
である。同図の破線内25はワードプロセッサの制御部
のブロックダイヤグラムを示している。
That is, FIG. 2 is a block diagram showing an example of the hardware configuration of a word processor to which the present invention is implemented. 25 within the broken line in the figure shows a block diagram of the control section of the word processor.

この制御部25は、ホス)CPU(中央処理装置)25
1、電源投入時に実行するプログラムを有するブートR
OM252、ワードプロセッサどしての機能を実行する
ためのプログラムや情報を格納するための随時、読出し
、書込み可能なメモリ253(以下RAMと呼ぶ。)、
ホストCPU251の指令に従って画面表示パターンを
生成し、CELTモニター23に映像信号を送出するC
RT表示装置254、ホス)CPU251の指令に従っ
てフロッピディスクドライブ(FDD)24を制御する
フロッピディスクコントローラ(FDC)255、ホス
)CPU25fの指令に従ってプリンタ22を制御する
信号や印字信号をプリンタ22に送出したり、プリンタ
22の状態信号をプリン゛り22より受はホストCPU
251に送出するプリンタコントローラ256、ホスト
CPU251の指令に従ってキーボード21を制御し、
キーボード21からの入力信号をホス)CPU251へ
送出するキー人力コントローラ257、および前記ホス
トCPU251、プートROM252、プログラムメモ
リ255、CRT表示装置254、フ四ツピディスクコ
ントローラFDC255、プリンタコントローラ256
、およびキー人力=ントローラ257を結ぶ内部配線路
りにより構成されている。
This control unit 25 includes a host CPU (central processing unit) 25
1. Boot R has a program that runs when the power is turned on.
OM 252, a memory 253 (hereinafter referred to as RAM) that can be read and written at any time to store programs and information for executing functions such as a word processor;
A C that generates a screen display pattern according to instructions from the host CPU 251 and sends a video signal to the CELT monitor 23.
RT display device 254, host) A floppy disk controller (FDC) 255, which controls the floppy disk drive (FDD) 24 according to commands from the CPU 251, sends signals to control the printer 22 and print signals to the printer 22 according to commands from the CPU 25f. The host CPU also receives the status signals of the printer 22 from the printer 22.
The keyboard 21 is controlled according to the commands from the printer controller 256 and the host CPU 251, which are sent to the printer controller 251.
A key controller 257 that sends input signals from the keyboard 21 to the host CPU 251, the host CPU 251, the boot ROM 252, the program memory 255, the CRT display device 254, the disk controller FDC 255, and the printer controller 256.
, and an internal wiring path connecting the key controller 257.

以上、説明したワードプロセッサの構成において、本発
明が適用されるのはCFLTfi示装置254において
である。
In the word processor configuration described above, the present invention is applied to the CFLTfi display device 254.

そこで本発明の一実施例として、CRTff示装置25
の詳細ブロック図を第1図に示す。
Therefore, as an embodiment of the present invention, the CRTff display device 25
A detailed block diagram of this is shown in FIG.

第1図に示すCRT表示装置254は、その全体の制御
を行なうCPU111、該CPU111に必要なりロッ
ク等の信号を供給するクロックジェネレータ112、グ
ラフィックメモリVRAM117の内容を順次読出すア
ドレス信号を作り出し、またCELTモニタ23を制御
する同期信号を発生するCRTコントローラ113、グ
ラフィックメそすVRAM117から読みだしたデータ
を直列のビデオ信号に変換するシフトレジスタや、CR
Tコント四−2113からの同期信号をCRTモニタ2
3に供給するドライバなどからなる周辺制御回路114
、映像信号と同期信号を受けて画面表示を行なうCRT
モニター23、グラフィックメモリVRAM117への
アクセスを制御するメモリ周辺制御回路116、画面の
画像ビットの1ビツト対応にビットマツプとして存在し
、ダイナミックRAMから構成されているグラフィック
メモリVRAM117、外部からの事象に応じてCPU
I 11に割込み信号を与えプログラムを分岐させる割
込コントローラ118、シフト読出しや書込制御ドツト
などの制御情報を保持する制御レジスタ119、メモリ
122とキャラクタジェネレータCG123に対するC
’PU111からのアクセスと、第2図のホストCPU
251からのアクセス信号aを多重制御するようにした
衝突制御回路120、メモリ122への多重化アドレス
信号の生成とリフレッシュ動作を制御するダイナミック
RAMコントローラ121、プログラムやデータを保持
するダイナミックRAM122、漢字、かな、英数文字
などをドツトマトリクスパターンで記憶するROMから
なるキャラクタジェネレータCG125とCPU111
とメモリ同辺制御回路1160間に位置するビットロジ
ック回路124(以下BLUと略す。)から構成されて
いる。
The CRT display device 254 shown in FIG. 1 includes a CPU 111 that controls the entire device, a clock generator 112 that supplies necessary lock signals to the CPU 111, and an address signal that sequentially reads out the contents of the graphic memory VRAM 117. A CRT controller 113 that generates a synchronizing signal to control the CELT monitor 23, a shift register that converts data read from the graphics memory VRAM 117 into a serial video signal, and a CR
Synchronizing signal from T control 4-2113 to CRT monitor 2
Peripheral control circuit 114 consisting of a driver etc. supplied to
, a CRT that displays a screen by receiving video signals and synchronization signals
The monitor 23, the memory peripheral control circuit 116 that controls access to the graphics memory VRAM 117, the graphics memory VRAM 117 that exists as a bitmap corresponding to one image bit on the screen and is composed of dynamic RAM, and that controls access to the graphics memory VRAM 117 in response to external events. CPU
An interrupt controller 118 that gives an interrupt signal to I11 and branches the program, a control register 119 that holds control information such as shift read and write control dots, and a controller for the memory 122 and character generator CG123.
'Access from PU111 and host CPU in Figure 2
251, a dynamic RAM controller 121 that controls generation of multiplexed address signals to the memory 122 and refresh operations, a dynamic RAM 122 that holds programs and data, kanji characters, A character generator CG125 consisting of a ROM that stores kana, alphanumeric characters, etc. in a dot matrix pattern, and a CPU 111
and a bit logic circuit 124 (hereinafter abbreviated as BLU) located between the same-side memory control circuit 1160 and the same-side memory control circuit 1160.

このBLU 124が本発明により付加されたハードウ
ェアである。
This BLU 124 is hardware added according to the present invention.

第2図ノホストCPU251と第1図OCaT表示装置
254は制御信号とデータ信号線aで結ばれており、C
RT表示装置254のCPU111、CELTコントロ
ーラ113、メモリ周辺制御回路116、割込コントロ
ーラ118、制御レジスタ119、衝突制御回路120
を相互に結んでいるのがCPUバスbであり、信号11
Jaとバスbとによるアクセス信号を多重してDRAM
コントローラ121とキャラクタジェネレータCG12
3に与えるメモリパスCが6る。
The host CPU 251 in FIG. 2 and the OCaT display device 254 in FIG.
CPU 111 of RT display device 254, CELT controller 113, memory peripheral control circuit 116, interrupt controller 118, control register 119, collision control circuit 120
CPU bus b interconnects the signals 11 and 11.
Access signals from Ja and bus b are multiplexed to create a DRAM.
Controller 121 and character generator CG12
The memory path C given to 3 is 6.

d*e*gは制御信号、アドレス、データ々とからなる
信号線、fはデータ線である。
d*e*g are signal lines consisting of control signals, addresses, and data, and f is a data line.

次に本発明により付加されたノ・−ドウエアであるBL
U 124について、その構成を第3図を用いて説明す
る。
Next, BL, which is the software added according to the present invention,
The configuration of U 124 will be explained using FIG. 3.

第3図は、第1図におけるBLU124の詳細を示すブ
ロック図であると共に、CPU111からグラフィック
メモリVRAM117に至るデータの流れを説明するた
めの図でもある。
FIG. 3 is a block diagram showing details of the BLU 124 in FIG. 1, and is also a diagram for explaining the flow of data from the CPU 111 to the graphic memory VRAM 117.

第3図を8照する。BLU124はCPUl11、グラ
フィックメモリ117からのデータをラッチするレジス
タ61.68、演算回路62.シフト回路63、選択回
路64及びシフト量や演算の種類を指定し、選択回路6
4に選択信号を供給する制御信号発生回路65からなる
See Figure 3. The BLU 124 includes a CPU 11, registers 61 and 68 that latch data from the graphic memory 117, and an arithmetic circuit 62. Specify the shift circuit 63, selection circuit 64, shift amount and type of operation, and select the selection circuit 6.
The control signal generation circuit 65 supplies a selection signal to the circuit 4.

制御信号発生回路65の内部には、CPUl11から与
えられた制御情報を保持するレジスタがあ°るが、第3
図においてはそれらのレジスタ及びレジスタに情報を転
送する転送経路は省略しである。
Inside the control signal generation circuit 65, there is a register that holds control information given from the CPU 11.
In the figure, these registers and transfer paths for transferring information to the registers are omitted.

66はCPUバスbからのアドレス線、67はデータ線
である。本図では第1図のd、e、Hの信号線をデータ
線とアドレス及び制御線とに区別しである。
66 is an address line from CPU bus b, and 67 is a data line. In this figure, the signal lines d, e, and H in FIG. 1 are divided into data lines and address and control lines.

CPUt j 12>!/97(ツ/メモ!jVRAM
117に対しリードモディファイライトモードによりデ
ータの書き込みを行なう場合、書き込みデータはレジス
タ61にラッチされ、レジスタ61の出力Aが、制御信
号発生回路65によって決定されるシフト量(CPU1
11から図示せざる転送経路によって、書き込みデータ
の先頭ビット位置を示す情報が制御信号発生回路65に
与えられているので、この情報によって定まるシフト量
)に従って、シフト回路63において所定の量だけシフ
トされ出力Cとなる。
CPUt j 12>! /97(ツ/Memo!jVRAM
When data is written to 117 in the read-modify-write mode, the write data is latched in the register 61, and the output A of the register 61 is determined by the shift amount (CPU1
11 through a transfer path (not shown) to the control signal generation circuit 65, the data is shifted by a predetermined amount in the shift circuit 63 according to the shift amount determined by this information. The output becomes C.

一方データの8I込みに先立ってグラフィックメモリV
RAM117より読みだされたデータが、演算回路62
と選択回路64に与えられる(図中B)。
On the other hand, prior to including data 8I, graphic memory V
The data read from the RAM 117 is sent to the arithmetic circuit 62.
is applied to the selection circuit 64 (B in the figure).

演算回路62で出力CとBのビット演算が行われ、結果
がDとなって出力される。選択回路64でグラフィック
メモリ117から読みだされたデータBの特定の数ビッ
トが演算結果りの対応するビットで置き換えられ、その
結果Eがメモリ周辺制御回路116を経てグラフィック
メモリ117の入力となる。
The arithmetic circuit 62 performs bit operations on the outputs C and B, and outputs the result as D. A selection circuit 64 replaces a specific number of bits of data B read from the graphic memory 117 with corresponding bits of the operation result, and the result E becomes an input to the graphic memory 117 via the memory peripheral control circuit 116.

さらにM4図を用いて第3図におけるBLUI24内で
のデータの流れを詳細に説明する。第4図におけるA−
Ei[3図の各ブロックの入出力線のA−Hのデータの
内容を示している。
Furthermore, the flow of data within the BLUI 24 in FIG. 3 will be explained in detail using diagram M4. A- in Figure 4
Ei[3 shows the contents of data of input/output lines A to H of each block in FIG.

AはCPU111から与えられたソースデータであり、
1語(例えば16ビツト)のうち先頭からWNNピット
のみが有効なデータであるとする。
A is source data given from the CPU 111,
It is assumed that only the WNN pits from the beginning of one word (for example, 16 bits) are valid data.

ここで先頭のビット位置がどこかというビット位置情報
は同じ(CPU111から別に与えられている。このソ
ースデータWNビットとグラフィックメモリから読み出
されたデータBのDN番目ビットからはじまるWN分の
ビットの内容(b2)との間で演算を実行し、その演算
結果でデータBの中のb2を置き換えてデータEを得る
Here, the bit position information indicating where the first bit position is is the same (separately given from the CPU 111. This source data WN bit and the WN bits starting from the DNth bit of data B read from the graphic memory An operation is performed with the content (b2), and b2 in data B is replaced with the result of the operation to obtain data E.

従ってデータBのbl及びb3の内容は不変でなければ
ならない。まずCPU111がら与えられたソースデー
タAはレジスタ61にラッチされる。その後シフト回路
63によって前述のビット位置情報によって定まるDN
ビットだけ右にシフトされ、シフト回路63の出力はC
の様になる。
Therefore, the contents of bl and b3 of data B must remain unchanged. First, source data A given by the CPU 111 is latched into the register 61. Thereafter, the shift circuit 63 determines the DN determined by the bit position information mentioned above.
The output of the shift circuit 63 is shifted to the right by one bit, and the output of the shift circuit 63 is C.
It will look like this.

データCとデータBとの間で演算を実行し、データDを
得るが、グラフィックメモリ117に’Uき込むべきデ
ータは、Eでなければならない。そのため選択回路64
が必要となる。
An operation is performed between data C and data B to obtain data D, but the data to be written into the graphic memory 117 must be E. Therefore, the selection circuit 64
Is required.

制御信号発生回路65はCPtJlllから与えられて
いるDN、WNの情報に基づきMで示されるマスクデー
タを発生しこれが選択回路64に対する選択指示信号(
@3図の信号!M)となる。
The control signal generation circuit 65 generates mask data indicated by M based on the information of DN and WN given from CPtJll, and this generates a selection instruction signal (
@Figure 3 signal! M).

選択回路64にはデータDとBが入力として与えられる
が、マスクデータMのビットが00場合には対応するグ
ラフィックメモリのビットとしてBの内容を、Mのビッ
トが1の場合にはDの内容をそれぞれ、選択回路64は
選択し、結果としてデータEを作成して出力する。
Data D and B are input to the selection circuit 64. When the bit of mask data M is 00, the contents of B are input as the corresponding bits of the graphic memory, and when the bit of M is 1, the contents of D are input. The selection circuit 64 selects each of them, and creates and outputs data E as a result.

以−ヒの処理は、CPU111のグラフィックメモリ1
17に対するリードモディファイライトモードによるメ
モリアクセスの間に行われる。
The following processing is performed by the graphic memory 1 of the CPU 111.
17 during memory access in read-modify-write mode.

第5図は、第3図における演算回路62の具体例を示す
回路図である。同図において、91.92はセレクタ、
93はAND素子、94はEOR(排他的オア)素子、
99はN OT R子である。
FIG. 5 is a circuit diagram showing a specific example of the arithmetic circuit 62 in FIG. 3. In the same figure, 91.92 is a selector,
93 is an AND element, 94 is an EOR (exclusive OR) element,
99 is a NOT R child.

この様な簡単な回路構成でCPU111からのデータC
とグラフィックメモリ117から読みだしたデータBと
の間で第5A図に見られる如き16種類の二項論理演算
を実行することができる。
With such a simple circuit configuration, data C from CPU111
16 types of binary logical operations as shown in FIG. 5A can be performed between the data B read from the graphic memory 117 and the data B read from the graphic memory 117.

95.96は各々4ビツトから成る演算指定制御信号(
第3図におけるF)で、16通りの演piの種類を指疋
することができる。
95 and 96 are operation designation control signals (each consisting of 4 bits).
At F) in Figure 3, you can select 16 different types of Pi.

また、DIは第3図におけるシフト回路66からの出力
Cを表わし、DSiはグラフィックメモリ117から読
みだされたデータB(第3図のB)である。
Further, DI represents the output C from the shift circuit 66 in FIG. 3, and DSi is data B (B in FIG. 3) read from the graphic memory 117.

セレクタ91と92はI)t*Di と常にハイレベル
でちる信号98及び常にロウレベルである信号97の4
1il類の信号のうちから一つを選択する。
The selectors 91 and 92 select I)t*Di, a signal 98 which is always at a high level, and a signal 97 which is always at a low level.
One of the signals of the 1il class is selected.

各々が4ビツトの演算指定制御信号である95゜96に
よって、セレクタ91と92の出力Ri トDRiは1
6s類の組合せが可能でおり、これにより第5A図に示
した16種類の演算が可能となる。演算結果OPiが選
択回路64の入力りとなる(第6図のD)。
The outputs Ri and DRi of selectors 91 and 92 are set to 1 by 95°96, each of which is a 4-bit operation designation control signal.
6s types of combinations are possible, thereby making possible the 16 types of calculations shown in FIG. 5A. The calculation result OPi becomes an input to the selection circuit 64 (D in FIG. 6).

通常のメモリ転送、即ちCPU111からのデータをそ
のままグラフィックメモリ117に書き込む場合には、
CPU111から図示せざるルートで与えられる制御情
報としてのDNt−DN−。
In normal memory transfer, that is, when data from the CPU 111 is written directly to the graphic memory 117,
DNt-DN- as control information given from the CPU 111 via a route not shown.

としてWNで1ワード(または1バイト)のビット長を
指定し、演算結果OPiがDi となる様に演算を指定
すればよい。
It is sufficient to specify the bit length of 1 word (or 1 byte) in WN as , and specify the operation so that the operation result OPi becomes Di.

CPU111がグラフィックメモリ117からデータを
読み出す場合には、BLU124を介することなくこれ
を行ない、通常のリード動作と同様にグラフィックメモ
リから読みだされたデータは、CPU111のデータバ
スbに直接載せられる。
When the CPU 111 reads data from the graphic memory 117, it does so without going through the BLU 124, and the data read from the graphic memory is directly loaded onto the data bus b of the CPU 111 in the same way as in a normal read operation.

以上、第1図乃至第5図、第5A図を参照して本発明を
実施したワードプロセッサのハードウェア構成を説明し
てきた。
The hardware configuration of a word processor embodying the present invention has been described above with reference to FIGS. 1 to 5 and 5A.

このような構成のワードプロセッサでは、第2図に見ら
れるように、ホストCPU251からの指令に基づき、
CRTfi示装置254内のCPU111が直線や円弧
及び文字などを発生し、グラフィックメモリ117にビ
ットイメージとして展開する。図形や文字発生のプログ
ラムはメモリ122に格納されており、ホス)CPU2
51からの指令もメモリ122に書き込まれる。
In a word processor with such a configuration, as shown in FIG. 2, based on instructions from the host CPU 251,
The CPU 111 in the CRTfi display device 254 generates straight lines, arcs, characters, etc., and develops them in the graphic memory 117 as bit images. Programs for generating figures and characters are stored in the memory 122, and the CPU 2 (host)
Commands from 51 are also written into memory 122.

第1図に示したようなハードウェア構成、即ちCPU1
11とグラフィックメモリ117との間のデータ転送路
中にBLIJ124を設けたハードウェア構成では、直
線の描画に際し、直線上の一点一点の座標を発生する必
要がなく、第12図の黒く塗り潰した点の集合、つまり
水平(垂直)線分単位で直線を描画できるため、Run
 Length法の長所を利用し、高速に直線を描画す
ることが可能となる。その直線描画方式について以下説
明する。
The hardware configuration as shown in Fig. 1, that is, CPU1
In the hardware configuration in which the BLIJ 124 is installed in the data transfer path between the graphics memory 117 and the graphics memory 117, there is no need to generate the coordinates of each point on the straight line when drawing a straight line. Run
By utilizing the advantages of the Length method, it becomes possible to draw straight lines at high speed. The straight line drawing method will be explained below.

第6図は本発明の実施により可能となったサブルーチン
(第11図のステップ90の処理に相当)を示すフロー
チャートである。
FIG. 6 is a flowchart showing a subroutine (corresponding to the process of step 90 in FIG. 11) made possible by implementing the present invention.

同サブルーチン1100において、先ずステップ111
0で、与えられた始点座標(x*y)よりグラフィック
メモリVRAM117のワード・アドレスと該ワード内
のピット位置を計算する。発生すべき直線の線分が1ワ
ード長(16ドツト)に収まらない場合は、そのことを
ステップ1120で判断して、ステップ1150に、ま
た収まる場合は、ステップ1130に進む。
In the same subroutine 1100, first step 111
0, the word address of the graphic memory VRAM 117 and the pit position within the word are calculated from the given starting point coordinates (x*y). If the straight line segment to be generated does not fit within one word length (16 dots), this is determined in step 1120, and the process proceeds to step 1150; if it does, the process proceeds to step 1130.

ステップ1130では、BLU124にピット位置(B
ST)とビット長(ドツト長) 1 /をセットする。
In step 1130, the pit position (B
ST) and bit length (dot length) 1/.

第4図で言えば、WN−1’ 、DN−BSTとなる。In FIG. 4, they are WN-1' and DN-BST.

ステップ1140でグラフィックメモリ(VRAM)1
i7にパターンデータ(第4図のA)をCPU111が
書き込む動作を行なうと、実際には、BLU124の働
きにより、第4図のデータE(D1部分にドツト長WN
が書き込まれたものが書き込まれ、結果として、一度の
メモリ書き込み動作により、発生ずべき直線の水平線分
(ドツト長)が書き込まれたことになる。
At step 1140, the graphics memory (VRAM) 1
When the CPU 111 writes the pattern data (A in FIG. 4) to i7, the BLU 124 actually writes the data E (dot length WN in the D1 part) in FIG.
is written, and as a result, a straight horizontal line segment (dot length) that should have been written is written in one memory write operation.

さて線分(ドツト長)t′が1ワード長(16ドツト)
を超える長さでおる場合は、ステップ1150以下の処
理に進み、線分t′を分割し、グラフィックメモリVR
AM117に書キ込む。
Now, the line segment (dot length) t' is 1 word long (16 dots)
If the length is longer than
Write to AM117.

すなわちステップ1150において、BLU124のビ
ット位置をBSTにセットし、ビット長を(t’−88
T)Kセットしてパターンデータをグラフィックメモリ
VRAM117に書き込む動作を行なう(ステップ11
50.1160)。
That is, in step 1150, the bit position of BLU 124 is set to BST, and the bit length is set to (t'-88
T) Set K and write the pattern data into the graphic memory VRAM 117 (step 11).
50.1160).

次に線分の長さから令書き込んだ線分の長さを引き、ま
だ書き込みが終了していない線分の長さを求める(ステ
ップ1170)。
Next, the length of the newly written line segment is subtracted from the length of the line segment to obtain the length of the line segment for which writing has not yet been completed (step 1170).

以後の線分の書き込みは必ず先頭ビット位置から始まる
のでBLU 124のピット位置を0にセットし、最大
の長さ16(再々述べているように、1ワードは16ビ
ツトと仮定している。)をビット長にセットする。t′
が16より大きい場合は、ステップ1190〜ステップ
1220ループ長さ16ドツトスつの線分に分割してグ
ラフィックメモリ117に書き込む動作を行なう。
Since writing of subsequent line segments always starts from the first bit position, the pit position of BLU 124 is set to 0, and the maximum length is 16 (as mentioned again, it is assumed that one word is 16 bits). Set to bit length. t'
If is larger than 16, the loop from step 1190 to step 1220 is divided into line segments each having a length of 16 dots and written into the graphic memory 117.

ステップ1200のアドレス更新はX座標を更新するこ
とに相当する。t′く16になればステップ1230〜
1250の処理により残りの線分をグラフィックメモリ
117に書き込む動作を行ない、処理を終了する。この
時ステップ1230でBLU124のビット長をt′に
セットする。
Updating the address in step 1200 corresponds to updating the X coordinate. When t' reaches 16, step 1230~
Through the process 1250, the remaining line segments are written into the graphic memory 117, and the process ends. At this time, in step 1230, the bit length of the BLU 124 is set to t'.

以上説明した様に本発明による直線描画方式では、CP
U111はビット処理を全(意識する必要がなく、単に
グラフィックメモリVRAM117にデータを書き込む
のと同じ動作を行なうだけでよい。
As explained above, in the straight line drawing method according to the present invention, the CP
U111 does not need to be conscious of all bit processing; it only needs to perform the same operation as writing data to the graphic memory VRAM117.

第7図に示したようなΔy〉ΔXの条件を満足する直線
(典型的には垂直線)については、第11図のプログラ
ム700\を少し変更すると、第7図の910の黒く塗
り潰した垂直線分の始点(x。
For a straight line (typically a vertical line) that satisfies the condition of Δy>ΔX as shown in Figure 7, by slightly modifying the program 700\ in Figure 11, the black-filled vertical line 910 in Figure 7 can be obtained. Starting point of the line segment (x.

y)と長さtを算出することができる。y) and the length t can be calculated.

この場合はこの垂直線分を一度に書き込むことはできな
いが、第11図のプログラム700のステップ90の処
理を第8図に示すサブルーチン1300と置換すること
により、やはり高速描画が可能となる。
In this case, this vertical line segment cannot be written all at once, but by replacing the processing in step 90 of the program 700 in FIG. 11 with the subroutine 1300 shown in FIG. 8, high-speed drawing is still possible.

ステップ1320でビット位置及び長さt′をBLU1
24にセットする。この状態でグラフィックメモリVR
AM117にパターンデータを書き込む動作をCPU1
11が行なえば、ビットBSTの位置に1ドツトだけ書
き込まれることになり、このパターンデータの書き込み
をアドレスを更新しながら27回だけ行えば垂直線分の
書き込みが終了する。
In step 1320, the bit position and length t' are set to BLU1.
Set it to 24. Graphic memory VR in this state
CPU1 performs the operation of writing pattern data to AM117.
If 11 is performed, only one dot will be written at the position of bit BST, and if this pattern data is written 27 times while updating the address, the writing of the vertical line segment will be completed.

グラフィックメモリVIIAM117のアドレスをy方
向に連続になるようにつけておき、CPU111がイン
テル8086のストリング操作のような命令を持つもの
であれば、ストリング操作命令を直線描画に効果的に利
用でき、より高速な処理が行える。
If the addresses of the graphic memory VIIAM 117 are assigned consecutively in the y direction, and the CPU 111 has instructions like the string manipulation instructions of the Intel 8086, the string manipulation instructions can be effectively used for straight line drawing, resulting in faster speeds. processing can be performed.

〔発明の効果〕〔Effect of the invention〕

本発明によれば、従来は一点一点の座標を算出しグラフ
ィックメモリ、に書き込むことによって直線を発生して
いたのに対し、直線を構成する微小線分単位(1ワ一ド
長単位)でグラフィックメモリへ書き込む線分の長さを
算出し、かつ算出した単位長の線分を一度のグラフィッ
クメモリへのアクセス動作で描画することが可能となっ
たため、直線の描画が極めて高速に行える。
According to the present invention, whereas conventionally a straight line was generated by calculating the coordinates of each point and writing them into a graphic memory, the straight line is generated in minute line segment units (one word length unit). Because it is now possible to calculate the length of a line segment to be written to the graphic memory and to draw the calculated unit length line segment in a single access operation to the graphic memory, straight lines can be drawn extremely quickly.

例えば、第9図に見られる如き直線を発生する場合、従
来の方法では座標の発生回数、グラフィックメモリへの
アクセス回数がそれぞれΔχ回と2Δχ回であるのに対
し、本発明によると、座標の発生回数は31回、グラフ
ィックメモリへのアクセス回数はΔy+(Δx/(16
*Δy)〕*Δγ回(〔X〕はXを越えない最大の整数
、また*印は掛は算を表わす記号である)となり、直線
の発生に必要な計算回数、グラフィックメモリへのアク
セス回数が少なくなり、直線の描画処理がそれだけ高速
に行える。
For example, when generating a straight line as shown in FIG. 9, in the conventional method, the number of times the coordinates are generated and the number of times the graphic memory is accessed are Δχ and 2Δχ, respectively. The number of occurrences is 31, and the number of accesses to the graphic memory is Δy+(Δx/(16
*Δy)] *Δγ times ([X] is the largest integer that does not exceed As a result, straight lines can be drawn faster.

しかも本発明を実現するために必要なハードウェアは、
従来のCt’tT描画装置の一般的fli・−ドウエア
に付加するところの1100ゲ一ト程度のLSI(BL
U)だけであり、コスト的にはほとんど従来の装置と同
じ程度で本発明を実施することができる。
Moreover, the hardware necessary to realize the present invention is
An LSI (BL
U), and the present invention can be implemented at almost the same cost as conventional devices.

【図面の簡単な説明】[Brief explanation of drawings]

第1図は本発明の一実施例を示すブロック図、第2図は
本発明の適用対象としてのワードプロセッサの構成概要
を示すブロック図、第3図は第1図におけるビットロジ
ック回路(BLU) 124の詳細を示すブロック図、
第4図は第5図におけるBLU124の回路動作説明図
、第5図は第6図における演算回路62の具体例を示す
回路図、第5A図は第5図の演算回路において実行可能
な演算の種類を整理して示した説明図、第6図は本発明
の実施により可能となったサブルーチン(第11図のス
テップ90に相当)を示すフローチャート、第7図は発
生すべき直線の一例を示した説明図、第8図は第11図
におけるステップ90としてとり得るサブルーチンの一
例t−示すフローチャート、第9図は直線描画の従来の
プログラムを示すフローチャート、第10図は第9図に
おけるステップ80の詳細を示すフローチャート、第1
1図は直線描画の他の従来のプログラムを示すフローチ
ャート、第12図は描画すべき直線の一例を示す説明図
、第13図は第11図におけるステップ90の詳細を示
すフローチャート、である。 符号の説明 254・・・・・・(4T表示装置、111・・・・・
・CPU。 124・・・・・・ピットロジック回路(BLU)、1
17・・・・・・グラフィックメモリVRAM、700
,1100.1300・・・・・・本発明を実施したプ
ログラムの一例。 代理人 弁理士 並 木 昭 夫 薄 2 図 b 114  図 第 5 図 第6図 117  図 gs 図 1@0 図 (福山終了) 第10図
FIG. 1 is a block diagram showing an embodiment of the present invention, FIG. 2 is a block diagram showing an outline of the configuration of a word processor to which the present invention is applied, and FIG. 3 is a block diagram showing the configuration of a word processor to which the present invention is applied. Block diagram showing details of
4 is an explanatory diagram of the circuit operation of the BLU 124 in FIG. 5, FIG. 5 is a circuit diagram showing a specific example of the arithmetic circuit 62 in FIG. Fig. 6 is a flowchart showing a subroutine (corresponding to step 90 in Fig. 11) made possible by the implementation of the present invention, and Fig. 7 shows an example of a straight line that should be generated. 8 is a flowchart showing an example of a subroutine that can be taken as step 90 in FIG. 11, FIG. 9 is a flowchart showing a conventional straight line drawing program, and FIG. Flowchart showing details, 1st
FIG. 1 is a flowchart showing another conventional program for drawing straight lines, FIG. 12 is an explanatory diagram showing an example of a straight line to be drawn, and FIG. 13 is a flowchart showing details of step 90 in FIG. 11. Explanation of symbols 254... (4T display device, 111...
・CPU. 124...Pit logic circuit (BLU), 1
17...Graphic memory VRAM, 700
, 1100.1300... An example of a program that implements the present invention. Agent Patent Attorney Akira Namiki Fusuki 2 Figure b 114 Figure 5 Figure 6 Figure 117 Figure gs Figure 1@0 Figure (Fukuyama finished) Figure 10

Claims (1)

【特許請求の範囲】 1)表示すべき画像をドツトのイメージとして記憶する
グラフイツクメモリと、前記グラフイツクメモリに記憶
されたドツトのイメージに対応して各画素を輝点または
消点とすることにより前記画像を表示するビツトマツプ
デイスプレイと、前記グラフイツクメモリに表示すべき
画像を指定されてその画像データを前記グラフイツクメ
モリに転送する転送手段としてのCPU(中央処理装置
)と、を含んでなるデイスプレイ装置において、前記C
PUからグラフイツクメモリへの画像データ転送経路の
途中に次の各要素から成るビツトロジツク回路を設け、
表示すべき画像が直線であるとき、その高速描画を可能
にしたことを特徴とするデイスプレイにおける直線描画
方式、 (イ)表示すべき画像データとして、始点座標とそこか
らの長さによつて表される直線データが、該始点座標の
前記グラフイツクメモリにおける書き込みアドレスなら
びに該アドレスのワード内ビツト位置を表す情報と共に
、前記CPUから転送されたとき、これを取り込んで保
持する保持手段、(ロ)前記転送されてきたアドレスを
読み出しアドレスとして前記グラフイツクメモリよりデ
ータを読み出す手段、 (ハ)前記保持手段に保持されたデータと前記読み出し
手段により読み出されたデータとの間で前記CPUによ
り指定される所定の論理演算を行う手段、 (ニ)該論理演算の結果を前記グラフイツクメモリの元
のアドレス位置に書き込むため送出する手段。
[Scope of Claims] 1) A graphic memory for storing an image to be displayed as a dot image, and each pixel being set as a bright point or a vanishing point corresponding to the dot image stored in the graphic memory. a bit map display for displaying the image, and a CPU (central processing unit) as a transfer means for specifying an image to be displayed in the graphics memory and transferring the image data to the graphics memory. In the display device, the C
A bit logic circuit consisting of the following elements is installed in the image data transfer path from the PU to the graphics memory.
When the image to be displayed is a straight line, a straight line drawing method for a display is characterized by making it possible to draw the straight line at high speed. (b) holding means for capturing and holding the straight line data transferred from the CPU together with the write address of the starting point coordinates in the graphic memory and information representing the bit position in the word of the address; means for reading data from the graphic memory using the transferred address as a read address; (c) means for reading data from the graphic memory using the transferred address as a read address; (d) means for transmitting the result of the logical operation for writing into the original address location of the graphics memory;
JP60272581A 1985-12-05 1985-12-05 Linear drawing system for display Pending JPS62133487A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP60272581A JPS62133487A (en) 1985-12-05 1985-12-05 Linear drawing system for display

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60272581A JPS62133487A (en) 1985-12-05 1985-12-05 Linear drawing system for display

Publications (1)

Publication Number Publication Date
JPS62133487A true JPS62133487A (en) 1987-06-16

Family

ID=17515908

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60272581A Pending JPS62133487A (en) 1985-12-05 1985-12-05 Linear drawing system for display

Country Status (1)

Country Link
JP (1) JPS62133487A (en)

Similar Documents

Publication Publication Date Title
JP3240821B2 (en) High-performance image memory LSI and display device using the same
US4103331A (en) Data processing display system
JP3164832B2 (en) Drawing control device
US6952217B1 (en) Graphics processing unit self-programming
US4747042A (en) Display control system
US5446840A (en) System and methods for optimized screen writing
US4924432A (en) Display information processing apparatus
JPS62133487A (en) Linear drawing system for display
JPS63225290A (en) Display control circuit
JPS63108381A (en) Raster computation circuit
JP3110975B2 (en) Display with character mask function
JPH06149533A (en) Segment quick plotting system for reducing plotting processing for segment outside display area
JP2810609B2 (en) Graphic display method and apparatus
JPS642953B2 (en)
JP2954589B2 (en) Information processing device
JP3874781B2 (en) Method for supplying image data to monitor and graphic memory control device
JP2787487B2 (en) Circuit for determining the position of a line segment displayed and operated on a computer system
JP2829051B2 (en) Character display method
JPH02271424A (en) Full graphic picture display system
JPH0721757B2 (en) Information processing equipment
JPS61241871A (en) Information processor
JPH06214749A (en) Plotting controller
JPS63304293A (en) Display memory control circuit
JP2605609B2 (en) Dot display processing device
JPS63243990A (en) Character transmission system