JPH0683320A - Sprite control method - Google Patents

Sprite control method

Info

Publication number
JPH0683320A
JPH0683320A JP25886192A JP25886192A JPH0683320A JP H0683320 A JPH0683320 A JP H0683320A JP 25886192 A JP25886192 A JP 25886192A JP 25886192 A JP25886192 A JP 25886192A JP H0683320 A JPH0683320 A JP H0683320A
Authority
JP
Japan
Prior art keywords
sprite
display
sprites
pattern
background
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
JP25886192A
Other languages
Japanese (ja)
Inventor
Yukio Takeoka
幸夫 武岡
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.)
Hudson Soft Co Ltd
Original Assignee
Hudson Soft Co 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 Hudson Soft Co Ltd filed Critical Hudson Soft Co Ltd
Priority to JP25886192A priority Critical patent/JPH0683320A/en
Publication of JPH0683320A publication Critical patent/JPH0683320A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)
  • Controls And Circuits For Display Device (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

(57)【要約】 【目的】 バックグラウンドとスプライトの2種類の画
面を重ね合わせる方式により画面形成を行うコンピュー
タ画面形成方法において、効率的にスプライトを制御す
る。 【構成】 スプライトアトリビュートテーブルにスプラ
イトジェネレータに登録されたパターンを指定するフィ
ールド、スプライトの座標を指示するフィールド、上下
左右の反転を指定するフィールド、X方向およびY方向
へのスプライトの連結を指定するフィールドなどを設定
して、スプライトを制御する。
(57) [Summary] [Purpose] In a computer screen forming method for forming a screen by a method of overlapping two types of screens of a background and a sprite, the sprite is efficiently controlled. [Structure] A field for designating a pattern registered in the sprite generator in the sprite attribute table, a field for designating sprite coordinates, a field for designating up / down and left / right inversion, and a field for designating sprite connection in the X and Y directions. To control sprites.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、バックグラウンドとス
プライトの2種類の画面を重ね合わせる方式により画面
形成を行うコンピュータ画面形成方法に関する。詳細に
はスプライトの制御方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a computer screen forming method for forming a screen by a method of superposing two kinds of screens of background and sprite. Specifically, it relates to a sprite control method.

【0002】[0002]

【従来の技術】コンピュータ画面の形成方法としては、
一般にビットマップディスプレイ方式や、文字表示で良
く用いられる専用のテキストVRAMを用いる方法など
がある。これらの一般的な画面形成方法のほかに、ゲー
ムなどで良く用いられる方式として背景と主表示物を表
すバックグラウンドとスプライトの2種類の画面を重ね
合わせて画面形成を行う方法がある。
2. Description of the Related Art As a method for forming a computer screen,
Generally, there are a bitmap display method and a method of using a dedicated text VRAM which is often used for displaying characters. In addition to these general screen forming methods, as a method often used in games, there is a method of forming a screen by superimposing two kinds of screens of a background, a background representing a main display object, and a sprite.

【0003】一般に写真を写したり、ビデオを撮ったり
するとき、写そうとする対象とその背景を考えると、1
つの絵の中に背景と主表示物の2種の対象物が混じり合
っている。写真やビデオなら自然にこの2つが融け込ん
で表現できる。
Generally, when taking a picture or taking a video, considering the object to be photographed and its background, 1
Two objects of the background and the main display are mixed in one picture. Photographs and videos can naturally be expressed by blending the two.

【0004】しかしゲームなどのグラフィックをコンピ
ュータで表現するときは、すべての表示物をプログラム
で管理しなければならない。このため、管理がしやす
く、プログラミングも楽に行える設計を考える必要があ
る。そこで、このようなバックグラウンドとスプライト
の2種類の画面をもちいて、画面を背景と主表示物に分
けて管理するものである。以下、例に基づいて説明す
る。
However, when displaying graphics such as games on a computer, all display objects must be managed by a program. Therefore, it is necessary to consider a design that is easy to manage and easy to program. Therefore, such two types of screens of background and sprite are used to manage the screen separately for the background and the main display object. Hereinafter, description will be given based on an example.

【0005】バックグラウンド画面は「キャラクタ」と
呼ばれるパターンを単位として全体の画面が構成されて
いる。ここでは、キャラクタが8×8ドットを1単位と
する場合を例にとって説明する。
The entire background screen is composed of patterns called "characters". Here, a case where the character is 8 × 8 dots as one unit will be described as an example.

【0006】図1は表示画面を構成する各レジスタの設
定値を示す図である。各水平方向の設定値はキャラクタ
数を単位とし、垂直方向はラスタ数を単位としている。
図2に示すように画面全体が32×32個のキャラクタ
で構成される場合を考える。枠内の数字は16進で表し
たアドレスを示す。
FIG. 1 is a diagram showing set values of each register constituting the display screen. The setting value in each horizontal direction is in units of the number of characters, and the vertical direction is in units of the number of rasters.
Consider a case where the entire screen is composed of 32 × 32 characters as shown in FIG. The numbers in the boxes indicate addresses in hexadecimal.

【0007】バックグラウンドアトリビュートテーブル
は、仮想スクリーン上の各キャラクタ位置にどのような
キャラクタをどのような色で表示するかを指定するため
に、VRAM中に設定するテーブルである。図3はバッ
クグラウンドアトリビュートテーブルのVRAM中での
位置とその内容を示す図である。
The background attribute table is a table set in the VRAM in order to specify what character and what color is displayed at each character position on the virtual screen. FIG. 3 is a diagram showing the position of the background attribute table in the VRAM and its contents.

【0008】各々のアドレス毎にキャラクタのパターン
を表すキャラクタコードと色を表すCGカラーコードが
指定される。図4に示すように、この例ではCGカラー
コードは4ビット、キャラクタコードは12ビットのデ
ータで指定されている。
A character code representing a character pattern and a CG color code representing a color are designated for each address. As shown in FIG. 4, in this example, the CG color code is designated by 4 bits and the character code is designated by 12 bits of data.

【0009】キャラクタコードは、VRAM内のキャラ
クタジェネレータ(CG)で定義されているキャラクタ
番号が指定され、この番号に対応して、CGには実際の
キャラクタのパターンが登録されている。
As the character code, a character number defined by a character generator (CG) in the VRAM is designated, and an actual character pattern is registered in the CG in correspondence with this number.

【0010】キャラクタジェネレータ(CG)ではキャ
ラクタパターンは図5のように定義されている。画面中
で8×8ドットで構成されるキャラクタは、各ドットを
4bitのカラーコードを定義する必要から、キャラク
タジェネレータ中では8×8ドットの面を4面使用す
る。各面はCH0,CH1,CH2,CH3とよばれ、
合計16ワードの情報で一つのパターンを定義してい
る。
In the character generator (CG), the character pattern is defined as shown in FIG. Since a character composed of 8 × 8 dots on the screen needs to define a 4-bit color code for each dot, four 8 × 8 dot surfaces are used in the character generator. Each surface is called CH0, CH1, CH2, CH3,
One pattern is defined by a total of 16 words of information.

【0011】バックグラウンドの表示制御は水平表示期
間に行われる。1キャラクタを表示するためのデータの
流れを図6〜10に説明する。図6に示すように、ま
ず、ラスタの位置からアドレスを生成してバックグラウ
ンドアトリビュートテーブルを読み、キャラクタコード
とCG COLORを得る。
The background display control is performed during the horizontal display period. The data flow for displaying one character will be described with reference to FIGS. As shown in FIG. 6, first, an address is generated from the raster position, the background attribute table is read, and the character code and CG COLOR are obtained.

【0012】つぎに図7および図8に示すように、その
キャラクタコードからキャラクタジェネレータのアドレ
スを生成し、パターンを読み、ビデオディスプレイコン
トローラ内のシフトレジスタに取り込む。この場合、キ
ャラクタジェネレータのアクセスは、16色表示では2
ワード(CH0、CH1およびCH2,CH3)、4色
表示では1ワード(CH0、CH1またはCH2、CH
3)を読み込む。
Next, as shown in FIGS. 7 and 8, the address of the character generator is generated from the character code, the pattern is read, and the result is loaded into the shift register in the video display controller. In this case, the character generator access is 2 for 16-color display.
Word (CH0, CH1 and CH2, CH3) 1 word in 4 color display (CH0, CH1 or CH2, CH
3) Read in.

【0013】そして図9に示すように、CG COLO
Rと取り込まれたパターンデータをともにシフトレジス
タから出力する。このときのビデオ出力は図10(a)
に示すようになる。VD7〜VD4はCG COLOR
が、VD3〜VD0にはCH3〜CH0の各ビットがで
る。VD8(SPBG)は0が出力される。
Then, as shown in FIG. 9, CG COLO
Both R and the captured pattern data are output from the shift register. The video output at this time is shown in FIG.
As shown in. VD7 to VD4 are CG COLOR
However, each bit of CH3 to CH0 appears in VD3 to VD0. 0 is output to VD8 (SPBG).

【0014】帰線期間中の表示出力は図10(b)に示
すように、VD8(SPBG)=1、VD7〜VD0=
0となる。
The display output during the blanking period is VD8 (SPBG) = 1, VD7 to VD0 =, as shown in FIG. 10 (b).
It becomes 0.

【0015】また、バックグラウンド画面はビデオコン
トローラにより水平、垂直方向にスムーズスクロールさ
せることができる。垂直スクロールは、図1に示すBG
Yスクロールレジスタを制御することによりラスタ単位
で行え、水平スクロールは、BGXスクロールレジスタ
を制御することにより、ドット単位で行うことができ
る。
The background screen can be smoothly scrolled horizontally and vertically by the video controller. The vertical scroll is the BG shown in FIG.
By controlling the Y scroll register, it can be performed in a raster unit, and horizontal scrolling can be performed in a dot unit by controlling the BGX scroll register.

【0016】背景をこのようなキャラクタによって描く
ことにして、主表示物は背景とは別の画として管理する
ことができる。背景は主表示物の動きによって自動的に
変化する周りの状況を表す表示対象であり、主表示物は
ユーザー(ゲームプレイヤ)の操作ないしは自動的に変
化する主対象(登場人物などのゲームの中心となる表示
物)である。
By drawing the background with such a character, the main display object can be managed as an image different from the background. The background is a display target that represents a surrounding situation that automatically changes according to the movement of the main display object. It is a display object).

【0017】主表示物はあらかじめ決められた数のドッ
トを単位としたパターンから構成され、これを「スプラ
イト」と呼ぶ。
The main display object is composed of a pattern in which a predetermined number of dots are used as a unit, and this is called a "sprite".

【0018】[0018]

【発明が解決しようとする課題】上記のようなバックグ
ラウンドとスプライトの2種の画面で構成する方法にお
いては、スプライト表示方法は個人に任されていた。こ
のため、スプライトを表示するプログラムの内容は一定
せず、複数の人間がひとつのアプリケーションを開発す
るときは、そのつどインターフェイスを取り決める必要
があった。このため、開発に時間が掛り、またプログラ
ムに統一性ががないために、ソフトの維持管理が難しか
った。
In the method of constructing the two types of screens of the background and the sprite as described above, the sprite display method is left to the individual. For this reason, the content of the program that displays the sprite is not constant, and when multiple people develop one application, it is necessary to negotiate the interface each time. For this reason, it took a long time to develop, and because the programs were not uniform, it was difficult to maintain and manage the software.

【0019】開発、管理面だけでなく、表示方法やメモ
リ管理面においても多くの問題を抱えていた。たとえ
ば、X方向右向きに走る自動車を、逆方向に走らせると
きには、逆向きの自動車のパターンも用意しなければな
らなかった。また、スプライトの基本単位を超える大き
な表示物を描く場合には、各プログラマの責任において
パターン管理をしなければならなかった。これは非常に
厄介な作業であり、プログラミングを一層複雑なものに
していた。
There were many problems not only in terms of development and management, but also in terms of display method and memory management. For example, when a vehicle running to the right in the X direction is run in the opposite direction, it is necessary to prepare a pattern of the vehicle in the reverse direction. Also, when drawing a large display object that exceeds the basic unit of sprites, it was the responsibility of each programmer to manage the pattern. This was a very tedious task, making programming more complicated.

【0020】本発明は、スプライト表示方法の統一と、
プログラミングを容易にするためのテーブル管理・利用
方法の開発を主眼に置き、さらに資源の有効活用を図る
ために、メモリの効果的な使い方にも考慮することをも
目的とする。
The present invention provides a unified sprite display method,
The aim is to develop a table management and usage method to facilitate programming, and to consider effective use of memory in order to make effective use of resources.

【0021】[0021]

【課題を解決するための手段】本発明は、スプライトを
管理するテーブルを導入し、このテーブルをもとにスプ
ライトを管理し、効率のよい表示方法と管理の仕方を図
っていく方法である。スプライトの表示ルールを定め、
それを実現するためにRAM上にスプライトアトリビュ
ートテーブルとスプライトジェネレータを設定する。
The present invention is a method of introducing a table for managing sprites, managing sprites based on this table, and achieving an efficient display method and management method. Define the display rules for sprites,
In order to realize that, a sprite attribute table and a sprite generator are set on the RAM.

【0022】本発明のスプライトアトリビュートテーブ
ルにはスプライトジェネレータに登録されたパターンを
指定するフィールド、スプライトの座標を指示するフィ
ールド、上下左右の反転を指定するフィールド、X方向
およびY方向へのスプライトの連結を指定するフィール
ドを含んでいる。
In the sprite attribute table of the present invention, a field for designating a pattern registered in the sprite generator, a field for designating the coordinates of the sprite, a field for designating up / down / left / right inversion, and a concatenation of sprites in the X and Y directions. Contains a field that specifies

【0023】本発明のスプライトの管理方法について、
一つの例に基づいて以下に説明する。図11は、実画面
系の(32、64)をスプライト座標系の(0,0)に
割り当てた例である。この図に示すようにそれぞれの座
標位置は、0から1,023の値が取れる。
Regarding the sprite management method of the present invention,
The following description is based on one example. FIG. 11 is an example in which (32, 64) of the real screen system is assigned to (0, 0) of the sprite coordinate system. As shown in this figure, each coordinate position can take a value from 0 to 1,023.

【0024】もちろんこの値はハードウェアやシステム
によってもの違ってこようが、仮想スクリーン(スプラ
イト画面)上での座標位置であるから、実際のスクリー
ン座標を意識することなくスプライト位置が指定できる
という利点がある。実画面と仮想スクリーンとの関連づ
けは表示前に1回だけ行っておけばよく、あとはシステ
ムが自動的に実画面との対応を取り、表示を行う。この
例ではスプライトはサイズを16×16ドットを単位と
し、主表示物をこの整数倍の大きさのパターンで表現す
る。
Of course, this value may vary depending on the hardware and system, but since it is the coordinate position on the virtual screen (sprite screen), the advantage is that the sprite position can be specified without being aware of the actual screen coordinates. is there. The real screen and the virtual screen need only be associated with each other once before the display, and after that, the system automatically takes the correspondence with the real screen and performs the display. In this example, the sprite has a size of 16 × 16 dots as a unit, and the main display object is represented by a pattern having a size that is an integral multiple thereof.

【0025】各スプライトは座標を変更することによっ
て表示画面内を自由に移動することができ、パターンの
再定義を一切必要としない。また、スプライトに優先順
位を設定し、2つ以上のスププライトが重なっている場
合、優先順位の低い順に消していくことができる。
Each sprite can freely move within the display screen by changing the coordinates, and does not require any redefinition of the pattern. In addition, if the sprites have priorities set and two or more sprites overlap, the sprites can be erased in ascending order.

【0026】このようなルールに従うスプライトを管理
するためにスプライトアトリビュートテーブル(SA
T)を導入する。スプライトアトリビュートテーブルは
前述のバックグラウンドアトリビュートテーブルと同様
にVRAM上に定義されるテーブルであり、図12に示
すような構成になっている。
In order to manage sprites that follow such rules, the sprite attribute table (SA
T) is introduced. The sprite attribute table is a table defined in VRAM similarly to the background attribute table described above, and has a structure as shown in FIG.

【0027】スプライトアトリビュートテーブルの各構
成要素の意味は以下のとおりである。図13に示すよう
に、スプライトアトリビュートテーブル中にはX座標、
Y座標、パターン番号、SPLITE COLOR、Y
バー、CGY、Xバー、CGX、SPBGなどのフィー
ルドがある。
The meaning of each component of the sprite attribute table is as follows. As shown in FIG. 13, in the sprite attribute table, the X coordinate,
Y coordinate, pattern number, SPLITE COLOR, Y
There are fields such as bar, CGY, X bar, CGX, SPBG.

【0028】図14に示すように、スプライトアトリビ
ュートテーブルはこの例ではSP#0からSP#63ま
での64個が定義できる。
As shown in FIG. 14, in this example, 64 sprite attribute tables SP # 0 to SP # 63 can be defined.

【0029】X座標およびY座標はスプライトを表示す
る垂直位置と水平位置を指定するフィールドである。
X、Y座標を変えるだけで、スプライトのパターンを再
定義することなく、画面の好きな位置にスプライトの移
動が行える。
The X coordinate and the Y coordinate are fields for specifying the vertical position and horizontal position for displaying the sprite.
By changing the X and Y coordinates, the sprite can be moved to any position on the screen without redefining the sprite pattern.

【0030】パターン番号は、スプライトのパターンを
指定する番号で、図15に示すように11ビットから成
り、上位10ビットにパターンが格納されているVRA
Mのアドレスを指定する。パターンが格納されているこ
の領域をスプライトジェネレータ(SG)と呼ぶ。図1
6はスプライトジェネレータへスプライトパターンが格
納されていることを示す説明図である。
The pattern number is a number for designating a sprite pattern, and is composed of 11 bits as shown in FIG. 15, and the VRA in which the pattern is stored in the upper 10 bits.
Specify the address of M. This area where patterns are stored is called a sprite generator (SG). Figure 1
6 is an explanatory diagram showing that the sprite pattern is stored in the sprite generator.

【0031】パターン番号フィールドの最下位ビット
は、スプライトのドット幅を2ドット4色としたとき、
(SG0,SG1)または(SG2,SG3)のどちら
を選択するかを指定するのに用いる。
The least significant bit of the pattern number field is when the dot width of the sprite is 2 dots and 4 colors,
Used to specify which of (SG0, SG1) or (SG2, SG3) is selected.

【0032】256色中16色選択表示の場合は、スプ
ライトジェネレータに定義するパターンは色情報を含む
ために、図16に示すようにSG0、SG1、SG2、
SG3の4面からなる。4色表示では2つの色情報でよ
いから(SG0,SG1)か(SG2,SG3)のいず
れかの選択になる。実際の表示ではこの重ね合わせでス
プライトが表示される。このようにパターン番号によ
り、スプライトアトリビュートテーブルとスプライトジ
ェネレータの関連が付けられる。
In the case of 16-color selection display out of 256 colors, since the pattern defined in the sprite generator includes color information, as shown in FIG. 16, SG0, SG1, SG2,
It consists of four sides of SG3. In the case of four-color display, since two color information is sufficient, either (SG0, SG1) or (SG2, SG3) is selected. In the actual display, sprites are displayed with this superposition. In this way, the sprite attribute table and the sprite generator are associated with each other by the pattern number.

【0033】スプライトアトリビュートテーブルのパタ
ーン番号はスプライトジェネレータのアドレスになって
いる。といっても、アドレスは1ワード(=16ビッ
ト)であるから、パターン番号の上位10ビットがアド
レスの上位10ビットに対応しているのである。
The pattern number in the sprite attribute table is the address of the sprite generator. However, since the address is one word (= 16 bits), the upper 10 bits of the pattern number correspond to the upper 10 bits of the address.

【0034】上位10ビットで対応できるのは、SG0
のアドレスの下位6ビットが(000000)2になる
位置に設置されるように設計しているからである。な
お、()2は2進数を表すとする。実際のスプライトジ
ェネレータには図16に示すようにデータが記録されて
いる。
SG0 can be handled by the upper 10 bits.
This is because it is designed so that the lower 6 bits of the address of are set at the position where (000000) 2 . Note that () 2 represents a binary number. Data is recorded in the actual sprite generator as shown in FIG.

【0035】1個のスプライトは16×16ドットの面
が4面で構成されているから、各面SG0、SG1、S
G2、SG3のアドレスの下位8ビットは(0000
0000)2、(0100 0000)2、(1000
0000)2、(11000000)2になる。
Since one sprite has four 16 × 16 dot surfaces, each surface SG0, SG1, S
The lower 8 bits of the addresses of G2 and SG3 are (0000
0000) 2 , (0100 0000) 2 , (1000
0000) 2 and (11000000) 2 .

【0036】パターン番号が(XX XXXX XXX
X)2と指定されていれば、このパターン番号がポイン
トするSG0のアドレスは(XXXX XXXX XX
000000)2であり、残りの3面も自動的に計算で
きる。10ビットのパターン番号指定は取り扱いが楽で
あり、メモリの有効利用にもなる。
If the pattern number is (XX XXXXX XXX
X) 2 is specified, the address of SG0 pointed to by this pattern number is (XXXX XXXXX XX
000000) 2 and the remaining 3 faces can be calculated automatically. Designation of a 10-bit pattern number is easy to handle and also makes effective use of memory.

【0037】SPRITE COLORはスプライトの
エリアカラーコードを4ビットで指定するフィールドで
ある。
SPRATE COLOR is a field for designating an area color code of sprite by 4 bits.

【0038】SPBGはバックグラウンド表示とスプラ
イト表示の優先度を指定するビットで、「0」でバック
グラウンド表示、「1」でスプライト表示を行う。
SPBG is a bit that designates the priority of background display and sprite display. "0" performs background display and "1" performs sprite display.

【0039】XバーおよびYバーはスプライトのパター
ンを反転させる指示を行う。Xバーに「1」を設定する
とスプライトを左右に反転させて表示し、Yバーに
「1」を設定するとスプライトを上下に反転表示させ
る。これによって定義するパターンを少なくすることが
できる。
The X bar and the Y bar give instructions to invert the sprite pattern. When the X bar is set to "1", the sprite is displayed by flipping it left and right, and when the Y bar is set to "1", the sprite is displayed upside down. This can reduce the number of patterns to be defined.

【0040】図17は、XバーとYバーを利用したスプ
ライトの表示例である。(1)はスプライトジェネレー
タに登録してあるパターンで、Xバー=0、Yバー=0
と指定したときに表示されるスプライトである。
FIG. 17 is a display example of a sprite using the X bar and the Y bar. (1) is a pattern registered in the sprite generator, where X bar = 0 and Y bar = 0
Is a sprite that is displayed when is specified.

【0041】(2)はXバー=1、Yバー=0としたと
きに表示されるスプライトで、左右が反転する。(3)
は、Xバー=0、Yバー=1と指定したときで、上下が
反転する。(4)はXバー=1、Yバー=1と指定した
ときで、左右上下が反転した表示となる。
(2) is a sprite displayed when X bar = 1 and Y bar = 0, and the left and right are inverted. (3)
Indicates that when X bar = 0 and Y bar = 1 are designated, the top and bottom are inverted. In (4), when X bar = 1 and Y bar = 1 are designated, the display is reversed horizontally and vertically.

【0042】このような反転指定項目をスプライトアト
リビュートテーブルに設けることによって、スプライト
ジェネレータに登録するパターンは1つで、4つのパタ
ーンが表現できる。したがって、面倒なパターン登録が
少なく、またメモリの節約にもなっている。
By providing such inversion designation items in the sprite attribute table, one pattern can be registered in the sprite generator and four patterns can be expressed. Therefore, there is little troublesome pattern registration and the memory is saved.

【0043】CGXは水平方向(X方向)の、CGYは
垂直方向(Y方向)の、それぞれつなぎ合わせを指定す
るフィールドである。この例ではCGXは1ビットであ
るから、「0」か「1」のいずれである。
CGX is a field for specifying joining in the horizontal direction (X direction), and CGG is a field for specifying joining in the vertical direction (Y direction). In this example, CGX has 1 bit, and therefore is either "0" or "1".

【0044】図18は、CGX=1としたときのスプラ
イトのスプライトアトリビュートテーブルの例である。
図19のように、スプライトジェネレータのアドレス
(0000 1000 1000 0000)2から6
4ワードには自動車の前半分が、アドレス(0000
1000 1100 0000)2から64ワードには
後ろ半分が登録されている。
FIG. 18 is an example of a sprite attribute table for sprites when CGX = 1.
As shown in FIG. 19, addresses of sprite generators (0000 1000 1000 1000 0000) 2 to 6
In the 4th word, the first half of the car is the address (0000
1000 1100 0000) The second half is registered in 2 to 64 words.

【0045】スプライトアトリビュートテーブルのパタ
ーン番号のアドレスに関する情報は上位10ビットであ
るから、上位10ビットを(00 0010 001
1)2とすると、スプライトジェネレータのアドレス
(0000 1000 11000000)2をポイン
トすることになる。
Since the information on the address of the pattern number in the sprite attribute table is the upper 10 bits, the upper 10 bits are (00 0010 001
1) 2 means that the address (0000 1000 11,000,000) 2 of the sprite generator is pointed to.

【0046】すなわち、自動車の後ろ半分のパターン部
分がポイントされていることになる。CGY=0、CG
X=0としてした場合には、画面にはスプライト1単位
しか表示されないから、自動車の後ろ半分だけが表示さ
れる。
That is, the pattern portion in the rear half of the automobile is pointed. CGY = 0, CG
When X = 0, only one unit of the sprite is displayed on the screen, so only the rear half of the car is displayed.

【0047】CGXに「1」を設定すると、表示指定さ
れたスプライトのパターン番号のビット1(PC1)を
「0」としたスプライトが左側に、PC1を「1」とし
たスプライトを右側に、2個を水平につないで表示す
る。すなわち、Xバー、Yバーの値に応じて自動車の前
半分を左に、後ろ半分を右につなぎ合わせて図20のよ
うに表示される。
When CGX is set to "1", the sprite with bit 1 (PC1) of the pattern number of the sprite designated for display as "0" is on the left side, and the sprite with PC1 as "1" is on the right side. Display by connecting the pieces horizontally. That is, according to the values of the X bar and the Y bar, the front half of the automobile is connected to the left and the rear half is connected to the right, and displayed as shown in FIG.

【0048】従来の方法では、SATのパターン番号の
上位10ビットを(0000 1000 10)2を左
に、(0000 1000 11)2を右にと、2つの
SATを使ってプログラマが用意しなければならなかっ
た。しかも2つがうまくつながるようにするためには、
X座標を正しく計算しておく必要があった。
In the conventional method, the upper 10 bits of the pattern number of the SAT must be prepared by the programmer using two SATs, with (0000 1000 10) 2 on the left and (0000 1000 11) 2 on the right. did not become. And to make sure the two connect well,
It was necessary to calculate the X coordinate correctly.

【0049】この煩雑さをCGXとXバーの指定を導入
することにより、2つにまたがるスプライトをあたかも
1つのスプライトのように扱え、プログラムの煩雑さが
解消される。この結果、プログラマへの負担が減り、プ
ログラム開発期間の短縮が図れる。
By introducing the designation of CGX and X bar to this complexity, a sprite that extends over two can be handled as if it were one sprite, and the complexity of the program is eliminated. As a result, the burden on the programmer is reduced and the program development period can be shortened.

【0050】つぎに、フィールドCGYについて説明す
る。CGYは2ビットであるから4つの組合せが可能で
ある。ただし、1つは未使用である。図21はCGYの
4つの組み合わせを説明する図である。表示指定された
パターン番号のビット3(PC3)とビット2(PC
2)の組合せによって、(0,0)、(0,1)、
(1,0)、(1,1)としたスプライトを2個ないし
4個を垂直方向につないで表示する。すなわち、ノーマ
ル指定の場合はスプライトを単独表示し、2CGY指定
のときは2個をつなぎ、4CGYのときは4個をつなぎ
合わせて表示する。
Next, the field CGY will be described. Since CGY has 2 bits, four combinations are possible. However, one is unused. FIG. 21 is a diagram illustrating four combinations of CGY. Bit number 3 (PC3) and bit 2 (PC
By the combination of 2), (0,0), (0,1),
Two or four sprites (1,0) and (1,1) are vertically connected and displayed. That is, sprites are individually displayed when normal is designated, and two are spliced when 2CGY is designated and four are spliced when 4CGY is displayed.

【0051】図22は、CGYに「11」を指定した2
CGYのときのスプライトアトリビュートテーブルの例
である。図23に示すように、スプライトジェネレータ
のアドレス(0000 1100 0000 000
0)2から64ワードには鉛筆の先端部が、アドレス
(0000 1100 1000 0000)2には鉛
筆の軸上部が、アドレス(0000 1101 000
0 0000)2には鉛筆の軸下部が、アドレス(00
00 1101 1000 0000)2には鉛筆の後
端部がそれぞれ登録されている。
In FIG. 22, 2 in which "11" is designated for CGY
It is an example of a sprite attribute table in the case of CGY. As shown in FIG. 23, the address of the sprite generator (0000 1100 0000 000)
0) 2 to 64 words is the tip of the pencil, address (0000 1100 1000 0000) 2 is the top of the pencil axis, address (0000 1101 000)
0 0000) axial bottom of the pencil to 2, address (00
00 1101 1000 0000) 2 is registered with the rear end of the pencil.

【0052】したがって、図22のようなスプライトア
トリビュートテーブルの設定がなされた場合は、Xバ
ー、Yバーの値に応じて図24のように4つのパターン
がつながって表示される。
Therefore, when the sprite attribute table is set as shown in FIG. 22, four patterns are connected and displayed as shown in FIG. 24 according to the values of the X bar and the Y bar.

【0053】このように、CGXとCGYとの組み合せ
で、スプライトのつなぎ合わせ表示が行え、これによっ
て、複数のスプライトをつなぎ合わせて表示するプログ
ラム記述が効率よく、かつ容易になる。
As described above, sprites can be displayed in combination by combining CGX and CGY. This makes it possible to efficiently and easily write a program for connecting and displaying a plurality of sprites.

【0054】また、CGX、CGY、Xバー、Yバーは
組合せて使えるから、水平(X)方向に2スプライト、
垂直(Y)方向に4スプライトまでの組合せが、正方
向、逆方向に自由に表現できる。
Since CGX, CGY, X bar, and Y bar can be used in combination, 2 sprites in the horizontal (X) direction,
Combinations of up to 4 sprites in the vertical (Y) direction can be freely expressed in the forward and reverse directions.

【0055】以上は、本発明の一例である。したがっ
て、水平方向では2つのスプライトを、垂直方向では4
つのスプライトがそれぞれ同時につなぎ合わせることが
できた。もし必要ならこれ以上のスプライトのつなぎ合
わせも可能である。その場合には、上記の考え方をその
まま応用することができる。
The above is an example of the present invention. So two sprites horizontally and four vertically
The two sprites could be joined together at the same time. If needed, more sprites can be joined together. In that case, the above idea can be applied as it is.

【0056】すなわち、スプライトアトリビュートテー
ブルのCGX、CGYのフィールドを増やし、つなぎ合
わせルーチンをシステムで用意してやらばよいからであ
る。
That is, it is only necessary to increase the fields of CGX and CGY in the sprite attribute table and prepare a joining routine in the system.

【0057】[0057]

【発明の効果】本発明は、スプライトアトリビュートテ
ーブルとCGによるスプライト管理に主眼を置いてい
る。とくに複数のスプライトをつなぎ合わせるCGX、
CGYの導入と、スプライトの向きを反転表示させるX
バー、Yバーの導入とによって、登録するパターンの数
を減らすことができ、またとかく複雑になりがちな画像
表示のプログラムを分かりやすいものにすることができ
る。
The present invention focuses on sprite management by the sprite attribute table and CG. Especially, CGX that connects multiple sprites,
Introduction of CGY and reverse display of sprite direction X
By introducing the bar and the Y bar, the number of patterns to be registered can be reduced, and the image display program that tends to be complicated can be made easy to understand.

【0058】そこから発生する効果として、プログラム
内容の統一化、開発時間の短縮化、メモリの有効利用等
が期待できるなどの効果がある。
The resulting effects are that the program contents are unified, the development time is shortened, and the memory can be effectively used.

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

【図1】表示画面の定義の説明図である。FIG. 1 is an explanatory diagram of a definition of a display screen.

【図2】仮想スクリーンのキャラクタのバックグラウン
ドアトリビュート中のアドレスの説明図である。
FIG. 2 is an explanatory diagram of addresses in background attributes of characters on a virtual screen.

【図3】VRAM中のバックグラウンドアトリビュート
(BAT)の位置と内容を示す説明図である。
FIG. 3 is an explanatory diagram showing the positions and contents of background attributes (BAT) in VRAM.

【図4】バックグラウンドアトリビュートテーブルの構
成を示す説明図である。
FIG. 4 is an explanatory diagram showing a configuration of a background attribute table.

【図5】VRAM中のキャラクタジェネレータ(CG)
の位置と内容を示す説明図である。
FIG. 5: Character generator (CG) in VRAM
It is explanatory drawing which shows the position and content.

【図6】バックグラウンド表示制御の説明図である。FIG. 6 is an explanatory diagram of background display control.

【図7】バックグラウンド表示制御の説明図である。FIG. 7 is an explanatory diagram of background display control.

【図8】バックグラウンド表示制御の説明図である。FIG. 8 is an explanatory diagram of background display control.

【図9】バックグラウンド表示制御の説明図である。FIG. 9 is an explanatory diagram of background display control.

【図10】バックグラウンドのビデオ出力の説明図であ
る。
FIG. 10 is an explanatory diagram of background video output.

【図11】実画面系の(32、64)をスプライト座標
系の(0,0)に割り当てた場合の説明図である。
FIG. 11 is an explanatory diagram when (32, 64) in the real screen system is assigned to (0, 0) in the sprite coordinate system.

【図12】VRAM上にスプライトアトリビュートテー
ブル(SAT)およびスプライトジェネレータ(SG)
を設けた状態を示す説明図である。
FIG. 12: Sprite attribute table (SAT) and sprite generator (SG) on VRAM
It is explanatory drawing which shows the state which provided.

【図13】スプライトアトリビュートテーブルの構成を
示す説明図である。
FIG. 13 is an explanatory diagram showing the structure of a sprite attribute table.

【図14】VRAM上のスプライトアトリビュートテー
ブルの詳細を示す説明図である。
FIG. 14 is an explanatory diagram showing details of a sprite attribute table on a VRAM.

【図15】スプライトアトリビュートテーブルのパター
ン番号フィールドの説明図である。
FIG. 15 is an explanatory diagram of a pattern number field of a sprite attribute table.

【図16】スプライトジェネレータの詳細を示す説明図
である。
FIG. 16 is an explanatory diagram showing details of a sprite generator.

【図17】スプライトの反転等を示す説明図である。FIG. 17 is an explanatory diagram showing sprite inversion and the like.

【図18】X方向へのスプライトの連結を行うスプライ
トアトリビュートテーブルを示す説明図である。
FIG. 18 is an explanatory diagram showing a sprite attribute table for connecting sprites in the X direction.

【図19】スプライトジェネレータのアドレスマップの
例の説明図である。
FIG. 19 is an explanatory diagram of an example of an address map of a sprite generator.

【図20】X方向へスプライトを連結した様子を示す説
明図である。
FIG. 20 is an explanatory diagram showing a state in which sprites are connected in the X direction.

【図21】フィールドCGYの機能の説明図である。FIG. 21 is an explanatory diagram of a function of a field CGY.

【図22】Y方向へのスプライトの連結を行うスプライ
トアトリビュートテーブルを示す説明図である。
FIG. 22 is an explanatory diagram showing a sprite attribute table for connecting sprites in the Y direction.

【図23】スプライトジェネレータのアドレスマップの
例の説明図である。
FIG. 23 is an explanatory diagram of an example of an address map of a sprite generator.

【図24】Y方向へスプライトを連結した様子を示す説
明図である。
FIG. 24 is an explanatory diagram showing a state in which sprites are connected in the Y direction.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】バックグラウンドとスプライトの2種類の
画面を重ね合わせることにより画面形成を行うコンピュ
ータ画面形成方法において、少なくとも、スプライトジ
ェネレータに登録されたパターンを指定する手段、スプ
ライトの上下左右の反転を指定する手段、X方向および
Y方向へのスプライトの連結を指定する手段を含むこと
を特徴とするスプライト制御方法。
1. A computer screen forming method for forming a screen by superimposing two kinds of screens of a background and a sprite, at least a means for designating a pattern registered in a sprite generator, and a vertical and horizontal inversion of the sprite. A sprite control method comprising: a means for designating and a means for designating connection of sprites in the X direction and the Y direction.
JP25886192A 1992-09-03 1992-09-03 Sprite control method Pending JPH0683320A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP25886192A JPH0683320A (en) 1992-09-03 1992-09-03 Sprite control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP25886192A JPH0683320A (en) 1992-09-03 1992-09-03 Sprite control method

Publications (1)

Publication Number Publication Date
JPH0683320A true JPH0683320A (en) 1994-03-25

Family

ID=17326059

Family Applications (1)

Application Number Title Priority Date Filing Date
JP25886192A Pending JPH0683320A (en) 1992-09-03 1992-09-03 Sprite control method

Country Status (1)

Country Link
JP (1) JPH0683320A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5940068A (en) * 1995-02-14 1999-08-17 Snk Corporation Display controlling apparatus and control method thereof

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5940068A (en) * 1995-02-14 1999-08-17 Snk Corporation Display controlling apparatus and control method thereof

Similar Documents

Publication Publication Date Title
US5459529A (en) Video processing for composite images
US5546518A (en) System and method for composing a display frame of multiple layered graphic sprites
DE69431685T2 (en) Method and device for generating a three-dimensional image signal and its two-dimensional display
US6369827B1 (en) Method and apparatus for displaying higher color resolution on a hand-held LCD device
EP0590961A2 (en) Image processing apparatus
CA1257719A (en) Graphics display system
EP0660298A1 (en) Image processing device and method therefor, and game machine having image processing part
JP2916322B2 (en) Pseudo multiple scroll method
JPH0916799A (en) Display screen creation device
JPH0767136B2 (en) Image processing device
JP3257925B2 (en) Translucent color image generation device
KR20000052433A (en) Method of creating two demensional shapes drawing system
JPH06223199A (en) Image composing device
JP3324580B2 (en) Image processing device
JP2898482B2 (en) Computer game equipment
JPS60258680A (en) Image processor
JP2914829B2 (en) Character formation method in computer games
JPS62222305A (en) Picture display system for numerical controller
JP2997601B2 (en) Pseudo multiple scroll method by color change
JPH07210142A (en) Method for displaying picture
JPS61103195A (en) Frame memory write control method
JPH0329966Y2 (en)
JPS6118549Y2 (en)
JPS61279985A (en) Graphic display method and apparatus
JPS59177588A (en) Animation display unit