JP4372122B2 - Game machine - Google Patents

Game machine Download PDF

Info

Publication number
JP4372122B2
JP4372122B2 JP2006177625A JP2006177625A JP4372122B2 JP 4372122 B2 JP4372122 B2 JP 4372122B2 JP 2006177625 A JP2006177625 A JP 2006177625A JP 2006177625 A JP2006177625 A JP 2006177625A JP 4372122 B2 JP4372122 B2 JP 4372122B2
Authority
JP
Japan
Prior art keywords
state
data
save
cpu
value
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 - Fee Related
Application number
JP2006177625A
Other languages
Japanese (ja)
Other versions
JP2006289111A (en
Inventor
公督 市川
Original Assignee
株式会社藤商事
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 株式会社藤商事 filed Critical 株式会社藤商事
Priority to JP2006177625A priority Critical patent/JP4372122B2/en
Publication of JP2006289111A publication Critical patent/JP2006289111A/en
Application granted granted Critical
Publication of JP4372122B2 publication Critical patent/JP4372122B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

本発明は、パチンコ機などの遊技機に関し、特に、遊技動作中に停電などが生じても、電源復旧後には正常に元の遊技動作を再開できるように改善した遊技機に関するものである。   The present invention relates to a gaming machine such as a pachinko machine, and more particularly to an improved gaming machine so that the original gaming operation can be resumed normally after power is restored even if a power failure occurs during the gaming operation.

パチンコ機などのマイコン内蔵型の遊技機は、電源電圧が所定値を下回った場合には正常な動作を継続することが不可能となる。そこで、パチンコ機などでは落雷などに伴う停電が生じても、その影響を受けないような工夫が必要となる。   A game machine with a built-in microcomputer such as a pachinko machine cannot continue normal operation when the power supply voltage falls below a predetermined value. Therefore, it is necessary to devise a device that will not be affected by a power failure caused by a lightning strike in a pachinko machine.

ここで、各パチンコホールに自家発電装置を備えるような対策もあり得るが、パチンコ機での消費電力は少なくなく、しかもパチンコ機の台数も多いので、かかる対策はコスト的にも設置空間的にも現実的でない。   Here, there may be a measure that includes a self-power generation device in each pachinko hall, but the power consumption of the pachinko machine is not small, and the number of pachinko machines is also large. Is not realistic.

そのため、停電に対する一般的な対策としては、NMIの処理によって必要なデータをRAMエリアに保存し、そのRAMエリアだけにバックアップ電源を供給して内容を維持し、商用電源が復旧すればバックアップされたデータを読み出して、停電前の遊技動作を再現するようにしている。   Therefore, as a general measure against power failure, the necessary data is saved in the RAM area by NMI processing, the backup power is supplied only to the RAM area, the contents are maintained, and if the commercial power is restored, the data is backed up. The data is read to reproduce the game operation before the power failure.

しかしながら、停電などのトラブルは突発的に生じるので、例えば、停電前のパチンコ機が大当り状態であったような場合には、電源復旧後は、如何なる場合にも大当りゲームが再現される必要があり、そうでないと遊技者との間に無用のトラブルが発生してしまうことになる。また、停電状態でなくても、電源ラインに予期せぬ異常が生じることもあり、例えば、電源ラインが不安定な状態で変動しても、適切な動作をすることが望まれる。   However, troubles such as power outages occur suddenly. For example, if the pachinko machine before the power outage was in a big hit state, after the power is restored, the big hit game needs to be reproduced in any case. Otherwise, useless trouble will occur with the player. Moreover, even if it is not a power failure state, an unexpected abnormality may occur in the power supply line. For example, even if the power supply line fluctuates in an unstable state, an appropriate operation is desired.

この発明は、かかる要請に基づいてなされたものであって、中断された遊技動作が再開されるに際して、万一、電源電圧の変動やその他の電気的トラブルがあったとしても、極力、元のゲームが再現されるように改善された遊技機を提供することを課題とする。   The present invention has been made on the basis of such a request, and when the interrupted game operation is resumed, even if there are fluctuations in the power supply voltage or other electrical troubles, It is an object to provide an improved gaming machine so that a game can be reproduced.

上記の課題を解決するため、請求項1に係る発明は、制御プログラムに基づいて遊技動作を制御するCPUを有し、遊技者に有利な第1状態と遊技者に不利な第2状態とを択一的に選択可能な遊技機であって、前記制御プログラムにしたがった正常な処理がされなくなった場合には、リセット手段が機能して遊技動作を強制的に初期状態に戻すよう構成され、前記制御プログラムは、電源投入に対応して開始され、無限ループ処理を含んで構成された処理と、所定時間毎に前記第一処理を中断して開始され、繰り返し遊技動作を制御する第処理と、電源電圧が所定レベルを下回ると強制的に開始され、退避エリアへのデータ退避処理を行う処理とを含み、前記第処理では、前記データ退避処理の後、スタックポインタの値を特定記憶エリアに保存すると共に所定フラグを第2状態に設定しており、前記第処理では、前記所定フラグが第2状態であることを条件に、前記特定記憶エリアの保存内容に基づいて前記スタックポインタの値を設定した後、前記退避エリアに退避されているデータのデータ復帰処理を開始し、その後、前記所定フラグを第1状態に設定するリセット処理と共に、前記特定記憶エリアの保存内容を書き換えるクリア処理を実行しており、前記リセット処理と前記クリア処理とは連続して実行され、前記データ退避処理における前記退避エリアの退避先や、前記データ復帰処理における前記退避エリアの復帰元は、前記スタックポインタによって特定されるようになっている。 In order to solve the above problems, the invention according to claim 1 includes a CPU that controls a game operation based on a control program, and has a first state that is advantageous to the player and a second state that is disadvantageous to the player. A gaming machine that can be alternatively selected, and when the normal processing is not performed according to the control program, the reset means functions to forcibly return the gaming operation to the initial state, The control program is started in response to power-on, and includes a first process configured to include an infinite loop process , and a first process that is started by interrupting the first process every predetermined time, and controls a game operation repeatedly. second processing and the power supply voltage is started to force the falls below a predetermined level, and a third process of performing data saving process to save area, in the third process, after the data save processing, the stack pointer Identify value The predetermined flag with Save to憶area is set to a second state, wherein in the first process, on condition that said predetermined flag is in the second state, the stack based on the storage contents of said specified storage area After setting the pointer value, the data restoration process of the data saved in the save area is started, and then the saved contents of the specific storage area are rewritten together with the reset process for setting the predetermined flag to the first state. The clear process is executed, the reset process and the clear process are executed continuously, and the save destination of the save area in the data save process and the return source of the save area in the data return process are It is specified by the stack pointer.

また、請求項2に係る発明は、制御プログラムに基づいて遊技動作を制御するZ80CPUを有し、遊技者に有利な第1状態と遊技者に不利な第2状態とを択一的に選択可能な遊技機であって、前記制御プログラムにしたがった正常な処理がされなくなった場合には、リセット手段が機能して遊技動作を強制的に初期状態に戻すよう構成され、前記制御プログラムは、電源投入に対応して開始され、無限ループ処理を含んで構成された処理と、所定時間毎に前記第一処理を中断して開始され、繰り返し遊技動作を制御する第処理と、電源電圧が所定レベルを下回ると強制的に開始され、退避エリアへのデータ退避処理を行う処理とを含み、前記第処理では、前記データ退避処理の後、スタックポインタの値を特定記憶エリアに保存すると共に所定フラグを第2状態に設定しており、前記第処理では、前記所定フラグが第2状態であることを条件に、前記特定記憶エリアの保存内容に基づいて前記スタックポインタの値を設定した後、前記退避エリアに退避されているデータのデータ復帰処理を開始し、その後、前記フラグを第1状態に設定するリセット処理を実行しており、前記データ退避処理における前記退避エリアの退避先や、前記データ復帰処理における前記退避エリアの復帰元は、前記スタックポインタによって特定され、前記データ退避処理では、Z80CPUのAFレジスタの値を退避する第一処理と、Z80CPUのIレジスタの値を、前記AFレジスタのAレジスタに転送した後、そのAFレジスタの値を退避させる第二処理とをこの順番に実行する一方、前記データ復帰処理では、前記退避処理と逆の順番でデータを復帰させることで、Z80CPUが割込み許可状態か否かを特定すると共に、前記第一処理で退避させた前記AFレジスタの値を復帰させるようにしているThe invention according to claim 2 has a Z80 CPU for controlling the game operation based on the control program, and selectively selects a first state advantageous to the player and a second state disadvantageous to the player. A possible gaming machine, configured so that when normal processing according to the control program is not performed, the reset means functions to forcibly return the gaming operation to the initial state , initiated in response to power-on, a first process is configured to include an endless loop, is started by interrupting said first processing for each predetermined time, and a second process of controlling the repetition game operation, power supply A third process for forcibly starting when the voltage falls below a predetermined level and performing a data save process to the save area. In the third process, after the data save process, the value of the stack pointer is Keep And the predetermined flag is set to the second state, and the first process sets the value of the stack pointer based on the stored contents of the specific storage area on the condition that the predetermined flag is in the second state. After the setting, the data restoration process of the data saved in the save area is started, and then the reset process for setting the flag to the first state is executed, and the save area is saved in the data save process. The return source of the save area in the data return process is specified by the stack pointer. In the data save process, the first process for saving the AF register value of the Z80 CPU and the value of the I register of the Z80 CPU are used. After the transfer to the A register of the AF register, the second processing for saving the value of the AF register is executed in this order. On the other hand, in the data restoration process, the data is restored in the reverse order of the save process, thereby specifying whether or not the Z80 CPU is in an interrupt enabled state, and the value of the AF register saved in the first process is set. I am trying to recover .

以上説明したように、本発明によれば、中断された遊技動作が再開されるに際して、万一、電源電圧の変動やその他の電気的トラブルがあったとしても、極力、元のゲームが再現することが可能となる。   As described above, according to the present invention, when the interrupted game operation is resumed, the original game is reproduced as much as possible even if there is a fluctuation in power supply voltage or other electrical trouble. It becomes possible.

以下、本発明の一実施例であるカード式弾球遊技機に基づいて本発明の実施の形態を説明する。図1は、本実施例のパチンコ機2を示す斜視図であり、図2は、同パチンコ機2の側面図である。   Hereinafter, an embodiment of the present invention will be described based on a card-type ball game machine which is an embodiment of the present invention. FIG. 1 is a perspective view showing a pachinko machine 2 according to the present embodiment, and FIG. 2 is a side view of the pachinko machine 2.

図1に示すパチンコ機2は、島構造体に着脱可能に装着される矩形枠状の木製の外枠3と、外枠3に固着されたヒンジHを介して開閉可能に枢着される前枠4とで構成されている。なお、このパチンコ機2は、カード式球貸し機1に電気的に接続された状態で、パチンコホールの島構造体の長さ方向に複数個が配設されている。   The pachinko machine 2 shown in FIG. 1 is a rectangular frame-shaped wooden outer frame 3 that is detachably mounted on the island structure and a hinge H that is fixed to the outer frame 3 before being pivotably mounted. It consists of a frame 4. A plurality of pachinko machines 2 are arranged in the length direction of the island structure of the pachinko hall while being electrically connected to the card-type ball lending machine 1.

ヒンジHを介して外枠3に枢着される前枠4には、遊技盤5が裏側から着脱自在に装着され、遊技盤5の前側に対応させて、窓部を有するガラス扉6と前面板7とが夫々開閉自在に枢着されている。前面板7には発射用の遊技球を貯留する上皿8が装着され、前枠4の下部には、上皿8から溢流し又は抜き取った遊技球を貯留する下皿9と、発射手段10の発射ハンドル11とが設けられている。   A game board 5 is detachably attached from the back side to the front frame 4 pivotally attached to the outer frame 3 via a hinge H, and a glass door 6 having a window portion and a front side corresponding to the front side of the game board 5. A face plate 7 is pivotally attached to each other so as to be freely opened and closed. The front plate 7 is provided with an upper plate 8 for storing game balls for launching, and a lower plate 9 for storing game balls overflowing or extracted from the upper plate 8 and launching means 10 at the lower part of the front frame 4. And a firing handle 11 are provided.

この発射手段10は、回動操作可能な発射ハンドル11と、この発射ハンドル11の回動角度に応じた打撃力で打撃槌12(図4)により遊技球を発射させる発射モータなどを備えている。上皿8の右部には、カード式球貸し機1に対する球貸し操作用の操作パネル13が設けられ、この操作パネル13には、カード残額を3桁の数字で表示するカード残額表示部13aと、所定金額分の遊技球の球貸しを指示する球貸しスイッチ13bと、ゲーム終了時にカードの返却を指令する返却スイッチ13cとが設けられている。   The launching means 10 includes a launching handle 11 that can be rotated, and a launching motor that launches a game ball with a striking rod 12 (FIG. 4) with a striking force corresponding to the pivoting angle of the launching handle 11. . On the right side of the upper plate 8, there is provided an operation panel 13 for a ball lending operation for the card-type ball lending machine 1, and on this operation panel 13, a card remaining amount display portion 13a for displaying the remaining amount of the card with a three-digit number. And a ball lending switch 13b for instructing lending of game balls for a predetermined amount, and a return switch 13c for instructing to return the card at the end of the game.

図3に示すように、遊技盤5には、金属製の外レールと内レールとからなるガイドレール15がほぼ環状に設けられ、このガイドレール15の内側の遊技領域5aには、カラーの液晶ディスプレイ16、図柄始動手段(図柄始動兼入賞手段)17、開閉式入賞手段(大入賞手段)18、複数の普通入賞手段19(上段の普通入賞手段19以外に、開閉式入賞手段18の左右両側部に6つの普通入賞手段19)、2つのゲート20(通過口)が夫々所定の位置に配設されている。   As shown in FIG. 3, the game board 5 is provided with a guide rail 15 made of a metal outer rail and an inner rail in a substantially annular shape, and a color liquid crystal is provided in the game area 5 a inside the guide rail 15. Display 16, symbol starting means (symbol starting and winning means) 17, open / close type winning means (large winning means) 18, a plurality of normal winning means 19 (in addition to the upper normal winning means 19, both the left and right sides of the opening / closing type winning means 18 Six normal winning means 19) and two gates 20 (passage openings) are arranged at predetermined positions.

液晶ディスプレイ16は、変動図柄を表示するとともに背景画像や各種のキャラクタの動画などを表示する第1図柄表示手段22として機能する。第1図柄表示手段22は、背景画やキャラクタをアニメーション的に表示するとともに、左右方向に並ぶ3個(左、中、右)の図柄表示部22a〜22cを有し、図柄始動手段17に遊技球が入賞することを条件に、各図柄表示部22a〜22cの表示図柄が所定時間だけ変動表示(スクロール表示)され、図柄始動手段17への遊技球の入賞タイミングに応じた抽選結果に基づいて決定される停止図柄パターンで停止する。   The liquid crystal display 16 functions as a first symbol display means 22 that displays a changing symbol and also displays a background image, moving images of various characters, and the like. The first symbol display means 22 displays background images and characters in an animated manner, and has three (left, middle, and right) symbol display portions 22a to 22c arranged in the left-right direction. On the condition that the ball wins, the display symbols of the symbol display units 22a to 22c are variably displayed (scrolled) for a predetermined time, and based on the lottery result corresponding to the winning timing of the game ball to the symbol starting means 17. Stop at the determined stop symbol pattern.

液晶ディスプレイ16の直ぐ上側に、普通入賞手段19と第2図柄表示手段23とが設けられている。第2図柄表示手段23は1個の普通図柄を表示する普通図柄表示部を有し、ゲート20を通過した遊技球が検出されたとき、普通図柄表示部の表示図柄が所定時間だけ変動し、遊技球のゲート20通過時点において抽選された抽選用乱数値により決定される停止図柄を表示して停止するようになっている。図柄始動手段17は、開閉自在な左右1対の開閉爪17aを備えた電動式チューリップであり、第2図柄表示手段23の変動後の停止図柄が当り図柄を表示した場合に、開閉爪17aが所定時間だけ開放されて入賞し易くなる。   A normal winning means 19 and a second symbol display means 23 are provided immediately above the liquid crystal display 16. The second symbol display means 23 has a normal symbol display unit for displaying one normal symbol. When a game ball that has passed through the gate 20 is detected, the display symbol of the normal symbol display unit fluctuates for a predetermined time, A stop symbol determined by a random number for lottery drawn at the time the game ball passes through the gate 20 is displayed and stopped. The symbol starting means 17 is an electric tulip having a pair of left and right opening and closing claws 17a that can be freely opened and closed. It is easy to win a prize by opening for a predetermined time.

開閉式入賞手段18は前方に開放可能な開閉板18aを備え、第1図柄表示手段22の変動後の停止図柄が「777」などの当り図柄のとき、「大当り」と称する特別遊技が開始され、開閉板18aが前側に開放される。この開閉式入賞手段18の内部に特定領域18bがあり、この特定領域18bを入賞球が通過すると、特別遊技が継続される。ここで、特別遊技状態が遊技者に有利な状態に相当する。   The open / close-type winning means 18 includes an opening / closing plate 18a that can be opened forward, and when the stop symbol after the fluctuation of the first symbol display means 22 is a winning symbol such as “777”, a special game called “big hit” is started. The opening / closing plate 18a is opened to the front side. There is a specific area 18b inside the openable winning means 18, and when the winning ball passes through the specific area 18b, the special game is continued. Here, the special game state corresponds to a state advantageous to the player.

開閉式入賞手段18の開閉板18aが開放された後、所定時間が経過し、又は所定数(例えば10個)の遊技球が入賞して開閉板18aが閉じるときに、遊技球が特定領域18bを通過していない場合には特別遊技が終了するが、特定領域18bを通過していれば最大で例えば16回まで特別遊技が継続され、遊技者に有利な状態に制御される。   After the opening / closing plate 18a of the open / close winning means 18 is opened, when a predetermined time elapses, or when a predetermined number (for example, 10) of gaming balls wins and the opening / closing plate 18a is closed, the gaming ball is in the specific area 18b. If it has not passed, the special game ends. However, if it has passed the specific area 18b, the special game is continued up to, for example, 16 times, and is controlled in a state advantageous to the player.

図4に示すように、前枠4の裏側には、遊技盤5を裏側から押さえる裏機構板30が着脱自在に装着され、この裏機構板30には開口部30aが形成され、その上側に賞球タンク33と、これから延びるタンクレール34とが設けられ、このタンクレール34に接続された払出し手段35が裏機構板30の側部に設けられ、裏機構板30の下側には払出し手段35に接続された通路ユニット36が設けられている。払出し手段35から払出された遊技球は通路ユニット36を経由して上皿排出口8a(図1)から上皿8に払出される。   As shown in FIG. 4, on the back side of the front frame 4, a back mechanism plate 30 that presses the game board 5 from the back side is detachably mounted. The back mechanism plate 30 has an opening 30a formed on the top side thereof. A prize ball tank 33 and a tank rail 34 extending from the prize ball tank 33 are provided. Dispensing means 35 connected to the tank rail 34 is provided on the side of the back mechanism plate 30. A passage unit 36 connected to 35 is provided. The game balls paid out from the payout means 35 are paid out to the upper plate 8 from the upper plate discharge port 8a (FIG. 1) via the passage unit 36.

裏機構板30の開口部30aには、遊技盤5の裏側に装着された裏カバー37と、入賞手段17〜19に入賞した遊技球を排出する入賞球排出樋(不図示)とが夫々嵌合されている。この裏カバー37に装着されたケース38の内部に主制御基板39が配設され、その前側に図柄制御基板40が配設されている(図2)。主制御基板39の下側で、裏カバー37に装着されたケース41aの内部にランプ制御基板42が設けられ、このケース41aに隣接するケース41bの内部にサウンド制御基板43が設けられている。   The opening 30a of the back mechanism plate 30 is fitted with a back cover 37 mounted on the back side of the game board 5 and a winning ball discharge basket (not shown) for discharging the winning game balls to the winning means 17-19. Are combined. A main control board 39 is disposed inside a case 38 attached to the back cover 37, and a symbol control board 40 is disposed on the front side thereof (FIG. 2). Below the main control board 39, a lamp control board 42 is provided in a case 41a attached to the back cover 37, and a sound control board 43 is provided in a case 41b adjacent to the case 41a.

これらケース41a,41bの下側で裏機構板30に装着されたケース44の内部には、電源基板45と払出し制御基板46が夫々設けられている。この電源基板45には、図3に示すように、電源スイッチ80と初期化スイッチ85とが配置されている。これら両スイッチ80,85に対応する部位はケース44が切欠かれ、両スイッチ80,85の各々を指で同時に操作可能になっている。   A power supply board 45 and a payout control board 46 are provided inside the case 44 mounted on the back mechanism plate 30 below the cases 41a and 41b. As shown in FIG. 3, a power switch 80 and an initialization switch 85 are arranged on the power board 45. Cases 44 are notched at portions corresponding to these switches 80 and 85, and each of the switches 80 and 85 can be operated simultaneously with a finger.

また、発射手段10の後側に装着されたケース47の内部には、発射制御基板48が設けられている。これら制御基板39〜40,42〜43,45〜46,48は夫々独立の基板であり、電源基板45と発射制御基板48を除く制御基板39,40,42,43,46には、ワンチップマイコンLE2080A(LE・Tech社製)を備えるコンピュータ回路が搭載されており、主制御基板39と他の制御基板40,42,43,46とは、複数本の信号線でコネクタを介して電気的に接続されている。なお、この実施例で使用するワンチップマイコンLE2080Aは、Z80(Zilog社)相当品のCPUとROMとRAMとその他のICを内蔵して構成されている。   A launch control board 48 is provided inside the case 47 attached to the rear side of the launch means 10. These control boards 39 to 40, 42 to 43, 45 to 46, and 48 are independent boards, and the control boards 39, 40, 42, 43, and 46 excluding the power supply board 45 and the launch control board 48 have one chip. A computer circuit equipped with a microcomputer LE2080A (made by LE / Tech) is mounted, and the main control board 39 and the other control boards 40, 42, 43, 46 are electrically connected via a connector with a plurality of signal lines. It is connected to the. The one-chip microcomputer LE2080A used in this embodiment is constructed by incorporating a CPU, ROM, RAM, and other ICs equivalent to Z80 (Zilog).

主制御基板39とその他の制御基板40,42,43,46とは、複数本の信号線でコネクタを介して電気的に接続され、主制御基板39から各制御基板40,42,43,46に、所定の遊技動作を実行させる種々の制御コマンドを一方向通信で送信可能になっている。制御コマンドの一方向通信を採用することで、図柄停止に関する不正を確実に防止できるとともに、主制御基板39の制御負荷を格段に軽減でき、送信制御を簡単化することができる。   The main control board 39 and the other control boards 40, 42, 43, 46 are electrically connected via a connector with a plurality of signal lines, and each control board 40, 42, 43, 46 is connected from the main control board 39. In addition, various control commands for executing a predetermined game operation can be transmitted by one-way communication. By adopting the one-way communication of the control command, it is possible to reliably prevent fraud related to the symbol stop, to remarkably reduce the control load on the main control board 39, and to simplify the transmission control.

図5は、主制御基板39のうち、Z80CPUをリセット状態にするためのリセット信号発生部の回路例を図示したものである。この回路からはユーザリセット信号URSTと、システムリセット信号RSTとが出力されるが、何れの信号も、Z80CPUのリセット端子を所定時間LレベルにすることによりプログラムカウンタPCの値を強制的に0000Hにしてプログラム処理を初期状態に戻すものである。   FIG. 5 illustrates a circuit example of a reset signal generation unit for setting the Z80 CPU in the reset state in the main control board 39. A user reset signal URST and a system reset signal RST are output from this circuit. In either case, the value of the program counter PC is forcibly set to 0000H by setting the reset terminal of the Z80 CPU to the L level for a predetermined time. The program processing is returned to the initial state.

図5に示すように、リセット信号発生部は、CPUからのタイマクリア信号を受けて動作するウォッチドッグタイマ回路51と、リップルカウンタRBC(例えばTC74HC4020AF)及びD型フリップフロップD−FF(例えばHD74HC74)からなるシステムリセット回路52とで構成されている。なお、システムリセット回路52には、不図示の電源リセット回路からのリセット信号SYSRSTと、システムクロックXTALとが供給されている。   As shown in FIG. 5, the reset signal generator includes a watchdog timer circuit 51 that operates in response to a timer clear signal from the CPU, a ripple counter RBC (for example, TC74HC4020AF), and a D-type flip-flop D-FF (for example, HD74HC74). And a system reset circuit 52 comprising: The system reset circuit 52 is supplied with a reset signal SYSRST from a power reset circuit (not shown) and a system clock XTAL.

ウォッチドックタイマ回路51は、ウォッチドッグタイマWDTとして、TA8030S(東芝)を用いている。このウォッチドッグタイマWDTでは、クロック端子WDにパルス信号が入力されない自走状態では、TC端子の電圧は、ICへの電源投入後、2Vと4Vの間で充放電動作が繰り返され、RST端子からは、Hレベル期間TWDが1.1×C1×R1(ms)、Lレベル期間TRSTが0.75×C1(ms)のリセット信号RSTが出力される。一方、クロック端子WDに正パルスが加わると、4Vに向けての充電途中でも充電電荷が放電されて、再び2Vから充電動作を始めるようになっている。 The watchdog timer circuit 51 uses TA8030S (Toshiba) as the watchdog timer WDT. In this watchdog timer WDT, in a self-running state where no pulse signal is input to the clock terminal WD, the voltage of the TC terminal is repeatedly charged and discharged between 2V and 4V after the power is supplied to the IC. The reset signal RST having an H level period TWD of 1.1 × C1 × R1 (ms) and an L level period TRST of 0.75 × C1 (ms) is output. On the other hand, when a positive pulse is applied to the clock terminal WD, the charge is discharged even during charging toward 4V, and the charging operation starts again from 2V.

そこで、このパチンコ機では、ウォッチドッグタイマWDTのクロック端子WDに、TWD未満の所定時間τ毎にタイマクリア信号をソフトウェア的に加えることによって、RST端子が常時Hレベルに維持されるようにしている。このようなウォッチドッグタイマ回路51では、パチンコ機が正常に動作している場合には、所定時間τ毎にタイマクリア信号が加わるので、CPUがリセットされることはないが、プログラムの暴走などによってCPU側からのタイマクリア信号が途絶えた状況では、一定時間後にウォッチドッグタイマWDTのリセット信号RSTが自動的に立下り、ユーザリセット信号URSTを受けたZ80CPUが強制的にリセットされることになる。 Therefore, in this pachinko machine, the RST terminal is always maintained at the H level by applying a timer clear signal to the clock terminal WD of the watchdog timer WDT at a predetermined time τ less than TWD by software. Yes. In such a watchdog timer circuit 51, when the pachinko machine is operating normally, a timer clear signal is applied every predetermined time τ, so that the CPU is not reset, but due to a program runaway or the like In a situation where the timer clear signal from the CPU is interrupted, the reset signal RST of the watchdog timer WDT automatically falls after a certain time, and the Z80 CPU that has received the user reset signal URST is forcibly reset.

図6は、図5に示すシステムリセット回路52の動作内容を説明するタイムチャートである。電源が投入されると、不図示の電源リセット回路からの信号SYSRSTが図6(a)に示すように立ち上がる(t1)。すると、これに対応して、リップルカウンタRBCのクリア端子CLRがHレベルとなり、Q5やQ6を含むRBCの全出力はLレベルとなる。なお、信号SYSRSTの立ち上がり(t1)に対応して、D型フリップフロップD−FFのクリア端子CLRが立ち下がるのでD−FFのQ出力はLレベルとなる。   FIG. 6 is a time chart for explaining the operation content of the system reset circuit 52 shown in FIG. When the power is turned on, a signal SYSRST from a power reset circuit (not shown) rises as shown in FIG. 6A (t1). Then, correspondingly, the clear terminal CLR of the ripple counter RBC becomes H level, and all the outputs of the RBC including Q5 and Q6 become L level. In response to the rising edge (t1) of the signal SYSRST, the clear terminal CLR of the D-type flip-flop D-FF falls, so that the Q output of the D-FF becomes L level.

その後、電源リセット回路からの信号SYSRSTが図6(a)に示すように立ち下がる(t2)。すると、リップルカウンタRBCのクリア端子CLRもLレベルとなるので、RBCはシステムクロックXTALのカウント動作を開始する。また、信号SYSRSTの立ち下がりに対応して(t2)、D−FFのCLR端子はHレベルになるので、その後、D型フリップフロップD−FFのクロック端子CKに信号が供給されると、HレベルのD入力がQ出力端子に現れることになる。   Thereafter, the signal SYSRST from the power reset circuit falls as shown in FIG. 6A (t2). Then, since the clear terminal CLR of the ripple counter RBC is also at the L level, the RBC starts counting the system clock XTAL. In response to the fall of the signal SYSRST (t2), the CLR terminal of the D-FF goes to the H level. Thereafter, when a signal is supplied to the clock terminal CK of the D flip-flop D-FF, The level D input will appear at the Q output terminal.

一定時間後、リップルカウンタRBCのカウント動作の結果、RBCのQ5出力がHレベルとなる(t3)。すると、これに対応してシステムリセット信号RSTは、図6(g)に示すようにHレベルとなる。なお、リップル・キャリー・バイナリ・カウンタRBCのカウント段数で決まるt2からt3までの間、システムリセット信号RSTがLレベルであることによってZ80CPUを正しくリセット状態にすることができる。   After a certain time, as a result of the count operation of the ripple counter RBC, the Q5 output of the RBC becomes H level (t3). Then, in response to this, the system reset signal RST becomes H level as shown in FIG. Note that the system reset signal RST is at the L level during the period from t2 to t3 determined by the number of count stages of the ripple carry binary counter RBC, so that the Z80 CPU can be correctly reset.

その後の動作も説明すると、リップルカウンタRBCのQ5出力はやがてLレベルとなり、これに合わせてRBCのQ6出力はHレベルとなる(t4)。すると、リップルカウンタRBCのQ6出力の立ち上がりに対応して、D−FFのQ出力はHレベルとなる。そして、リップルカウンタRBCのクリア端子CLRがHレベルになることにより、これ以降のリップルカウンタRBCの全出力はLレベルに維持されることになる。   The subsequent operation will also be explained. The Q5 output of the ripple counter RBC eventually becomes L level, and the Q6 output of the RBC becomes H level in accordance with this (t4). Then, the Q output of the D-FF becomes H level corresponding to the rise of the Q6 output of the ripple counter RBC. When the clear terminal CLR of the ripple counter RBC becomes H level, all the outputs of the ripple counter RBC thereafter are maintained at L level.

図7は、主制御基板39で実行される遊技制御プログラムのメインルーチンを示すフローチャートである。電源がON状態になると、図5に示すシステムリセット回路52の動作によってワンチップマイコンLE2080AのCPUコア(Z80相当品)にリセット信号が加わり、図7に示す処理が開始される。   FIG. 7 is a flowchart showing a main routine of the game control program executed on the main control board 39. When the power is turned on, a reset signal is applied to the CPU core (Z80 equivalent product) of the one-chip microcomputer LE2080A by the operation of the system reset circuit 52 shown in FIG. 5, and the processing shown in FIG. 7 is started.

メインルーチンでは、最初に、Z80CPUは、自らを割込み禁止状態(DI)に設定し、Z80CPUコアを含むワンチップマイコンの各部を初期設定する(ST1)。なお、電源がON状態になる場合には2つのパターンがあり、停電状態からの復旧時のように、初期化スイッチ85がOFF状態で電源がON状態になる場合と、パチンコホールの開店時のように、初期化スイッチ85がON状態で電源がON状態になる場合があるが、いずれの場合もステップST1の処理が実行される。   In the main routine, first, the Z80 CPU sets itself to an interrupt disabled state (DI), and initializes each part of the one-chip microcomputer including the Z80 CPU core (ST1). There are two patterns when the power is turned on, such as when the initialization switch 85 is turned off and the power is turned on, such as when recovering from a power failure, and when the pachinko hall is opened. As described above, there are cases where the initialization switch 85 is in the ON state and the power supply is in the ON state. In either case, the process of step ST1 is executed.

ステップST1の処理が終わると、次に、CPUは、ウォッチドッグタイマWDTにタイマクリア信号を出力する(ST2)。そのため、ウォッチドッグタイマWDTの充放電用のコンデンサC1は、このタイミングで必ず放電状態となり、その後、予期しない早期のタイミングにおいてウォッチドッグタイマWDTからCPUリセット信号URSTが出力される恐れはない。   When the process of step ST1 is completed, the CPU next outputs a timer clear signal to the watchdog timer WDT (ST2). Therefore, the charging / discharging capacitor C1 of the watchdog timer WDT is always discharged at this timing, and there is no possibility that the CPU reset signal URST is output from the watchdog timer WDT at an unexpectedly early timing.

次に、CPUは割込みモード2に設定される(ST2)。なお、割込みモード2とは、Z80の3つの割込みモード(モード0、1、2)の中で、最も強力な割込みモードであり、CPU内部のIレジスタに記憶された1バイトデータと、割込み時にCPUがデータバスから取得する割込みベクタ(1バイト)とを組合せて、最大128個の割込み処理ルーチンにハードウェア的に分岐できる割込みモードを意味する。   Next, the CPU is set to interrupt mode 2 (ST2). Interrupt mode 2 is the most powerful interrupt mode among the three interrupt modes of Z80 (modes 0, 1, and 2). One-byte data stored in the I register in the CPU and This means an interrupt mode in which the CPU can branch to a maximum of 128 interrupt processing routines in combination with an interrupt vector (1 byte) acquired from the data bus by the CPU.

この割込みモード2の設定の後、CPUは、RAMクリア信号の値を判定する(ST3)。RAMクリア信号は、RAM領域を初期値設定するか否かを示す信号であって、初期化スイッチ85のON/OFF状態に対応した値を有している。今、パチンコホールの開店時であって、初期化スイッチ85がON状態で電源投入されたと仮定すると、ステップST3の判定がYesとなり、RAMのワークエリアが初期化され、その他のRAM領域がゼロクリアされる(ST5)。そして、CPUは割込み許可状態(EI)に設定され(ST5)、その後は無限ループ状に乱数発生処理が行われる(ST6)。なお、ステップST6の処理は、後述する大当り判定処理などの判定によって外れ状態となった場合に、どのような態様の外れゲームを演出するかを決定するための処理である。   After setting the interrupt mode 2, the CPU determines the value of the RAM clear signal (ST3). The RAM clear signal is a signal indicating whether or not the RAM area is set to an initial value, and has a value corresponding to the ON / OFF state of the initialization switch 85. Assuming that the pachinko hall is opened and the initialization switch 85 is turned on and the power is turned on, the determination in step ST3 is Yes, the RAM work area is initialized, and the other RAM areas are cleared to zero. (ST5). Then, the CPU is set to an interrupt permission state (EI) (ST5), and thereafter, random number generation processing is performed in an infinite loop (ST6). Note that the process of step ST6 is a process for determining what kind of out-of-game is to be produced when a disengaged state is obtained by a determination such as a jackpot determination process described later.

一方、停電状態からの復旧時のように、初期化スイッチ85がOFF状態であった場合には、ステップST3の判定に続いて、バックアップフラグBFLの内容が判定される(ST4)。バックアップフラグBFLとは、NMI処理において退避されていた中断動作時のバックアップデータが、元の状態に復帰されているか否かを示すデータであり、この実施例では、ステップST25の処理でバックアップフラグBFLが5AHとされ、ステップST12の処理においてゼロクリアされるようになっている。   On the other hand, when the initialization switch 85 is in the OFF state as in the recovery from the power failure state, the content of the backup flag BFL is determined following the determination in step ST3 (ST4). The backup flag BFL is data indicating whether or not the backup data at the time of the interruption operation saved in the NMI process is restored to the original state. In this embodiment, the backup flag BFL is processed in the process of step ST25. Is set to 5AH, and is cleared to zero in the process of step ST12.

今、停電状態からの復旧時を想定すると、バックアップフラグBFLの内容は5AHである。そのため、CPUの処理は、ステップST4からステップST7に移行し、RAMのSP記憶エリアから読み出された16ビットデータがCPUのスタックポインタSPに書き込まれる(ST7)。   Assuming a recovery from a power failure state, the content of the backup flag BFL is 5AH. Therefore, the processing of the CPU shifts from step ST4 to step ST7, and 16-bit data read from the SP storage area of the RAM is written into the stack pointer SP of the CPU (ST7).

次に、停電時のNMI処理において退避されていた各データを読み出して、バックアップされたコマンドを復帰させる処理を行う(ST8)。ここでコマンドとは、主制御基板から各制御基板に伝送されるコマンドであって、画像や音声によってゲームを盛り上げたり、或いは、賞球を払出すためのものであるが、CPUは、退避データを読み出すことによって必要なコマンドを作成する。次に、CPUは、POP命令を実行して、スタックエリアからAFレジスタを除く各レジスタ(BC,DE,HL)の値を復帰させる(ST9)。そして、この処理が終われば、SP記憶エリアのデータをゼロクリアする(ST11)。なお、このステップST11の処理は、技術的には必ずしも必須ではないが、公的機関からの指導に基づくものであり必ず実行される処理である。   Next, each data saved in the NMI process at the time of a power failure is read, and a process for restoring the backed up command is performed (ST8). Here, the command is a command transmitted from the main control board to each control board, and is used for exciting the game or paying out a prize ball by an image or sound. Create necessary commands by reading. Next, the CPU executes a POP instruction to restore the value of each register (BC, DE, HL) excluding the AF register from the stack area (ST9). When this process ends, the data in the SP storage area is cleared to zero (ST11). Note that the process of step ST11 is not necessarily essential technically, but is based on instruction from a public institution and is always executed.

以上の処理の結果、停電時からの復帰処理は一応完了するので、そのことを示すべくバックアップフラグBFLをゼロクリアする(ST12)。このように、本実施例では、SP記憶エリアのデータをゼロクリアする処理(ST11)と、バックアップフラグBFLをゼロクリアする処理(ST12)とを連続して実行しているので、SP記憶エリアのデータがゼロクリアされたが、バックアップフラグBFLがゼロクリアされていない状態で、ユーザリセット信号URSTがCPUに加わる可能性が極限的に小さくなり、異常事態発生の可能性が殆どない。   As a result of the above processing, the return processing from the power failure is completed for the time being, so the backup flag BFL is cleared to zero to indicate that (ST12). As described above, in this embodiment, the process of clearing the SP storage area data to zero (ST11) and the process of clearing the backup flag BFL to zero (ST12) are continuously executed. Although it has been cleared to zero, the possibility that the user reset signal URST is applied to the CPU in a state where the backup flag BFL has not been cleared to zero becomes extremely small, and there is almost no possibility of occurrence of an abnormal situation.

すなわち、SP記憶エリアのデータがゼロクリアされたが、バックアップフラグBFLがゼロクリアされていない状態において、何れかの回路の予期せぬ誤動作によってCPUがリセットされると、リセット後の動作において、ステップST4の次にステップST7の処理が行われるため、スタックポインタSPには0000Hに設定されることになる。   That is, if the CPU is reset due to an unexpected malfunction of any circuit in the state where the data in the SP storage area is cleared to zero but the backup flag BFL is not cleared to zero, in the operation after reset, in step ST4 Next, since the process of step ST7 is performed, the stack pointer SP is set to 0000H.

すると、その後の復帰処理(POP命令)においてはデタラメなデータが復帰されることになって、中断前とは全く無関係の遊技動作が再開されるか、或いはプログラムが暴走するかの事態が生じてしまう。しかし、本実施例では、SP記憶エリアのデータをゼロクリアする処理(ST11)と、バックアップフラグBFLをゼロクリアする処理(ST12)とを連続して実行するので、そのような可能性が事実上ゼロとなる。なお、ステップST2のタイミングでウォッチドッグタイマWDTをクリアしていることも、上記した異常事態発生の防止に大きく寄与している。   Then, in the subsequent return processing (POP instruction), frank data will be restored, and a game operation completely unrelated to that before the interruption is resumed, or the program runs out of control. End up. However, in the present embodiment, the process of clearing data in the SP storage area to zero (ST11) and the process of clearing the backup flag BFL to zero (ST12) are executed continuously, so that such a possibility is virtually zero. Become. Note that the clearing of the watchdog timer WDT at the timing of step ST2 also greatly contributes to the prevention of the above-described abnormal situation.

このように、本実施例では、ステップST11とST12を連続して実行する点に特徴があるが、AFレジスタの復帰が完了していないのに、SP記憶エリアのデータをゼロクリアし、且つバックアップフラグBFLをゼロクリアするのは、ST11やST12の処理ではAレジスタを使用するしかないので、これらST11やST12の処理を後回しにすると折角復帰させたAレジスタのデータが壊れてしまうからである。   As described above, this embodiment is characterized in that steps ST11 and ST12 are continuously executed. However, the data in the SP storage area is cleared to zero and the backup flag is returned even though the restoration of the AF register is not completed. BFL is cleared to zero because the processing of ST11 and ST12 can only use the A register, and if the processing of ST11 or ST12 is postponed, the data of the A register that has been restored is broken.

そのため、この実施例では、バックアップフラグBFLをゼロクリアした後にIレジスタやAFレジスタの復帰処理を行っている。具体的には、先ず、POPAFの命令を実行してIレジスタの内容をFレジスタに復帰させている(ST13)。NMIの割込み処理プログラムでは、Iレジスタの値をAレジスタにロードした後、Aレジスタの値をPUSHしているので(図8(c)参照)、このPOP命令によってFレジスタのP/Vフラグには、CPU内部の割込み許可フリップフロップIFFの値が格納されることになる。   Therefore, in this embodiment, the restoration processing of the I register and AF register is performed after the backup flag BFL is cleared to zero. Specifically, first, a POPAF instruction is executed to restore the contents of the I register to the F register (ST13). In the NMI interrupt processing program, the value of the A register is pushed after the value of the I register is loaded into the A register (see FIG. 8C), so that the POP instruction causes the P / V flag of the F register to be set. Stores the value of the interrupt permission flip-flop IFF in the CPU.

ここで、P/Vフラグが1の場合にはNMI処理時のCPUが割込み許可状態であったことになり、逆に、P/Vフラグが0の場合にはNMI処理時のCPUが割込み禁止状態であったことになる。そこで、P/Vフラグが0なら再度POP命令を実行してAFレジスタの値を復帰し、割込み禁止状態のままRET命令を実行する(ST15、ST16)。一方、P/Vフラグが1なら再度POP命令を実行してAFレジスタの値を復帰すると共に、割込み許可状態に変更してRET命令を実行する(ST17〜ST19)。何れにしても、RET命令が実行されることによって、スタック領域にPUSH処理されていた中断時のPC(プログラムカウンタ)の値が復元され、停電等により中断されていた処理が再開されることになる。   Here, when the P / V flag is 1, the CPU at the time of NMI processing is in an interrupt enabled state. Conversely, when the P / V flag is 0, the CPU at the time of NMI processing is prohibited from interrupting. It was in a state. Therefore, if the P / V flag is 0, the POP instruction is executed again to restore the value of the AF register, and the RET instruction is executed with the interrupt disabled state (ST15, ST16). On the other hand, if the P / V flag is 1, the POP instruction is executed again to restore the value of the AF register, and the RET instruction is executed after changing to the interrupt enabled state (ST17 to ST19). In any case, when the RET instruction is executed, the value of the PC (program counter) at the time of the PUSH processing being restored in the stack area is restored, and the processing suspended due to a power failure or the like is resumed. Become.

ところで、ステップST12の処理を終えた後に、ウォッチドックタイマWDTからCPUリセット信号URSTは発せられるようなことがあると、再リセットされた後のCPUの処理は、ステップST4からステップST5に移行するので、もはや中断した遊技動作を再開できなくなる。しかし、このパチンコ機では、CPUがリセットされた後、直ぐにウォッチドックタイマWDTをクリアしているので(ST2)、無意味にCPUがリセットされる恐れは極めて低い。   By the way, if the CPU reset signal URST is issued from the watchdog timer WDT after the process of step ST12 is completed, the process of the CPU after the reset is shifted from step ST4 to step ST5. The game operation that was interrupted can no longer be resumed. However, in this pachinko machine, since the watchdog timer WDT is cleared immediately after the CPU is reset (ST2), there is very little possibility that the CPU is reset unnecessarily.

なお、CPUがリセットされる恐れを更に解消する趣旨からは、図7の破線で示すように、停電時からの復帰処理完了を示す処理(ST11,12)に先だって、ステップST10のタイミングでウォッチドッグタイマWDTにタイマクリア信号を出力しても良い。この場合には、ステップST2のタイミングに代えて(或いはステップST2のタイミングに加えて)同様の処理を行うので、仮に、RET命令実行後も割込み禁止状態が長引いたとしても、ウォッチドッグタイマWDTからCPUにリセット信号URSTが加わることはない。また、自走状態におけるウォッチドッグタイマWDTのリセット出力のHレベル期間TWDを短く設定して(具体的には時定数C1×R1を小さくする)、プログラム暴走時の対応を迅速化しても、そのことに伴うトラブルが生じない。 In order to further eliminate the possibility that the CPU will be reset, as shown by the broken line in FIG. 7, the watchdog at the timing of step ST10 prior to the process (ST11, 12) indicating the completion of the recovery process from the power failure. A timer clear signal may be output to the timer WDT. In this case, since the same processing is performed instead of (or in addition to) the timing of step ST2, even if the interrupt disabled state is prolonged even after execution of the RET instruction, the watchdog timer WDT The reset signal URST is not applied to the CPU. Also, (to reduce the constant C1 × R1 when specifically) watchdog timer to set a short H-level period T WD reset output the WDT in the free-running state, even if faster response when program runaway, Troubles associated with it do not occur.

図8は、停電などによって電源電圧が降下した際に生じるNMIの割込み処理プログラムの内容を示すフローチャートである。この割込み処理では、先ず、各レジスタ(AF,I,BC,DE,HL)の内容がスタックエリアにPUSHされる(ST20)。但し、Iレジスタの値を直接スタックエリアにPUSHすることはできないので、LD A,Iの命令を実行した後、PUSH AFの命令を実行することで代行している。   FIG. 8 is a flowchart showing the contents of an NMI interrupt processing program that occurs when the power supply voltage drops due to a power failure or the like. In this interrupt processing, first, the contents of each register (AF, I, BC, DE, HL) are pushed to the stack area (ST20). However, since the value of the I register cannot be pushed directly to the stack area, it is substituted by executing the instruction of PUSH AF after executing the instruction of LDA, I.

次に、図8(b)に示すバックアップフラグBFLの記憶エリアの内容をチェックし、また、SP記憶エリアの内容をチェックする(ST21)。図7のステップST11、ST12に関して説明したように、NMI割込みから正常に復帰した場合には、バックアップフラグBFLやSP記憶エリアの内容はゼロの筈である。したがって、ステップST21の判定において、双方ともゼロであるとの条件が成立しない場合とは、NMI割込みの復帰処理中(ST1〜ST10)の間に、改めてNMI割込みが生じたことを意味する。   Next, the contents of the storage area of the backup flag BFL shown in FIG. 8B are checked, and the contents of the SP storage area are checked (ST21). As described with reference to steps ST11 and ST12 in FIG. 7, when the NMI interrupt returns normally, the contents of the backup flag BFL and the SP storage area should be zero. Therefore, in the determination of step ST21, the case where the condition that both are zero is not satisfied means that an NMI interrupt has occurred again during the NMI interrupt recovery process (ST1 to ST10).

このような場合には、ステップST22以降の処理に移行しても、ステップST22において、NMI割込み時のスタックポインタSPの値が破壊されるので停電前の状態を復元することができなくなる。そこで、この実施例では、NMI割込みの復帰処理中(ST1〜ST10)の間に、再度、電源電圧が降下して改めてNMI割込みが生じたような場合には、0000H番地に処理を移行させるようにしている。このように対応することによって、メインルーチンの処理は、ステップST1からステップST4に進み、更に、ステップST7に進むことによって中断前の処理を復元することが可能となる。   In such a case, even if the process proceeds to the processing after step ST22, the value before the power failure cannot be restored because the value of the stack pointer SP at the time of the NMI interruption is destroyed in step ST22. Therefore, in this embodiment, when the power supply voltage drops again and an NMI interrupt occurs again during the NMI interrupt recovery process (ST1 to ST10), the process is shifted to address 0000H. I have to. By responding in this way, the process of the main routine proceeds from step ST1 to step ST4, and further proceeds to step ST7, whereby the process before the interruption can be restored.

ところで、バックアップフラグBFLやSP記憶エリアの内容が共にゼロである通常の場合には、ステップST21からステップST22に処理が移り、ステップST20におけるPUSH命令実行後のスタックポインタSPの値が、RAMのSP記憶エリアに保存される(ST22)。図8(b)(c)は、各レジスタ(AF,I,BC,DE,HL)やスタックポインタSP、プログラムカウンタPCの退避状態を図示している。   By the way, when the contents of the backup flag BFL and the SP storage area are both zero, the process moves from step ST21 to step ST22, and the value of the stack pointer SP after execution of the PUSH instruction in step ST20 is the SP of the RAM. It is stored in the storage area (ST22). FIGS. 8B and 8C illustrate the saving state of each register (AF, I, BC, DE, HL), stack pointer SP, and program counter PC.

続いて、現在、賞球を払出し中の場合もあるので、賞球計数スイッチの状態を検出して記憶する(ST23)。なお、所定時間待機するのは(ST24)、払出し中の賞球が移動する時間を考慮したものである。その他、図示していないが、必要なデータをバックアップした後、バックアップフラグBFLのRAMエリアにフラグ値5AHを記憶し(ST25)、以降、RAMのアクセスを禁止して電源電圧が降下してCPUが非動作状態になるのを待つ(ST26)。その後、CPUは非動作状態となるが、RAMにはバックアップ電源が供給されているので、バックアップされたデータがそのまま保存され続ける。すなわち、電源が完全に遮断された後もRAMエリアは、図8(b)(c)の状態のまま維持される。   Subsequently, since there is a case where a prize ball is currently being paid out, the state of the prize ball counting switch is detected and stored (ST23). Note that waiting for a predetermined time (ST24) takes into account the time for which the prize ball being paid out moves. Although not shown, after the necessary data is backed up, the flag value 5AH is stored in the RAM area of the backup flag BFL (ST25). Thereafter, the access to the RAM is prohibited and the power supply voltage drops and the CPU Waiting for a non-operation state (ST26). After that, the CPU becomes non-operating, but since the backup power is supplied to the RAM, the backed up data continues to be stored as it is. That is, even after the power supply is completely shut down, the RAM area is maintained as shown in FIGS.

図9は、メインルーチン(図7)の無限ループ処理(ST6)の間に2msec毎に生じるタイマ割込みINT(Maskable Interrupt禁止可能割込み)の割込み処理プログラムの内容を示すフローチャートである。タイマ割込みが生じると、各レジスタの内容はスタック領域に退避され、乱数作成処理、スイッチ入力管理処理、エラー管理処理などが行われる(ST30)。スイッチ入力管理処理は、ゲートや電動チューリップなどを遊技球が通過したか否かの判定であり、エラー管理処理は、機器内部に異常が生じていないかの判定である。また、乱数作成処理とは、ハードウェア的に更新されている当り用乱数値や大当たり乱数値の取得処理を意味する。   FIG. 9 is a flowchart showing the contents of an interrupt processing program of a timer interrupt INT (Maskable Interrupt disableable interrupt) that occurs every 2 msec during the infinite loop processing (ST6) of the main routine (FIG. 7). When a timer interrupt occurs, the contents of each register are saved in the stack area, and random number generation processing, switch input management processing, error management processing, and the like are performed (ST30). The switch input management process is a determination as to whether or not a game ball has passed through a gate or an electric tulip, and the error management process is a determination as to whether an abnormality has occurred inside the device. The random number generation process means a process for acquiring a hit random number value or a jackpot random value that is updated in hardware.

その後、処理分けカウンタの値が判定されて、ST32〜ST36のうちの該当する処理が行われる。上記したエラー管理やスイッチ管理は、短い時間間隔で繰り返し行うべきであるが、一方、パチンコゲームの演出に係わる処理は遊技者のニーズに応じて複雑高度化するため、ある程度以上の処理時間を要することになる。そこで、この実施例では、全ての遊技制御動作を1回の割込み処理で完了させのではなく、5種類の処理に区分し、区分された各処理を割込み毎に分担して実行するようにしている。そのため、0〜4の範囲で循環動作する処理分けカウンタを設けて、処理分けカウンタの値に応じた処理を行うようにしている。   Thereafter, the value of the process division counter is determined, and the corresponding process from ST32 to ST36 is performed. The above error management and switch management should be repeated at short time intervals. On the other hand, the processing related to the pachinko game production is complicated and sophisticated according to the player's needs, and therefore requires a certain amount of processing time. It will be. Therefore, in this embodiment, not all the game control operations are completed by one interrupt process, but are divided into five types of processes, and each divided process is divided and executed for each interrupt. Yes. Therefore, a processing division counter that circulates in the range of 0 to 4 is provided to perform processing according to the value of the processing division counter.

具体的に説明すると、処理分けカウンタが0の場合には大入賞口の開放などに関する処理を行い(ST32)、処理分けカウンタが1の場合には当り状態(電動チューリップの開放)か否かに関する普通図柄処理を行い(ST32)、処理分けカウンタが2の場合には大当り状態か否かに関する処理を行っている(ST32)。また、処理分けカウンタが3の場合には、電動チューリップや大入賞口の開閉タイミングに関係するタイマ管理処理や、主制御基板から各制御基板に伝送されるコマンド作成処理が行われる(ST35)。処理分けカウンタが4の場合には、情報出力やエラー表示コマンドの作成処理が行われる(ST36)。そして、その後、ウォッチドッグタイマWDTにタイマクリア信号を出力するようにしている(ST37)。   More specifically, when the processing division counter is 0, processing relating to the opening of the big prize opening is performed (ST32), and when the processing division counter is 1, whether the winning state (electric tulip is open) or not. Normal symbol processing is performed (ST32), and when the processing division counter is 2, processing relating to whether or not a big hit state is performed (ST32). If the processing division counter is 3, timer management processing related to the opening / closing timing of the electric tulip and the big prize opening and command creation processing transmitted from the main control board to each control board are performed (ST35). If the process division counter is 4, information output and error display command creation processing is performed (ST36). Thereafter, a timer clear signal is output to the watchdog timer WDT (ST37).

ステップST37の処理は、5回目の割込み処理において実行されるので、ステップST37におけるタイマクリア信号の発生周期は、通常は2msec×5である。しかし、NMIの割込みが生じた後、電源が復旧したような場合には、更にメインルーチン(図7)の処理が加わるので、2msec×5より長い時間タイマクリア信号が発生しなことになる。しかし、本実施例の場合にはステップST1〜ST19の処理の間に少なくとも1回、ウォッチドッグタイマWDTにタイマクリア信号が出力されるので、停電などからの復旧後、意味もなくCPUがリセットされて中断した処理に戻れないという弊害はない。   Since the process of step ST37 is executed in the fifth interrupt process, the timer clear signal generation cycle in step ST37 is normally 2 msec × 5. However, when the power supply is restored after an NMI interrupt occurs, the processing of the main routine (FIG. 7) is further added, so that a timer clear signal longer than 2 msec × 5 is not generated. However, in this embodiment, since the timer clear signal is output to the watchdog timer WDT at least once during the processing of steps ST1 to ST19, the CPU is reset without meaning after recovery from a power failure or the like. There is no negative effect that the process cannot be resumed.

ステップST32〜ST36の何れかの処理が終わると、処理分けカウンタの値が更新された後(ST39)、生成されているコマンドが各制御基板に伝送される(ST40)。また、各レジスタの値が復帰されると共に割込み許可状態に変更されて、割込み処理ルーチンからメインルーチンに戻る(ST40)。なお、図9の破線で示すように、各割込み毎にウォッチドッグタイマWDTにタイマクリア信号を出力しても良く(ST38)、この場合には、充放電コンデンサC1の充電完了までの時間をより短く設定して、プログラムの暴走をより迅速に検知してCPUをリセット状態にすることが可能となる。   When any one of steps ST32 to ST36 is completed, the value of the process division counter is updated (ST39), and the generated command is transmitted to each control board (ST40). Further, the value of each register is restored and changed to the interrupt enabled state, and the routine returns from the interrupt processing routine to the main routine (ST40). As indicated by the broken line in FIG. 9, a timer clear signal may be output to the watchdog timer WDT for each interrupt (ST38). In this case, the time until the charge / discharge capacitor C1 is completely charged is further increased. By setting it short, it becomes possible to detect a program runaway more quickly and to reset the CPU.

以上、本発明の一実施例について説明したが、具体的な技術内容は、特に、本発明を限定するものではない。例えば、図7に記載したステップST11とステップST12の処理順序を逆転されるのも好適である。すなわち、このような実施態様では、如何なる場合にも、SP記憶エリアがゼロクリアされているにも係わらず、バックアップフラグがゼロクリアされていない状態でCPUがリセットされることはない。最悪でも、バックアップフラグがゼロクリアされているにも係わらず、SP記憶エリアがゼロクリアされていない状態でCPUがリセットされる程度である。そして、この最悪の事態でも、バックアップフラグがゼロクリアされているので、ステップST4の処理の後、ステップST5の処理に移行してリセット処理が正しく行われる。   Although one embodiment of the present invention has been described above, the specific technical contents do not particularly limit the present invention. For example, it is also preferable to reverse the processing order of step ST11 and step ST12 described in FIG. That is, in such an embodiment, in any case, the CPU is not reset in a state where the backup flag is not cleared to zero even though the SP storage area is cleared to zero. At worst, the CPU is reset in a state where the SP storage area is not cleared to zero even though the backup flag is cleared to zero. Even in this worst case, since the backup flag is cleared to zero, after the process of step ST4, the process proceeds to the process of step ST5 and the reset process is correctly performed.

実施例に係るパチンコ機の斜視図である。It is a perspective view of the pachinko machine concerning an example. 図1のパチンコ機の側面図である。It is a side view of the pachinko machine of FIG. 図1のパチンコ機の正面図である。It is a front view of the pachinko machine of FIG. 図1のパチンコ機の背面図である。It is a rear view of the pachinko machine of FIG. ウォッチドッグタイマ回路とシステムリセット回路の回路例である。It is a circuit example of a watchdog timer circuit and a system reset circuit. システムリセット回路の回路動作を説明するタイムチャートである。It is a time chart explaining circuit operation of a system reset circuit. 実施例に係る遊技制御プログラムのメインルーチンのフローチャートである。It is a flowchart of the main routine of the game control program which concerns on an Example. 停電時などに実施されるNMI割込み処理プログラムのフローチャートである。It is a flowchart of the NMI interruption processing program implemented at the time of a power failure. タイマ割込みにおけるINT割込み処理プログラムのフローチャートである。It is a flowchart of the INT interruption processing program in the timer interruption.

符号の説明Explanation of symbols

WDT リセット手段(ウォッチドッグタイマ)
2 遊技機(パチンコ機)
ST6 無限ループ処理
ST1〜ST19 第1処理
ST30〜ST41 第2処理
ST20〜ST26 第3処理
ST11 SP記憶エリアのクリア処理
ST12 バックアップフラグのリセット処理
ST22 SPの値をSP記憶エリアに保存する処理
ST25 バックアップフラグをセットする処理
WDT reset means (watchdog timer)
2 Pachislot machines (pachinko machines)
ST6 Infinite loop processing ST1 to ST19 First processing ST30 to ST41 Second processing ST20 to ST26 Third processing ST11 SP storage area clear processing ST12 Backup flag reset processing ST22 Processing to save SP value in SP storage area ST25 Backup flag Process to set

Claims (2)

制御プログラムに基づいて遊技動作を制御するCPUを有し、遊技者に有利な第1状態と遊技者に不利な第2状態とを択一的に選択可能な遊技機であって、前記制御プログラムにしたがった正常な処理がされなくなった場合には、リセット手段が機能して遊技動作を強制的に初期状態に戻すよう構成され、
前記制御プログラムは、電源投入に対応して開始され、無限ループ処理を含んで構成された処理と、所定時間毎に前記第一処理を中断して開始され、繰り返し遊技動作を制御する第処理と、電源電圧が所定レベルを下回ると強制的に開始され、退避エリアへのデータ退避処理を行う処理とを含み、
前記第処理では、前記データ退避処理の後、スタックポインタの値を特定記憶エリアに保存すると共に所定フラグを第2状態に設定しており、
前記第処理では、前記所定フラグが第2状態であることを条件に、前記特定記憶エリアの保存内容に基づいて前記スタックポインタの値を設定した後、前記退避エリアに退避されているデータのデータ復帰処理を開始し、その後、前記所定フラグを第1状態に設定するリセット処理と共に、前記特定記憶エリアの保存内容を書き換えるクリア処理を実行しており、
前記リセット処理と前記クリア処理とは連続して実行され、前記データ退避処理における前記退避エリアの退避先や、前記データ復帰処理における前記退避エリアの復帰元は、前記スタックポインタによって特定される
ようになっている遊技機。
A gaming machine having a CPU for controlling a gaming operation based on a control program and capable of selectively selecting a first state advantageous to a player and a second state disadvantageous to the player, wherein the control program When normal processing is not performed according to the above, the reset means functions to forcibly return the game operation to the initial state,
The control program is started in response to power-on, and includes a first process configured to include an infinite loop process , and a first process that is started by interrupting the first process every predetermined time, and controls a game operation repeatedly. second processing and the power supply voltage is started to force the falls below a predetermined level, and a third process of performing data saving process to save area,
In the third process, after the data saving process, the value of the stack pointer is saved in the specific storage area and the predetermined flag is set to the second state,
In the first process, on the condition that the predetermined flag is in the second state, the value of the stack pointer is set based on the saved contents of the specific storage area, and then the data saved in the save area is stored. A data restoration process is started, and then a clear process for rewriting the saved contents of the specific storage area is performed together with a reset process for setting the predetermined flag to the first state,
The reset process and the clear process are executed successively, and the save destination of the save area in the data save process and the return source of the save area in the data return process are specified by the stack pointer.
A gaming machine that has become .
制御プログラムに基づいて遊技動作を制御するZ80CPUを有し、遊技者に有利な第1状態と遊技者に不利な第2状態とを択一的に選択可能な遊技機であって、前記制御プログラムにしたがった正常な処理がされなくなった場合には、リセット手段が機能して遊技動作を強制的に初期状態に戻すよう構成され、
前記制御プログラムは、電源投入に対応して開始され、無限ループ処理を含んで構成された処理と、所定時間毎に前記第一処理を中断して開始され、繰り返し遊技動作を制御する第処理と、電源電圧が所定レベルを下回ると強制的に開始され、退避エリアへのデータ退避処理を行う処理とを含み、
前記第処理では、前記データ退避処理の後、スタックポインタの値を特定記憶エリアに保存すると共に所定フラグを第2状態に設定しており、
前記第処理では、前記所定フラグが第2状態であることを条件に、前記特定記憶エリアの保存内容に基づいて前記スタックポインタの値を設定した後、前記退避エリアに退避されているデータのデータ復帰処理を開始し、その後、前記フラグを第1状態に設定するリセット処理を実行しており、
前記データ退避処理における前記退避エリアの退避先や、前記データ復帰処理における前記退避エリアの復帰元は、前記スタックポインタによって特定され、
前記データ退避処理では、Z80CPUのAFレジスタの値を退避する第一処理と、Z80CPUのIレジスタの値を、前記AFレジスタのAレジスタに転送した後、そのAFレジスタの値を退避させる第二処理とをこの順番に実行する一方、
前記データ復帰処理では、前記退避処理と逆の順番でデータを復帰させることで、Z80CPUが割込み許可状態か否かを特定すると共に、前記第一処理で退避させた前記AFレジスタの値を復帰させるようにしていることを特徴とする遊技機。
It has a Z80 CPU for controlling the gaming operation based on the control program, and a second state disadvantageous to a preferred first state and the player to the player a alternatively selectable gaming machine, the control When normal processing is not performed according to the program, the reset means functions to force the game operation to return to the initial state,
The control program is started in response to power-on, and includes a first process configured to include an infinite loop process , and a first process that is started by interrupting the first process every predetermined time, and controls a game operation repeatedly. second processing and the power supply voltage is started to force the falls below a predetermined level, and a third process of performing data saving process to save area,
In the third process, after the data saving process, the value of the stack pointer is saved in the specific storage area and the predetermined flag is set to the second state,
In the first process, on the condition that the predetermined flag is in the second state, the value of the stack pointer is set based on the saved contents of the specific storage area, and then the data saved in the save area is stored. A data recovery process is started, and then a reset process is executed to set the flag to the first state,
The save destination of the save area in the data save process and the return source of the save area in the data return process are specified by the stack pointer,
In the data saving process, a first process for saving the value of the AF register of the Z80 CPU, and a second process for saving the value of the AF register after transferring the value of the I register of the Z80 CPU to the A register of the AF register. And in this order,
In the data restoration process, the data is restored in the reverse order of the save process, thereby specifying whether or not the Z80 CPU is in an interrupt enabled state and restoring the value of the AF register saved in the first process. A gaming machine characterized by doing so .
JP2006177625A 2006-06-28 2006-06-28 Game machine Expired - Fee Related JP4372122B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2006177625A JP4372122B2 (en) 2006-06-28 2006-06-28 Game machine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2006177625A JP4372122B2 (en) 2006-06-28 2006-06-28 Game machine

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2001052827A Division JP3953281B2 (en) 2001-02-27 2001-02-27 Game machine

Publications (2)

Publication Number Publication Date
JP2006289111A JP2006289111A (en) 2006-10-26
JP4372122B2 true JP4372122B2 (en) 2009-11-25

Family

ID=37410301

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2006177625A Expired - Fee Related JP4372122B2 (en) 2006-06-28 2006-06-28 Game machine

Country Status (1)

Country Link
JP (1) JP4372122B2 (en)

Also Published As

Publication number Publication date
JP2006289111A (en) 2006-10-26

Similar Documents

Publication Publication Date Title
JP4789862B2 (en) Game machine
JP3859129B2 (en) Game machine
JP4587997B2 (en) Game machine
JP3860972B2 (en) Game machine
JP2006297129A (en) Game machine
JP4545125B2 (en) Game machine
JP3934884B2 (en) Game machine
JP3953281B2 (en) Game machine
JP3779883B2 (en) Game machine
JP4372122B2 (en) Game machine
JP4308214B2 (en) Bullet ball machine
JP4712650B2 (en) Game machine
JP3949898B2 (en) Game machine
JP4206098B2 (en) Game machine
JP4024235B2 (en) Game machine
JP4308221B2 (en) Game machine
JP3917389B2 (en) Bullet ball machine
JP3775723B2 (en) Game machine
JP3938495B2 (en) Game machine
JP3891804B2 (en) Game machine
JP4024233B2 (en) Game machine
JP4904411B2 (en) Game machine
JP4056501B2 (en) Abnormal reset judgment method for gaming machines
JP3927760B2 (en) Game machine
JP4024234B2 (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: 20090804

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090901

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

Free format text: PAYMENT UNTIL: 20120911

Year of fee payment: 3

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: 20120911

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20130911

Year of fee payment: 4

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

LAPS Cancellation because of no payment of annual fees