JP5390680B1 - Game machine - Google Patents
Game machine Download PDFInfo
- Publication number
- JP5390680B1 JP5390680B1 JP2012238061A JP2012238061A JP5390680B1 JP 5390680 B1 JP5390680 B1 JP 5390680B1 JP 2012238061 A JP2012238061 A JP 2012238061A JP 2012238061 A JP2012238061 A JP 2012238061A JP 5390680 B1 JP5390680 B1 JP 5390680B1
- Authority
- JP
- Japan
- Prior art keywords
- register
- circuit
- cpu
- output
- reset
- 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.)
- Active
Links
Images
Landscapes
- Pinball Game Machines (AREA)
Abstract
【課題】メモリ空間や回路スペースを浪費することなく、適切な制御動作を実行することができる遊技機を提供する。
【解決手段】主制御部21は、監視時間に至るまでにクリアデータを受けないと、CPUをリセット状態にする異常対応回路をCPUと共に内蔵する電子素子21Aを有し、待機時間が経過するまで、異常対応回路を機能させない待機手段と、待機動作が完了すると、制御プログラムの動作に基づいて異常対応回路を機能させる開始手段と、を設ける。開始手段は、特定の機能レジスタに所定の設定データを書き込むことで実現される。
【選択図】図4A gaming machine capable of executing an appropriate control operation without wasting memory space or circuit space.
If a clear data is not received before the monitoring time is reached, a main control unit 21 has an electronic element 21A that incorporates an abnormality response circuit that brings the CPU into a reset state together with the CPU until the standby time elapses. A standby unit that does not cause the abnormality handling circuit to function and a start unit that causes the abnormality handling circuit to function based on the operation of the control program when the standby operation is completed are provided. The starting means is realized by writing predetermined setting data in a specific function register.
[Selection] Figure 4
Description
本発明は、遊技動作に起因する抽選処理によって大当り状態を発生させる遊技機に関し、特に、メモリの浪費を防止しつつ高度な制御動作を実現できる遊技機に関する。 The present invention relates to a gaming machine that generates a big hit state by a lottery process caused by a gaming operation, and more particularly to a gaming machine that can realize a high-level control operation while preventing waste of memory.
パチンコ機などの弾球遊技機は、遊技盤に設けた図柄始動口と、複数の表示図柄による一連の図柄変動態様を表示する図柄表示部と、開閉板が開閉される大入賞口などを備えて構成されている。そして、図柄始動口に設けられた検出スイッチが遊技球の通過を検出すると入賞状態となり、遊技球が賞球として払出された後、図柄表示部では表示時間変動される。その後、7−7−7などの所定の態様で図柄が停止すると大当り状態となり、大入賞口が繰返し開放されて、遊技者に有利な遊技状態を発生させている。 A ball game machine such as a pachinko machine has a symbol start opening provided on the game board, a symbol display section for displaying a series of symbol variation patterns by a plurality of display symbols, and a big winning opening for opening and closing the opening and closing plate. Configured. When the detection switch provided at the symbol start port detects the passing of the game ball, the winning state is entered, and after the game ball is paid out as a prize ball, the display time is changed in the symbol display section. Thereafter, when the symbol is stopped in a predetermined manner such as 7-7-7, a big hit state is established, and the big winning opening is repeatedly opened to generate a gaming state advantageous to the player.
このような遊技状態を発生させるか否かは、図柄始動口に遊技球が入賞したことを条件に実行される大当り抽選で決定されており、上記の図柄変動動作やその他の演出動作は、この抽選結果を踏まえたものとなっている。 Whether or not to generate such a gaming state is determined by a jackpot lottery executed on the condition that a game ball is won at the symbol start opening, and the above symbol variation operation and other effect operations are Based on the lottery results.
そして、この種の遊技機では、演出動作を豊富化するため、CPUを搭載した複数の回路基板で構成されており、大当り抽選処理を実行してその抽選結果を特定する制御コマンドを出力する主制御基板と、制御コマンドを受けて各種の演出動作を実行するサブ制御基板とに区分されるのが一般的である(特許文献1、特許文献2)。
This type of gaming machine is composed of a plurality of circuit boards equipped with CPUs in order to enrich the production operations, and executes a big hit lottery process and outputs a control command for specifying the lottery result. Generally, it is divided into a control board and a sub-control board that receives various control operations and receives various control operations (
ところが、複雑高度な演出を実行しようとすると、サブ制御基板が動作開始状態に立上るまでの初期動作が手間取り、サブ制御基板の初期動作中に伝送された制御コマンドが読み落とされるという問題が生じる。 However, when executing a complex and advanced performance, there is a problem that the initial operation until the sub control board rises to the operation start state takes time, and the control command transmitted during the initial operation of the sub control board is read out. .
そのため、主制御基板において、時間消費処理を設ける提案もあるが(例えば、特許文献1)、このような構成を採るとメモリ空間の消費が無視できないという問題が生じる。すなわち、大当り抽選処理などの主要な制御動作は、8ビットCPUで実行すべきことが義務付けられ、しかも、この制御動作のためのメモリ空間も限られているので、複雑高度な遊技制御を実現するには、数バイトでもメモリの使用を節約したいところである。 For this reason, there is a proposal to provide time consumption processing in the main control board (for example, Patent Document 1). However, when such a configuration is adopted, there is a problem that consumption of memory space cannot be ignored. In other words, major control operations such as jackpot lottery processing are required to be executed by an 8-bit CPU, and the memory space for this control operation is also limited, so that complex and advanced game control is realized. You want to save memory usage by a few bytes.
また、この種の遊技機は、セキュリィティ対策が重要であるが、むやみにメモリ空間を浪費することなく、且つ、ハードウェア構成を複雑化することなく、必要なセキュリィティレベルを確保すると共に、高度な制御動作を安定的に実行できる構成が望まれる。 In addition, security measures are important for this type of gaming machine, but it is not necessary to waste memory space and to complicate the hardware configuration. A configuration capable of stably executing the control operation is desired.
本発明は、上記の問題点に鑑みてなされたものであって、メモリ空間や回路スペースを浪費することなく、適切な制御動作を実行することができる遊技機を提供することを目的とする。 The present invention has been made in view of the above problems, and an object of the present invention is to provide a gaming machine that can execute an appropriate control operation without wasting memory space or circuit space.
上記の目的を達成するため、本発明は、所定のスイッチ信号に起因する抽選処理を実行して、その抽選結果を特定する制御コマンドを出力する主制御手段と、制御コマンドが特定する抽選結果に対応する演出動作を実行する演出制御手段と、を有して構成され、前記主制御手段は、抽選処理を含んだ制御動作を実行するCPUと、制御動作時に適宜にアクセスされるRAMと、制御動作を規定する制御プログラム、及び、制御動作に必要な動作パラメータを固定的に記憶するROMと、所定の監視時間に至るまでにクリア処理がされないと、CPUをリセット状態にする異常対応手段と、素子内部の動作を規定するデータを設定可能な機能レジスタと、を内蔵する単一の電子素子を有して構成され、前記動作パラメータで規定される待機時間が経過するまで、前記異常対応手段を機能させない待機手段と、前記待機手段の待機動作が完了すると、前記制御プログラムの動作に基づいて前記異常対応手段を機能させる開始手段と、を設け、前記開始手段は、特定の機能レジスタに所定の設定データを書き込むことで実現されるよう構成されている。 In order to achieve the above object, the present invention executes a lottery process caused by a predetermined switch signal and outputs a control command for specifying the lottery result, and a lottery result specified by the control command. The main control means includes a CPU that executes a control operation including a lottery process, a RAM that is appropriately accessed during the control operation, and a control unit. A control program that prescribes the operation, a ROM that stores operation parameters necessary for the control operation in a fixed manner, and an abnormality handling unit that resets the CPU if the clear process is not performed before reaching a predetermined monitoring time; A function register capable of setting data defining operation inside the device, and a single electronic device having a built-in function, and a standby time defined by the operation parameter A standby unit that does not cause the abnormality handling unit to function until after elapses; and a start unit that causes the abnormality handling unit to function based on the operation of the control program when the standby operation of the standby unit is completed. Is configured by writing predetermined setting data in a specific function register.
本発明では、異常対応手段がCPUと共に単一の電子素子に内蔵されているので、異常対応手段のために回路スペースが別途消費されることがない。また、異常対応手段が外部に露出しないのでセキュリティ上も有効である。 In the present invention, since the abnormality handling means is built in a single electronic element together with the CPU, no circuit space is consumed separately for the abnormality handling means. Further, since the abnormality handling means is not exposed to the outside, it is effective in terms of security.
本発明では、制御プログラムを機能させることなく、待機動作が実行できるので、例えば、サブ制御部が立上るのを待機するために、メモリ空間を消費するような問題が生じない。また、この待機動作が如何に長引いても、CPUがリセットされるおそれはない。 In the present invention, since the standby operation can be executed without causing the control program to function, for example, there is no problem of consuming memory space in order to wait for the sub-control unit to rise. Further, no matter how long this standby operation is prolonged, there is no possibility that the CPU is reset.
前記開始手段は、特定の機能レジスタに所定の設定データを書き込むことで実現されるので、異常対応手段を機能させるための制御プログラムの処理負担が少なく、また、異常対応手段を機能させない状態を維持することもできる。 Since the starting means is realized by writing predetermined setting data in a specific function register, the processing load of the control program for causing the abnormality handling means to function is small, and the state in which the abnormality handling means does not function is maintained. You can also
ところで、この種の異常対応手段は、通常、CPUを内蔵する電子素子とは別のハードウェアで実現されるため(例えば、特許文献2)、その分だけ回路スペースを消費するが、本発明ではそのような問題も生じない。しかも、待機時間を動作パラメータによって任意に設定する構成を採ることもできるので、機器設計上の自由度が高い。すなわち、待機時間を変更するための回路変更は全く不要であり、しかも、コンデンサの充放電時間を活用する通常のWDT回路のように、待機時間の設定に制限が生じることもない。 By the way, this kind of abnormality handling means is normally realized by hardware different from the electronic element incorporating the CPU (for example, Patent Document 2), and thus consumes circuit space accordingly. Such a problem does not occur. In addition, since it is possible to adopt a configuration in which the standby time is arbitrarily set according to the operation parameter, the degree of freedom in device design is high. That is, there is no need to change the circuit for changing the standby time, and there is no limitation on the setting of the standby time unlike a normal WDT circuit that uses the charge / discharge time of the capacitor.
異常対応手段を機能させた後は、その機能を停止できないよう構成するのがセキュリティ上有効である。また、所定の機能レジスタに所定のキーワードを書き込むことで、CPUのリセットが回避されるよう構成されているのが好ましい。また、特定単一の機能レジスタに単一のキーワードを書き込むことで、CPUのリセットを回避するか、特定複数の機能レジスタに各々キーワードを書き込むことで、CPUのリセットを回避するかが選択可能に構成されていると汎用性が高まる。 It is effective in terms of security to make it impossible to stop the function of the abnormality handling means after it has functioned. Further, it is preferable that the CPU is prevented from being reset by writing a predetermined keyword in a predetermined function register. In addition, it is possible to select whether to avoid a CPU reset by writing a single keyword to a specific single function register or to avoid a CPU reset by writing a keyword to each of a plurality of specific function registers. When configured, versatility increases.
また、間違ったキーワードを機能レジスタに書き込むと、その後、CPUがリセットされるよう構成されているとセキュリティ上も有効である。また、異常対応手段が機能してCPUがリセットされた後、RAMへのデータ書込みを許可するか否かは、動作パラメータによって予め設定可能に構成されているのも好適である。 In addition, it is effective in terms of security if the CPU is reset when an incorrect keyword is written to the function register. It is also preferable that whether or not data writing to the RAM is permitted after the abnormality handling means functions and the CPU is reset can be set in advance by an operation parameter.
上記した通り、本発明によれば、メモリ空間や回路スペースを浪費することなく、適切な制御動作を実行することができる。 As described above, according to the present invention, an appropriate control operation can be executed without wasting memory space or circuit space.
以下、本発明の実施例について詳細に説明する。図1は、本実施例のパチンコ機GMを示す斜視図である。このパチンコ機GMは、島構造体に着脱可能に装着される矩形枠状の木製外枠1と、外枠1に固着されたヒンジ2を介して開閉可能に枢着される前枠3とで構成されている。この前枠3には、遊技盤5が、裏側からではなく表側から着脱自在に装着され、その前側には、ガラス扉6と前面板7とが夫々開閉自在に枢着されている。
Examples of the present invention will be described in detail below. FIG. 1 is a perspective view showing a pachinko machine GM of the present embodiment. This pachinko machine GM includes a rectangular frame-shaped wooden
ガラス扉6の外周には、LEDランプなどによる電飾ランプが、略C字状に配置されている。前面板7には発射用の遊技球を貯留する上皿8が装着され、前枠3の下部には、上皿8から溢れ出し又は抜き取った遊技球を貯留する下皿9と、発射ハンドル10とが設けられている。発射ハンドル10は発射モータと連動しており、発射ハンドル10の回動角度に応じて動作する打撃槌によって遊技球が発射される。
On the outer periphery of the
上皿8の外周面には、チャンスボタン11が設けられている。このチャンスボタン11は、遊技者の左手で操作できる位置に設けられており、遊技者は、発射ハンドル10から右手を離すことなくチャンスボタン11を操作できる。このチャンスボタン11は、通常時には機能していないが、ゲーム状態がボタンチャンス状態となると内蔵ランプが点灯されて操作可能となる。なお、ボタンチャンス状態は、必要に応じて設けられるゲーム状態である。
A chance button 11 is provided on the outer peripheral surface of the
上皿8の右部には、カード式球貸し機に対する球貸し操作用の操作パネル12が設けられ、カード残額を3桁の数字で表示する度数表示部と、所定金額分の遊技球の球貸しを指示する球貸しスイッチと、ゲーム終了時にカードの返却を指令する返却スイッチとが設けられている。
On the right side of the
図2に示すように、遊技盤5には、金属製の外レールと内レールとからなるガイドレール13が環状に設けられ、その内側の遊技領域5aの略中央には、液晶カラーディスプレイDISPが配置されている。また、遊技領域5aの適所には、図柄始動口15、大入賞口16、複数個の普通入賞口17(大入賞口16の左右に4つ)、通過口であるゲート18が配設されている。これらの入賞口15〜18は、それぞれ内部に検出スイッチを有しており、遊技球の通過を検出できるようになっている。
As shown in FIG. 2, the
液晶ディスプレイDISPは、大当り状態に係わる特定図柄を変動表示すると共に背景画像や各種のキャラクタなどをアニメーション的に表示する装置である。この液晶ディスプレイDISPは、中央部に特別図柄表示部Da〜Dcと右上部に普通図柄表示部19を有している。そして、特別図柄表示部Da〜Dcでは、大当り状態の招来を期待させるリーチ演出が実行されたり、特別図柄表示部Da〜Dc及びその周りでは、当否結果を不確定に報知する予告演出などが実行される。
The liquid crystal display DISP is a device that variably displays a specific symbol related to a big hit state and displays a background image and various characters in an animated manner. This liquid crystal display DISP has special symbol display portions Da to Dc in the center portion and a normal
普通図柄表示部19は普通図柄を表示するものであり、ゲート18を通過した遊技球が検出されると、普通図柄が所定時間だけ変動し、遊技球のゲート18の通過時点において抽出された抽選用乱数値により決定される停止図柄を表示して停止するようになっている。
The normal
図柄始動口15は、左右一対の開閉爪15aを備えた電動式チューリップで開閉されるよう例えば構成され、普通図柄表示部19の変動後の停止図柄が当り図柄を表示した場合には、開閉爪15aが所定時間だけ、若しくは、所定個数の遊技球を検出するまで開放されるようになっている。
For example, the symbol start opening 15 is configured to be opened and closed by an electric tulip having a pair of left and right opening and closing
図柄始動口15に遊技球が入賞すると、特別図柄表示部Da〜Dcの表示図柄が所定時間だけ変動し、図柄始動口15への遊技球の入賞タイミングに応じた抽選結果に基づいて決定される停止図柄で停止する。なお、特別図柄表示部Da〜Dc及びその周りでは、一連の図柄演出の間に、予告演出が実行される場合がある。
When a game ball wins the symbol start
大入賞口16は、例えば前方に開放可能な開閉板16aで開閉制御されるが、特別図柄表示部Da〜Dcの図柄変動後の停止図柄が「777」などの大当り図柄のとき、「大当りゲーム」と称する特別遊技が開始され、開閉板16aが開放されるようになっている。
The big winning
大入賞口16の開閉板16aが開放された後、所定時間が経過し、又は所定数(例えば10個)の遊技球が入賞すると開閉板16aが閉じる。このような動作は、最大で例えば15回まで特別遊技が継続され、遊技者に有利な状態に制御される。なお、特別図柄表示部Da〜Dcの変動後の停止図柄が特別図柄のうちの特定図柄であった場合には、特別遊技の終了後のゲームが高確率状態(以下、確変状態という)となるという特典が付与される。
After the opening /
図3は、上記した各動作を実現するパチンコ機GMの全体回路構成を示すブロック図である。図中の一点破線は、主に、直流電圧ラインを示している。 FIG. 3 is a block diagram showing an overall circuit configuration of the pachinko machine GM that realizes the above-described operations. A dashed line in the figure mainly indicates a DC voltage line.
図示の通り、このパチンコ機GMは、AC24Vを受けて各種の直流電圧やシステムリセット信号(電源リセット信号)SYSなどを出力する電源基板20と、遊技制御動作を中心統括的に担う主制御基板21と、主制御基板21から受けた制御コマンドCMDに基づいてランプ演出及び音声演出を実行する演出制御基板22と、演出制御基板22から受けた制御コマンドCMD’に基づいて液晶ディスプレイDISPを駆動する画像制御基板23と、主制御基板21から受けた制御コマンドCMD”に基づいて払出モータMを制御して遊技球を払い出す払出制御基板24と、遊技者の操作に応答して遊技球を発射させる発射制御基板25と、を中心に構成されている。
As shown in the figure, this pachinko machine GM is provided with a
但し、この実施例では、主制御基板21が出力する制御コマンドCMDは、コマンド中継基板26と演出インタフェイス基板27を経由して、演出制御基板22に伝送される。また、演出制御基板22が出力する制御コマンドCMD’は、演出インタフェイス基板27を経由して、画像制御基板23に伝送され、主制御基板21が出力する制御コマンドCMD”は、主基板中継基板28を経由して、払出制御基板24に伝送される。
However, in this embodiment, the control command CMD output from the
これら主制御基板21、演出制御基板22、画像制御基板23、及び払出制御基板24には、ワンチップマイコンを備えるコンピュータ回路がそれぞれ搭載されている。そこで、これらの制御基板21〜24に搭載された回路、及びその回路によって実現される動作を機能的に総称して、本明細書では、主制御部21、演出制御部22、画像制御部23、及び払出制御部24と言うことがある。なお、演出制御部22、画像制御部23、及び払出制御部24の全部又は一部がサブ制御部である。
The
ところで、このパチンコ機GMは、図3の破線で囲む枠側部材GM1と、遊技盤5の背面に固定された盤側部材GM2とに大別されている。枠側部材GM1には、ガラス扉6や前面板7が枢着された前枠3と、その外側の木製外枠1とが含まれており、機種の変更に拘わらず、長期間にわたって遊技ホールに固定的に設置される。一方、盤側部材GM2は、機種変更に対応して交換され、新た盤側部材GM2が、元の盤側部材の代わりに枠側部材GM1に取り付けられる。なお、枠側部材GM1を除く全てが、盤側部材GM2である。
By the way, the pachinko machine GM is roughly divided into a frame side member GM1 surrounded by a broken line in FIG. 3 and a board side member GM2 fixed to the back of the
図3の破線枠に示す通り、枠側部材GM1には、電源基板20と、払出制御基板24と、発射制御基板25と、枠中継基板32とが含まれており、これらの回路基板が、前枠3の適所に各々固定されている。一方、遊技盤5の背面には、主制御基板21、演出制御基板22、画像制御基板23が、液晶ディスプレイDISPやその他の回路基板と共に固定されている。そして、枠側部材GM1と盤側部材GM2とは、一箇所に集中配置された接続コネクタC1〜C4によって電気的に接続されている。
As shown in the broken line frame in FIG. 3, the frame-side member GM1 includes a
電源基板20は、接続コネクタC2を通して、主基板中継基板28に接続され、接続コネクタC3を通して、電源中継基板30に接続されている。そして、主基板中継基板28は、電源基板20から受けたシステムリセット信号SYS、RAMクリア信号DEL、電圧降下信号ABN、バックアップ電源BAK、DC12V、DC32Vを、そのまま主制御部21に出力している。同様に、電源中継基板30も、電源基板20から受けたシステムリセット信号SYSや、交流及び直流の電源電圧を、そのまま演出インタフェイス基板27に出力している。なお、演出インタフェイス基板27は、受けたシステムリセット信号SYSを、そのまま演出制御部22と画像制御部23に出力している。
The
一方、払出制御基板24は、中継基板を介することなく、電源基板20に直結されており、主制御部21が受けると同様の、システムリセット信号SYS、RAMクリア信号DEL、電圧降下信号ABN、バックアップ電源BAKを、その他の電源電圧と共に直接的に受けている。
On the other hand, the
ここで、電源基板20が出力するシステムリセット信号SYSは、電源基板20に交流電源24Vが投入されたことを示す電源リセット信号であり、この電源リセット信号によって各制御部21〜24のワンチップマイコンその他のIC素子が電源リセットされるようになっている。
Here, the system reset signal SYS output from the
主制御部21及び払出制御部24が、電源基板20から受けるRAMクリア信号DELは、各制御部21,24のワンチップマイコンの内蔵RAMの全領域を初期設定するか否かを決定する信号であって、係員が操作する初期化スイッチSWTのON/OFF状態に対応した値を有している。
The RAM clear signal DEL received from the
主制御部21及び払出制御部24が、電源基板20から受ける電圧降下信号ABNは、交流電源24Vが降下し始めたことを示す信号であり、この電圧降下信号ABNを受けることによって、各制御部21、24では、停電や営業終了に先立って、必要な終了処理を開始するようになっている。また、バックアップ電源BAKは、営業終了や停電により交流電源24Vが遮断された後も、主制御部21と払出制御部24のワンチップマイコンの内蔵RAMのデータを保持するDC5Vの直流電源である。したがって、主制御部21と払出制御部24は、電源遮断前の遊技動作を電源投入後に再開できることになる(電源バックアップ機能)。このパチンコ機では少なくとも数日は、各ワンチップマイコンのRAMの記憶内容が保持されるよう設計されている。
The voltage drop signal ABN received from the
一方、演出制御部22と画像制御部23には、上記した電源バックアップ機能が設けられていない。しかし、先に説明した通り、演出制御部22と画像制御部23には、電源中継基板30と演出インタフェイス基板27を経由して、システムリセット信号SYSが共通して供給されており、他の制御部21,24と、ほぼ同期したタイミングで電源リセット動作が実現される。
On the other hand, the
図示の通り、主制御部21は、主基板中継基板28を経由して、払出制御部24に制御コマンドCMD”を送信する一方、払出制御部24からは、遊技球の払出動作を示す賞球計数信号や、払出動作の異常に係わるステイタス信号CONを受信している。ステイタス信号CONには、例えば、補給切れ信号、払出不足エラー信号、下皿満杯信号が含まれる。
As illustrated, the
また、主制御部21は、遊技盤中継基板29を経由して、遊技盤5の各遊技部品に接続されている。そして、遊技盤上の各入賞口16〜18に内蔵された検出スイッチのスイッチ信号を受ける一方、電動チューリップなどのソレノイド類を駆動している。なお、スイッチ信号には、図柄始動口15から主制御部21に伝送される入賞スイッチ信号SGが含まれる。
The
図4は、主制御部21のワンチップマイコン21Aの内部構成の一部を図示したものである。ここでは、遊技盤中継基板29を経由して、図柄始動口15の検出スイッチから入賞スイッチ信号SGを受ける部分も含めて図示している。
FIG. 4 illustrates a part of the internal configuration of the one-
図示の通り、ワンチップマイコン21Aは、Z80CPU(Zilog社)相当のCPUコアと、Z80CTC(counter timer circuit )相当のカウンタタイマ回路CTCと、ROM及びRAMのメモリ回路と、後述する設定レジスタを含んだ各種の機能レジスタRT1〜RTnと、ROMに記憶されている制御プログラム(ユーザプログラム)の実行動作開始タイミングを適宜に規定する動作開始回路STARTと、異常動作時にCPUコアをリセットする異常対応回路REVと、抽選用の乱数値RNDを生成する乱数生成回路GNRと、入力ポートINPと、を主要に内蔵している。 As illustrated, the one-chip microcomputer 21A includes a CPU core equivalent to Z80CPU (Zilog), a counter timer circuit CTC equivalent to Z80CTC (counter timer circuit), a ROM and RAM memory circuit, and a setting register described later. Various function registers RT1 to RTn, an operation start circuit START that appropriately defines the execution operation start timing of the control program (user program) stored in the ROM, and an abnormality response circuit REV that resets the CPU core during an abnormal operation A random number generation circuit GNR that generates a random number value RND for lottery and an input port INP are mainly incorporated.
図柄始動口15からの入賞スイッチ信号SGは、遊技盤中継基板29に配置されたバッファ回路BUFを経由して、ワンチップマイコン21Aの乱数生成回路GNRと、入力ポートINPに重複して供給されている。また、入力ポートINPには、図柄始動口15に限らず、大入賞口16やゲート18の検出スイッチからのスイッチ信号も、合わせて供給されている。
The winning switch signal SG from the symbol start
遊技盤中継基板29のバッファ回路BUFは、オープンコレクタ型の出力部を有し、入力側が12Vにプルアップされ、出力側が5Vにプルアップされている。そして、遊技球が図柄始動口15を通過して入賞状態となると、バッファ回路BUFは、正論理のON信号として、入賞スイッチ信号SGを出力する。
The buffer circuit BUF of the game
乱数生成回路GNRは、所定の数値範囲を循環するカウンタCNTと、入賞スイッチ信号SGが変化する変化エッジに同期して、カウンタCNTのカウンタ値を乱数値RNDとして保持するラッチ回路LTと、を有して構成されている。 The random number generation circuit GNR includes a counter CNT that circulates in a predetermined numerical range, and a latch circuit LT that holds the counter value of the counter CNT as a random value RND in synchronization with a changing edge at which the winning switch signal SG changes. Configured.
図示の通り、入賞スイッチ信号SGは、乱数生成回路GNRに重複して、入力ポートINPにも供給されている。そのため、CPUコアは、入力ポートINPからの入力データに基づき、入賞スイッチ信号SGの変化エッジを把握することができ、この把握の後に、ラッチ回路LTから乱数値RNDを取得して、大当り抽選を実行するようになっている。 As shown in the figure, the winning switch signal SG is also supplied to the input port INP so as to overlap the random number generation circuit GNR. Therefore, the CPU core can grasp the changing edge of the winning switch signal SG based on the input data from the input port INP. After this grasping, the CPU core obtains the random value RND from the latch circuit LT and performs the big hit lottery. It is supposed to run.
図5(a)は、ワンチップマイコン21Aのメモリ回路(RAM+ROM)と各種の機能レジスタRT1〜RTnについてのメモリマップを図示したものである。図示の通り、この実施例では、遊技機メーカが作成した制御プログラムと、この制御プログラムが参照する固定値データとは、例えば、8000H番地以降に格納される。
FIG. 5A illustrates a memory map for the memory circuit (RAM + ROM) and various function registers RT1 to RTn of the one-chip microcomputer 21A. As shown in the figure, in this embodiment, the control program created by the gaming machine manufacturer and the fixed value data referred to by this control program are stored, for example, after
また、固定値データとは別に、CPUリセット時に、機能レジスタRTiに転送される動作パラメータを記憶可能なパラメータ領域もROMに確保されている。ここで、動作パラメータには、制御プログラムが機能し始めるまでの待機時間を規定する設定値が含まれる。 In addition to the fixed value data, a parameter area capable of storing operation parameters transferred to the function register RTi when the CPU is reset is also secured in the ROM. Here, the operation parameter includes a set value that defines a waiting time until the control program starts to function.
ところで、この種の遊技機では、法規制上、制御プログラムや固定値データの容量は、厳格に制限されており(例えば、各々3Kバイト程度)、この限られた記憶容量でセキュリティ処理を含んだ高度な処理を実現する必要が生じる。そこで、本実施例では、機能レジスタRTiを有効活用することで、制御プログラムのプログラム量の抑制や、セキュリティレベルの向上を図っている(詳細については更に後述する)。 By the way, in this type of gaming machine, the capacity of control programs and fixed value data is strictly limited (for example, about 3 Kbytes each) due to legal restrictions, and security processing is included with this limited storage capacity. It is necessary to realize advanced processing. Therefore, in this embodiment, the function register RTi is effectively used to suppress the program amount of the control program and improve the security level (details will be described later).
また、本実施例のワンチップマイコン21Aは、CPUリセット後、8000H番地以降の制御プログラムが実行される前に、管理プログラムが実行されるよう構成されている。こここで、管理プログラムとは、チップメーカが作成した一種のマイクロプログラムであり、具体的な動作内容は、例えば、図5(b)に示す通りである。
Further, the one-chip microcomputer 21A of the present embodiment is configured such that the management program is executed after the CPU reset and before the control program after the
図示の通り、CPUリセット後、ROMに記憶されている動作パラメータが、これに対応する機能レジスタRTiに転送される(SS1)。先に説明した通り、動作パラメータには、制御プログラムが機能し始めるまでの待機時間を規定する設定値データが含まれており、この設定値データは、機能レジスタRTiたる待機時間設定レジスタ60(図5(c)参照)に転送される。 As shown in the figure, after the CPU is reset, the operation parameters stored in the ROM are transferred to the corresponding function register RTi (SS1). As described above, the operation parameter includes setting value data that defines the waiting time until the control program starts to function, and this setting value data is stored in the waiting time setting register 60 (see FIG. 5 (c)).
また、分周比設定レジスタ52には、分周比デフォルト値として50が書き込まれ、ウォッチドッグタイマ54の機能を停止させるための制御データとしてデフォルト値0が維持される。したがって、その後の待機処理(SS3)が如何に長引いても、CPUコアが、ウォッチドッグタイマ54のオーバーフロー信号OVによってリセットされるおそれはない。
Further, 50 is written in the frequency division
次に、セキュリティーキーの正当性を判定する判定処理を含んでワンチップマイコンの正常動作を確認する自己診断処理が実行される(SS2)。そして、その後は、ステップSS1の処理で設定レジスタ60に転送された動作パラメータ(待機時間)で規定される動作開始タイミングまで、制御プログラムの動作開始を待機し(SS3)、所定時間待機後に、8000H番地以降の制御プログラムの動作が開始される。 Next, a self-diagnosis process for confirming the normal operation of the one-chip microcomputer including a determination process for determining the validity of the security key is executed (SS2). Thereafter, the control program waits for the operation start of the control program until the operation start timing defined by the operation parameter (standby time) transferred to the setting register 60 in the process of step SS1 (SS3). The operation of the control program after the address is started.
したがって、本実施例によれば、サブ制御部の初期動作が完了するまで、数秒〜数10秒程度待機する待機処理を、制御プログラムによって実現する必要がなくなり、限定されたメモリ領域を効果的に使用することができる。例えば、20MHzのシステムクロックで動作するCPUコアにおいて、数10秒の時間を消費する待機処理を実現するには、それなりのプログラム容量を消費するので、この待機処理を不要にできる本実施例の効果は大きい。 Therefore, according to the present embodiment, it is not necessary to implement standby processing that waits for several seconds to several tens of seconds until the initial operation of the sub-control unit is completed, and a limited memory area is effectively created. Can be used. For example, in a CPU core that operates with a system clock of 20 MHz, in order to realize standby processing that consumes several tens of seconds, a certain amount of program capacity is consumed. Therefore, the effect of this embodiment that can eliminate this standby processing is required. Is big.
図5(c)は、上記の動作を実現する動作開始回路STARTと、異常対応回路REVについて、その回路構成を示す回路ブロック図である。本実施例では、プリスケーラ50には、20MHzのシステムクロックΦが供給され、受付回路53とWDTクリア回路は、CPUコアから直接アクセス可能に構成されている(図6(a)参照)。そして、リセット回路56の出力は、CPUコアのリセット端子と、機能レジスタRTiたる制御レジスタ57に供給されている。なお、制御レジスタ57は、具体的には、図6のRSフリップフロップ57で実現される。
FIG. 5C is a circuit block diagram showing the circuit configuration of the operation start circuit START and the abnormality handling circuit REV that realize the above operation. In this embodiment, a 20 MHz system clock Φ is supplied to the
以上を踏まえて説明を続けると、異常対応回路REVは、システムクロックΦのパルス周期を固定数(N)倍に分周するプリスケーラ50と、プリスケーラ50の出力のパルス周期を任意倍数(X)に分周するプログラマブル・ポストスケーラ51と、ポストスケーラ51の分周比やその他の動作パラメータを記憶する設定レジスタ52と、設定レジスタ52に設定すべき動作パラメータをCPUコアから受ける受付回路53と、ポストスケーラ51の出力を所定の数値範囲でカウントするウォッチドッグタイマ54と、ウォッチドッグタイマ54のカウンタ値を強制的に初期値に戻すWDTクリア回路55と、ウォッチドッグタイマ54のカウント値が所定の数値範囲を一巡したことを示すオーバーフロー信号OVを受けて、CPUリセット信号を出力するリセット回路56と、を有して構成されている。
Continuing the description based on the above, the abnormality handling circuit REV sets the
先に説明した通り、機能レジスタRTiたる設定レジスタ52には、ステップSS1のタイミングで、デフォルト値として分周比50が書き込まれるが、その後、制御プログラムによって、10〜1270の任意の分周比が設定可能に構成されている。そのため、ウォッチドッグタイマ54に供給される計数クロックの周期を、遊技機メーカにおいて任意に設定できることになり、オーバーフロー信号OVの出力周期を適宜に設定できることになる。
As described above, in the
また、設定レジスタ52には、リセット回路56を機能させるか否かを規定する動作パラメータ(制御データ)も、制御プログラムによって任意に設定可能に構成されている。そのため、遊技機メーカにおいて、異常対応回路REVの動作を禁止することも可能となる。なお、異常対応回路REVの動作を禁止しても、動作開始回路STARTの動作には影響を与えない。
In the
ところで、リセット回路56の出力は、CPUコアのリセット端子に供給されることで、CPUコアが強制的にリセットされる。また、リセット回路56の出力は、制御レジスタ57に記憶されることで、CPUコアが強制的にリセットされた後は、RAMのアクセスが一部禁止される。禁止状態は適宜に設定されるが、この実施例では、RAMのリード(memory read )動作が許可されるが、ライト動作(memory write)を禁止するようにしている。
By the way, the output of the
システムクロックΦは、この実施例では20MHzであり、プリスケーラ50の分周比は2000となっている。そのため、プリスケーラ50の出力パルスのパルス周期は100μSとなる。また、受付回路53を経由して設定レジスタ52に設定される分周比は、10〜1270の数値範囲であるが、電源投入後のデフォルト分周比は50となっている(SS1)。
The system clock Φ is 20 MHz in this embodiment, and the frequency division ratio of the
そのため、ポストスケーラ51の出力パルスのパルス周期は、デフォルト値として5mS(=50×100μS)となり、その後の制御プログラムによる設定値(10〜1270)に基づいて、1mS〜127mSの範囲のパルス周期となる。 Therefore, the pulse period of the output pulse of the postscaler 51 is 5 mS (= 50 × 100 μS) as a default value. Based on the setting value (10 to 1270) by the subsequent control program, the pulse period in the range of 1 mS to 127 mS Become.
ウォッチドッグタイマ54は、この実施例では、100進カウンタであり、0〜99の数値範囲を一巡する毎に、オーバーフロー信号OVを出力するよう構成されている。ポストスケーラ51の出力パルスのパルス幅は、デフォルト値が5mSであって、その後は、制御プログラムによる設定に基づいて1mS〜127mSの何れかの値となる。そのため、ウォッチドッグタイマ54が出力するオーバーフロー信号OVの出力周期Tは、デフォルト値T0が、500mS(=5mS×100)であり、その後は、100mS〜12.7Sの範囲内の設定値Tsとなる。
In this embodiment, the
このようなオーバーフロー信号OVは、リセット回路56を経由してCPUリセット信号となるので、WDTクリア回路55が機能しない限り、CPUコアは、オーバーフロー信号OVの出力周期Tsで繰り返しリセットされることになる。なお、設定レジスタ52の初期設定値に基づいて、リセット回路56の動作を禁止できるが、一度、許可したウォッチドッグタイマ機能を、遊技動作中に禁止することはできない。したがって、例えば、違法プログラムを間欠的に動作させるために、適宜にウォッチドッグタイマ機能を禁止制御するような違法動作は不可能となる。
Since the overflow signal OV becomes a CPU reset signal via the
次に、図5(c)に基づいて、動作開始回路STARTの回路構成を説明する。図示の動作開始回路STARTにおいて、設定レジスタ60は、ステップSS1の処理によって、ROMのパラメータ領域に登録されている設定値データ(待機時間)が転送されており、判定レジスタ63は、CPUから直接アクセス可能に構成されている。 Next, the circuit configuration of the operation start circuit START will be described with reference to FIG. In the illustrated operation start circuit START, the setting register 60 is transferred with the set value data (standby time) registered in the parameter area of the ROM by the process of step SS1, and the determination register 63 is directly accessible from the CPU. It is configured.
以上を踏まえて説明すると、動作開始回路STARTは、ROMに記憶されている待機時間を受ける設定レジスタ60と、ウォッチドッグタイマ54のオーバーフロー信号OVを受けるカウンタ61と、カウンタ61のカウンタ値を、設定レジスタ60の設定値と比較して一致するか否かを判定する比較回路62と、比較回路62が出力する一致信号を記憶する判定レジスタ63と、を有して構成されている。
To explain the above, the operation start circuit START sets the setting register 60 that receives the waiting time stored in the ROM, the
比較回路62が出力する一致信号は、一致判定時にはONレベルとなり、それ以外はOFFレベルである。そして、判定レジスタ63の出力値(一致信号)は、管理プログラム(図5(b)参照)のステップSS3の処理で繰り返し判定され、出力値がONレベルとなるまで待機処理を繰り返す。
The coincidence signal output from the
一方、オーバーフロー信号OVの出力周期T0は、このタイミングでは、デフォルト値の500mSであるので、本実施例によれば、設定レジスタ60の設定値を、例えば、2、4、6、・・・、50、60とすることで、1秒、2秒、3秒、・・・、25秒、30秒の待機時間を確保することができる。 On the other hand, since the output period T0 of the overflow signal OV is the default value of 500 mS at this timing, according to the present embodiment, the setting value of the setting register 60 is set to 2, 4, 6,. By setting 50 and 60, it is possible to secure a waiting time of 1 second, 2 seconds, 3 seconds,..., 25 seconds, and 30 seconds.
このように、本実施例では、ROMのパラメータ領域に、適宜な設定値データ(待機時間)を登録しておくことで、CPUリセット後、サブ制御部が確実に立ち上がるまでの最適な待機時間を確保することができる。なお、この待機処理に制御プログラム領域を消費しないことの利点は、先に説明した通りである。 In this way, in this embodiment, by registering appropriate set value data (standby time) in the parameter area of the ROM, the optimum standby time until the sub-control unit starts up reliably after the CPU reset is set. Can be secured. The advantage of not consuming the control program area for this standby process is as described above.
図6(a)は、異常対応回路REVの具体的な回路構成を示す回路ブロック図である。図示の通り、受付回路53は、詳細には、CPUコアが設定値データを書き込む入力レジスタ70と、入力レジスタ70の出力値を記憶する分周比制御レジスタ71と、分周比制御レジスタ71の出力値と入力レジスタ70への入力値とを比較する一致判定回路72と、一致判定回路72の出力値をS入力端子に受けるRSフリップフロップ73と、を有して構成されている。
FIG. 6A is a circuit block diagram showing a specific circuit configuration of the abnormality handling circuit REV. As shown in the figure, the receiving
ここで、入力レジスタ70と分周比制御レジスタ71は、分周比設定レジスタ52や入力レジスタ91などと同様に、電源投入時に電源リセットされて、その出力値がクリア状態となる。なお、分周比設定レジスタ52は、電源リセット後、直ちに、デフォルト値(=分周比50)に設定されるが、これに関連する回路構成については、図示を省略している。
Here, like the frequency division
一致判定回路72は、分周比制御レジスタ71の出力値と、入力レジスタ70の入力値とが一致する場合には、制御端子OE(output enable )がHレベルであることを条件に、Lレベルの判定値を出力し、それ以外のタイミングではHレベルの判定値を出力する。なお、一致判定回路72の回路構成は、基本的に、図7に示す減算回路及びゲート回路と同等である。そして、一致判定回路72の判定出力は、分周比設定レジスタ52のクロック端子CKに供給されている。
When the output value of the frequency division ratio control register 71 matches the input value of the
また、分周比制御レジスタ71の出力は、一致判定回路72と分周比設定レジスタ52の入力端子に共通的に供給されている。ここで、分周比設定レジスタ52は、クロック端子CKに、Lレベルの信号を受けると、入力端子の信号をラッチするよう構成されている。そのため、分周比設定レジスタ52には、分周比制御レジスタ71の出力値と入力レジスタ70の入力値とが一致するタイミングで、分周比制御レジスタ71の出力値が記憶されることになる。
The output of the division ratio control register 71 is commonly supplied to the input terminals of the
ところで、一致判定回路72の出力を受けるRSフリップフロップ73のR入力端子は、Hレベルに固定されている。また、Qバー出力端子は、NOTゲートによる遅延回路を経由して、ANDゲート74の入力端子に供給されている。そして、このRSフリップフロップ73は、電源投入時に、クリア端子CLRに電源リセット信号を受けて電源リセットされるので、その後のQバー出力端子は、Hレベルとなる。
By the way, the R input terminal of the RS flip-
また、入力レジスタ70及び分周比制御レジスタ71は、CPUコアが出力するアドレス信号に基づいて生成されるチップセレクト信号CS(Lアクティブ)に基づいて、データバスのデータ(設定値データ)をラッチするよう構成されている。但し、入力レジスタ70は、チップセレクト信号CSの立下りエッジで、設定値データをラッチし、分周比制御レジスタ71は、適宜に遅延されたチップセレクト信号CS”の立上りエッジで、設定値データをラッチするよう構成されている。
The
一方、論理反転されたチップセレクト信号CS’は、ANDゲート74の入力端子に供給されている。先に説明した通り、ANDゲート74の他方側の入力端子は、電源リセット後にHレベルを維持するので、論理反転されたチップセレクト信号CS’は、そのレベルのまま、一致判定回路の74の制御端子OEに供給されることになる。
On the other hand, the logically inverted chip select signal CS ′ is supplied to the input terminal of the AND
ここで、制御端子OE(output enable )は、一致判定回路72の出力動作を制御する機能を有しており、チップセレクト信号CSが定常レベル(H)に戻ったタイミングで、反転チップセレクト信号CS’と共にLレベルに戻り、その結果、一致判定回路72の出力は、反転チップセレクト信号CS’の変化に対応して、定常レベル(H)に戻ることになる。
Here, the control terminal OE (output enable) has a function of controlling the output operation of the
また、その後、CPUコアのデータバスのデータ値が、たまたま分周比制御レジスタ71の出力値と一致することがあっても、一致判定回路72の出力値がLレベルに変化することはない。そのため、分周比設定レジスタ52に一旦設定された設定値は、その後、変化することがなく、したがって、オーバーフロー信号OVの出力周期Tsなど、ウォッチドッグタイマ54の動作条件が変化するおそれはない。また、違法プログラムを意図通りに動作させるために、オーバーフロー信号OVの出力周期Tsを長く設定し直したり、事後的にウォッチドッグタイマ機能を禁止しようとしても、そのような動作は不可能である。
After that, even if the data value of the data bus of the CPU core happens to coincide with the output value of the frequency division
以上の回路動作を踏まえて、図6(b)に基づいて、CPUコアによる設定値データの書込み動作を説明する。ここで、設定値データXは、ポストスケーラ回路51の分周比データと、ウォッチドッグタイマ54などの動作可否を規定する制御データとを含んで構成されている。
Based on the above circuit operation, the setting value data write operation by the CPU core will be described with reference to FIG. Here, the set value data X is configured to include frequency division ratio data of the postscaler circuit 51 and control data defining whether or not the
図6(b)に示すように、CPUコアは、設定値データXを入力レジスタ70に書き込んだ後(ST30)、再度、同じ設定値データXを入力レジスタ70に書き込む(ST31)。そして、一回目の書き込み動作におけるチップセレクト信号CSの立下りエッジで、設定値データXが入力レジスタ70にラッチ(記憶保持)され、入力レジスタ70にラッチされた設定値データXは、遅延状態のチップセレクト信号CS”の立上りエッジで、分周比制御レジスタ71にラッチされる。
As shown in FIG. 6B, the CPU core writes the set value data X to the input register 70 (ST30), and then writes the same set value data X to the input register 70 again (ST31). The set value data X is latched (stored) in the
なお、ステップST30のタイミングでは、RSフリップフロップ73のQバー出力がHレベルであるので、論理反転したアクティブレベルのチップセレクト信号CS’が、一致判定回路72の制御端子OEに加わることになる。しかし、チップセレクト信号CS’がアクティブレベルを維持するタイミングでは、CPUコアから供給される設定値データXと、電源投入後にクリアされる分周比制御レジスタ71の出力値とが一致することはないので、一致判定回路72の出力は変化することなく、Hレベルを維持する。
At the timing of step ST30, since the Q bar output of the RS flip-
その後、再度、同じ設定値データXが入力レジスタ70に書き込まれると(ST31)、その時のチップセレクト信号CSの立下りタイミングで、一致判定回路72に供給される2種類のデータが一致することになる。すなわち、分周比制御レジスタ71からは、1回目に出力された設定値データXが出力され、CPUコアからは、2回目の設定値データXが出力される。
Thereafter, when the same set value data X is written to the input register 70 again (ST31), the two types of data supplied to the
このように、本実施例では、正常な設定処理(ST30,ST31)を実行する限り、2度目の書込み処理(ST31)で2種類のデータが一致するので、一致判定回路72の出力はLレベルに変化し、この立下りエッジに同期して、分周比設定レジスタ52には、1回目に出力された設定値データXが記憶される。そして、この設定値データXに基づいて、ポストスケーラ回路51の分周比が設定される。
Thus, in this embodiment, as long as the normal setting process (ST30, ST31) is executed, the two types of data match in the second write process (ST31), so the output of the
一致判定回路72の出力がLレベルに変化すると、RSフリップフロップ73は、LレベルのS端子入力に基づいてセット動作をする(図6(c)参照)。その結果、RSフリップフロップ73のQバー出力は、Lレベルに変化することになり、この変化が所定の遅延時間後にANDゲート74に伝わるので、その後、一致判定回路72の制御端子OEがLレベルとなり、一致判定回路72の出力も、定常レベルのHレベルに戻る。
When the output of the
そのため、RSフリップフロップ73のQバー出力は、その後もLレベルに維持されることになり(図6(c)参照)、その後は一致判定回路72が機能することはない。すなわち、本実施例では、ポストスケーラ51の分周比の設定処理は一回に限定され、その後に再設定することはできないのでセキュリティ上も有意義である。なお、この点は前記した通りである。
Therefore, the Q bar output of the RS flip-
ところで、設定値データXには、ポストスケーラ回路51の分周比データだけでなく、ウォッチドッグタイマ54などの動作可否を規定する制御データも含まれている。そして、この制御データは、ウォッチドッグタイマ54の機能を活用する場合には、Hレベルであり、機能を使用いない場合にはLレベルに設定される。但し、Hレベルの制御データに基づいて動作を開始したウォッチドッグタイマ機能を、その後に禁止できないことは、先に説明した図6の回路構成から確認される通りであり、図示の回路構成は、セキュリィティ上も有効である。
By the way, the set value data X includes not only the frequency division ratio data of the postscaler circuit 51 but also control data defining whether or not the
図示の通り、分周比設定レジスタ52に記憶された制御データは、そのままNANDゲート56の入力端子に供給されるので、制御データ=Lの場合には、ウォッチドッグタイマ54から出力されるオーバーフロー信号OVがCPUに供給されることなく、ウォッチドッグタイマ54は、事実上、動作禁止状態となる。
As shown in the figure, since the control data stored in the frequency division
一方、制御データ=Hの場合には、ウォッチドッグタイマ54から出力されるオーバーフロー信号OVがCPUに供給されてCPUコアをリセット状態にする。また、このオーバーフロー信号OVは、RSフリップフロップ57のS入力端子にも供給される。R入力端子は、Hレベルに固定されているため、ウォッチドッグタイマ54にオーバーフロー状態が発生して、CPUコアが異常リセットされた後は、RSフリップフロップ57のQバー出力がLレベルを維持することになる。
On the other hand, when the control data = H, the overflow signal OV output from the
図示の通り、RSフリップフロップ57のQバー出力は、ANDゲート58の入力端子に供給されている。また、ANDゲート58の他の入力端子には、CPUコアのコントロールバスに出力されるメモリWR信号が供給されている。ここで、メモリWR信号は、RAMのリード(memory read )動作時に、RAMに供給される信号であり、このメモリWR信号のメモリへの供給がANDゲート58で阻止されることで、CPUコアが異常リセットされた後は、RAMのライト動作(memory write)が禁止されることになる。
As shown, the Q bar output of the RS flip-
この動作もセキュリティ上有効であり、例えば、CPUを意図的にリセットすると、その後は、RAMを書き換えることができないので、その後の違法行為が不可能となる。 This operation is also effective in terms of security. For example, if the CPU is intentionally reset, then the RAM cannot be rewritten, and subsequent illegal actions are impossible.
次に、図6の上部に位置するWDTクリア回路55の回路構成について説明する。図示の通り、WDTクリア回路55は、CPUコアからクリアデータを受けて記憶する入力レジスタ91と、クリア処理用のキーワードを固定的に記憶するキーワードレジスタ92と、入力レジスタ91などの動作順序を制御する動作順序回路93と、入力レジスタ91とキーワードレジスタ92の記憶値が一致するか否かを判定する一致判定回路90と、を有して構成されている。なお、入力レジスタ91やキーワードレジスタ92は、機能レジスタRTiの一部を構成しており、各々に固有のアドレス番号が付与されている(図5(a)参照)。
Next, the circuit configuration of the WDT clear circuit 55 located in the upper part of FIG. 6 will be described. As shown in the figure, the WDT clear circuit 55 controls the operation order of the
また、入力レジスタ91の記憶値と、キーワードレジスタ92の記憶値とが一致すする場合には、一致判定回路90からLレベルのクリア信号が出力され、これがウォッチドッグタイマ54に供給されることで、ウォッチドッグタイマ54のカウンタ値がゼロクリアされ、オーバーフロー信号OVの出力を阻止している。
Further, when the stored value of the
図7は、入力レジスタ91と、キーワードレジスタ92と、動作順序回路93と、一致判定回路90の回路構成をより詳細に図示したものである。図示の通り、入力レジスタ91は、実際には、4個の8ビット長レジスタR0〜R3で構成され、各々にはアドレス(ポート番号)N0〜N3が付されている。また、キーワードレジスタ92も、4個の8ビット長レジスタR0’〜R3’で構成され、各々には、対応する入力レジスタR0〜R3と同一のアドレス(ポート番号)N0〜N3が付されている。
FIG. 7 shows the circuit configuration of the
ここで、8ビット長レジスタR0〜R3の入力端子は、CPUコアのデータバスに接続されており、自らを選択するチップセレクト信号CS0〜CS3を受けることを条件に、CPUコアが出力するクリアデータを記憶し出力するよう構成されている。なお、チップセレクト信号CS0〜CS3は、ポート番号N0〜N3に基づいて生成されるユニーク信号であるのは勿論である。 Here, the input terminals of the 8-bit length registers R0 to R3 are connected to the data bus of the CPU core, and clear data output from the CPU core on condition that the chip select signals CS0 to CS3 for selecting itself are received. Is stored and output. Of course, the chip select signals CS0 to CS3 are unique signals generated based on the port numbers N0 to N3.
また、8ビット長のキーワードレジスタR0’〜R3’の入力端子は、固定的にHレベル又はLレベルに設定されており、各レジスタR0’〜R3’は、自らを選択するチップセレクト信号CS0〜CS3を受けることを条件に、固有のキーワードを記憶し出力するよう構成されている。何ら限定されないが、レジスタR0’は10Hを記憶し、レジスタR1’は22Hを記憶し、レジスタR2’は33Hを記憶し、レジスタR3’は44Hを記憶するよう構成されている。
The input terminals of the 8-bit keyword registers R0 'to R3' are fixedly set to H level or L level, and each of the registers R0 'to R3' has a chip select signal CS0 to CS0 for selecting itself. It is configured to store and output a unique keyword on condition that CS3 is received. Although not limited in any way, the register R0 'stores 10H, the register R1'
本実施例では、4個の入力レジスタR0〜R3と、4個のキーワードレジスタR0’〜R3’とが一対一に対応し、一対のレジスタRi,Ri’が、同一のチップセレクト信号CSiで選択されるよう構成されている。そのため、例えば、CPUコアからアドレスN0(入力レジスタR0)に対してクリアデータを出力すると、そのクリアデータが入力レジスタR0に取得されて出力される一方、レジスタR0’からは、固定キーワード10Hが出力されることになる。 In this embodiment, the four input registers R0 to R3 and the four keyword registers R0 ′ to R3 ′ have a one-to-one correspondence, and the pair of registers Ri and Ri ′ are selected by the same chip select signal CSi. It is configured to be. Therefore, for example, when clear data is output from the CPU core to the address N0 (input register R0), the clear data is acquired and output to the input register R0, while the fixed keyword 10H is output from the register R0 ′. Will be.
本実施例では、一対のレジスタR0,R0’を使用してウォッチドッグタイマ54をクリアする基本動作態様と、三対のレジスタR1,R1’〜R3,R3’を循環的に使用してウォッチドッグタイマ54をクリアする循環動作態様とが選択可能になっている。そして、動作順序回路93は、循環動作態様を採る場合に機能して、三対のレジスタR1,R1’〜R3,R3’の動作順序を制御している。
In this embodiment, a basic operation mode in which the
具体的には、所定の機能レジスタRTiに循環動作態様を採ることが指示されることを条件に出力されるスタートパルスに基づいて、先ず、第1レジスタ対R1,R1’が動作可能となり、第1レジスタ対R1,R1’が動作したことを条件に、第2レジスタ対R2,R2’が動作可能となり、第2レジスタ対R2,R2’が動作したことを条件に、第3レジスタ対R3,R3’が動作可能となり、第3レジスタ対R3,R3’が動作したことを条件に、第1レジスタ対R1,R1’が動作可能となるような循環動作を実現している。 Specifically, based on a start pulse output on the condition that a predetermined function register RTi is instructed to adopt a cyclic operation mode, first, the first register pair R1, R1 ′ becomes operable, The second register pair R2, R2 ′ is operable on the condition that one register pair R1, R1 ′ is operated, and the third register pair R3, R3 ′ is operated on the condition that the second register pair R2, R2 ′ is operated. On the condition that R3 ′ is operable and the third register pair R3, R3 ′ is operated, a circular operation is realized such that the first register pair R1, R1 ′ is operable.
具体的な回路構成は図7に示す通りであり、3個の負論理ANDゲートG1〜G3と、3個のRSフリップフロップF1〜F3と、スタートパルスとチップセレクト信号CS3とを受ける正論理ANDゲートG0と、を有して構成されている。ここで、RSフリップフロップF1〜F3は、リセット端子Rやセット端子Sに供給されるチップセレクト信号の立上りエッジで、リセット動作やセット動作をするよう構成されている。 A specific circuit configuration is as shown in FIG. 7, and a positive logic AND receiving three negative logic AND gates G1 to G3, three RS flip-flops F1 to F3, a start pulse and a chip select signal CS3. And a gate G0. Here, the RS flip-flops F1 to F3 are configured to perform a reset operation or a set operation at the rising edge of the chip select signal supplied to the reset terminal R or the set terminal S.
また、チップセレクト信号CS1〜CS3は、定常的にHレベルであり、各入力レジスタR1〜R3(ポート番号N1〜N3)に、クリアデータを書き込むタイミングだけでLレベルとなる。また、RSフリップフロップF1〜F3は、電源投入時に電源リセットされて、各Qバー出力がHレベルとなる。 The chip select signals CS1 to CS3 are constantly at the H level, and become the L level only at the timing of writing the clear data to the input registers R1 to R3 (port numbers N1 to N3). In addition, the RS flip-flops F1 to F3 are reset when the power is turned on, and each Q bar output becomes H level.
図示の通り、ANDゲートG1は、チップセレクト信号CS1と、フリップフロップF3のQバー出力とを、入力端子に受けている。そして、負論理動作したAND出力を、第1レジスタ対R1,R1’のチップイネーブル端子に供給している。ANDゲートG2も同様であり、チップセレクト信号CS2と、フリップフロップF1のQバー出力とを入力端子に受けて、負論理動作したAND出力を、第2レジスタ対R2,R2’のチップイネーブル端子に供給している。また、ANDゲートG3は、チップセレクト信号CS3と、フリップフロップF2のQバー出力とを入力端子に受けて、負論理動作したAND出力を、第3レジスタ対R3,R3’のチップイネーブル端子に供給している。 As shown in the figure, the AND gate G1 receives the chip select signal CS1 and the Q bar output of the flip-flop F3 at its input terminals. The AND output that has been subjected to negative logic operation is supplied to the chip enable terminals of the first register pair R1, R1 '. The same applies to the AND gate G2, and the chip select signal CS2 and the Q-bar output of the flip-flop F1 are received at the input terminal, and the AND output subjected to the negative logic operation is applied to the chip enable terminals of the second register pair R2, R2 ′. Supply. The AND gate G3 receives the chip select signal CS3 and the Q-bar output of the flip-flop F2 at its input terminals, and supplies an AND output that has been subjected to negative logic operation to the chip enable terminals of the third register pair R3, R3 ′. doing.
一方、フリップフロップF1は、セット端子Sにチップセレクト信号CS1を受け、リセット端子Rにチップセレクト信号CS2を受けて動作している。そのため、フリップフロップF1のQバー出力は、電源リセットされてHレベルとなった後、チップセレクト信号CS1に基づいてLレベルとなり、チップセレクト信号CS2に基づいてHレベルに戻ることになる。 On the other hand, the flip-flop F1 operates by receiving the chip select signal CS1 at the set terminal S and the chip select signal CS2 at the reset terminal R. Therefore, the Q bar output of the flip-flop F1 becomes H level after the power is reset, then becomes L level based on the chip select signal CS1, and returns to H level based on the chip select signal CS2.
他のフリップフロップもほぼ同様であり、フリップフロップF2は、セット端子Sにチップセレクト信号CS2を受け、リセット端子Rにチップセレクト信号CS3を受けるので、そのQバー出力は、電源リセットされてHレベルとなった後、チップセレクト信号CS2に基づいてLレベルとなり、チップセレクト信号CS3に基づいてHレベルに戻る。 The other flip-flops are substantially the same, and the flip-flop F2 receives the chip select signal CS2 at the set terminal S and receives the chip select signal CS3 at the reset terminal R. After that, it becomes L level based on the chip select signal CS2, and returns to H level based on the chip select signal CS3.
一方、フリップフロップF3は、セット端子SにANDゲートG0の出力を受け、リセット端子Rにチップセレクト信号CS1を受けるよう構成されている。ANDゲートG0は、チップセレクト信号CS3と、スタートパルスとを入力端子に受けている。そのため、フリップフロップF3のQバー出力は、電源リセットされてHレベルとなった後、スタートパルスか、チップセレクト信号CS3に基づいてLレベルとなり、チップセレクト信号CS1に基づいてHレベルに戻ることになる。 On the other hand, the flip-flop F3 is configured to receive the output of the AND gate G0 at the set terminal S and the chip select signal CS1 at the reset terminal R. The AND gate G0 receives the chip select signal CS3 and the start pulse at the input terminals. For this reason, the Q bar output of the flip-flop F3 becomes H level after the power is reset and then becomes L level based on the start pulse or the chip select signal CS3, and returns to H level based on the chip select signal CS1. Become.
実施例の動作順序回路93は、上記の通りに構成されているので、以下の通りに動作する。先ず、電源投入後は、各フリップフロップF1〜F3がリセット状態となるので、全てのQバー出力がHレベルとなり、ANDゲートG1〜G3の一方側の入力端子がHレベルとなる。そのため、CPUコアが、所定のポート番号N1〜N3を指定してクリアデータを出力しても、チップセレクト信号CSiが伝送されることはなく、データ出力動作が全て無視される。
Since the
一方、このような状態で、スタートパルスが出力されると、フリップフロップF3がセットされて、ANDゲートG1の一方側の入力端子がLレベルに変化する。したがって、その後は、ポート番号N1を指定して入力レジスタR1にクリアデータを出力した場合だけ、チップセレクト信号CS1に基づいて、クリアデータが入力レジスタR1に取得されることになる。 On the other hand, when a start pulse is output in such a state, the flip-flop F3 is set, and the input terminal on one side of the AND gate G1 changes to L level. Therefore, thereafter, only when the port number N1 is specified and the clear data is output to the input register R1, the clear data is acquired by the input register R1 based on the chip select signal CS1.
そして、チップセレクト信号CS1の立上りタイミングでは、フリップフロップF3がリセットされる一方で、フリップフロップF1がセットされる。フリップフロップF3がリセットされると、ANDゲートG1の入力端子の一方がHレベルとなるので、その後、チップセレクト信号CS1はANDゲートG1を通過することができず、言い換えると、その後のレジスタR1への書込みが禁止される。 At the rising timing of the chip select signal CS1, the flip-flop F3 is reset while the flip-flop F1 is set. When the flip-flop F3 is reset, one of the input terminals of the AND gate G1 becomes H level, and thereafter the chip select signal CS1 cannot pass through the AND gate G1, in other words, to the subsequent register R1. Writing is prohibited.
一方、チップセレクト信号CS1の立上りタイミングで、フリップフロップF1がセットされるので、そのタイミングで、ANDゲートG2の入力端子の一方がLレベルに変化し、その後は、チップセレクト信号CS2がANDゲートG2を通過できることになる。つまり、その後は、レジスタR2への書込みだけが許可されることになる。 On the other hand, since the flip-flop F1 is set at the rising timing of the chip select signal CS1, one of the input terminals of the AND gate G2 changes to L level at that timing, and thereafter, the chip select signal CS2 is changed to the AND gate G2. Will be able to pass through. That is, thereafter, only writing to the register R2 is permitted.
したがって、その後、ポート番号N2を指定して入力レジスタR2にクリアデータを出力すると、チップセレクト信号CS2に基づいて、クリアデータが入力レジスタR2に取得される。そして、この動作に対応して、フリップフロップF1がリセットされ、フリップフロップF2がセットされる。そのため、その後は、チップセレクト信号CS2はANDゲートG2を通過することができず、レジスタR2への書込みが禁止される一方、チップセレクト信号CS3はANDゲートG3を通過できることになる。 Therefore, after that, when the port number N2 is designated and clear data is output to the input register R2, the clear data is acquired in the input register R2 based on the chip select signal CS2. In response to this operation, the flip-flop F1 is reset and the flip-flop F2 is set. Therefore, thereafter, the chip select signal CS2 cannot pass through the AND gate G2, and writing to the register R2 is prohibited, while the chip select signal CS3 can pass through the AND gate G3.
以下、同様であり、その後、ポート番号N3を指定して入力レジスタR3にクリアデータを出力すると、チップセレクト信号CS3に基づいて、クリアデータが入力レジスタR3に取得される。そして、この動作に対応して、フリップフロップF2がリセットされ、フリップフロップF3がセットされる。そのため、その後は、レジスタR3への書込みが禁止される一方、チップセレクト信号CS1はANDゲートG1を通過することができ、レジスタR1への書込みだけが許可される。 The same applies to the following, and thereafter, when the port number N3 is designated and clear data is output to the input register R3, the clear data is acquired in the input register R3 based on the chip select signal CS3. In response to this operation, the flip-flop F2 is reset and the flip-flop F3 is set. Therefore, thereafter, writing to the register R3 is prohibited, while the chip select signal CS1 can pass through the AND gate G1, and only writing to the register R1 is permitted.
以上の通り、本実施例では、動作順序回路93が機能することで、スタートパルスが出力された後、入力レジスタR1→入力レジスタR2→入力レジスタR3→入力レジスタR1→・・・・の順番でだけ、クリアデータを出力することができ、この順番に従わない場合には、WDTクリア回路55でクリア信号を生成することができず、CPUコアはリセット状態となる。なお、動作順序が正しくても、以下に説明するとおり、クリアデータを間違えれば、CPUコアがリセットされる。
As described above, in this embodiment, the
一致判定回路90は、一対のレジスタRi,Ri’からの出力値を受けて減算処理を実行する減算回路80と、減算回路の出力ビット(実施例では8ビット)を受けてOR演算を実行するNORゲート82と、4個のチップセレクト信号CS0〜CS3を受けてAND演算を実行するNANDゲート81と、NANDゲート81とNORゲート82の出力を受けてAND演算を実行するNANDゲート83と、を有して構成されている。なお、NANDゲート83の出力が、ウォッチドッグタイマ54に供給されるLアクティブのクリア信号CLRとなる。
The
ここで、減算回路80は、一対のレジスタRi,Ri’からの出力値が一致する場合には、その減算結果である8ビット長のゼロを出力する。そして、NORゲート82は、全ての入力値がゼロである場合に限り、その出力値がHレベルとなるので、結局、一対のレジスタRi,Ri’からの出力値が一致する場合に限り、NORゲート82の出力値がHレベルになる。
Here, when the output values from the pair of registers Ri and Ri 'match, the subtraction circuit 80 outputs an 8-bit length zero as the subtraction result. Since the output value of the NOR
NANDゲート81は、4個のチップセレクト信号CS0〜CS3の何れかがLレベルであると、その出力がHレベルとなり、それ以外ではLレベルを維持する。そのため、NANDゲート83の出力は、一対のレジスタRi,Ri’からの出力値が一致する場合であって、且つ、対応するチップセレクト信号CSiがLレベルであるタイミングだけLレベルになり、この信号が、ウォッチドッグタイマ54をゼロクリアするクリア信号CLRとなる。
The
ところで、本実施例では、ウォッチドッグタイマ54をクリアするために、常に同一のクリアデータを使用するか、異なる複数(3個)のクリアデータを使用するかを選択可能に構成されている。ここで、同一のクリアデータとは具体的には10Hであり、異なる複数のクリアデータとは、例えば、22H、33H、44Hである。
By the way, in this embodiment, in order to clear the
そして、異なるクリアデータを使用する場合には、入力レジスタR1に22Hを出力してウォッチドッグタイマ54をクリアする一度目のクリア処理と、所定時間後、入力レジスタR2に33Hを出力してウォッチドッグタイマ54をクリアする2度目のクリア処理と、所定時間後、入力レジスタR3に44Hを出力してウォッチドッグタイマ54をクリアする3度目のクリア処理とを循環的に繰り返すようにしている。そのため、ROMの固定データ領域には、入力レジスタRiのアドレスデータと、その入力レジスタRiに書き込むべきキーワードとを対応して記憶している(図7(b)参照)。なお、これらのクリア処理については、図9に基づいて更に説明する。
When different clear data is used, 22H is output to the input register R1 to clear the
図8及び図9は、主制御部21の制御プログラムを示すフローチャートであり、電源電圧の復旧や投入に基づいて起動されるシステムリセット処理(図8)と、所定時間毎(2mS)に起動されるマスク可能なタイマ割込み処理(図9)とで構成されている。
FIGS. 8 and 9 are flowcharts showing the control program of the
以下、図8を参照しつつ、システムリセット処理プログラム(メイン処理)について説明する。メイン処理が開始されるのは、停電状態からの復旧時のように初期化スイッチSWTがOFF状態で電源がON状態になる場合と、遊技ホールの開店時のように、初期化スイッチSWTがON操作されて電源がON状態になる場合とがある。なお、異常対応回路REVが起動してCPUが強制的にリセットされる場合もある。 Hereinafter, the system reset processing program (main processing) will be described with reference to FIG. The main process is started when the initialization switch SWT is OFF and the power is turned ON, such as when recovering from a power failure, and when the game hall is opened, the initialization switch SWT is ON. There is a case where the power source is turned on by being operated. Note that the abnormality handling circuit REV may be activated to forcibly reset the CPU.
何れの場合でも、CPUコアがリセットされると、図5(b)に示す管理プログラムが動作を開始する(ST1)。そして、ROMのパラメータ領域に登録されている動作パラメータが、対応する機能レジスタRTiに転送される(SS1)。先に説明した通り、機能レジスタRTiには、図5に示す待機時間設定レジスタ60が含まれるが、本実施例では、全てのサブ制御部が立ち上がるまでに十分な待機時間(例えば10秒)を確保するため、所定値(例えば20)の動作パラメータをROMのパラメータ領域に登録しており、この動作パラメータがステップSS1の処理で、設定レジスタ60に設定される。 In any case, when the CPU core is reset, the management program shown in FIG. 5B starts operating (ST1). Then, the operation parameter registered in the parameter area of the ROM is transferred to the corresponding function register RTi (SS1). As described above, the function register RTi includes the standby time setting register 60 shown in FIG. 5, but in this embodiment, a sufficient standby time (for example, 10 seconds) is required until all the sub-control units start up. In order to ensure this, an operation parameter having a predetermined value (for example, 20) is registered in the parameter area of the ROM, and this operation parameter is set in the setting register 60 in the process of step SS1.
次に、自己診断処理やセキュリティ処理が終わると(SS2)、管理プログラムの処理によって、判定レジスタ63の値が繰り返しチェックされる(SS3)。図5(c)に関して説明した通り、このタイミングでは、オーバーフロー信号OVのパルス周期は500mSであるので、カウンタ61は、500ms毎にカウンタ値をインクリメント更新する。
Next, when the self-diagnosis process and the security process are finished (SS2), the value of the determination register 63 is repeatedly checked by the process of the management program (SS3). As described with reference to FIG. 5C, at this timing, the pulse period of the overflow signal OV is 500 ms, so the
このカウンタ61のカウンタ値は、比較回路62において、設定レジスタ60の記憶値(20)と比較される。そして、カウンタ61が電源リセットされてから10秒経過してカウンタ値が20に達するタイミングで、判定レジスタ63の値が始めてONレベルとなるので、ステップSS3の処理によって、約10秒の待機時間が確保されることになる。
The counter value of the
このように本実施例では、制御プログラム(ユーザプログラム)を全く使用することなく、所望の時間を消費する待機処理が実行できるので、ROMの記憶領域の浪費を防止することができる。なお、この点は、先に説明した通りである。 In this way, in this embodiment, standby processing that consumes a desired time can be executed without using any control program (user program), and therefore, waste of the storage area of the ROM can be prevented. This point is as described above.
このようにして、必要な待機処理が終わると、8000H番地以降のユーザプログラムが開始され、Z80CPUは、最初に、CPU内部のスタックポインタSPの値を、スタック領域の最終アドレスに対応して初期設定する(ST2)。
In this way, when the necessary standby processing is completed, the user program after
次に、図6の入力レジスタ70を含んだ各種の機能レジスタRTiの値を初期設定する(ST3)。図6に関して説明した通り、入力レジスタ70には、同一の設定値データXを2回設定する必要がある(ST30+ST31)。ここで、設定値データXは、ポストスケーラ回路51の分周比データと、ウォッチドッグタイマ54などの動作可否を規定する制御データとを含んでいるが、本実施例では、制御データ=1として、ウォッチドッグタイマ機能を活用する。
Next, the values of various function registers RTi including the
また、ポストスケーラ回路51の分周比Nは、ステップST4の処理から、割り込みが許可されるステップST16までの標準処理時間T0(図8参照)と、タイマ割込み処理において、WDTククリア処理(ST21)が実行されるまでの経過時間T1(図9参照)との総和(T0+T1)に基づいて規定される。 Further, the frequency division ratio N of the postscaler circuit 51 is determined based on the standard processing time T0 (see FIG. 8) from the process of step ST4 to step ST16 in which the interrupt is permitted, and the WDT clear process (ST21) in the timer interrupt process. Is defined on the basis of the total (T0 + T1) with the elapsed time T1 (see FIG. 9).
すなわち、本実施例では、ポストスケーラ51の出力パルス周期は、100μS×分周比(N)の関係にあり、ウォッチドッグタイマ54が出力するオーバーフロー信号OVの出力周期Tは、ポストスケーラ51の出力パルス周期の100倍であるので、分周比Nは、100μS×N×100>T0+T1の条件で規定される。
That is, in this embodiment, the output pulse period of the postscaler 51 has a relationship of 100 μS × frequency division ratio (N), and the output period T of the overflow signal OV output from the
なお、前式において100μSは、システムクロックΦの周波数(20MHz)と、プリスケーラ50の分周比(2000)で決まり、ウォッチドッグタイマ54が100進カウンタで構成されることに基づいて倍率100が決まるので、各回路の構成が変われば分周比が変わるのは勿論である。但し、何れにしても、オーバーフロー信号OVの出力周期T、言い換えると、ウォッチドッグタイマ54がタイムアウトするまでのタイムアウト時間Tは、T>T0+T1に設定される。
In the above equation, 100 μS is determined by the frequency (20 MHz) of the system clock Φ and the frequency division ratio (2000) of the
ここで、ステップST4の処理から、割り込みが許可されるステップST16までの標準処理時間T0が問題になるが、通常、電圧降下信号ABNを判定する処理(ST4〜ST5)は一回で完了するので、この実施例では余裕を見て、ステップST4〜ST5の処理が二回実行される場合を基準に、標準処理時間T0を算出している。 Here, the standard processing time T0 from the processing in step ST4 to step ST16 in which the interrupt is permitted becomes a problem, but the processing for determining the voltage drop signal ABN (ST4 to ST5) is usually completed at once. In this embodiment, the standard processing time T0 is calculated with reference to the case where the processing of steps ST4 to ST5 is executed twice with a margin.
以上のような初期設定処理(ST3)が終われば、入力ポートINPから電圧降下信号ABNを取得し(ST4)、これが正常レベルであることを確認した上で(ST5)、入力ポートINPからRAMクリア信号DELを取得する(ST6)。RAMクリア信号DELとは、ワンチップマイコン21Aの内蔵RAMの全領域を初期設定するか否かを決定する信号であって、係員が操作する初期化スイッチSWTのON/OFF状態に対応した値を有している。 When the initial setting process (ST3) as described above is completed, the voltage drop signal ABN is acquired from the input port INP (ST4), and after confirming that this is a normal level (ST5), the RAM is cleared from the input port INP. The signal DEL is acquired (ST6). The RAM clear signal DEL is a signal for determining whether or not to initialize all the areas of the built-in RAM of the one-chip microcomputer 21A, and has a value corresponding to the ON / OFF state of the initialization switch SWT operated by the staff. Have.
次にRAMクリア信号DELのレベルが判定されるが(ST7)、RAMクリア信号DELがON状態であったと仮定すると、内蔵RAMの全領域がゼロクリアされる(ST11)。次に、RAM領域がゼロクリアされたことを報知するための電源投入コマンドを出力する(ST12)。 Next, the level of the RAM clear signal DEL is determined (ST7). If it is assumed that the RAM clear signal DEL is in the ON state, the entire area of the built-in RAM is cleared to zero (ST11). Next, a power-on command for notifying that the RAM area has been cleared to zero is output (ST12).
次に、タイマ割込み動作(図9)を起動する割込み信号INTを出力するCTCを初期設定する(ST13)。そして、CPUを割込み禁止状態にセットした状態で(ST14)、各種のカウンタついて更新処理を実行し(ST15)、その後、CPUを割込み許可状態に戻して(ST16)、ステップST14に戻る。なお、ステップST15で更新されるカウンタには、例えば、停止図柄の抽選などに使用される。 Next, the CTC that outputs the interrupt signal INT for starting the timer interrupt operation (FIG. 9) is initialized (ST13). Then, with the CPU set to the interrupt disabled state (ST14), update processing is executed for various counters (ST15), and then the CPU is returned to the interrupt enabled state (ST16) and the process returns to step ST14. The counter updated in step ST15 is used, for example, for lottery of a stop symbol.
ステップST7の判定処理に戻って説明すると、CPUコアが異常対応回路REVなどによって強制的にリセットされた場合や、停電状態からの復旧時には、RAMクリア信号DELはOFF状態である。そして、このような場合には、ステップST7の判定に続いて、バックアップフラグBFLの内容が判定される(ST8)。バックアップフラグBFLとは、電源監視処理(ST20)においてバックアップ処理が実行されたことを示すデータであり、この実施例では、電源遮断時にバックアップフラグBFLが5AHとされ、電源復帰後のステップST20の処理でゼロクリアされる。 Returning to the determination processing in step ST7, the RAM clear signal DEL is in the OFF state when the CPU core is forcibly reset by the abnormality handling circuit REV or when the CPU core is restored from the power failure state. In such a case, following the determination in step ST7, the content of the backup flag BFL is determined (ST8). The backup flag BFL is data indicating that the backup process has been executed in the power supply monitoring process (ST20). In this embodiment, the backup flag BFL is set to 5AH when the power is shut off, and the process of step ST20 after the power is restored. Is cleared to zero.
そのため、電源投入時や、停電状態からの復旧時である場合には、バックアップフラグBFLの内容が5AHの筈である。但し、何らかの理由でプログラムが暴走状態となり、異常対応回路REVの動作によるCPUリセット動作が生じたような場合には、バックアップフラグBFL=00Hである。したがって、BFL≠5AH(通常はBFL=00H)となる場合には、ステップST8からステップST11の処理に移行させて遊技機の動作を初期状態に戻す。 Therefore, when the power is turned on or when recovering from the power failure state, the content of the backup flag BFL is 5AH. However, if the program goes out of control for some reason and a CPU reset operation occurs due to the operation of the abnormality handling circuit REV, the backup flag BFL = 00H. Therefore, when BFL ≠ 5AH (normally BFL = 00H), the process proceeds from step ST8 to step ST11 to return the operation of the gaming machine to the initial state.
一方、バックアップフラグBFL=5AHであれば、チェックサム値を算出するためのチェックサム演算を実行する(ST9)。ここで、チェックサム演算とは、内蔵RAMのワーク領域を対象とする8ビット加算演算である。そして、チェックサム値が算出されたら、この演算結果を、RAMのSUM番地の記憶値と比較をする(ST10)。 On the other hand, if backup flag BFL = 5AH, checksum calculation for calculating the checksum value is executed (ST9). Here, the checksum operation is an 8-bit addition operation for the work area of the built-in RAM. When the checksum value is calculated, the calculation result is compared with the stored value at the SUM address in the RAM (ST10).
SUM番地には、電圧降下時に実行される電源監視処理(ST20)において、同じチェックサム演算によるチェックサム値が記憶されている。なお、記憶された演算結果は、内蔵RAMの他のデータと共に、バックアップ電源によって維持されている。したがって、本来は、ステップST7の判定によって両者が一致する筈である。 In the SUM address, a checksum value obtained by the same checksum calculation is stored in the power supply monitoring process (ST20) executed when the voltage drops. The stored calculation result is maintained by a backup power source together with other data of the built-in RAM. Therefore, the two should be matched by the determination in step ST7.
しかし、電源降下時にチェックサム演算の実行できなかった場合や、実行できても、その後、メイン処理のチェックサム演算(ST9)の実行時までの間に、ワーク領域のデータが破損している場合もあり、このような場合にはステップST10の判定結果は不一致となる。 However, if the checksum calculation cannot be executed when the power is turned off, or if the data in the work area is damaged after the execution of the checksum calculation (ST9) of the main process, even if it can be executed In such a case, the determination result in step ST10 is inconsistent.
そこで、判定結果の不一致によりデータ破損が検出された場合には、ステップST11の処理に移行させてRAMクリア処理を実行し、遊技機の動作を初期状態に戻す。一方、ステップST10の判定において、チェックサム演算(ST9)によるチェックサム値と、SUM番地の記憶値とが一致する場合には、上記したステップST13の処理に移行することになる。 Therefore, if data corruption is detected due to a discrepancy in the determination results, the process proceeds to step ST11, RAM clear processing is executed, and the operation of the gaming machine is returned to the initial state. On the other hand, if it is determined in step ST10 that the checksum value obtained by the checksum calculation (ST9) matches the stored value at the SUM address, the process proceeds to step ST13 described above.
続いて、上記したメイン処理を中断させて、2mS毎に開始されるタイマ割込み処理プログラム(図9)を説明する。タイマ割込みが生じると、CPUのレジスタを保存することなく、直ちに電源監視処理が実行される(ST20)。これは、タイマ割込み処理が起動されるタイミングが、ステップST16の直後に固定されているためである。 Next, a timer interrupt processing program (FIG. 9) started every 2 mS with the main processing described above being interrupted will be described. When the timer interrupt occurs, the power supply monitoring process is immediately executed without saving the CPU register (ST20). This is because the timing at which the timer interrupt process is started is fixed immediately after step ST16.
電源監視処理(ST20)では、電源基板20から供給されている電圧降下信号ABNのレベルを判定し、異常レベルであれば、バックアップフラグBFLを5AHに設定し、チェックサム値を算出して、SUM番地に記憶した上で、電源が遮断されるのを待つ。
In the power supply monitoring process (ST20), the level of the voltage drop signal ABN supplied from the
このような電源監視処理(ST20)が終わると、ワンチップマイコンに内蔵されている異常対応回路REVのウォッチドッグタイマ54について、これをクリアするWDTクリア処理を実行する(ST21)。WDTクリア処理(ST21)には二種類あるが、その何れか一方が実行される。
When such a power supply monitoring process (ST20) is completed, a WDT clear process for clearing the
先ず、簡易構成のWDTクリア処理は、図9(b)に示す通りであり、図7に示す入力レジスタ91のうち、特に、ポート番号N0の入力レジスタR0に、規定値であるクリアデータ10Hを書き込む(ST40)。その結果、減算回路80(図7)から一致データであるゼロが出力され、NANDゲート83からアクティブレベルのクリア信号CLR信号が出力される。そして、ウォッチドッグタイマ54は、このクリア信号CLRによってゼロクリアされるので、オーバーフロー信号OVが出力されることが未然に回避され、CPUコアがリセットされることも回避される。
First, the WDT clear process with a simple configuration is as shown in FIG. 9B. Of the
上記のようなWDTクリア処理でも足りるが、セキュリィティレベルを上げるには、図9(c)の構成を採るのが好適である。この高レベル構成を採る場合には、ROMの固定値データ領域に、ポート番号とキーワードを予め記憶しておくと共に、循環動作するポインタPTを使用するのが好適である。なお、図9(c)は、図7(b)と同一事項を一般的に記載したものである。 Although the WDT clear process as described above is sufficient, it is preferable to adopt the configuration of FIG. 9C in order to increase the security level. When this high-level configuration is adopted, it is preferable to store a port number and a keyword in advance in the fixed value data area of the ROM and to use a pointer PT that performs a cyclic operation. Note that FIG. 9C generally describes the same items as FIG. 7B.
図9(c)の処理内容を説明すると、先ず、ポインタPTが指示するROMアドレスからレジスタアドレス情報を取得する(ST41)。なお、取得されるレジスタアドレス情報は、この実施例では、ポート番号N1〜N3の何れかである(図7(b)参照)。 The processing content of FIG. 9C will be described. First, register address information is acquired from the ROM address indicated by the pointer PT (ST41). In this embodiment, the acquired register address information is one of the port numbers N1 to N3 (see FIG. 7B).
次に、ポインタPTを更新した後、ポインタPTが指示するアドレスからクリアデータを取得する(ST42)。取得されるクリアデータは、ポート番号N1〜N3に対応して、22H〜44Hの何れかである(図7(b)参照)。 Next, after updating the pointer PT, clear data is acquired from the address indicated by the pointer PT (ST42). The acquired clear data is any one of 22H to 44H corresponding to the port numbers N1 to N3 (see FIG. 7B).
そして、ステップST42の処理で取得したクリアデータを、ステップST41の処理で特定される所定レジスタRiに書き込む(ST43)。この処理の結果、図7に示すNANDゲート83から、アクティブレベルのクリア信号CLR信号が出力され、ウォッチドッグタイマ54がゼロクリアされ、CPUコアのリセット動作が未然に防止される。
And the clear data acquired by the process of step ST42 is written in the predetermined register Ri specified by the process of step ST41 (ST43). As a result of this processing, an active level clear signal CLR signal is output from the
この高レベル構成では、クリアデータが、割込み処理毎に循環的に変化するので、例えば、違法遊技者が、所定の遊技動作を契機として、正規の制御プログラムに代えて違法プログラムを実行させようとしても、違法プログラムの実行時に出力すべきクリアデータが不明であるので、違法動作を容易には成功させることができない。 In this high-level configuration, the clear data changes cyclically for each interrupt process. For example, an illegal player tries to execute an illegal program instead of a regular control program triggered by a predetermined game operation. However, since the clear data to be output when the illegal program is executed is unknown, the illegal operation cannot be easily succeeded.
なお、本実施例では、一度でもWDTクリア処理(ST21)に失敗すると、その後は、RAMの書き換え動作(memory write)が実行されないことは図6の回路構成に示す通りである。 In this embodiment, as shown in the circuit configuration of FIG. 6, if the WDT clear process (ST21) fails even once, the RAM rewrite operation (memory write) is not executed thereafter.
以上のようにしてWDTクリア処理(ST21)が終わると、次に、各遊技動作の時間を管理しているタイマについて、タイマ減算処理を実行する(ST22)。ここで減算されるタイマは、主として、電動チューリップや大入賞口の開放時間やその他の遊技演出時間を管理するために使用される。 When the WDT clear process (ST21) is completed as described above, next, a timer subtraction process is executed for the timer that manages the time of each game operation (ST22). The timer to be subtracted here is mainly used for managing the opening time of the electric tulip and the special winning opening and other game effect times.
続いて、当り抽選で使用される当りカウンタの値を更新する(ST23)。但し、大当り抽選に使用する乱数値RNDは、乱数生成回路GNRで自動生成されるので、プログラム処理による乱数値RNDの更新処理は存在しない。 Subsequently, the value of the winning counter used in the winning lottery is updated (ST23). However, since the random number value RND used for the big hit lottery is automatically generated by the random number generation circuit GNR, there is no update processing of the random number value RND by program processing.
続いて、図柄始動口15や大入賞口16の入賞検出スイッチを含む各種スイッチ類のON/OFF信号を入力し、ワーク領域にON/OFF信号レベルや、そのエッジ情報を記憶する(ST24)。
Subsequently, ON / OFF signals of various switches including a winning detection switch of the symbol start opening 15 and the big winning
続いて、エラー管理処理を実行する(ST25)。エラー管理処理は、遊技球の補給が停止したり、遊技球が詰まっていないかなど、機器内部に異常が生じていないかの判定を含んでいる。次に、払出制御部24から受けた賞球計数信号に基づく管理処理を実行する(ST26)。
Subsequently, an error management process is executed (ST25). The error management process includes a determination as to whether an abnormality has occurred inside the device, such as whether or not the supply of game balls has stopped or the game balls are clogged. Next, a management process based on the winning ball count signal received from the
続いて、普通図柄処理を行う(ST27)。普通図柄処理とは、電動チューリップなど、普通電動役物を作動させるか否かの判定を意味する。具体的には、ステップST24のスイッチ入力結果によって遊技球がゲートを通過していると判定された場合に、当りカウンタの値に基づいて当否抽選を実行し、当選状態の記憶値であれば当り中の動作モードに変更する。また、当り中となれば、電動チューリップなど、普通電動役物の作動に向けた処理を行う。 Subsequently, normal symbol processing is performed (ST27). The normal symbol processing means determination as to whether or not to operate an ordinary electric accessory such as an electric tulip. Specifically, if it is determined that the game ball has passed through the gate based on the switch input result in step ST24, the winning / not determining lottery is executed based on the value of the winning counter. Change to the middle operating mode. In addition, if it is a hit, processing for the operation of a normal electric accessory such as an electric tulip is performed.
続いて、特別図柄処理を行う(ST27)。特別図柄処理とは、大入賞口16など特別電動役物を作動させるか否かの判定である。具体的には、ステップST24のスイッチ入力結果によって入賞スイッチ信号SGが立上ったと判定される場合には、ラッチ回路LTから乱数値RNDを取得して大当り抽選処理を実行し、当選状態の記憶値であれば大当り中の動作モードに変更する。また、大当り中となれば、大入賞口など種特別電動役物の作動に向けた処理を行う。
Subsequently, special symbol processing is performed (ST27). The special symbol process is a determination as to whether or not to operate a special electric accessory such as the special winning
このような特別図柄処理(ST28)の後、主制御部21で管理するLEDについて点灯動作を進行させると共に(ST29)、電動チューリップや大入賞口などの開閉動作を実現するソレノイド駆動処理を実行した後(ST30)、CPUを割込み許可状態EIに戻してタイマ割込みを終える(ST31)。その結果、割込み処理ルーチンからメイン処理の無限ループ処理(図7)に戻り、ステップST15の処理が実行される。
After such special symbol processing (ST28), the lighting operation of the LEDs managed by the
以上、本発明の実施例について詳細に説明したが、具体的な回路構成は適宜に変更可能である。 Although the embodiments of the present invention have been described in detail above, specific circuit configurations can be changed as appropriate.
GM 遊技機
21 主制御手段
22 演出制御手段
REV 異常対応手段
21A 電子素子
SS3 待機手段
ST3 開始手段
70 機能レジスタ
Claims (6)
前記主制御手段は、抽選処理を含んだ制御動作を実行するCPUと、制御動作時に適宜にアクセスされるRAMと、制御動作を規定する制御プログラム、及び、制御動作に必要な動作パラメータを固定的に記憶するROMと、所定の監視時間に至るまでにクリア処理がされないと、CPUをリセット状態にする異常対応手段と、素子内部の動作を規定するデータを設定可能な機能レジスタと、を内蔵する単一の電子素子を有して構成され、
前記動作パラメータで規定される待機時間が経過するまで、前記異常対応手段を機能させない待機手段と、
前記待機手段の待機動作が完了すると、前記制御プログラムの動作に基づいて前記異常対応手段を機能させる開始手段と、を設け、
前記開始手段は、特定の機能レジスタに所定の設定データを書き込むことで実現されるよう構成されている遊技機。 A main control means for executing a lottery process caused by a predetermined switch signal and outputting a control command for specifying the lottery result; an effect control means for executing an effect operation corresponding to the lottery result specified by the control command; Comprising
The main control means is configured to fix a CPU that executes a control operation including a lottery process, a RAM that is appropriately accessed during the control operation, a control program that defines the control operation, and an operation parameter necessary for the control operation. A ROM that stores data, an error handling means that resets the CPU if the clear process is not performed before a predetermined monitoring time, and a function register that can set data defining the internal operation of the element Configured with a single electronic element,
Waiting means that does not cause the abnormality handling means to function until the waiting time specified by the operation parameter has elapsed,
When the standby operation of the standby unit is completed, a start unit that causes the abnormality handling unit to function based on the operation of the control program is provided,
The gaming machine is configured to be realized by writing predetermined setting data in a specific function register.
特定複数の機能レジスタに各々キーワードを書き込むことで、CPUのリセットを回避するかが選択可能に構成されている請求項1〜3の何れかに記載の遊技機。 By writing a single keyword to a specific single function register, avoiding a CPU reset,
The gaming machine according to any one of claims 1 to 3, wherein the game machine is configured to select whether to avoid resetting the CPU by writing a keyword to each of the plurality of specific function registers.
The game according to any one of claims 1 to 5, wherein whether or not data writing to the RAM is permitted after the abnormality handling means functions and the CPU is reset can be set in advance by an operation parameter. Machine.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012238061A JP5390680B1 (en) | 2012-10-29 | 2012-10-29 | Game machine |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012238061A JP5390680B1 (en) | 2012-10-29 | 2012-10-29 | Game machine |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2013196722A Division JP2014087606A (en) | 2013-09-24 | 2013-09-24 | Game machine |
Publications (2)
Publication Number | Publication Date |
---|---|
JP5390680B1 true JP5390680B1 (en) | 2014-01-15 |
JP2014087408A JP2014087408A (en) | 2014-05-15 |
Family
ID=50036720
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2012238061A Active JP5390680B1 (en) | 2012-10-29 | 2012-10-29 | Game machine |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5390680B1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2014087606A (en) * | 2013-09-24 | 2014-05-15 | Fujishoji Co Ltd | Game machine |
-
2012
- 2012-10-29 JP JP2012238061A patent/JP5390680B1/en active Active
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2014087606A (en) * | 2013-09-24 | 2014-05-15 | Fujishoji Co Ltd | Game machine |
Also Published As
Publication number | Publication date |
---|---|
JP2014087408A (en) | 2014-05-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4789862B2 (en) | Game machine | |
JP4907608B2 (en) | Game machine | |
JP5009247B2 (en) | Game machine | |
JP4620707B2 (en) | Game machine | |
JP2017104420A (en) | Game machine | |
JP5805741B2 (en) | Game machine | |
JP5450766B1 (en) | Game machine | |
JP5851125B2 (en) | Game machine | |
JP5231603B2 (en) | Game machine | |
JP2016026594A (en) | Game machine | |
JP5390680B1 (en) | Game machine | |
JP4632375B2 (en) | Game machine | |
JP5805740B2 (en) | Game machine | |
JP5450767B1 (en) | Game machine | |
JP2014087606A (en) | Game machine | |
JP2016005604A (en) | Game machine | |
JP5497843B2 (en) | Game machine | |
JP5009425B2 (en) | Game machine | |
JP5475024B2 (en) | Game machine | |
JP6058776B2 (en) | Game machine | |
JP5876090B2 (en) | Game machine | |
JP4987105B2 (en) | Game machine | |
JP2017060855A (en) | Game machine | |
JP5875998B2 (en) | Game machine | |
JP4970582B2 (en) | Game machine |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
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: 20130910 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20131010 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5390680 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |