JPH07282265A - Image control unit - Google Patents

Image control unit

Info

Publication number
JPH07282265A
JPH07282265A JP6092981A JP9298194A JPH07282265A JP H07282265 A JPH07282265 A JP H07282265A JP 6092981 A JP6092981 A JP 6092981A JP 9298194 A JP9298194 A JP 9298194A JP H07282265 A JPH07282265 A JP H07282265A
Authority
JP
Japan
Prior art keywords
image
chroma key
area
bat
game
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
JP6092981A
Other languages
Japanese (ja)
Inventor
Yoshito Yamaguchi
善登 山口
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.)
Casio Computer Co Ltd
Original Assignee
Casio Computer 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 Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP6092981A priority Critical patent/JPH07282265A/en
Publication of JPH07282265A publication Critical patent/JPH07282265A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)
  • Length Measuring Devices By Optical Means (AREA)
  • Processing Of Color Television Signals (AREA)

Abstract

PURPOSE:To prevent malfunction when a body other than an object of detection is present in a picked-up image by detecting the size of a chromakey area and sending an indication for stopping operation to a control means when the detected size exceeds a specific size. CONSTITUTION:A position detection processing part 40 generates process screen maps, frame by frame, on the basis of a chromakey detection signal CRO as to a bat image included in sampling image data DS supplied from the side of an image pickup part 1, finds the coordinate position of a collision between the bat image and an object image (ball image) and the left-end and right-end coordinates and upper-end and lower-end coordinates of the bat image in a process screen according to block attributes read out of the process screen maps, and calculates the area and gravity center position. Further, the processing part 40 judges whether or not a chromakey-detected area is large enough to induce malfunction of the game, and decides that the game possibly malfunctions when the area exceeds a specific value, thereby forcibly ending the game.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、撮像画像から抽出した
特定色画像に基づいて表示部に表示される画像の表示を
制御する画像制御装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an image control device for controlling display of an image displayed on a display unit based on a specific color image extracted from a picked-up image.

【0002】[0002]

【従来の技術】従来より、操作パッド等の操作に応じて
オブジェクト画像を動画制御したり、効果音を発生させ
たりする画像制御装置が各種実用化されている。なお、
ここで言うオブジェクト画像とは、ゲーム画面に表示さ
れる「キャラクタ」を指し、背景となるバックグラウン
ド画面上に移動表示されるものである。この種の装置
は、ビデオゲームあるいはTVゲームと呼ばれ、遊戯者
の反射神経を問うシューティングゲームや、仮想的な現
実感をシミュレートするゲーム等が知られている。
2. Description of the Related Art Conventionally, various image control devices have been put into practical use, which control a moving image of an object image or generate a sound effect in accordance with an operation of an operation pad or the like. In addition,
The object image mentioned here refers to a “character” displayed on the game screen, and is moved and displayed on the background screen as a background. This type of device is called a video game or a TV game, and a shooting game that asks a player's reflexes, a game that simulates a virtual reality, and the like are known.

【0003】このようなビデオゲームは、ゲーム操作に
対応したビデオ信号を発生する画像処理部と、この画像
処理部から供給されるビデオ信号を映像表示するディス
プレイとから構成される。画像処理部は、CPU、RO
MおよびRAM等から構成され、例えば、ROMパック
に記憶された画像情報および制御情報を順次読み出し、
画面背景となるバックグラウンド画像をディスプレイに
表示すると共に、ゲーム操作に応じて対応するキャラク
タ(オブジェクト画像)を画面背景上を動画表示し、そ
の動きに応じた効果音を発音するようにしている。
Such a video game is composed of an image processing section for generating a video signal corresponding to a game operation and a display for displaying the video signal supplied from the image processing section. The image processing unit is a CPU, RO
M and RAM etc., for example, sequentially read out the image information and control information stored in the ROM pack,
A background image serving as a screen background is displayed on the display, and a corresponding character (object image) is displayed as a moving image on the screen background in response to a game operation, and a sound effect corresponding to the movement is pronounced.

【0004】[0004]

【発明が解決しようとする課題】さて、上述した従来の
画像制御装置では、表示される画像(バックグラウンド
画像あるいはオブジェクト画像)の位置や形態を変化さ
せてゲームを進行させる際、その入力形態としては操作
パッド(外部スイッチ)を操作する態様が多い。この操
作パッド(外部スイッチ)による入力操作は、例えば、
ゲームの形態がスポーツゲーム等、遊戯者自身がゲーム
のプレーヤに成りきって、ボールを打つ、投げる等の動
作を疑似的に行わせるものは、実際に遊戯者が体を動か
す訳ではないから、今ひとつ現実味に欠けたものになっ
てしまう。
In the above-mentioned conventional image control device, when the game is advanced by changing the position or form of the displayed image (background image or object image), the input form is changed. There are many ways to operate the operation pad (external switch). The input operation by this operation pad (external switch) is, for example,
In the case of a game in which the player himself becomes a player of the game and simulates actions such as hitting and throwing a ball, the game does not actually move his body. It becomes something that is not realistic yet.

【0005】そこで、こうした背景の下で考えられるの
は、例えば、遊戯者にそのゲームで用いられる道具(バ
ット、ラケット等)を持たせ、その道具の動きを検出し
て表示画面内でのオブジェクト画像(ボール像あるいは
対戦者像)の動きを制御する方式である。道具の動きや
位置を検出する方法としては、クロマキー検出(特定色
画像検出)手法が挙げられるが、実際に採用するには問
題がある。すなわち、撮像手段によって撮像された画像
の中に、検出すべき道具と同一色の物体が存在した時、
この物体と道具との見分けがつかなくなる点にある。こ
うした物体が撮像画像中に存在する状態でゲームを実行
すると、必然的に誤動作の要因となり得る。
Under such a background, therefore, what can be considered, for example, is that the player has a tool (bat, racket, etc.) used in the game, the movement of the tool is detected, and the object on the display screen is detected. It is a method to control the movement of the image (ball image or opponent image). As a method for detecting the movement or position of the tool, there is a chroma key detection (specific color image detection) method, but there is a problem in practical use. That is, when an object of the same color as the tool to be detected exists in the image captured by the image capturing means,
The point is that the object and the tool are indistinguishable. If the game is executed with such an object present in the captured image, it may inevitably cause a malfunction.

【0006】そのため、このような弊害を回避する目的
で、その物体のある部分を不感帯としてクロマキー検出
されないようにする手法もあるが、検出すべき道具と同
一色の物体が数多く存在したり、そのサイズが大きくな
ると、不感帯自身が正常なゲーム動作を妨げる要因にも
成り得る。したがって、以上を換言すれば、従来の画像
制御装置では、検出対象以外の物体が撮像画像中に存在
した時の誤動作を防止し得ないという問題を備えてい
る。本発明は、上述した事情に鑑みてなされたもので、
検出対象以外の物体が撮像画像中に存在した時の誤動作
を防止する画像制御装置を提供することを目的としてい
る。
Therefore, for the purpose of avoiding such an adverse effect, there is a method of preventing a part of the object from being detected by the chroma key as a dead zone, but there are many objects of the same color as the tool to be detected or As the size increases, the dead zone itself may be a factor that hinders normal game operation. Therefore, in other words, the conventional image control device has a problem that it is impossible to prevent a malfunction when an object other than the detection target is present in the captured image. The present invention has been made in view of the above circumstances,
It is an object of the present invention to provide an image control device that prevents malfunctions when an object other than a detection target is present in a captured image.

【0007】[0007]

【課題を解決するための手段】上記目的を達成するた
め、請求項1に記載の発明では、撮像画像から特定色の
クロマキー領域を抽出すると共に、当該クロマキー領域
の大きさを検出する検出手段と、表示画面に表示される
コンピュータ画像の表示態様を、前記クロマキー領域に
よって形成されるクロマキー像の表示位置に応じて制御
する制御手段と、前記クロマキー領域が所定の大きさを
超える否かを判別し、所定の大きさを超えた場合に、前
記制御手段に動作停止を指示する指示手段とを具備する
ことを特徴としている。
In order to achieve the above object, in the invention described in claim 1, a chroma key area of a specific color is extracted from a captured image, and a detecting means for detecting the size of the chroma key area is provided. Controlling the display mode of the computer image displayed on the display screen according to the display position of the chroma key image formed by the chroma key area, and determining whether the chroma key area exceeds a predetermined size. , And an instruction means for instructing the control means to stop the operation when the predetermined size is exceeded.

【0008】また、請求項2に記載の発明によれば、前
記指示手段は、前記クロマキー領域が所定の大きさを超
える場合、検出対象以外の特定色の物体が前記撮像画像
中に存在すると見做すことを特徴としている。
According to the second aspect of the present invention, the pointing means determines that an object of a specific color other than the detection target is present in the captured image when the chroma key area exceeds a predetermined size. It is characterized by being different.

【0009】さらに、請求項3に記載の発明にあって
は、撮像画像から特定色のクロマキー領域を抽出するク
ロマキー抽出手段と、表示画面に表示されるコンピュー
タ画像の表示態様を、前記クロマキー領域によって形成
されるクロマキー像の表示位置に応じて制御する制御手
段と、前記クロマキー領域の面積が所定値を超えた場合
に誤動作の可能性有りとして前記制御手段の処理を強制
終了させる動作判定手段とを具備することを特徴として
いる。また、請求項4に記載の発明によれば、前記クロ
マキー抽出手段は、撮像フレーム毎に特定色のクロマキ
ー領域を抽出することを特徴としている。
Further, in the invention according to claim 3, the chroma key extraction means for extracting the chroma key area of the specific color from the picked-up image and the display mode of the computer image displayed on the display screen are controlled by the chroma key area. Control means for controlling according to the display position of the formed chromakey image, and operation determination means for forcibly ending the processing of the control means when there is a possibility of malfunction when the area of the chromakey region exceeds a predetermined value. It is characterized by having. Further, according to the invention described in claim 4, the chroma key extraction means extracts a chroma key area of a specific color for each imaging frame.

【0010】[0010]

【作用】本発明にあっては、検出手段が撮像画像から特
定色のクロマキー領域を抽出すると共に、当該クロマキ
ー領域の大きさを検出し、制御手段が表示画面に表示さ
れるコンピュータ画像の表示態様を、前記クロマキー領
域によって形成されるクロマキー像の表示位置に応じて
制御する。そして、指示手段は、前記クロマキー領域が
所定の大きさを超える否かを判別し、所定の大きさを超
えた場合に、前記制御手段に動作停止を指示する。この
結果、検出対象以外の物体が撮像画像中に存在した時の
誤動作を防止することが可能になる。
According to the present invention, the detection means extracts the chroma key area of the specific color from the picked-up image, detects the size of the chroma key area, and the control means displays the computer image on the display screen. Are controlled according to the display position of the chroma key image formed by the chroma key area. Then, the instruction means determines whether or not the chroma key area exceeds a predetermined size, and when the chroma key area exceeds the predetermined size, instructs the control means to stop the operation. As a result, it is possible to prevent malfunction when an object other than the detection target is present in the captured image.

【0011】[0011]

【実施例】以下、図面を参照して本発明の実施例につい
て説明する。 A.実施例の概要 図1は、本発明による画像制御装置の全体構成を示す外
観図であり、バッティングゲームに適用した一例を図示
するものである。この図において、1はCCD等の固体
撮像素子を備える撮像部であり、バッターボックス(図
示略)上で構える遊戯者Bを撮像する。ここで、遊戯者
Bは、例えば、クロマキー検出用として青色に着色され
たバットBATを用いてバッティング動作する。2は装
置本体であり、撮像部1から供給される撮像信号にクロ
マキー検出を施し、実画像におけるバットBATの位置
を判別する。実画像とは、撮像部1によって撮像される
画像を指す。また、装置本体2は、ゲームの背景シーン
となるバックグラウンド画像BGと、このバックグラウ
ンド画像BG上で移動表示されるオブジェクト画像OB
Jとを合成し、これをコンピュータグラフィック画像
(以下、CG画像と称す)としてディスプレイ3に表示
する。ディスプレイ3に表示されるCG画像は、例え
ば、背景シーン上での投手のスローイング動作像と、ス
ローイングに応じたボールの飛翔像とから構成される。
Embodiments of the present invention will be described below with reference to the drawings. A. Outline of Embodiments FIG. 1 is an external view showing an overall configuration of an image control apparatus according to the present invention, and illustrates an example applied to a batting game. In this figure, reference numeral 1 is an image pickup unit including a solid-state image pickup device such as a CCD, and picks up an image of a player B held on a batter box (not shown). Here, the player B performs a batting operation using, for example, a bat BAT colored in blue for chroma key detection. Reference numeral 2 denotes an apparatus main body, which performs chroma key detection on the image pickup signal supplied from the image pickup unit 1 to determine the position of the bat BAT in the actual image. The actual image refers to an image captured by the image capturing unit 1. Further, the device body 2 includes a background image BG which is a background scene of the game, and an object image OB which is moved and displayed on the background image BG.
J and J are combined, and this is displayed on the display 3 as a computer graphic image (hereinafter referred to as a CG image). The CG image displayed on the display 3 is composed of, for example, a throwing motion image of a pitcher on a background scene and a flying image of a ball corresponding to the throwing motion.

【0012】さらに、装置本体2は、図2(イ)に示す
ように、CG画像中から「ボール」の重心位置を求める
一方、同図(ロ)に示すように、実画像からクロマキー
検出された「バットBAT」像の重心位置を算出する。
そして、CG画像中の「ボール」と実画像中の「バット
BAT」とが衝突するか否かを所定タイミング毎に判定
し、衝突する際には、ミートするタイミング時点で両重
心位置の差に応じて打撃具合を求める。例えば、図2
(ハ)のように、衝突時点に両重心位置が一致すれば、
ジャストミートとして「ホームラン」とするように現実
に近いシミュレーションを行う。
Further, as shown in FIG. 2A, the apparatus main body 2 obtains the position of the center of gravity of the "ball" from the CG image, while chroma key detection is performed from the actual image as shown in FIG. The position of the center of gravity of the "bat BAT" image is calculated.
Then, it is determined at every predetermined timing whether the “ball” in the CG image and the “bat BAT” in the actual image collide with each other. Depending on the hit condition. For example, in FIG.
As shown in (c), if the positions of both centers of gravity match at the time of collision,
Perform a simulation close to reality as if it were a "home run" as just meat.

【0013】B.実施例の構成 次に、図3を参照して撮像部1および装置本体2の電気
的構成について説明する。 (1)撮像部1の構成 撮像部1は、構成要素10〜13から構成されている。
10は発振回路であり、8倍オーバーサンプリング信号
8fSCを発生して出力する。11は撮像信号処理部であ
り、8倍オーバーサンプリング信号8fSCを次段のクロ
ックドライバ12に供給すると共に、CCD13から出
力される撮像信号SSをサンプリング画像データDS
変換する。この撮像信号処理部11の構成については後
述する。クロックドライバ12は、発振回路10から供
給される8倍オーバーサンプリング信号8fSCに基づ
き、水平駆動信号、垂直駆動信号、水平/垂直同期信号
および帰線消去信号等の各種タイミング信号を発生する
一方、上記水平駆動信号および垂直駆動信号に対応する
撮像駆動信号を発生してCCD13に供給する。CCD
13は、この撮像駆動信号に従って対象物を撮像してな
る撮像信号SSを発生する。
B. Configuration of Embodiment Next, the electrical configuration of the imaging unit 1 and the apparatus main body 2 will be described with reference to FIG. (1) Configuration of Image Pickup Section 1 The image pickup section 1 is composed of the constituent elements 10 to 13.
An oscillating circuit 10 generates and outputs an 8 times oversampling signal 8f SC . An image pickup signal processing unit 11 supplies the 8 × oversampling signal 8f SC to the clock driver 12 in the next stage and converts the image pickup signal SS output from the CCD 13 into sampled image data D S. The configuration of the image pickup signal processing unit 11 will be described later. The clock driver 12 generates various timing signals such as a horizontal drive signal, a vertical drive signal, a horizontal / vertical sync signal, and a blanking signal based on the 8 times oversampling signal 8f SC supplied from the oscillator circuit 10. An image pickup drive signal corresponding to the horizontal drive signal and the vertical drive signal is generated and supplied to the CCD 13. CCD
13 generates an image pickup signal SS obtained by picking up an image of an object according to the image pickup drive signal.

【0014】撮像信号処理部11は、CCD13から供
給される撮像信号SSをコンディショニングした後、A
/D変換してサンプリング画像データDSを発生するも
のであり、その概略構成について図4を参照して説明す
る。図4において、11aはサンプリング回路であり、
上述したクロックドライバ12から供給される4倍オー
バーサンプリング信号4fSCに応じて撮像信号SSをサ
ンプルホールドして次段へ出力する。11bはサンプリ
ングされた撮像信号SSを所定レベルに変換して出力す
るAGC(自動利得制御)回路である。11cは、撮像
信号SSのガンマ特性をγ=1/2.2に補正して出力
するγ補正回路である。11dは、このガンマ補正され
た撮像信号SSを8ビット長のサンプリング画像データ
Sに変換して出力するA/D変換回路である。サンプ
リング画像データDSは、後述するビデオ信号処理部2
0に供給される。11eはビデオ信号処理部20から供
給されるコンポジット映像信号DCVをアナログビデオ信
号SVに変換して前述したディスプレイ3に供給するD
/A変換回路である。
The image pickup signal processing section 11 conditions the image pickup signal SS supplied from the CCD 13 and then A
The S / D conversion is performed to generate the sampled image data D S , and its schematic configuration will be described with reference to FIG. In FIG. 4, 11a is a sampling circuit,
The image pickup signal SS is sampled and held according to the 4 × oversampling signal 4f SC supplied from the clock driver 12 and output to the next stage. Reference numeral 11b is an AGC (automatic gain control) circuit for converting the sampled image pickup signal SS into a predetermined level and outputting it. Reference numeral 11c is a γ correction circuit which corrects the gamma characteristic of the image pickup signal SS to γ = 1 / 2.2 and outputs it. Reference numeral 11d denotes an A / D conversion circuit that converts the gamma-corrected image pickup signal SS into 8-bit length sampling image data D S and outputs the sampled image data D S. The sampling image data D S is the video signal processing unit 2 described later.
Supplied to zero. Reference numeral 11e denotes D which converts the composite video signal D CV supplied from the video signal processing unit 20 into an analog video signal S V and supplies the analog video signal S V to the display 3 described above.
A / A conversion circuit.

【0015】(2)装置本体2の構成 次に、図3〜図8を参照して装置本体2の構成について
説明する。装置本体2は、ビデオ信号処理部20、画像
処理部30、位置検出処理部40および制御部50から
構成されており、以下、これら各部について詳述する。 ビデオ信号処理部20の構成 ビデオ信号処理部20は、撮像部1から供給されるサン
プリング画像データD Sに対して色差変換処理とクロマ
キー検出処理とを施し、その結果を後述する位置検出処
理部40に供給する。また、この処理部20は、後述す
る画像処理部30から供給される画像処理データDSP
コンポジット映像信号DCVに変換し、前述したD/A変
換回路11e(図4参照)に供給する。なお、この画像
処理データDSPとは、バックグラウンド画像BGと、当
該バックグラウンド画像BG上に移動表示されるオブジ
ェクト画像OBJとを合成したCG画像を形成するデー
タである。
(2) Structure of the device body 2 Next, referring to FIGS. 3 to 8, the structure of the device body 2 will be described.
explain. The device main body 2 includes a video signal processing unit 20 and an image.
From the processing unit 30, the position detection processing unit 40, and the control unit 50
Each of these parts will be described in detail below. Configuration of Video Signal Processing Unit 20 The video signal processing unit 20 includes a video signal processing unit 20 that is supplied from the imaging unit 1.
Pulling image data D Color difference conversion processing and chroma for S
Key detection processing is performed and the result is the position detection processing described later.
It is supplied to the processing unit 40. The processing unit 20 will be described later.
Image processing data D supplied from the image processing unit 30SPTo
Composite video signal DCVConverted to D / A
It is supplied to the replacement circuit 11e (see FIG. 4). This image
Processing data DSPIs the background image BG and
Objects that are moved and displayed on the background image BG
Data to form a CG image that is a composite of the target image OBJ
It is

【0016】ここで、図5を参照して上記各処理を具現
するビデオ信号処理部20の構成について説明する。図
5において、20aは色分離フィルタであり、サンプリ
ング画像データDSを信号Ye(イエロー)、信号Cy
(シアン)および信号G(グリーン)に色分離して次段
へ出力する。20bは映像信号中における変化点の前後
に対して輝度変調を施して画質調整する輪郭補正回路で
ある。20cはホワイトバランス回路であり、各信号Y
e,Cy,Gを規定レベルに設定して出力する。20d
はバンドパスフィルタで構成される分別フィルタであ
り、各信号Ye,Cyを信号R(赤)および信号B
(青)に分別して出力する。20eは三原色を表わす信
号R,G,Bを各8ビット長の輝度信号Y、色差信号B
−Y,R−Yに変換するマトリクス回路である。
Here, the configuration of the video signal processing unit 20 that implements the above-described processing will be described with reference to FIG. In FIG. 5, reference numeral 20a denotes a color separation filter, which supplies the sampling image data D S to the signal Ye (yellow) and the signal Cy.
(Cyan) and signal G (green) are color-separated and output to the next stage. Reference numeral 20b is a contour correction circuit that adjusts the image quality by performing brightness modulation before and after the change point in the video signal. 20c is a white balance circuit for each signal Y
e, Cy, and G are set to specified levels and output. 20d
Is a separation filter composed of a bandpass filter, which converts each signal Ye and Cy into a signal R (red) and a signal B.
(Blue) is sorted and output. Reference numeral 20e designates signals R, G and B representing the three primary colors, a luminance signal Y and a color difference signal B each having a length of 8 bits.
This is a matrix circuit for converting into -Y and RY.

【0017】20fはクロマキー信号発生回路であり、
色差信号B−Y,R−Yが所定レベルに達した場合に
「H」レベルのクロマキー検出信号CROを発生する。
すなわち、この回路20fでは、図6に示すように、色
差B−Yの最大/最小レベルB−YMAX,B−YMINと、
色差R−Yの最大/最小レベルR−YMAX,R−YMIN
が予め定められており、これらレベルによって規定され
た色差領域Eに色差信号B−Y,R−Yが収る場合、特
定色を検出した旨を表わす「H」レベルのクロマキー検
出信号CROを出力する。なお、この実施例において
は、上記領域Eを「青色」としており、具体的には、遊
戯者Pが把持する青色に着色されたバットBAT像を検
出した時に「H」レベルのクロマキー検出信号CROを
生成する。
Reference numeral 20f is a chroma key signal generating circuit,
When the color difference signals BY and RY reach a predetermined level, the "H" level chroma key detection signal CRO is generated.
That is, in this circuit 20f, as shown in FIG. 6, the maximum / minimum levels BY- MAX and BY- MIN of the color difference BY are obtained.
The maximum / minimum levels RY MAX and R-Y MIN of the color difference R-Y are predetermined, and when the color difference signals B-Y and R-Y fall within the color difference area E defined by these levels, An "H" level chroma key detection signal CRO indicating that a specific color has been detected is output. In this embodiment, the area E is "blue". Specifically, when the bat BAT image colored blue by the player P is detected, the "H" level chroma key detection signal CRO is detected. To generate.

【0018】次に、再び図5を参照してビデオ信号処理
部20の構成について説明を続ける。20gは、VDP
31(後述する)から供給される画像処理データD
SP(RGB信号)を輝度信号Y、色差信号B−Y,R−
Yに変換するマトリクス回路である。20hはセレクタ
であり、位置検出処理部40から供給される選択信号S
Lに応じてマトリクス回路20eの出力、あるいはマト
リクス回路20hの出力のいずれか一方を選択して次段
へ供給する。20iはモジュレータである。モジュレー
タ20iは、セレクタ20hを介して供給される輝度信
号Y、色差信号B−Y,R−Yに各種同期信号(水平/
垂直同期信号および帰線消去信号)を重畳したディジタ
ルコンポジット映像信号DCVを生成する。
Next, the configuration of the video signal processing section 20 will be described again with reference to FIG. 20g is VDP
31. Image processing data D supplied from 31 (described later)
SP (RGB signal) is a luminance signal Y, color difference signals BY, R-
This is a matrix circuit for converting to Y. Reference numeral 20h is a selector, which is a selection signal S supplied from the position detection processing unit 40.
Depending on L, either the output of the matrix circuit 20e or the output of the matrix circuit 20h is selected and supplied to the next stage. 20i is a modulator. The modulator 20i supplies various synchronization signals (horizontal / horizontal / horizontal signal) to the luminance signal Y and the color difference signals BY and RY supplied via the selector 20h.
A digital composite video signal D CV on which a vertical sync signal and a blanking signal) are superimposed is generated.

【0019】上記構成によれば、ビデオ信号処理部20
は、撮像部1から供給されるサンプリング画像データD
Sに対して特定色のクロマキー検出を施し、その結果を
クロマキー検出信号CROとして位置検出処理部40
(後述する)側へ供給する。また、この処理部20は、
画像処理部30側から入力される画像処理データD
SP(RGB信号)、あるいは撮像部1から供給されるサ
ンプリング画像データDSのいずれかを選択信号SLに
応じて選択し、選択されたデータをコンポジット映像信
号DCVに変換して出力する。なお、選択信号SLは、後
述する位置検出処理部40から供給される信号である。
According to the above configuration, the video signal processing section 20
Is the sampling image data D supplied from the imaging unit 1.
Chroma key detection of a specific color is performed on S , and the result is used as a chroma key detection signal CRO for the position detection processing unit 40.
Supply to the side (described later). Further, the processing unit 20
Image processing data D input from the image processing unit 30 side
Either SP (RGB signal) or sampling image data D S supplied from the image pickup unit 1 is selected according to the selection signal SL, and the selected data is converted into a composite video signal D CV and output. The selection signal SL is a signal supplied from the position detection processing unit 40 described later.

【0020】画像処理部30の構成 次に、画像処理部30の構成について説明する。画像処
理部30は、ビデオデータプロセッサ(以下、VDPと
略す)31とVRAM32とから構成される。このVD
P31の基本的機能は、VRAM32に格納されるバッ
クグラウンド画像データDBGおよびオブジェクト画像デ
ータDOBを制御部50(後述する)側から供給される制
御信号SCに応じて読み出し、これを1走査ライン毎の
ドット表示色を表わす画像処理データDSPを発生するこ
とにある。以下、図7を参照して各部の構成について詳
述する。
Configuration of Image Processing Unit 30 Next, the configuration of the image processing unit 30 will be described. The image processing unit 30 includes a video data processor (hereinafter abbreviated as VDP) 31 and a VRAM 32. This VD
The basic function of P31 is to read the background image data D BG and the object image data D OB stored in the VRAM 32 according to a control signal SC supplied from the control unit 50 (described later) side, and to read this one scanning line. The purpose is to generate image processing data D SP representing each dot display color. Hereinafter, the configuration of each unit will be described in detail with reference to FIG. 7.

【0021】図7において、31aはCPUインタフェ
ース回路であり、制御部50を構成するCPU51のバ
スを介して供給される制御信号SCに応じて構成要素3
1b〜31dに各種制御指示を与える。制御信号SC
は、バックグラウンド画像BGおよびオブジェクト画像
OBJを表示制御する各種コマンドや、VRAM32に
DMA転送されるバックグラウンド画像データDBGおよ
びオブジェクト画像データDOBから形成される。31b
はVRAMコントロール回路であり、構成要素31a,
31cおよび31dから供給される制御信号に対応して
VRAM32とのデータ授受を行う。
In FIG. 7, reference numeral 31a is a CPU interface circuit, which is a constituent element 3 in accordance with a control signal SC supplied via the bus of the CPU 51 constituting the control section 50.
Various control instructions are given to 1b to 31d. Control signal SC
Are formed from various commands for controlling the display of the background image BG and the object image OBJ, and the background image data D BG and the object image data D OB which are DMA-transferred to the VRAM 32. 31b
Is a VRAM control circuit, and the components 31a,
Data is exchanged with the VRAM 32 in response to the control signals supplied from 31c and 31d.

【0022】すなわち、上記CPUインタフェース回路
31aからDMA転送する旨の制御信号SCを受けた場
合には、当該回路31aを介してDMA転送されるバッ
クグラウンド画像データDBG、あるいはオブジェクト画
像データDOBを所定の記憶エリアに格納する。また、バ
ックグラウンドコントロール回路31cからバックグラ
ウンド画像データDBGを読み出す旨の指示を受けた場
合、対応するデータDBGを読み出して回路31c側に返
送する。これと同様に、オブジェクトコントロール回路
31dからオブジェクト画像データDOBを読み出す旨の
指示を受けた場合、対応するデータDOBを読み出して回
路31d側に返送する。
That is, when the control signal SC indicating the DMA transfer is received from the CPU interface circuit 31a, the background image data D BG or the object image data D OB DMA-transferred via the circuit 31a is received. Store in a predetermined storage area. When an instruction to read the background image data D BG is received from the background control circuit 31c, the corresponding data D BG is read and returned to the circuit 31c side. Similarly, when an instruction to read the object image data D OB is received from the object control circuit 31d, the corresponding data D OB is read and returned to the circuit 31d side.

【0023】バックグラウンドコントロール回路31c
は、回路31aを介して制御部50側から与えられるバ
ックグラウンド表示制御コマンドに基づき、VRAMコ
ントロール回路31bを経由して読み出されたバックグ
ラウンド画像データDBGに対して表示位置を指定した
後、色差データ処理回路31eへ供給する。
Background control circuit 31c
Specifies the display position for the background image data D BG read via the VRAM control circuit 31b based on the background display control command given from the control unit 50 side via the circuit 31a, It is supplied to the color difference data processing circuit 31e.

【0024】オブジェクトコントロール回路31dは、
回路31aを介して制御部50側から与えられるオブジ
ェクトテーブルデータTOBをオブジェクトテーブルRA
M31fに書き込む。このオブジェクトテーブルデータ
OBとは、表示画面におけるオブジェクト画像データD
OBの表示位置を指定する座標データである。また、当該
回路31dは、オブジェクト表示制御コマンドに応じて
VRAM32から読み出されたオブジェクト画像データ
OBに対し、上記オブジェクトテーブルデータTOBを参
照して表示位置を求めると共に、1走査ライン分のオブ
ジェクト画像データDOBをラインバッファRAM31g
に一時記憶する。ラインバッファRAM31gに一時記
憶されるオブジェクト画像データDOBは、1走査毎に更
新される。このRAM31gから読み出されたオブジェ
クト画像データDOBは、色差データ処理回路31eに供
給される。
The object control circuit 31d is
The object table data T OB given from the control unit 50 side via the circuit 31a is stored in the object table RA.
Write to M31f. The object table data T OB is the object image data D on the display screen.
This is coordinate data that specifies the display position of the OB . Further, the circuit 31d refers to the object table data T OB for the object image data D OB read from the VRAM 32 in response to the object display control command, obtains the display position, and the object for one scanning line is obtained. Image data D OB line buffer RAM 31g
Temporarily store in. The object image data D OB temporarily stored in the line buffer RAM 31g is updated every scan. The object image data D OB read from the RAM 31g is supplied to the color difference data processing circuit 31e.

【0025】色差データ処理回路31eは、バックグラ
ウンドコントロール回路31cおよびオブジェクトコン
トロール回路31dから供給される8ビット長の画像デ
ータDBG,DOBを、周知のカラールックアップテーブル
RAM31hを参照して各4ビット長のR信号,G信号
およびB信号から形成される画像処理データDSPに変換
して出力する。また、色差データ処理回路31eは、画
像処理データDSP(RGB信号)の他、信号YSBGお
よび信号YSOBJを発生する。この信号YSBGおよ
び信号YSOBJは、現在出力している画像処理データ
SPがバックグラウンド画像データDBGに対応するもの
であるか、あるいはオブジェクト画像データDOBに対応
するものであるかを表わす信号である。例えば、現在出
力している画像処理データDSPがバックグラウンド画像
データDBGに対応するものである時には、信号YSBG
が「H(ハイ)」となり、信号YSOBJが「L(ロ
ウ)」になる。一方、これとは逆に画像処理データDSP
がオブジェクト画像データD OBに対応するものであれ
ば、信号YSBGが「L」となり、信号YSOBJが
「H」になる。
The color difference data processing circuit 31e has a background
Sound control circuit 31c and object controller
Image data of 8-bit length supplied from the troll circuit 31d
Data DBG, DOBA well-known color lookup table
Referring to the RAM 31h, R and G signals each having a length of 4 bits
And image processing data D formed from the B signalSPConversion to
And output. In addition, the color difference data processing circuit 31e
Image processing data DSPIn addition to (RGB signal), the signal YSBG and
And signal YSOBJ. This signal YSBG and
Signal YSOBJ is the image processing data currently being output.
DSPIs background image data DBGCorresponding to
Or object image data DOBCorresponding to
This is a signal that indicates whether or not to do. For example,
Image processing data DSPHas a background image
Data DBGSignal YSBG when
Becomes “H” and the signal YSOBJ becomes “L”.
C) ”. On the other hand, conversely to this, the image processing data DSP
Is the object image data D OBThat corresponds to
Signal YSBG becomes “L” and signal YSOBJ becomes
It becomes "H".

【0026】このように、画像処理部30では、制御部
50側からDMA転送されるバックグラウンド画像デー
タDBGおよびオブジェクト画像データDOBをVRAM3
2に格納しておき、CPU51から供給される制御信号
SC(各種表示制御コマンド)に応じてこのVRAM3
2から画像データDBGあるいは画像データDOBを読み出
し、これを1走査ライン毎のドット表示色を表わす画像
処理データDSPを発生すると共に、当該画像処理データ
SPの属性を表わす信号YSBGおよびYSOBJを出
力する。
As described above, in the image processing unit 30, the background image data D BG and the object image data D OB DMA-transferred from the control unit 50 side are stored in the VRAM 3.
2 in accordance with a control signal SC (various display control commands) supplied from the CPU 51.
Reads the image data D BG or the image data D OB from 2, while generating the image processing data D SP representing the dot display color of one scan line per this signal YSBG and YSOBJ representing the attributes of the image processing data D SP Is output.

【0027】位置検出処理部40の構成 位置検出処理部40は、複数のロジック素子を配列して
なるゲートアレイ、ラインバッファおよびワークRAM
とから構成されており、後述する制御部50の指示の下
にサンプリング画像データDS中に含まれるクロマキー
像と、オブジェクト画像データDOBによって形成される
オブジェクト画像との衝突座標位置や、これら画像の重
心位置等を予め定められたロジックに基づいて論理演算
する。上記ラインバッファ(図示略)は、ビデオ信号処
理部20から供給されるクロマキー検出信号CROを一
時記憶する。ワークRAMには、ゲートアレイによって
論理演算された各種の演算結果が一時記憶されるように
なっている。
Configuration of Position Detection Processing Unit 40 The position detection processing unit 40 is composed of a gate array formed by arranging a plurality of logic elements, a line buffer and a work RAM.
And the collision coordinate position between the chroma key image included in the sampling image data D S and the object image formed by the object image data D OB under the instruction of the control unit 50 described later, and these images. The position of the center of gravity and the like are logically calculated based on a predetermined logic. The line buffer (not shown) temporarily stores the chroma key detection signal CRO supplied from the video signal processing unit 20. The work RAM is adapted to temporarily store various calculation results obtained by logical calculation by the gate array.

【0028】この位置検出処理部40は、上述したVD
P31から供給される信号YSBGおよびYSOBJに
基づき、前述した選択信号SLを発生してビデオ信号処
理部20に与え、サンプリング画像データDS(実画
像)と画像処理データDSP(CG画像)との重なり具
合、つまり、画面表示される画像の優先順位(前後関
係)を制御する。さらに、処理部40は、制御部50の
指示の下に前述した撮像信号処理部11、ビデオ信号処
理部20およびVDP31へそれぞれレジスタコントロ
ール信号SREGを供給し、各部レジスタのデータセット
/リセットを制御する。
The position detection processing section 40 is the same as the above-mentioned VD.
Based on the signals YSBG and YSOBJ supplied from P31, the above-mentioned selection signal SL is generated and given to the video signal processing unit 20, and the sampling image data D S (actual image) and the image processing data D SP (CG image) are generated. The degree of overlap, that is, the priority order (front-back relationship) of the images displayed on the screen is controlled. Further, the processing unit 40 supplies a register control signal S REG to the above-mentioned imaging signal processing unit 11, video signal processing unit 20 and VDP 31 under the instruction of the control unit 50, and controls the data set / reset of each unit register. To do.

【0029】次に、図8を参照して位置検出処理部40
のワークRAMの記憶エリアについて説明する。この図
において、E1は初期画面エリアであり、水平方向(走
査ライン)当り96ドット、垂直方向に96ラインから
形成される初期画面のデータを一時記憶する。初期画面
のデータとは、ゲーム開始に先立って撮像されたシーン
内に存在するクロマキー検出結果を指す。シーン内にク
ロマキー検出色(例えば、青色)の物体が存在した場
合、前述したバットBAT(図1参照)の一部と誤認す
る虞がある。そこで、初期画面エリアE1に一時記憶さ
れるデータは、クロマキー検出されたドット位置をバッ
トBAT(図1参照)と誤認しないようにするため、当
該ドット位置を不感帯とする際に用いられる。
Next, referring to FIG. 8, the position detection processing unit 40
The storage area of the work RAM will be described. In this figure, E1 is an initial screen area for temporarily storing data of an initial screen formed of 96 dots in the horizontal direction (scanning line) and 96 lines in the vertical direction. The data of the initial screen refers to the chroma key detection result existing in the scene captured before the start of the game. If an object of a chroma key detection color (for example, blue) is present in the scene, it may be mistaken for a part of the bat BAT (see FIG. 1) described above. Therefore, the data temporarily stored in the initial screen area E1 is used when the dot position detected by the chroma key is not mistaken for the bat BAT (see FIG. 1) when the dot position is set to the dead zone.

【0030】E2は水平方向96ドット、垂直方向96
ラインで形成される処理画面エリアであり、実画像にお
いてクロマキー検出されるバットBAT像と、CG画像
中のオブジェクト画像(本実施例では、ボール像)とが
1フレーム毎に更新記憶される。E3〜E4は、それぞ
れ1フレーム毎に更新される処理画面でのバットBAT
像の上端/下端位置を一時記憶する上端座標エリア、下
端座標エリアである。E5〜E6は、それぞれ1フレー
ム毎に更新される処理画面でのバットBAT像の左端/
右端位置を一時記憶する左端座標エリア、右端座標エリ
アである。E7は第1の衝突座標エリアである。第1の
衝突座標エリアE1とは、バットBAT像とオブジェク
ト画像(ボール像)との重なり(衝突)が最初に検出さ
れる走査ライン中の交点を、処理画面上の座標として表
現したものである。また、第2の衝突座標エリアE8
は、バットBAT像とオブジェクト画像(ボール像)と
の重なりが最後に検出される走査ライン中の交点を、処
理画面上の座標として表現したものである。
E2 is 96 dots in the horizontal direction and 96 dots in the vertical direction.
This is a processing screen area formed by lines, and the bat BAT image in which the chroma key is detected in the actual image and the object image (ball image in this embodiment) in the CG image are updated and stored for each frame. E3 to E4 are bat BATs on the processing screen that are updated for each frame.
These are the upper end coordinate area and the lower end coordinate area for temporarily storing the upper end / lower end positions of the image. E5 to E6 are the left end of the bat BAT image on the processing screen updated for each frame /
The left end coordinate area and the right end coordinate area temporarily store the right end position. E7 is the first collision coordinate area. The first collision coordinate area E1 represents the intersection point in the scanning line where the overlap (collision) of the bat BAT image and the object image (ball image) is first detected as coordinates on the processing screen. . In addition, the second collision coordinate area E8
Represents the intersection point in the scanning line where the overlap between the bat BAT image and the object image (ball image) is finally detected as coordinates on the processing screen.

【0031】E9は重心座標エリアであり、実画像にて
クロマキー検出されるバットBAT像の面積に基づき算
出される重心位置を処理画面上の座標位置が記憶され
る。E10は、実画像にてクロマキー検出されるバット
BAT像の面積が記憶される面積エリアである。この面
積エリアE10にセットされる面積は、ブロック個数で
表わされる。ここで言うブロックとは、処理画面におい
て水平方向6ドット、垂直方向2ラインからなる12ド
ット領域を指す。この12ドット領域から形成されるブ
ロック中に、「6ドット」以上のクロマキー検出があっ
た場合、そのブロックがバットBAT像の面積として見
做される。
E9 is a barycentric coordinate area, in which the barycentric position calculated based on the area of the bat BAT image detected by the chroma key in the actual image is stored as the coordinate position on the processing screen. E10 is an area area in which the area of the bat BAT image subjected to chroma key detection in the actual image is stored. The area set in the area area E10 is represented by the number of blocks. The block referred to here is a 12-dot area consisting of 6 dots in the horizontal direction and 2 lines in the vertical direction on the processing screen. When chroma key detection of "6 dots" or more is detected in the block formed from the 12 dot area, the block is regarded as the area of the bat BAT image.

【0032】制御部50の構成 次に、再び図3を参照して制御部50の構成について説
明する。制御部50は、構成要素51〜57から構成さ
れる。CPU51は装置本体2の操作パネルに配設され
る各種操作子をキースキャンし、これに応じて生成され
る操作子信号KSに応じて装置各部を制御するものであ
り、その動作の詳細については後述する。このCPU5
1は、内部タイマを備え、当該タイマによってカウント
されるゲームカウンタ値に基づきゲーム進行を管理す
る。また、CPU51は、周知のDMAコントローラを
備えており、ゲーム動作に必要な各種データ(バックグ
ラウンド画像データDBGやオブジェクト画像データ
OB、あるいはオブジェクトテーブルデータTOB)を前
述した画像処理部30へDMA転送するよう構成されて
いる。さらに、CPU51は、ゲーム動作に応じて画像
制御に必要な制御信号SCを発生して各処理部へ動作指
示を与える。52はRAMであり、CPU51のワーク
エリアとして各種演算結果やフラグ値が一時記憶され
る。53はCPU51の動作を管理するOS(オペレー
ションシステム)プログラムが記憶されるROMであ
る。54はCPU51の制御の下に装置全体の動作を規
定するシステムクロックを発生するシステムクロック回
路である。
Structure of Control Unit 50 Next, the structure of the control unit 50 will be described with reference to FIG. 3 again. The control unit 50 is composed of components 51 to 57. The CPU 51 performs a key scan on various operators provided on the operation panel of the apparatus body 2 and controls each part of the apparatus according to the operator signal KS generated in response to the key scan. It will be described later. This CPU5
1 has an internal timer, and manages the game progress based on the game counter value counted by the timer. The CPU 51 also includes a well-known DMA controller, and sends various data (background image data D BG , object image data D OB , or object table data T OB ) necessary for game operation to the image processing unit 30 described above. It is configured for DMA transfer. Further, the CPU 51 generates a control signal SC necessary for image control according to the game operation and gives an operation instruction to each processing unit. A RAM 52 is used as a work area for the CPU 51 to temporarily store various calculation results and flag values. Reference numeral 53 is a ROM that stores an OS (operating system) program that manages the operation of the CPU 51. Reference numeral 54 is a system clock circuit which generates a system clock that regulates the operation of the entire device under the control of the CPU 51.

【0033】55は装置本体2に対して挿脱自在に装着
されるゲームカートリッジであり、ROM55aと第1
音源回路55bとから構成されている。ROM55a
は、CPU51にロードされるアプリケーションプログ
ラムである。なお、この実施例においては、前述したよ
うに、打撃練習をシミュレートするゲームプログラムが
記憶されている。55bは第1音源回路であり、CPU
51側から位置検出処理部40を介して供給されるイベ
ントデータに基づき、ゲーム動作に対応したゲーム効果
音を合成し、これを楽音信号としてCPU51へ出力す
る。56は第2音源回路であり、ゲーム進行に対応した
楽曲、例えば、オープニングやエンディング等の楽曲を
楽音合成して出力する。57はサウンドシステムであ
り、上記第1音源回路55bおよび第2音源回路56か
ら供給される楽音信号に対してノイズ除去等のフィルタ
リングを施した後、これを増幅して出力する。
Reference numeral 55 denotes a game cartridge which is removably attached to the apparatus main body 2 and includes a ROM 55a and a first cartridge.
The sound source circuit 55b. ROM 55a
Is an application program loaded into the CPU 51. In this embodiment, as described above, the game program for simulating the batting practice is stored. 55b is a first tone generator circuit, which is a CPU
Based on the event data supplied from the 51 side via the position detection processing unit 40, a game sound effect corresponding to the game operation is synthesized and output to the CPU 51 as a tone signal. Reference numeral 56 is a second tone generator circuit, which synthesizes musical sounds corresponding to the progress of the game, for example, musical compositions such as opening and ending, and outputs them. Reference numeral 57 denotes a sound system, which filters the musical tone signals supplied from the first tone generator circuit 55b and the second tone generator circuit 56, such as noise removal, and then amplifies and outputs them.

【0034】なお、上述した第1および第2音源回路5
5b,56は、CPU51から所定タイミング毎にイベ
ント情報が供給されることによってゲーム音を楽音合成
する。また、CPU51側は、第1および第2音源回路
55b,56からデータ要求信号(後述する)が供給さ
れる毎に監視タイマWTをリセットする構成を有してお
り、この監視タイマWTがオーバーフローすると、上記
ゲームカートリッジ55が装置本体2から抜き取られた
としてその動作を停止する。この結果、ゲームカートリ
ッジ55には、CPU51に連係して動作する第1音源
回路55bが必須となり、当該回路55bを持たないゲ
ームカートリッジではゲーム動作をさせない構成となっ
ている。
The above-mentioned first and second sound source circuits 5
The CPUs 51, 5b and 56 supply event information at predetermined timings to synthesize game sounds. Further, the CPU 51 side has a configuration in which the monitoring timer WT is reset every time a data request signal (described later) is supplied from the first and second tone generator circuits 55b and 56, and when the monitoring timer WT overflows. If the game cartridge 55 is pulled out from the apparatus main body 2, the operation is stopped. As a result, the game cartridge 55 requires the first tone generator circuit 55b that operates in cooperation with the CPU 51, and the game cartridge that does not have the circuit 55b does not perform the game operation.

【0035】C.実施例の動作 次に、上記構成による実施例の動作について説明する。
ここでは、まず、前述した位置検出処理部40の動作に
ついて説明した後、制御部50(CPU51)の動作に
ついて説明する。 (1)位置検出処理部40の動作 ここでは、位置検出処理部40の動作について図9〜図
15を参照して説明する。この処理部40では、制御部
50の指示の下に、サンプリング画像データD S中に含
まれるバットBAT像をクロマキー検出信号CROに基
づいて検出し、当該バットBAT像とオブジェクト画像
データDOBによって形成されるオブジェクト画像(ボー
ル像)との衝突座標位置や、これら画像の重心位置をす
る。以下、こうした動作の詳細について説明する。
C. Operation of Embodiment Next, the operation of the embodiment having the above configuration will be described.
Here, first, the operation of the position detection processing unit 40 described above is performed.
After explaining about the operation of the control unit 50 (CPU51)
explain about. (1) Operation of Position Detection Processing Unit 40 Here, the operation of the position detection processing unit 40 will be described with reference to FIGS.
This will be described with reference to 15. In this processing unit 40, the control unit
Under the instruction of 50, the sampling image data D Included in S
Based on the chroma key detection signal CRO
Then, the bat BAT image and the object image are detected.
Data DOBObject image formed by
The position of the collision coordinates with the image) and the position of the center of gravity of these images.
It The details of such operation will be described below.

【0036】メインルーチンの動作 まず、装置本体2に電源が投入され、CPU51側から
システムリセットを表わす制御信号SCが位置検出処理
部40に供給されたとする。そうすると、位置検出処理
部40は、上記制御信号SCに基づいて図9に示すメイ
ンルーチンを実行してステップSA1に処理を進める。
まず、ステップSA1では、自身の内部レジスタをリセ
ット、あるいは初期値をセットするイニシャライズを行
う一方、撮像信号処理部11、ビデオ信号処理部20お
よびVDP31へそれぞれレジスタセットを指示するレ
ジスタコントロール信号SREGを供給し、次のステップ
SA2に進む。
Operation of Main Routine First, it is assumed that the apparatus main body 2 is powered on and a control signal SC representing a system reset is supplied from the CPU 51 side to the position detection processing section 40. Then, the position detection processing unit 40 executes the main routine shown in FIG. 9 based on the control signal SC, and advances the processing to step SA1.
First, in step SA1, while resetting its own internal register or performing initialization for setting an initial value, a register control signal S REG for instructing register setting to the imaging signal processing unit 11, the video signal processing unit 20 and the VDP 31 is set. Supply and proceed to the next step SA2.

【0037】ステップSA2では、「初期画面マップ」
が作成されているか否かを判断する。ここで、例えば、
「初期画面マップ」が作成されていない場合、判断結果
は「NO」となり、次のステップSA3に処理を進め
る。「初期画面マップ」とは、ゲーム開始に先立って、
撮像部1が撮像する撮像画面内に、バットBAT(図1
参照)と同色の物体が存在するか否かを確認するための
ものである。そして、ステップSA3に進むと、複数フ
レーム分のクロマキー検出結果を重ね合わせ、これをワ
ークRAMの初期画面エリアE1(図8参照)に格納
し、初期画面内に存在するクロマキー検出ブロックを
「不感帯」と見做すための「初期画面マップ」を作成す
る。
At step SA2, "initial screen map"
Is created. Where, for example,
When the "initial screen map" is not created, the determination result is "NO", and the process proceeds to the next step SA3. "Initial screen map" means, prior to the start of the game,
The bat BAT (see FIG. 1) is displayed in the imaging screen imaged by the imaging unit 1.
It is for confirming whether or not there is an object of the same color as that of (see). Then, when the processing proceeds to step SA3, the chroma key detection results for a plurality of frames are overlapped and stored in the initial screen area E1 (see FIG. 8) of the work RAM, and the chroma key detection blocks existing in the initial screen are "dead zone". Create an "initial screen map" to be considered as.

【0038】こうして「初期画面マップ」の作成がなさ
れると、位置検出処理部40は、次のステップSA4に
処理を進める。なお、「初期画面マップ」が予め用意さ
れている場合には、上記ステップSA2の判断結果は
「YES」となり、ステップSA4に進む。ステップS
A4では、レジスタX,Yの値をゼロリセットする。な
お、このレジスタX,Yには、水平方向96ドット、垂
直方向96ラインで形成される画面座標に相当する値が
処理内容に応じて順次セットされる。
When the "initial screen map" is created in this way, the position detection processing section 40 advances the processing to the next step SA4. When the "initial screen map" is prepared in advance, the result of the determination in step SA2 is "YES", and the process proceeds to step SA4. Step S
At A4, the values of the registers X and Y are reset to zero. A value corresponding to screen coordinates formed by 96 dots in the horizontal direction and 96 lines in the vertical direction is sequentially set in the registers X and Y according to the processing content.

【0039】次に、ステップSA5に進むと、位置検出
処理部40は、ラインバッファに一時記憶されたクロマ
キー検出信号CROに対してブロック単位毎のクロマキ
ー検出を施す。ブロック単位のクロマキー検出とは、ラ
インバッファから読み出したクロマキー検出信号CRO
を水平方向6ドット、垂直方向2ラインからなるブロッ
クに区分けし、「H」レベルのクロマキー検出信号CR
Oがブロック当り「6ドット」以上存在した時に、当該
ブロックの属性を「クロマキー有り」と見做すものであ
る。こうしたクロマキー検出の結果は、前述した処理画
面エリアE2(図8参照)にブロック属性としてストア
され、これが「処理画面マップ」となる。
Next, in step SA5, the position detection processing section 40 performs chroma key detection for each block on the chroma key detection signal CRO temporarily stored in the line buffer. The block-by-block chroma key detection means the chroma key detection signal CRO read from the line buffer.
Is divided into blocks each consisting of 6 dots in the horizontal direction and 2 lines in the vertical direction, and the "H" level chroma key detection signal CR
When O is present in “6 dots” or more per block, the attribute of the block is regarded as “with chroma key”. The result of such chroma key detection is stored as a block attribute in the processing screen area E2 (see FIG. 8) described above, and this becomes a "processing screen map".

【0040】次いで、ブロック単位毎のクロマキー検出
がなされると、位置検出処理部40は、次のステップS
A6に進み、クロマキー検出された実画像のバットBA
T像とCG画像中におけるオブジェクト画像OBJ(ボ
ール像)との衝突の有無を検出し、衝突する場合にはそ
の衝突座標を求める。そして、ステップSA7に進む
と、処理部40は、レジスタXの値を1インクリメント
し、続いて、ステップSA8ではレジスタXの値が「9
6」、つまり、1走査ライン分の処理が完了したか否か
を判断する。ここで、レジスタXの値が「96」に達し
ていない場合には、判断結果が「NO」となり、1走査
ライン分の処理が完了する迄、上記ステップSA5〜S
A7を繰り返す。
Next, when the chroma key detection for each block unit is performed, the position detection processing unit 40 proceeds to the next step S
Proceed to A6, and the bat BA of the actual image with chroma key detection
The presence or absence of a collision between the T image and the object image OBJ (ball image) in the CG image is detected, and in the case of collision, the collision coordinates are obtained. Then, in step SA7, the processing unit 40 increments the value of the register X by 1, and subsequently in step SA8, the value of the register X is "9."
6 ", that is, it is determined whether the processing for one scanning line is completed. Here, when the value of the register X has not reached "96", the determination result becomes "NO" and the steps SA5 to S are performed until the processing for one scanning line is completed.
Repeat A7.

【0041】一方、1走査ライン分の処理が完了する
と、ここでの判断結果が「YES」となり、ステップS
A9に進み、レジスタXの値を再びゼロリセットすると
共に、レジスタYの値を1インクリメントして走査ライ
ンを垂直方向に更新する。そして、ステップSA10に
進むと、処理部40はレジスタYの値が「96」である
か否かを判断する。ここで、レジスタYの値が「96」
に達していない場合には、判断結果が「NO」となり、
上述したステップSA5〜SA9を繰り返す。そして、
1フレーム分の走査が完了すると、ここでの判断結果が
「YES」となり、ステップSA11に処理を進める。
On the other hand, when the processing for one scanning line is completed, the judgment result here becomes "YES", and step S
In step A9, the value of the register X is reset to zero again and the value of the register Y is incremented by 1 to update the scan line in the vertical direction. Then, when the processing proceeds to step SA10, the processing unit 40 determines whether or not the value of the register Y is "96". Here, the value of the register Y is "96".
If not, the judgment result is “NO”,
The above steps SA5 to SA9 are repeated. And
When the scanning for one frame is completed, the determination result here becomes "YES", and the process proceeds to step SA11.

【0042】ステップSA11では、上記ステップSA
5においてクロマキー検出されたブロックに基づき、ク
ロマキー像の左端/右端座標および上端/下端座標を算
出し、これらをワークRAMの記憶エリアE3〜E6
(図8参照)に記憶する一方、クロマキー検出されたブ
ロック個数から当該クロマキー像の面積を求める。な
お、記憶エリアE3〜E4は、それぞれ1フレーム毎に
更新される検出枠内でのクロマキー像の上端/下端位置
を一時記憶し、記憶エリアE5〜E6は、それぞれ1フ
レーム毎に更新される検出枠内でのクロマキー像の左端
/右端位置を一時記憶する。また、ブロック個数から算
出される面積は、記憶エリアE10に格納される。
In step SA11, the above step SA
5, the left edge / right edge coordinates and the upper edge / lower edge coordinates of the chroma key image are calculated based on the blocks detected by the chroma key, and these are stored in the work RAM storage areas E3 to E6.
(See FIG. 8), the area of the chroma key image is calculated from the number of blocks detected by the chroma key. The storage areas E3 to E4 temporarily store the upper and lower end positions of the chroma key image within the detection frame that is updated for each frame, and the storage areas E5 to E6 are detected for each frame. The left and right edge positions of the chroma key image within the frame are temporarily stored. The area calculated from the number of blocks is stored in the storage area E10.

【0043】このようにして実画像からバットBAT像
をクロマキー検出すると、ステップSA12に進み、当
該バットBAT像の重心位置を求める。この後、レジス
タKFに格納されている警告フラグが「1」であるかど
うか判定し(ステップSA13)、「1」であれば、ス
テップSA14に進み、割り込み信号を出力する。続い
て、ステップSA15において割込みフラグが「1」か
どうか判定し、「1」であれば、ステップSA16に進
み、CPU51に対して割込み信号を出力する。これ以
後、位置検出処理部40はその処理をステップSA4に
戻し、上述した動作を繰り返し、「バット」と「ボー
ル」との対応関係をフレーム毎に求める。なお、上記レ
ジスタKFに格納される警告フラグの意味するところに
ついては追って説明する。
When the bat BAT image is chroma-key detected from the real image in this way, the process proceeds to step SA12, and the barycentric position of the bat BAT image is obtained. Thereafter, it is determined whether or not the warning flag stored in the register KF is "1" (step SA13). If the warning flag is "1", the process proceeds to step SA14 and an interrupt signal is output. Then, in step SA15, it is determined whether or not the interrupt flag is "1". If the interrupt flag is "1", the process proceeds to step SA16 to output an interrupt signal to the CPU 51. After that, the position detection processing unit 40 returns the processing to step SA4, repeats the above-described operation, and obtains the correspondence relationship between the “bat” and the “ball” for each frame. The meaning of the warning flag stored in the register KF will be described later.

【0044】初期画面マップ作成ルーチンの動作 次に、図10を参照して初期画面マップ作成ルーチンの
動作について説明する。上述したように、初期画面マッ
プが作成されていない場合、位置検出処理部40はステ
ップSA3に処理を進め、図10に示す初期画面マップ
作成ルーチンを実行してステップSB1に処理を進め
る。ステップSB1では、内部レジスタにセットされる
サンプリング回数nを読み出す。サンプリング回数nと
は、撮像部1から供給されるクロマキー検出信号CRO
を何フレーム分取り込むかを表わすものである。次い
で、ステップSB2に進むと、レジスタX,Yの値をゼ
ロリセットし、次のステップSB3に進む。ステップS
B3では、ラインバッファに書き込まれたクロマキー検
出信号CROの内、X方向(水平方向)の6ドット分、
Y方向(垂直方向)の2ライン分、すなわち、1ブロッ
ク分を読み出す。
Operation of Initial Screen Map Creating Routine Next, the operation of the initial screen map creating routine will be described with reference to FIG. As described above, when the initial screen map is not created, the position detection processing unit 40 advances the processing to step SA3, executes the initial screen map creation routine shown in FIG. 10, and advances the processing to step SB1. In step SB1, the sampling number n set in the internal register is read. The sampling number n is the chroma key detection signal CRO supplied from the image pickup unit 1.
It shows how many frames are taken in. Next, when proceeding to step SB2, the values of the registers X and Y are reset to zero, and then proceeding to the next step SB3. Step S
In B3, of the chroma key detection signal CRO written in the line buffer, 6 dots in the X direction (horizontal direction)
Two lines in the Y direction (vertical direction), that is, one block are read.

【0045】次いで、ステップSB4に進むと、この読
み出した1ブロック中に「6ドット」以上の「H」レベ
ルのクロマキー検出信号CROが存在するか否かを判断
する。ここで、「6ドット」以上存在しなければ、「ク
ロマキー無し」として判断結果が「NO」となり、ステ
ップSB5に進む。ステップSB5では、そのブロック
属性を「0」として次のステップSB7へ処理を進め
る。一方、これに対し、「6ドット」以上存在すると、
「クロマキー有り」とされて、判断結果が「YES」と
なり、ステップSB6に進む。ステップSB6では、そ
のブロック属性を「1」にセットし、次のステップSB
7へ処理を進める。ステップSB7では、最初のフレー
ムであるか否かを判断する。ここで、最初にサンプリン
グしたフレームであると、判断結果は「YES」とな
り、ステップSB8に進む。
Next, at step SB4, it is judged whether or not there is a "H" level chroma key detection signal CRO of "6 dots" or more in the read one block. If "6 dots" or more does not exist, the determination result is "no chroma key" and the determination result is "NO", and the process proceeds to step SB5. In step SB5, the block attribute is set to "0" and the process proceeds to the next step SB7. On the other hand, if there are more than 6 dots,
It is determined that "chroma key is present", the determination result is "YES", and the process proceeds to step SB6. In step SB6, the block attribute is set to "1", and the next step SB
Processing proceeds to 7. In step SB7, it is determined whether or not it is the first frame. Here, if it is the first sampled frame, the determination result is "YES", and the process proceeds to step SB8.

【0046】ステップSB8に進むと、位置検出処理部
40は、現レジスタX,Yの値に応じて初期画面エリア
E1へ判定したブロック属性をストアする。そして、こ
の後、ステップSB9に進み、レジスタXの値を1イン
クリメントし、指定ブロックの番号を歩進させる。次
に、ステップSB10に進むと、この歩進された指定ブ
ロックの番号が「96」、つまり、1走査(水平)ライ
ン分完了したか否かを判断する。ここで、完了していな
い場合には、判断結果が「NO」となり、ステップSB
11に進む。ステップSB11では、レジスタYの値が
「96」、つまり、1フレーム分終了したか否かを判断
する。ここで、1フレーム分の処理が終了していない場
合には、判断結果が「NO」となり、前述したステップ
SB3に戻る。これにより、ステップSB3〜SB6が
繰り返され、次のブロック属性が判定される。
In step SB8, the position detection processing section 40 stores the determined block attribute in the initial screen area E1 according to the values of the current registers X and Y. Then, after that, the process proceeds to Step SB9, the value of the register X is incremented by 1, and the number of the designated block is incremented. Next, in step SB10, it is determined whether or not the number of the stepped designated block is "96", that is, one scanning (horizontal) line is completed. Here, if not completed, the determination result is “NO”, and step SB
Proceed to 11. In step SB11, it is determined whether the value of the register Y is "96", that is, whether one frame has been completed. Here, if the processing for one frame is not completed, the determination result is “NO”, and the process returns to step SB3 described above. As a result, steps SB3 to SB6 are repeated and the next block attribute is determined.

【0047】そして、例えば、いま、1走査(水平)ラ
イン分のブロック属性の判定が完了したとする。そうす
ると、ステップSB10の判断結果が「YES」とな
り、処理部40はステップSB13へ処理を進める。ス
テップSB13では、レジスタXをゼロリセットする一
方、レジスタYの値を1インクリメントして走査ライン
を更新する。そして、この後、再び、ステップSB11
を介してステップSB3以降のブロック判定がなされ
る。次いで、1フレーム分のブロック属性について判定
が完了すると、上述したステップSB11の判断結果が
「YES」となり、ステップSB12に進む。ステップ
SB12では、サンプリング回数nが設定回数に達した
か否かを判断する。
Then, for example, it is assumed that the determination of the block attribute for one scanning (horizontal) line is completed. Then, the determination result of step SB10 becomes "YES", and the processing unit 40 advances the process to step SB13. In step SB13, the register X is reset to zero, and the value of the register Y is incremented by 1 to update the scan line. Then, after this, again, step SB11
Block determination from step SB3 onward is performed via. Next, when the determination of the block attribute for one frame is completed, the above-mentioned determination result of step SB11 becomes "YES", and the process proceeds to step SB12. In step SB12, it is determined whether the sampling number n has reached the set number.

【0048】ここで、設定回数に達していない場合に
は、判断結果が「NO」となり、ステップSB14へ処
理を進める。ステップSB14では、サンプリング回数
nを歩進させ、再び前述したステップSB2以降を実行
する。こうして1回目の初期画面マップが作成され、2
回目の初期画面マップの作成を行う過程で、ステップS
B7に進むと、ここでの判断結果が「NO」となり、ス
テップSB15に進む。ステップSB15では、先にス
トアされた対応ブロック属性をレジスタX,Yの値に応
じて初期画面エリアE1から読み出す。そして、ステッ
プSB16に進むと、先のブロック属性と、現在判定さ
れたブロック属性との論理和を求める。続いて、ステッ
プSB8では、この論理和を新たなブロック属性として
レジスタX,Yの値に基づき初期画面エリアE1にスト
アする。そして、所定フレーム分の論理和が生成される
と、上述したステップSB12の判断結果が「YES」
となり、このルーチンを終了し、位置検出処理部40の
処理は前述したメインルーチンへ復帰する。
If the set number of times has not been reached, the determination result is "NO", and the process proceeds to step SB14. In step SB14, the number of times of sampling n is incremented, and the above-mentioned step SB2 and subsequent steps are executed again. In this way, the first initial screen map is created,
In the process of creating the initial screen map for the second time, step S
When proceeding to B7, the determination result here becomes "NO", and the routine proceeds to step SB15. In step SB15, the corresponding block attribute stored previously is read from the initial screen area E1 according to the values of the registers X and Y. Then, in step SB16, the logical sum of the previous block attribute and the currently determined block attribute is obtained. Then, in step SB8, this logical sum is stored as a new block attribute in the initial screen area E1 based on the values of the registers X and Y. Then, when the logical sum of a predetermined number of frames is generated, the determination result of step SB12 described above is "YES".
Then, this routine is ended, and the processing of the position detection processing unit 40 returns to the main routine described above.

【0049】処理画面マップ作成ルーチンの動作 以上のようにして初期画面マップが作成されると、位置
検出処理部40はステップSA5を介して図11に示す
処理画面マップ作成ルーチンを実行してステップSC1
に処理を進める。ステップSC1では、ラインバッファ
に書き込まれたクロマキー検出信号CROの内、X方向
(水平方向)6ドット、Y方向(垂直方向)2ラインか
らなる1ブロックを読み出す。次いで、ステップSC2
に進むと、その読み出した1ブロック内に「6ドット」
以上の「H」レベルのクロマキー検出信号CROが存在
するか否かを判断する。ここで、「6ドット」以上存在
しなければ、「クロマキー無し」として判断結果が「N
O」となり、ステップSC3に進む。ステップSC3で
は、そのブロック属性を「0」として次のステップSC
4へ処理を進める。ステップSC4では、この判定され
たブロック属性をレジスタX,Yの値に基づき処理画面
エリアE2(図8参照)にストアする。
Operation of Processed Screen Map Creation Routine When the initial screen map is created as described above, the position detection processing section 40 executes the processed screen map creation routine shown in FIG. 11 via step SA5 and executes step SC1.
Proceed to. In step SC1, one block consisting of 6 dots in the X direction (horizontal direction) and 2 lines in the Y direction (vertical direction) is read from the chroma key detection signal CRO written in the line buffer. Then, step SC2
If you proceed to, read "6 dots" in one block.
It is determined whether or not the above "H" level chroma key detection signal CRO is present. If "6 dots" or more does not exist, it is determined that "no chroma key is present" and the determination result is "N.
"O" and the process proceeds to step SC3. At step SC3, the block attribute is set to "0" and the next step SC
Processing proceeds to 4. In step SC4, the determined block attribute is stored in the processing screen area E2 (see FIG. 8) based on the values of the registers X and Y.

【0050】一方、上記ステップSC2の判断結果が
「YES」となった場合、すなわち、1ブロック内に
「6ドット」以上の「H」レベルのクロマキー検出信号
CROが存在する時には、処理部40はステップSC5
に処理を進める。ステップSC5では、リジェクトスイ
ッチSRがオン操作されているか否かを判断する。この
リジェクトスイッチSRとは、装置本体2の操作パネル
に配設されるスイッチであり、そのスイッチ操作に応じ
て「不感帯」を設けるか否かを設定するものである。こ
こで、当該スイッチSRがオン設定されている場合に
は、初期画面マップに記憶されたクロマキー検出ブロッ
クを「不感帯」と見做すようにする。
On the other hand, when the result of the determination in step SC2 is "YES", that is, when there is a "H" level chroma key detection signal CRO of "6 dots" or more in one block, the processing section 40 Step SC5
Proceed to. In step SC5, it is determined whether or not the reject switch SR has been turned on. The reject switch SR is a switch arranged on the operation panel of the apparatus main body 2, and is for setting whether or not to provide a "dead zone" according to the switch operation. Here, when the switch SR is turned on, the chroma key detection block stored in the initial screen map is regarded as a “dead zone”.

【0051】すなわち、上記ステップSC5において、
リジェクトスイッチSRがオン設定されている場合に
は、判断結果が「YES」となり、次のステップSC6
に進む。ステップSC6では、初期画面エリアE1から
レジスタX,Yの値に応じて対応するブロック属性を読
み出す。次いで、ステップSC7に進むと、初期画面エ
リアE1から読み出したブロック属性が「1」であるか
否かを判断する。ここで、当該ブロック属性が「1」で
ある時、その判断結果は「YES」となり、上述したス
テップSC3に進み、ブロック属性を「0」に変更し、
その後、ステップSC4を介して、この変更されたブロ
ック属性をレジスタX,Yの値に応じて処理画面エリア
E2に書き込む。この結果、初期画面マップに記憶され
たクロマキー検出ブロックが「不感帯」に設定される訳
である。
That is, in step SC5,
When the reject switch SR is set to ON, the determination result is "YES", and the next step SC6
Proceed to. At step SC6, the block attribute corresponding to the values of the registers X and Y is read from the initial screen area E1. Next, in step SC7, it is determined whether the block attribute read from the initial screen area E1 is "1". Here, when the block attribute is “1”, the determination result is “YES”, the process proceeds to step SC3 described above, and the block attribute is changed to “0”,
Then, the changed block attribute is written in the processing screen area E2 in accordance with the values of the registers X and Y via step SC4. As a result, the chroma key detection block stored in the initial screen map is set to the "dead zone".

【0052】なお、上記リジェクトスイッチSRがオン
設定されない場合、つまり、「不感帯」を設定しない時
には、ステップSC5の判断結果が「NO」となり、ス
テップSC8に進む。ステップSC8では、上述したス
テップSC2において判定された結果に基づき、対応す
るブロックの属性を「1」に設定し、続いて、ステップ
SC4を介してそのブロック属性をレジスタX,Yの値
に応じて処理画面エリアE2に書き込む。
When the reject switch SR is not set to ON, that is, when the "dead zone" is not set, the determination result of step SC5 is "NO", and the process proceeds to step SC8. In step SC8, the attribute of the corresponding block is set to "1" based on the result determined in step SC2 described above, and then the block attribute is set in accordance with the values of the registers X and Y through step SC4. Write in the processing screen area E2.

【0053】衝突座標検出ルーチンの動作 次に、図12を参照して衝突座標検出ルーチンの動作に
ついて説明する。上述したように処理画面マップが作成
されると、位置検出処理部40はステップSA6(図9
参照)を介して衝突座標検出ルーチンを実行する。この
ルーチンでは、クロマキー検出された実画像のバットB
AT像とCG画像中におけるオブジェクト画像OBJ
(ボール像)との衝突の有無を検出するものである。ま
ず、当該ルーチンが実行されると、処理部40はステッ
プSD1に処理を進め、処理画面エリアE2からレジス
タX,Yの値に対応するブロック属性を読み出す。そし
て、ステップSD2に進むと、その読み出したブロック
属性が「1」、すなわち、クロマキー検出されたバット
BAT像であるか否かを判断する。ここで、ブロック属
性が「1」でない場合には、判断結果が「NO」とな
り、衝突が起こり得ないとして一旦このルーチンを終了
する。
Operation of Collision Coordinate Detection Routine Next, the operation of the collision coordinate detection routine will be described with reference to FIG. When the processing screen map is created as described above, the position detection processing unit 40 performs step SA6 (see FIG. 9).
The collision coordinate detection routine is executed via (see). In this routine, the bat B of the real image detected by the chroma key detection
Object image OBJ in AT image and CG image
The presence or absence of a collision with the (ball image) is detected. First, when the routine is executed, the processing unit 40 advances the processing to step SD1 and reads the block attribute corresponding to the values of the registers X and Y from the processing screen area E2. Then, in step SD2, it is determined whether or not the read block attribute is "1", that is, the bat BAT image subjected to the chroma key detection. Here, when the block attribute is not "1", the determination result is "NO", and it is determined that a collision cannot occur, and this routine is once terminated.

【0054】これに対し、読み出したブロック属性が
「1」である時には、判断結果が「YES」となり、次
のステップSD3に処理を進める。ステップSD3で
は、ラインバッファに書き込まれたCGデータをレジス
タX,Yの値に応じて読み出す。ここで言うCGデータ
とは、オブジェクト画像データDOBの表示有無を表わす
信号YSOBJを指す。なお、信号YSOBJは、VD
P31(図3参照)から処理部40に供給されるもので
ある。そして、次のステップSD4に進むと、処理部4
0は読み出したCGデータが「1」であるか否かを判断
する。この時、当該CGデータが「1」でなければ、レ
ジスタX,Yの値に応じて読み出されたブロックはオブ
ジェクト画像データD OBと重ならないことになるから、
衝突せず、判断結果は「NO」となり、このルーチンを
終了する。
On the other hand, the read block attribute is
When it is “1”, the judgment result is “YES”, and the next
The process proceeds to step SD3 of. In step SD3
Register the CG data written in the line buffer.
Data is read according to the values of X and Y. CG data referred to here
Is the object image data DOBIndicates whether to display
Refers to the signal YSOBJ. The signal YSOBJ is VD
It is supplied to the processing unit 40 from P31 (see FIG. 3).
is there. Then, when it proceeds to the next step SD4, the processing unit 4
0 determines whether the read CG data is “1”
To do. At this time, if the CG data is not "1",
The blocks read according to the values of registers X and Y are
Image data D OBBecause it will not overlap with
No collision occurs and the result of the judgment is "NO".
finish.

【0055】一方、読み出したCGデータが「1」であ
ると、ステップSD4の判断結果が「YES」となり、
ステップSD5に進む。ステップSD5では、衝突フラ
グCFが「0」であるか否かを判断する。衝突フラグC
Fは、実画像のバットBAT像とオブジェクト画像OB
J(ボール像)とが重なり合う場合に「1」となるもの
である。ここで、当該フラグCFが「0」である場合、
つまり、初めて両画像の衝突が認知された状態では、判
断結果が「YES」となり、次のステップSD6に処理
を進める。ステップSD6では、最初に検出された第1
のX座標をを衝突座標エリアE7にストアし、続いてス
テップSD7ではこれに対応する第1のY座標を同エリ
アE7にストアする。
On the other hand, if the read CG data is "1", the determination result of step SD4 is "YES",
Go to step SD5. In step SD5, it is determined whether or not the collision flag CF is "0". Collision flag C
F is the bat BAT image of the actual image and the object image OB
It is "1" when J (ball image) overlaps. Here, when the flag CF is “0”,
That is, when the collision of both images is recognized for the first time, the determination result is “YES”, and the process proceeds to the next step SD6. In step SD6, the first detected first
The X coordinate of is stored in the collision coordinate area E7, and subsequently, in step SD7, the corresponding first Y coordinate is stored in the same area E7.

【0056】そして、ステップSD8に進み、衝突フラ
グCFを「1」にセットする。なお、このようにして衝
突フラグCFが「1」になると、処理部40はCPU5
1側へ割込み要求を出し、これに応じてCPU51が衝
突割込み処理(後述する)を実行するようにしている。
これに対して上記ステップSD5の判断結果が「NO」
の場合、すなわち、既に両画像の衝突が認知された状態
では、ステップSD9に進み、最後に検出された第2の
X座標を衝突座標エリアE8にストアし、続いてステッ
プSD10ではこれに対応する第2のY座標を同エリア
E7にストアする。
Then, in step SD8, the collision flag CF is set to "1". When the collision flag CF becomes "1" in this way, the processing unit 40 causes the CPU 5 to operate.
An interrupt request is issued to the No. 1 side, and the CPU 51 executes a collision interrupt process (described later) in response to this.
On the other hand, the determination result of step SD5 is "NO".
In the case of, that is, in the state where the collision of both images has already been recognized, the process proceeds to step SD9, the second X coordinate detected at last is stored in the collision coordinate area E8, and subsequently, this is dealt with in step SD10. The second Y coordinate is stored in the same area E7.

【0057】座標検出ルーチンの動作 次に、図13を参照して座標検出ルーチンの動作につい
て説明する。上述した衝突座標検出ルーチンによって、
クロマキー検出された実画像のバットBAT像とCG画
像中におけるオブジェクト画像OBJ(ボール像)との
衝突座標が検出されると、位置検出処理部40はステッ
プSA11(図9参照)を介して座標検出ルーチンを実
行し、ステップSE1に処理を進める。ステップSE1
では、レジスタX,Y、レジスタSおよびレジスタ
X’,Y’をそれぞれゼロリセットして初期化する。な
お、レジスタSには、ブロック個数を累算してなるバッ
トBAT像の面積が格納される。
Operation of Coordinate Detection Routine Next, the operation of the coordinate detection routine will be described with reference to FIG. By the collision coordinate detection routine described above,
When the collision coordinates of the bat BAT image of the real image subjected to the chroma key detection and the object image OBJ (ball image) in the CG image are detected, the position detection processing unit 40 detects the coordinates through step SA11 (see FIG. 9). The routine is executed and the process proceeds to step SE1. Step SE1
Then, the registers X and Y, the register S, and the registers X ′ and Y ′ are reset to zero and initialized. The register S stores the area of the bat BAT image obtained by accumulating the number of blocks.

【0058】次いで、ステップSE2に進むと、処理部
40は、処理画面エリアE2からレジスタX,Yの値に
応じて対応するブロック属性を読み出してステップSE
3に処理を進める。ステップSE3では、その読み出し
たブロック属性が「1」、すなわち、クロマキー検出さ
れたバットBAT像であるか否かを判断する。ここで、
ブロック属性が「1」でない場合には、判断結果が「N
O」となり、ステップSE4に進む。ステップSE4で
は、レジスタXの値を1インクリメントして歩進させ
る。そして、ステップSE5に進むと、レジスタXの値
が「96」、つまり、1水平(走査)ライン分のブロッ
ク属性を読み出したか否かを判断する。ここで、1水平
ライン分の読み出しが完了していない場合には、判断結
果が「NO」となり、再び上記ステップSE2へ処理を
戻す。
Next, when proceeding to step SE2, the processing section 40 reads out the block attribute corresponding to the values of the registers X and Y from the processing screen area E2, and proceeds to step SE2.
The process proceeds to 3. In step SE3, it is determined whether or not the read block attribute is "1", that is, the chroma key detected bat BAT image. here,
When the block attribute is not "1", the determination result is "N
"O" and the process proceeds to step SE4. At step SE4, the value of the register X is incremented by 1 to advance. Then, in step SE5, it is determined whether or not the value of the register X is "96", that is, the block attribute for one horizontal (scanning) line is read. Here, if the reading for one horizontal line is not completed, the determination result is "NO", and the process is returned to the step SE2 again.

【0059】そして、例えば、読み出したブロック属性
が「1」であると、ステップSE3の判断結果が「YE
S」となり、ステップSE6に処理を進める。ステップ
SE6では、レジスタXの値がレジスタX’の値より大
であるか否かを判断する。レジスタX’には、前回検出
したX座標がセットされており、この座標値と今回の座
標値との比較結果に応じて右端/左端座標を更新するよ
うにしている。つまり、ここでの判断結果が「NO」に
なると、ステップSE7に進み、レジスタXの値を左端
座標エリアE5(図8参照)にストアしてバットBAT
像の左端座標を更新する。一方、ステップSE6の判断
結果が「YES」になると、ステップSE8に進み、レ
ジスタXの値を右端座標エリアE6(図8参照)にスト
アしてバットBAT像の右端座標を更新する。
Then, for example, if the read block attribute is "1", the determination result of step SE3 is "YE."
S ”, and the process proceeds to step SE6. In step SE6, it is determined whether the value of register X is larger than the value of register X '. The previously detected X coordinate is set in the register X ', and the right end / left end coordinates are updated according to the result of comparison between this coordinate value and the present coordinate value. That is, when the determination result here is "NO", the flow proceeds to step SE7, the value of the register X is stored in the left end coordinate area E5 (see FIG. 8), and the bat BAT is stored.
Update the left edge coordinates of the image. On the other hand, when the determination result of step SE6 is "YES", the process proceeds to step SE8, the value of the register X is stored in the right end coordinate area E6 (see FIG. 8), and the right end coordinate of the bat BAT image is updated.

【0060】次いで、ステップSE9に進むと、処理部
40は、レジスタYの値がレジスタY’の値より大であ
るか否かを判断する。ここで、レジスタY’は、上記レ
ジスタX’と同様、前回検出したY座標がセットされて
おり、この座標値と今回の座標値との比較結果に応じて
上端/下端座標を更新するようにしている。つまり、判
断結果が「NO」になると、ステップSE10に進み、
レジスタYの値を上端座標エリアE3(図8参照)にス
トアしてバットBAT像の上端座標を更新する。一方、
ステップSE9の判断結果が「YES」になると、ステ
ップSE11に進み、レジスタYの値を下端座標エリア
E4(図8参照)にストアしてバットBAT像の下端座
標を更新する。
Next, in step SE9, the processing section 40 determines whether or not the value of the register Y is larger than the value of the register Y '. Here, in the register Y ', similarly to the register X', the previously detected Y coordinate is set, and the upper end / lower end coordinates are updated according to the result of comparison between this coordinate value and the present coordinate value. ing. That is, when the determination result is “NO”, the process proceeds to step SE10,
The value of the register Y is stored in the upper end coordinate area E3 (see FIG. 8) to update the upper end coordinate of the bat BAT image. on the other hand,
When the determination result of step SE9 is "YES", the process proceeds to step SE11, the value of the register Y is stored in the lower end coordinate area E4 (see FIG. 8), and the lower end coordinate of the bat BAT image is updated.

【0061】そして、ステップSE12では、レジスタ
Sの値を1インクリメントし、面積を1ブロック増加さ
せる。続いて、ステップSE13に進むと、レジスタ
X,Yの値をそれぞれレジスタX’,Y’に書き換え
る。こうして上記ステップSE2〜SE13の処理が1
水平ライン分なされると、上述したステップSE5の判
断結果が「YES」となり、ステップSE14に進み、
レジスタXの値をゼロリセットすると共に、レジスタY
の値を1歩進させる。次いで、ステップSE15に進む
と、レジスタYの値が「96」、つまり、1フレーム分
の座標検出がなされたか否かを判断する。そして、1フ
レーム分の座標検出が完了していない場合には、前述し
たステップSE2以降が繰り返される。
Then, in step SE12, the value of the register S is incremented by 1 to increase the area by 1 block. Then, in step SE13, the values of the registers X and Y are rewritten into the registers X'and Y ', respectively. Thus, the processing of steps SE2 to SE13 is 1
When the horizontal line is completed, the determination result of the above-mentioned step SE5 becomes "YES", and the process proceeds to step SE14,
The value of register X is reset to zero and register Y
Increments the value of. Next, in step SE15, it is determined whether the value of the register Y is "96", that is, whether or not the coordinates of one frame have been detected. Then, when the coordinate detection for one frame is not completed, the above-mentioned step SE2 and subsequent steps are repeated.

【0062】一方、完了した時には、判断結果が「YE
S」となり、ステップSE16に処理を進める。ステッ
プSE16では、レジスタSに格納される面積値が所定
値を超えているか否か、つまり、処理画面マップ内にお
いてクロマキー検出される領域がゲームの誤動作を引起
こす虞があるかどうかを判断する。したがって、クロマ
キー検出された面積が所定値を超える時には、検出対象
であるバットBAT以外に同色の物体が存在し、これに
よって誤動作すると見做して判断結果を「YES」と
し、ステップSE17に進む。ステップSE17に進む
と、処理部40は、レジスタKFに格納される警告フラ
グを「1」にセットし、このルーチンを終了する。これ
に対し、クロマキー検出された面積が所定値を超えない
場合には、判断結果が「NO」なり、このルーチンから
前述したメインルーチン(図9参照)へ処理を戻す。な
お、上記ステップSE17において、警告フラグが
「1」にセットされると、後述する警告割込み処理が実
行される。
On the other hand, when completed, the judgment result is "YE
S ”, and the process proceeds to step SE16. In step SE16, it is determined whether or not the area value stored in the register S exceeds a predetermined value, that is, whether or not the area where the chroma key is detected in the processing screen map may cause a malfunction of the game. Therefore, when the area detected by the chroma key exceeds a predetermined value, there is an object of the same color other than the bat BAT which is the detection target, and it is considered that malfunction occurs, and the determination result is "YES", and the process proceeds to step SE17. When the processing proceeds to step SE17, the processing unit 40 sets the warning flag stored in the register KF to "1", and ends this routine. On the other hand, when the area detected by the chroma key does not exceed the predetermined value, the determination result is "NO", and the process returns from this routine to the main routine (see FIG. 9) described above. When the warning flag is set to "1" in step SE17, a warning interrupt process described later is executed.

【0063】重心計算ルーチンの動作 上記座標検出ルーチンによって、クロマキー検出された
バットBAT像の左端/右端座標および上端/下端座標
が検出されると、位置検出処理部40は前述したステッ
プSA12(図9参照)を介して図14に示す重心計算
ルーチンを実行し、ステップSF1に処理を進める。ま
ず、ステップSF1では、レジスタXG,YGをゼロリ
セットする。レジスタXG,YGは、それぞれクロマキ
ー検出されたブロックに基づいて算出されるバットBA
T像の重心座標が格納されるものである。次に、ステッ
プSF2に進むと、レジスタX,Yを初期化し、続い
て、ステップSF3では、処理画面エリアE2からレジ
スタX,Yの値に対応するブロック属性を読み出す。
Operation of Center of Gravity Calculation Routine When the left edge / right edge coordinates and the upper edge / lower edge coordinates of the bat BAT image detected by the chroma key are detected by the coordinate detection routine, the position detection processing unit 40 causes the position detection processing unit 40 to perform the above-described step SA12 (FIG. 9). 14), the center of gravity calculation routine shown in FIG. 14 is executed, and the process proceeds to step SF1. First, in step SF1, the registers XG and YG are reset to zero. Registers XG and YG are bat BAs calculated based on the blocks detected by the chroma key.
The barycentric coordinates of the T image are stored. Next, in step SF2, the registers X and Y are initialized, and in step SF3, the block attributes corresponding to the values of the registers X and Y are read from the processing screen area E2.

【0064】次に、ステップSF4に進むと、処理部4
0は、この読み出したブロック属性が「1」、すなわ
ち、クロマキー検出されたバットBAT像であるか否か
を判断する。ここで、ブロック属性が「1」でない場合
には、判断結果が「NO」となり、ステップSF5に進
む。ステップSF5では、レジスタXの値を1インクリ
メントして歩進させる。そして、ステップSF6に進む
と、レジスタXの値が「96」、つまり、1水平(走
査)ライン分のブロック属性を読み出したか否かを判断
する。ここで、1水平ライン分の読み出しが完了してい
ない場合には、判断結果が「NO」となり、再び上記ス
テップSF3に処理を戻す。
Next, in step SF4, the processing unit 4
0 determines whether or not the read block attribute is "1", that is, the bat BAT image subjected to the chroma key detection. Here, when the block attribute is not "1", the determination result is "NO", and the process proceeds to step SF5. At step SF5, the value of the register X is incremented by 1 to advance. Then, in step SF6, it is determined whether or not the value of the register X is "96", that is, the block attribute for one horizontal (scanning) line is read. Here, when the reading for one horizontal line is not completed, the determination result is “NO”, and the process is returned to the step SF3 again.

【0065】そして、例えば、次に読み出したブロック
属性が「1」であるとする。そうすると、ステップSF
4の判断結果は「YES」となり、処理部40はステッ
プSF7に処理を進める。ステップSF7では、クロマ
キー検出されたブロックを質点と見做し、このブロック
の座標(X,Y)と面積Sとの比を順次累算する重心計
算を行う。なお、この面積Sは上述した座標検出ルーチ
ンにおいてレジスタSに格納されるものである。次い
で、ステップSF8に進むと、上記ステップSF7の重
心計算結果に応じて重心座標を更新し、続いて、ステッ
プSF5においてレジスタXの値を歩進させる。
Then, for example, assume that the next read block attribute is "1". Then, step SF
The determination result of 4 is "YES", and the processing unit 40 advances the processing to step SF7. In step SF7, the block in which the chroma key is detected is regarded as a mass point, and the center of gravity is calculated by sequentially accumulating the ratio of the coordinates (X, Y) of this block and the area S. The area S is stored in the register S in the coordinate detection routine described above. Next, in step SF8, the barycentric coordinates are updated according to the barycentric calculation result in step SF7, and subsequently, in step SF5, the value of the register X is incremented.

【0066】ここで、1水平ライン分の読み出しが完了
したとすると、ステップSF6の判断結果が「YES」
となり、ステップSF9に進み、レジスタXの値をゼロ
リセットすると共に、レジスタYの値を1歩進させる。
次いで、ステップSF10に進むと、レジスタYの値が
「96」、つまり、1フレーム分の重心計算がなされた
か否かを判断する。そして、1フレーム分の重心計算が
完了していない場合には、判断結果が「NO」となり、
前述したステップSF3以降の処理を繰り返す。一方、
1フレーム分の重心計算が完了した時には、判断結果が
「YES」となり、このルーチンを終了してメインルー
チン(図9参照)に復帰する。
Here, if the reading of one horizontal line is completed, the result of the determination in step SF6 is "YES".
In step SF9, the value of register X is reset to zero and the value of register Y is incremented by one.
Next, in step SF10, it is determined whether or not the value of the register Y is "96", that is, whether the gravity center calculation for one frame has been performed. When the calculation of the center of gravity for one frame is not completed, the determination result is “NO”,
The processing from step SF3 onward is repeated. on the other hand,
When the calculation of the center of gravity for one frame is completed, the determination result is "YES", the routine is ended and the process returns to the main routine (see FIG. 9).

【0067】警告割込み処理ルーチンの動作 前述したように、座標検出ルーチンにおいて、レジスタ
Sに格納される面積値が所定値を超えると、処理部40
は、誤動作する虞があると見做してレジスタKFに格納
される警告フラグを「1」にセットする。この警告フラ
グが「1」になると、処理部40は図15に示す警告割
込み処理ルーチンを実行してステップSH1に処理を進
め、レジスタSTFに格納されるスタートフラグを
「0」に設定し、ゲーム動作を強制的に終了させる。こ
の後、ステップSH2において、警告フラグを「0」に
してメインルーチン(図9参照)に復帰する。
Operation of Warning Interrupt Processing Routine As described above, when the area value stored in the register S exceeds the predetermined value in the coordinate detection routine, the processing unit 40
Sets the warning flag stored in the register KF to "1", considering that there is a risk of malfunction. When this warning flag becomes "1", the processing unit 40 executes the warning interrupt processing routine shown in FIG. 15 and advances the processing to step SH1 to set the start flag stored in the register STF to "0", Force the operation to end. Then, in step SH2, the warning flag is set to "0" and the process returns to the main routine (see FIG. 9).

【0068】以上のように、位置検出処理部40では、
撮像部1側から供給されるサンプリング画像データDS
中に含まれるバットBAT像をクロマキー検出信号CR
Oに基づいて1フレーム毎に処理画面マップを作成し、
この処理画面マップから読み出したブロック属性に従っ
てバットBAT像とオブジェクト画像(ボール像)との
衝突座標位置や、処理画面におけるバットBAT像の左
端/右端座標および上端/下端座標を求めると共に、そ
の面積と重心位置とを算出する。加えて、処理部40
は、クロマキー検出された面積がゲームの誤動作を誘引
する程存在するか否かを判断し、その面積が所定値を超
えた時、ゲームが誤動作する虞があると見做して強制終
了させる。これにより、例えば、実画像中にバットBA
Tと同色で、かつ、それより面積の広い物体が存在する
場合や、前述した不感帯処理される物体が数多く存在す
る場合などでは、ゲーム動作を強制的に終了させるか
ら、誤動作を防止することが可能になる。
As described above, in the position detection processing section 40,
Sampling image data D S supplied from the imaging unit 1 side
The bat BAT image contained in the chroma key detection signal CR
Create a processing screen map for each frame based on O,
According to the block attribute read from the processing screen map, the collision coordinate position between the bat BAT image and the object image (ball image), the left end / right end coordinates and the upper end / lower end coordinates of the bat BAT image on the processing screen are obtained, and The position of the center of gravity is calculated. In addition, the processing unit 40
Judges whether or not the area detected by the chroma key exists so as to induce a malfunction of the game, and when the area exceeds a predetermined value, it is considered that the game may malfunction, and is forced to end. Thereby, for example, the bat BA in the actual image
When there is an object that is the same color as T and has a larger area than that, or when there are many objects to be subjected to the dead zone processing described above, the game operation is forcibly ended, so that malfunction can be prevented. It will be possible.

【0069】(2)制御部50(CPU51)の動作 次に、上述した位置検出処理部40から供給される各種
データに基づいて画像処理部30、第1音源回路55b
および第2音源回路56を制御してゲーム進行を管理す
るCPU51の動作について図16〜図26を参照して
説明する。以下では、CPU51の概略動作としてCP
Uメインルーチンについて説明した後、各種割込み処理
ルーチンについて説明する。続いて、この後に第1およ
び第2音源回路55b,56においてなされる音源処理
ルーチンについて説明する。
(2) Operation of control unit 50 (CPU 51) Next, based on various data supplied from the position detection processing unit 40 described above, the image processing unit 30 and the first sound source circuit 55b.
The operation of the CPU 51 that controls the second sound source circuit 56 and manages the progress of the game will be described with reference to FIGS. In the following, CP will be described as a general operation of the CPU 51.
After describing the U main routine, various interrupt processing routines will be described. Subsequently, a sound source processing routine performed in the first and second sound source circuits 55b and 56 after this will be described.

【0070】メインルーチンの動作 まず、装置本体2に電源が投入されると、CPU51は
ROM53に記憶されたオペレーションシステムプログ
ラムを読み出してロードした後、図16に示すCPUメ
インルーチンを実行し、ステップSG1に処理を進め
る。ステップSG1では、RAM52に確保される各種
レジスタを初期化すると共に、VDP31および位置検
出処理部40へイニシャライズを指定する制御信号SC
を供給する。次いで、ステップSG2に進むと、各部へ
割込み許可を与える制御信号SCを供給する一方、自身
の割込みマスクを解除した後、CPU51内部に設けら
れる監視タイマWT(後述する)をスタートさせ、次の
ステップSG3に進む。
Operation of Main Routine First, when the apparatus main body 2 is powered on, the CPU 51 reads out and loads the operation system program stored in the ROM 53, and then executes the CPU main routine shown in FIG. 16, and step SG1 Proceed to. In step SG1, various registers secured in the RAM 52 are initialized, and a control signal SC for instructing the VDP 31 and the position detection processing unit 40 to initialize is provided.
To supply. Next, when proceeding to step SG2, while supplying the control signal SC which gives the interrupt permission to each part, after canceling the interrupt mask of itself, the monitoring timer WT (described later) provided inside the CPU 51 is started, and the next step Proceed to SG3.

【0071】ステップSG3に進むと、ゲームカートリ
ッジ55に内蔵されるROM55aからアプリケーショ
ンプログラムを読み出し、RAM52の所定記憶エリア
に展開する。次に、CPU51は、ステップSG4〜ス
テップSG6を介してゲーム開始当初に表示される初期
画面を形成する。すなわち、ステップSG4に進むと、
CPU51は初期画面背景を形成するバックグラウンド
画像データDBGをVDP31へDMA転送するため、D
MAコントローラに転送先アドレスおよび転送元アドレ
スをセットする。なお、DMA転送は、ディスプレイ3
(図1参照)側の垂直帰線期間に同期した転送割込み処
理により行われる。転送命令がセットされたDMAコン
トローラは、CPU51の指示の下、ROM55a(図
3参照)から転送元アドレスに対応するバックグラウン
ド画像データDBGを読み出してVDP31(VRAM3
2)へDMA転送する。こうした割込み処理については
追って説明する。
When proceeding to step SG3, the application program is read from the ROM 55a incorporated in the game cartridge 55 and is expanded in a predetermined storage area of the RAM 52. Next, the CPU 51 forms an initial screen displayed at the beginning of the game through steps SG4 to SG6. That is, when the process proceeds to step SG4,
Since the CPU 51 DMA-transfers the background image data D BG forming the initial screen background to the VDP 31,
The transfer destination address and the transfer source address are set in the MA controller. In addition, the DMA transfer is performed by the display 3
(See FIG. 1) This is performed by transfer interrupt processing synchronized with the vertical blanking period on the side. The DMA controller in which the transfer instruction is set reads the background image data D BG corresponding to the transfer source address from the ROM 55a (see FIG. 3) under the instruction of the CPU 51, and reads the VDP31 (VRAM3).
DMA transfer to 2). Such interrupt processing will be described later.

【0072】次いで、ステップSG5に進むと、CPU
51は、バックグラウンド画像BG上に表示されるオブ
ジェクト画像データDOBをVDP31へDMA転送する
ため、DMAコントローラに転送先アドレスおよび転送
元アドレスをセットする。続いて、ステップSG6で
は、当該データDOBに対応するオブジェクトテーブルデ
ータTOBの転送先アドレスおよび転送元アドレスをDM
Aコントローラにセットする。このオブジェクトテーブ
ルデータTOBは、初期画面におけるオブジェクト画像デ
ータDOBの表示位置を指定するものであって、オブジェ
クトテーブルRAM31f(図9参照)に格納される。
Next, when proceeding to step SG5, the CPU
The reference numeral 51 sets the transfer destination address and the transfer source address in the DMA controller in order to DMA transfer the object image data D OB displayed on the background image BG to the VDP 31. Subsequently, in step SG6, the transfer destination address and the transfer source address of the object table data T OB corresponding to the data D OB are DM.
Set it on the A controller. The object table data T OB specifies the display position of the object image data D OB on the initial screen, and is stored in the object table RAM 31f (see FIG. 9).

【0073】次に、ステップSG7に進むと、レジスタ
ACKFに格納される転送フラグFを「1」にセット
し、次のステップSG8へ処理を進める。なお、レジス
タACKFにセットされる転送フラグFとは、DMAコ
ントローラに転送セットされたデータがDMA転送され
たか否かを表わすものであり、当該フラグFが「0」の
時にDMA転送完了の旨を表わし、「1」の時に未転送
状態を表わしている。そして、ステップSG8では、転
送フラグFが「0」になる迄、すなわち、後述する転送
割込み処理ルーチンによってDMA転送が完了するまで
待機する。
Next, when proceeding to step SG7, the transfer flag F stored in the register ACKF is set to "1", and the process proceeds to the next step SG8. The transfer flag F set in the register ACKF indicates whether or not the data set and transferred in the DMA controller is DMA-transferred. When the flag F is "0", it indicates that the DMA transfer is completed. When it is "1", it represents a non-transfer state. Then, in step SG8, the process waits until the transfer flag F becomes “0”, that is, until the DMA transfer is completed by the transfer interrupt processing routine described later.

【0074】そして、DMA転送が完了して初期画面が
形成されると、CPU51はステップSG9に処理を進
め、スタートイベントが発生したか否かを判断する。こ
こで言うスタートイベントとは、装置本体2の操作パネ
ルに配設されるスタートスイッチがオン操作された時に
発生するイベントである。そして、遊戯者がゲーム動作
を開始させるため、当該スタートスイッチをオン操作す
ると、上記スタートイベントが生成されるから、ここで
の判断結果が「YES」となり、ステップSG10へ処
理を進める。ステップSG10では、レジスタtをゼロ
リセットし、続いて、ステップSG11に進み、レジス
タSTFに「1」をセットして次のステップSG12へ
処理を進める。一方、スタートイベントが生成されない
場合には、上記ステップSG9の判断結果が「NO」と
なり、ステップSG12へ進む。なお、上述したレジス
タtにはゲーム進行を管理するタイムカウント値が後述
する割込み動作によってセットされるようになってい
る。
When the DMA transfer is completed and the initial screen is formed, the CPU 51 advances the processing to step SG9, and determines whether or not a start event has occurred. The start event mentioned here is an event that occurs when a start switch provided on the operation panel of the apparatus body 2 is turned on. Then, when the player turns on the start switch in order to start the game operation, the start event is generated. Therefore, the determination result here is "YES", and the process proceeds to step SG10. In step SG10, the register t is reset to zero, then the process proceeds to step SG11, "1" is set in the register STF, and the process proceeds to the next step SG12. On the other hand, when the start event is not generated, the determination result of step SG9 is “NO”, and the process proceeds to step SG12. A time count value for managing the progress of the game is set in the above-mentioned register t by an interrupt operation described later.

【0075】ステップSG12では、レジスタSTFの
値が「1」、すなわち、ゲーム開始か否かを表わすスタ
ートフラグがゲーム開始状態にセットされたか否かを判
断する。ここで、「1」がセットされていなければ、判
断結果が「NO」となり、スタートイベントが生成され
るまで上述したステップSG9〜SG11を繰り返す。
そして、スタートイベントが発生すると、ステップSG
12の判断結果が「YES」となり、CPU51は図1
7に示すステップSG13へ処理を進める。ステップS
G13では、レジスタACKFにセットされる転送フラ
グFが「0」であるか否かを判断する。ここで、DMA
転送が完了している場合、当該フラグFは「0」である
から、ステップSG13の判断結果が「YES」とな
り、ステップSG14に進む。
In step SG12, it is determined whether or not the value of the register STF is "1", that is, whether or not the start flag indicating whether or not the game has started is set to the game start state. Here, if "1" is not set, the determination result becomes "NO", and steps SG9 to SG11 described above are repeated until a start event is generated.
When the start event occurs, step SG
The determination result of 12 is "YES", and the CPU 51 causes the CPU of FIG.
The process proceeds to step SG13 shown in FIG. Step S
At G13, it is determined whether the transfer flag F set in the register ACKF is "0". Where DMA
When the transfer is completed, the flag F is “0”, so the determination result of step SG13 is “YES”, and the process proceeds to step SG14.

【0076】ステップSG14では、レジスタtに格納
されるタイムカウント値に基づき、対応するオブジェク
トテーブルデータTOBを演算する。これにより、オブジ
ェクト画像データDOBの表示位置が定まる。この場合、
オブジェクト画像データDOBは、「投手」を模したキャ
ラクタ像と、このキャラクタ像が持つ「ボール像」とか
ら形成される。次に、ステップSG15に進むと、CP
U51は予めVDP31側へDMA転送した複数のオブ
ジェクト画像データDOBの内から、レジスタtのタイム
カウント値に対応した画像データDOBを指定する。この
結果、ゲーム画面においてテーブルデータTOBで指定さ
れた位置に対応するオブジェクト画像データDOBが表示
される。
In step SG14, the corresponding object table data T OB is calculated based on the time count value stored in the register t. As a result, the display position of the object image data D OB is determined. in this case,
The object image data D OB is formed of a character image simulating a “pitcher” and a “ball image” of this character image. Next, when proceeding to step SG15, CP
U51 designates the image data D OB corresponding to the time count value of the register t from among the plurality of object image data D OB DMA-transferred to the VDP 31 side in advance. As a result, the object image data D OB corresponding to the position designated by the table data T OB on the game screen is displayed.

【0077】以上のようにしてゲーム画面が形成される
と、CPU51はステップSG16に進み、レジスタA
CKFに格納される転送フラグFを「1」にセットし、
ステップSG17に進む。なお、上述したステップSG
13において判断結果が「NO」の場合、つまり、既に
オブジェクトテーブルデータTOBがDMA転送されてい
る時にはステップSG17へ処理を進める。ステップS
G17では、ストップイベントが発生したか否かを判断
する。ストップイベントとは、装置本体2の操作パネル
に配設されるストップスイッチがオン操作された時に発
生するイベントである。そして、遊戯者がゲームを停止
させるため、当該ストップスイッチをオン操作すると、
上記ストップイベントが生成され、ここでの判断結果が
「YES」となり、ステップSG18へ進む。
When the game screen is formed as described above, the CPU 51 proceeds to step SG16 to register A
Set the transfer flag F stored in CKF to "1",
It proceeds to step SG17. Incidentally, the above-mentioned step SG
If the determination result in 13 is "NO", that is, if the object table data T OB has already been DMA-transferred, the process proceeds to step SG17. Step S
At G17, it is determined whether a stop event has occurred. The stop event is an event that occurs when a stop switch provided on the operation panel of the apparatus body 2 is turned on. Then, when the player turns on the stop switch to stop the game,
The stop event is generated, the determination result here is “YES”, and the process proceeds to step SG18.

【0078】ステップSG18では、レジスタSTFに
格納されるスタートフラグを「0」にセットしてゲーム
動作を停止させる。この後、CPU51は前述したステ
ップSG9〜SG17の動作を繰り返す。一方、上記ス
テップSG17において、ストップスイッチがオン操作
されない場合には、ここでの判断結果が「NO」とな
り、ステップSG19へ処理を進める。ステップSG1
9では、レジスタtに格納されるタイムカウント値が所
定値Tに達したか否かを判断する。ここで、タイムカウ
ント値がゲーム終了時間に相当する所定値Tに達してい
ない場合には、判断結果が「NO」となり、ステップS
G9(図16参照)へ処理を戻す。これに対し、タイム
カウント値が所定値Tに達した場合には、ステップSG
20を介してレジスタtに格納されるタイムカウント値
をゼロリセットした後、図16に示すステップSG9へ
処理を戻す。
In step SG18, the start flag stored in the register STF is set to "0" to stop the game operation. After that, the CPU 51 repeats the operations of steps SG9 to SG17 described above. On the other hand, if the stop switch is not turned on in step SG17, the determination result here is "NO", and the process proceeds to step SG19. Step SG1
At 9, it is determined whether or not the time count value stored in the register t has reached the predetermined value T. Here, if the time count value has not reached the predetermined value T corresponding to the game end time, the determination result is “NO”, and step S
The process is returned to G9 (see FIG. 16). On the other hand, when the time count value reaches the predetermined value T, step SG
After zero resetting the time count value stored in the register t via 20, the process is returned to step SG9 shown in FIG.

【0079】割込み処理ルーチンの動作 次に、図18〜図26を参照し、CPU51において実
行される各種割込み処理ルーチンの動作について説明す
る。 a.転送割込み処理ルーチンの動作 CPU51は、クロックドライバ12(図3参照)から
垂直帰線信号が供給される毎にDMAコントローラ(図
示略)へ転送指示を与えると共に、図18に示す転送割
込み処理ルーチンを実行する。まず、ステップSJ1で
は、レジスタACKFに格納される転送フラグFが
「1」、つまり、前述したステップSG6(図16参
照)においてDMA転送セットされたオブジェクトテー
ブルデータTOBが未転送状態にあるか否かを判断する。
ここで、当該データTOBが既にDMA転送済みである
と、転送フラグFは「0」になっているから、判断結果
は「NO」となり、一旦、このルーチンを完了する。
Operations of Interrupt Processing Routine Next, operations of various interrupt processing routines executed by the CPU 51 will be described with reference to FIGS. a. Operation of Transfer Interrupt Processing Routine The CPU 51 gives a transfer instruction to the DMA controller (not shown) each time a vertical blanking signal is supplied from the clock driver 12 (see FIG. 3), and executes the transfer interrupt processing routine shown in FIG. Run. First, in step SJ1, the transfer flag F stored in the register ACKF is "1", that is, whether or not the object table data T OB set by the DMA transfer in step SG6 (see FIG. 16) is in the untransferred state. To judge.
Here, if the data T OB has already been DMA-transferred, the transfer flag F is set to “0”, the determination result is “NO”, and this routine is once completed.

【0080】一方、オブジェクトテーブルデータTOB
未転送状態にあると、判断結果は「YES」となり、C
PU51は次のステップSJ2へ処理を進める。ステッ
プSJ2では、タイムカウント値に基づき、ゲームが開
始された直後であるか否かを判断する。ここで、スター
ト直後であれば、判断結果は「YES」となり、次のス
テップSJ3へ進む。ステップSJ3では、DMAコン
トローラに対し、バックグラウンド画像データDBGをV
DP31へDMA転送するよう指示してステップSJ4
へ進む。一方、上記ステップSJ2において、スタート
直後でなければ、判断結果が「NO」となり、ステップ
SJ4へ処理を進める。
On the other hand, if the object table data T OB is in the untransferred state, the result of the judgment is “YES”, and C
The PU 51 advances the process to the next step SJ2. In step SJ2, it is determined based on the time count value whether or not the game has just started. Here, immediately after the start, the determination result is "YES", and the process proceeds to the next step SJ3. In step SJ3, the background image data D BG is set to V for the DMA controller.
Instruct the DP 31 to perform the DMA transfer, and then step SJ4
Go to. On the other hand, if it is not immediately after the start in step SJ2, the determination result is “NO”, and the process proceeds to step SJ4.

【0081】ステップSJ4では、DMAコントローラ
に対し、オブジェクト画像データD OBをVDP31側へ
DMA転送するよう指示し、続くステップSJ5では当
該データDOBに対応するオブジェクトテーブルデータT
OB2のDMA転送を指示する。次いで、ステップSJ6
に進むと、CPU51はレジスタACKFに格納される
転送フラグFを「0」として転送完了を表わし、このル
ーチンを完了する。このように、転送割込み処理ルーチ
ンにあっては、レジスタACKFにセットされる転送フ
ラグFに応じてDMA転送セットされる各種データを順
次転送させている。
In step SJ4, the DMA controller
In contrast, the object image data D OBTo VDP31 side
The DMA transfer is instructed, and in the subsequent step SJ5,
The data DOBObject table data T corresponding to
OB2 DMA transfer is instructed. Then, step SJ6
When the processing advances to, the CPU 51 stores in the register ACKF.
The transfer flag F is set to "0" to indicate that the transfer is completed.
Complete the routine. In this way, the transfer interrupt handling routine
The transfer flag set in the register ACKF
Various data to be DMA-transfer-set according to the lag F
Next transfer.

【0082】b.衝突割込み処理ルーチンの動作 CPU51では、ゲーム進行に応じたタイムカウント値
に基づいてゲーム画面を形成するオブジェクト画像デー
タDOBおよびオブジェクトテーブルデータTOBを順次D
MA転送するよう制御しており、一方、VDP31側で
はこれらデータDOB,TOBに対応するオブジェクト画像
OBJとバックグラウンド画像BGとを合成し、時々刻
々変化するCG画像を生成する。この時、位置検出処理
部40では、前述した衝突座標検出処理ルーチン(図1
2参照)の動作に基づき、「バット像」と「ボール像」
との衝突の有無を随時検出する。そして、位置検出処理
部40が衝突を検出した場合、衝突フラグCFを「1」
に設定することにより、CPU51は図19に示す衝突
割込み処理ルーチンを実行し、ステップSK1へ処理を
進める。
B. Operation of Collision Interrupt Processing Routine In the CPU 51, the object image data D OB and the object table data T OB forming the game screen are sequentially D based on the time count value according to the progress of the game.
MA transfer is controlled, and on the other hand, on the VDP 31 side, the object image OBJ corresponding to these data D OB and T OB and the background image BG are combined to generate a CG image that changes from moment to moment. At this time, in the position detection processing unit 40, the above-described collision coordinate detection processing routine (see FIG.
2)) "Bat image" and "Ball image"
The presence or absence of a collision with is detected at any time. When the position detection processing unit 40 detects a collision, the collision flag CF is set to "1".
By setting to, the CPU 51 executes the collision interruption processing routine shown in FIG. 19, and advances the processing to step SK1.

【0083】まず、ステップSK1では、レジスタtに
セットされるタイムカウント値が所定値T1〜T2の範囲
に収っているか否かを判断する。タイムカウント値は、
ゲーム開始直後からカウントされ、ゲーム進行を管理す
る値である。また、ここで言う所定値T1〜T2とは、
「バット像」と「ボール像」とがミートする際の有効期
間を指す。つまり、このステップSK1では、「バット
像」と「ボール像」とが衝突したタイミングがミートの
有効期間内にあるか否かを判断している。ここで、例え
ば、遊戯者がバットBATを早目に振ったり、振り遅れ
たりすると、衝突したタイミングがミートの有効期間を
外すことになるから、判断結果は「NO」となり、この
ルーチンを完了する。
First, in step SK1, it is judged whether or not the time count value set in the register t is within the range of predetermined values T 1 to T 2 . The time count value is
This value is counted immediately after the start of the game and manages the progress of the game. Further, the predetermined value T 1 to T 2 referred to here is
It refers to the effective period when the "bat image" and the "ball image" meet. That is, in this step SK1, it is determined whether or not the timing at which the “bat image” and the “ball image” collide is within the effective period of the meet. Here, for example, if the player swings the bat BAT early or delays the swing, the timing of the collision will fall outside the effective period of the meet, so the determination result is "NO", and this routine is completed. .

【0084】これに対し、衝突したタイミングがミート
の有効期間内にあると、判断結果は「YES」となり、
次のステップSK2へ処理を進める。ステップSK2で
は、クロマキー検出された「バットBAT像」の重心位
置、すなわち、位置検出処理部40のワークRAMにお
ける重心座標エリアE9から重心座標を取り込む。次い
で、ステップSK3に進むと、オブジェクト画像データ
OBから形成される「ボール像」の重心位置と、クロマ
キー検出された「バットBAT像」の重心位置との対応
関係を判定する。ここで、両者の重心位置が一致した場
合には、ステップSK4に進み、後述する第1画像処理
ルーチンが実行される。また、「ボール像」の重心が
「バットBAT像」の重心より下方に位置する場合に
は、ステップSK5に進み、後述する第2画像処理ルー
チンが実行される。さらに、「ボール像」の重心が「バ
ットBAT像」の重心より上方に位置する場合には、ス
テップSK6に進み、後述する第3画像処理ルーチンが
実行される。そして、これらの画像処理ルーチンの実行
が終了すると、ステップSK7において衝突フラグCF
を「0」にする。
On the other hand, if the collision timing is within the valid period of the meet, the determination result is "YES",
The process proceeds to the next step SK2. In step SK2, the barycentric position of the “bat BAT image” detected by the chroma key, that is, the barycentric coordinate from the barycentric coordinate area E9 in the work RAM of the position detection processing unit 40 is fetched. Next, in step SK3, the correspondence between the center of gravity of the “ball image” formed from the object image data D OB and the center of gravity of the “bat BAT image” detected by the chroma key is determined. Here, if the barycentric positions of both agree with each other, the process proceeds to step SK4, and a first image processing routine described later is executed. If the center of gravity of the “ball image” is located below the center of gravity of the “bat BAT image”, the process proceeds to step SK5 and the second image processing routine described later is executed. Further, when the center of gravity of the “ball image” is located above the center of gravity of the “bat BAT image”, the process proceeds to step SK6, and the third image processing routine described later is executed. When the execution of these image processing routines is completed, the collision flag CF is determined in step SK7.
To "0".

【0085】c.画像処理ルーチンの動作 次に、上記第1〜第3画像処理ルーチンの動作について
図21〜図23を参照して説明する。図21は、これら
第1〜第3画像処理ルーチンの処理内容を共通化したフ
ロチャートである。まず、ステップSL1では、レジス
タtに格納されるタイムカウント値に基づいてオブジェ
クト画像データDOB(「ボール像」)の表示位置を演算
し、続いて、ステップSL2では、当該タイムカウント
値に応じたオブジェクト画像データDOBを指定する。
C. Operation of Image Processing Routine Next, the operation of the first to third image processing routines will be described with reference to FIGS. FIG. 21 is a flowchart in which the processing contents of these first to third image processing routines are shared. First, in step SL1, the display position of the object image data D OB (“ball image”) is calculated based on the time count value stored in the register t. Then, in step SL2, the display position is determined according to the time count value. Object image data D OB is designated.

【0086】したがって、第1画像処理ルーチンにあっ
ては、「ボール像」の重心と「バットBAT像」の重心
とが一致する態様であるから、実際のバッティングと同
様に、例えば、”ホームラン”となるように「ボール
像」をCG画像中で表示する。また、第2画像処理ルー
チンでは、図22に図示するように、「ボール像」の重
心が「バットBAT像」の重心より下方に位置するバッ
ティングとなるので、例えば、”ゴロ”となるように
「ボール像」をCG画像中で表示する。さらに、第3画
像処理ルーチンでは、図23に図示するように、「ボー
ル像」の重心が「バットBAT像」の重心より上方に位
置するバッティングとなるので、例えば、”フライ”と
なるように「ボール像」をCG画像中で表示する。
Therefore, in the first image processing routine, since the center of gravity of the "ball image" and the center of gravity of the "bat BAT image" are in agreement, as in the actual batting, for example, "home run". The “ball image” is displayed in the CG image so that Further, in the second image processing routine, as shown in FIG. 22, the center of gravity of the “ball image” is the batting located below the center of gravity of the “bat BAT image”, so that, for example, “goro” is set. The "ball image" is displayed in the CG image. Further, in the third image processing routine, as shown in FIG. 23, since the center of gravity of the “ball image” is the batting located above the center of gravity of the “bat BAT image”, for example, “fly” is set. The "ball image" is displayed in the CG image.

【0087】このようにして、「ボール像」の重心位置
と「バットBAT像」の重心位置との対応関係に応じた
CG画像を生成すると、CPU51はステップSL3に
処理を進める。ステップSL3では、レジスタtに格納
されるタイムカウント値がゲーム終了値ENDに達した
か否かを判断する。ここで、タイムカウント値が当該ゲ
ーム終了値ENDに達した場合には、判断結果が「YE
S」となり、ステップSL4に進み、タイムカウント値
をゼロリセットしてこのルーチンを完了する。
In this way, when the CG image is generated according to the correspondence relationship between the barycentric position of the "ball image" and the barycentric position of the "bat BAT image", the CPU 51 advances the process to step SL3. In step SL3, it is determined whether or not the time count value stored in the register t has reached the game end value END. Here, when the time count value reaches the game end value END, the determination result is “YE
S ”, the process proceeds to step SL4, the time count value is reset to zero, and this routine is completed.

【0088】一方、タイムカウント値がゲーム終了値E
NDに満たない場合には、上記ステップSL3の判断結
果が「NO」となり、ステップSL5に進む。ステップ
SL5では、ストップイベントが発生したか否かを判断
する。ここで、ストップイベントが発生していない場合
には、判断結果が「NO」となり、上述したステップS
L1〜SL3を繰り返す。これに対して、ストップスイ
ッチのオン操作によりストップイベントが発生すると、
判断結果が「YES」となって、ステップSL6に進
み、レジスタSTFに格納されるスタートフラグを
「0」にセットし、ゲーム終了の旨を表わしてこのルー
チンを完了する。
On the other hand, the time count value is the game end value E.
If it is less than ND, the result of the determination in step SL3 is "NO", and the process proceeds to step SL5. In step SL5, it is determined whether or not a stop event has occurred. Here, if the stop event has not occurred, the determination result is “NO”, and the above-described step S
Repeat L1 to SL3. On the other hand, when a stop event occurs by turning on the stop switch,
When the result of the determination is "YES", the flow proceeds to step SL6, the start flag stored in the register STF is set to "0", the game is terminated, and this routine is completed.

【0089】d.タイマインタラプト処理ルーチン 次に、ゲーム進行を管理するタイムカウント値を発生す
るタイマインタラプト処理ルーチンの動作について図2
0を参照して説明する。CPU51は、システムクロッ
ク回路24から供給されるシステムクロックに基づき、
所定周期毎に本ルーチンを起動し、ステップSM1を実
行し、レジスタtに格納されるタイムカウント値を1イ
ンクリメントして歩進させている。
D. Timer Interrupt Processing Routine Next, the operation of the timer interrupt processing routine for generating a time count value for managing the progress of the game will be described with reference to FIG.
This will be described with reference to 0. The CPU 51, based on the system clock supplied from the system clock circuit 24,
This routine is started every predetermined period, step SM1 is executed, and the time count value stored in the register t is incremented by 1 to advance.

【0090】e.監視タイマカウント処理ルーチンの動
作 次に、図24を参照して監視タイマカウント処理ルーチ
ンの動作について説明する。この監視タイマカウント処
理は、後述する音源処理に関与するものである。CPU
51は、第1および第2音源回路55b,56(図3参
照)の動作を規制する監視タイマWTを備えている。C
PU51は、一定周期毎に本ルーチンを実行し、図24
に示すステップSN1に処理を進める。ステップSN1
では、監視タイマ値をインクリメントし、続いて、ステ
ップSN2では、そのタイマ値がオーバーフローしたか
否かを判断する。ここで、オーバーフローが発生してい
ない場合には、判断結果が「NO」となり、一旦、この
ルーチンを完了する。一方、オーバーフローが発生した
時には、判断結果が「YES」となり、ステップSN3
に進み、レジスタOVFに格納されるオーバーフローフ
ラグを「1」にセットしてこのルーチンを完了する。
E. Operation of Monitor Timer Count Processing Routine Next, the operation of the monitor timer count processing routine will be described with reference to FIG. This monitoring timer count processing is involved in sound source processing described later. CPU
The 51 is provided with a monitoring timer WT that regulates the operations of the first and second tone generator circuits 55b and 56 (see FIG. 3). C
The PU 51 executes this routine at regular intervals.
The process proceeds to step SN1 shown in. Step SN1
Then, the monitoring timer value is incremented, and subsequently, in step SN2, it is determined whether or not the timer value overflows. If no overflow has occurred, the determination result is "NO", and this routine is once completed. On the other hand, when an overflow occurs, the determination result is “YES”, and step SN3
And the overflow flag stored in the register OVF is set to "1" to complete this routine.

【0091】f.オーバーフロー割込み処理ルーチンの
動作 次に、図25を参照してオーバーフロー割込み処理ルー
チンの動作について説明する。オーバーフロー割込み処
理は、上記監視タイマカウント処理において、レジスタ
OVFに格納されるオーバーフローフラグが「1」とな
った場合に起動されてステップSO1を実行し、CPU
51の動作をホルト状態としてこのルーチンを完了す
る。
F. Operation of Overflow Interrupt Processing Routine Next, the operation of the overflow interrupt processing routine will be described with reference to FIG. The overflow interrupt process is started when the overflow flag stored in the register OVF becomes "1" in the above-mentioned monitoring timer count process, and executes step SO1 to execute the CPU
This routine is completed by setting the operation of 51 to the halt state.

【0092】g.音源要求割込みルーチンの動作 図26を参照して音源要求割込み処理ルーチンの動作に
ついて説明する。CPU51は、第1および第2音源回
路55b,56からデータ要求信号が供給される毎にこ
のルーチンを実行してステップSP1へ処理を進める。
ステップSP1では、上述した監視タイマWTをリセッ
トし、続いて、ステップSP2に進むと、第1および第
2音源回路55b,56へ楽音制御データを転送する。
この楽音制御データとは、ゲーム進行に対応して発生す
べき楽音の音高、音色および音量等を指定する情報であ
る。なお、発生すべき楽音が存在しない時には、「デー
タ無し」を表わす楽音制御データを第1および第2音源
回路55b,56に供給するようにしている。
G. Operation of Sound Source Request Interrupt Routine The operation of the sound source request interrupt processing routine will be described with reference to FIG. The CPU 51 executes this routine each time a data request signal is supplied from the first and second tone generator circuits 55b and 56, and advances the processing to step SP1.
In step SP1, the above-mentioned monitoring timer WT is reset, and subsequently in step SP2, the musical tone control data is transferred to the first and second tone generator circuits 55b and 56.
This tone control data is information that specifies the pitch, tone color, volume, etc. of a tone that should be generated corresponding to the progress of the game. When there is no musical tone to be generated, musical tone control data representing "no data" is supplied to the first and second tone generator circuits 55b and 56.

【0093】音源処理ルーチンの動作 次に、CPU51の制御の下にゲーム効果音を楽音合成
する第1および第2音源回路55b,56の動作につい
て図27を参照して説明する。なお、ゲームカートリッ
ジ55に内蔵される第1音源回路55bは、CPU51
側から供給される楽音制御データに基づき、ゲーム動作
に対応したゲーム効果音を合成し、これを楽音信号とし
て出力する。一方、第2音源回路56も同様に、CPU
51側から供給される楽音制御データに基づき、ゲーム
進行に対応した楽曲、例えば、オープニングやエンディ
ング等の楽曲を楽音合成して出力する。
Operation of Sound Source Processing Routine Next, the operation of the first and second sound source circuits 55b and 56 for synthesizing a musical effect sound under the control of the CPU 51 will be described with reference to FIG. The first tone generator circuit 55b built in the game cartridge 55 is the CPU 51
Based on the tone control data supplied from the side, a game sound effect corresponding to the game operation is synthesized and output as a tone signal. On the other hand, the second sound source circuit 56 similarly has a CPU.
Based on the musical sound control data supplied from the 51 side, musical compositions corresponding to the progress of the game, for example, musical compositions such as opening and ending are synthesized and outputted.

【0094】これら第1および第2音源回路55b,5
6は、装置本体2の電源が投入されると、ステップSQ
1に進み、各種レジスタをリセットしたり、初期値を設
定する等のイニシャライズを行う。次いで、ステップS
Q2に進むと、レジスタREQに「1」をセットする。
これにより、回路55b,56は、CPU51へデータ
要求信号を送出する。なお、このデータ要求信号を受け
たCPU51は、上述した音源要求割込みルーチンを実
行して監視タイマWTをリセットすると共に、第1およ
び第2音源回路55b,56へ楽音制御データを転送す
る。
These first and second tone generator circuits 55b, 5
When the power of the device body 2 is turned on, the step 6 is step SQ.
The process proceeds to 1 to initialize various registers, reset various registers, and set initial values. Then, step S
When proceeding to Q2, "1" is set in the register REQ.
As a result, the circuits 55b and 56 send a data request signal to the CPU 51. The CPU 51, which has received the data request signal, executes the above-described tone generator request interrupt routine to reset the monitoring timer WT and transfers the tone control data to the first and second tone generator circuits 55b and 56.

【0095】こうしてCPU51側から楽音制御データ
を受けると、ステップSQ3の判断結果が「YES」と
なり、次のステップSQ4へ処理を進める。ステップS
Q4では、転送されるデータが安定するまで待機し、デ
ータ安定となった時点、つまり、楽音制御データの受信
が完了すると、ここでの判断結果が「YES」となり、
ステップSQ5に処理を進める。そして、ステップSQ
5では、レジスタREQに「0」をセットし、データ要
求信号の送出を停止する。次いで、ステップSQ6に進
むと、受領した楽音制御データの内容を解釈し、ゲーム
進行に対応して発生すべき楽音の音高、音色および音量
等を指定するイベントデータに変換する。そして、ステ
ップSQ7では、このイベントデータに応じた楽音信号
を作成し、この後、再び上記ステップSQ2以降を繰り
返す。
When the tone control data is received from the CPU 51 side in this way, the result of the determination in step SQ3 is "YES", and the process proceeds to the next step SQ4. Step S
In Q4, the process waits until the data to be transferred becomes stable, and when the data becomes stable, that is, when the reception of the musical tone control data is completed, the determination result here becomes "YES",
The process proceeds to step SQ5. And step SQ
At 5, the register REQ is set to "0" and the transmission of the data request signal is stopped. Next, in step SQ6, the content of the received musical tone control data is interpreted and converted into event data that specifies the pitch, tone color, volume, etc. of the musical tone to be generated in accordance with the progress of the game. Then, in step SQ7, a tone signal corresponding to this event data is created, and thereafter, step SQ2 and subsequent steps are repeated again.

【0096】しかして、このルーチンの動作によれば、
第1および第2音源回路55b,56は、随時、CPU
51側に対してデータ要求信号を送出し、一方、CPU
51側ではこのデータ要求信号に対応して楽音制御デー
タを回路55b,56へ返送する。そして、楽音制御デ
ータを受けた回路55b,56は、当該データに応じた
楽音を合成する。したがって、例えば、単に、アプリケ
ーションプログラムをコピーしたROM55aだけを内
蔵するゲームカートリッジ55に基づいてゲーム動作さ
せると、当該カートリッジ55aに内蔵されるべき第1
音源回路55bが存在しないから、この回路55bから
CPU51へデータ要求信号が送出されないことにな
る。そうすると、CPU51は前述した音源要求割込み
処理ルーチンを実行せず、この結果、監視タイマWTを
リセットしない上、音源回路55b,56へ楽音制御デ
ータを送出しないことになる。そして、監視タイマWT
がリセットされずにオーバーフロー状態になると、前述
したオーバーフロー割込み処理ルーチン(図25参照)
に基づき、自身(CPU51)を停止させる。
However, according to the operation of this routine,
The first and second sound source circuits 55b and 56 are CPUs at any time.
A data request signal is sent to the 51 side, while the CPU
On the 51 side, musical tone control data is returned to the circuits 55b and 56 in response to the data request signal. Then, the circuits 55b and 56 which have received the tone control data synthesize the tone corresponding to the data. Therefore, for example, when the game operation is performed based on the game cartridge 55 that only has the ROM 55a in which the application program has been copied, the first cartridge that should be incorporated in the cartridge 55a
Since the tone generator circuit 55b does not exist, the data request signal is not sent from this circuit 55b to the CPU 51. Then, the CPU 51 does not execute the sound source request interrupt processing routine described above, and as a result, the monitoring timer WT is not reset and the tone control data is not sent to the sound source circuits 55b and 56. And the monitoring timer WT
If an overflow occurs without being reset, the above-mentioned overflow interrupt processing routine (see FIG. 25)
Based on the above, it stops itself (CPU 51).

【0097】以上説明したように、本実施例において
は、実画像からクロマキー検出された面積が所定値を超
えた場合、例えば、実画像中にバットBATと同色で、
かつ、それより面積の広い物体が存在する場合や、前述
した不感帯処理される物体が数多く存在する場合には、
ゲーム動作を正常に行えず、誤動作する虞があると見做
して強制的にゲームを終了させるようにしたから、検出
対象以外の物体が撮像画像中に存在した時の誤動作を防
止し得る訳である。この結果、ゲーム動作中に誤動作を
起こすという不具合を事前に回避することができる。
As described above, in the present embodiment, when the area detected by chroma key detection from the actual image exceeds a predetermined value, for example, in the actual image, the same color as the bat BAT,
And, when there is an object having a larger area than that, or when there are many objects to be subjected to the dead zone processing described above,
The game operation is not normally performed, and the game is forcibly ended on the assumption that it may malfunction, so it is possible to prevent malfunction when an object other than the detection target is present in the captured image. Is. As a result, it is possible to avoid in advance a problem that a malfunction occurs during the game operation.

【0098】なお、上述した実施例にあっては、クロマ
キー検出された面積が所定値を超えた場合に一意的にゲ
ームを強制終了させているが、強制終了させる際に遊戯
者にゲーム停止を知らせる画像を発生するようにしても
良い。また、この実施例では、「バッテイング」動作を
シミュレートする画像制御装置について開示したが、本
発明による要旨は当該装置に限定されるものではなく、
例えば、「テニス」や「ゴルフ」等、遊戯者の運動行動
を取り入れた各種ゲーム、あるいはロールプレイングゲ
ームに適用することが可能である。さらに、本実施例で
は、クロマキー検出された面積が所定値を超えた時に一
意的にゲームを強制終了させているが、これに替えて、
例えば、クロマキー検出された領域の動き検出を行い、
複数フレームにわたって静止状態にある領域を不感帯と
見做し、それ以外の領域の面積が所定値を超えた時に誤
動作の虞ありとしてゲームを終了させることも可能であ
る。
In the above-described embodiment, the game is uniquely forcibly terminated when the area detected by the chroma key exceeds a predetermined value. An image for notification may be generated. Further, in this embodiment, the image control device for simulating the "batting" operation is disclosed, but the gist of the present invention is not limited to the device.
For example, the present invention can be applied to various games such as "tennis" and "golf" that incorporate the exercise behavior of the player, or role playing games. Further, in the present embodiment, the game is uniquely forcibly terminated when the area detected by the chroma key exceeds a predetermined value. However, instead of this,
For example, to detect the movement of the area where the chroma key is detected,
It is also possible to regard a region in a stationary state over a plurality of frames as a dead zone and terminate the game when there is a risk of malfunction when the area of other regions exceeds a predetermined value.

【0099】[0099]

【発明の効果】以上説明したように、本発明によれば、
面積検出手段が撮像画像から特定色のクロマキー領域を
抽出して当該クロマキー領域の面積を検出し、ゲーム制
御手段は、この面積検出手段によって検出された面積が
所定値を超えたと判別した場合にゲーム動作を停止する
ので、検出対象以外の物体が撮像画像中に存在した時の
誤動作を防止することができる。
As described above, according to the present invention,
The area detection means extracts a chroma key area of a specific color from the captured image to detect the area of the chroma key area, and the game control means determines that the area detected by the area detection means exceeds the predetermined value. Since the operation is stopped, it is possible to prevent a malfunction when an object other than the detection target is present in the captured image.

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

【図1】本発明の一実施例による画像制御装置の全体構
成を示す外観図である。
FIG. 1 is an external view showing an overall configuration of an image control apparatus according to an embodiment of the present invention.

【図2】同実施例の概要を説明するための図である。FIG. 2 is a diagram for explaining the outline of the embodiment.

【図3】同実施例による画像制御装置の電気的構成を示
すブロック図である。
FIG. 3 is a block diagram showing an electrical configuration of the image control apparatus according to the embodiment.

【図4】同実施例における撮像信号処理部11の構成を
示すブロック図である。
FIG. 4 is a block diagram showing a configuration of an image pickup signal processing unit 11 in the embodiment.

【図5】同実施例におけるビデオ信号処理部20の構成
を示すブロック図である。
FIG. 5 is a block diagram showing a configuration of a video signal processing unit 20 in the embodiment.

【図6】同実施例におけるクロマキー信号発生回路20
fを説明するための図である。
FIG. 6 is a chroma key signal generation circuit 20 in the same embodiment.
It is a figure for demonstrating f.

【図7】同実施例におけるVDP31の構成を示すブロ
ック図である。
FIG. 7 is a block diagram showing a configuration of a VDP 31 in the embodiment.

【図8】同実施例における位置検出処理部40のワーク
RAMの内容を説明するためのメモリマップである。
FIG. 8 is a memory map for explaining the contents of the work RAM of the position detection processing unit 40 in the embodiment.

【図9】位置検出処理部40におけるメインルーチンの
動作を示すフローチャートである。
FIG. 9 is a flowchart showing an operation of a main routine in the position detection processing section 40.

【図10】位置検出処理部40における初期画面マップ
作成ルーチンの動作を示すフローチャートである。
10 is a flowchart showing the operation of an initial screen map creation routine in the position detection processing unit 40. FIG.

【図11】位置検出処理部40における処理画面マップ
作成ルーチンの動作を示すフローチャートである。
11 is a flowchart showing an operation of a processing screen map creation routine in the position detection processing unit 40. FIG.

【図12】位置検出処理部40における衝突座標検出処
理ルーチンの動作を示すフローチャートである。
FIG. 12 is a flowchart showing an operation of a collision coordinate detection processing routine in the position detection processing section 40.

【図13】位置検出処理部40における座標検出処理ル
ーチンの動作を示すフローチャートである。
FIG. 13 is a flowchart showing the operation of a coordinate detection processing routine in the position detection processing section 40.

【図14】位置検出処理部40における重心計算処理ル
ーチンの動作を示すフローチャートである。
FIG. 14 is a flowchart showing an operation of a centroid calculation processing routine in the position detection processing section 40.

【図15】位置検出処理部40における警告割込み処理
ルーチンの動作を示すフローチャートである。
FIG. 15 is a flowchart showing the operation of a warning interrupt processing routine in the position detection processing section 40.

【図16】CPU51におけるCPUメインルーチンの
動作を示すフローチャートである。
FIG. 16 is a flowchart showing an operation of a CPU main routine in the CPU 51.

【図17】CPU51におけるCPUメインルーチンの
動作を示すフローチャートである。
FIG. 17 is a flowchart showing an operation of a CPU main routine in the CPU 51.

【図18】CPU51における転送割込み処理ルーチン
の動作を示すフローチャートである。
FIG. 18 is a flowchart showing the operation of a transfer interrupt processing routine in the CPU 51.

【図19】CPU51における衝突割込み処理ルーチン
の動作を示すフローチャートである。
FIG. 19 is a flowchart showing the operation of a collision interrupt processing routine in the CPU 51.

【図20】CPU51におけるタイマインタラプトルー
チンの動作を示すフローチャートである。
FIG. 20 is a flowchart showing the operation of a timer interrupt routine in the CPU 51.

【図21】CPU51における第n画像処理ルーチンの
動作を示すフローチャートである。
FIG. 21 is a flowchart showing the operation of the n-th image processing routine in the CPU 51.

【図22】CPU51における第n画像処理ルーチンの
動作を説明するための図である。
FIG. 22 is a diagram for explaining the operation of the n-th image processing routine in CPU 51.

【図23】CPU51における第n画像処理ルーチンの
動作を説明するための図である。
FIG. 23 is a diagram for explaining the operation of the n-th image processing routine in the CPU 51.

【図24】CPU51における監視タイマカウント処理
ルーチンの動作を示すフローチャートである。
FIG. 24 is a flowchart showing the operation of a monitoring timer count processing routine in the CPU 51.

【図25】CPU51におけるオーバーフロー割込み処
理ルーチンの動作を示すフローチャートである。
FIG. 25 is a flowchart showing the operation of an overflow interrupt processing routine in the CPU 51.

【図26】CPU51における音源要求割込み処理ルー
チンの動作を示すフローチャートである。
FIG. 26 is a flowchart showing the operation of a sound source request interrupt processing routine in the CPU 51.

【図27】第1および第2の音源回路55b,56にお
ける音源処理ルーチンの動作を示すフローチャートであ
る。
FIG. 27 is a flowchart showing an operation of a sound source processing routine in the first and second sound source circuits 55b and 56.

【符号の説明】[Explanation of symbols]

1 撮像部 2 装置本体 3 ディスプレイ 20 ビデオ信号処理部(検出手段) 30 画像処理部(制御手段) 40 位置検出処理部(検出手段、指示手段) 50 制御部 51 CPU(制御手段) DESCRIPTION OF SYMBOLS 1 Image pick-up part 2 Device main body 3 Display 20 Video signal processing part (detection means) 30 Image processing part (control means) 40 Position detection processing part (detection means, instruction means) 50 Control part 51 CPU (control means)

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 撮像画像から特定色のクロマキー領域を
抽出すると共に、当該クロマキー領域の大きさを検出す
る検出手段と、 表示画面に表示されるコンピュータ画像の表示態様を、
前記クロマキー領域によって形成されるクロマキー像の
表示位置に応じて制御する制御手段と、 前記クロマキー領域が所定の大きさを超える否かを判別
し、所定の大きさを超えた場合に、前記制御手段に動作
停止を指示する指示手段とを具備することを特徴とする
画像制御装置。
1. A detection means for extracting a chroma key region of a specific color from a captured image and detecting the size of the chroma key region, and a display mode of a computer image displayed on a display screen.
Control means for controlling according to a display position of a chroma key image formed by the chroma key area, and determining whether or not the chroma key area exceeds a predetermined size, and when the size exceeds the predetermined size, the control means And an instruction unit for instructing to stop the operation.
【請求項2】 前記指示手段は、前記クロマキー領域が
所定の大きさを超える場合、検出対象以外の特定色の物
体が前記撮像画像中に存在すると見做すことを特徴とす
る請求項1記載の画像制御装置。
2. The instructing means determines that an object of a specific color other than a detection target is present in the captured image when the chroma key area exceeds a predetermined size. Image control device.
【請求項3】 撮像画像から特定色のクロマキー領域を
抽出するクロマキー抽出手段と、 表示画面に表示されるコンピュータ画像の表示態様を、
前記クロマキー領域によって形成されるクロマキー像の
表示位置に応じて制御する制御手段と、 前記クロマキー領域の面積が所定値を超えた場合に誤動
作の可能性有りとして前記制御手段の処理を強制終了さ
せる動作判定手段とを具備することを特徴とする画像制
御装置。
3. A chroma key extraction means for extracting a chroma key area of a specific color from a captured image, and a display mode of a computer image displayed on a display screen.
Control means for controlling according to the display position of the chroma key image formed by the chroma key area, and operation for forcibly ending the processing of the control means as a possibility of malfunction when the area of the chroma key area exceeds a predetermined value An image control apparatus comprising: a determination unit.
【請求項4】 前記クロマキー抽出手段は、撮像フレー
ム毎に特定色のクロマキー領域を抽出することを特徴と
する請求項3記載の画像制御装置。
4. The image control apparatus according to claim 3, wherein the chroma key extraction means extracts a chroma key area of a specific color for each image pickup frame.
JP6092981A 1994-04-05 1994-04-05 Image control unit Pending JPH07282265A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6092981A JPH07282265A (en) 1994-04-05 1994-04-05 Image control unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6092981A JPH07282265A (en) 1994-04-05 1994-04-05 Image control unit

Publications (1)

Publication Number Publication Date
JPH07282265A true JPH07282265A (en) 1995-10-27

Family

ID=14069567

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6092981A Pending JPH07282265A (en) 1994-04-05 1994-04-05 Image control unit

Country Status (1)

Country Link
JP (1) JPH07282265A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001024896A1 (en) * 1999-10-04 2001-04-12 Ssd Company Limited Sensing ball game machine

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001024896A1 (en) * 1999-10-04 2001-04-12 Ssd Company Limited Sensing ball game machine
US7839382B2 (en) 1999-10-04 2010-11-23 Ssd Company Limited Sensing ball game machine
US7932908B1 (en) 1999-10-04 2011-04-26 Ssd Company Limited Apparatus systems, and the methods for stimulating movement of a ball in response to a signal generated in an input device moved by a game player

Similar Documents

Publication Publication Date Title
JP3766981B2 (en) Image control apparatus and image control method
EP0652524A1 (en) Image processing device and method
JP5026692B2 (en) Image processing apparatus, image processing method, and program
JP3145064B2 (en) Video game machine and medium recording video game program
EP2253358B1 (en) Game device, game device control method, program, information storage medium
JP2007159725A (en) Game program and game apparatus
JP3463379B2 (en) Image control apparatus and image control method
JPH10290886A (en) Image processing device and image processing method
JPH0850661A (en) Image controller
JP3451343B2 (en) Signal generation apparatus and signal generation method
JP3371535B2 (en) Image control apparatus and image control method
JPH07282265A (en) Image control unit
JPH07271982A (en) Image controller
JP3407394B2 (en) Image display control apparatus and image display control method
US6354942B1 (en) Method for executing game and game device for implementing same
JP3622234B2 (en) Image control apparatus and image control method
JPH07302324A (en) Picture controller
JPH07282236A (en) Image controller
JPH0879621A (en) Picture controller
JPH0887592A (en) Image controller
JPH0855212A (en) Image controller
JP3371521B2 (en) Signal generation apparatus and signal generation method
JPH1173525A (en) Processor and method for image processing
JP4277066B2 (en) Image processing apparatus and image processing method
JP3586880B2 (en) Image extraction apparatus and image extraction method