JP3734528B2 - Program processing method and animation display apparatus using the same - Google Patents

Program processing method and animation display apparatus using the same Download PDF

Info

Publication number
JP3734528B2
JP3734528B2 JP12072295A JP12072295A JP3734528B2 JP 3734528 B2 JP3734528 B2 JP 3734528B2 JP 12072295 A JP12072295 A JP 12072295A JP 12072295 A JP12072295 A JP 12072295A JP 3734528 B2 JP3734528 B2 JP 3734528B2
Authority
JP
Japan
Prior art keywords
program
routine
display
animation
instruction
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.)
Expired - Lifetime
Application number
JP12072295A
Other languages
Japanese (ja)
Other versions
JPH08293040A (en
Inventor
俊和 富沢
健之 中嶋
求 力石
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nintendo Co Ltd
Original Assignee
Nintendo 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 Nintendo Co Ltd filed Critical Nintendo Co Ltd
Priority to JP12072295A priority Critical patent/JP3734528B2/en
Publication of JPH08293040A publication Critical patent/JPH08293040A/en
Application granted granted Critical
Publication of JP3734528B2 publication Critical patent/JP3734528B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Landscapes

  • Processing Or Creating Images (AREA)

Description

【0001】
【産業上の利用分野】
本願発明は、プログラム処理方法およびそれを用いたアニメーション表示装置に関し、特に、例えば、コンピュータグラフィックスによりアニメーション映像を表示するためのプログラム処理方法およびアニメーション表示装置に関する。より具体的には、初心者が小規模のアニメーション映像を作成する場合に、簡便に表示シーケンスを定義できるようにするためのものである。
【0002】
【従来の技術】
従来のプログラム記述言語としては、BASICやC言語といったものがある。これらはパーソナルコンピュータのプログラムを作成するための汎用のプログラム記述言語であり、アニメーション表示のみならず、データベースやワードプロセッサ、あるいは表計算ソフト等のプログラム開発に広く用いられている。
【0003】
これらのプログラム記述言語は、演算命令,I/O制御命令および分岐命令を含む。また、I/O制御命令は、表示制御命令,フロッピーディスク制御命令,プリンタ制御命令およびネットワーク制御命令等を含む。熟練したプログラマーは、これら命令を組み合わせて、大規模で複雑なプログラムを作成できる。
【0004】
分岐命令は、絶対分岐命令,条件分岐命令,ループ命令およびサブルーチン命令等を含む。サブルーチン命令は、サブルーチンコール命令とリターン命令を含み、プログラムの構造化に用いられる。プログラマーは、プログラムの各部分を機能的に分類し、サブルーチンとしてこれを整理する。サブルーチンは、メインルーチン上あるいはサブルーチン上からサブルーチンコール命令を用いて呼び出され、特定の処理を目的として利用される。呼び出されたサブルーチンは、終端に設置されるリターン命令によってその処理を終了し、呼び出された元のプログラム(すなわちサブルーチンコール命令が実行されたプログラム)に復帰するよう制御される。
【0005】
図1は、従来のサブルーチンを用いた場合のプログラムフローである。従来のプログラムの流れは、図1に示すようにメインルーチンからサブルーチンへ移行し、予め指定された処理を終了した後、再びメインルーチンへ復帰する。このようなサブルーチン手法は、回帰型サブルーチンと考えられる。この方法によれば、プログラムフローの道筋が一義的に決定されるため、プログラマーが処理の流れを把握しやすく、不具合が生じた時にプログラムを修正する作業(以降デバッグと呼ぶ)を比較的容易に行うことができる。
【0006】
一方、メインルーチンとサブルーチンとの組み合わせによるプログラム処理以外の処理方法としては、マルチタスクと呼ばれる手法がある。マルチタスクは、複数のプログラムを時分割で並列動作させる手法であり、これを用いることによって複数のプログラムがあたかも同時に実行されているかのように処理される。この手法は、例えばワードプロセッサにおいて、文章を編集しながら他の文章を印刷する場合に用いられる。
【0007】
【発明が解決しようとする課題】
従来のプログラム記述言語は、熟練したプログラマーが大規模で複雑なプログラムを作成するのに適しているが、初心者が簡単なアニメーション映像を表示するためにこれを用いる場合、大変な熟練を要する。なぜならば、これらのプログラム記述言語は、プログラムの流れを制御するための分岐命令を熟知しなければ、表示制御命令を有効的に利用することができないためである。そのため、比較的簡単なアニメーション映像プログラムを手軽に、しかも大量に作成するための方法が求められている。例えば、衛星データ放送や文字放送に代表されるデータ放送において、放送局は常にデータを視聴者に供給する義務を有するので、プログラムを迅速かつ用意に作成できることが要求されるからである。通常のTV放送であれば、TVカメラによって比較的容易にデータを作成することが可能であるが、データ放送の場合は、データの供給源が熟練したプログラマーに依存し、かつデータの作成に多大の時間を要する。
【0008】
また、従来のプログラム記述言語は、コンピュータのCPUにとって処理しやすいプログラム構造を持つため、人間の通常の思考形態とはかけはなれた論理構造を有する。例えば、図2に示すアニメーション画像を生成する場合、人間の思考形態では、「左から右へ飛んできた矢100が右から左へ飛んできた板102に衝突したとき、矢100はまっすぐ突き抜けるが、板102は2つに分裂して一方(104)が左上に、他方(106)が左下に回転しながら飛んでゆく」というように、個々の物体(オブジェクト)の動きに分けて認識される。これに対して従来のプログラム記述言語では、「全体的な時間進行の中で、各々の矢100,板102,分裂した板104および106がどの位置に存在する。」というように、連続的な時間経過における全物体の座標位置の変化が重要であるため、プログラマは個々の物体の動きを時間軸を基準として統合するという作業が必要であった。熟練したプログラマならば無意識のうちに個別物体の動きを時間経過によって統合し、これをプログラム記述言語で容易に表現することができる。しかし、初心者にはこの時間経過による統合を概念的に把握することが難しく、よほど熟練しなければ正常に動作するプログラムを作成することが困難である。
【0009】
時間経過による統合が必要な理由は、回帰型サブルーチンにある。従来のプログラム記述言語のような回帰型サブルーチンは、プログラムの流れを追うには便利であるが、反面、異なるサブルーチンを同時に処理することができない。例えば図2において、矢100を動かすサブルーチンと板102を動かすサブルーチンを別々にプログラムすると、これを同時に処理することができないため、矢100と板102を同時に動かすことができない。この場合は、2つのサブルーチンを時分割的に処理するように矢と板を時間軸で統合した統合プログラムを作成する必要が生ずる。
【0010】
一方、マルチタスクを用いて複数のサブルーチンを同時に処理するという初期的な試みもなされている。前述のワードプロセッサーでは、マルチタスク処理により、文章編集と文章印刷の2つのサブルーチンを同時に処理している。しかしながら、従来のマルチタスク処理では、各々のサブルーチンの間に関連性がなく、2つのサブルーチンが単純に並列的に処理されているだけのものであった。したがって、例えば矢が動くプログラムと板が動くプログラムを準備しても、各々の時間軸方向の調整をとることができないため、1つのプログラムから他のプログラムへの切換タイミングを結果的に所望する物体が表示されるようプログラム毎に調整する必要がある。
【0011】
従って、従来のマルチタスク処理では、時分割処理の切り替えタイミングが各々のサブルーチンによって任意に決定されるため、全体的なプログラムの進行状況を一義的に決定することができない。したがって各々のサブルーチンを関連付け、多くのサブルーチンを同時に動作させると、特定の処理がどのタイミングで行われるかがを判別できずデバッグが困難になるという問題点があった。
【0012】
それゆえに、本願発明の目的は、初心者や未熟なプログラマーでも、コンピュータグラフィックスを用いて比較的小規模のアニメーション表示プログラムを容易に作成することが可能な、プログラム処理方法およびアニメーション表示装置を提供することである。
【0013】
本願発明の他の目的は、個々の非回帰型サブルーチンを時間的に関連付けながらも、デバッグが容易なプログラム処理方法およびアニメーション表示装置を提供することである。
【0014】
【課題を解決するための手段】
本願第1の発明のプログラム処理方法は、コンピュータグラフィックスによりアニメーション映像をディスプレイに表示するために用いられるプログラム処理方法において、表示オブジェクトに対応する複数のプログラムルーチン(図6のUNIT1〜UNIT4)と、少なくとも1つの表示オブジェクトに対応するプログラムルーチンを起動するための起動命令を含むエントリルーチン(UNIT0)とを有するアニメーションプログラムを入力するステップ(S1,S2)と、前記エントリルーチンを起動するステップ(S3)と、前記エントリルーチンに含まれる起動命令に応答して、前記表示オブジェクトに対応するプログラムルーチンを起動するステップ(図9のS44)と、前記プログラムルーチンが複数個起動した時に順次各プログラムルーチンの一部を時分割処理し、各プログラムルーチンに対応するオブジェクトを各々発生するステップ(図15のS460,S462)と、発生した複数のオブジェクトを一表示単位としてディスプレイ表示するステップ(図8のS6)とを含み、少なくとも1つの表示オブジェクトに対応するプログラムルーチンは、他の表示オブジェクトを新たに表示するために、該表示オブジェクトに対応するプログラムルーチンを新たに起動する起動命令を含み、この起動命令に応答して他の表示オブジェクトを新たに表示するステップとを含む。
【0015】
本願第2の発明のアニメーション表示装置は、コンピュータグラフィックスによりアニメーション映像をディスプレイに表示するために用いられるものであって、表示オブジェクトに対応する複数のプログラムルーチンおよび少なくとも1つの表示オブジェクトに対応する起動命令を含むアニメーションプログラムを入力する入力手段(実施例との対応関係を示せば、放送受信アダプタ4)と、前記アニメーションプログラムを記憶する記憶手段(メモリパック7)と、実行すべき前記プログラムルーチンを識別する識別データを記憶する識別データ記憶手段(図7のアクティブユニット記憶領域)と、アニメーションプログラムを実行することにより、前記起動命令に応答して対応するプログラムルーチンの識別データを前記識別データ記憶手段に記憶し、識別データに基づいて複数のプログラムルーチンを時分割処理する処理手段(CPU24)と、前記処理手段の時分割処理によって、複数のプログラムルーチンの各々に対応して発生される表示オブジェクトを合成し、一表示単位としてディスプレイに出力する表示画像出力手段(PPU28)とを含み、少なくとも1つの表示オブジェクトに対応するプログラムルーチンは、他の表示オブジェクトを新たに表示するために、該表示オブジェクトに対応するプログラムルーチンを新たに起動する起動命令を含み、この起動命令に応答して他の表示オブジェクトを新たに表示する手段とを備える。
【0016】
【作用】
キーボード,外部記憶媒体,モデムまたはデータ放送受信装置からアニメーションプログラムが入力される。アニメーションプログラムは、表示オブジェクトに対応する複数のプログラムルーチンと、動作を開始するためのエントリルーチンとを含む。次にアニメーション表示装置は、エントリルーチンを起動する。エントリルーチンは、プログラムルーチンの起動命令を含む。この起動命令によって前記表示オブジェクトに対応するプログラムルーチンが起動する。これら複数のプログラムルーチンを時分割で処理することにより、複数のオブジェクト画像を同時に生成する。又、表示オブジェクトのプログラムルーチンから新たな他の表示オブジェクトの表示を可能とし、両表示オブジェクト間の表示タイミングを合わせ易くする。時分割処理が一巡すると、アニメーション表示装置は生成されたオブジェクト画像を1画面分の表示データとしてディスプレイ上に表示する。
【0017】
また、入力手段は、アニメーションプログラムを入力する。記憶手段は、入力手段によって入力されたアニメーションプログラムを記憶する。処理手段は記憶手段に記憶されたアニメーションプログラムに含まれる起動命令に応答して、実行すべきプログラムルーチンの識別データを識別データ記憶手段に登録し、この登録情報に基づいてプログラムルーチンを時分割に処理する。処理された各プログラムルーチンは対応するオブジェクトを発生し、表示画像出力手段は発生した複数のオブジェクトを1画面分の表示データとしてディスプレイに出力する。又、表示オブジェクトのプログラムルーチンから新たな他の表示オブジェクトの表示を可能とし、両表示オブジェクト間の表示タイミングを合わせ易くする。
【0018】
プログラムルーチンは対応するオブジェクト画像を表示する。また、複数のプログラムルーチンは時分割で実行される。そのため、オブジェクト別にプログラムルーチンを作成するだけで、自動的に複数のオブジェクトが同時に表示される。又、表示オブジェクトのプログラムルーチンから新たな他の表示オブジェクトの表示を可能とし、両表示オブジェクト間の表示タイミングを合わせ易くする。このため初心者でも簡便にアニメーション画像を作成することができる。また、オブジェクトの表示を変更したい場合でも、プログラムルーチンがオブジェクトに対応しているため、容易にプログラムを変更できる。
【0019】
この発明の目的、特徴および利点は、図面を参照して行う以下の実施例の詳細な説明から一層明らかになろう。
【0020】
【実施例】
図3は本願発明のアニメーション表示装置の一例のブロック図である。この実施例のアニメーション表示装置は、ゲーム機に放送受信アダプタを接続することにより衛星データ放送を受信し、受信したデータに基づいてアニメーション映像を再生するものである。具体的には、アニメーション表示装置(画像表示装置)の一例のゲーム機2には、放送受信アダプタ4、メモリカートリッジ6およびコントローラ8が接続される。メモリカートリッジ6には、受信したデータを保存するためのメモリパック7が接続される。コントローラ8は、ユーザーが操作情報を入力するために用いられる。
【0021】
BSアンテナ10は、衛星データ放送を受信し、その受信データをBSチューナ12に与える。BSチューナ12は、複数の衛星放送の中から特定のチャンネルを検波し、副搬送波で伝送されるPCMデジタル音声信号およびデジタルデータを放送受信アダプタ4に出力する。PCMデコーダ22は、BSチューナ12から与えられたPCMデジタル音声信号をデコードし、D−Aコンバータ23を介してアナログステレオオーディオ信号を生成し、ゲーム機2内のミキサー38に出力する。データチャンネルデコーダ20は、BSチューナ12から与えられたデジタルデータをデコードする。
【0022】
カートリッジ6内のROM46は、データ放送受信プログラムに加えて、アニメーション表示プログラムを実行するためのインタプリタプログラムを記憶する。ゲーム機2内のCPU24は、ROM46に記憶されたデータ放送受信プログラムに基づいて、前記データチャンネルデコーダ20に対して受信すべきデジタルデータを指定する。データチャンネルデコーダ20は、CPU24から指定されたデジタルデータのみをデコードし、内部バッファにストアする。CPU24は、定期的にデータチャンネルデコーダ20を監視し、データが受信された場合にこの受信データをワークRAM26,PS−RAM44,S−RAM42またはフラッシュメモリ49のいずれかのメモリに転送する。
【0023】
転送先のメモリは、受信データの種類によって決定される。例えばCPU24は、放送メニューのような頻繁に受信すべき放送データを、揮発性のメモリであるワークRAM26またはPS−RAM44に記憶させ、環境設定データをS−RAM42に記憶させ、さらにアニメーション表示プログラムをフラッシュメモリ49に保存する。
【0024】
データ放送によって与えられる複数のアニメーション表示プログラムは、主としてフラッシュメモリ49に記憶され、ROM46内のインタプリタプログラムによって解釈され、実行される。フラッシュメモリ49を含むメモリパック7は、コネクタ47および48によって着脱自在に構成される。なお、アニメーション表示プログラムを、S−RAM42,PS−RAM44またはWORK−RAM26に記憶されてもよい。
【0025】
CPU24は、コントローラ8から入力される操作情報に基づいて、前記複数のアニメーション表示プログラムの内の1つを、ROM46に記憶されたインタプリタプログラムを用いて実行し、画像データおよび音声データを生成する。CPU24によって生成された画像データは、PPU28を介してビデオRAM30に格納される。また、CPU24によって生成された音声データはAPU34を介してオーディオRAM36に格納される。
【0026】
PPU28は、ビデオRAM30のデータに基づいて、D−Aコンバータ31およびビデオエンコーダ32と協働してビデオ信号を生成し、TV14に与える。また、PPU28は、TVの垂直ブランキング信号に同期して、CPU24に割り込み信号を発生する。APU34は、オーディオRAM36のデータに基づいて、D−Aコンバータ37と協働してオーディオ信号を生成し、ミキサー38に出力する。ミキサー38は、D−Aコンバータ37からのオーディオ信号と、PCMデコーダ22からのオーディオ信号とを合成し、TV14に与える。
【0027】
図4は本願発明のプログラム処理方法の概念図である。メインプログラム50は、実行時にプログラムカウンタ50a,フレームカウンタ50bおよび対応ワークエリア50cを与えられる。メインプログラム50は、オブジェクトの表示に際して、必要となるオブジェクトと同数のユニットプログラムを起動する。例えば、表示オブジェクト数が2の場合には、図4に示すようにユニットプログラム52、54を起動する。
【0028】
ユニットプログラム52は、主として表示オブジェクトの移動を司るユニットルーチン52aと、主として表示オブジェクトのアニメーションパターンを司るアニメルーチン52bとを含む。ユニットルーチン52aおよびアニメルーチン52bには、実行時にプログラムカウンタ52aa,52baとフレームカウンタ52ab,52bbと対応ワークエリア52ac,52bcとが各々与えられる。
【0029】
プログラムカウンタは、対応するルーチンまたはプログラムにおいて実行すべき命令の位置を示すポインタであり、命令が進行するたびに更新される。フレームカウンタは、表示すべきオブジェクトの表示シーケンスを制御するためのシーケンスカウンタであり、TVの垂直ブランキングに対応して更新される。また、対応ワークエリアは、表示すべきオブジェクトの位置や属性を示すデータを記憶するメモリ領域を示すアドレス値である。ユニットルーチンとアニメルーチンは同じ対応ワークエリアを与えられ、オブジェクトを表示するために必要な各種データを共有する。プログラムポインタ,フレームカウンタおよび対応ワークエリアは、例えば図3のワークRAM26上に記憶される。
【0030】
ユニットプログラム54は、ユニットプログラム52と同じ内部構成を持つ。ユニットプログラムが起動すると、メインプログラムと、各々のユニットプログラムのユニットルーチンおよびアニメルーチンとはそれぞれマルチタスク手法により並列処理される。
【0031】
図2のオブジェクトを図4に対応させた場合、ユニットプログラム52を矢100に、ユニットプログラム54を板102に対応させることができる。この時点では、ユニットプログラム52と54とが並列動作しているため、別々に作成された矢のプログラムと板のプログラムが同時に処理される。具体的には、矢が左から右に動くと同時に、板が右から左へと移動する。各々のプログラムの進行がフレームカウンタによってTVの垂直ブランキングに同期して制御されるため、ユニットプログラム間で動作スピードを調整する必要はない。
【0032】
ユニットプログラム54は、プログラムの終了直前に同様の構造を持つユニットプログラム56および58を生成する。すなわち、ユニットプログラム54は、板102が矢100に当たって消滅したとき、分裂した板の破片104および105を生成する。この時点で並列処理されるユニットプログラムは、矢100と分裂後の板104および105だけとなり、それぞれ別個に作成された各オブジェクトのアニメーションプログラムにしたがって各オブジェクトが表示される。
【0033】
ここで、矢100が2つに折れるという画像を必要とする場合には、折れた矢の表示プログラムを別途作成し、矢100に対応するユニットルーチン52に折れた矢の表示プログラムの起動命令を含めればよい。また、既に表示されているオブジェクトとは無関係に新たなオブジェクトを発生させる場合には、メインプログラムに当該プログラムの起動命令を含めればよい。
【0034】
このように本願発明によると、各オブジェクトに着目してプログラムを作成するだけで、結果的に各々のオブジェクトが連動したアニメーション映像を生成することが可能であるため、時間経過に基づいて各オブジェクト表示プログラムを統合する必要が無く、初心者にも容易にプログラムを作成することが可能となる。
【0035】
図5は、本願発明のプログラム処理方法を用いた場合のプログラムフローである。メインプログラム50はユニットプログラム52および54を生成し、ユニットプログラム54はユニットプログラム56、58を生成する。図の中で上下方向に並ぶプログラムは、マルチタスクによって同時処理される。ユニットプログラム54はユニットプログラム52より遅れて起動するが、この時間差はTVの1フィールド(すなわち約16.7mS)より格段に小さいため、実際の表示においては時間差は生じない。これは、ユニットプログラム56とユニットプログラム56においても同様である。
【0036】
メインプログラム50は、ユニットプログラム54を生成した時点で処理を終了してもよいが、全体を通しての時間を管理するために、何もしない命令(nop命令)を一定時間実行した後、プログラムの終了を意味するエンドマーク表示用ユニットプログラムを起動してもよい。また、メインプログラム50にもアニメルーチンを対応させ、マーカーが画面上を移動するようプログラムしてもよい。こうすることにより、実行時の時間の進みかたを視覚的に確認することができる。
【0037】
図6は具体的なアニメーション表示プログラムの一例である。メインプログラム50は、ユニットプログラムを起動するための命令であるuPUT命令を含む。このuPUT命令は3つのパラメータを必要とする。第1のパラメータはユニットルーチンの開始アドレス(UNIT1およびUNIT2)であり、第2のパラメータは当該ユニットにより処理されるオブジェクトの水平方向の初期座標(X1およびX2)であり、第3のパラメータは同じくオブジェクトの垂直方向の初期座標(Y1およびY2)である。
【0038】
uPUT命令によってユニットルーチンが起動されると、当該ユニットルーチン専用のプログラムカウンタ,フレームカウンタおよび対応ワークエリアがアクティブユニットリストに登録され、前記ユニットルーチンの開始アドレスがプログラムカウンタにセットされ、前記オブジェクトの初期座標が対応ワークエリアにセットされる。アクティブユニットリストとは、マルチタスクによって同時処理されるべきプログラムルーチンの一覧表であり、主としてワークRAM26に設けられる。なお、アクティブユニットリストに登録された時点では、まだこれらのユニットルーチンは実行されない。uPUT命令は複数フレームにまたがるような長期的命令ではないため、メインルーチン50は、2つのユニットルーチンを起動後uEND命令によってただちに処理を終了する。
【0039】
メインルーチン50が終了すると、アクティブユニットリストが検索され、次の実行プログラムであるユニットルーチン52aの処理が開始される。ユニットルーチン52aはアニメルーチンを起動するための命令であるuANIME命令と、オブジェクトを移動させるための命令であるuMOVE命令を含む。uANIME命令は、アニメルーチンの開始アドレス(A)をパラメータとして持ち、uMOVE命令は処理フレーム数(M)、移動パラメータ(I1,J1)をパラメータとして持つ。
【0040】
uANIME命令が実行されると、uPUT命令と同様に当該アニメルーチン専用のプログラムカウンタおよびフレームカウンタがアクティブユニットリストに登録され、前記ユニットルーチンの開始アドレスがプログラムカウンタにセットされる。また、uANIME命令のあるユニットルーチンと共通の対応ワークエリアがアニメルーチンに割り当てられる。uANIME命令もuPUT命令と同様に長期的命令ではないため、アニメルーチン起動後はただちに次のuMOVE命令が実行される。
【0041】
uMOVE命令が実行されると、指定された処理フレーム数がフレームカウンタにセットされ、速度ベクトルという形で与えられる移動パラメータが、対応ワークメモリのオブジェクト位置データに加算される。これによってオブジェクトの位置が変化する。uMOVE命令は長期的命令であるため、フレームカウンタの制御を伴う。移動パラメータ加算後、フレームカウンタがデクリメントされ、フレームカウンタの値が0ならば続けて次の命令を処理し、0でなければユニットルーチン52aの処理を保留して、アクティブユニットリストを検索し、次の実行プログラムであるユニットルーチン54aの処理を開始する。
【0042】
ユニットルーチン54aは、ユニットルーチン52aと同様に、uANIME命令によってアニメルーチン54bを起動した後、uMOVE命令によってオブジェクトの位置を変化させる。ユニットルーチン54a用に設けられたフレームカウンタがデクリメントされ、次の命令を実行するか、ユニットルーチン54aの処理を保留にするかが決定される。ユニットルーチン54aの処理が保留になった場合、アクティブユニットリストが検索され、次の実行プログラムであるアニメルーチン52bの処理が開始される。
【0043】
アニメルーチン52bはuPOSE命令を含む。uPOSE命令は、処理フレーム数「8」と、表示データの格納アドレス(DA1)をパラメータとして持つ。uPOSE命令が実行されると、処理フレーム数がアニメルーチン52b用に設けられたフレームカウンタにセットされ、対応ワークエリアのオブジェクト位置データに基づいてDA1に格納されたオブジェクト画像データを表示バッファに転送する。
【0044】
uPOSE命令は長期的命令であり、オブジェクト画像表示後フレームカウンタがデクリメントされ、次の命令を実行するか、アニメルーチン52bの処理を保留にするかが決定される。ユニットルーチン54aの処理が保留になった場合、次の実行プログラムであるアニメルーチン54bの処理が開始される。アニメルーチン54bにおいて、アニメルーチン52bと同様にuPOSE命令が実行され、対応するオブジェクト画像データ(DB1)が表示バッファに転送される。その後フレームカウンタがデクリメントされ、次の命令を実行するか、アニメルーチン54bの処理を保留にするかが決定される。
【0045】
アニメルーチン54bの処理が保留になった時点で、アクティブユニットリストに登録されているプログラムルーチンの実行が一巡したことになる。ここでこれらアニメーションプログラムは、TVの垂直ブランキングが発生し、ブランキング処理がなされるまで、保留状態を維持する。ブランキング処理において、表示バッファに書き込まれた画像データがビデオRAMに転送され、次のフレームにおいて転送された画像データが表示される。
【0046】
ブランキング処理が終了すると、ユニットルーチン52aの処理が再開される。ここで、メインプログラム50がもうすでに処理を終了している点に留意すべきである。メインプログラム50はuEND命令によってアクティブユニットリスト上の登録を抹消されているため、すでにマルチタスク処理の対象外となっている。
【0047】
ユニットルーチン52aは、前回と同じuMOVE命令を実行する。ただしこの場合には、処理フレーム数(M)はフレームカウンタにはセットされない。フレームカウンタには前回デクリメントしたフレーム数が記憶されており、uMOVE命令がオブジェクトの位置を変化させると、再度フレームカウンタがデクリメントされる。このように長期的命令では、TVフィールドに同期してフレームカウンタがデクリメントされ、フレームカウンタの値が0になるまで同じ処理が繰り返される。
【0048】
同じように、ユニットルーチン54bではuMOVE命令が、アニメルーチン52bおよび54bではuPOSE命令が、それぞれ対応するフレームカウンタの値が0になるまで繰り返される。ここで、各ルーチンの命令が8回繰り返し処理された場合、アニメルーチン52bのuPOSE命令が真っ先にフレームカウンタを0にする。アニメルーチン52bにおいてフレームカウンタが0になると対応するプログラムカウンタが歩進され、次の命令が実行される。
【0049】
次もやはりuPOSE命令であるが、オブジェクト画像データがDA1からDA2に変化している。また、その次のuJUMP命令によってこれら2つのuPOSE命令がくり返し実行されるようにプログラムされている。これにより、アニメルーチン52bは、DA1とDA2を8フィールド毎に交互に表示し、オブジェクトの形状に関するアニメーション画像を制御する。
【0050】
TVフィールドがM回経過すると、ユニットルーチン52aで次のuMOVE命令が実行されるとともにユニットルーチン54aで2つのuPUT命令およびuEND命令が連続的に実行される。一方のuPUT命令でユニットルーチン56aが起動し、もう一方のuPUT命令でユニットルーチン58aが起動する。両ユニットルーチンはそれぞれ対応のアニメルーチン56bおよび58bを起動し、これによってオブジェクト画像DB1が消滅すると同時にDC1からDC4によって表現されるオブジェクト画像およびDD1からDD4によって表現されるオブジェクトオブジェクト画像が出現する。
【0051】
上記のプログラムは図2の絵を表示するためのプログラム例であり、ユニットルーチン52aとアニメルーチン52bが矢のプログラムに対応し、ユニットルーチン54aとアニメルーチン54bが板のプログラムに対応し、ユニットルーチン56a,58a,アニメルーチン56bおよび58bが分裂した板のプログラムに対応している。
【0052】
このようなプログラム処理方法によると、板の分裂制御はプログラム構造によって自動的に決定され、矢と板の衝突タイミングは処理フレーム数Mによって容易に調整されるため、プログラムの際に全オブジェクトの座標を経過時間において統合する必要が無く、初心者でも容易にプログラムを行うことが可能になる。また、オブジェクトと処理ルーチンとが明確に対応しているためデバッグを容易に行うことができる。
【0053】
なお、uMOVE命令において、移動パラメータに速度ベクトルの代わりに最終到達座標を指定することにより、さらにプログラム作成を簡便にすることが可能である。この場合には、処理フレーム数と現在の位置データおよび最終到達座標に基づいて速度ベクトルを予め計算するようにすればよい。
【0054】
図7は、前述のプログラム処理方法を実現するためのメモリマップの一例である。RAMエリア60は図3のワークRAM26,PS−RAM44およびS−RAM42に対応し、ROMエリア62はROM46およびフラッシュメモリ49に対応する。
【0055】
ROMエリア62は、プログラム領域62aとオブジェクト描画データ領域62bを含む。プログラム領域62aは、メインプログラム50,ユニットルーチン52a,54a,56a,58a,アニメルーチン52b,54b,56bおよび58bを含む。また、オブジェクト描画データ領域62bは、オブジェクト描画データDA1,DA2,DB1,DC1,DC2,DC3,DC4,DD1,DD2,DD3およびDD4を含む。これらのルーチンおよびデータは、主としてデータ放送によって伝送され、フラッシュメモリ49に記憶される。しかし、予めROM46に使用頻度の高いオブジェクト描画データを記憶しておくことにより、伝送するデータ量を減少させることができる。
【0056】
メインルーチン,ユニットルーチンおよびアニメルーチンの各命令は、中間言語として伝送され、記憶される。例えば、前述のuPUT命令は、命令コード01Hとして記憶される。これによって、各ルーチンは高速に伝送され、少ない記憶容量でフラッシュメモリ49に記憶される。
【0057】
またROMエリア62は、前述の様々なプログラムをマルチタスクを用いて実行するためのインタプリタプログラムを記憶するインタプリタ領域62cを含む。インタプリタ領域62cは、主としてROM46内に割り当てられるが、放送によってインタプリタプログラムが伝送されたときにフラッシュメモリ49内に設けられてもよい。また、基本的な命令を含むインタプリタプログラム本体はROM46上に記憶され、放送によって伝送された追加すべき命令を含むサブインタプリタはフラッシュメモリ49上に記憶されてもよい。この場合、サブインタプリタは、インタプリタ本体から適時利用される。
【0058】
RAMエリア60は、アクティブユニットリスト記憶領域60a,対応ワークエリア記憶領域60bおよび実行ユニットポインタ領域60cを含む。アクティブユニットリスト領域60aは、各ユニットプログラムに対応するプログラムカウンタ,フレームカウンタおよび対応ワークアドレスを含む。
【0059】
対応ワークエリア記憶領域60bは、ユニットの位置や属性を示すデータを記憶する。実行ユニットポインタ60cは、実行中のユニットプログラムに対応するアクティブユニットリスト上のアドレスを記憶する。実行ユニットポインタ60cは、TVの垂直ブランキングに同期してリセットされ、ユニットプログラムが消滅、あるいは処理を保留するのに対応して歩進される。その結果、次に実行すべきユニットルーチンまたはアニメルーチンのアクティブユニットリスト上のアドレスを順次指定する。
【0060】
実行されるべきユニットプログラムは、アクティブユニットリスト領域60aに専用のプログラムカウンタおよびフレームカウンタが登録され、対応ワークエリア領域に専用の作業領域が割り当てられ、割り当てられた作業領域領域を示す対応ワークアドレスがアクティブユニットリストに登録されることによって能動化される。
【0061】
能動化されたユニットプログラムが実行ユニットポインタ60cによって順次スキャンされることに応じて、対応するROMエリア62上のプログラムが実行される。メインルーチン,ユニットルーチンおよびアニメルーチンは、全てアクティブユニットリスト上で同等のマルチタスクプログラムとして扱われ、リストへの登録順に実行される。
【0062】
ここで、各アニメルーチンがユニットルーチン上から起動している点に着目すべきである。なぜなら、これによってアニメルーチンは対応するユニットルーチンよりも必ずアクティブユニットリスト上の登録が遅れる。したがって、ユニットルーチンによってオブジェクトの位置が変更された後に、アニメルーチンによってその位置にオブジェクトが表示されることになる。
【0063】
これを応用して、1つのユニットルーチンに複数のアニメルーチンを対応させることにより、複数のオブジェクト描画データの組み合わせで1つのオブジェクトを形成してもよい。この場合でも対応ワークアドレスは各アニメルーチンに対してすべて共通に与えられるため、複数のオブジェクト描画データは各々相対的に所定の位置を保ったまま画面上を移動することになる。
【0064】
なお、アニメルーチンを持たないユニットルーチンがあっても良い。例えば、ユニットルーチンは、BGMを発生させるためのサウンド発生プログラムを持っていてもよい。また、ユニットルーチンは、コントローラ8を監視することによりボタンが押された場合にデータ放送受信メニューを発生するプログラムを持っていてもよい。どちらの場合にも画像とは無関係のユニットルーチンであるため、アニメルーチンを特に指定する必要はない。
【0065】
さらに、アニメルーチンをユニットルーチン内に組み込むことにより、専用のアニメルーチンを持たないように構成することも可能である。例えば、図2における板のように、対応するオブジェクト描画データが1つ(図6におけるDB1)しか無い場合、ANIME命令に代えて直接POSE命令をユニットルーチンに記述することができる。
【0066】
この場合、ユニットルーチンの対応ワークエリアには、組込みアニメルーチンであることを示すフラグと、実行すべき命令(例えばPOSE命令)の位置を示すアドレスが記憶される。動作においては、ユニットルーチンの処理終了後、このフラグが参照され、指定されたアドレスの命令が実行されることにより、オブジェクトが表示される。
【0067】
また、組込みアニメルーチンと同様に、複数の命令からなるアニメルーチンを対応ワークエリアを用いて処理するようにしてもよい。この場合には、アクティブユニットリスト上にアニメルーチンは登録されず、対応ワークエリア上にはアニメルーチンのプログラムカウンタとともに、アニメルーチン用のフレームカウンタが設けられる。ユニットルーチン終了時にこれらプログラムカウンタおよびフレームカウンタが参照され、自動的に対応するアニメルーチンが実行される。
【0068】
図8は本願のプログラム処理方法の全体的な流れを示すフローチャートである。アニメーション表示装置の電源が投入されると、S1においてアニメーションプログラムが放送受信アダプタ4(図3)を介して受信される。受信されたアニメーションプログラムは、S2においてメモリパック7(図3)に保存され、S3においてCPU24(図3)により起動される。
【0069】
S3においてアニメーションプログラムが起動されると、S4においてエントリルーチンであるメインプログラム50(図4)が実行される。メインプログラム50は、S4においてユニットプログラム52および54(図4)を起動する。起動されたユニットプログラム52および54は、S4においてメインプログラム50とともに時分割処理される。また、S4において、ユニットプログラム54は、ユニットプログラム56および58を起動し、時分割処理される。S4の一連の処理をユニット処理と呼び、この詳細は図9を用いて後述する。
【0070】
S4において各プログラムは、他のプログラムの起動制御とともに対応する表示オブジェクトの生成を行う。S4の時分割処理が一巡すると、S6において生成された複数の表示オブジェクトが1画面分の画像データとして表示される。実際には、S6は前述のブランキング処理に対応し、ビデオRAM30(図3)へ画像データを転送し、画像データを表示する。S4のユニット処理とS6のブランキング処理は、TVのフィールド周波数に対応して交互に実行される。
【0071】
図9は、ユニット処理のフローチャートである。ユニット処理はアクティブユニットリストの管理および各ユニットプログラムの実行を行うインタプリタによって実施される。インタプリタは、アクティブユニットリストの登録内容にしたがって各ユニットプログラムを実行し、各ユニットプログラム内の起動命令にしたがって指定のプログラムをアクティブユニットリストに登録する。そしてインタプリタは新たに登録されたユニットプログラムをさらに実行する。
【0072】
ユニット処理では、S41においてまずユニットポインタが初期化され、アクティブユニットリストに登録されている先頭のユニットプログラムが指定される。次にS42において指定されたアクティブユニットのプログラムカウンタが参照され、S43においてプログラムカウンタによって示される命令がフェッチされる。フェッチされた命令は、S44において実行される。
【0073】
S44において実行された命令がルーチンの終了を意味する命令(例えばuEND命令)であった場合には、処理がS45からS51へ移行する。そうでない場合には、処理がS45からS46へ移行し、S44において実行された命令が長期的命令であったかどうかがチェックされる。S44において実行された命令が例えばuPUT等の即時実行命令であった場合には、S46からS47に処理が移行し、プログラムカウンタを次の命令位置まで歩進して、再度S43からの処理を繰り返す。
【0074】
S44において実行された命令が例えばuMOVE等の長期的命令であった場合には、S48においてフレームカウンタ制御が行なわれる。もし、フレームカウンタの値が0である場合には、S44で実行された長期的命令のパラメータである処理フレーム数をフレームカウンタにセットし、フレームカウンタの値をデクリメントする。フレームカウンタの値が0でなかった場合には単にデクリメントのみを行う。
【0075】
S48のデクリメントによってフレームカウンタが1から0に変化すると、当該長期的命令の実行が指定された処理フレーム数だけ行なわれたことを意味する。したがってこの場合、コマンドエンドとしてS49からS50へ処理が移行し、プログラムカウンタが歩進される。デクリメントによってフレームカウンタの値が0にならなかった場合には、長期的命令はまだ指定した回数分だけ処理を終えていないということになり、処理をS49からS51に移行して、プログラムカウンタを現行のまま保持する。
【0076】
次にS51においてユニットポインタが歩進され、アクティブユニットリスト上の次のルーチンのプログラムカウンタ位置が示される。アクティブユニットリストに次のルーチンがある場合には、S52からS42に移行して、前述と同様に次のルーチンを処理する。もし、アクティブユニットリストに次のルーチンがない場合には、ユニットエンドとしてS52からS53へ処理が移行し、垂直ブランキングを待ってユニット処理を終了する。
【0077】
ユニット処理が終了すると、ただちにブランキング処理が実行される。また、ブランキング処理が終了すると、ただちに再度ユニット処理が実行される。もし、ユニット処理の処理時間がTVのフィールド表示期間を越えた場合は、複数TVフィールドを用いてアクティブユニットリストのルーチン処理を一巡させる。この場合でもS53で最終的に垂直ブランキングと同期をとっているため、各ルーチン間のフレームカウントスピードには結果的にばらつきが出ず、ユニット処理は常にTVフィールドに同期して実行される。
【0078】
図10は図9のS44において、uPUT命令を実行するためのプログラムフローチャートである。uPUT命令が実行されると、S410においてパラメータに記述された起動アドレスがプログラムカウンタとしてアクティブユニットリスト上に登録され、S412において専用のフレームカウンタが準備される。また、S414において、対応ワークエリアが確保され、対応ワークアドレスがアクティブユニットリストに登録される。さらに対応ワークエリア内に、パラメータとして与えられているオブジェクトの初期位置データが記憶される。
【0079】
図11は、uANIME命令を実行するためのプログラムフローチャートである。uANIME命令が実行されると、S420においてパラメータに記述された起動アドレスがプログラムカウンタとしてアクティブユニットリスト上に登録され、S422において専用のフレームカウンタが準備される。また、S424において、uANIME命令のあるユニットルーチンと同じ対応ワークエリアアドレスが、アクティブユニットリストに登録される。
【0080】
図12は、uEND命令を実行するためのプログラムフローチャートである。uEND命令が実行されると、S430およびS432においてuEND命令のあるユニットルーチンのプログラムカウンタおよびフレームカウンタがアクティブユニットリスト上から削除される。また、S434において対応ワークエリアのメモリ領域が開放され、対応ワークアドレスがアクティブユニットリスト上から削除される。
【0081】
さらに、S436において、uEND命令のあるユニットルーチンと対応関係にある(例えば、共通のワークエリアを持つ)アニメルーチンが検索され、S438において、発見されたアニメルーチンのプログラムカウンタ,フレームカウンタおよび対応ワークアドレスがアクティブユニットリスト上から削除される。
【0082】
図13は、uJUMP命令を実行するためのプログラムフローチャートである。uJUMP命令が実行されると、S440において、パラメータに記述された指定アドレスが、実行中のルーチンに対応するプログラムカウンタにセットされる。これにより次の命令実行時には、指定アドレスから命令フェッチを行うようになる。
【0083】
図14は、uMOVE命令を実行するためのプログラムフローチャートである。uMOVE命令が実行されると、S450において当該uMOVEコマンドが第1回目の実行であるか否かが判断される。第1回目の実行時の場合には、S452において移動パラメータのセットが行なわれる。もし、移動パラメータが最終到達座標である場合には、ここで速度ベクトルが計算され、対応ワークエリアに保存される。また、移動パラメータが速度ベクトルそのものである場合には、単に対応ワークエリアに速度ベクトルを書き移す。
【0084】
第2回目以降の実行時には、S454において対応ワークエリア上の位置データと、第1回目の実行時に保存された速度ベクトルが加算され、新たな位置データとして記憶される。与えられた移動パラメータが速度ベクトルであるか最終到達座標であるかは、専用の識別フラグをパラメータに加えることによって区別してもよいし、uMOVE命令とは異なる命令を用意することにより、一方を速度ベクトル用の命令、他方を最終到達座標用の命令として区別してもよい。
【0085】
図15は、uPOSE命令を実行するためのプログラムフローチャートである。uPOSE命令が実行されると、S460において対応ワークエリアからオブジェクト位置データが読み出され、S462において読み出されたオブジェクト位置と、指定されたオブジェクト描画データに基づいてオブジェクトが表示される。ただし、この段階では単に表示バッファに表示に必要なデータを転送する作業のみが行なわれ、実際のビデオRAMへの書き込みはブランキング処理においてなされる。
【0086】
これらの命令はほんの一例であり、実際にはより多くの、またより複雑な命令が準備される。しかしながら、本願のプログラム処理方法の構成上、プログラムの流れを制御するための命令は従来のプログラム記述言語に比べて極めて少なくできる。そのため、プログラムそのものは、オブジェクトの移動制御あるいはアニメーション制御のための複雑な命令を準備しても構造的に単純であるため、初心者でも容易にプログラムを作成可能である。
【0087】
以上は本願発明を衛星放送を利用したデータ放送で行う例について述べたが、本願のプログラム処理方法によれば簡単なアニメーションプログラムを大量に作成するのに便利であるため、単方向大量通信用のプログラムにおいてその効果を最大限に発揮する。しかし、本願は、広く一般的にプログラムを入力してアニメーションを表示する機器すべてに応用することが可能である。また、本願実施例では、アニメーションプログラムを実行するためにインタプリタを用いたが、コンパイラを用いて実行形式のプログラムに変換した後にこれを実行するようにしてもよい。
【0088】
【発明の効果】
本願発明を用いると、時間的に各サブルーチンに関連を持たせたマルチタスク処理により自動的に経過時間の統合が行なわれる。そのため、初心者や未熟なプログラマーでも物体個々の動きを記述するだけで容易にコンピュータグラフィックスを用いたアニメーション表示プログラムを作成可能である。
【0089】
また、1つのルーチンから他の複数のルーチンを起動できるため、ドミノ倒しのように連鎖的に各ルーチン処理が実行に移される。したがって、特別なプログラムフロー制御命令を用いることなく、簡単なプログラムで複雑なアニメーション画像を作成できる。
【0090】
また、各サブルーチンがTVフィールド周波数に関連して動作するとともに、サブルーチンに対応してオブジェクトの表示が行なわれるため、表示を変更したい場合にプログラムのどの部分を修正すべきかを容易に特定できる。すなわち、プログラムのデバッグ作業が容易である。
【0091】
さらに、オブジェクト単位で動作を指定すればそのままアニメーションプログラムとして利用できるため、対話形式でオブジェクトの動作を指定するようなアニメーションプログラム作成ツールの開発が容易である。このため、アニメーションプログラムが簡便に作成可能となる。
【0092】
このように、初心者でも簡便にプログラムを作成できる本願のプログラム処理方法は、比較的小規模なアニメーションプログラムを大量に必要とするデータ放送等に好適する。これによって放送局は、放送用のデータを大量に、しかも安価に入手可能となる。
【図面の簡単な説明】
【図1】従来のサブルーチンを用いた場合のプログラムフローである。
【図2】アニメーション画像の一例である。
【図3】本願発明のアニメーション表示装置の一例のブロック図である。
【図4】本願発明のプログラム処理方法の概念図である。
【図5】本願発明のプログラム処理方法を用いた場合のプログラムフローである。
【図6】具体的なアニメーション表示プログラムの一例である。
【図7】本願のプログラム処理方法を実現するためのメモリマップの一例である。
【図8】本願のプログラム処理方法の全体的な流れを示すフローチャートである。
【図9】ユニット処理のフローチャートである。
【図10】uPUT命令を実行するためのプログラムフローチャートである。
【図11】uANIME命令を実行するためのプログラムフローチャートである。
【図12】uEND命令を実行するためのプログラムフローチャートである。
【図13】uJUMP命令を実行するためのプログラムフローチャートである。
【図14】uMOVE命令を実行するためのプログラムフローチャートである。
【図15】uPOSE命令を実行するためのプログラムフローチャートである。
[0001]
[Industrial application fields]
The present invention relates to a program processing method and an animation display device using the program processing method, and more particularly to a program processing method and an animation display device for displaying an animation image by computer graphics, for example. More specifically, the display sequence can be easily defined when a beginner creates a small animation video.
[0002]
[Prior art]
Conventional program description languages include BASIC and C language. These are general-purpose program description languages for creating programs for personal computers, and are widely used not only for animation display but also for program development such as databases, word processors, and spreadsheet software.
[0003]
These program description languages include arithmetic instructions, I / O control instructions, and branch instructions. The I / O control command includes a display control command, a floppy disk control command, a printer control command, a network control command, and the like. Skilled programmers can combine these instructions to create large and complex programs.
[0004]
The branch instruction includes an absolute branch instruction, a conditional branch instruction, a loop instruction, a subroutine instruction, and the like. The subroutine instruction includes a subroutine call instruction and a return instruction, and is used for structuring the program. The programmer classifies each part of the program functionally and organizes it as a subroutine. The subroutine is called from the main routine or from the subroutine using a subroutine call instruction, and is used for a specific process. The called subroutine is controlled to return to the original program (that is, the program in which the subroutine call instruction is executed) by terminating the process by a return instruction installed at the end.
[0005]
FIG. 1 shows a program flow when a conventional subroutine is used. As shown in FIG. 1, the flow of the conventional program shifts from the main routine to a subroutine, and after returning to the main routine again after completing a predetermined process. Such a subroutine method is considered as a regression subroutine. According to this method, since the program flow path is uniquely determined, it is easy for the programmer to grasp the flow of processing, and it is relatively easy to correct the program (hereinafter referred to as debugging) when a problem occurs. It can be carried out.
[0006]
On the other hand, there is a technique called multitasking as a processing method other than the program processing by the combination of the main routine and the subroutine. Multitasking is a technique of operating a plurality of programs in parallel in a time-sharing manner. By using this, a plurality of programs are processed as if they are being executed simultaneously. This technique is used when, for example, another sentence is printed while editing a sentence in a word processor.
[0007]
[Problems to be solved by the invention]
A conventional program description language is suitable for a skilled programmer to create a large-scale and complicated program. However, when a beginner uses this to display a simple animation image, a great skill is required. This is because these program description languages cannot use display control instructions effectively unless they are familiar with branch instructions for controlling the flow of programs. Therefore, there is a need for a method for easily creating a relatively simple animation video program in large quantities. For example, in data broadcasting represented by satellite data broadcasting and teletext broadcasting, the broadcasting station is always obligated to supply data to viewers, so that it is required to create a program quickly and easily. With ordinary TV broadcasting, it is possible to create data relatively easily with a TV camera. However, with data broadcasting, the source of data depends on skilled programmers, and the creation of data is significant. Takes time.
[0008]
Further, since the conventional program description language has a program structure that is easy for a CPU of a computer to process, it has a logical structure that is different from a normal human thought form. For example, when the animation image shown in FIG. 2 is generated, in the human thought form, “when the arrow 100 flying from left to right hits the board 102 flying from right to left, the arrow 100 penetrates straight. , The plate 102 is divided into two parts, one (104) flying while rotating to the upper left and the other (106) rotating to the lower left. " . On the other hand, in the conventional program description language, “where each arrow 100, plate 102, and divided plates 104 and 106 exist in the entire time progress” is continuous. Because changes in the coordinate positions of all objects over time are important, programmers need to integrate the movements of individual objects based on the time axis. A skilled programmer can unconsciously integrate the movements of individual objects over time and easily express them in a program description language. However, it is difficult for beginners to conceptually understand this integration over time, and it is difficult to create a program that operates normally unless they are highly skilled.
[0009]
The reason why integration over time is necessary is the regression subroutine. A regression subroutine such as a conventional program description language is convenient for following the flow of a program, but on the other hand, different subroutines cannot be processed simultaneously. For example, in FIG. 2, if a subroutine for moving the arrow 100 and a subroutine for moving the plate 102 are separately programmed, the arrows 100 and the plate 102 cannot be moved simultaneously because they cannot be processed simultaneously. In this case, it is necessary to create an integrated program in which arrows and boards are integrated on the time axis so that the two subroutines are processed in a time-sharing manner.
[0010]
On the other hand, an initial attempt has been made to simultaneously process a plurality of subroutines using multitasking. In the above word processor, two subroutines of sentence editing and sentence printing are simultaneously processed by multitask processing. However, in the conventional multitask processing, there is no relationship between the subroutines, and the two subroutines are simply processed in parallel. Therefore, for example, even if a program for moving an arrow and a program for moving a plate cannot be prepared, it is not possible to adjust each time axis direction. Therefore, an object that eventually desires a switching timing from one program to another It is necessary to adjust for each program so that is displayed.
[0011]
Therefore, in the conventional multitask processing, the switching timing of the time division processing is arbitrarily determined by each subroutine, and thus the overall progress of the program cannot be uniquely determined. Therefore, if each subroutine is associated and many subroutines are operated at the same time, there is a problem in that it is difficult to determine at which timing a specific process is performed and debugging becomes difficult.
[0012]
SUMMARY OF THE INVENTION Therefore, an object of the present invention is to provide a program processing method and an animation display device that enable even a beginner or an inexperienced programmer to easily create a relatively small-scale animation display program using computer graphics. That is.
[0013]
Another object of the present invention is to provide a program processing method and an animation display device that are easy to debug while temporally associating individual non-regressive subroutines.
[0014]
[Means for Solving the Problems]
A program processing method according to a first aspect of the present invention is a program processing method used for displaying an animation image on a display by computer graphics. A plurality of program routines (UNIT1 to UNIT4 in FIG. 6) corresponding to display objects; A step (S1, S2) of inputting an animation program having an entry routine (UNIT0) including a start command for starting a program routine corresponding to at least one display object, and a step of starting the entry routine (S3) In response to an activation command included in the entry routine, a step of activating a program routine corresponding to the display object (S44 in FIG. 9); A part of the program routine is time-divisionally processed to generate objects corresponding to the respective program routines (S460 and S462 in FIG. 15) and a step of displaying the generated objects as one display unit (FIG. 8). S6)And a program routine corresponding to at least one display object includes a start instruction for newly starting the program routine corresponding to the display object in order to newly display another display object, and responds to the start instruction. Step for displaying other display objects newlyincluding.
[0015]
An animation display device according to a second aspect of the present invention is used for displaying an animation image on a display by computer graphics, and includes a plurality of program routines corresponding to display objects and activation corresponding to at least one display object. Input means for inputting an animation program including instructions (broadcast receiving adapter 4 if the correspondence with the embodiment is shown), storage means for storing the animation program (memory pack 7), and the program routine to be executed The identification data storage means (active unit storage area in FIG. 7) for storing the identification data to be identified and the animation program are executed so that the identification data of the corresponding program routine in response to the activation command is stored in the identification data storage. Processing means (CPU 24) for time-division processing of a plurality of program routines stored in the means and based on the identification data, and a display object generated corresponding to each of the plurality of program routines by the time-division processing of the processing means Display image output means (PPU 28) for synthesizing and outputting to the display as one display unit;And a program routine corresponding to at least one display object includes a start instruction for newly starting the program routine corresponding to the display object in order to newly display another display object, and responds to the start instruction And means for newly displaying other display objectsIs provided.
[0016]
[Action]
An animation program is input from a keyboard, an external storage medium, a modem, or a data broadcast receiver. The animation program includes a plurality of program routines corresponding to the display object and an entry routine for starting the operation. Next, the animation display device starts an entry routine. The entry routine includes a program routine activation instruction. By this activation command, a program routine corresponding to the display object is activated. By processing these multiple program routines in a time-sharing manner, multiple object images are generated simultaneously.Further, it is possible to display another new display object from the display object program routine, and to easily adjust the display timing between the two display objects.When the time division process is completed, the animation display device displays the generated object image on the display as display data for one screen.
[0017]
The input means inputs an animation program. The storage means stores the animation program input by the input means. In response to the start command included in the animation program stored in the storage means, the processing means registers the identification data of the program routine to be executed in the identification data storage means, and the program routine is divided into time divisions based on this registration information. To process. Each processed program routine generates a corresponding object, and the display image output means outputs the generated objects to the display as display data for one screen.Further, it is possible to display another new display object from the display object program routine, and to easily adjust the display timing between the two display objects.
[0018]
The program routine displays the corresponding object image. The plurality of program routines are executed in a time division manner. Therefore, a plurality of objects are automatically displayed simultaneously only by creating a program routine for each object.Further, it is possible to display another new display object from the display object program routine, and to easily adjust the display timing between the two display objects.For this reason, even a beginner can easily create an animation image. Even when it is desired to change the display of the object, the program routine can be changed easily because the program routine corresponds to the object.
[0019]
The objects, features and advantages of the present invention will become more apparent from the following detailed description of embodiments with reference to the drawings.
[0020]
【Example】
FIG. 3 is a block diagram of an example of the animation display device of the present invention. The animation display device of this embodiment receives satellite data broadcast by connecting a broadcast receiving adapter to a game machine, and reproduces animation video based on the received data. Specifically, a broadcast receiving adapter 4, a memory cartridge 6, and a controller 8 are connected to a game machine 2 as an example of an animation display device (image display device). A memory pack 7 for storing received data is connected to the memory cartridge 6. The controller 8 is used for a user to input operation information.
[0021]
The BS antenna 10 receives satellite data broadcast and gives the received data to the BS tuner 12. The BS tuner 12 detects a specific channel from a plurality of satellite broadcasts, and outputs a PCM digital audio signal and digital data transmitted by a subcarrier to the broadcast receiving adapter 4. The PCM decoder 22 decodes the PCM digital audio signal supplied from the BS tuner 12, generates an analog stereo audio signal via the DA converter 23, and outputs the analog stereo audio signal to the mixer 38 in the game machine 2. The data channel decoder 20 decodes the digital data given from the BS tuner 12.
[0022]
The ROM 46 in the cartridge 6 stores an interpreter program for executing an animation display program in addition to the data broadcast receiving program. The CPU 24 in the game machine 2 designates digital data to be received to the data channel decoder 20 based on the data broadcast reception program stored in the ROM 46. The data channel decoder 20 decodes only the digital data designated by the CPU 24 and stores it in the internal buffer. The CPU 24 periodically monitors the data channel decoder 20 and transfers the received data to any one of the work RAM 26, PS-RAM 44, S-RAM 42 or flash memory 49 when the data is received.
[0023]
The destination memory is determined by the type of received data. For example, the CPU 24 stores frequently received broadcast data such as a broadcast menu in the work RAM 26 or PS-RAM 44 which is a volatile memory, stores the environment setting data in the S-RAM 42, and further displays an animation display program. Save in the flash memory 49.
[0024]
A plurality of animation display programs provided by data broadcasting are mainly stored in the flash memory 49, and are interpreted and executed by an interpreter program in the ROM 46. The memory pack 7 including the flash memory 49 is configured to be detachable by connectors 47 and 48. The animation display program may be stored in the S-RAM 42, PS-RAM 44, or WORK-RAM 26.
[0025]
Based on the operation information input from the controller 8, the CPU 24 executes one of the plurality of animation display programs using an interpreter program stored in the ROM 46 to generate image data and audio data. Image data generated by the CPU 24 is stored in the video RAM 30 via the PPU 28. The audio data generated by the CPU 24 is stored in the audio RAM 36 via the APU 34.
[0026]
The PPU 28 generates a video signal in cooperation with the DA converter 31 and the video encoder 32 based on the data in the video RAM 30 and supplies the video signal to the TV 14. The PPU 28 generates an interrupt signal to the CPU 24 in synchronization with the vertical blanking signal of the TV. The APU 34 generates an audio signal in cooperation with the DA converter 37 based on the data in the audio RAM 36 and outputs the audio signal to the mixer 38. The mixer 38 synthesizes the audio signal from the DA converter 37 and the audio signal from the PCM decoder 22, and supplies the synthesized signal to the TV 14.
[0027]
FIG. 4 is a conceptual diagram of the program processing method of the present invention. The main program 50 is given a program counter 50a, a frame counter 50b and a corresponding work area 50c at the time of execution. The main program 50 activates the same number of unit programs as the required objects when displaying the objects. For example, when the number of display objects is 2, the unit programs 52 and 54 are activated as shown in FIG.
[0028]
The unit program 52 includes a unit routine 52a that mainly controls the movement of the display object, and an animation routine 52b that mainly controls the animation pattern of the display object. The unit routine 52a and the animation routine 52b are respectively provided with program counters 52aa and 52ba, frame counters 52ab and 52bb, and corresponding work areas 52ac and 52bc at the time of execution.
[0029]
The program counter is a pointer indicating the position of an instruction to be executed in the corresponding routine or program, and is updated each time the instruction proceeds. The frame counter is a sequence counter for controlling the display sequence of the object to be displayed, and is updated corresponding to the vertical blanking of the TV. The corresponding work area is an address value indicating a memory area in which data indicating the position and attribute of the object to be displayed is stored. Unit routines and animation routines are given the same corresponding work area and share various data necessary to display objects. The program pointer, frame counter, and corresponding work area are stored, for example, on the work RAM 26 of FIG.
[0030]
The unit program 54 has the same internal configuration as the unit program 52. When the unit program is activated, the main program and the unit routine and animation routine of each unit program are processed in parallel by the multitask method.
[0031]
When the object of FIG. 2 is made to correspond to FIG. 4, the unit program 52 can correspond to the arrow 100 and the unit program 54 can correspond to the plate 102. At this point, since the unit programs 52 and 54 are operating in parallel, the arrow program and the board program created separately are processed simultaneously. Specifically, as the arrow moves from left to right, the board moves from right to left. Since the progress of each program is controlled by the frame counter in synchronization with the vertical blanking of the TV, it is not necessary to adjust the operation speed between unit programs.
[0032]
The unit program 54 generates unit programs 56 and 58 having the same structure immediately before the end of the program. That is, the unit program 54 generates split plate pieces 104 and 105 when the plate 102 hits the arrow 100 and disappears. At this time, the unit program to be processed in parallel is only the arrow 100 and the divided plates 104 and 105, and each object is displayed according to the animation program for each object created separately.
[0033]
Here, when the image that the arrow 100 is broken in two is required, a broken arrow display program is separately created, and an instruction for starting the broken arrow display program is issued to the unit routine 52 corresponding to the arrow 100. You can include it. In addition, when a new object is generated regardless of the already displayed object, an activation command for the program may be included in the main program.
[0034]
As described above, according to the present invention, it is possible to generate an animation image in which each object is interlocked by simply creating a program by paying attention to each object. There is no need to integrate programs, and even beginners can easily create programs.
[0035]
FIG. 5 is a program flow when the program processing method of the present invention is used. The main program 50 generates unit programs 52 and 54, and the unit program 54 generates unit programs 56 and 58. Programs arranged in the vertical direction in the figure are simultaneously processed by multitasking. The unit program 54 is activated later than the unit program 52, but since this time difference is much smaller than one field of TV (that is, about 16.7 mS), there is no time difference in actual display. The same applies to the unit program 56 and the unit program 56.
[0036]
The main program 50 may end the process when the unit program 54 is generated. However, in order to manage the entire time, the main program 50 executes a non-execution instruction (nop instruction) for a predetermined time, and then ends the program. An end mark display unit program that means The main program 50 may be associated with an animation routine so that the marker moves on the screen. By doing so, it is possible to visually confirm how the time of execution is advanced.
[0037]
FIG. 6 shows an example of a specific animation display program. The main program 50 includes a uPUT instruction that is an instruction for starting the unit program. This uPUT instruction requires three parameters. The first parameter is the start address (UNIT1 and UNIT2) of the unit routine, the second parameter is the initial horizontal coordinate (X1 and X2) of the object processed by the unit, and the third parameter is the same The initial vertical coordinates (Y1 and Y2) of the object.
[0038]
When a unit routine is activated by the uPUT instruction, the program counter, frame counter and corresponding work area dedicated to the unit routine are registered in the active unit list, the start address of the unit routine is set in the program counter, and the initial value of the object Coordinates are set in the corresponding work area. The active unit list is a list of program routines to be simultaneously processed by multitasking, and is mainly provided in the work RAM 26. Note that these unit routines are not yet executed when they are registered in the active unit list. Since the uPUT instruction is not a long-term instruction extending over a plurality of frames, the main routine 50 immediately ends the processing by the uEND instruction after starting the two unit routines.
[0039]
When the main routine 50 ends, the active unit list is searched, and the processing of the unit routine 52a, which is the next execution program, is started. The unit routine 52a includes a uATIME instruction that is an instruction for starting an animation routine, and a uMOVE instruction that is an instruction for moving an object. The uAIME instruction has the start address (A) of the animation routine as a parameter, and the uMOVE instruction has the number of processing frames (M) and the movement parameters (I1, J1) as parameters.
[0040]
When the uAIME instruction is executed, like the uPUT instruction, the program counter and frame counter dedicated to the animation routine are registered in the active unit list, and the start address of the unit routine is set in the program counter. A corresponding work area common to the unit routine having the uATIME instruction is assigned to the animation routine. Since the uAIME instruction is not a long-term instruction like the uPUT instruction, the next uMOVE instruction is executed immediately after the animation routine is started.
[0041]
When the uMOVE instruction is executed, the designated number of processing frames is set in the frame counter, and a movement parameter given in the form of a velocity vector is added to the object position data in the corresponding work memory. This changes the position of the object. Since the uMOVE instruction is a long-term instruction, it involves control of the frame counter. After the movement parameter is added, the frame counter is decremented. If the value of the frame counter is 0, the next instruction is processed. If it is not 0, the processing of the unit routine 52a is suspended and the active unit list is searched. The processing of the unit routine 54a, which is the execution program, is started.
[0042]
Similar to the unit routine 52a, the unit routine 54a activates the animation routine 54b by the uATIME instruction and then changes the position of the object by the uMOVE instruction. The frame counter provided for the unit routine 54a is decremented to determine whether to execute the next instruction or to put the processing of the unit routine 54a on hold. When the process of the unit routine 54a is put on hold, the active unit list is searched, and the process of the animation routine 52b which is the next execution program is started.
[0043]
The animation routine 52b includes a uPOSE instruction. The uPOSE instruction has the number of processing frames “8” and the display data storage address (DA1) as parameters. When the uPOSE instruction is executed, the number of processing frames is set in the frame counter provided for the animation routine 52b, and the object image data stored in DA1 is transferred to the display buffer based on the object position data in the corresponding work area. .
[0044]
The uPOSE instruction is a long-term instruction, and after the object image is displayed, the frame counter is decremented to determine whether to execute the next instruction or to suspend the processing of the animation routine 52b. When the processing of the unit routine 54a is put on hold, the processing of the animation routine 54b that is the next execution program is started. In the animation routine 54b, the uPOSE instruction is executed in the same manner as the animation routine 52b, and the corresponding object image data (DB1) is transferred to the display buffer. Thereafter, the frame counter is decremented to determine whether to execute the next instruction or to suspend the processing of the animation routine 54b.
[0045]
When the processing of the animation routine 54b is put on hold, the execution of the program routine registered in the active unit list is completed. Here, these animation programs maintain the hold state until the vertical blanking of the TV occurs and the blanking process is performed. In the blanking process, the image data written in the display buffer is transferred to the video RAM, and the image data transferred in the next frame is displayed.
[0046]
When the blanking process ends, the process of the unit routine 52a is resumed. Here, it should be noted that the main program 50 has already finished processing. Since the main program 50 has been deregistered from the active unit list by the uEND instruction, it has already been excluded from the multitask processing.
[0047]
The unit routine 52a executes the same uMOVE instruction as the previous time. However, in this case, the number of processing frames (M) is not set in the frame counter. The frame counter stores the number of frames decremented last time. When the uMOVE instruction changes the position of the object, the frame counter is decremented again. As described above, in the long-term command, the frame counter is decremented in synchronization with the TV field, and the same processing is repeated until the value of the frame counter becomes zero.
[0048]
Similarly, the uMOVE instruction is repeated in the unit routine 54b, and the uPOSE instruction is repeated in the animation routines 52b and 54b until the corresponding frame counter value becomes zero. Here, when the instruction of each routine is repeatedly processed eight times, the uPOSE instruction of the animation routine 52b sets the frame counter to 0 first. When the frame counter reaches 0 in the animation routine 52b, the corresponding program counter is incremented and the next instruction is executed.
[0049]
The next is also a uPOSE instruction, but the object image data changes from DA1 to DA2. Further, the two uPOSE instructions are repeatedly executed by the next uJUMP instruction. Thereby, the animation routine 52b displays DA1 and DA2 alternately every 8 fields, and controls an animation image related to the shape of the object.
[0050]
When the TV field has passed M times, the next uMOVE instruction is executed in the unit routine 52a, and two uPUT instructions and uEND instructions are executed successively in the unit routine 54a. The unit routine 56a is activated by one uPUT instruction, and the unit routine 58a is activated by the other uPUT instruction. Both unit routines activate the corresponding animation routines 56b and 58b, respectively, so that the object image DB1 disappears, and at the same time, object images represented by DC1 to DC4 and object object images represented by DD1 to DD4 appear.
[0051]
The above program is an example of a program for displaying the picture of FIG. 2. The unit routine 52a and the animation routine 52b correspond to the arrow program, the unit routine 54a and the animation routine 54b correspond to the board program, and the unit routine. 56a, 58a and animation routines 56b and 58b correspond to the program of the divided board.
[0052]
According to such a program processing method, the division control of the plate is automatically determined by the program structure, and the collision timing of the arrow and the plate is easily adjusted by the number M of processing frames. Therefore, even a beginner can easily program. Further, since the object and the processing routine clearly correspond to each other, debugging can be easily performed.
[0053]
In the uMOVE instruction, it is possible to further simplify the program creation by designating the final arrival coordinate instead of the velocity vector as the movement parameter. In this case, the velocity vector may be calculated in advance based on the number of processing frames, the current position data, and the final arrival coordinates.
[0054]
FIG. 7 is an example of a memory map for realizing the above-described program processing method. The RAM area 60 corresponds to the work RAM 26, PS-RAM 44 and S-RAM 42 in FIG. 3, and the ROM area 62 corresponds to the ROM 46 and the flash memory 49.
[0055]
The ROM area 62 includes a program area 62a and an object drawing data area 62b. The program area 62a includes a main program 50, unit routines 52a, 54a, 56a, 58a, and animation routines 52b, 54b, 56b, and 58b. The object drawing data area 62b includes object drawing data DA1, DA2, DB1, DC1, DC2, DC3, DC4, DD1, DD2, DD3 and DD4. These routines and data are transmitted mainly by data broadcasting and stored in the flash memory 49. However, by storing object drawing data frequently used in the ROM 46 in advance, the amount of data to be transmitted can be reduced.
[0056]
Each instruction of the main routine, unit routine, and animation routine is transmitted and stored as an intermediate language. For example, the aforementioned uPUT instruction is stored as the instruction code 01H. As a result, each routine is transmitted at a high speed and stored in the flash memory 49 with a small storage capacity.
[0057]
The ROM area 62 includes an interpreter area 62c that stores an interpreter program for executing the above-described various programs using multitasking. The interpreter area 62c is mainly allocated in the ROM 46, but may be provided in the flash memory 49 when the interpreter program is transmitted by broadcasting. Further, an interpreter program main body including basic instructions may be stored on the ROM 46, and a sub-interpreter including instructions to be added transmitted by broadcasting may be stored on the flash memory 49. In this case, the sub-interpreter is used from the interpreter body in a timely manner.
[0058]
The RAM area 60 includes an active unit list storage area 60a, a corresponding work area storage area 60b, and an execution unit pointer area 60c. The active unit list area 60a includes a program counter, a frame counter, and a corresponding work address corresponding to each unit program.
[0059]
The corresponding work area storage area 60b stores data indicating the position and attributes of the unit. The execution unit pointer 60c stores an address on the active unit list corresponding to the unit program being executed. The execution unit pointer 60c is reset in synchronization with the vertical blanking of the TV, and is incremented in response to the unit program disappearing or the processing being suspended. As a result, addresses on the active unit list of the unit routine or animation routine to be executed next are sequentially designated.
[0060]
For the unit program to be executed, a dedicated program counter and a frame counter are registered in the active unit list area 60a, a dedicated work area is assigned to the corresponding work area area, and a corresponding work address indicating the assigned work area area is set. It is activated by being registered in the active unit list.
[0061]
In response to the activated unit program being sequentially scanned by the execution unit pointer 60c, the program on the corresponding ROM area 62 is executed. The main routine, unit routine, and animation routine are all treated as equivalent multitask programs on the active unit list, and are executed in the order of registration in the list.
[0062]
Here, it should be noted that each animation routine is started from the unit routine. This is because the animation routine always lags the registration on the active unit list than the corresponding unit routine. Therefore, after the position of the object is changed by the unit routine, the object is displayed at the position by the animation routine.
[0063]
By applying this, a single object may be formed by combining a plurality of object drawing data by associating a plurality of animation routines with a single unit routine. Even in this case, since the corresponding work addresses are all given in common to the animation routines, the plurality of object drawing data move on the screen while relatively maintaining a predetermined position.
[0064]
There may be a unit routine that does not have an animation routine. For example, the unit routine may have a sound generation program for generating BGM. The unit routine may have a program for generating a data broadcast reception menu when the button is pressed by monitoring the controller 8. In either case, since it is a unit routine unrelated to the image, it is not necessary to specify an animation routine.
[0065]
Furthermore, it is also possible to configure so as not to have a dedicated animation routine by incorporating the animation routine in the unit routine. For example, when there is only one corresponding object drawing data (DB1 in FIG. 6) as in the board in FIG. 2, the POSE instruction can be directly described in the unit routine instead of the ANIME instruction.
[0066]
In this case, in the corresponding work area of the unit routine, a flag indicating that it is a built-in animation routine and an address indicating the position of an instruction to be executed (for example, a POSE instruction) are stored. In operation, after completion of the processing of the unit routine, this flag is referred to and an object is displayed by executing an instruction at a designated address.
[0067]
Further, similarly to the built-in animation routine, an animation routine composed of a plurality of instructions may be processed using the corresponding work area. In this case, the animation routine is not registered on the active unit list, and a frame counter for the animation routine is provided along with the program counter of the animation routine on the corresponding work area. At the end of the unit routine, the program counter and the frame counter are referred to, and the corresponding animation routine is automatically executed.
[0068]
FIG. 8 is a flowchart showing the overall flow of the program processing method of the present application. When the animation display device is turned on, the animation program is received via the broadcast receiving adapter 4 (FIG. 3) in S1. The received animation program is stored in the memory pack 7 (FIG. 3) in S2, and activated by the CPU 24 (FIG. 3) in S3.
[0069]
When the animation program is started in S3, the main program 50 (FIG. 4) which is an entry routine is executed in S4. The main program 50 activates the unit programs 52 and 54 (FIG. 4) in S4. The activated unit programs 52 and 54 are time-division processed together with the main program 50 in S4. In S4, the unit program 54 activates the unit programs 56 and 58 and is time-division processed. A series of processing of S4 is called unit processing, and details thereof will be described later with reference to FIG.
[0070]
In S4, each program generates a corresponding display object together with activation control of other programs. When the time division processing in S4 is completed, a plurality of display objects generated in S6 are displayed as image data for one screen. Actually, S6 corresponds to the blanking process described above, and transfers the image data to the video RAM 30 (FIG. 3) and displays the image data. The unit processing of S4 and the blanking processing of S6 are executed alternately corresponding to the TV field frequency.
[0071]
FIG. 9 is a flowchart of unit processing. Unit processing is performed by an interpreter that manages an active unit list and executes each unit program. The interpreter executes each unit program in accordance with the registered contents of the active unit list, and registers a designated program in the active unit list in accordance with an activation instruction in each unit program. Then, the interpreter further executes the newly registered unit program.
[0072]
In unit processing, the unit pointer is first initialized in S41, and the first unit program registered in the active unit list is designated. Next, the program counter of the designated active unit is referred to in S42, and the instruction indicated by the program counter is fetched in S43. The fetched instruction is executed in S44.
[0073]
If the instruction executed in S44 is an instruction that means the end of the routine (for example, a uEND instruction), the process proceeds from S45 to S51. If not, the process moves from S45 to S46, and it is checked whether the instruction executed in S44 is a long-term instruction. If the instruction executed in S44 is an immediate execution instruction such as uPUT, the process proceeds from S46 to S47, the program counter is incremented to the next instruction position, and the process from S43 is repeated again. .
[0074]
If the instruction executed in S44 is a long-term instruction such as uMOVE, for example, frame counter control is performed in S48. If the value of the frame counter is 0, the number of processed frames, which is a parameter of the long-term command executed in S44, is set in the frame counter, and the value of the frame counter is decremented. If the value of the frame counter is not 0, only decrement is performed.
[0075]
If the frame counter changes from 1 to 0 by decrementing in S48, it means that the execution of the long-term instruction has been performed for the designated number of processing frames. Therefore, in this case, the process proceeds from S49 to S50 as a command end, and the program counter is incremented. If the value of the frame counter does not become 0 due to decrement, it means that the long-term instruction has not been processed for the designated number of times, and the process proceeds from S49 to S51, and the program counter is Hold as it is.
[0076]
In step S51, the unit pointer is incremented to indicate the program counter position of the next routine on the active unit list. If there is a next routine in the active unit list, the process proceeds from S52 to S42, and the next routine is processed in the same manner as described above. If there is no next routine in the active unit list, the process proceeds from S52 to S53 as a unit end, and the unit process ends after waiting for vertical blanking.
[0077]
As soon as the unit processing ends, the blanking processing is executed. Further, immediately after the blanking process is completed, the unit process is executed again. If the processing time of the unit processing exceeds the TV field display period, the routine processing of the active unit list is completed using a plurality of TV fields. Even in this case, since synchronization with the vertical blanking is finally taken in S53, the frame count speed between the routines does not vary as a result, and the unit processing is always executed in synchronization with the TV field.
[0078]
FIG. 10 is a program flowchart for executing the uPUT instruction in S44 of FIG. When the uPUT instruction is executed, the activation address described in the parameter is registered as a program counter on the active unit list in S410, and a dedicated frame counter is prepared in S412. In S414, a corresponding work area is secured and the corresponding work address is registered in the active unit list. Further, the initial position data of the object given as a parameter is stored in the corresponding work area.
[0079]
FIG. 11 is a program flowchart for executing the uATIME instruction. When the uAIME instruction is executed, the activation address described in the parameter in S420 is registered on the active unit list as a program counter, and a dedicated frame counter is prepared in S422. In S424, the same corresponding work area address as that of the unit routine having the uATIME instruction is registered in the active unit list.
[0080]
FIG. 12 is a program flowchart for executing the uEND instruction. When the uEND instruction is executed, the program counter and the frame counter of the unit routine having the uEND instruction are deleted from the active unit list in S430 and S432. In S434, the memory area of the corresponding work area is released, and the corresponding work address is deleted from the active unit list.
[0081]
Further, in S436, an animation routine corresponding to the unit routine having the uEND instruction (for example, having a common work area) is searched. In S438, the program counter, frame counter, and corresponding work address of the found animation routine are found. Is deleted from the active unit list.
[0082]
FIG. 13 is a program flowchart for executing the uJUMP instruction. When the uJUMP instruction is executed, the designated address described in the parameter is set in the program counter corresponding to the routine being executed in S440. As a result, when the next instruction is executed, the instruction is fetched from the designated address.
[0083]
FIG. 14 is a program flowchart for executing the uMOVE instruction. When the uMOVE instruction is executed, it is determined in S450 whether or not the uMOVE command is the first execution. In the case of the first execution, the movement parameter is set in S452. If the movement parameter is the final arrival coordinate, the velocity vector is calculated here and stored in the corresponding work area. If the movement parameter is the speed vector itself, the speed vector is simply transferred to the corresponding work area.
[0084]
In the second and subsequent executions, the position data on the corresponding work area in S454 and the velocity vector saved in the first execution are added and stored as new position data. Whether a given movement parameter is a velocity vector or a final arrival coordinate may be distinguished by adding a dedicated identification flag to the parameter, or by preparing a command different from the uMOVE command, A command for vector and the other may be distinguished as a command for final arrival coordinates.
[0085]
FIG. 15 is a program flowchart for executing the uPOSE instruction. When the uPOSE instruction is executed, the object position data is read from the corresponding work area in S460, and the object is displayed based on the object position read in S462 and the designated object drawing data. However, at this stage, only the operation of transferring the data necessary for display to the display buffer is performed, and the actual writing to the video RAM is performed in the blanking process.
[0086]
These instructions are just an example, and in fact more and more complex instructions are prepared. However, because of the configuration of the program processing method of the present application, the number of instructions for controlling the flow of the program can be extremely small as compared with the conventional program description language. For this reason, the program itself is structurally simple even if a complicated command for object movement control or animation control is prepared, so that even a beginner can easily create a program.
[0087]
The above has described an example in which the present invention is performed by data broadcasting using satellite broadcasting. However, according to the program processing method of the present application, it is convenient to create a large amount of simple animation programs. Make the most of the effect in the program. However, the present application can be applied to all devices that display an animation by inputting a program widely and generally. In the embodiment of the present application, an interpreter is used to execute an animation program. However, it may be executed after being converted into an executable program using a compiler.
[0088]
【The invention's effect】
When the present invention is used, the elapsed time is automatically integrated by multitask processing in which each subroutine is temporally related. Therefore, even a beginner or an inexperienced programmer can easily create an animation display program using computer graphics simply by describing the movement of each object.
[0089]
In addition, since a plurality of other routines can be started from one routine, each routine process is shifted to execution in a chain like a domino kill. Therefore, a complex animation image can be created with a simple program without using a special program flow control command.
[0090]
In addition, each subroutine operates in relation to the TV field frequency, and an object is displayed corresponding to the subroutine. Therefore, it is possible to easily specify which part of the program should be corrected when it is desired to change the display. That is, it is easy to debug the program.
[0091]
Furthermore, since an animation program can be used as it is if an action is specified for each object, it is easy to develop an animation program creation tool that specifies an object action in an interactive format. For this reason, an animation program can be easily created.
[0092]
As described above, the program processing method of the present application that allows a beginner to easily create a program is suitable for data broadcasting that requires a large amount of relatively small animation programs. As a result, the broadcasting station can obtain a large amount of broadcasting data at a low cost.
[Brief description of the drawings]
FIG. 1 is a program flow when a conventional subroutine is used.
FIG. 2 is an example of an animation image.
FIG. 3 is a block diagram of an example of an animation display device of the present invention.
FIG. 4 is a conceptual diagram of a program processing method according to the present invention.
FIG. 5 is a program flow when the program processing method of the present invention is used.
FIG. 6 is an example of a specific animation display program.
FIG. 7 is an example of a memory map for realizing the program processing method of the present application.
FIG. 8 is a flowchart showing the overall flow of the program processing method of the present application.
FIG. 9 is a flowchart of unit processing.
FIG. 10 is a program flowchart for executing a uPUT instruction.
FIG. 11 is a flowchart of a program for executing a uAIME instruction.
FIG. 12 is a program flowchart for executing a uEND instruction.
FIG. 13 is a program flowchart for executing a uJUMP instruction.
FIG. 14 is a program flowchart for executing a uMOVE instruction.
FIG. 15 is a program flowchart for executing a uPOSE instruction.

Claims (10)

コンピュータグラフィックスによりアニメーション映像をディスプレイに表示するために用いられるプログラム処理方法であって、表示オブジェクトに対応する複数のプログラムルーチンと、少なくとも1つの表示オブジェクトに対応するプログラムルーチンを起動するための起動命令を含むエントリルーチンとを有するアニメーションプログラムを入力するステップと、前記エントリルーチンを起動するステップと、前記エントリルーチンに含まれる起動命令に応答して、前記表示オブジェクトに対応するプログラムルーチンを起動するステップと、前記プログラムルーチンが複数個起動した時に各プログラムルーチンの一部を順次時分割処理し、各プログラムルーチンに対応するオブジェクトを各々発生するステップと、発生した複数のオブジェクトを一表示単位としてディスプレイ表示するステップとを含み、少なくとも1つの前記表示オブジェクトに対応するプログラムルーチンは、他の表示オブジェクトを新たに表示するために、前記表示オブジェクトに対応するプログラムルーチンを新たに起動する起動命令を含み、さらに、この起動命令に応答して他の表示オブジェクトを新たに表示するステップと、を含むプログラム処理方法。A program processing method used for displaying an animation image on a display by computer graphics, a plurality of program routines corresponding to a display object, and an activation instruction for activating a program routine corresponding to at least one display object A step of inputting an animation program having an entry routine including: a step of starting the entry routine; and a step of starting a program routine corresponding to the display object in response to a start command included in the entry routine; When a plurality of the program routines are activated, a part of each program routine is sequentially time-sharing processed to generate objects corresponding to each program routine, And a step of displaying display as a display unit of object, a program routine corresponding to at least one of said display object, in order to newly display the other display objects, new program routine corresponding to the display object A program processing method including: a startup command to be started ; and a step of newly displaying another display object in response to the startup command . 前記表示オブジェクトに対応するプログラムルーチンは、短期的命令と長期的命令を含み、前記複数のオブジェクト画像を表示するステップは、短期的命令を処理した後には同じプログラムルーチンの次の命令を実行し、長期的命令を処理した後には当該プログラムルーチンの実行を保留して次のプログラムルーチンの実行を行うことにより時分割処理を行う特許請求の範囲請求項1に記載のプログラム処理方法。The program routine corresponding to the display object includes a short-term instruction and a long-term instruction, and the step of displaying the plurality of object images executes a next instruction of the same program routine after processing the short-term instruction. 2. The program processing method according to claim 1 , wherein after processing a long-term instruction, execution of the program routine is suspended and time division processing is performed by executing the next program routine. 前記表示オブジェクトに対応するプログラムルーチンは、主としてオブジェクトの移動を制御する移動制御ルーチンと、主としてオブジェクトの表示態様を制御する表示制御ルーチンを含み、前記複数のオブジェクト画像を表示するステップは、移動制御ルーチンと表示制御ルーチンを前記時分割処理によって各々実行することにより、対応するオブジェクト画像を表示する特許請求の範囲請求項1に記載のプログラム処理方法。The program routine corresponding to the display object includes a movement control routine that mainly controls the movement of the object, and a display control routine that mainly controls the display mode of the object. The step of displaying the plurality of object images includes the movement control routine. The program processing method according to claim 1 , wherein a corresponding object image is displayed by executing the display control routine by the time-sharing process. コンピュータグラフィックスによりアニメーション映像をディスプレイに表示するために用いられるアニメーション表示装置であって、表示オブジェクトに対応する複数のプログラムルーチンおよび少なくとも1つのオブジェクトに対応する起動命令を含むアニメーションプログラムを入力する入力手段と、前記アニメーションプログラムを記憶する記憶手段と、実行すべき前記プログラムルーチンを識別する識別データを記憶する識別データ記憶手段と、アニメーションプログラムを実行することにより、前記起動命令に応答して対応するプログラムルーチンの識別データを前記識別データ記憶手段に記憶し、識別データに基づいて複数のプログラムルーチンを時分割処理する処理手段と、前記処理手段の時分割処理によって、複数のプログラムルーチンの各々に対応して発生される表示オブジェクトを合成し、一表示単位としてディスプレイに出力する表示画像出力手段とを含み、少なくとも1つの前記表示オブジェクトに対応するプログラムルーチンは、他の表示オブジェクトを新たに表示するために、前記表示オブジェクトに対応するプログラムルーチンを新たに起動する起動命令を含み、さらに、この起動命令に応答して他の表示オブジェクトを新たに表示する手段と、を備えるアニメーション表示装置。An animation display device used for displaying an animation image on a display by computer graphics, and an input means for inputting an animation program including a plurality of program routines corresponding to display objects and an activation command corresponding to at least one object A storage unit for storing the animation program, an identification data storage unit for storing identification data for identifying the program routine to be executed, and a program corresponding to the activation command by executing the animation program Routine identification data is stored in the identification data storage means, a plurality of program routines are time-division processed based on the identification data, and a plurality of programs are processed by the time-division processing of the processing means. It synthesizes a display object that is generated corresponding to each of the ram routine, and a display image output means for outputting to the display as a display unit, the program routine corresponding to at least one of said display object, other display objects Including a start command for newly starting a program routine corresponding to the display object, and a means for newly displaying another display object in response to the start command. Display device. 前記プログラムルーチンは、複数の表示画像の出力にまたがって実行される長期的命令を含み、前記処理手段は長期的命令の実行に対応して、前記識別データ記憶手段に記憶された識別データに基づいて前記プログラムルーチンを順次実行し、前記時分割処理を達成する請求項4に記載のアニメーション表示装置。The program routine includes a long-term instruction executed across the output of a plurality of display images, and the processing means is based on identification data stored in the identification data storage means in response to execution of the long-term instruction. The animation display apparatus according to claim 4 , wherein the program routine is sequentially executed to achieve the time division processing. 前記識別データ記憶手段は、プログラムルーチン上の実行すべき命令位置を記憶するプログラムカウンタ記憶手段と、長期的命令の実行回数の計数値を記憶するフレームカウンタ記憶手段と、を含む請求項5に記載のアニメーション表示装置。Said identification data storage means according to claim 5, including a program counter storage means for storing the execution to be the instruction position on the program routine, the frame counter memory means for storing a count value of the execution times of the long-term order, the Animation display device. コンピュータグラフィックスによりアニメーション映像をディスプレイに表示するアニメーション表示装置を制御する方法であって、
表示オブジェクトに対応する複数のプログラムルーチンと、少なくとも1つの表示オブジェクトに対応するプログラムルーチンを起動するための起動命令を含むエントリルーチンとを有するアニメーションプログラムが入力されるステップと、
前記エントリルーチンを起動するステップと、
前記エントリルーチンに含まれる起動命令に応答して、前記表示オブジェクトに対応するプログラムルーチンを起動するステップと、
前記プログラムルーチンが複数個起動した時に各プログラムルーチンの一部を順次時分割処理し、各プログラムルーチンに対応するオブジェクトを各々発生するステップと、発生した複数のオブジェクトを一表示単位としてディスプレイ表示するステップとを含み、少なくとも1つの前記表示オブジェクトに対応するプログラムルーチンは、他の表示オブジェクトを新たに表示するために、前記表示オブジェクトに対応するプログラムルーチンを新たに起動する起動命令を含み、さらに、この起動命令に応答して他の表示オブジェクトを新たに表示するステップと、を含むアニメーション表示装置の制御方法。
A method for controlling an animation display device for displaying an animation image on a display by computer graphics,
Receiving an animation program having a plurality of program routines corresponding to the display object and an entry routine including an activation instruction for activating the program routine corresponding to at least one display object;
Invoking the entry routine;
Activating a program routine corresponding to the display object in response to an activation instruction included in the entry routine;
When a plurality of the program routines are activated, a part of each program routine is sequentially time-divided to generate objects corresponding to the program routines, and a step of displaying the generated objects as one display unit And a program routine corresponding to at least one of the display objects includes a start instruction for newly starting the program routine corresponding to the display object in order to newly display another display object. And a step of newly displaying another display object in response to the activation command .
コンピュータグラフィックスによりアニメーション映像をディスプレイに表示するアニメーション表示装置を制御する方法であって、
表示オブジェクトに対応するプログラムルーチンを起動するための起動命令を含むエントリルーチンを起動するステップと、
前記エントリルーチンに含まれる起動命令に応答して、前記表示オブジェクトに対応するプログラムルーチンを起動するステップと、
前記プログラムルーチンが複数個起動した時に各プログラムルーチンの一部を順次時分割処理し、各プログラムルーチンに対応するオブジェクトを各々発生するステップと、
発生した複数のオブジェクトを一表示単位としてディスプレイ表示するステップとを含み、少なくとも1つの前記表示オブジェクトに対応するプログラムルーチンは、他の表示オブジェクトを新たに表示するために、前記表示オブジェクトに対応するプログラムルーチンを新たに起動する起動命令を含み、さらに、この起動命令に応答して他の表示オブジェクトを新たに表示するステップと、を含むアニメーション表示装置の制御方法。
A method for controlling an animation display device for displaying an animation image on a display by computer graphics,
Activating an entry routine including an activation instruction for activating a program routine corresponding to the display object;
Activating a program routine corresponding to the display object in response to an activation instruction included in the entry routine;
A step of sequentially time-sharing a part of each program routine when a plurality of the program routines are activated, and generating each object corresponding to each program routine;
Displaying a plurality of generated objects as a display unit, and a program routine corresponding to at least one display object is a program corresponding to the display object in order to newly display another display object. A method for controlling an animation display device, comprising: a startup command for newly starting a routine; and a step of newly displaying another display object in response to the startup command .
前記表示オブジェクトに対応するプログラムルーチンは、短期的命令と長期的命令を含み、
前記複数のオブジェクト画像を表示するステップは、短期的命令を処理した後には同じプログラムルーチンの次の命令を実行し、長期的命令を処理した後には当該プログラムルーチンの実行を保留して次のプログラムルーチンの実行を行うことにより時分割処理を行う特許請求の範囲請求項7または8に記載のアニメーション表示装置の制御方法。
The program routine corresponding to the display object includes a short-term instruction and a long-term instruction,
The step of displaying the plurality of object images includes executing a next instruction of the same program routine after processing a short-term instruction, and suspending execution of the program routine after processing a long-term instruction. The method for controlling an animation display device according to claim 7 or 8 , wherein the time division processing is performed by executing a routine.
前記表示オブジェクトに対応するプログラムルーチンは、主としてオブジェクトの移動を制御する移動制御ルーチンと、主としてオブジェクトの表示態様を制御する表示制御ルーチンを含み、
前記複数のオブジェクト画像を表示するステップは、移動制御ルーチンと表示制御ルーチンを前記時分割処理によって各々実行することにより、対応するオブジェクト画像を表示する特許請求の範囲請求項7または8に記載のアニメーション表示装置の制御方法。
The program routine corresponding to the display object includes a movement control routine that mainly controls the movement of the object, and a display control routine that mainly controls the display mode of the object,
The animation according to claim 7 or 8 , wherein the step of displaying the plurality of object images includes displaying a corresponding object image by executing a movement control routine and a display control routine by the time division processing, respectively. Display device control method.
JP12072295A 1995-04-21 1995-04-21 Program processing method and animation display apparatus using the same Expired - Lifetime JP3734528B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP12072295A JP3734528B2 (en) 1995-04-21 1995-04-21 Program processing method and animation display apparatus using the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP12072295A JP3734528B2 (en) 1995-04-21 1995-04-21 Program processing method and animation display apparatus using the same

Publications (2)

Publication Number Publication Date
JPH08293040A JPH08293040A (en) 1996-11-05
JP3734528B2 true JP3734528B2 (en) 2006-01-11

Family

ID=14793389

Family Applications (1)

Application Number Title Priority Date Filing Date
JP12072295A Expired - Lifetime JP3734528B2 (en) 1995-04-21 1995-04-21 Program processing method and animation display apparatus using the same

Country Status (1)

Country Link
JP (1) JP3734528B2 (en)

Also Published As

Publication number Publication date
JPH08293040A (en) 1996-11-05

Similar Documents

Publication Publication Date Title
TWI406185B (en) Instant display post-processing with programmable hardware
US20030056215A1 (en) Tv pip using java api classes and java implementation classes
JP2001101440A (en) Recording medium recording animation data, image processing method using the same, and recording medium recording image processing program
EP0314440B1 (en) Graphic display system with secondary pixel image storage
EP1006440A2 (en) Display widget interaction in embedded systems using child graphics contexts
JPS6326898B2 (en)
JP3734528B2 (en) Program processing method and animation display apparatus using the same
US5423039A (en) Method and apparatus for identifying wait states and for providing a wait cursor in a computer system
US6439999B1 (en) Method for controlling execution of processing in video game, storage medium storing processing execution control program, and game apparatus
EP1011042A2 (en) Applet and application display in embedded systems using bufferless child graphics contexts
JP2002057964A (en) Projector and projection display system, and method and recording medium therefor
JP2000200178A (en) Information processor used being connected to television receiver for household
EP2600232B1 (en) Information processing device
JPH09173643A (en) Image information processing method in video game
EP1008931A2 (en) TV PIP applet implementation using a PIP framework
Kimura Hyperflow: A uniform visual language for different levels of programming
JP2906888B2 (en) Game device having radar display function and display method thereof
JP3279033B2 (en) Presentation information creation device
JPH01195505A (en) Numerical controller
JPH113236A (en) Virtual computer emulation device
JPH0334100B2 (en)
JPH06202805A (en) Position information input system
CN118860847A (en) Program debugging method, device, equipment and computer readable storage medium
Warner et al. eXpTools: A C++ class library for animation, tachistoscopic presentation, and response timing
Slonneger SAMOS in APL

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20020315

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20020315

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050301

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050418

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20050725

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050830

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20051011

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20051019

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081028

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20091028

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20091028

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20091028

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20101028

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20101028

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111028

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111028

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121028

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121028

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121028

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121028

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20131028

Year of fee payment: 8

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

EXPY Cancellation because of completion of term