JP2014039769A - Game machine - Google Patents

Game machine Download PDF

Info

Publication number
JP2014039769A
JP2014039769A JP2012184679A JP2012184679A JP2014039769A JP 2014039769 A JP2014039769 A JP 2014039769A JP 2012184679 A JP2012184679 A JP 2012184679A JP 2012184679 A JP2012184679 A JP 2012184679A JP 2014039769 A JP2014039769 A JP 2014039769A
Authority
JP
Japan
Prior art keywords
data
processing
pointer
message
power interruption
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.)
Granted
Application number
JP2012184679A
Other languages
Japanese (ja)
Other versions
JP5994092B2 (en
Inventor
Tatsunori Haruyoshi
辰則 春好
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Olympia KK
Original Assignee
Olympia KK
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 Olympia KK filed Critical Olympia KK
Priority to JP2012184679A priority Critical patent/JP5994092B2/en
Publication of JP2014039769A publication Critical patent/JP2014039769A/en
Application granted granted Critical
Publication of JP5994092B2 publication Critical patent/JP5994092B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To appropriately perform power supply interruption saving processing relating to inter-task communication in a game machine adopting multiprocess processing.SOLUTION: In power interruption, a WRITE pointer, a SEND pointer, and a READ pointer of a message buffer for inter-task communication are backed up. In recovery from the power interruption, it is determined whether the WRITE pointer agrees with the READ pointer. When they do not agree, the SEND pointer is returned to a position of the READ pointer, and a message is retransmitted. Thus, a lost transmission request in a kernel because of power interruption can be restored, thus preventing inter-task commands from being lost.

Description

この発明は、スロットマシン等の遊技機に関するものである。   The present invention relates to a gaming machine such as a slot machine.

外周面に図柄が配列された複数の回胴を備えた遊技機(回胴式遊技機、スロットマシン)が知られている。この種の遊技機は、遊技媒体(メダル)に対して一定の遊技価値を付与し、このような遊技媒体を獲得するための遊技を行うものである。また、この種の遊技機は、遊技者の回転開始操作を契機として、内部抽選を行うとともに複数の回胴の回転を開始させ、遊技者の停止操作契機として、内部抽選の結果に応じた態様で複数の回胴を停止させる制御を行っている。そして、遊技の結果は、複数の回胴が停止した状態における入賞判定ライン上に表示された図柄組み合わせによって判定され、遊技の結果に応じてメダル等の払い出しなどが行われる。   2. Description of the Related Art A gaming machine (a spinning machine, slot machine) having a plurality of spinning cylinders with symbols arranged on the outer peripheral surface is known. This type of gaming machine gives a certain game value to a game medium (medal) and performs a game for acquiring such a game medium. In addition, this type of gaming machine has an internal lottery triggered by the player's rotation start operation and starts rotation of a plurality of spinning cylinders, and a mode according to the result of the internal lottery as a player's stop operation trigger. In order to stop multiple cylinders. The game result is determined by the symbol combination displayed on the winning determination line in a state where the plurality of spinning cylinders are stopped, and medals are paid out according to the game result.

特開2002−819号公報 遊技機の電断復旧処理時に、電断時において出力途中でバックアップされたデータを再送することが記載されている。JP, 2002-819, A It is indicated that the data backed up in the middle of output at the time of power failure is resent at the time of power failure recovery processing of a game machine.

メイン基板、サブ基板は予め定められたプログラムに従い遊技に係る処理、演出に係る処理を実行する処理部であるCPUを備える。CPUは電源断において、予め定められた電源断予告信号の入力を契機として電源断退避処理を実行する。この処理は、電源断でもデータが失われないメモリに保存されているデータのチェックサムを求める処理を含む。これにより保存されたデータはバックアップデータである。そして、電源が投入されたときの初期化処理において、電源断でもデータが失われないメモリに保存されているバックアップデータを読みだして通常使用するワークメモリ上に展開する(復帰処理)。上記電源断退避処理と初期化処理(復帰処理)の2つの動作により、電源オフ前の状態のバックアップとこれに基づく電源オン後の復帰が実現される。つまり、遊技機の電源を投入すると電源断時の状態に戻ることができる。   The main board and the sub board are provided with a CPU that is a processing unit that executes a process related to a game and a process related to an effect according to a predetermined program. When the power is turned off, the CPU executes a power-off saving process in response to an input of a predetermined power-off notice signal. This process includes a process for obtaining a checksum of data stored in a memory that does not lose data even when the power is turned off. The data stored in this way is backup data. Then, in the initialization process when the power is turned on, the backup data stored in the memory that does not lose the data even when the power is turned off is read and expanded on the work memory that is normally used (return process). By the two operations of the power-off saving process and the initialization process (recovery process), the backup of the state before power-off and the return after power-on based on this are realized. That is, when the gaming machine is turned on, it can return to the power-off state.

遊技機の電源スイッチがオンからオフにされても電源電圧はすぐには低下せず、しばらく時間が経ってから電源電圧がゼロになる。このため、CPUは電源断信号を受けてから電圧低下により動作を停止するまでの間に、前記電源断退避処理を行うことができる。   Even if the power switch of the gaming machine is turned from on to off, the power supply voltage does not drop immediately, and after a while, the power supply voltage becomes zero. Therefore, the CPU can perform the power-off saving process after receiving the power-off signal and before stopping the operation due to the voltage drop.

ところで、最近のCPUはマルチプロセス処理を行うようになってきており、バックアップ対象となる処理が複数存在することがある。マルチプロセス処理は、処理効率を高めるために、複数の処理を同時並行に実行できるものである。このマルチプロセス処理においては、複数の処理間の連携は一方の処理(送信タスク)から他方の処理(受信タスク)へコマンド(メッセージ)を送ることで行われている。これらを仲介する機能がカーネルである。コマンドは送信タスクによりコマンドバッファ(メッセージバッファ)に書き込まれ、受信タスクにより読み出される。カーネルは、受信タスクに対してどのコマンドを読み出すかを指示する。コマンドバッファの位置を指定する際にはポインタが使用される。   By the way, recent CPUs are performing multi-process processing, and there may be a plurality of processes to be backed up. In multi-process processing, in order to increase processing efficiency, a plurality of processes can be executed in parallel. In this multi-process process, cooperation between a plurality of processes is performed by sending a command (message) from one process (transmission task) to the other process (reception task). The function that mediates these is the kernel. The command is written to the command buffer (message buffer) by the transmission task and read by the reception task. The kernel instructs the receiving task which command to read. A pointer is used to specify the position of the command buffer.

電源断退避処理においてコマンドバッファの内容及びポインタがバックアップされるので復帰処理において電源断直前の状態に戻すことができる。しかし、カーネルが保持していた受信タスクに対する指示内容はバックアップされない。このため、電源断から復帰の過程において、カーネルが保持していたが受信タスクに対して送っていない指示に対応するコマンドはコマンドバッファから読み出されることがなく、失われてしまう。このように従来のマルチプロセス処理においてはタスク間のコマンドが失われるという問題があった。この電源断退避処理の不完全さにより、電源再投入後の動作に瑕疵が生じてしまう。   Since the contents and pointers of the command buffer are backed up in the power-off saving process, the state immediately before the power-off can be restored in the recovery process. However, the instruction contents for the reception task held by the kernel are not backed up. For this reason, in the process of returning from a power-off, the command corresponding to the instruction held by the kernel but not sent to the receiving task is not read from the command buffer and is lost. Thus, the conventional multi-process processing has a problem that commands between tasks are lost. Due to the incompleteness of the power-off saving process, the operation after the power is turned on again will be flawed.

この発明は上記課題を解決するためになされたもので、マルチプロセス処理においても電源断退避処理を適切に行うことができ、電源再投入後の動作を正常に行えることのできる遊技機を提供することを目的とする。   The present invention has been made to solve the above-described problems, and provides a gaming machine that can appropriately perform power-off saving processing even in multi-process processing and can normally perform operations after power-on. For the purpose.

この発明は、遊技に係る処理を行うメイン基板と、前記メイン基板から予め定められたコマンドを受けて遊技に係る演出処理を行うサブ基板と、前記メイン基板及び前記サブ基板へ電力を供給する電源部とを備える遊技機において、
前記遊技に係る処理及び/又は前記演出処理に関する複数の処理を同時に実行するマルチプロセス処理を行うCPUと、
前記遊技に係るデータ及び/又は前記演出に係るデータを記憶するメモリと、
電断の際に、前記メモリの少なくとも一部のデータについてバックアップを行う電断処理部と、
電源投入の際に、バックアップされた前記データに基づき予め定められた復帰処理を行う復帰処理部とを備え、
前記CPUは、前記複数の処理の相互間の通信(以下、送信側の処理を「送信タスク」、受信側の処理を「受信タスク」と記す)及び送信タスクから受信タスクへのコマンドの伝達に係る処理(以下、前記CPUの動作により実現され、この伝達に係る処理の動作主体となる手段を「カーネル」と記す)を行うとともに、前記伝達の内容としてのメッセージを保持するメッセージバッファに対する書き込みポインタ、送信ポインタ、読み出しポインタに係る制御処理を行い、
前記書き込みポインタは、前記送信タスクにおいて前記メッセージを書き込むべき前記メッセージバッファの位置を示すものであり、前記メッセージが書き込まれたときには次に書き込むべき位置まで移動し、
前記送信ポインタは、前記カーネルへ送るべき前記メッセージについての前記メッセージバッファの位置(アドレス)を示すものであり、前記カーネルへの送信が行われたときには次に送るべき前記メッセージについての前記メッセージバッファの位置(アドレス)まで移動し、
前記受信ポインタは、前記受信タスクにおいて前記メッセージを読み出すべき位置を示すものであり、前記メッセージが読み出されたときには次に読み出すべき位置まで移動し、
前記電断処理部は、前記書き込みポインタ、前記送信ポインタ及び前記読み出しポインタをバックアップし、
前記復帰処理部は、電源が投入されたとき、バックアップされた前記書き込みポインタ、前記送信ポインタ及び前記読み出しポインタを読み出し、前記書き込みポインタと前記送信ポインタが一致しないとき、前記送信ポインタを前記読み出しポインタの位置まで戻し、
前記送信タスクは、前記送信ポインタから前記書き込みポインタまでの前記メッセージについて前記カーネルへ前記メッセージバッファの位置を送り、
前記カーネルは、前記送信タスクから受けた前記メッセージバッファの位置を前記受信タスクへ送り、
前記受信タスクは前記カーネルからの前記メッセージバッファの位置に基づき前記メッセージを読み出して解析する、ものである。
The present invention includes a main board that performs processing related to a game, a sub board that receives a predetermined command from the main board and performs an effect process related to a game, and a power source that supplies power to the main board and the sub board In a gaming machine comprising a
A CPU for performing a multi-process process that simultaneously executes a plurality of processes related to the game and / or the effect process;
A memory for storing data relating to the game and / or data relating to the effect;
In the event of a power interruption, a power interruption processing unit that backs up at least part of the data in the memory;
A recovery processing unit that performs a predetermined recovery process based on the backed up data when the power is turned on,
The CPU communicates between the plurality of processes (hereinafter, a process on the transmission side is referred to as a “transmission task” and a process on the reception side is referred to as a “reception task”) and a command is transmitted from the transmission task to the reception task. A write pointer to a message buffer that performs such processing (hereinafter referred to as “kernel”, which is realized by the operation of the CPU and is the main operating unit of the processing related to transmission), and holds a message as the content of the transmission , Perform control processing related to the send pointer and read pointer,
The write pointer indicates a position of the message buffer to which the message is to be written in the transmission task, and when the message is written, moves to a position to be written next;
The send pointer indicates the position (address) of the message buffer for the message to be sent to the kernel, and when sending to the kernel, the message buffer for the message to be sent next. Move to the location (address)
The reception pointer indicates a position where the message should be read in the reception task, and when the message is read, moves to a position where the message should be read next,
The power interruption processing unit backs up the write pointer, the transmission pointer, and the read pointer,
When the power is turned on, the return processing unit reads the backup write pointer, the transmission pointer, and the read pointer, and when the write pointer does not match the transmission pointer, the return processing unit reads the transmission pointer. Back to position
The send task sends the message buffer location to the kernel for the message from the send pointer to the write pointer;
The kernel sends the position of the message buffer received from the sending task to the receiving task;
The reception task reads and analyzes the message based on the position of the message buffer from the kernel.

この発明によれば、コマンドの書き込みを示すWRITEポインタ及びコマンドの読み出しを示すREADポインタとともに、送信タスクから受信タスクへのメッセージ伝達を仲介するカーネルへの送信依頼(キューヘッダ)を示すSENDポインタを使用し、電断の際にこれら3つのポインタをバックアップし、電断復帰時においてSENDポインタをREADポインタの位置に戻すことにより、電断によりカーネルにおいて失われた送信依頼を復活させることができる。タスク間のコマンドを取りこぼすことがない。   According to the present invention, the SEND pointer indicating the transmission request (queue header) to the kernel that mediates message transmission from the transmission task to the reception task is used together with the WRITE pointer indicating the command writing and the READ pointer indicating the command reading. Then, these three pointers are backed up at the time of power interruption, and the transmission request lost in the kernel due to power interruption can be restored by returning the SEND pointer to the position of the READ pointer at the time of power interruption recovery. Never miss commands between tasks.

前扉を閉めた状態を示すスロットマシンの正面図である。It is a front view of the slot machine which shows the state which closed the front door. 前扉を180度開いた状態を示すスロットマシンの正面図である。It is a front view of the slot machine which shows the state which opened the front door 180 degree | times. スロットマシンのブロック図である。It is a block diagram of a slot machine. スロットマシンの遊技処理のフローチャートである。It is a flowchart of the gaming process of the slot machine. 図5(a)はジョグダイヤルの斜視図、図5(b)はジョグダイヤルのブロック図、図5(c)はメイン基板のコマンド送信部のブロック図である。5A is a perspective view of the jog dial, FIG. 5B is a block diagram of the jog dial, and FIG. 5C is a block diagram of the command transmission unit of the main board. サブ基板と周辺基板の通信系統の説明図である。It is explanatory drawing of the communication system of a sub board | substrate and a peripheral board | substrate. データ送信部のブロック図である。It is a block diagram of a data transmission part. 周辺基板に関する処理の説明図である。It is explanatory drawing of the process regarding a peripheral board | substrate. VDP(ビデオディスプレイプロセッサ)の機能ブロック図である。It is a functional block diagram of VDP (video display processor). VDPにおける描画データ保存、描画実行及び表示の各処理の説明図(タイミングチャート)である。It is explanatory drawing (timing chart) of each process of drawing data preservation | save in VDP, drawing execution, and a display. サウンドコントローラのブロック図である。It is a block diagram of a sound controller. 音声データの説明図である。It is explanatory drawing of audio | voice data. 可動体(一例)の概略図である。同図(a)は上面図、同図(b)は正面図、同図(c)はB−B矢視断面図、同図(d)はA−A矢視断面図である。It is the schematic of a movable body (an example). 4A is a top view, FIG. 2B is a front view, FIG. 4C is a cross-sectional view taken along the line BB, and FIG. 4D is a cross-sectional view taken along the line A-A. 可動要素(シャッター)の開状態(同図(a))と閉状態(同図(b))の説明図である。It is explanatory drawing of the open state (the figure (a)) and closed state (the figure (b)) of a movable element (shutter). 可動体制御部のブロック図である。It is a block diagram of a movable body control part. 可動体演出処理のフローチャートである。It is a flowchart of a movable body effect process. 周辺基板の制御におけるメイン処理と割込処理の関係の説明図である。It is explanatory drawing of the relationship between the main process and the interruption process in control of a periphery board | substrate. 本実施の形態に係る遊技機のブロック図(複数の周辺基板間で動作の同期をとるための構成)である。1 is a block diagram of a gaming machine according to the present embodiment (a configuration for synchronizing operations among a plurality of peripheral boards). 本実施の形態に係る遊技機の制御データの入出力とバッファ(記憶素子)における制御データの動きの説明図である(制御データがひとつ)。It is explanatory drawing of the movement of the control data in the input / output of a control data and a buffer (memory element) of the gaming machine according to the present embodiment (one control data). 本実施の形態に係る遊技機の制御データの入出力とバッファ(記憶素子)における制御データの動きの説明図である(制御データが2つ)。It is explanatory drawing of the movement of the control data in the input / output of a control data and a buffer (memory element) of the gaming machine according to the present embodiment (two control data). 本実施の形態に係る遊技機の制御データの入出力とバッファ(記憶素子)における制御データの動きの説明図である(制御データがひとつ、エラー発生)。It is explanatory drawing of the input / output of the control data of the gaming machine according to the present embodiment and the movement of the control data in the buffer (storage element) (one control data, error occurs). 遊技機の制御データの入出力とバッファ(記憶素子)における制御データの動きの参考図である(制御データが2つ、エラー発生、エラー上書き)。FIG. 4 is a reference diagram of input / output of control data of a gaming machine and movement of control data in a buffer (storage element) (two control data, error occurrence, error overwriting). 本実施の形態に係る遊技機の制御データの入出力とバッファ(記憶素子)における制御データの動きの説明図である(制御データが2つ、エラー発生)。It is explanatory drawing of the input / output of the control data of the gaming machine according to the present embodiment and the movement of the control data in the buffer (storage element) (two control data, error occurs). 本実施の形態に係る遊技機のエラー信号受信時の処理フローチャートである。It is a process flowchart at the time of the error signal reception of the gaming machine according to the present embodiment. 他の本実施の形態に係る遊技機の制御データの入出力とバッファ(記憶素子)における制御データの動きの説明図である(制御データが2つ、エラー発生)。It is explanatory drawing of the movement of the control data in the input / output of a control data and a buffer (memory element) of the gaming machine according to another embodiment (two control data, error occurs). 他の本実施の形態に係る遊技機の制御データの入出力とバッファ(記憶素子)における制御データの動きの他の説明図である(制御データが2つ、エラー発生)。It is another explanatory view of the input / output of control data and the movement of the control data in the buffer (storage element) of the gaming machine according to the other embodiment (two control data, error occurs). 他の本実施の形態に係る遊技機のエラー信号受信時の処理フローチャートである。It is a process flowchart at the time of the error signal reception of the gaming machine according to another embodiment. 他の本実施の形態に係る遊技機の制御データの入出力とバッファ(記憶素子)における制御データの動きの説明図である(制御データが3つ、エラー発生)。It is explanatory drawing of the movement of the control data in the input / output of a control data and a buffer (memory element) of the gaming machine according to another embodiment (three control data, error occurs). 他の本実施の形態に係る遊技機のエラー信号受信時の処理フローチャートである。It is a process flowchart at the time of the error signal reception of the gaming machine according to another embodiment. 本実施の形態に係るチャタリング除去処理のフローチャートである。It is a flowchart of the chattering removal process which concerns on this Embodiment. 本実施の形態に係る真理値表である。It is a truth table concerning this embodiment. 本実施の形態に係る真理値表である。It is a truth table concerning this embodiment. 本実施の形態に係る真理値表である。It is a truth table concerning this embodiment. 本実施の形態に係る真理値表である。It is a truth table concerning this embodiment. 本実施の形態に係るチャタリング除去装置のブロック図である。It is a block diagram of the chattering removal apparatus which concerns on this Embodiment. 本実施の形態に係るチャタリング除去処理を説明するためのタイミングチャートである。It is a timing chart for demonstrating the chattering removal process which concerns on this Embodiment. 本実施の形態に係るチャタリング除去処理による処理結果を示す真理値表である。It is a truth table which shows the process result by the chattering removal process which concerns on this Embodiment. 比較例に係るチャタリング除去処理のフローチャートである。It is a flowchart of the chattering removal process which concerns on a comparative example. 並列処理を適用した場合の処理の説明図である。(a)は本実施の形態に係るチャタリング除去処理に並列処理を適用した場合を示し)は比較例に並列処理を適用した場合を示す。It is explanatory drawing of a process at the time of applying parallel processing. (A) shows the case where parallel processing is applied to the chattering removal processing according to the present embodiment) shows the case where parallel processing is applied to the comparative example. ジョグダイヤルの2つのセンサの出力信号の説明図である。It is explanatory drawing of the output signal of two sensors of a jog dial. ジョグダイヤルの回転方向を逆転させるときの信号変化の説明図である。It is explanatory drawing of a signal change when rotating the rotation direction of a jog dial. 本実施の形態に係るジョグダイヤルの回転量(回転方向を含む)を求める装置のブロック図である。It is a block diagram of the apparatus which calculates | requires the rotation amount (a rotation direction is included) of the jog dial which concerns on this Embodiment. 図42の装置のバッファの記憶内容の説明図である。43 is an explanatory diagram of the contents stored in the buffer of the apparatus in FIG. 42. FIG. ジョグダイヤルの順回転・逆回転の判定の説明図(タイミングチャート)である。It is explanatory drawing (timing chart) of determination of a forward rotation / reverse rotation of a jog dial. 本実施の形態に係る回転検出処理フローチャートである。It is a rotation detection process flowchart which concerns on this Embodiment. 本実施の形態に係る回転検出処理の説明図(タイミングチャート)である。It is explanatory drawing (timing chart) of the rotation detection process which concerns on this Embodiment. ジョグダイヤルの判定処理に係る比較例(部分フローチャート)である。It is a comparative example (partial flowchart) concerning the determination process of the jog dial. 本実施の形態に係る他の回転検出処理フローチャートである。It is another rotation detection process flowchart which concerns on this Embodiment. 本実施の形態に係る他の回転検出処理フローチャートである(続き)。It is another rotation detection processing flowchart which concerns on this Embodiment (continuation). サウンドコマンドの書き込みの説明図である。It is explanatory drawing of writing of a sound command. 演出の同期を取るための遅延方式(自動遅延と指定遅延)の説明図である。It is explanatory drawing of the delay system (automatic delay and designated delay) for taking effect synchronization. 自動遅延方式の動作説明図(コマンド記憶部の説明図)である。It is operation | movement explanatory drawing (description figure of a command memory | storage part) of an automatic delay system. 自動遅延方式の動作説明図(コマンドバッファの説明図)である。It is operation | movement explanatory drawing (command buffer explanatory drawing) of an automatic delay system. 自動遅延方式の動作説明図(コマンドバッファの状態遷移図)である。It is operation | movement explanatory drawing (state transition diagram of a command buffer) of an automatic delay system. 指定遅延方式の読み出しテーブル(コマンドバッファ)の説明図である。It is explanatory drawing of the read table (command buffer) of a designated delay system. 指定遅延方式の読み出しテーブル(コマンドバッファ)の状態遷移図である。It is a state transition diagram of a read table (command buffer) of a designated delay method. 本実施の形態に係る指定遅延型の送信制御部のブロック図である。It is a block diagram of a designated delay type transmission control unit according to the present embodiment. 電源部とサブ基板の関係(電源断予告信号)の説明図である。It is explanatory drawing of the relationship (power-off notice signal) of a power supply part and a sub board | substrate. マルチプロセス方式における電断処理の説明図である。It is explanatory drawing of the power interruption process in a multi-process system. マルチプロセス方式における電断処理の説明図である(続き)。It is explanatory drawing of the power interruption process in a multi-process system (continuation). マルチプロセス方式における電断処理の説明図である(続き)。It is explanatory drawing of the power interruption process in a multi-process system (continuation). 本実施の形態に係る遊技機の電断処理の部分のブロック図である。It is a block diagram of the part of the power interruption process of the gaming machine according to the present embodiment. 本実施の形態に係る遊技機の電断処理装置のフローチャートである。It is a flowchart of the power interruption processing apparatus of the gaming machine according to the present embodiment. 本実施の形態に係る電断処理の優先度テーブルの説明図である。It is explanatory drawing of the priority table of the electrical disconnection process which concerns on this Embodiment. 本実施の形態に係る遊技機の電断処理(瞬断対策)の部分のブロック図である。It is a block diagram of the part of the electric power interruption process (instantaneous interruption countermeasure) of the gaming machine according to the present embodiment. 本実施の形態に係る電断処理(瞬断対策)装置のフローチャートである。It is a flowchart of the electric power interruption process (instantaneous interruption countermeasure) apparatus which concerns on this Embodiment. 本実施の形態に係る電断処理(瞬断対策)の説明図(タイミングチャート)である。It is explanatory drawing (timing chart) of the electric power interruption process (instantaneous interruption countermeasure) which concerns on this Embodiment. 本実施の形態に係る電断処理(瞬断対策)の他の説明図(タイミングチャート)である。It is another explanatory drawing (timing chart) of the electric power interruption process (instantaneous interruption countermeasure) which concerns on this Embodiment. 電断処理の他のブロック図(比較例)である。It is another block diagram (comparative example) of an electric disconnection process. 図69の電断処理の説明図(タイミングチャート)である。FIG. 70 is an explanatory diagram (timing chart) of the power interruption process of FIG. 69. 本実施の形態に係る遊技機の電断処理(通信処理対策)の部分のブロック図である。It is a block diagram of the part of the power interruption process (communication process countermeasure) of the gaming machine according to the present embodiment. 本実施の形態に係る電断処理(通信処理対策)装置のフローチャートである。It is a flowchart of the electric power interruption process (communication process countermeasure) apparatus which concerns on this Embodiment. 本実施の形態に係る電断処理(通信処理対策)の説明図(タイミングチャート)である。It is explanatory drawing (timing chart) of the electric power interruption process (communication processing countermeasure) which concerns on this Embodiment. 本実施の形態に係る電断処理(通信処理対策)の他の説明図(タイミングチャート)である。It is another explanatory drawing (timing chart) of the electric power interruption process (communication processing countermeasure) which concerns on this Embodiment. 本実施の形態に係る電断処理(通信処理対策)の他の説明図(タイミングチャート)である。It is another explanatory drawing (timing chart) of the electric power interruption process (communication processing countermeasure) which concerns on this Embodiment. 本実施の形態に係るメッセージ(コマンド)の構造説明図である。It is structure explanatory drawing of the message (command) which concerns on this Embodiment. 本実施の形態に係るマルチプロセス処理におけるメッセージ送受信の説明図である。It is explanatory drawing of the message transmission / reception in the multi-process process which concerns on this Embodiment. 本実施の形態に係るメッセージバッファに格納されているメッセージの説明図である。It is explanatory drawing of the message stored in the message buffer which concerns on this Embodiment. 本実施の形態に係るタイマー割り込み、送信タスク、受信タスクの動作説明図(タイミングチャート)である(通常動作時)。It is operation | movement explanatory drawing (timing chart) of the timer interruption which concerns on this Embodiment, a transmission task, and a reception task (at the time of normal operation). 本実施の形態に係るポインタの動作説明図である(通常動作時)。It is operation | movement explanatory drawing of the pointer which concerns on this Embodiment (at the time of normal operation | movement). 本実施の形態に係るメッセージ送受信部のブロック図である。It is a block diagram of the message transmission / reception part which concerns on this Embodiment. 本実施の形態に係る電断処理のフローチャートである(ポインタのバックアップに係る処理部分のみ示す)。It is a flowchart of the power interruption process which concerns on this Embodiment (only the process part which concerns on the backup of a pointer is shown). 本実施の形態に係る復帰処理のフローチャートである(ポインタの復帰処理部分のみ示す)。It is a flowchart of the return process which concerns on this Embodiment (only the return process part of a pointer is shown). 本実施の形態に係るタイマー割り込み、送信タスク、受信タスクの動作説明図(タイミングチャート)である(電断−復帰時)。It is operation | movement explanatory drawing (timing chart) of the timer interruption | blocking which concerns on this Embodiment, a transmission task, and a reception task (at the time of a power interruption-recovery). 本実施の形態に係るポインタの動作説明図である(電断−復帰時)。It is operation | movement explanatory drawing of the pointer which concerns on this Embodiment (at the time of a power failure-recovery).

<遊技機の構造>
図1は前扉を閉めた状態を示すスロットマシンの正面図、図2は前扉を180度開いた状態を示すスロットマシンの正面図を示す。
<Structure of gaming machine>
FIG. 1 is a front view of the slot machine with the front door closed, and FIG. 2 is a front view of the slot machine with the front door opened 180 degrees.

図1及び図2中、100はスロットマシンを示すもので、このスロットマシン100は、図1に示すように、スロットマシン本体120と、このスロットマシン本体120の前面片側にヒンジ等により開閉可能に取り付けられた前扉130とを備えている。前記前扉130の前面には、図1に示すように、ほぼ中央にゲーム表示部131を設け、ゲーム表示部131の右下隅部に、遊技者がメダルを投入するためのメダル投入口132を設け、メダル投入口132の下側には、メダル投入口132から投入され、詰まってしまったメダルをスロットマシン100外に強制的に排出するためのリジェクトボタン133が設けられている。   1 and 2, reference numeral 100 denotes a slot machine. As shown in FIG. 1, the slot machine 100 can be opened and closed by a hinge or the like on the slot machine main body 120 and one side of the front surface of the slot machine main body 120. And a front door 130 attached thereto. As shown in FIG. 1, a game display unit 131 is provided substantially in the center of the front door 130, and a medal insertion slot 132 for a player to insert medals is provided at the lower right corner of the game display unit 131. Provided below the medal insertion slot 132 is a reject button 133 for forcibly discharging a clogged medal inserted from the medal insertion slot 132 to the outside of the slot machine 100.

また、前記ゲーム表示部131の左下方には、ゲームを開始するためのスタートスイッチ134を設けてあり、3つのリールのそれぞれに対応して3つのストップスイッチ140を設けてある。前扉の下端部中央には、メダルの払出し口135を設けてある。前記ゲーム表示部131の上側には、液晶表示装置LCDが設けてある。   In addition, a start switch 134 for starting a game is provided at the lower left of the game display unit 131, and three stop switches 140 are provided corresponding to the three reels. A medal payout port 135 is provided at the center of the lower end of the front door. A liquid crystal display device LCD is provided above the game display unit 131.

液晶表示装置LCDの位置には可動体50が設けられている。可動体50は2つのシャッター(可動体要素)51L及び51Rを備える。2つのシャッター51L及び51Rは演出に従い左右に動き、液晶表示装置LCDを隠す。同図では、2つのシャッター51L及び51Rがそれぞれ左右に一杯に開き、液晶表示装置LCDが露出している(遊技者が画面をみることができる)状態を示している。   A movable body 50 is provided at the position of the liquid crystal display device LCD. The movable body 50 includes two shutters (movable body elements) 51L and 51R. The two shutters 51L and 51R move to the left and right according to the effect, and hide the liquid crystal display device LCD. In the figure, the two shutters 51L and 51R are fully opened to the left and right, and the liquid crystal display device LCD is exposed (the player can see the screen).

ストップスイッチ140とメダル投入口132の間、具体的には、右端のストップスイッチ140の右上側、かつ、メダル投入口132の左側には、操作部としてのジョグダイヤルPANが設けられている。   A jog dial PAN as an operation unit is provided between the stop switch 140 and the medal slot 132, specifically, on the upper right side of the rightmost stop switch 140 and on the left side of the medal slot 132.

ジョグダイヤルPANは、図5(a)に示すように、左右に回転可能に設けられたリング状の部分であるダイヤルJDと、当該リングの回転中心に設けられた押しボタンスイッチPHSWの2つの部分を備える。遊技者は、ジョグダイヤルPANのダイヤルJDを左右に回すことができるとともに、その中心頂部の押しボタンスイッチPHSWを押下することができる。図示しないが、当該押しボタンスイッチPHSWの内部には発光素子が設けられ、例えば、押下時に点灯する。ダイヤルJDは複数のステップ(例えばステップ数=30、その角度=12度)で回転するようになっている。ダイヤルJDの回転方向及び/又は回転量(角度)、並びに押しボタンスイッチのオンオフに応じて所定の演出が行われる。   As shown in FIG. 5 (a), the jog dial PAN includes two parts, a dial JD that is a ring-shaped part that is provided to rotate left and right, and a push button switch PHSW that is provided at the center of rotation of the ring. Prepare. The player can turn the dial JD of the jog dial PAN left and right, and can press the push button switch PHSW at the center top. Although not shown, a light emitting element is provided inside the push button switch SWSW, and lights up when pressed, for example. The dial JD is rotated in a plurality of steps (for example, the number of steps = 30, the angle = 12 degrees). A predetermined effect is performed according to the rotation direction and / or the rotation amount (angle) of the dial JD and the on / off state of the push button switch.

ジョクダイヤルPANは、図5(b)に示すように、押しボタンスイッチPHSWとともに、ダイヤルJDの回転を検知するための2つのセンサ[1]JS1と[2]JS2を備えている。回転に応じてセンサ[1]JS1と[2]JS2はH/Lの2つのデジタル信号を出力する。これについては後にさらに説明を加える。   As shown in FIG. 5B, the jog dial PAN includes two sensors [1] JS1 and [2] JS2 for detecting the rotation of the dial JD together with the push button switch PHSW. The sensors [1] JS1 and [2] JS2 output two digital signals of H / L according to the rotation. This will be further explained later.

スロットマシン本体120の内部には、図2に示すように、その内底面に固定され、内部に複数のメダルを貯留して、貯留したメダルを前扉130の前面に設けた払出し口135に1枚ずつ払い出すためのホッパ装置121が設置されている。このホッパ装置121の上部には、上方に向けて開口し、内部に複数のメダルを貯留するホッパタンク122を備えている。スロットマシン本体120の内部には、前扉130を閉めたときにゲーム表示部131が来る位置に三個のリールからなるリールユニット203が設置されている。リールユニット203は、外周面に複数種類の図柄が配列されている3つのリール(第1リール〜第3リール)を備えている。ゲーム表示部131には開口部が設けられていて、それを通して遊技者が前記リールユニット203の各回転リールの図柄を見ることができるようになっている。ホッパ装置121の上側のリールユニット203との間には電源部205が設けられている。   As shown in FIG. 2, the slot machine main body 120 is fixed to the inner bottom surface, stores a plurality of medals therein, and stores the stored medals at a payout port 135 provided on the front surface of the front door 130. A hopper device 121 for paying out the sheets one by one is installed. An upper portion of the hopper device 121 is provided with a hopper tank 122 that opens upward and stores a plurality of medals therein. Inside the slot machine main body 120, a reel unit 203 including three reels is installed at a position where the game display unit 131 comes when the front door 130 is closed. The reel unit 203 includes three reels (first reel to third reel) in which a plurality of types of symbols are arranged on the outer peripheral surface. The game display unit 131 is provided with an opening through which a player can see the symbols of each rotating reel of the reel unit 203. A power supply unit 205 is provided between the upper hopper unit 121 and the reel unit 203.

前記前扉130の裏面には、図2に示すように、メダル(コイン)セレクタ1が、前扉130の前面に設けられたメダル投入口132の裏側に取り付けられている。このメダルセレクタ1は、メダル投入口132から投入されたメダルの通過を検出しながら、当該メダルをホッパ装置121に向かって転動させ、外径が所定寸法と違う異径メダルや、鉄又は鉄合金で作製された不正メダルを選別して排除するとともに、1ゲームあたりに投入可能な所定枚数以上のメダルを選別して排除するための装置である。   As shown in FIG. 2, the medal (coin) selector 1 is attached to the back side of the front door 130 on the back side of the medal slot 132 provided on the front surface of the front door 130. This medal selector 1 rolls the medal toward the hopper device 121 while detecting the passage of the medal inserted from the medal insertion slot 132, and has a different diameter medal or iron or iron whose outer diameter is different from the predetermined dimension. This is an apparatus for selecting and removing illegal medals made of an alloy and selecting and eliminating a predetermined number or more of medals that can be inserted per game.

また、メダルセレクタ1の下側には、図2に示すように、その下部側を覆って前扉130の払出し口135に連通する導出路136が設けられている。メダルセレクタ1により振り分けられたメダルは、この導出路136を介して払出し口135から遊技者に返却される。   Further, as shown in FIG. 2, a lead-out path 136 that covers the lower side and communicates with the payout port 135 of the front door 130 is provided below the medal selector 1. The medals distributed by the medal selector 1 are returned to the player from the payout port 135 via the derivation path 136.

図3は本実施の形態を適用し得る遊技機の一例としてのスロットマシン100の機能ブロック図を示す。   FIG. 3 shows a functional block diagram of a slot machine 100 as an example of a gaming machine to which this embodiment can be applied.

この図において電源系統についての表示は省略されている。図示しないが、スロットマシンは商用電源(AC100V)から直流電源(+5Vなど)を発生するための電源部(図2の電源部205)を備える。   In this figure, the display about the power supply system is omitted. Although not shown, the slot machine includes a power supply unit (power supply unit 205 in FIG. 2) for generating a DC power supply (+5 V or the like) from a commercial power supply (AC100V).

スロットマシン100は、その主要な処理装置としてメイン基板(処理部)10とこれからコマンドを受けて動作するサブ基板20とを備える。なお、少なくともメイン基板10は、外部から接触不能となるようにケース内部に収容され、これら基板を取り外す際に痕跡が残るように封印処理が施されている。すなわち、メイン基板10とサブ基板20はカシメにより一体となり取り付けられるとともに、メイン基板10とサブ基板20の全体を覆う一体のケースによりカバーされている。   The slot machine 100 includes a main substrate (processing unit) 10 and a sub substrate 20 that operates in response to a command from the main substrate (processing unit) 10 as main processing devices. At least the main substrate 10 is accommodated inside the case so that it cannot be contacted from the outside, and is sealed so that traces remain when these substrates are removed. That is, the main board 10 and the sub board 20 are integrally attached by caulking, and are covered by an integral case that covers the entire main board 10 and the sub board 20.

メイン基板10は、遊技者の操作を受けて内部抽選を行ったり、回胴の回転・停止やメダルの払い出しなどの処理(遊技処理)を行うためのものである。メイン基板10は、予め設定されたプログラムに従って制御動作を行うCPUと、前記プログラムを記憶する記憶手段であるROMおよび処理結果などを一時的に記憶するRAMを含む。   The main board 10 is used for performing an internal lottery in response to the player's operation, and for performing processing (game processing) such as rotation / stop of the spinning cylinder and payout of medals. The main board 10 includes a CPU that performs a control operation according to a preset program, a ROM that is a storage unit that stores the program, and a RAM that temporarily stores processing results and the like.

サブ基板20は、メイン基板10からコマンド信号を受けて内部抽選の結果を報知したり各種演出を行うためのものである。サブ基板20は、前記コマンド信号に応じた予め設定されたプログラムに従って制御動作を行うCPUと、前記プログラムを記憶する記憶手段であるROMおよび処理結果などを一時的に記憶するRAMを含む。コマンドの流れはメイン基板10からサブ基板20への一方のみであり、逆にサブ基板20からメイン基板10へコマンド等が出されることはない。   The sub board 20 is for receiving a command signal from the main board 10 and notifying the result of the internal lottery and performing various effects. The sub-board 20 includes a CPU that performs a control operation in accordance with a preset program corresponding to the command signal, a ROM that is a storage unit that stores the program, and a RAM that temporarily stores processing results and the like. Only one command flows from the main board 10 to the sub board 20, and conversely, no command is issued from the sub board 20 to the main board 10.

<メイン基板>
メイン基板10には、ベットスイッチBET、スタートスイッチ134,ストップボタン140,リール(回胴)ユニット203、ホッパ駆動部80、ホッパ81及びホッパ81から払い出されたメダルの枚数を数えるためのメダル検出部82(これらは前述のホッパ装置121を構成する)が接続されている。サブ基板20には液晶表示装置の制御用の液晶制御基板200、スピーカ基板201、LED基板202などの周辺基板(ローカル基板)が接続されている。
<Main board>
The main board 10 has a bet switch BET, a start switch 134, a stop button 140, a reel (rotating cylinder) unit 203, a hopper driving unit 80, a hopper 81, and a medal detection for counting the number of medals paid out from the hopper 81. The part 82 (these constitute the hopper device 121 described above) is connected. A peripheral substrate (local substrate) such as a liquid crystal control substrate 200 for controlling the liquid crystal display device, a speaker substrate 201, and an LED substrate 202 is connected to the sub substrate 20.

メイン基板10には、さらに、メダルセレクタ1のメダルセンサS1及びS2が接続されている。   Further, medal sensors S1 and S2 of the medal selector 1 are connected to the main board 10.

メダルセレクタ1には、メダルを計数するためのメダルセンサS1及びS2が設けられている。メダルセンサS1及びS2は、メダルセレクタ1に設けられた図示しないメダル通路の下流側(出口近傍)に設けられている(メダル通路の上流側はメダル投入口132に連通している)。2つのメダルセンサS1とS2は、メダルの進行方向に沿って所定間隔を空けて並べて設けられている。メダルセンサS1、S2は、例えば、互いに対向した発光部と受光部とを有して断面コ字状に形成され、その検出光軸をメダル通路内に上方から臨ませて位置するフォトインタラプタである。各フォトインタラプタにより、途中で阻止されずに送られてきたメダルの通過が検出される。なお、フォトインタラプタを2つ隣接させたのは、メダル枚数を検出するだけでなく、メダルの通過が正常か否かを監視するためである。すなわち、フォトインタラプタを2つ隣接させて設けることにより、メダルの通過速度や通過方向を検出することができ、これによりメダル枚数だけでなく、逆方向に移動する不正行為を感知することができる。   The medal selector 1 is provided with medal sensors S1 and S2 for counting medals. The medal sensors S1 and S2 are provided on the downstream side (near the exit) of a medal passage (not shown) provided in the medal selector 1 (the upstream side of the medal passage communicates with the medal slot 132). The two medal sensors S1 and S2 are arranged side by side at a predetermined interval along the medal traveling direction. The medal sensors S1 and S2 are, for example, photointerrupters that have a light emitting portion and a light receiving portion that face each other, are formed in a U-shaped cross section, and are positioned so that the detection optical axis faces the medal passage from above. . Each photo interrupter detects the passage of a medal sent without being blocked on the way. The reason why two photo interrupters are adjacent is not only to detect the number of medals but also to monitor whether or not the passage of medals is normal. That is, by providing two photo interrupters adjacent to each other, it is possible to detect the passing speed and passing direction of medals, thereby detecting not only the number of medals but also an illegal act moving in the reverse direction.

リールユニット203は、3つの回胴40a〜40cと、これらをそれぞれ回転させるステッピングモータ155a〜155cと、それらの位置をそれぞれ検出する回胴位置検出器(インデックスセンサ)159a〜159cとを備える(なお、ステッピングモータ155a〜155cを単にモータ155あるいはモータと記すことがある)。   The reel unit 203 includes three spinning cylinders 40a to 40c, stepping motors 155a to 155c that respectively rotate these, and spinning cylinder position detectors (index sensors) 159a to 159c that detect their positions, respectively (note that The stepping motors 155a to 155c may be simply referred to as a motor 155 or a motor).

回胴制御手段1300は、回胴40a〜40cそれぞれが1回転する毎にインデックスセンサ159で検出される基準位置信号に基づいて、回胴40の基準位置(図示しないインデックスによって特定されるコマ)からの回転角度を求める(ステップモータの回転軸の回転ステップ数をカウントする)ことによって、現在の回胴40の回転状態を監視することができるようになっている。すなわち、メイン基板10は、回胴40の基準位置からの回転角度を求めることにより、ストップボタン140の作動時における回胴40の位置を得ることができる。   Based on the reference position signal detected by the index sensor 159 every time each of the rotating cylinders 40a to 40c makes one rotation, the rotating cylinder control means 1300 starts from the reference position (a frame specified by an index (not shown)) of the rotating cylinder 40. Is obtained (by counting the number of rotation steps of the rotation shaft of the step motor), the current rotation state of the drum 40 can be monitored. That is, the main substrate 10 can obtain the position of the rotating drum 40 when the stop button 140 is operated by obtaining the rotation angle from the reference position of the rotating drum 40.

なお、以下の説明において、任意のひとつ又は複数の回胴を示すときは符号40を使用し、3つの回胴をそれぞれ区別して示すときは符号40a〜40cを使用することにする。   In the following description, reference numeral 40 is used to indicate any one or a plurality of spinning cylinders, and reference numerals 40a to 40c are used to separately indicate three spinning cylinders.

ホッパ駆動部80は、ホッパ81の図示しない回転ディスクを回転駆動して、メイン基板10によって指示された払出数のメダルを払い出す動作を行う。遊技機は、メダルを1枚払い出す毎に作動するメダル検出部82を備えており、メイン基板10は、メダル検出部82からの入力信号に基づいてホッパ81から実際に払い出されたメダルの数を管理することができる。   The hopper driving unit 80 rotates an unillustrated rotating disk of the hopper 81 and performs an operation of paying out medals of the payout number instructed by the main board 10. The gaming machine includes a medal detection unit 82 that operates every time a medal is paid out, and the main board 10 receives a medal actually paid out from the hopper 81 based on an input signal from the medal detection unit 82. You can manage the number.

投入受付部(投入受付手段)1050は、メダルセレクタ1のメダルセンサS1とS2の出力を受け、遊技毎にメダルの投入を受け付けて、規定投入数に相当するメダルが投入されたことに基づいて、スタートスイッチ134に対する第1回胴〜第3回胴の回転開始操作を許可する処理を行う。なお、スタートスイッチ134の押下操作が、第1回胴〜第3回胴の回転を開始させる契機となっているとともに、内部抽選を実行する契機となっている。また、遊技状態に応じて規定投入数を設定し、通常状態およびボーナス成立状態では規定投入数を3枚に設定し、ボーナス状態では規定投入数を1枚に設定する。   The insertion accepting unit (insertion accepting means) 1050 receives the outputs of the medal sensors S1 and S2 of the medal selector 1, accepts the insertion of medals for each game, and based on the insertion of medals corresponding to the prescribed number of insertions. Then, a process of permitting the start operation of the first to third cylinders for the start switch 134 is performed. Note that the pressing operation of the start switch 134 is an opportunity to start the rotation of the first cylinder to the third cylinder, and is an opportunity to execute the internal lottery. Also, a prescribed number of throws is set according to the gaming state, the prescribed number of throws is set to 3 in the normal state and the bonus establishment state, and the prescribed throw number is set to 1 in the bonus state.

メダルが投入されると、遊技状態に応じた規定投入数を限度として、投入されたメダルを投入状態に設定する。あるいは、遊技機にメダルがクレジットされた状態で、ベットスイッチBETが押下されると、遊技状態に応じた規定投入数を限度して、クレジットされたメダルを投入状態に設定する。メダルの投入を受け付けるかどうかは、メイン基板10が制御する。スタートスイッチ134が押下され各回胴の回転が開始した時点(遊技開始時点)から3つのストップボタン140が押下され各回胴の回転が停止した時点(入賞した場合はメダル払い出しが完了した時点)(遊技終了時点)の間であって、メダルの投入を受け付ける状態になっていないときは(許可されていないときは)、メダルを投入してもメダルセンサS1、S2でカウントされず、そのまま返却される。同様に、メイン基板10は、メダルの投入を受け付ける状態か否かに応じて、ベットスイッチBETの有効/無効を制御する。また、前記遊技終了時点から前記遊技開始時点までの間でベットスイッチBETは有効となるが、これ以外の期間においては(BETスイッチの押下が許可されていないときは)、ベットスイッチBETを押下しても、それは無視される。   When medals are inserted, the inserted medals are set to the inserted state up to a specified number of insertions according to the gaming state. Alternatively, when the bet switch BET is pressed in a state where medals have been credited to the gaming machine, the credited medals are set to the inserted state by limiting the prescribed number of insertions according to the gaming state. The main board 10 controls whether or not to accept a medal. From the time when the start switch 134 is pressed and the rotation of each cylinder starts (game start time), when the three stop buttons 140 are pressed and the rotation of each cylinder stops (when the medal payout is completed when winning) (game) When the medal is not accepted (when it is not permitted), the medal sensor S1, S2 does not count the medal and is returned as it is. . Similarly, the main board 10 controls the validity / invalidity of the bet switch BET according to whether or not the medal insertion is accepted. In addition, the bet switch BET is valid from the end of the game to the start of the game, but during other periods (when pressing of the BET switch is not permitted), the bet switch BET is pressed. Even it is ignored.

メイン基板10は、乱数発生手段1100を内蔵する。乱数発生手段1100は、抽選用の乱数値を発生させる手段である。乱数値は、例えば、インクリメントカウンタ(所定のカウント範囲を循環するように数値をカウントするカウンタ)のカウント値に基づいて発生させることができる。なお本実施形態において「乱数値」には、数学的な意味でランダムに発生する値のみならず、その発生自体は規則的であっても、その取得タイミング等が不規則であるために実質的に乱数として機能しうる値も含まれる。   The main board 10 incorporates random number generating means 1100. The random number generation means 1100 is a means for generating a random number for lottery. The random value can be generated based on, for example, a count value of an increment counter (a counter that counts numerical values so as to circulate a predetermined count range). In this embodiment, the “random number value” is not only a value that is randomly generated in a mathematical sense, but even if the generation itself is regular, the acquisition timing and the like are irregular. Includes a value that can function as a random number.

内部抽選手段1200は、遊技者がスタートスイッチ134からのスタート信号に基づいて、役の当否を決定する内部抽選を行う。すなわち、メイン基板10のメモリ(図示せず)に記憶されている抽選テーブル(図示せず)を選択する抽選テーブル選択処理、乱数発生手段1100から得た乱数の当選を判定する乱数判定処理、当選の判定結果で大当たりなどに当選したときにその旨のフラグを設定する抽選フラグ設定処理などを行う。   The internal lottery means 1200 performs an internal lottery in which the player determines whether or not the winning combination is based on a start signal from the start switch 134. That is, a lottery table selection process for selecting a lottery table (not shown) stored in a memory (not shown) of the main board 10, a random number determination process for determining the winning of a random number obtained from the random number generating means 1100, The lottery flag setting process for setting a flag to that effect when a big win or the like is won by the determination result is performed.

抽選テーブル選択処理では、図示しない記憶手段(ROM)に格納されている複数の抽選テーブル(図示せず)のうち、いずれの抽選テーブルを用いて内部抽選を行うかを決定する。抽選テーブルでは、複数の乱数値(例えば、0〜65535の65536個の乱数値)のそれぞれに対して、リプレイ、小役(ベル、チェリー)、レギュラーボーナス(RB:ボーナス)、およびビッグボーナス(BB:ボーナス)などの各種の役が対応づけられている。また、遊技状態として、通常状態、ボーナス成立状態、およびボーナス状態が設定可能とされ、さらにリプレイの抽選状態として、リプレイ無抽選状態、リプレイ低確率状態、リプレイ高確率状態が設定可能とされる。   In the lottery table selection process, a lottery table (not shown) stored in a storage unit (ROM) (not shown) is used to determine which lottery table is used for internal lottery. In the lottery table, for each of a plurality of random values (for example, 65536 random values from 0 to 65535), replay, small role (bell, cherry), regular bonus (RB: bonus), and big bonus (BB :), etc., are associated with each other. In addition, a normal state, a bonus establishment state, and a bonus state can be set as the gaming state, and a replay lottery state, a replay low probability state, and a replay high probability state can be set as replay lottery states.

抽選テーブル選択処理により、抽選の内容は所定の範囲内で設定可能(当選の確率を高くしたり低くしたりできる)であり、遊技機が設置されるホールなどにおいて店側により設定作業が行われる。   The lottery table selection process allows the contents of the lottery to be set within a predetermined range (the probability of winning can be increased or decreased), and the setting work is performed by the store in the hall where the gaming machine is installed. .

通常の遊技機は、BB,RB、小役等の抽選確率の異なる複数(例えば6つ)の抽選テーブルを予め備える。遊技機の抽選では、それら複数の抽選テーブルの中から1つが設定され、この設定された抽選テーブルに基づいて抽選による当たり/ハズレの判定がなされる。複数の抽選テーブルのうちどれを使用するかに関する設定を変更することを、設定の変更(以下、「設定変更」と記す)と称している。   A normal gaming machine includes a plurality of (for example, six) lottery tables having different lottery probabilities such as BB, RB, and small roles in advance. In the lottery of gaming machines, one of the plurality of lottery tables is set, and the winning / losing determination by lottery is made based on the set lottery table. Changing a setting relating to which of a plurality of lottery tables is used is referred to as a setting change (hereinafter referred to as “setting change”).

従来、例えばスロットマシンのような遊技機では、設定値(通常1〜6)を変更する場合、遊技機の扉を開け、電源部に設けられた設定変更キースイッチに設定変更キーを挿入して当該キースイッチをオンにした状態で遊技機の電源を投入して設定変更可能な状態にし、設定変更ボタン(押ボタン)を1回押下するごとに、7セグメント表示器などに表示される設定値がインクリメントされて1〜6までの値を循環的に変化させ、所望する設定値が表示器に表示されたところでスタートスイッチを操作することで、所望する設定値を確定させている。   Conventionally, for example, in a gaming machine such as a slot machine, when changing a setting value (usually 1 to 6), the door of the gaming machine is opened, and a setting change key is inserted into a setting change key switch provided in the power supply unit. Setting value displayed on a 7-segment display etc. each time the setting change button (push button) is pressed once by turning on the power of the gaming machine with the key switch turned on. Is incremented and the values from 1 to 6 are cyclically changed, and the desired setting value is determined by operating the start switch when the desired setting value is displayed on the display.

乱数判定処理では、スタートスイッチ134からのスタート信号に基づいて、遊技毎に乱数発生手段(図示せず)から乱数値(抽選用乱数)を取得し、取得した乱数値について前記抽選テーブルを参照して役に当選したか否かを判定する。   In the random number determination process, on the basis of the start signal from the start switch 134, a random number value (lottery random number) is acquired for each game from random number generation means (not shown), and the lottery table is referred to for the acquired random number value. To determine whether or not they have won the role.

抽選フラグ設定処理では、乱数判定処理の結果に基づいて、当選したと判定された役の抽選フラグを非当選状態(第1のフラグ状態、オフ状態)から当選状態(第2のフラグ状態、オン状態)に設定する。2種類以上の役が重複して当選した場合には、重複して当選した2種類以上の役のそれぞれに対応する抽選フラグが当選状態に設定される。抽選フラグの設定情報は、記憶手段(RAM)に格納される。   In the lottery flag setting process, the lottery flag of the winning combination determined to be won based on the result of the random number determination process is changed from the non-winning state (first flag state, off state) to the winning state (second flag state, on Status). When two or more types of winning combinations are won, a lottery flag corresponding to each of the two or more types of winning winning combinations is set to the winning state. The lottery flag setting information is stored in storage means (RAM).

入賞するまで次回以降の遊技に当選状態を持ち越し可能な抽選フラグ(持越可能フラグ)と、入賞の如何に関わらず次回以降の遊技に当選状態を持ち越さずに非当選状態にリセットされる抽選フラグ(持越不可フラグ)とが用意されていることがある。この場合、前者の持越可能フラグが対応づけられる役としては、レギュラーボーナス(RB)およびビッグボーナス(BB)があり、それ以外の役(例えば、小役、リプレイ)は後者の持越不可フラグに対応づけられている。すなわち抽選フラグ設定処理では、内部抽選でレギュラーボーナスに当選すると、レギュラーボーナスの抽選フラグの当選状態を、レギュラーボーナスが入賞するまで持ち越す処理を行い、内部抽選でビッグボーナスに当選すると、ビッグボーナスの抽選フラグの当選状態を、ビッグボーナスが入賞するまで持ち越す処理を行う。このときメイン基板10は、内部抽選機能により、レギュラーボーナスやビッグボーナスの抽選フラグの当選状態が持ち越されている遊技でも、レギュラーボーナスおよびビッグボーナス以外の役(小役およびリプレイ)についての当否を決定する内部抽選を行っている。すなわち抽選フラグ設定処理では、レギュラーボーナスの抽選フラグの当選状態が持ち越されている遊技において、内部抽選で小役あるいはリプレイが当選した場合には、既に当選しているレギュラーボーナスの抽選フラグと内部抽選で当選した小役あるいはリプレイの抽選フラグとからなる2種類以上の役に対応する抽選フラグを当選状態に設定し、ビッグボーナスの抽選フラグの当選状態が持ち越されている遊技において、内部抽選で小役あるいはリプレイが当選した場合には、既に当選しているビッグボーナスの抽選フラグと内部抽選で当選した小役あるいはリプレイの抽選フラグとからなる2種類以上の役に対応する抽選フラグを当選状態に設定する。   A lottery flag (possible carryover flag) that can carry over the winning state for the next game until winning, and a lottery flag that is reset to the non-winning state without bringing the winning state to the next game regardless of winning Carry-over impossible flag) may be provided. In this case, there are a regular bonus (RB) and a big bonus (BB) as a combination to which the former carry-over possible flag is associated, and other combinations (for example, small role, replay) correspond to the latter carry-over impossible flag. It is attached. In other words, in the lottery flag setting process, when a regular bonus is won by internal lottery, the winning state of the regular bonus lottery flag is carried over until the regular bonus is won, and when the big bonus is won by internal lottery, the big bonus lottery A process of carrying over the winning state of the flag until the big bonus is won is performed. At this time, the main board 10 determines whether or not a role other than the regular bonus and the big bonus (small role and replay) is used even in a game in which the winning state of the regular bonus or big bonus lottery flag is carried over by the internal lottery function. An internal lottery is performed. In other words, in the lottery flag setting process, in a game in which the winning state of the regular bonus lottery flag is carried over, if a small role or replay is won in the internal lottery, the regular bonus lottery flag and the internal lottery already won In a game in which the lottery flags corresponding to two or more types of winning combinations or replay lottery flags won in the win state are set to the winning state and the winning state of the big bonus lottery flag is carried over, it is small in the internal lottery When a winning combination or replay is won, a lottery flag corresponding to two or more kinds of winning combinations including a big bonus lottery flag that has already been won and a small bonus or replay lottery flag that has been won in an internal lottery is set to a winning state. Set.

回胴制御手段1300は、遊技者がスタートスイッチ134の押下操作(回転開始操作)によるスタート信号に基づいて、第1回胴〜第3回胴をステッピングモータにより回転駆動して、第1回胴〜第3回胴の回転速度が所定速度(約80rpm:1分間あたり約80回転となる回転速度)に達した状態において回転中の回胴にそれぞれ対応する3つのストップボタン140の押下操作(停止操作)を許可する制御を行うとともに、ステッピングモータにより回転駆動されている第1回胴〜第3回胴を抽選フラグの設定状態(内部抽選の結果)に応じて停止させる制御を行う。   The spinning cylinder control means 1300 rotates the first to third cylinders by a stepping motor based on a start signal generated by the player pressing the start switch 134 (rotation start operation), and the first cylinder -Depressing (stopping) the three stop buttons 140 corresponding to the rotating cylinders in a state where the rotation speed of the third cylinder reaches a predetermined speed (about 80 rpm: a rotational speed of about 80 rotations per minute). In addition to performing control to permit the operation), control is performed to stop the first to third cylinders driven to rotate by the stepping motor in accordance with the lottery flag setting state (internal lottery result).

また、回胴制御手段1300は、3つのストップボタン140に対する押下操作(停止操作)が許可(有効化)された状態において、遊技者が3つのストップボタン140を押下することにより、その回胴停止信号に基づいて、リールユニット203のステッピングモータへの駆動パルス(モータ駆動信号)の供給を停止することにより、第1回胴〜第3回胴の各回胴を停止させる制御を行う。   In addition, when the player presses the three stop buttons 140 in a state where the pressing operation (stop operation) with respect to the three stop buttons 140 is permitted (validated), Based on the signal, the supply of the drive pulse (motor drive signal) to the stepping motor of the reel unit 203 is stopped, thereby controlling each of the first to third drums.

すなわち、回胴制御手段1300は、3つのストップボタン140の各ボタンが押下される毎に、第1回胴〜第3回胴のうち押下されたボタンに対応する回胴の停止位置を決定して、決定された停止位置で回胴を停止させる制御を行っている。具体的には、記憶手段(ROM)に記憶されている停止制御テーブル(図示せず)を参照して3つのストップボタンの押下タイミングや押下順序等(停止操作の態様)に応じた第1回胴〜第3回胴の停止位置を決定し、決定された停止位置で第1回胴〜第3回胴を停止させる制御を行う。   That is, each time the three stop buttons 140 are pressed, the spinning cylinder control means 1300 determines the stopping position of the spinning cylinder corresponding to the pressed button among the first to third cylinders. Thus, control is performed to stop the spinning cylinder at the determined stop position. Specifically, referring to a stop control table (not shown) stored in the storage means (ROM), the first time corresponding to the pressing timing, pressing order, etc. of the three stop buttons (mode of stop operation) A stop position of the cylinder to the third cylinder is determined, and control is performed to stop the first cylinder to the third cylinder at the determined stop position.

ここで停止制御テーブルでは、ストップボタン140の作動時点における第1回胴〜第3回胴の位置(押下検出位置)と、第1回胴〜第3回胴の実際の停止位置(または押下検出位置からの滑りコマ数)との対応関係が設定されている。滑りコマ数とは、回胴停止時にゲーム表示部から視認できる特定の図柄を基準位置としたときのストップボタン140の操作から対応する回胴の回転停止までの間に当該基準位置を通過する図柄の数をいう。回胴制御手段1300は、各ストップボタン140の操作から190ms以内という条件下で各回胴を停止させるため、滑りコマ数は0以上4以下の範囲内となっている(ただし、80回転/分、図柄数=21個の条件において)。抽選フラグの設定状態に応じて、第1回胴〜第3回胴の停止位置を定めるための停止制御テーブルが用意されることもある。   Here, in the stop control table, the positions of the first cylinder to the third cylinder (pressing detection position) at the time when the stop button 140 is operated, and the actual stop positions (or pressing detection of the first cylinder to the third cylinder). Correspondence with the number of sliding frames from the position) is set. The number of sliding symbols is a symbol that passes through the reference position between the operation of the stop button 140 and the rotation stop of the corresponding rotating cylinder when a specific symbol that can be visually recognized from the game display unit at the time of stopping the rotating drum is used as the reference position. The number of Since the turning cylinder control means 1300 stops each turning cylinder within 190 ms from the operation of each stop button 140, the number of sliding frames is in the range of 0 to 4 (however, 80 revolutions / minute, (In the condition of the number of symbols = 21). Depending on the setting state of the lottery flag, a stop control table for determining the stop positions of the first cylinder to the third cylinder may be prepared.

前述のように、回胴制御手段1300は、回胴が1回転する毎にインデックスセンサ159で検出される基準位置信号に基づいて、回胴の基準位置(リールインデックスによって検出されるコマ)からの回転角度(ステップモータの回転軸の回転ステップ数)を求めることによって、現在の回胴の回転状態を監視することができるようになっている。すなわち、メイン基板10は、ストップボタン140の作動時における回胴の位置を、回胴の基準位置からの回転角度を求めることにより得ることができる。   As described above, the spinning cylinder control unit 1300 is based on the reference position signal (the frame detected by the reel index) of the spinning cylinder based on the reference position signal detected by the index sensor 159 every time the rotating cylinder makes one rotation. By obtaining the rotation angle (the number of rotation steps of the rotation shaft of the step motor), the current rotation state of the rotating drum can be monitored. That is, the main board 10 can obtain the position of the rotating cylinder when the stop button 140 is operated by obtaining the rotation angle from the reference position of the rotating cylinder.

回胴制御手段1300は、いわゆる引き込み処理と蹴飛ばし処理とを回胴を停止させる制御として行っている。引き込み処理とは、抽選フラグが当選状態に設定された役に対応する図柄が有効な入賞判定ライン上に停止するように(当選した役を入賞させることができるように)回胴を停止させる制御処理である。一方蹴飛ばし処理とは、抽選フラグが非当選状態に設定された役に対応する図柄が有効な入賞判定ライン上に停止しないように(当選していない役を入賞させることができないように)回胴を停止させる制御処理である。すなわち本実施形態の遊技機では、上記引き込み処理及び蹴飛ばし処理を実現させるべく、抽選フラグの設定状態、ストップボタン140の押下タイミング、押下順序、既に停止している回胴の停止位置(表示図柄の種類)などに応じて各回胴の停止位置が変化するように停止制御テーブルが設定されている。このように、メイン基板10は、抽選フラグが当選状態に設定された役の図柄を入賞の形態で停止可能にし、一方で抽選フラグが非当選状態に設定された役の図柄が入賞の形態で停止しないように第1回胴〜第3回胴を停止させる制御を行っている。   The spinning cylinder control unit 1300 performs so-called pull-in processing and kicking processing as control for stopping the spinning cylinder. The pull-in process is a control for stopping the spinning cylinder so that the symbol corresponding to the combination whose lottery flag is set to the winning state is stopped on a valid winning determination line (so that the winning combination can be won). It is processing. On the other hand, the kicking process means that the symbol corresponding to the combination for which the lottery flag is set to the non-winning state does not stop on a valid winning determination line (so that a non-winning combination cannot be won) Is a control process for stopping the process. That is, in the gaming machine of the present embodiment, the lottery flag setting state, the stop button 140 pressing timing, the pressing order, and the stop position of the spinning cylinder that has already stopped (in the display pattern) in order to realize the pull-in processing and kicking processing. The stop control table is set so that the stop position of each cylinder changes according to the type). In this way, the main board 10 can stop the symbol of the combination for which the lottery flag is set to the winning state in a winning form, while the symbol of the combination for which the lottery flag is set to the non-winning state is in the winning form. Control is performed to stop the first to third cylinders so as not to stop.

本実施形態の遊技機では、第1回胴〜第3回胴が、ストップボタン140が押下された時点から190ms以内に、押下されたストップボタンに対応する回転中の回胴を停止させる制御状態に設定されている。すなわち回転している各回胴の停止位置を決めるための停止制御テーブルでは、ストップボタン140の押下時点から各回胴が停止するまでに要するコマ数が0コマ〜4コマの範囲(所定の引き込み範囲)で設定されている。   In the gaming machine of the present embodiment, the first to third drums are controlled to stop the rotating drum corresponding to the pressed stop button within 190 ms from the time when the stop button 140 is pressed. Is set to That is, in the stop control table for determining the stop position of each rotating cylinder, the number of frames required from when the stop button 140 is pressed until each cylinder stops is in the range of 0 to 4 frames (predetermined pull-in range). Is set in

入賞判定手段1400は、第1回胴〜第3回胴の停止態様に基づいて、役が入賞したか否かを判定する処理を行う。具体的には、記憶手段(ROM)に記憶されている入賞判定テーブルを参照しながら、第1回胴〜第3回胴の全てが停止した時点で入賞判定ライン上に表示されている図柄組合せが、予め定められた役の入賞の形態であるか否かを判定する。   The winning determination means 1400 performs a process of determining whether or not a winning combination has been won based on the stopping modes of the first to third cylinders. Specifically, referring to the winning determination table stored in the storage means (ROM), the symbol combination displayed on the winning determination line when all of the first to third cylinders are stopped. It is determined whether or not this is a predetermined winning combination form.

入賞判定手段1400は、その判定結果に基づいて、入賞時処理を実行する。入賞時処理としては、例えば、小役が入賞した場合にはホッパ81を駆動してメダルの払出制御処理が行われるか、あるいはクレジットの増加され(規定の最大枚数例えば50枚まで増加され、それを超えた分だけ実際にメダル払い出される)、リプレイが入賞した場合にはリプレイ処理が行われ、ビッグボーナスやレギュラーボーナスが入賞した場合には遊技状態を移行させる遊技状態移行制御処理が行われる。   The winning determination means 1400 executes a winning process based on the determination result. As a process at the time of winning a prize, for example, when a small role wins, the hopper 81 is driven to perform a medal payout control process, or a credit is increased (a predetermined maximum number is increased to 50, for example, When the replay is won, a replay process is performed. When a big bonus or a regular bonus is won, a game state transition control process for shifting the game state is performed.

払出制御手段1500は、遊技結果に応じたメダルの払い出しに関する払出制御処理を行う。具体的には、小役が入賞した場合に、役毎に予め定められている配当に基づいて遊技におけるメダルの払出数を決定し、決定された払出数に相当するメダルを、ホッパ駆動部80でホッパ81を駆動して払い出させる。この際に、ホッパ81に内蔵される図示しないモータに電流が流れることになる。   The payout control means 1500 performs payout control processing relating to the payout of medals according to the game result. Specifically, when a small combination wins, the number of medals to be paid out in the game is determined based on a payout predetermined for each combination, and the medals corresponding to the determined number of payouts are determined by the hopper driving unit 80. Then, the hopper 81 is driven to pay out. At this time, a current flows through a motor (not shown) built in the hopper 81.

メダルのクレジット(内部貯留)が許可されている場合には、ホッパ81によって実際にメダルの払い出しを行う代わりに、記憶手段(RAM)のクレジット記憶領域(図示省略)に記憶されているクレジット数(クレジットされたメダルの数)に対して払出数を加算するクレジット加算処理を行って仮想的にメダルを払い出す処理を行う。   When medal credits (internal storage) are permitted, instead of actually paying out medals by the hopper 81, the number of credits stored in a credit storage area (not shown) of the storage means (RAM) (not shown) A credit addition process for adding the number of payouts to the number of credited medals is performed to virtually pay out medals.

リプレイ処理手段1600は、リプレイが入賞した場合に、次回の遊技に関して遊技者の所有するメダルの投入を要さずに前回の遊技と同じ準備状態に設定するリプレイ処理(再遊技処理)を行う。リプレイが入賞した場合には、遊技者の手持ちのメダル(クレジットメダルを含む)を使わずに前回の遊技と同じ規定投入数のメダルが自動的に投入状態に設定される自動投入処理が行われ、遊技機が前回の遊技と同じ入賞判定ラインを有効化した状態で次回の遊技における回転開始操作(遊技者によるスタートスイッチ134の押下操作)を待機する状態に設定される。   When the replay is won, the replay processing means 1600 performs a replay process (regame process) for setting the same preparation state as the previous game without requiring insertion of medals owned by the player for the next game. When a replay wins, an automatic insertion process is performed in which the same number of medals as the previous game is automatically set to the insertion state without using the player's own medals (including credit medals). The game machine is set in a state of waiting for a rotation start operation (pressing operation of the start switch 134 by the player) in the next game in a state where the same winning determination line as the previous game is validated.

リプレイ処理手段1600は、所定条件下で内部抽選におけるリプレイの当選確率を変動させる制御を行うことがある。例えば、ストップボタン140の操作によって回胴を停止させた際に所定の出目が表示されるとリプレイの当選確率が変動する。リプレイの抽選状態として、リプレイが内部抽選の対象から除外されるリプレイ無抽選状態、リプレイの当選確率が約1/7.3に設定されるリプレイ低確率状態、およびリプレイの当選確率が約1/6に設定されるリプレイ高確率状態という複数種類の抽選状態を設定可能とされている。   The replay processing unit 1600 may perform control to change the winning probability of replay in the internal lottery under a predetermined condition. For example, when a predetermined turn is displayed when the spinning cylinder is stopped by operating the stop button 140, the winning probability of replay varies. The replay lottery states include a replay no lottery state in which replay is excluded from the internal lottery, a replay low probability state in which the replay winning probability is set to about 1 / 7.3, and a replay winning probability of about 1 / A plurality of lottery states such as a high replay probability state set to 6 can be set.

エラー処理部1700は、図示しない扉開閉検知センサ、メダルセンサS1及びS2及びメダル検出部82の出力に基づき遊技機のエラー判定を行い、エラーと判定したときにその旨を報知するとともに、遊技機を所定の状態(例えば、操作を受け付けない状態)にする。   The error processing unit 1700 determines an error of the gaming machine based on the outputs of a door opening / closing detection sensor (not shown), the medal sensors S1 and S2, and the medal detection unit 82, and notifies that when it determines that there is an error. To a predetermined state (for example, a state in which no operation is accepted).

図示しない扉開閉検知センサは、扉130が閉じられたことを検知するセンサであり、例えばマイクロスイッチや接点などの電気的スイッチである。当該スイッチは扉130が閉じられたときに、扉130の裏側にスイッチの作用部が当接することでオン(又はオフ)になり、扉130が開放されると作用部が離れてオフ(又はオン)になるものである。扉開閉検知センサは、フォトインタラプタのような光学式のものでもよい。メダルセンサS1及びS2及びメダル検出部82については前述した。   A door open / close detection sensor (not shown) is a sensor that detects that the door 130 is closed, and is, for example, an electrical switch such as a micro switch or a contact. When the door 130 is closed, the switch is turned on (or off) when the switch action part contacts the back side of the door 130, and when the door 130 is opened, the action part is separated and turned off (or on). ). The door opening / closing detection sensor may be an optical sensor such as a photo interrupter. The medal sensors S1 and S2 and the medal detection unit 82 have been described above.

エラー処理部1700は、具体的には次のような動作を行う。
・図示しない扉開閉検知センサの出力に基づき扉130の開放を検知したとき、エラー処理を行う。
・メダルセンサS1及びS2の出力に基づきメダルの逆流(センサS1とS2の検知順序が反対になったこと)、メダル滞留(センサS1とS2の検知時間が予め定められた閾値よりも長いこと)などを検知したとき、エラー処理を行う。
・メダル検出部82の出力に基づきメダル詰まり(メダル検出部82の検知時間が予め定められた閾値よりも長いこと)、ホッパーエンプティ(ホッパ駆動部80を動作させているにもかかわらずメダル検知部82がメダルを検知しない)などを検知したとき、エラー処理を行う。
Specifically, the error processing unit 1700 performs the following operation.
When an opening of the door 130 is detected based on an output from a door opening / closing detection sensor (not shown), error processing is performed.
-Based on the outputs of the medal sensors S1 and S2, the reverse flow of the medals (the detection order of the sensors S1 and S2 is reversed), the medal retention (the detection times of the sensors S1 and S2 are longer than a predetermined threshold) When error is detected, error processing is performed.
Based on the output of the medal detection unit 82, the medal clogging (the detection time of the medal detection unit 82 is longer than a predetermined threshold), hopper empty (the medal detection unit despite operating the hopper driving unit 80) When 82 detects no medal), error processing is performed.

エラー処理部1700は、上記のようにエラーと判定したときにその旨を報知するとともに、遊技機を所定の状態(エラー状態)にするが、この状態は図示しないリセットスイッチにより解除される。リセットスイッチは、例えば電源部205のパネルに設けられる。   When the error processing unit 1700 determines that an error has occurred as described above, the error processing unit 1700 notifies the fact and sets the gaming machine to a predetermined state (error state). This state is canceled by a reset switch (not shown). The reset switch is provided on the panel of the power supply unit 205, for example.

なお、サブ基板20で生じるエラーもある。このエラーでは遊技不能状態にはならないが、サブ基板20自身の処理によりエラーが生じたことを液晶表示装置などにより報知することができる。当該エラーは例えば不正なコマンドを受信したとき(暗号化されたコマンドが正しく復号化できなかったときを含む)に発生し、当該エラーは上記リセットスイッチにより解除される(メイン基板10からサブ基板20へリセットコマンドが送られる)。   There are also errors that occur in the sub-board 20. Although this error does not result in an inoperable state, the liquid crystal display device or the like can notify that an error has occurred due to the processing of the sub-board 20 itself. The error occurs, for example, when an invalid command is received (including when the encrypted command cannot be correctly decrypted), and the error is canceled by the reset switch (from the main board 10 to the sub board 20). Reset command).

また、メイン基板10は、通常状態、ボーナス成立状態、およびボーナス状態の間で遊技状態を移行させる制御を行うことがある(遊技状態移行制御機能)。遊技状態の移行条件は、1の条件が定められていてもよいし、複数の条件が定められていてもよい。複数の条件が定められている場合には、複数の条件のうち1の条件が成立したこと、あるいは複数の条件の全てが成立したことに基づいて、遊技状態を他の遊技状態へ移行させることができる。   Further, the main board 10 may perform control to shift the gaming state between the normal state, the bonus establishment state, and the bonus state (gaming state transition control function). As the game condition transition condition, one condition may be defined, or a plurality of conditions may be defined. When a plurality of conditions are established, transitioning the gaming state to another gaming state based on the fact that one of the plurality of conditions is satisfied or all of the plurality of conditions are satisfied Can do.

通常状態は、複数種類の遊技状態の中で初期状態に相当する遊技状態で、通常状態からはボーナス成立状態への移行が可能となっている。ボーナス成立状態は、内部抽選でビッグボーナスあるいはレギュラーボーナスに当選したことを契機として移行する遊技状態である。ボーナス成立状態では、通常状態における内部抽選でビッグボーナスが当選した場合、ビッグボーナスが入賞するまでビッグボーナスに対応する抽選フラグが当選状態に維持され、通常状態における内部抽選でレギュラーボーナスが当選した場合、レギュラーボーナスが入賞するまでレギュラーボーナスに対応する抽選フラグが当選状態に維持される。ボーナス状態では、ボーナス遊技によって払い出されたメダルの合計数により終了条件が成立したか否かを判断し、入賞したボーナスの種類に応じて予め定められた払出上限数を超えるメダルが払い出されると、ボーナス状態を終了させて、遊技状態を通常状態へ復帰させる。   The normal state is a game state corresponding to the initial state among a plurality of types of game states, and a transition from the normal state to the bonus establishment state is possible. The bonus establishment state is a gaming state that shifts when a big bonus or a regular bonus is won in the internal lottery. In the bonus establishment state, when the big bonus is won in the internal lottery in the normal state, the lottery flag corresponding to the big bonus is maintained in the winning state until the big bonus is won, and the regular bonus is won in the internal lottery in the normal state Until the regular bonus is won, the lottery flag corresponding to the regular bonus is maintained in the winning state. In the bonus state, it is determined whether or not the end condition is satisfied based on the total number of medals paid out by the bonus game, and medals exceeding a predetermined payout limit number are paid out according to the type of bonus won. The bonus state is terminated and the gaming state is returned to the normal state.

リールユニット203は、3つの回胴40a〜40cを備えるが、3つの回胴40a〜40cそれぞれにひとつづつステッピングモータ155a〜155cが取り付けられている。ステッピングモータ155は、回転子(ロータ)として歯車状の鉄心あるいは永久磁石を備え、固定子(ステータ)として複数の巻線(コイル)を備え、電流を流す巻線を切り替えることによって回転動作させるものである。すなわち、固定子の巻線に電流を流して磁力を発生させ、回転子を引きつけることで回転するものである。回転軸を指定された角度で停止させることが可能なことから、スロットマシンの回胴の回転駆動に使用されている。複数の巻線がひとつの相を構成する。相の数として、例えば、2つ(二相)、4つ(4相)、5つ(5相)のものもある。   The reel unit 203 includes three spinning cylinders 40a to 40c, and one stepping motor 155a to 155c is attached to each of the three spinning cylinders 40a to 40c. The stepping motor 155 includes a gear-shaped iron core or permanent magnet as a rotor (rotor), a plurality of windings (coils) as a stator (stator), and is rotated by switching windings through which current flows. It is. That is, a current is passed through the windings of the stator to generate a magnetic force, and the rotor is rotated by attracting the rotor. Since the rotation axis can be stopped at a specified angle, it is used to drive the rotation of the slot machine. A plurality of windings constitute one phase. As the number of phases, for example, there are two (two phases), four (four phases), and five (five phases).

ステッピングモータは、各相の巻線への電流の与え方を変えることにより、特性を変えることができる(励磁モードが変わる)。二相型については次の通りである。   The stepping motor can change its characteristics (excitation mode changes) by changing the way of applying current to the windings of each phase. The two-phase type is as follows.

・一相励磁
常に巻線一相のみに電流を流す。位置決め精度は良い。
• Single-phase excitation Always allow current to flow through only one phase of the winding. Positioning accuracy is good.

・二相励磁
二相に電流を流す。一相励磁の約2倍の出力トルクが得られる。位置決め精度は良く、停止したときの静止トルクが大きいため、停止位置を確実に保持できる。
・ Two-phase excitation
Current flows in two phases. An output torque approximately twice that of single-phase excitation can be obtained. The positioning accuracy is good and the stationary torque is large when stopped, so that the stop position can be held reliably.

・一−二相励磁
一相と二相を交互に切り替えて電流を流す。一相励磁・二相励磁の場合のステップ角度の半分にすることができるので、滑らかな回転を得られる。
・ One-two-phase excitation
A current is passed by alternately switching between one phase and two phases. Since the step angle can be halved in the case of one-phase excitation and two-phase excitation, smooth rotation can be obtained.

なお、ステッピングモータを「駆動する」とは、当該モータを上記励磁により回転させることとともに、所望の位置で停止させその位置を保持するために各相を励磁することも含むものとする。   Note that “driving” a stepping motor includes rotating the motor by the above-described excitation and exciting each phase in order to stop at a desired position and hold the position.

スロットマシンでは、例えば、4相の基本ステップ角度1.43度のステッピングモータを使用し、パルスの出力方法として一−二相励磁を採用している。   In the slot machine, for example, a four-phase stepping motor having a basic step angle of 1.43 degrees is used, and one-two-phase excitation is adopted as a pulse output method.

10CGは、サブ基板20へ送るコマンドを送信するコマンド送信部である。このコマンドには、当選役の情報に関するコマンド、メダル投入枚数やクレジット枚数(貯留枚数)の情報に関するコマンドなどがある。コマンド送信部10CGは、具体的には、メイン基板10に搭載されたROMに予め書き込まれたプログラムをCPUが実行することで実現される。コマンド送信については、後に説明を加える。   10CG is a command transmitter that transmits a command to be sent to the sub-board 20. This command includes a command related to winning combination information, a command related to information on the number of inserted medals and the number of credits (stored number). Specifically, the command transmission unit 10CG is realized by the CPU executing a program written in advance in a ROM mounted on the main board 10. The command transmission will be described later.

次に、メイン基板10における遊技処理について図4を参照して説明を加える。
一般的に、遊技機において、メダルの投入(クレジットの投入)に始まり、払い出しが終了するまで(又はクレジット数の増加が終了するまで)が一遊技である。一遊技が終了するまでは次回の遊技に進めないという決まりがある。
Next, the game processing in the main board 10 will be described with reference to FIG.
Generally, in a gaming machine, one game is started from the insertion of medals (insertion of credits) until the end of payout (or until the increase in the number of credits is completed). There is a rule that it is not possible to proceed to the next game until one game is finished.

先ず、規定枚数のメダルが投入されることでスタートスイッチ134が有効になり、図4の処理が開始される。   First, when a prescribed number of medals are inserted, the start switch 134 is activated, and the processing of FIG. 4 is started.

ステップS1において、スタートスイッチ134が操作されることにより、スタートスイッチ134がONとなる。そして、次のステップS2に進む。   In step S1, the start switch 134 is turned on by operating the start switch 134. Then, the process proceeds to the next step S2.

ステップS2において、メイン基板10により抽選処理が行われる。そして、次のステップS3に進む。   In step S2, a lottery process is performed by the main board 10. Then, the process proceeds to the next step S3.

ステップS3において、第1リール〜第3リールの回転が開始する。そして、次のステップS4に進む。   In step S3, the rotation of the first reel to the third reel starts. Then, the process proceeds to the next step S4.

ステップS4において、ストップボタン140が操作されることにより、ストップボタン140がONとなる。そして、次のステップS5に進む。   In step S4, when the stop button 140 is operated, the stop button 140 is turned ON. Then, the process proceeds to the next step S5.

ステップS5において、第1リール〜第3リールのうち押下されたストップボタン140に対応するリールについて回転停止処理が行われる。そして、次のステップS6に進む。   In step S5, rotation stop processing is performed on the reel corresponding to the pressed stop button 140 among the first to third reels. Then, the process proceeds to the next step S6.

ステップS6において、三個のリールに対応するストップボタン140の操作が行われたか否かが判定される。そして、三個のリールに対応する3つのストップボタン140すべての操作が行われたと判定された場合、次のステップS7に進む。   In step S6, it is determined whether or not the operation of the stop button 140 corresponding to the three reels has been performed. If it is determined that all three stop buttons 140 corresponding to the three reels have been operated, the process proceeds to the next step S7.

ステップS7において、抽選フラグ成立中に当該抽選フラグに対応する入賞図柄が有効入賞ライン上に揃ったか否か、すなわち、入賞が確定したか否かが判定される。そして、入賞が確定したと判定された場合、次のステップS8に進む。なお、入賞が確定しなかったときは、抽選フラグが成立していてもメダルの払い出しは行われない。   In step S7, it is determined whether or not the winning symbols corresponding to the lottery flag are aligned on the effective winning line while the lottery flag is established, that is, whether or not the winning is confirmed. If it is determined that the winning is confirmed, the process proceeds to the next step S8. If the winning is not confirmed, no medals are paid out even if the lottery flag is established.

ステップS8において、入賞図柄に相当するメダルが払い出される。   In step S8, medals corresponding to winning symbols are paid out.

メダルの投入からステップS8の実行完了までが、一遊技である。ステップS8の待機処理が終了すると、処理はフローチャートの最初に戻る。言い換えれば、次の遊技が可能な状態になる(次遊技へ移行する)。   The process from the insertion of the medal to the completion of the execution of step S8 is one game. When the standby process in step S8 ends, the process returns to the beginning of the flowchart. In other words, the next game is possible (transition to the next game).

<メイン基板からサブ基板へのコマンド伝送>
サブ基板20はメイン基板10からコマンドをうけ、これに従って演出等の処理を行う。コマンドの流れはメイン基板10からサブ基板20への一方のみであり、逆にサブ基板20からメイン基板10へコマンド等が出されることはない。
<Command transmission from main board to sub board>
The sub-board 20 receives a command from the main board 10 and performs processing such as rendering according to the command. Only one command flows from the main board 10 to the sub board 20, and conversely, no command is issued from the sub board 20 to the main board 10.

サブ基板20は、メイン基板10からのコマンドに従い、例えば、予め定められた画面を液晶表示装置LCDに表示させるためのコマンド(液晶表示装置用コマンド、描画コマンド)を生成する。例えば、アニメーションなどにより演出を行う際には、多数のコマンドを連続的に次々と送信する。   The sub-board 20 generates a command (liquid crystal display device command, drawing command) for displaying a predetermined screen on the liquid crystal display device LCD, for example, in accordance with a command from the main substrate 10. For example, when performing an effect by animation or the like, a large number of commands are continuously transmitted one after another.

図3において、20CRは、メイン基板10から受けたコマンドを受信するコマンド受信部である。コマンド受信部20CRは、具体的には、サブ基板20に搭載されたROMに予め書き込まれたプログラムをCPUが実行することで実現される。   In FIG. 3, 20 CR is a command receiving unit that receives a command received from the main board 10. Specifically, the command receiving unit 20CR is realized by the CPU executing a program written in advance in a ROM mounted on the sub-board 20.

上記コマンドとして、サブ基板20側のソフトウエアで当選内容を示唆する演出を行うためのものがある。例えば、下記ATのように、出玉を得るための示唆を液晶表示装置に表示して遊技者の操作の便宜の提供(アシスト)を図っている。当該示唆は常時出されるわけではなく、特定の場合に出される。   As the above-mentioned command, there is a command for performing an effect suggesting the winning contents by the software on the sub-board 20 side. For example, as shown in the following AT, a suggestion for obtaining a ball is displayed on a liquid crystal display device so as to provide (assist) the player with the convenience of operation. The suggestion is not always issued, but in specific cases.

遊技機は、液晶表示装置、スピーカや表示ランプ等からなる演出表示装置を備える。この演出表示装置はサブ基板20により制御され、遊技者に入賞等を報知したり、いわゆるアシストタイム(AT)において、一定ゲーム間に特定の小役を台自体が何らかのアクションを伴ってユーザに教えたりするためのものである。(アシストタイム(AT):特定の小役が成立しても遊技者がリールの図柄を揃えないと払い戻しがない。小役による払い出しを確実にするために、ビッグボーナス終了後(もしくは成立時)あるいはその他の任意の契機にアシストタイムを抽選し、これに当選すると一定ゲーム間は特定の小役を揃えさせるための操作を何らかのアクションを伴って遊技者に教えるという機能)   The gaming machine includes an effect display device including a liquid crystal display device, a speaker, a display lamp, and the like. This effect display device is controlled by the sub-board 20 to notify the player of a prize or the like, or in a so-called assist time (AT), the base itself teaches the user with some action during a certain game with some action. It is for doing. (Assist time (AT): Even if a specific small role is established, the player will not be refunded if the reels are not aligned. After the big bonus ends (or at the time of establishment) to ensure payout by the small role) Alternatively, a lottery of assist time is drawn at any other opportunity, and if this is won, the player is instructed to perform an operation with some action for aligning specific small roles during a certain game)

図5(c)は、本実施の形態に係るコマンド送信部10CGのブロック図である。   FIG. 5C is a block diagram of the command transmission unit 10CG according to the present embodiment.

101は、送信する前記コマンドを受け入れるコマンドレジスタである。コマンドレジスタ101は、コマンドを受けたらすぐに送信データレジスタ102へ送る。コマンドレジスタ101はひとつのコマンドを一時的に蓄えるものである。   Reference numeral 101 denotes a command register that accepts the command to be transmitted. The command register 101 sends the command to the transmission data register 102 immediately after receiving the command. The command register 101 temporarily stores one command.

コマンドは、所定ビットのひとまとまりのデータ、例えば8ビット単位のデータのセットであって、所定のコマンド体系に基づき作成されているものである。   The command is a set of data of a predetermined bit, for example, a set of data in units of 8 bits, and is created based on a predetermined command system.

102は、受け入れた順番で複数のコマンドを記憶するとともに、受け入れた順番に従って出力する送信データレジスタ(送信FIFO)である。   Reference numeral 102 denotes a transmission data register (transmission FIFO) that stores a plurality of commands in the accepted order and outputs them in accordance with the accepted order.

103は、送信データレジスタ102からコマンドの出力を受けてこれをサブ基板20へ送信する送信用シフトレジスタである。   Reference numeral 103 denotes a transmission shift register that receives a command output from the transmission data register 102 and transmits it to the sub-board 20.

メイン基板10は、生成したコマンドをコマンドレジスタ101にセットすることでサブ基板20へ送信する。   The main board 10 transmits the generated command to the sub board 20 by setting it in the command register 101.

コマンド受信部20CRは、メイン基板10から受けたコマンドを受信する。例えば、シリアルデータとして受けたコマンドを直列−並列変換器(シフトレジスタ)に入力し、一定のデータ(例えば8ビット)ごとに出力する。この出力されたデータがコマンドとしてサブ基板20のCPUに渡され、解釈・実行される。   The command receiving unit 20CR receives a command received from the main board 10. For example, a command received as serial data is input to a serial-parallel converter (shift register), and is output every certain data (for example, 8 bits). The output data is transferred to the CPU of the sub-board 20 as a command, and is interpreted and executed.

<サブ基板>
サブ基板20には液晶表示装置の制御用の液晶制御基板200、スピーカ基板201、LED基板202などの周辺基板(ローカル基板)が接続されている。さらに、可動体50を制御する可動体制御部60が接続されている。
<Sub-board>
A peripheral substrate (local substrate) such as a liquid crystal control substrate 200 for controlling the liquid crystal display device, a speaker substrate 201, and an LED substrate 202 is connected to the sub substrate 20. Furthermore, the movable body control part 60 which controls the movable body 50 is connected.

また、遊技者により操作される操作部PANの出力が接続されている。操作部PANは、例えばジョグダイヤルである。操作部PANからの信号は、図示いないI/Oを通じてサブ基板20のCPUに入力される。   Moreover, the output of the operation part PAN operated by the player is connected. The operation unit PAN is, for example, a jog dial. A signal from the operation unit PAN is input to the CPU of the sub-board 20 through an I / O (not shown).

図6は、サブ基板20とその周辺基板の接続の説明図である。図3に示すように、サブ基板20には、液晶制御基板200、スピーカ基板201、LED基板202、可動体制御部60が接続されている。これらは、サブ基板20の周辺基板と言うべきものである。   FIG. 6 is an explanatory diagram of the connection between the sub-board 20 and its peripheral board. As shown in FIG. 3, a liquid crystal control board 200, a speaker board 201, an LED board 202, and a movable body control unit 60 are connected to the sub board 20. These should be called peripheral substrates of the sub-substrate 20.

これら複数の周辺基板は、図6のように接続されている(LED基板202と可動体制御部60の表示は省略している)。すなわち、複数の周辺基板が共通のバス(通信回線、通信路)に接続され、当該バスを通じてサブ基板20と通信を行う。当該バスを流れる信号は、パラレル信号(例えば8ビットの線で信号を伝送するもの)あるいはシリアル信号(例えば、I2C(Inter-Integrated Circuit)のようにデータ線とクロック線の2本の線で信号を伝送するもの)である。以下の説明ではシリアル通信を例にとる。なお、図5(c)の例ではサブ基板20から出た信号がサブ基板20に戻っているが、これは一例であり、一般的なバス構造のように接続端の反対側の端が開放されていてもよい。   The plurality of peripheral boards are connected as shown in FIG. 6 (the display of the LED board 202 and the movable body controller 60 is omitted). That is, a plurality of peripheral boards are connected to a common bus (communication line, communication path), and communicate with the sub-board 20 through the bus. The signal flowing through the bus is a signal on two lines, a data line and a clock line, such as a parallel signal (for example, a signal transmitted by an 8-bit line) or a serial signal (for example, I2C (Inter-Integrated Circuit)). ). In the following description, serial communication is taken as an example. In the example of FIG. 5C, the signal output from the sub-board 20 returns to the sub-board 20, but this is an example, and the end opposite to the connection end is opened as in a general bus structure. May be.

液晶制御基板200はVDP(Video Display Processor)を内蔵し、スピーカ基板201はサウンドコントローラを内蔵している。VDPとサウンドコントローラについては後に説明する。   The liquid crystal control board 200 has a built-in VDP (Video Display Processor), and the speaker board 201 has a built-in sound controller. The VDP and sound controller will be described later.

サブ基板20から周辺基板へは、アドレスを指定してデータを送る。例えば、周辺基板としての液晶制御基板200へデータを送る場合は、液晶制御基板200に予め対応づけられているアドレスを指定してデータをバスに流す。液晶制御基板200は、アドレスにより自分宛のデータであることを認識すると、アドレスに引き続くデータをラッチに取り込む。取り込んだデータに従って所定の動作を行う。取り込んだデータが、液晶制御基板200で取得したあるいは取得可能なデータをサブ基板20へ送信するコマンドであれば、当該データをサブ基板20へ送信する(所定のデータ受信後は、予め定められたデータを常にサブ基板20へ送信するようにすることもできる)。   Data is transmitted from the sub board 20 to the peripheral board by designating an address. For example, when data is sent to the liquid crystal control board 200 as a peripheral board, an address previously associated with the liquid crystal control board 200 is designated and the data is sent to the bus. When the liquid crystal control board 200 recognizes that the data is addressed to itself by the address, the liquid crystal control board 200 takes in the data following the address into the latch. A predetermined operation is performed according to the fetched data. If the fetched data is a command for transmitting data acquired or obtainable by the liquid crystal control board 200 to the sub-board 20, the data is sent to the sub-board 20 (after receiving predetermined data, it is determined in advance. Data can always be transmitted to the sub-board 20).

スピーカ基板201も、液晶制御基板200と同様に動作する。   The speaker substrate 201 operates in the same manner as the liquid crystal control substrate 200.

以下の説明では、送信先を特定することなく、液晶制御基板200、スピーカ基板201などの任意の送信先について適用する動作であるとき、主に「周辺基板」という用語を用いる。どの周辺基板へのデータ送信であるか特定する必要があるときは、「液晶制御基板200」というように具体的に特定するものとする。   In the following description, the term “peripheral board” is mainly used when the operation is applied to an arbitrary transmission destination such as the liquid crystal control board 200 and the speaker board 201 without specifying the transmission destination. When it is necessary to specify to which peripheral substrate the data transmission is to be made, it is specifically specified as “liquid crystal control substrate 200”.

周辺基板へのデータ送信に際して、サブ基板20は0又は1のデータが複数集まったデータ(例えば8ビットのデータ)を単位として処理を行う。また、サブ基板20は周辺基板へ、これに所定の動作を行わせるためのコマンド(命令)を送信するが、本明細書において上記データにはコマンドを含む。なお、コマンドは、所定ビットのひとまとまりのデータ、例えば8ビット単位のデータのセットであって、所定のコマンド体系に基づき作成されているものである。   When transmitting data to the peripheral board, the sub-board 20 performs processing in units of data (for example, 8-bit data) in which a plurality of 0 or 1 data is collected. The sub-board 20 transmits a command (command) for causing the sub-board 20 to perform a predetermined operation. In this specification, the data includes the command. Note that the command is a set of predetermined bits of data, for example, a set of data in units of 8 bits, and is created based on a predetermined command system.

以下の説明では主に「データ」という用語を用いるが、周辺機器への命令であることを明確にするために「コマンド」という用語を用いることもある。   In the following description, the term “data” is mainly used, but the term “command” may be used to clarify that the instruction is a command to the peripheral device.

液晶制御基板200、スピーカ基板201などの周辺機器へデータを送るために、サブ基板20はデータ送信部20TXを備える。
図7は、データ送信部20TXの内部ブロック図を示す。データ送信部20TXは、具体的には、サブ基板20に搭載されたROMに予め書き込まれたプログラムをCPUが実行することで実現される。
In order to send data to peripheral devices such as the liquid crystal control board 200 and the speaker board 201, the sub board 20 includes a data transmission unit 20TX.
FIG. 7 shows an internal block diagram of the data transmitter 20TX. Specifically, the data transmission unit 20TX is realized by the CPU executing a program written in advance in a ROM mounted on the sub-board 20.

2101は、周辺基板へ送信するデータを受け入れるデータレジスタ(コマンドレジスタ)である。データレジスタ2101は、データを受けたらすぐに送信データレジスタ2102へ送る。データレジスタ2101はひとつの単位のデータを一時的に蓄えるものである。なお、データの内容は公知であるので、送信されるデータがどのようなものであるかについての説明は省略する。   Reference numeral 2101 denotes a data register (command register) that receives data to be transmitted to the peripheral board. The data register 2101 sends the data to the transmission data register 2102 immediately after receiving the data. The data register 2101 temporarily stores one unit of data. In addition, since the content of data is well-known, description about what kind of data is transmitted is abbreviate | omitted.

2102は、受け入れた順番で複数のデータを記憶するとともに、受け入れた順番に従って出力する送信データレジスタである。   Reference numeral 2102 denotes a transmission data register that stores a plurality of data in the accepted order and outputs them in accordance with the accepted order.

2103は、送信データレジスタ2102からデータの出力を受けてこれを周辺基板へ送信する送信用シフトレジスタである。送信用シフトレジスタ103は、送信すべきデータをパラレルからシリアルへ変換する。   Reference numeral 2103 denotes a transmission shift register which receives data output from the transmission data register 2102 and transmits it to the peripheral board. The transmission shift register 103 converts data to be transmitted from parallel to serial.

図8は、データ(コマンド)送信とこれを受けた液晶制御基板200とスピーカ基板201の動作の概略の説明図である。
サブ基板20は、液晶制御基板200とスピーカ基板201それぞれへ画像データと音声データを送る(符号PとR)。画像データを受けて液晶制御基板200は所定の画面を表示し(符号Q)、音声データを受けてスピーカ基板201は所定の音声を発生する(符号S)。音声に限らずBGM、効果音などその他の音響も発生するが、便宜上これらも音声に含める。音声・音声データは、音響・音響データと言える。特に断らない限り、本明細書において「音声」には、通常の意味の音声とともにBGM、効果音などその他の音響も含むものとする。
FIG. 8 is a schematic explanatory diagram of data (command) transmission and operations of the liquid crystal control board 200 and the speaker board 201 that have received the data (command) transmission.
The sub board 20 sends image data and audio data to the liquid crystal control board 200 and the speaker board 201, respectively (reference characters P and R). In response to the image data, the liquid crystal control board 200 displays a predetermined screen (symbol Q), and in response to the audio data, the speaker board 201 generates a predetermined sound (symbol S). Other sounds such as BGM and sound effects are generated in addition to the sound, but these are also included in the sound for convenience. Voice / voice data can be said to be acoustic / acoustic data. Unless otherwise specified, in this specification, “sound” includes other sounds such as BGM and sound effects as well as sound of normal meaning.

また、サブ基板20は、可動体制御部60へ可動体50の制御データを送る(符号TとU)。   Further, the sub-board 20 sends control data of the movable body 50 to the movable body control unit 60 (reference numerals T and U).

図8からわかるように、サブ基板20によるコマンド送信−>周辺基板によるコマンドの実行・画面表示や音声発生などの提示という流れになっている。サブ基板20が制御できるのはどのようなコマンドをどの周辺基板へ、どのタイミングで送るということであり、画面表示や音声発生などの提示をどのタイミングで行え、ということは指定できない。このためコマンドの送信タイミングは、周辺基板ごとに適切に管理する必要がある。   As can be seen from FIG. 8, the command transmission by the sub-board 20 → the execution of the command by the peripheral board, the screen display, the voice generation, etc. The sub-board 20 can control what command is sent to which peripheral board at which timing, and it cannot be specified at what timing the presentation of screen display or voice generation can be performed. For this reason, it is necessary to appropriately manage the command transmission timing for each peripheral board.

<画面表示と音声発生に係る構成>
遊技機における画面表示と音声発生に係る構成について説明を加える。以下の説明においては便宜上、メモリ上に描画されたものを画像と表示し、メモリを読み出して液晶表示装置LCDに表示すべきものを画面と表記することにする。概ね、ビットマップで表現されたキャラクタなどのオブジェクトは画像であり、オブジェクトが背景上に配置されて1枚の絵となったものは画面である。
<Configuration related to screen display and sound generation>
The configuration related to screen display and sound generation in the gaming machine will be described. In the following description, for the sake of convenience, what is drawn on the memory is displayed as an image, and what is to be read out and displayed on the liquid crystal display device LCD is referred to as a screen. In general, an object such as a character represented by a bitmap is an image, and a screen in which an object is arranged on a background and becomes a single picture is a screen.

図9は、VDPの構造の概略図である。VDPは、液晶制御基板に設けられたLSIであり、CPUとのインタフェースI/F、CPUからのコマンドに従い画像を描画する描画エンジンE1、描画した画像を記憶するビデオメモリVRAM、及び、ビデオメモリVRAMに記憶された画像を読み出して液晶表示装置LCDへ送る表示エンジンE2を備える。これらの各要素は、内部のバスBUSに接続され、相互にデータを読み書きできるようになっている。インタフェースI/Fは、CPUからコマンドなどのデータを受けるとともに、表示エンジンE2などからの割り込み信号をCPUへ出力することもできる。このVDPは、例えば、XGAサイズの解像度(1024×768ピクセルの解像度)で毎秒60フレームの描画及び表示が可能である。   FIG. 9 is a schematic diagram of the structure of the VDP. The VDP is an LSI provided on the liquid crystal control board, an interface I / F with the CPU, a drawing engine E1 that draws an image according to a command from the CPU, a video memory VRAM that stores the drawn image, and a video memory VRAM Is provided with a display engine E2 for reading out the image stored in the memory and sending it to the liquid crystal display device LCD. Each of these elements is connected to an internal bus BUS so that data can be read from and written to each other. The interface I / F can receive data such as commands from the CPU and can also output an interrupt signal from the display engine E2 or the like to the CPU. This VDP can draw and display 60 frames per second at an XGA size resolution (1024 × 768 pixel resolution), for example.

毎秒60フレーム(=60fps)で描画及び表示する場合、1フレームの時間は16.67msである。これをフレーム時間と記すことにする。また、2つの連続するフレームをVフレームと呼ぶことにする。フレーム×2=Vフレーム×1である。Vフレームの時間は33.33msであり、その画面更新レート(更新周波数)は30fpsである。フレーム、Vフレームは、表示の単位及び処理の単位であるが、以下の説明においては、当該フレーム、Vフレームにおけるデータ、処理結果(描画された画像)、液晶表示装置LCDに表示された画像を意味することがある。例えば、Vフレーム1などのように数字(符号)が付されている場合は、特定のVフレームを示すと共にこれに対応する描画データ、画像データ、表示データを意味することがある。   When drawing and displaying at 60 frames per second (= 60 fps), the time for one frame is 16.67 ms. This is referred to as frame time. Two consecutive frames are referred to as V frames. Frame × 2 = V frame × 1. The time of the V frame is 33.33 ms, and the screen update rate (update frequency) is 30 fps. The frame and the V frame are a display unit and a processing unit. In the following description, the data in the frame and the V frame, the processing result (drawn image), and the image displayed on the liquid crystal display device LCD are displayed. It may mean. For example, when a number (symbol) is added, such as V frame 1, it indicates a specific V frame and may mean drawing data, image data, and display data corresponding to the specific V frame.

液晶表示装置LCDの制御は、描画データ(液晶表示装置に対するコマンド、動画デコード情報などを含む)の保存、描画データに基づく描画実行、描画された画像の表示実行の3段階で行われる。すなわち、CPUがVDPへ描画データを送り、VDPの描画エンジンE1が描画を実行し、表示エンジンE2が液晶表示装置LDCでの画像表示を行う。この3段階の処理はそれぞれ並列(独立)に実行される。画像表示までに3段階を要するため、ある画像が表示されているタイミング(Vフレーム)において、描画実行は次のVフレームで表示されるべき画像を描画し、描画データの保存は次の次のVフレームで表示されるべき画像を保存していることになる。その様子を図10に示す。   The liquid crystal display device LCD is controlled in three stages: drawing data (including commands for the liquid crystal display device, moving image decoding information, etc.), drawing execution based on the drawing data, and display execution of the drawn image. That is, the CPU sends drawing data to the VDP, the drawing engine E1 of the VDP executes drawing, and the display engine E2 displays an image on the liquid crystal display device LDC. These three stages of processing are executed in parallel (independently). Since three stages are required until the image is displayed, at the timing when a certain image is displayed (V frame), the drawing execution draws an image to be displayed in the next V frame, and the storage of the drawing data is performed next. The image to be displayed in the V frame is saved. This is shown in FIG.

描画データの保存、描画実行、及び、表示実行は、ひとつのVフレームについて1回の周期で実行判定がなされる。言い換えれば、描画データの保存(第1処理)、描画実行(第2処理)、表示実行(第3処理)は、それぞれVフレームを単位として実行される(正確には、Vフレームに含まれるフレーム単位で処理が行われる、例えば、Vフレーム更新中にデータ入力があった場合、Vフレームの2つのフレームの一方において入力されたデータに係る描画データの保存、描画実行、表示実行が行われる)。したがって、本遊技機の液晶表示装置LCDの更新周波数は30fpsである。なお、これは原則であって、fpsは処理状況に応じて変化し得る。   Whether to save drawing data, execute drawing, and execute display is determined in one cycle for one V frame. In other words, drawing data storage (first processing), drawing execution (second processing), and display execution (third processing) are each performed in units of V frames (more precisely, frames included in the V frames). Processing is performed in units. For example, when there is data input during V frame update, drawing data related to data input in one of the two frames of V frame is saved, drawn, and displayed) . Therefore, the update frequency of the liquid crystal display device LCD of this gaming machine is 30 fps. This is a principle, and fps can change depending on the processing status.

描画データを保存してからその表示を実行するまでには、2つのVフレームに相当する時間を要する。例えば、図10では、符号T1で書き込んだ描画データは、それよりもVフレーム2つ分遅れた符号T3において表示される。ただし、描画データの保存、描画実行、表示実行はそれぞれ並列に実行されるため、液晶表示装置LCDの画像はVフレーム単位で更新される。図10の例では、表示に関して、符号T3,T4、・・・においてVフレーム1、Vフレーム2、・・・のように更新されている。   It takes a time corresponding to two V frames from saving the drawing data to executing the display. For example, in FIG. 10, the drawing data written with the code T1 is displayed with the code T3 delayed by two V frames. However, since storage of drawing data, execution of drawing, and execution of display are executed in parallel, the image on the liquid crystal display device LCD is updated in units of V frames. In the example of FIG. 10, the display is updated as V frame 1, V frame 2,.

図11は、サウンドコントローラSCの内部ブロック図を示す。同図は概念図であり、動作の説明に必要な部分のみを示している。   FIG. 11 shows an internal block diagram of the sound controller SC. This figure is a conceptual diagram, and shows only the parts necessary for explaining the operation.

SC1は、予め再生の順番が定められ、続けて再生される複数のサウンドデータを含むフレーズデータを予め記憶するフレーズデータ記憶部である。   SC1 is a phrase data storage unit that stores in advance phrase data including a plurality of sound data to be reproduced in a predetermined order of reproduction.

SC2は、フレーズデータをデコードして音響を再生するデコーダである。デコーダは、所定のサウンドデータ(例えばWAV)を音響に戻すものであり、この処理は公知であるので説明は省略する。   SC2 is a decoder that reproduces sound by decoding phrase data. The decoder returns predetermined sound data (for example, WAV) to sound, and since this process is well known, the description thereof is omitted.

SC3は、デコーダSC2で再生された音響の音量を調整する音量調整部である。音量調整部SC3はデジタル又はアナログ回路で構成される。その入力がデジタル信号のときはデジタル回路、例えば乗算器で構成され、ボリュームの値を音響デジタルデータに乗算することで音量を調整する。その入力がアナログ信号のときはアナログ回路、例えば増幅器で構成され、当該増幅器の増幅率(可変抵抗器)を変えることで音量を調整する。音量調整部SC3の出力はスピーカSPへ送られる。   SC3 is a volume adjusting unit that adjusts the volume of the sound reproduced by the decoder SC2. The volume adjustment unit SC3 is configured by a digital or analog circuit. When the input is a digital signal, it is constituted by a digital circuit, for example, a multiplier, and the volume is adjusted by multiplying the value of the volume by the acoustic digital data. When the input is an analog signal, it is constituted by an analog circuit, for example, an amplifier, and the volume is adjusted by changing the amplification factor (variable resistor) of the amplifier. The output of the volume adjuster SC3 is sent to the speaker SP.

図12(a)はフレーズデータ記憶部SC1の記憶内容の概略を示すものである。演出A,B,C,D,・・・のように複数の演出があるときそれぞれに対応してサウンドフレーズ(音声データ)を記憶している。サウンドフレーズの数には上限があり、例えば255個のサウンドフレーズを記憶することができる。   FIG. 12A shows an outline of the contents stored in the phrase data storage unit SC1. When there are a plurality of effects such as effects A, B, C, D,..., A sound phrase (audio data) is stored corresponding to each. There is an upper limit on the number of sound phrases, and for example, 255 sound phrases can be stored.

図12(b)は演出Aの音声データ(例えばWAV)の構造を示すものである。演出Aは3つのサウンド、すなわち第1サウンド(カットイン音)、第2サウンド(キャラボイス)、第3サウンド(発展音)から構成されている。   FIG. 12B shows the structure of audio data (for example, WAV) of effect A. The production A is composed of three sounds, that is, a first sound (cut-in sound), a second sound (character voice), and a third sound (developed sound).

カットイン音とは、あるショット(場面)に別のショットを挿入するカットインに対応付けられているサウンドである。キャラボイスとは、画面に表示されているキャラクタの台詞のサウンドである。発展音とは、演出の最後に、別の演出に発展する場合に加えられるサウンドである。   The cut-in sound is a sound associated with a cut-in that inserts another shot into a certain shot (scene). The character voice is the sound of the dialogue of the character displayed on the screen. The development sound is a sound that is added when the production develops to another production at the end of the production.

サブ基板20はスピーカ基板201へ、例えば図12(b)の演出Aのカットイン音を再生するデータ、キャラボイスを再生するデータ、発展音を再生するデータをそれぞれ送信する。これら3つのデータ(コマンド)を受けて、サウンドコントローラSCが所定のサウンドを発生する。   The sub board 20 transmits, for example, data for reproducing the cut-in sound of effect A in FIG. 12B, data for reproducing the character voice, and data for reproducing the developed sound, to the speaker board 201, for example. In response to these three data (commands), the sound controller SC generates a predetermined sound.

<可動体>
図13は、本実施の形態に係る可動体50の概略図である。同図(a)は上面図、同図(b)は正面図、同図(c)はB−B矢視断面図、同図(d)はA−A矢視断面図である。なお、同図ではステッピングモータ54を含む駆動部と、インデックス56及びインデックスセンサ57は右側のシャッター51Rにのみ示されているが、同じものが左側のシャッター51Lについても設けられている(左側のものについての図示は省略されている)。
<Movable body>
FIG. 13 is a schematic diagram of the movable body 50 according to the present embodiment. 4A is a top view, FIG. 2B is a front view, FIG. 4C is a cross-sectional view taken along the line BB, and FIG. 4D is a cross-sectional view taken along the line A-A. In the figure, the drive unit including the stepping motor 54, the index 56, and the index sensor 57 are shown only for the right shutter 51R, but the same is provided for the left shutter 51L (the left one). Is not shown).

可動体50は、左側のシャッター51L及び右側のシャッター51Rと、シャッター51L及び51Rの上端及び下端をそれぞれ摺動自在に保持する上側のレール52U及び下側のレール52Lと、可動体50の内側に下側のレール52Lと平行に設けられたラック53aと、これにかみ合うピニオン53bと、ピニオン53bがその回転軸に直接あるいは図示しない減速歯車機構を介して取り付けられたステッピングモータ54と、右側のシャッター51Rの内側に取り付けられたブラケット55(腕金・張り出し金具であるブラケット55はステッピングモータ54の取り付け台座でもある)と、右側のシャッター51Rの内側に取り付けられたインデックス56と、インデックス56を検知するインデックスセンサ57とを備える。同図では、ピニオン53b〜インデックス56を右側のシャッター51Rについて示しているが、左側のシャッター51Lについても同様の構造であり、その説明は省略する。   The movable body 50 includes a left shutter 51L and a right shutter 51R, an upper rail 52U and a lower rail 52L that slidably hold upper and lower ends of the shutters 51L and 51R, and an inner side of the movable body 50. A rack 53a provided in parallel with the lower rail 52L, a pinion 53b meshing with the rack 53a, a stepping motor 54 with the pinion 53b attached to its rotating shaft directly or via a reduction gear mechanism (not shown), and a right shutter The bracket 55 attached to the inside of the 51R (the bracket 55 which is an arm bracket / extrusion bracket is also an attachment base of the stepping motor 54), the index 56 attached to the inside of the right shutter 51R, and the index 56 are detected. And an index sensor 57. In the drawing, the pinion 53b to the index 56 are shown for the right shutter 51R, but the left shutter 51L has the same structure, and the description thereof is omitted.

同図(b)は、シャッター51L及び51Rをそれぞれ両側へ一杯に開いた状態をしめしており、同図の例では当該状態においてインデックスセンサ57はインデックス56を検知する。インデックスセンサ57は、例えばフォトインタラプタのような光学式あるいはマイクロスイッチのような接触式などのセンサである。シャッター51L及び51Rの移動可能な範囲は同じであり、中間点までしか移動できない。同図(b)の0、50、100の数字は移動範囲を示す。シャッター51Lは左側の0から中央の100まで移動可能であり、シャッター51Rは右側の0から中央の100まで移動可能である。そして、インデックスセンサ57は、シャッター51L、51Rが「0」の位置に来たことを検知するものである。すなわち、図14(a)に示すように、シャッター51L、51Rが一杯に開いたとき(下限に達したとき)にその端が「0」の位置にあり、図14(b)に示すように、シャッター51L、51Rが完全に閉じたとき(上限に達したとき)にその端が「100」の位置にある。シャッター51L、51Rが完全に閉じると、液晶表示装置LCDは全く見えなくなる。   FIG. 5B shows a state in which the shutters 51L and 51R are fully opened on both sides, and in the example of the figure, the index sensor 57 detects the index 56 in this state. The index sensor 57 is an optical sensor such as a photo interrupter or a contact sensor such as a microswitch. The movable range of the shutters 51L and 51R is the same and can move only to the middle point. The numbers 0, 50, and 100 in FIG. The shutter 51L can move from 0 on the left side to 100 in the center, and the shutter 51R can move from 0 on the right side to 100 in the center. The index sensor 57 detects that the shutters 51L and 51R have come to the “0” position. That is, as shown in FIG. 14A, when the shutters 51L and 51R are fully opened (when the lower limit is reached), the end is at the position “0”, and as shown in FIG. 14B. When the shutters 51L and 51R are completely closed (when the upper limit is reached), the end is at the position “100”. When the shutters 51L and 51R are completely closed, the liquid crystal display device LCD is completely invisible.

ラック53aとピニオン53bは、回転力を直線の動きに変換する機構である。ピニオン53bは小口径の円形歯車であり、ラック53aは平板状の棒に歯切りをした(歯がつけられた)ものである。ステッピングモータ54によりピニオン53bに回転力を加えると、シャッター51L,51Rがラック53a上を水平方向に動く。図13によれば、ラック53aは可動体50のフレームに固定され、ステッピングモータ54はブラケット55によりシャッター51L,51Rに取り付けられているから、シャッター51L,51Rのほうが動く。   The rack 53a and the pinion 53b are mechanisms that convert the rotational force into a linear motion. The pinion 53b is a small-diameter circular gear, and the rack 53a is formed by cutting a tooth on a flat bar (toothed). When a rotational force is applied to the pinion 53b by the stepping motor 54, the shutters 51L and 51R move horizontally on the rack 53a. According to FIG. 13, since the rack 53a is fixed to the frame of the movable body 50 and the stepping motor 54 is attached to the shutters 51L and 51R by the bracket 55, the shutters 51L and 51R move.

ステッピングモータは、回転子(ロータ)として歯車状の鉄心あるいは永久磁石を備え、固定子(ステータ)として複数の巻線(コイル)を備え、電流を流す巻線を切り替えることによって回転動作させるものである。すなわち、固定子の巻線に電流を流して磁力を発生させ、回転子を引きつけることで回転するものである。回転軸を指定された角度で停止させることが可能なことから、スロットマシンのリールの回転駆動に使用されている。複数の巻線がひとつの相を構成する。相の数として、例えば、2つ(二相)、4つ(4相)、5つ(5相)のものもある。ステッピングモータのコイルに所定の順番で電流を流すことでモータの軸は回転し、逆の順番で電流を流すとモータの軸は逆回転する。   A stepping motor includes a gear-shaped iron core or permanent magnet as a rotor (rotor), a plurality of windings (coils) as a stator (stator), and is rotated by switching windings through which current flows. is there. That is, a current is passed through the windings of the stator to generate a magnetic force, and the rotor is rotated by attracting the rotor. Since the rotation axis can be stopped at a specified angle, it is used to drive the rotation of the reel of the slot machine. A plurality of windings constitute one phase. As the number of phases, for example, there are two (two phases), four (four phases), and five (five phases). The motor shaft rotates by passing a current through the coil of the stepping motor in a predetermined order, and the motor shaft rotates reversely when a current is passed in the reverse order.

図15は、可動体制御部のブロック図である。   FIG. 15 is a block diagram of the movable body control unit.

61は、駆動信号生成部63によりステッピングモータ(駆動部)54へ与えられる駆動信号に基づきシャッター(可動要素)51L,51Rの位置情報(プログラム上の位置情報)を算出する位置情報算出部である。例えば、シャッター51L,51Rをプラス方向へ単位距離だけ動かすパルス信号(ステッピングモータ54の複数のコイルに順番に電流を流すための信号)がステッピングモータ54に与えられたとき、現在の位置情報を+1する。マイナス方向のパルス信号のときは、現在の位置情報を−1する。   A position information calculation unit 61 calculates position information (position information on the program) of the shutters (movable elements) 51L and 51R based on a drive signal given to the stepping motor (drive unit) 54 by the drive signal generation unit 63. . For example, when a pulse signal for moving the shutters 51L and 51R by a unit distance in the plus direction (a signal for causing current to flow sequentially through the coils of the stepping motor 54) is given to the stepping motor 54, the current position information is incremented by +1. To do. When the pulse signal is in the minus direction, the current position information is decremented by one.

62は、シャッター(可動要素)51L,51Rの目標位置を設定する目標位置設定部である。ステッピングモータ54は、シャッター51L,51Rを目標位置まで動かし、そこに到達したら停止する。   A target position setting unit 62 sets target positions of the shutters (movable elements) 51L and 51R. The stepping motor 54 moves the shutters 51L and 51R to the target position and stops when reaching the target position.

63は、目標位置設定部62の目標位置と位置情報算出部61の位置情報を比較し、この比較結果に基づきシャッター(可動要素)51L,51Rを目標位置へ移動させるための駆動信号を生成する駆動信号生成部である。例えば、現在の位置情報が目標位置よりも小さいとき、シャッター51L,51Rをプラス方向へ動かすパルスを生成し、逆に大きいときマイナス方向へ動かすパルスを生成する。   63 compares the target position of the target position setting unit 62 with the position information of the position information calculation unit 61, and generates a drive signal for moving the shutters (movable elements) 51L and 51R to the target position based on the comparison result. It is a drive signal generation part. For example, when the current position information is smaller than the target position, a pulse for moving the shutters 51L and 51R in the positive direction is generated. On the other hand, when the current position information is larger, a pulse for moving in the negative direction is generated.

64は、位置情報算出部61の位置情報の算出の基準となる最初の値として、上限よりも大きな値(例えば「200」)又は下限よりも小さな値(例えば「−50」)を設定する位置情報初期設定部である。   64 is a position where a value larger than the upper limit (for example, “200”) or a value smaller than the lower limit (for example, “−50”) is set as the first value serving as a reference for calculating the position information of the position information calculating unit 61. It is an information initial setting unit.

シャッター(可動要素)51L,51Rに対する制御を開始する際において、その目標位置は、インデックスセンサ57からインデックス信号が出力される位置(上記例では「0」)に設定されるとともに、位置情報算出部61の位置情報は、その算出の基準となる最初の値として上限(上記例では「100」)と下限(上記例では「0」)の範囲外である値(例えば「200」「−50」)に設定される。これに従い、シャッター51L,51Rはインデックス信号が出力される位置へ向けて移動させられる。そして、インデックス信号が出力されたときに、位置情報算出部61の位置情報は予め定められた初期値(上記例では「0」)に設定される。   When starting control of the shutters (movable elements) 51L and 51R, the target position is set to a position where the index signal is output from the index sensor 57 (“0” in the above example), and the position information calculation unit The position information 61 is a value (for example, “200” “−50”) that is outside the upper limit (“100” in the above example) and the lower limit (“0” in the above example) as the first value serving as a reference for calculation. ). Accordingly, the shutters 51L and 51R are moved toward the position where the index signal is output. When the index signal is output, the position information of the position information calculation unit 61 is set to a predetermined initial value (“0” in the above example).

図16は、図13の可動体演出処理のフローチャートである。   FIG. 16 is a flowchart of the movable body effect process in FIG.

図4で示した遊技のフローチャートに従えば、スタートスイッチ押下後の同図のS2からS7の範囲で可動体50による演出が行われる。この期間において所定の条件が揃うと、図16の処理が起動される。   According to the game flow chart shown in FIG. 4, the effect by the movable body 50 is performed in the range of S2 to S7 in FIG. When predetermined conditions are met during this period, the process of FIG. 16 is started.

S10:可動体制御部60がサブ基板10から可動体演出に係る開始コマンドを受ける。 S10: The movable body control unit 60 receives a start command related to the movable body effect from the sub-board 10.

S11:可動体50の動作内容を決定する。すなわち、可動要素51L,51Rの移動先(目標位置)を決定する。 S11: The operation content of the movable body 50 is determined. That is, the movement destinations (target positions) of the movable elements 51L and 51R are determined.

S12:可動体駆動処理を行う。 S12: A movable body drive process is performed.

S13:可動体演出を中止させるための割り込みの有無を判定する。当該割り込みが発生したら(YES)、ただちに可動体演出を中止する。 S13: It is determined whether or not there is an interruption for stopping the movable body effect. When the interruption occurs (YES), the movable body effect is stopped immediately.

次遊技に係るメダル投入が行われたとき、可動体演出は中止される。
可動体の演出が1回の遊技に対応付けられている場合には、可動体演出の中止に伴い初期化動作を行い、可動体を初期位置(例えば0)に戻す。
When the medal insertion related to the next game is performed, the movable body effect is stopped.
When the effect of the movable body is associated with one game, the initialization operation is performed with the suspension of the movable body effect, and the movable body is returned to the initial position (for example, 0).

S14:可動体の動作が終了したかどうか判定する。プログラム上の位置情報が目標位置になったとき(YES)、その動作を終了する。そうでないとき(NO)、可動体駆動処理S12を繰り返す。 S14: It is determined whether the operation of the movable body is finished. When the position information on the program reaches the target position (YES), the operation is terminated. Otherwise (NO), the movable body driving process S12 is repeated.

<周辺基板の制御におけるメイン処理と割込処理の関係>
サブ基板が周辺基板である可動体制御部60を制御する場合、可動体50の制御対象であるモータやソレノイドなどに対して、サブ基板20からの図6の通信系を介して可動体制御部60へコマンドを送る。
<Relationship between main processing and interrupt processing in peripheral board control>
When controlling the movable body control unit 60 in which the sub board is a peripheral board, the movable body control unit is controlled from the sub board 20 via the communication system of FIG. Send command to 60.

周辺基板に対して、具体的には次のような処理を行う。
・動作させたい制御内容の動作テーブル(制御データ)のポインタを設定する。
・設定されたポインタからそのテーブルの終端まで実行する。また、動作状況に応じて変化する動作状況テーブル(例えばモータテーブル)を更新する。テーブルの処理を実行中にポインタが再設定された場合には、再設定された設定ポインタに実行を切り替える。
・テーブル更新状態を確認し、データテーブルのポインタ再設定などを行う。
Specifically, the following processing is performed on the peripheral substrate.
-Set the pointer of the operation table (control data) of the control details you want to operate.
• Executes from the set pointer to the end of the table. Further, an operation status table (for example, a motor table) that changes according to the operation status is updated. If the pointer is reset during the table processing, execution is switched to the reset pointer.
-Check the table update status and reset the data table pointer.

上記処理を行うに際して、プログラムのメインルーチン(メイン処理)と割込処理ごとに役割を分担させている。この概念を図17に示す。この図は可動体の制御について示している。他の周辺基板についても同様である(周辺基板からサブ基板へのフィードバックがない場合もある)。実線は処理を示し、点線はパラメータを示す。図17の処理の全部がサブ基板20で行われること、その一部が周辺基板で行われることのいずれもある。   In performing the above processing, the role is assigned to each of the main routine (main processing) of the program and the interrupt processing. This concept is illustrated in FIG. This figure shows the control of the movable body. The same applies to other peripheral boards (there may be no feedback from the peripheral board to the sub-board). Solid lines indicate processing, and dotted lines indicate parameters. All of the processing of FIG. 17 is performed on the sub-substrate 20 and part of it is performed on the peripheral substrate.

なお、メイン処理の処理間隔である第1周期と、割込処理の処理間隔である第2周期とは異なることが多い。例えば、第1周期>第2周期であり、一例として、第1周期=33.3ms(30fps)、第2周期=2.08ms(480fps)である。   In many cases, the first cycle that is the processing interval of the main processing is different from the second cycle that is the processing interval of the interrupt processing. For example, the first cycle is greater than the second cycle. For example, the first cycle is 33.3 ms (30 fps), and the second cycle is 2.08 ms (480 fps).

PP1は、メイン処理から割込処理へのパラメータであり、解析実行すべき動作テーブルのアドレスを指定するテーブル設定ポインタである。割込処理はそのポインタに従って当該動作テーブルを解析し、当該動作テーブルの終端に到達するか、又は、次の動作テーブルの指定が行われるまで動作を継続する。   PP1 is a parameter from the main process to the interrupt process, and is a table setting pointer for designating the address of the operation table to be analyzed. The interrupt process analyzes the operation table according to the pointer, and continues the operation until the end of the operation table is reached or the next operation table is designated.

MP1は、テーブル設定ポインタPP1を指定するメイン処理である。   MP1 is a main process for designating the table setting pointer PP1.

IP1は、テーブル設定ポインタPP1を受けて行われる割込処理である。   IP1 is an interrupt process performed in response to the table setting pointer PP1.

PP2は、割込処理からメイン処理へのパラメータであり、周辺基板での動作状態を示すモータテーブル更新状態である。これは、割込処理で可動体50の動作状況をメイン処理に伝えるためのステータス情報である。メイン処理はそのステータスを確認し、必要に応じて動作テーブルの再指定、動作の停止などの指示を行う。更新状態の一部(動作フラグ関係)は、動作テーブルの制御命令によりメイン処理側で操作可能である。
IP2は、モータテーブル更新状態を更新するための割込処理である。
MP2は、モータテーブル更新状態PP2を受けて行われるメイン処理である。
PP2 is a parameter from the interrupt process to the main process, and is a motor table update state indicating the operation state on the peripheral board. This is status information for transmitting the operation state of the movable body 50 to the main process in the interrupt process. The main process confirms the status, and instructs the re-designation of the operation table and the stop of the operation as necessary. A part of the update state (related to the operation flag) can be operated on the main processing side by a control command of the operation table.
IP2 is an interrupt process for updating the motor table update state.
MP2 is a main process performed in response to the motor table update state PP2.

<複数の周辺基板間の動作の同期、可動体と液晶表示の同期を例として(その1)>
複数の周辺基板間で動作を一致させて行う演出がある。例えば、画面の変化に合わせて可動体50を動かすといったものである。図10に示したように、液晶表示装置LCDに画像を表示する際には2フレーム(66.6ms)程度の遅延が生じる。このため、液晶表示の画面と可動体50の動作について同期を取るためには、前記遅延に応じて処理を遅延させることが必要である。
<Synchronization of operation between a plurality of peripheral substrates, synchronization of movable body and liquid crystal display as an example (part 1)>
There is an effect in which operations are performed among a plurality of peripheral boards. For example, the movable body 50 is moved in accordance with the change of the screen. As shown in FIG. 10, a delay of about 2 frames (66.6 ms) occurs when an image is displayed on the liquid crystal display device LCD. Therefore, in order to synchronize the operation of the liquid crystal display screen and the movable body 50, it is necessary to delay the processing according to the delay.

図18は、本実施の形態に係る遊技機のブロック図を示す。同図は複数の周辺基板間で動作の同期をとるための構成を示す。   FIG. 18 shows a block diagram of the gaming machine according to the present embodiment. This figure shows a configuration for synchronizing operations among a plurality of peripheral boards.

2001は、少なくとも2つの第1周辺基板及び前記第2周辺基板(例えば液晶制御基板200と可動体制御部60)を制御するための第1制御データ及び第2制御データ(動作テーブル)を設定する制御データ設定部である。これは例えば図17のモータ動作テーブル設定MP1に相当する。制御データ設定部2001そのものは公知であるので、その詳しい説明は省略する。   2001 sets first control data and second control data (operation table) for controlling at least two first peripheral substrates and the second peripheral substrate (for example, the liquid crystal control substrate 200 and the movable body control unit 60). It is a control data setting unit. This corresponds to, for example, the motor operation table setting MP1 of FIG. Since the control data setting unit 2001 itself is publicly known, detailed description thereof is omitted.

2002は、予め定められた第1周期T1で第1制御データを解析し、この解析結果に基づき第1周辺基板(例えば液晶制御基板200)に予め定められた動作を行わせる第1解析部である。第1解析部2002そのものは公知であるので、その詳しい説明は省略する。   Reference numeral 2002 denotes a first analysis unit that analyzes the first control data at a predetermined first period T1 and causes the first peripheral substrate (for example, the liquid crystal control substrate 200) to perform a predetermined operation based on the analysis result. is there. Since the 1st analysis part 2002 itself is well-known, the detailed description is abbreviate | omitted.

2003は、複数の記憶素子(レジスタ)2003R−1〜2003R−3、これらの制御を行う遅延制御部2003Cとを含み、第1周期T1に基づき第2制御データの伝送を遅延させる遅延処理部である。複数の記憶素子2003R−1〜2003R−3は先入れ先出しバッファを構成する。遅延処理部2003は、典型的にはシフトレジスタやFIFOである。なお、記憶素子の数は3つに限らず、任意である。   Reference numeral 2003 denotes a delay processing unit that includes a plurality of storage elements (registers) 2003R-1 to 2003R-3 and a delay control unit 2003C that controls these, and delays transmission of the second control data based on the first period T1. is there. The plurality of storage elements 2003R-1 to 2003R-3 constitute a first-in first-out buffer. The delay processing unit 2003 is typically a shift register or a FIFO. Note that the number of storage elements is not limited to three and is arbitrary.

記憶素子2003R−1を「入口端の記憶素子」、記憶素子2003R−3を「出口端の記憶素子」と記すことがある。   The storage element 2003R-1 may be referred to as an “entrance end storage element”, and the storage element 2003R-3 may be referred to as an “exit end storage element”.

2004は、予め定められた第2周期T2で第2制御データを解析し、この解析結果に基づき第2周辺基板(例えば可動体制御部60)に予め定められた動作を行わせる第2解析部である。これは例えば図17の設定ポインタ確認IP1である。第2解析部2004そのものは公知であるので、その詳しい説明は省略する。   A second analysis unit 2004 analyzes the second control data at a predetermined second period T2, and causes the second peripheral substrate (for example, the movable body control unit 60) to perform a predetermined operation based on the analysis result. It is. This is, for example, the setting pointer confirmation IP1 of FIG. Since the second analysis unit 2004 itself is known, a detailed description thereof will be omitted.

2005は、予め定められたエラー信号を受信するエラー信号受信部である。エラー信号受信部2005は、少なくとも第2周辺基板(例えば可動体制御部60)の動作を直ちに停止させる必要のあるエラーに係る信号を受信する。例えば、遊技中に遊技機の前扉が開くことは不正行為などの異常状態に相当するからエラー信号が発生し、遊技機の動作を停止させる必要がある。この種のエラーとしてエラー処理部1700により生成されるものがあるが、これ以外のものであってもよい。   Reference numeral 2005 denotes an error signal receiving unit that receives a predetermined error signal. The error signal receiving unit 2005 receives a signal related to an error that needs to immediately stop the operation of at least the second peripheral substrate (for example, the movable body control unit 60). For example, opening a front door of a gaming machine during a game corresponds to an abnormal state such as an illegal act, so that an error signal is generated and the operation of the gaming machine needs to be stopped. Some of these types of errors are generated by the error processing unit 1700, but other types of errors may be used.

2006は、第1周期T1に係るタイミング信号を発生する第1タイマである。例えば、第1周期T1=33.3ms(30fps)又は16.7ms(60fps)である。   Reference numeral 2006 denotes a first timer that generates a timing signal related to the first period T1. For example, the first period T1 = 33.3 ms (30 fps) or 16.7 ms (60 fps).

2007は、第2周期T2に係るタイミング信号を発生する第2タイマである。例えば、第2周期T2=2.08ms(480fps)である。   Reference numeral 2007 denotes a second timer that generates a timing signal related to the second period T2. For example, the second period T2 = 2.08 ms (480 fps).

制御データ設定部2001〜第2タイマ2007は、例えばサブ基板20のCPUが所定のプログラムを実行することで実現される。あるいは専用ICやメモリなどのハードウエアにより実現される。   The control data setting unit 2001 to the second timer 2007 are realized, for example, when the CPU of the sub-board 20 executes a predetermined program. Alternatively, it is realized by hardware such as a dedicated IC or a memory.

図18の装置(特に遅延処理部2003)の通常動作(エラー信号を受信しないときの動作)について、図19及び図20を参照して説明を加える。   A normal operation (operation when no error signal is received) of the apparatus of FIG. 18 (particularly the delay processing unit 2003) will be described with reference to FIG. 19 and FIG.

図19及び図20は、制御データの入出力と記憶素子2003R−1〜2003R−3における制御データの動きを模式的に説明した図面である。四角の中のA、Bは制御データを示す。制御データは図面の上側から入力され、下側に出力される。最下段の四角は第2解析部2004を示し、ここに示される制御データA,Bが解析され実行される。(a)〜(f)は時間の経過にしたがった状態を示し、(a)が過去で(f)が未来を示す。   19 and 20 are diagrams schematically illustrating control data input / output and movement of control data in the storage elements 2003R-1 to 2003R-3. A and B in the square indicate control data. Control data is input from the upper side of the drawing and output to the lower side. The lowermost square indicates the second analysis unit 2004, and the control data A and B shown here are analyzed and executed. (A)-(f) shows the state according to progress of time, (a) shows the past and (f) shows the future.

図19は制御データがひとつ(Aのみ)の例であり、図20は制御データが2つ(AとB)の例である。丸印は制御データの書き込みを示し、菱形は制御データの解析・実行を示す。   FIG. 19 shows an example with one control data (only A), and FIG. 20 shows an example with two control data (A and B). Circles indicate writing of control data, and diamonds indicate analysis / execution of control data.

図19(a)において、時刻t0で制御データAが記憶素子2003R−1に書き込まれる。書き込みのタイミングは任意であり、第1タイマ2006、第2タイマ2007の周期とは必ずしも同期していない。この状態が、次の第1タイマ2006の周期まで保持される(図19(b))。なお、t1−t0<T1である。   In FIG. 19A, the control data A is written to the storage element 2003R-1 at time t0. The timing of writing is arbitrary, and is not necessarily synchronized with the period of the first timer 2006 and the second timer 2007. This state is held until the next period of the first timer 2006 (FIG. 19B). Note that t1-t0 <T1.

図19(c)において、時刻t2で制御データAが隣の記憶素子2003R−2に移動する。このタイミングは第1タイマ2006の周期と同期している。すなわち、t2=t1+T1である。   In FIG. 19C, the control data A moves to the adjacent storage element 2003R-2 at time t2. This timing is synchronized with the cycle of the first timer 2006. That is, t2 = t1 + T1.

図19(d)において、時刻t3で制御データAが出口端の記憶素子2003R−3に移動する。t3=t2+T1である。この状態で第2解析部2004は制御データAを取得し解析することができる(図19(e))。第2解析部2004が制御データAを取得するタイミングは、第2タイマ2007の周期に同期している。例えばt4=t3+T2である。   In FIG. 19D, the control data A moves to the storage element 2003R-3 at the outlet end at time t3. t3 = t2 + T1. In this state, the second analysis unit 2004 can acquire and analyze the control data A (FIG. 19 (e)). The timing at which the second analysis unit 2004 acquires the control data A is synchronized with the cycle of the second timer 2007. For example, t4 = t3 + T2.

以上の説明からわかるように、制御データは2×T1+αだけ遅延することになる(αは図19(a)から(b)までの時間=t1−t0と、(d)から(e)までの時間T2の和)。記憶素子の数を増やせば遅延量は増加する。   As can be seen from the above description, the control data is delayed by 2 × T1 + α (α is the time from FIG. 19 (a) to (b) = t1−t0, and from (d) to (e). Sum of time T2). Increasing the number of storage elements increases the amount of delay.

説明の便宜上、以下において上記+αの表示は基本的に省略し、特に断らない限り遅延量を単に2×T1のように表記することにする。   For convenience of explanation, the display of + α is basically omitted below, and the delay amount is simply expressed as 2 × T1 unless otherwise specified.

図20では2つの制御データAとBが書き込まれるが、動作は図19と異ならない。斜めの矢印の部分の時間間隔はT1である。なお、図19(e)で示したように、第2解析部2004が制御データを取得するタイミングは、第2タイマ2007の周期に同期しているが、説明の便宜上、図20(e)の表示において第1周期T1と第2周期T2を区別していない。   In FIG. 20, two control data A and B are written, but the operation is not different from FIG. The time interval between the oblique arrows is T1. As shown in FIG. 19 (e), the timing at which the second analysis unit 2004 acquires the control data is synchronized with the cycle of the second timer 2007. However, for convenience of explanation, the timing of FIG. In the display, the first period T1 and the second period T2 are not distinguished.

制御データA、Bはそれぞれ所定の遅延量だけ遅延され、書き込まれた順番で出力されている。   The control data A and B are delayed by a predetermined delay amount and output in the order in which they are written.

図21は、エラー信号受信部2005でエラー信号を受信したときの動作の説明図である。図中、Eはエラー制御データあるいはエラー処理を示す。   FIG. 21 is an explanatory diagram of an operation when the error signal receiving unit 2005 receives an error signal. In the figure, E indicates error control data or error processing.

通常の制御データAについての動作は図19の場合と同じであるが、エラーを受信したときの動作が全く異なる。すなわち、エラー信号受信部2005が出力するエラー制御データは直ちに第2解析部2004に渡され、エラー処理が即時に実施される。これは、エラー処理に関しては即時性が要求され、他の周辺基板(液晶制御基板200)と同期をとる必要がないからである。   The operation for normal control data A is the same as in FIG. 19, but the operation when an error is received is completely different. That is, the error control data output from the error signal receiving unit 2005 is immediately passed to the second analysis unit 2004, and error processing is immediately performed. This is because immediacy is required for error processing and it is not necessary to synchronize with other peripheral substrates (the liquid crystal control substrate 200).

この即時性を実現するためにエラー制御データに関しては、通常の制御データとは異なる処理を行う。例えば、エラー制御データを出口端の記憶素子2003R−3に上書きする。あるいは、第2解析部2004に直接入力する(図21(e))。   In order to realize this immediacy, the error control data is processed differently from normal control data. For example, the error control data is overwritten in the memory element 2003R-3 at the exit end. Or it inputs directly into the 2nd analysis part 2004 (FIG.21 (e)).

即時性を実現するための上記手法は、図21のように、制御データが出口端の記憶素子2003R−3にしかなくエラー制御データで上書きされるとき、あるいは記憶素子2003R−1〜2003R−3のいずれにもないときにおいては問題なく適用できる。   As shown in FIG. 21, the above-described method for realizing immediacy is when the control data exists only in the storage element 2003R-3 at the outlet end and is overwritten with error control data, or the storage elements 2003R-1 to 2003R-3. It can be applied without any problem when none of the above.

しかし、そうでない場合は問題が生じる。このことを図22を参照して説明を加える。この例では2つの制御データAとBが存在しており、第2解析部2004が制御データAを処理中にエラー信号受信部2005がエラー信号を受信したとしている。エラー制御データが第2解析部2004に直接入力されるのでエラー処理が直ちに実行される(図22(f))。しかし、次の第1周期T1又は第2周期T2で出口端の記憶素子2003R−3に存在した制御データBが第2解析部2004により取得され、エラー処理が中断してしまう(図22(g))。図22によれば、エラー処理はごく短時間(第1周期T1又は第2周期T2)だけ実行されるに過ぎない。エラー処理は即時性とともに、リセットされるまでエラー状態を保持するという状態保持性も併せて求められるから、即時性を実現するための上記手法をそのまま採用することができない。   However, problems arise if it is not. This will be described with reference to FIG. In this example, two control data A and B exist, and it is assumed that the error signal receiving unit 2005 receives an error signal while the second analysis unit 2004 is processing the control data A. Since error control data is directly input to the second analysis unit 2004, error processing is immediately executed (FIG. 22 (f)). However, the control data B existing in the storage element 2003R-3 at the outlet end in the next first cycle T1 or second cycle T2 is acquired by the second analysis unit 2004, and the error processing is interrupted (FIG. 22 (g )). According to FIG. 22, the error processing is only executed for a very short time (first period T1 or second period T2). Since error processing requires not only immediacy but also state retainability of retaining an error state until reset, the above method for realizing immediacy cannot be employed as it is.

なお、エラーが発生しないときは、図18の構成により複数の周辺基板間で動作を一致させ、演出にズレを生じさせないようにできる。例えば、画面の変化に合わせて可動体50を動かすような場合において、可動体制御データを遅延させることにより、画面が半分変化したときに可動体50を半分だけ動かし、画面が全部変化したときに可動体50を全部動かす(シャッターを全開するなど)といった動作について正確に同期を取ることができる。液晶表示装置LCDに画像を表示する際には2フレーム(66.6ms)程度の遅延が生じ、この遅延は可動体50の制御における遅延よりも大きいから、可動体の制御を遅延処理部2003で遅延させるようにする。遅延の量は記憶素子2003Rの数で調整することができる。図18によれば次に述べる手法によりエラー処理の即時性とともに、複数の周辺基板間での演出動作の同期を取るようにできる。   When no error occurs, the operation of the plurality of peripheral boards can be made to coincide with each other by the configuration shown in FIG. For example, in the case where the movable body 50 is moved in accordance with the change of the screen, the movable body control data is delayed so that the movable body 50 is moved by half when the screen is changed by half, and the entire screen is changed. It is possible to accurately synchronize operations such as moving the entire movable body 50 (for example, fully opening the shutter). When an image is displayed on the liquid crystal display device LCD, a delay of about 2 frames (66.6 ms) occurs, and this delay is larger than the delay in the control of the movable body 50. Therefore, the delay processing unit 2003 controls the movable body. Try to delay. The amount of delay can be adjusted by the number of storage elements 2003R. According to FIG. 18, it is possible to synchronize presentation operations among a plurality of peripheral boards with the immediateness of error processing by the method described below.

そこで、本実施の形態に係る遊技機では、図23に示す手法を採用している。すなわち、記憶素子2003R−1〜2003R−3のいずれかに制御データが存在しているとき(図23(b)〜(e))、当該制御データの後ろ(好ましくは直後)にエラー制御データを書き込むようにする(図23(f))。こうすることで、図22(g)のようなエラー制御データが通常の制御データで上書きされることがなくなり、状態保持性を実現することができる。   Therefore, the gaming machine according to the present embodiment employs the technique shown in FIG. That is, when control data exists in any one of the storage elements 2003R-1 to 2003R-3 (FIGS. 23B to 23E), error control data is stored behind (preferably immediately after) the control data. Writing is performed (FIG. 23 (f)). By doing so, error control data as shown in FIG. 22 (g) is not overwritten with normal control data, and state retention can be realized.

なお、図23の手法においては、エラー制御データの書き込みからその解析・実行までに若干の時間を要し、即時性がやや損なわれている。図23の例では書き込みから解析・実行までにはt24−t15=T1+T2程度の時間を要する。   In the method of FIG. 23, some time is required from the writing of the error control data to its analysis / execution, and the immediacy is somewhat impaired. In the example of FIG. 23, it takes about t24−t15 = T1 + T2 from writing to analysis / execution.

図23の手法は厳密な即時性を要求されないエラーについて適用することができる。言い換えれば、図23の手法は処理が簡単で効果が確実であり、厳密な即時性を要求されないエラーについて好適な形態であると言える。   The technique of FIG. 23 can be applied to errors that do not require strict immediacy. In other words, it can be said that the method of FIG. 23 is a suitable form for an error that is easy to process and reliable, and that does not require strict immediacy.

図19〜図21及び図23の処理を実現するための、遅延制御部2003cの動作について説明を加える。下記(1.3)〜(1.5)の処理については、図24のフローチャートも参照されたい。   The operation of the delay control unit 2003c for realizing the processes of FIGS. 19 to 21 and 23 will be described. For the following processes (1.3) to (1.5), refer also to the flowchart of FIG.

(1.1)
設定された制御データ(第2解析部2004用の第2制御データ)を入口端の記憶素子2003R−1に書き込む(図19(a)、図20(a)(c)、図21(a)、図23(a)(c))。
(1.1)
The set control data (second control data for the second analysis unit 2004) is written to the storage element 2003R-1 at the entrance end (FIGS. 19A, 20A, 20C, and 21A). FIG. 23 (a) (c)).

(1.2)
第1周期T1に基づき記憶素子2003R−1、2003R−2が記憶している制御データをそれぞれ出口側の記憶素子へ移動させる(図19(a)〜(d)、図20(a)〜(e)、図21(a)〜(c)、図23(a)〜(g))。この動作はエラー制御データについても同様である。
(1.2)
Based on the first period T1, the control data stored in the storage elements 2003R-1 and 2003R-2 are respectively moved to the storage elements on the outlet side (FIGS. 19A to 19D and 20A to 20A). e), FIG. 21 (a)-(c), FIG. 23 (a)-(g)). This operation is the same for error control data.

出口端の記憶素子2003R−3の制御データを第2解析部2004へ送る(図19(e)、図20(e)(f)、図21(d)、図23(e)(g))。   The control data of the memory element 2003R-3 at the outlet end is sent to the second analysis unit 2004 (FIG. 19 (e), FIG. 20 (e) (f), FIG. 21 (d), FIG. 23 (e) (g)). .

(1.3)
エラー信号を受けたとき、新しい通常の制御データの書き込みを中止する(図24のS20)
(1.3)
When an error signal is received, writing of new normal control data is stopped (S20 in FIG. 24).

記憶素子2003R−1〜2003R−3の状態を調べ(図24のS21)、制御データを記憶しているかどうか判定する(図24のS22)。   The states of the storage elements 2003R-1 to 2003R-3 are examined (S21 in FIG. 24), and it is determined whether or not the control data is stored (S22 in FIG. 24).

(1.4)
記憶素子2003R−1〜2003R−3のいずれもが制御データを記憶していない場合は(図24のS22でNO)、エラー信号に対応する動作を行わせるためのエラー制御データを第2解析部2004へ送る(図24のS28、図21(e))。第2解析部2004が通常の制御データの処理中であるときに、その解析中の動作を取り消して即時にエラー制御データの解析を行わせるようにしてもよい。
(1.4)
If none of the storage elements 2003R-1 to 2003R-3 stores the control data (NO in S22 of FIG. 24), the error analysis data for causing the operation corresponding to the error signal to be performed is the second analysis unit. (S28 in FIG. 24, FIG. 21 (e)). When the second analysis unit 2004 is processing normal control data, the operation being analyzed may be canceled and the error control data may be immediately analyzed.

(1.5)
記憶素子2003R−1〜2003R−3のいずれかが制御データを記憶している場合は(図24のS22でYES)、制御データを記憶している記憶素子のうちで最も入口側のもの(最後尾の記憶素子)を特定する(図24のS23、図23の2003R−3)。当該最後尾の記憶素子よりも入口側の記憶素子(図24のS26、図23の2003R−2)にエラー制御データを書き込む。第1周期に基づきシフト動作を行い、第2解析部2004にエラー処理を行わせる(図24のS27)。
(1.5)
When any one of the storage elements 2003R-1 to 2003R-3 stores the control data (YES in S22 of FIG. 24), the storage element storing the control data is the most entry side (the last one) The tail storage element) is specified (S23 in FIG. 24, 2003R-3 in FIG. 23). The error control data is written to the storage element (S26 in FIG. 24, 2003R-2 in FIG. 23) on the entry side of the last storage element. A shift operation is performed based on the first period, and the second analysis unit 2004 performs error processing (S27 in FIG. 24).

最後尾の記憶素子が2003R−1の場合はエラー制御データを書き込めないから、シフト動作を待ち、記憶素子2003R−1が空くのを待ってからそこにエラー制御データを書き込む(図24のS24でYES、S25)。   When the last storage element is 2003R-1, error control data cannot be written. Therefore, the shift operation is waited, the storage element 2003R-1 is waited for, and then the error control data is written therein (in S24 of FIG. 24). YES, S25).

本実施の形態に係る遊技機によれば、先入れ先出しバッファを用いて複数の周辺基板間の同期を取る場合であっても、エラー処理を適切に行うことができる。すなわち、即時性と状態保持性を両立させることができる。   According to the gaming machine according to the present embodiment, error processing can be appropriately performed even when a plurality of peripheral boards are synchronized using a first-in first-out buffer. That is, both immediacy and state retention can be achieved.

例えば、演出A,B,Cの順で実行予定の演出があり、演出Bの実行中にエラーが発生した場合、実行していた演出Bに代えてエラーが表示されるが、バッファには依然として演出Cが残っているため、演出Bの実行時間が終了するとエラー表示の実行も終わった時点で、内部的にはエラーであるのにもかかわらず演出Cが実行される、という不具合を回避することができる。
また、前記(4)において、前記第2解析部に対して、解析中の動作を取り消して即時に前記エラー制御データの解析を行わせることにより、エラー報知を即時に行うことができる。このやり方は即時性が求められるエラーについて特に有効である。
また、前記(5)において、前記最後尾の記憶素子が前記入口端の記憶素子であるとき、上記(2)の後に、前記入口端の記憶素子に前記エラー制御データを書き込むことのより、FIFOがフルの場合でも適切に処理することができる。いわゆるバッファオーバーフローを起こすことなくエラー処理を行うことができる。
For example, if there are effects scheduled to be executed in the order of effects A, B, and C, and an error occurs during the execution of effect B, an error is displayed instead of effect B that was being executed, but the buffer still remains Since the production C remains, when the execution time of the production B ends, when the error display is finished, the production C is avoided despite the fact that the production C is executed internally. be able to.
Further, in (4), error notification can be immediately performed by causing the second analysis unit to cancel the operation being analyzed and immediately analyze the error control data. This approach is particularly useful for errors that require immediateness.
Further, in (5), when the last storage element is the storage element at the entry end, the error control data is written into the storage element at the entry end after the above (2). Even if is full, it can be handled appropriately. Error processing can be performed without causing so-called buffer overflow.

<複数の周辺基板間の動作の同期、可動体と液晶表示の同期を例として(その2)>
上記例とは処理内容が異なる本実施の形態について説明を加える。この例は、機能ブロック図(図18)、基本的な動作説明図(図19、図20)は異なることがないので、これらを参照する。
<Synchronization of operations between multiple peripheral substrates, synchronization of movable body and liquid crystal display as an example (part 2)>
A description will be given of the present embodiment in which the processing content is different from the above example. In this example, a functional block diagram (FIG. 18) and a basic operation explanatory diagram (FIGS. 19 and 20) are not different, and are referred to.

この本実施の形態に係る遊技機では、図25に示すように、記憶素子2003R−1〜2003R−3に対して、そこに制御データが存在している/いないにかかわらず、エラー制御データを書き込む(上書きする)ようにする(図25(f))。こうすることで、図22(g)のようなエラー制御データが通常の制御データで上書きされることがなくなり、状態保持性を実現することができる。   In the gaming machine according to the present embodiment, as shown in FIG. 25, error control data is stored in memory elements 2003R-1 to 2003R-3 regardless of whether or not control data exists there. Writing (overwriting) is performed (FIG. 25 (f)). By doing so, error control data as shown in FIG. 22 (g) is not overwritten with normal control data, and state retention can be realized.

図25の手法においては、エラー制御データの書き込みからその解析・実行までに要する時間は最小T2〜最大T1であり、即時性の点で優れている。図23の例では書き込みから解析・実行までにはt24−t15=T1+T2程度の時間を要していたが、これよりT1だけ短くなる。   In the method of FIG. 25, the time required from the writing of the error control data to the analysis / execution thereof is a minimum T2 to a maximum T1, which is excellent in terms of immediacy. In the example of FIG. 23, it takes about t24−t15 = T1 + T2 from writing to analysis / execution, but it is shorter by T1 than this.

図25の手法は即時性を要求されるエラーについても適用することができる。即時性の要求されるエラーについて好適な形態であると言える。   The method of FIG. 25 can also be applied to errors that require immediacy. It can be said that this is a preferred form for errors that require immediacy.

また、図26に示すように、エラー信号を受けたとき第2解析部2004へ直接エラー制御データを送り直ちに実行させるようにすれば、即時性をさらに高めることができる。図26の手法によれば、エラー制御データの書き込みからその解析・実行までに要する時間はT2程度である。図26の手法は、第2解析部2004に対して解析中の動作を取り消して即時に前記エラー制御データの解析を行わせることができる場合に適用できる。   In addition, as shown in FIG. 26, if an error signal is received, error control data is directly sent to the second analysis unit 2004 and immediately executed, so that the immediacy can be further improved. According to the method of FIG. 26, the time required from writing error control data to its analysis / execution is about T2. The method of FIG. 26 can be applied to the case where the second analysis unit 2004 can cancel the operation being analyzed and immediately analyze the error control data.

図25の処理を実現するための、遅延制御部2003cの動作について説明を加える。なお、前述の(1.1)と(1.2)の処理は、図25の場合も同じであるのでその説明は省略する。下記(2.3)の処理については、図27のフローチャートも参照されたい。   The operation of the delay control unit 2003c for realizing the processing of FIG. 25 will be described. The processes (1.1) and (1.2) described above are the same in the case of FIG. Refer also to the flowchart of FIG. 27 for the process (2.3) below.

(2.3)
エラー信号を受けたとき、新しい通常の制御データの書き込みを中止する(図27のS30)
(2.3)
When an error signal is received, writing of new normal control data is stopped (S30 in FIG. 27).

記憶素子2003R−1〜2003R−3に対してエラー制御データを書き込む(上書き)する(図27のS31)。
図26の手法では、エラー制御データを第2解析部2004へ送る。
Error control data is written (overwritten) in the memory elements 2003R-1 to 2003R-3 (S31 in FIG. 27).
In the method of FIG. 26, error control data is sent to the second analysis unit 2004.

第1周期に基づきシフト動作を行い、第2解析部2004にエラー処理を行わせる(図27のS32)。
図25の例では第2解析部2004にエラー制御データが3回与えられ、図26の例では4回与えられる。第2解析部2004は繰り返しエラー制御データを受けると、前回のエラー動作をキャンセルし、エラー動作を最初から実行するようになるが、エラー状態は保持されるので問題はない。
A shift operation is performed based on the first cycle, and the second analysis unit 2004 performs error processing (S32 in FIG. 27).
In the example of FIG. 25, the error control data is given three times to the second analysis unit 2004, and is given four times in the example of FIG. When the second analysis unit 2004 repeatedly receives error control data, it cancels the previous error operation and starts the error operation from the beginning, but there is no problem because the error state is retained.

本実施の形態に係る遊技機によれば、先入れ先出しバッファを用いて複数の周辺基板間の同期を取る場合であっても、エラー処理を適切に行うことができる。すなわち、即時性と状態保持性を両立させることができる。   According to the gaming machine according to the present embodiment, error processing can be appropriately performed even when a plurality of peripheral boards are synchronized using a first-in first-out buffer. That is, both immediacy and state retention can be achieved.

この本実施の形態は、即時性の点で優れるとともに、その処理に条件分岐を用いていないのでプログラムを簡単にできるとともに、その容量の削減と処理速度の向上を実現することができる。   This embodiment is superior in terms of immediacy, and since the conditional branch is not used for the processing, the program can be simplified, and the capacity can be reduced and the processing speed can be improved.

<複数の周辺基板間の動作の同期、可動体と液晶表示の同期を例として(その3)>
上記例とは処理内容が異なる本実施の形態と異なる他の形態について説明を加える。この例においても、機能ブロック図(図18)、基本的な動作説明図(図19、図20)及び制御データが記憶されていないときの動作説明図(図21)は異なることがないので、これらを参照する。
<Synchronization of operation between a plurality of peripheral substrates, and synchronization of movable body and liquid crystal display (example 3)>
Another embodiment different from the present embodiment, which is different in processing content from the above example, will be described. Also in this example, the functional block diagram (FIG. 18), the basic operation explanatory diagram (FIGS. 19 and 20), and the operation explanatory diagram (FIG. 21) when no control data is stored are not different. Refer to these.

この本実施の形態に係る遊技機では、図28に示すように、エラー信号受信時に、バッファ内の書き込み領域のうち、最先で出力される領域である記憶素子2003R−3に対して、エラー解除されるまでエラー処理データを書き込み続けるようにする。こうすることで、図22(g)のようなエラー制御データが通常の制御データで上書きされることがなくなり、状態保持性を実現することができる。   In the gaming machine according to the present embodiment, as shown in FIG. 28, when an error signal is received, an error occurs with respect to the storage element 2003R-3, which is the first output area among the write areas in the buffer. Continue to write error processing data until it is released. By doing so, error control data as shown in FIG. 22 (g) is not overwritten with normal control data, and state retention can be realized.

図28の手法においては、エラー制御データの書き込みからその解析・実行までに要する時間は最小T2〜最大T1であり、即時性の点で優れている。図23の例では書き込みから解析・実行までにはt24−t15=T1+T2程度の時間を要していたが、これよりT1だけ短くなる。   In the method of FIG. 28, the time required from the writing of the error control data to its analysis / execution is a minimum T2 to a maximum T1, which is excellent in terms of immediacy. In the example of FIG. 23, it takes about t24−t15 = T1 + T2 from writing to analysis / execution, but it is shorter by T1 than this.

図28の手法は即時性を要求されるエラーについても適用することができる。即時性の要求されるエラーについて好適な形態であると言える。   The method of FIG. 28 can also be applied to errors that require immediacy. It can be said that this is a preferred form for errors that require immediacy.

また、図21に示すように、エラー信号を受けたとき第2解析部2004へ直接エラー制御データを送り直ちに実行させるようにすれば(図29のS46)、即時性をさらに高めることができる。この手法によれば、エラー制御データの書き込みからその解析・実行までに要する時間はT2程度である。この手法は、第2解析部2004に対して解析中の動作を取り消して即時に前記エラー制御データの解析を行わせることができる場合に適用できる。   Further, as shown in FIG. 21, if an error signal is received, error control data is directly sent to the second analysis unit 2004 to be immediately executed (S46 in FIG. 29), so that immediacy can be further improved. According to this method, the time required from the writing of error control data to its analysis / execution is about T2. This technique can be applied to the case where the second analysis unit 2004 can cancel the operation being analyzed and immediately analyze the error control data.

図28の処理を実現するための、遅延制御部2003cの動作について、図29のフローチャートを参照しつつ説明を加える。   The operation of the delay control unit 2003c for realizing the processing of FIG. 28 will be described with reference to the flowchart of FIG.

S40:エラー信号を受けたとき、新しい通常の制御データの書き込みを中止する。 S40: When receiving an error signal, writing of new normal control data is stopped.

S41:記憶素子2003R−1〜2003R−3の状態を調べる。 S41: The states of the storage elements 2003R-1 to 2003R-3 are checked.

S42:制御データを記憶しているかどうか判定する。 S42: It is determined whether control data is stored.

S47:記憶素子2003R−1〜2003R−3のいずれもが制御データを記憶していない場合は(S42でNO)、エラー信号に対応する動作を行わせるためのエラー制御データを第2解析部2004へ送る(図21(e))。第2解析部2004が通常の制御データの処理中であるときに、その解析中の動作を取り消して即時にエラー制御データの解析を行わせるようにしてもよい。 S47: If none of the storage elements 2003R-1 to 2003R-3 stores the control data (NO in S42), error control data for performing an operation corresponding to the error signal is stored in the second analysis unit 2004. (FIG. 21E). When the second analysis unit 2004 is processing normal control data, the operation being analyzed may be canceled and the error control data may be immediately analyzed.

S43:記憶素子2003R−1〜2003R−3のいずれかが制御データを記憶している場合は(S42でYES)、出口端の記憶素子2003R−3にエラー制御データを書き込む。 S43: If any of the storage elements 2003R-1 to 2003R-3 stores the control data (YES in S42), the error control data is written to the storage element 2003R-3 at the exit end.

S44:第1周期に基づきシフト動作を行い、第2解析部2004にエラー処理を行わせる。 S44: A shift operation is performed based on the first period, and the second analysis unit 2004 is caused to perform error processing.

S45:記憶素子2003R−1〜2003R−3の状態を調べる。 S45: The state of the memory elements 2003R-1 to 2003R-3 is examined.

S46:制御データを記憶しているかどうか判定する。記憶素子2003R−1〜2003R−3のいずれもが制御データを記憶していない場合は(NO)、図22(g)のような状態は発生せずエラー信号が取り消されることがないから、エラー信号受信時の処理を中止する。 S46: It is determined whether control data is stored. If none of the storage elements 2003R-1 to 2003R-3 stores the control data (NO), the error signal is not canceled because the state as shown in FIG. 22 (g) does not occur. Cancels processing when receiving a signal.

記憶素子2003R−1〜2003R−3のいずれかが制御データを記憶している場合は(YES)、S43〜S45の処理を繰り返す。   When any of the storage elements 2003R-1 to 2003R-3 stores the control data (YES), the processes of S43 to S45 are repeated.

第2解析部2004は繰り返しエラー制御データを受けると、前回のエラー動作をキャンセルし、エラー動作を最初から実行するようになるが、エラー状態は保持されるので問題はない。エラー制御データの書き込みを繰り返すことで、エラー状態を確実に維持することができる。   When the second analysis unit 2004 repeatedly receives error control data, it cancels the previous error operation and starts the error operation from the beginning, but there is no problem because the error state is retained. By repeatedly writing the error control data, the error state can be reliably maintained.

本実施の形態に係る遊技機によれば、先入れ先出しバッファを用いて複数の周辺基板間の同期を取る場合であっても、エラー処理を適切に行うことができる。すなわち、即時性と状態保持性を両立させることができる。   According to the gaming machine according to the present embodiment, error processing can be appropriately performed even when a plurality of peripheral boards are synchronized using a first-in first-out buffer. That is, both immediacy and state retention can be achieved.

この本実施の形態は、即時性の点で優れる。また、エラー制御データの書き込み先が出口端の記憶素子のみであるので、全ての記憶素子に書き込む場合と比べて迅速かつ確実に行なえ、処理速度と信頼性の向上を実現することができる。
<条件分岐を用いないチャタリング除去>
This embodiment is excellent in terms of immediacy. Further, since the error control data is written only to the storage element at the outlet end, it can be performed quickly and reliably as compared with the case of writing to all the storage elements, and the processing speed and reliability can be improved.
<Eliminating chattering without conditional branching>

遊技機内に設けられているメイン基板10、サブ基板20は、各種センサや遊技者が操作するスイッチなどの出力信号などを受けている。そして、センサやスイッチなどの出力信号に基づき、上述したような遊技処理を行っている。例えば、サブ基板20は操作部(ジョグダイヤル)PANの回転を検出するセンサとともにその中央に設けられた押しボタンスイッチPHSWの信号を受ける。   The main board 10 and the sub board 20 provided in the gaming machine receive output signals from various sensors and switches operated by the player. Then, based on output signals from sensors, switches, etc., the game processing as described above is performed. For example, the sub-board 20 receives a signal from a push button switch PHSW provided at the center together with a sensor for detecting the rotation of the operation unit (jog dial) PAN.

メイン基板10、サブ基板20はマイコン(CPU)を備えていて、デジタル信号に基づいて処理を行っている。そのため、前記センサやスイッチからの信号をデジタル信号に変換し、これらをデータとして扱うことで前記処理を行っている。デジタル信号は、典型的には信号レベルの高/低(H/L)にそれぞれ対応付けられた「0」「1」のデータ列である。デジタル信号のインタフェースでICによく用いられているものとして、例えば、TTL(Transistor Transistor Logic)がある。前記センサやスイッチからの信号をデジタル信号に変換するために、メイン基板10、サブ基板20などの基板は、前記センサやスイッチからの信号を一定時間毎にサンプリングし、その結果に基づいて「0」「1」のデータ列を生成している。   The main board 10 and the sub board 20 are provided with a microcomputer (CPU) and perform processing based on digital signals. Therefore, the processing is performed by converting signals from the sensors and switches into digital signals and treating them as data. The digital signal is typically a data string of “0” and “1” respectively associated with high / low (H / L) signal levels. As a digital signal interface often used in an IC, for example, there is a TTL (Transistor Transistor Logic). In order to convert the signals from the sensors and switches into digital signals, the boards such as the main board 10 and the sub board 20 sample the signals from the sensors and switches at regular intervals, and based on the result, “0” “1” is generated.

前記センサやスイッチからの信号には、ノイズが含まれることがある。また、スイッチなどの機器ではその構造上の理由により、チャタリング(短時間の間にオンオフが不規則に繰り返されること)が生じることがある。これらノイズやチャタリングは不要なものであるのみならず、それらの存在によりCPUが誤動作したり、意図した処理とは異なる処理を実行することもあることから、それらは除去すべきものである。   The signal from the sensor or switch may contain noise. In addition, in devices such as switches, chattering (on / off may be repeated irregularly within a short time) may occur due to structural reasons. These noises and chattering are not only unnecessary, but they should be removed because their presence may cause the CPU to malfunction or perform processing different from the intended processing.

ノイズやチャタリングを除去するために、従来の遊技機では、前記センサやスイッチからの信号をサンプリングしてデータ列を得るとともに、これに含まれる複数のデータ同士を比較しこれらが合致することを条件に信号の状態を確定していた。   In order to eliminate noise and chattering, in conventional gaming machines, a signal string is obtained by sampling signals from the sensors and switches, and a plurality of data included in the data string are compared to match each other. The state of the signal was confirmed.

このように、一般的には、チャタリングの除去には比較処理と条件分岐命令を用いていた。   Thus, in general, comparison processing and conditional branch instructions are used to eliminate chattering.

比較処理(比較命令)は論理積・論理和などの演算命令と比較して処理負荷が重い。CPUの処理負荷を軽減する観点からは比較命令は用いないほうがよい。   The comparison processing (comparison instruction) has a heavy processing load compared with arithmetic instructions such as logical product and logical sum. From the viewpoint of reducing the processing load on the CPU, it is better not to use a comparison instruction.

また、最近のCPUはスーパースカラー(superscalar)という構造を持つものがあり、当該CPUにおいて、条件分岐命令は処理効率が悪くなるという問題がある。スーパースカラーとは、CPUのアーキテクチャの一種であり、命令レベルの並列性という並列コンピューティングの考え方をCPU内に実装したもので、複数の命令が同時に読み込まれ、CPU内に複数設けられた処理部を使って並行して処理されるというものである。スーパースカラーのCPUで複数の命令を実行したとしても、条件分岐命令によって異なる分岐ルートの命令にジャンプしてしまうと、同時に実行された他の命令が無駄になってしまう(これは「CPUのパイプラインがストールする」と呼ばれる)。このように条件分岐命令を用いると処理効率が悪くなる。   In addition, some recent CPUs have a superscalar structure, and there is a problem in that conditional branch instructions in this CPU are less efficient. A superscalar is a kind of CPU architecture, which implements the parallel computing concept of instruction level parallelism in the CPU, and a plurality of processing units provided in the CPU by simultaneously reading a plurality of instructions. Are processed in parallel using. Even if a superscalar CPU executes multiple instructions, if it jumps to an instruction of a different branch route depending on a conditional branch instruction, other instructions executed at the same time will be wasted. Line is stalled "). If the conditional branch instruction is used in this way, the processing efficiency deteriorates.

本実施の形態においては、比較命令と条件分岐命令を用いることなくチャタリングを除去し、この結果、CPUの処理負荷を軽減するようにしている。   In the present embodiment, chattering is removed without using a comparison instruction and a conditional branch instruction, and as a result, the processing load on the CPU is reduced.

図30は、本実施の形態に係るチャタリング除去処理のフローチャートを示す。この処理では、比較処理及び条件分岐処理(判定処理)は用いられていない。   FIG. 30 is a flowchart of chattering removal processing according to the present embodiment. In this process, the comparison process and the conditional branch process (determination process) are not used.

図30の処理は、短時間(入力信号のサンプリング周期と同程度又はサンプリング周期の2倍より小さい)のチャタリングを除去している。チャタリング発生時は、前回入力データが引き継がれるようになっている。   The processing of FIG. 30 eliminates chattering in a short time (same as the sampling period of the input signal or less than twice the sampling period). When chattering occurs, the previous input data is taken over.

例えば、ジョグダイヤルPANの操作監視としてダイヤルJD回転に係るセンサJS1とJS2の検出と押しボタンスイッチPHSWの押下検出に関して約521μs(1920fps)毎にサンプリングを行う。この周期はサブ基板20と周辺基板の通信プロトコルにより規定されている。図30の処理ではチャタリングの除去を行うために約521μs毎のサンプリング結果を2回監視し、結果が一致していれば正常な信号として処理に取り込むようにしている。   For example, as an operation monitoring of the jog dial PAN, sampling is performed about every 521 μs (1920 fps) regarding detection of the sensors JS1 and JS2 related to the rotation of the dial JD and detection of pressing of the push button switch PHSW. This period is defined by the communication protocol between the sub-board 20 and the peripheral board. In the process of FIG. 30, in order to remove chattering, the sampling result every about 521 μs is monitored twice, and if the result matches, it is taken into the process as a normal signal.

なお、ジョグダイヤルPANに関して、図5(b)に示す2つのセンサJS1とJS2からの2本の入力信号から得た結果を元に左右の回転を検出するが、併せて同図の押しボタンスイッチPHSWからの1本の信号線についても処理し、合計3本の入力信号に対してチャタリング除去を行う。しかし、それらの処理は1本ごとに独立しているので、以下の説明ではそれらのいずれかひとつの処理について説明する。   Regarding the jog dial PAN, left and right rotations are detected based on the results obtained from the two input signals from the two sensors JS1 and JS2 shown in FIG. 5B. Are also processed, and chattering removal is performed on a total of three input signals. However, since these processes are independent for each line, in the following description, any one of these processes will be described.

チャタリングの除去処理をリアルタイムで行うこともできるが、本件の操作部PANの処理についてはリアルタイム性は要求されず、処理結果を待つだけの時間的余裕がある。また、CPUは複数のビット(8ビット、16ビット、32ビットなど)のデータを一度に処理をすることができるので、1本ごとの信号(1ビットの信号)についての複数回(8回、16回、32回など)のサンプリングデータをひとつのまとまり(ワード)として扱うようにしたほうが効率がよい。   Although chattering removal processing can be performed in real time, real-time processing is not required for processing of the operation unit PAN in this case, and there is enough time to wait for the processing result. In addition, since the CPU can process data of a plurality of bits (8 bits, 16 bits, 32 bits, etc.) at a time, a plurality of times (8 times, each signal (1 bit signal)). It is more efficient to handle sampling data (16 times, 32 times, etc.) as one unit (word).

そこで、本実施の形態では、一定のデータを蓄積した後に纏めて解析を行うようにしている。例えば、解析タイミングを30fps(約33.33ms)毎とし、1本の信号あたり32個分のデータを保持し(信号の変化は1ビット、ONとOFFのみ)、32bit型変数に格納するようにしている。図30の処理は、32bit型変数の各ビットについて行われる。   Therefore, in this embodiment, analysis is performed collectively after a certain amount of data is accumulated. For example, the analysis timing is every 30 fps (about 33.33 ms), 32 pieces of data are held per signal (signal change is 1 bit, ON and OFF only), and stored in a 32-bit variable. Yes. The process of FIG. 30 is performed for each bit of the 32-bit variable.

しかし、説明を簡単にするために、以下においては1ビットの処理を例にとり説明を加える。CPUのレジスタは1ワードの各ビットの論理演算を同時に行うようになっており、複数のビットの場合は以下の1ビットの処理を同時に行うことになる。   However, in order to simplify the description, a description will be added below taking a 1-bit process as an example. The CPU register is designed to simultaneously perform logical operations on each bit of one word. In the case of a plurality of bits, the following 1-bit processing is performed simultaneously.

図30における記号について説明を加える。   A description of symbols in FIG. 30 will be added.

[S1]は、サンプリングされたデータ(1ビット)である。
[S2]は、[S1]の次にサンプリングされたデータである。
[B]は、前回の処理において得られた値(出力)である。
[Sa]は、[S1]と[S2]の論理積である。この真理値表を図31に示す。
[So]は、[S1]と[S2]の論理和である。この真理値表を図32に示す。
[SB]は、[Sa]と[B]の論理和である。この真理値表を図33に示す。
[SBo]は、[SB]と[So]の論理積である。この真理値表を図34に示す。
[S1] is sampled data (1 bit).
[S2] is sampled data after [S1].
[B] is a value (output) obtained in the previous process.
[Sa] is a logical product of [S1] and [S2]. This truth table is shown in FIG.
[So] is the logical sum of [S1] and [S2]. This truth table is shown in FIG.
[SB] is the logical sum of [Sa] and [B]. This truth table is shown in FIG.
[SBo] is the logical product of [SB] and [So]. This truth table is shown in FIG.

図35は、図30の処理と同じ処理を行う論理回路のブロック図である。図35はチャタリング除去部の内部構造を示す。本実施の形態はソフトウエアだけでなくICなどのハードウエアでも実現できる。   FIG. 35 is a block diagram of a logic circuit that performs the same processing as that of FIG. FIG. 35 shows the internal structure of the chattering removal unit. This embodiment can be realized not only by software but also by hardware such as an IC.

2100と2101は、信号をサンプリングするためのラッチである。ラッチ2101の入力は操作部からの信号であり、この出力がラッチ2100の入力になっている。図のようなラッチの直列接続は、サンプリングタイミングごとに信号がシフトするように動作する。ある時点で見ると、ラッチ2101には最新のデータ(直近のサンプリングデータ)が保持され、ラッチ2100にはその1サンプリング前のデータが保持されている。図36の例で言うと、ラッチ2101が(13)のデータを保持しているときは、ラッチ2100が(12)のデータを保持している。言い換えれば、ラッチ2100の出力はラッチ2101の出力に比べてサンプリング信号の1周期(図36のTS1)だけ遅れている。したがって、ラッチ2101の出力が[S2]であり、ラッチ2100の出力が[S1]である。   Reference numerals 2100 and 2101 denote latches for sampling signals. An input of the latch 2101 is a signal from the operation unit, and this output is an input of the latch 2100. The series connection of latches as shown in the figure operates so that the signal shifts at every sampling timing. At a certain point in time, the latest data (the latest sampling data) is held in the latch 2101, and the data before one sampling is held in the latch 2100. In the example of FIG. 36, when the latch 2101 holds the data (13), the latch 2100 holds the data (12). In other words, the output of the latch 2100 is delayed by one cycle of the sampling signal (TS1 in FIG. 36) compared to the output of the latch 2101. Therefore, the output of the latch 2101 is [S2], and the output of the latch 2100 is [S1].

2102は、[S1]と[S2]の論理積を求めるAND回路である。
2103は、[S1]と[S2]の論理和を求めるOR回路である。
2104は、AND回路2102の出力[Sa]とラッチ2106の出力[B]の論理和を求めるOR回路である。
2105は、OR回路2104の出力[SB]とOR回路2103の出力[So]の論理積を求めるAND回路である。AND回路2105の出力[B]が、チャタリング除去された出力である。
2106は、次回の処理に用いるために出力[B]を保持するラッチである。
Reference numeral 2102 denotes an AND circuit for obtaining a logical product of [S1] and [S2].
Reference numeral 2103 denotes an OR circuit for obtaining a logical sum of [S1] and [S2].
Reference numeral 2104 denotes an OR circuit that calculates the logical sum of the output [Sa] of the AND circuit 2102 and the output [B] of the latch 2106.
An AND circuit 2105 obtains a logical product of the output [SB] of the OR circuit 2104 and the output [So] of the OR circuit 2103. The output [B] of the AND circuit 2105 is an output from which chattering has been removed.
Reference numeral 2106 denotes a latch that holds the output [B] for use in the next processing.

図36は、本実施の形態に係るチャタリング除去を説明するタイミングチャートである。サンプリング間隔TS1ごとにサンプリング信号が発生され、これを単位として処理が行われる。所定の処理時間TS2の後に処理結果が出力され、チャタリング除去済みの信号が出力される。   FIG. 36 is a timing chart for explaining chattering removal according to the present embodiment. A sampling signal is generated every sampling interval TS1, and processing is performed in units of this. A processing result is output after a predetermined processing time TS2, and a signal from which chattering has been removed is output.

図36ではチャタリングは発生していないが、チャタリング信号(TS1の2倍よりも短い信号)が発生したとしても、当該信号は除去されて出力側には現れない。例えば、低レベルを0、高レベルを1として、本来「001111・・・」となるはずが、チャタリングにより「001011・・・」となった場合、これを「000011・・・」とする。   In FIG. 36, chattering does not occur, but even if a chattering signal (a signal shorter than twice TS1) occurs, the signal is removed and does not appear on the output side. For example, if the low level is 0 and the high level is 1, it should originally be “001111...”, But if it becomes “001011.

本実施の形態に係るチャタリング除去のロジックは、(1)2回以上連続して同じ値がサンプリングされたとき(00,11)その値を出力し、(2)そうでないとき前回の値を出力する、というものである。図37に当該ロジックの真理値表を示す。   The chattering elimination logic according to the present embodiment (1) outputs the value when the same value is sampled twice or more consecutively (00, 11), and (2) outputs the previous value otherwise. Is to do. FIG. 37 shows a truth table of the logic.

図30、図35の出力である図34の真理値表の出力(右端)は、図37の出力(右端)と同じであるから、図30の処理、図35の装置は上記ロジックを実現している。   The output (right end) of the truth table in FIG. 34, which is the output of FIGS. 30 and 35, is the same as the output (right end) of FIG. 37, so the processing of FIG. 30 and the apparatus of FIG. ing.

図30及び図35を参照して、本実施の形態に係るチャタリング除去処理について説明を加える。   With reference to FIGS. 30 and 35, the chattering removal processing according to the present embodiment will be described.

S50:AND2102により[S1]と[S2]の論理積を求め、この出力を[Sa]とする。 S50: A logical product of [S1] and [S2] is obtained by AND2102, and this output is set to [Sa].

S51a:OR回路2104により[Sa]と前回の値である[B]の論理和を求め、この出力を[SB]とする。 S51a: The logical sum of [Sa] and the previous value [B] is obtained by the OR circuit 2104, and this output is set to [SB].

S51b:OR回路2103により[S1]と[S2]の論理和を求め、この出力を[So]とする。
なお、S51aで使う値とS51bで使う値は重複していないので、スーパースカラーのCPUにおいてはS51aとS51bを同時に実行することができる。また、条件分岐がないのでCPUのパイプラインがストールすることもない。
S51b: The OR circuit 2103 obtains the logical sum of [S1] and [S2], and sets this output as [So].
Since the value used in S51a and the value used in S51b do not overlap, S51a and S51b can be executed simultaneously in a superscalar CPU. Further, since there is no conditional branch, the CPU pipeline does not stall.

S52:AND回路2105により[SB]と[So]の論理積を求め、この出力を[SBo]とする。[SBo]をチャタリング除去された信号を出力する。 S52: A logical product of [SB] and [So] is obtained by the AND circuit 2105, and this output is set to [SBo]. Output the signal with chattering removed [SBo].

S53:ラッチ2106により[SBo]を前回出力[B]として保持する。 S53: The latch 2106 holds [SBo] as the previous output [B].

結局、上記処理は下記の式と同等になる。
今回値[SBo] = ( ( [S1] AND [S2] ) OR [B] ) AND ( [S1] OR [S2] )
Eventually, the above processing is equivalent to the following equation.
This time [SBo] = (([S1] AND [S2]) OR [B]) AND ([S1] OR [S2])

本実施の形態によれば、条件分岐を用いる一般的な処理方法と比較して次のアドバンテージがある。   According to the present embodiment, there is the following advantage compared with a general processing method using conditional branching.

(1)比較命令を使用しない為、CPUのパイプラインがストールしない。
ストールについて図38、図39を用いて説明する。
図38は、条件分岐を用いる一般的なチャタリング除去のフローチャートである。図39は処理手順を示すタイミングチャートであり、左から右へ処理が進む。図39(a)は本実施の形態の処理を示し、図39(b)は図38の処理を示す。
(1) Since the comparison instruction is not used, the CPU pipeline does not stall.
The stall will be described with reference to FIGS. 38 and 39. FIG.
FIG. 38 is a flowchart of general chattering removal using a conditional branch. FIG. 39 is a timing chart showing the processing procedure, and processing proceeds from left to right. FIG. 39 (a) shows the processing of the present embodiment, and FIG. 39 (b) shows the processing of FIG.

図38のS62が条件分岐であり、サンプリングされた2つのデータを比較している。この比較結果に応じて(YES/NO)処理の内容が異なる(S63又はS64)。もし、スーパースカラーを活用して複数の命令S63とS64を同時に読み込んだとしても、その一方は必ず無駄になる(使用されない)。図39(b)の×印はこのことを意味する。したがって、図38の処理はストールが発生する。せっかくのスーパースカラーを利用できない。   S62 in FIG. 38 is a conditional branch, which compares two sampled data. Depending on the comparison result (YES / NO), the contents of the process are different (S63 or S64). Even if a plurality of instructions S63 and S64 are read simultaneously using the superscalar, one of them is always wasted (not used). The crosses in FIG. 39 (b) mean this. Therefore, a stall occurs in the process of FIG. I can't use my superscalar.

これに対し、本実施の形態によれば、図39(a)のように、相互依存関係にあるデータが互いに存在しない、[Sa]と前回の値である[B]の論理和を求めて[SB]とする処理と、[S1]と[S2]の論理和を求めて[So]とする処理を同時に行うことができ、しかもこれらの結果は破棄されることがないので、ストールは発生しない。スーパースカラーを活用できている。処理の並行実行により処理効率が向上する。   On the other hand, according to the present embodiment, as shown in FIG. 39 (a), the logical sum of [Sa] and [B], which is the previous value, in which there is no mutually dependent data exists. The process of [SB] and the process of obtaining the logical sum of [S1] and [S2] and setting it to [So] can be performed at the same time, and these results are not discarded, so a stall occurs. do not do. Superscalar can be utilized. Processing efficiency is improved by executing the processes in parallel.

(2)CPUのレジスタのビット数(例えば32ビット)までの入力信号を同時に解析することができる。本実施の形態によれば、レジスタのビット数の範囲の数であれば、処理対象のデータが増えても処理負荷は変化せず、高い効率の処理が可能である。 (2) It is possible to simultaneously analyze input signals up to the number of bits (for example, 32 bits) of the CPU register. According to the present embodiment, as long as the number of bits in the register is within the range, even if the data to be processed increases, the processing load does not change and high-efficiency processing is possible.

例えば、複数の信号を同時にサンプリングしたデータをその順番でMSBからLSBにかけて並べたものをレジスタAに格納し(これが[S1]となる)、同様に次のサンプリングデータを他のレジスタBに格納する(これが[S2]となる)。レジスタAとレジスタBについて、図30のS50、S51bの処理を行う。他の処理もレジスタのビット数を利用して複数のデータについて同時に処理を行う。   For example, data obtained by sampling a plurality of signals at the same time from MSB to LSB in that order is stored in register A (this becomes [S1]), and the next sampling data is similarly stored in another register B. (This is [S2]). For registers A and B, the processing of S50 and S51b in FIG. 30 is performed. Other processes also process a plurality of data simultaneously using the number of bits of the register.

ひとつの信号について複数のサンプリング信号を同時に処理することも可能である。ひとつの信号を複数回(例えば32回)サンプリングしたデータをその順番でMSBからLSBにかけて並べたものをレジスタAに格納し(これが[S1]となる)、1サンプリング周期遅れて複数回サンプリングしたデータをその順番でMSBからLSBにかけて並べたものをレジスタBに格納する(これが[S2]となる)。   It is also possible to simultaneously process a plurality of sampling signals for one signal. Data obtained by sampling one signal a plurality of times (for example, 32 times) from MSB to LSB in that order is stored in register A (this becomes [S1]), and data sampled a plurality of times with a delay of one sampling period Are arranged in the order from the MSB to the LSB and stored in the register B (this is [S2]).

あるいは、[S1]をMSB方向へ1ビットシフトし、空いたLSBに新たなサンプリングデータを入れたものを他のレジスタBに格納する(これが[S2]となる)。   Alternatively, [S1] is shifted by 1 bit in the MSB direction, and new sampling data is stored in the free LSB and stored in another register B (this becomes [S2]).

レジスタAとレジスタBについて、図30のS50、S51bの処理を行う。他の処理もレジスタのビット数を利用して複数のデータについて同時に処理を行う。   For registers A and B, the processing of S50 and S51b in FIG. 30 is performed. Other processes also process a plurality of data simultaneously using the number of bits of the register.

複数のサンプリング回数に応じて、ラッチ2106も複数用意する。   A plurality of latches 2106 are also prepared according to a plurality of sampling times.

図36ではサンプリングタイミングを示す13個の矢印(1)、・・・(12)、(13)が示されているが(図面を見やすくするために(2)乃至(11)の表示は省略している)、これを例に取れば、サンプリングデータ(1)乃至(12)を[S1]とし、サンプリングデータ(2)乃至(13)を[S2]とする。ビットシフトの場合も同じである。   In FIG. 36, 13 arrows (1),... (12), (13) indicating the sampling timing are shown (the display of (2) to (11) is omitted for easy viewing of the drawing. If this is taken as an example, sampling data (1) to (12) is [S1], and sampling data (2) to (13) is [S2]. The same applies to bit shift.

図38の処理では、チャタリングの除去単位を1ビット単位で行い、1ビットごとに比較を行う必要がある(条件分岐があるので複数のデータを同時に処理できない)。図38のS60、S65、S66がこの処理に相当する。同図は8ビットのデータを処理するので処理を8回ループしている。このため処理効率が悪くなる。   In the processing of FIG. 38, it is necessary to perform the chattering removal unit in 1-bit units and perform comparison for each bit (since there is a conditional branch, a plurality of data cannot be processed simultaneously). S60, S65, and S66 in FIG. 38 correspond to this process. In the figure, since 8-bit data is processed, the processing is looped eight times. For this reason, processing efficiency deteriorates.

本実施の形態によれば、チャタリング除去方法を高速かつ低負荷なロジックで構成することにより、演算に必要なリソースを少なくすることができる。   According to the present embodiment, by configuring the chattering removal method with high-speed and low-load logic, it is possible to reduce resources necessary for calculation.

なお、上記例では新旧のサンプル情報を2つに分けて行っているが、これは必須ではない。例えば、処理の完了したデータをコピーしてビットシフトすれば、前回のものとして扱うことができる。   In the above example, the old and new sample information is divided into two parts, but this is not essential. For example, if the processed data is copied and bit-shifted, it can be handled as the previous one.

<ジョグダイヤル:センサの信号の確認>
ジョグダイヤルPANの出力信号の処理手順(特に回転方向の検知判断)について説明を加える。
<Jog dial: Check sensor signal>
The processing procedure of the output signal of the jog dial PAN (especially the detection determination of the rotation direction) will be described.

ジョクダイヤルPANは略円筒形のデバイスであり、図5(a)に示すように、回転可能なリング(ダイヤルJD)を備え、その中心部分には押しボタンスイッチPHSWが設けられている。ダイヤルJDを左右に回すことができる。押しボタンスイッチPHSWには発光素子が設けられている。ダイヤルJDは複数のステップ(例えばステップ数=30、その角度=12度)で回転するようになっている。   The jog dial PAN is a substantially cylindrical device and includes a rotatable ring (dial JD) as shown in FIG. 5A, and a push button switch PHSW is provided at the center thereof. The dial JD can be turned left and right. The push button switch PHSW is provided with a light emitting element. The dial JD is rotated in a plurality of steps (for example, the number of steps = 30, the angle = 12 degrees).

図5(b)に示すように、ジョクダイヤルPANは、ダイヤルJDの回転を検知するための2つのセンサ[1]JS1と[2]JS2(以下、表記を簡単にするためにJS1、JS2の表示は省略する)を備えている。回転に応じてセンサ[1]と[2]はH/Lの2つのデジタル信号を出力するが、それらは互いに異なっている。センサ[1]と[2]の出力信号の例を図40に示す。同図はダイヤルJDの回転に応じた信号の変化を示す。ノッチはステップのことであり、例えばダイヤルJDの12度の回転が1ステップとなる。ダイヤルJDの停止位置はノッチを単位としている。すなわち、ダイヤルJDは図40の点線の位置に停止、これら以外の位置では止まらない。+、−は回転の方向を示し、例えば右回転が+、左回転が−である(この対応関係は任意である)。また、H/Lの関係は逆であってもよい(正論理、負論理どちらでもよい)。   As shown in FIG. 5 (b), the jog dial PAN has two sensors [1] JS1 and [2] JS2 for detecting the rotation of the dial JD (hereinafter, JS1 and JS2 for simplicity of description). Display is omitted). Sensors [1] and [2] output two digital signals of H / L according to the rotation, but they are different from each other. An example of the output signals of the sensors [1] and [2] is shown in FIG. The figure shows the change of the signal according to the rotation of the dial JD. A notch is a step. For example, a 12-degree rotation of the dial JD is one step. The stop position of the dial JD is in units of notches. That is, the dial JD stops at the position indicated by the dotted line in FIG. 40, and does not stop at other positions. + And-indicate the direction of rotation, for example, right rotation is + and left rotation is-(this correspondence is arbitrary). The H / L relationship may be reversed (either positive logic or negative logic may be used).

図40は、ジョグダイヤルPANの回転時の信号の、あくまで一例である。図40とは異なるタイミングでジョクダイヤルPANの信号が変化するようにしてもよい。   FIG. 40 is merely an example of a signal when the jog dial PAN is rotated. The signal of the jog dial PAN may be changed at a timing different from that in FIG.

ジョグダイヤルPANの信号は次の性質を備えている。   The signal of the jog dial PAN has the following properties.

(1)1ノッチ(1区切り)の間に発生する各信号のエッジ変化は1回である。
エッジとはHからL又はLからHへ変化する点のことである。H/Lの対応関係は任意であるので、もっぱらエッジ変化について着目する。
(1) The edge change of each signal that occurs during one notch (one segment) is one time.
An edge is a point that changes from H to L or from L to H. Since the correspondence relationship of H / L is arbitrary, attention is focused on edge change.

(2)各信号は、2ノッチを単位として同じ内容を繰り返す。つまり、繰り返し周期が2ノッチである。 (2) Each signal repeats the same content in units of 2 notches. That is, the repetition period is 2 notches.

(3)センサ[1]と[2]の信号波形のパターンは同じだが、位相ずれが存在する。したがって、センサ[1]と[2]の両方が同時にエッジ変化することはない。図40において、このずれは左右均等ではない。TZ1≠TZ2である。言い換えれば、センサ[2]の信号をセンサ[1]の信号と一致するように+方向へ移動させるとき、その移動量(TZ2)は−方向へ移動させるときの移動量(TZ1)とは同じになっていない。なお、TZ1=TZ2であってもよい。 (3) The signal waveform patterns of sensors [1] and [2] are the same, but there is a phase shift. Therefore, both the sensors [1] and [2] do not change edges simultaneously. In FIG. 40, this shift is not equal left and right. TZ1 ≠ TZ2. In other words, when the signal of sensor [2] is moved in the + direction so as to match the signal of sensor [1], the amount of movement (TZ2) is the same as the amount of movement (TZ1) when moved in the-direction. It is not. Note that TZ1 = TZ2.

図40によれば、+側に回転させた場合は以下の現象が順番に発生している。ただし、停止位置がTZ2の範囲にあるとする。なお、停止位置がTZ1の範囲にあるようにしてもよいが、この場合は下記規則のセンサ[1]とセンサ[2]が入れ替わる。   According to FIG. 40, the following phenomenon occurs in order when rotated to the + side. However, it is assumed that the stop position is in the range of TZ2. Note that the stop position may be within the range of TZ1, but in this case, the sensor [1] and the sensor [2] in the following rules are switched.

(+側現象(1))センサ[1]にエッジ変化が発生する。
(+側現象(2))センサ[2]にエッジ変化が発生する。
(+ Side phenomenon (1)) Edge change occurs in sensor [1].
(+ Side phenomenon (2)) Edge change occurs in sensor [2].

この規則に従い、センサ[1]、センサ[2]の順番で現象が発生したときダイヤルJDは+方向へ1ノッチ回転したと認識することができる。   According to this rule, when the phenomenon occurs in the order of sensor [1] and sensor [2], it can be recognized that dial JD has rotated one notch in the + direction.

同様に、−側に回転させた場合は以下の現象が順番に発生している。   Similarly, when rotated to the minus side, the following phenomena occur in order.

(−側現象(1))センサ[2]にエッジ変化が発生する。
(−側現象(2))センサ[1]にエッジ変化が発生する。
(-Side phenomenon (1)) Edge change occurs in sensor [2].
(-Side phenomenon (2)) Edge change occurs in sensor [1].

この規則に従い、センサ[2]、センサ[1]の順番で現象が発生したときダイヤルJDは−方向へ1ノッチ回転したと認識することができる。   According to this rule, when the phenomenon occurs in the order of sensor [2] and sensor [1], it can be recognized that dial JD has rotated one notch in the negative direction.

ジョグダイヤルの操作方法としては、単純に同一方向に回転させる他に、左右交互に激しく動かすなど、回転方向を逆転させる操作がある。この際の信号の変化の例を図41に示す。   As a method for operating the jog dial, there is an operation for reversing the direction of rotation, for example, by moving it vigorously alternately left and right in addition to simply rotating in the same direction. An example of the signal change at this time is shown in FIG.

図41はタイミングチャートであり、左から右へ向かって時間が経過している。チャートの中央の操作反転の位置でダイヤルJDの回転方向が反転する。同図の例では順回転(+方向)から逆回転(−方向)に向きが変わっている。逆回転動作が行われた場合、必ず、直前にエッジを検出したセンサから、再度エッジを検出する。同じセンサについて逆回転の前後のエッジまでの長さ(GY1+とGY1−、GY2+とGY2−)が等しくなるからそのような現象が生じる。   FIG. 41 is a timing chart. Time elapses from left to right. The rotation direction of the dial JD is reversed at the operation reversal position in the center of the chart. In the example of the figure, the direction is changed from forward rotation (+ direction) to reverse rotation (− direction). When a reverse rotation operation is performed, the edge is always detected again from the sensor that detected the edge immediately before. Such a phenomenon occurs because the lengths (GY1 + and GY1-, GY2 + and GY2-) to the front and rear edges of the same sensor are equal.

このように、逆回転時は、順回転時とは異なる現象が生じる。   Thus, a phenomenon different from that during forward rotation occurs during reverse rotation.

なお、遊技者が意図しなくても上記逆回転の現象が生じることがある。ダイヤルJDには回転時のステップ数をユーザーが把握しやすいように、ノッチと呼ばれる位置決め機構が設けられている。回転停止時はダイヤルJDが必ず何れかのノッチに収まっている。ダイヤルJDの慣性が働く関係で、回転中はユーザーが操作を停止させたその瞬間にノッチに収まっていないことがあり、このときにダイヤルJDがノッチに収まろうとして一瞬逆回転することがある。この際にセンサが信号を出力することがある。   Even if the player does not intend, the reverse rotation phenomenon may occur. The dial JD is provided with a positioning mechanism called a notch so that the user can easily grasp the number of steps during rotation. When the rotation is stopped, the dial JD is always in one of the notches. Due to the inertia of the dial JD, the rotation may not be in the notch at the moment when the user stops the operation during rotation, and at this time, the dial JD may reversely rotate momentarily to try to fit in the notch. At this time, the sensor may output a signal.

図40、図41に示す信号を出力するジョグダイヤルの回転量(回転方向を含む)を求める装置のブロック図を図42に示す。   FIG. 42 shows a block diagram of an apparatus for obtaining the rotation amount (including the rotation direction) of the jog dial that outputs the signals shown in FIGS.

2201−1は、センサ[1]を入力とし、そのエッジを検出するエッジ検出器である。   Reference numeral 2201-1 denotes an edge detector that receives the sensor [1] and detects an edge thereof.

2201−2は、センサ[2]を入力とし、そのエッジを検出するエッジ検出器である。   Reference numeral 2201-2 denotes an edge detector that receives the sensor [2] and detects an edge thereof.

エッジ検出器2201−1は、バッファ2201−11、ビットシフタ2201−12、バッファ2201−13、排他的論理和回路2201−14を含む。図示しないが、エッジ検出器2201−1も同じである。   The edge detector 2201-1 includes a buffer 2201-11, a bit shifter 2201-12, a buffer 2201-13, and an exclusive OR circuit 2201-14. Although not shown, the edge detector 2201-1 is the same.

バッファ2201−11は、センサ[1]の信号(1ビットのH/Lの信号)を一定時間ごとにサンプリングし、これをその順番で記憶する。バッファ2201−11は、例えばシフトレジスタである。記憶内容の一例を図43(a)に示す。複数の1ビットのデータが記憶されており、右側LSBからデータが入力され、サンプリングごとに左側にシフトされていく。右側LSBが最新のデータであり左側MSBが最も以前にサンプリングされたデータである。   The buffer 2201-11 samples the signal of the sensor [1] (1-bit H / L signal) at regular intervals, and stores them in that order. The buffer 2201-11 is a shift register, for example. An example of the stored contents is shown in FIG. A plurality of 1-bit data is stored, and data is input from the right side LSB and shifted to the left side every sampling. The right LSB is the latest data, and the left MSB is the most recently sampled data.

バッファ2201−11に一定数(例えば32個)のデータが書き込まれるとビットシフタ2201−12の全てのデータを読み出すとともに1ビットシフトした上でバッファ2201−13に書き込む。ビットシフタ2201−12は、バッファ2201−11の各データを右側(入口LSB)方向に一つだけ移動させる。   When a certain number (for example, 32) of data is written in the buffer 2201-11, all the data in the bit shifter 2201-12 is read out, shifted by 1 bit, and written in the buffer 2201-13. The bit shifter 2201-12 moves each piece of data in the buffer 2201-11 by one in the right (entrance LSB) direction.

バッファ2201−13は、バッファ2201−11と同じ構造のメモリ(シフトレジスタ)である。ビットシフタ2201−12の作用により、バッファ2201−13のデータは、図43(b)のようになる。ビットシフタ2201−12で右側へ一つだけシフトするので左端MSBにはデータが存在しなくなり(符号X)、図43(a)の右端LSBのデータは失われる。左端MSBについて排他的論理和演算を行わないようにすれば問題がないが、次のようにすればデータを失わないようにできる。   The buffer 2201-13 is a memory (shift register) having the same structure as the buffer 2201-11. By the operation of the bit shifter 2201-12, the data in the buffer 2201-13 becomes as shown in FIG. Since the bit shifter 2201-12 shifts by one to the right, there is no data in the left end MSB (symbol X), and the data in the right end LSB in FIG. 43 (a) is lost. There is no problem if the exclusive OR operation is not performed on the leftmost MSB, but data can be prevented from being lost if the following operation is performed.

ビットシフトする前の図43(a)の右端LSBのデータを図示しないメモリに記憶しておき、このデータを次回(エッジ検出処理が終わりその結果を出力した後にバッファ2201−11の内容をクリアし、再びサンプリングを行いバッファ2201−11が一杯になった後、再びビットシフトを行うタイミング)において、図43(b)の左端MSB(符号X)に書き込むようにする。   The right end LSB data of FIG. 43 (a) before the bit shift is stored in a memory (not shown), and the contents of the buffer 2201-11 are cleared next time (after the edge detection process is finished and the result is output). When sampling is performed again and the buffer 2201-11 becomes full, the bit shift is performed again), and the data is written to the leftmost MSB (symbol X) in FIG.

排他的論理和回路2201−14は、バッファ2201−11と2201−13の各ビットについて排他的論理和を求める。これによりエッジがどこにあるか(データの変化がいつ生じたか)を知ることができる。すなわち、図43(c)の「1」の位置にエッジが存在する。   The exclusive OR circuit 2201-14 calculates an exclusive OR for each bit of the buffers 2201-11 and 2201-13. This makes it possible to know where the edge is (when the data change occurs). That is, an edge exists at the position “1” in FIG.

上述のようにすれば、エッジ検出に必要な工程は、データ取得(例えば32サンプリング)、ビットシフト・データコピー、排他的論理和となり、複数(例えば32回分)のデータを一括で処理することができ、1サンプリングごとに条件判定で求めるよりは、はるかに効率よくエッジ検出を行える。   As described above, the steps necessary for edge detection are data acquisition (for example, 32 sampling), bit shift / data copy, and exclusive OR, and a plurality of (for example, 32 times) data can be processed at once. In addition, the edge detection can be performed much more efficiently than the condition determination for each sampling.

2203は、エッジ検出器2201−1、2201−2の出力の論理和を求める論理和回路(後述のように排他的論理和であってもよい)である。   Reference numeral 2203 denotes a logical sum circuit (which may be an exclusive logical sum as will be described later) for obtaining a logical sum of the outputs of the edge detectors 2201-1 and 201-2.

次に、検出されたエッジに基づき回転量(回転方向を含む)を判定する処理について説明を加える。この処理は、エッジ検出器2201−1又は2201−2の一方の出力と論理和回路2203の出力に基づき回転検出部2202が行う。   Next, processing for determining the amount of rotation (including the rotation direction) based on the detected edge will be described. This processing is performed by the rotation detection unit 2202 based on one output of the edge detector 2201-1 or 2201-2 and the output of the OR circuit 2203.

図44は、エッジの検出状況と回転量、すなわち順回転・逆回転の判定の説明図(タイミングチャート)を示す。図44(a)はセンサ[1][2]の出力信号波形とエッジの検出位置を示す(「1」がエッジ検出を示す。ひとつのマスはサンプリング間隔に対応する)。図44(b)はエッジ検出に基づく回転検知を示す。○印はそのタイミング(ひとつのマス)で1ノッチ分の順回転又は逆回転が発生したことを意味する。順回転、逆回転それぞれについて○印を累積すれば回転量を求めることができる。例えば、(順回転の○印の累積)×(2ノッチの角度)=(順方向への回転角度)となる。あるいは(順回転の○印の累積)そのものを回転量とすることもできる。この場合、ノッチが回転の単位となる。なお、順回転は例えば右回転、逆回転は例えば左回転であるが、この対応関係は任意である。   FIG. 44 is an explanatory diagram (timing chart) of edge detection status and rotation amount, that is, forward / reverse rotation determination. FIG. 44 (a) shows the output signal waveforms of the sensors [1] [2] and the edge detection position (“1” indicates edge detection. One square corresponds to the sampling interval). FIG. 44B shows rotation detection based on edge detection. A circle indicates that a forward or reverse rotation of one notch has occurred at that timing (one square). The amount of rotation can be obtained by accumulating ○ marks for each of the forward rotation and the reverse rotation. For example, (accumulation of circles in forward rotation) × (angle of 2 notches) = (rotation angle in the forward direction). Alternatively, (the accumulation of the forward rotation circles) itself can be used as the rotation amount. In this case, the notch is a unit of rotation. The forward rotation is, for example, right rotation and the reverse rotation is, for example, left rotation, but this correspondence is arbitrary.

前述の規則を参照して、図44(a)のエッジ検出に基づき回転量を求める。   With reference to the above rule, the rotation amount is obtained based on the edge detection shown in FIG.

すなわち、センサ[1][2]が交互にエッジを発生させていることを検出したとき、回転(○印)と判定する。センサで連続してエッジを検出した場合は、回転方向が反転したと判定する。   That is, when it is detected that the sensors [1] and [2] alternately generate edges, it is determined that the rotation is (circle). When the edge is continuously detected by the sensor, it is determined that the rotation direction is reversed.

上記判定の際にセンサ[1][2]が交互にエッジを発生しているかを確認するために、条件判断文を用いてしまうと、CPU占有率が高くなってしまう。そのため、可能な限り条件式を排除した処理を用いることが好ましい。   If a condition determination sentence is used to check whether the sensors [1] and [2] alternately generate edges during the above determination, the CPU occupancy rate increases. Therefore, it is preferable to use a process that eliminates conditional expressions as much as possible.

図45は、回転検出部2202の処理フローチャートである。図46は、その説明図(タイミングチャート)である。図46では、最初の1マスは初期設定状態にあり、ダイヤルJDは動いていない。次の6マスでは順方向に3ノッチ進み、次の6マスでは逆方向に3ノッチ戻っている。   FIG. 45 is a process flowchart of the rotation detection unit 2202. FIG. 46 is an explanatory diagram (timing chart) thereof. In FIG. 46, the first square is in the initial setting state, and the dial JD is not moving. The next 6 squares advance 3 notches in the forward direction, and the next 6 squares go back 3 notches in the reverse direction.

まず、順回転(図46の(ア)など)についての処理について説明する。処理の前には初期設定がされていて、順回転フラグ、逆回転フラグ、回転量のいずれもゼロであるとする。   First, processing for forward rotation (FIG. 46 (A) and the like) will be described. It is assumed that initialization has been performed before the processing, and all of the forward rotation flag, the reverse rotation flag, and the rotation amount are zero.

ダイヤルJDが回転して次のノッチに進むと前述のようにセンサ[1][2]の信号が変化する。   When the dial JD rotates and proceeds to the next notch, the signals of the sensors [1] and [2] change as described above.

まず、センサ[1]の信号が変化し(符号(ア1))、回転検出部2202は、論理和回路2203の出力に基づきエッジを検出する(S70でYES)。なお、論理和回路2203に代えて、符号2203に排他的論理回路を用いることもできる。原則として、センサ[1][2]の信号が同時に1になることはないので、排他的論理回路を用いても、論理和回路の場合と異ならない。   First, the signal of the sensor [1] changes (symbol (A1)), and the rotation detection unit 2202 detects an edge based on the output of the OR circuit 2203 (YES in S70). Note that an exclusive logic circuit can be used as the reference numeral 2203 instead of the OR circuit 2203. In principle, the signals of sensors [1] and [2] do not become 1 at the same time, so even if an exclusive logic circuit is used, it is not different from the case of an OR circuit.

エッジ検出器2201−1の出力に基づきセンサ[1]の信号が変化したと判定する(S71でYES)。   It is determined that the signal of the sensor [1] has changed based on the output of the edge detector 2201-1 (YES in S71).

回転量を求める(S72)。回転量は、前回の回転量から逆回転フラグを引いたものであるが、逆回転フラグがゼロなので回転量は変わらない。   A rotation amount is obtained (S72). The rotation amount is obtained by subtracting the reverse rotation flag from the previous rotation amount, but the rotation amount does not change because the reverse rotation flag is zero.

図45の例は回転量の+/−の符号に回転方向が対応している例である。図45の回転量ひとつで左右両方の回転に対応している。このため、S72では回転量から逆回転フラグを引いている。なお、左右それぞれに別々の回転量(変数)を与えるようにしてもよい。例えば、後述の図48及びその説明に示すように、逆回転量と順回転量という2つの変数を用いるようにしてもよい。この場合は逆回転量に逆回転フラグを加えている。   The example of FIG. 45 is an example in which the rotation direction corresponds to the sign of the rotation amount +/−. One rotation amount in FIG. 45 corresponds to both the left and right rotations. For this reason, in S72, the reverse rotation flag is subtracted from the rotation amount. In addition, you may make it give separate rotation amount (variable) to each of right and left. For example, as shown in FIG. 48 described later and the description thereof, two variables of a reverse rotation amount and a forward rotation amount may be used. In this case, a reverse rotation flag is added to the reverse rotation amount.

順回転フラグを求める(S73)。順回転フラグは、前回の逆回転フラグの論理を反転したもの(1と排他的論理和を求める)である。逆回転フラグはゼロなので、順回転フラグは1になる。   A forward rotation flag is obtained (S73). The forward rotation flag is obtained by inverting the logic of the previous reverse rotation flag (to obtain an exclusive OR with 1). Since the reverse rotation flag is zero, the forward rotation flag is 1.

逆回転フラグをゼロにする(S74)。   The reverse rotation flag is set to zero (S74).

センサ[1]の信号が先に変化したときは、上記処理により順回転と判定される。   When the signal from the sensor [1] changes first, it is determined that the rotation is forward by the above processing.

次に、センサ[2]の信号が変化する(符号(ア2))。しかし、エッジ検出器2201−1の出力は変化していないので、回転検出部2202は、センサ[1]の信号は変化していないと判定する(S71でNO)。   Next, the signal of the sensor [2] changes (sign (A2)). However, since the output of the edge detector 2201-1 has not changed, the rotation detector 2202 determines that the signal of the sensor [1] has not changed (NO in S71).

回転量を求める(S75)。回転量は、前回の回転量に順回転フラグを加えたものである。S73で順回転フラグが1になっているので回転量は+1される。   A rotation amount is obtained (S75). The rotation amount is obtained by adding a forward rotation flag to the previous rotation amount. Since the forward rotation flag is 1 in S73, the rotation amount is incremented by one.

逆回転フラグを求める(S76)。逆回転フラグは、前回の順回転フラグの論理を反転したもの(1と排他的論理和を求める)である。順回転フラグは1なので、逆回転フラグをゼロになる。   A reverse rotation flag is obtained (S76). The reverse rotation flag is obtained by inverting the logic of the previous forward rotation flag (to obtain an exclusive OR with 1). Since the forward rotation flag is 1, the reverse rotation flag is zero.

順回転フラグをゼロにする(S77)。   The forward rotation flag is set to zero (S77).

上記処理は、順回転の1シーケンスの判定処理である。符号(ア)の処理が終了した時点で順回転フラグ、逆回転フラグの両方がゼロとなり、初期状態に戻る。これにより次が順回転、逆回転のいずれであっても対応できるようになる。   The above process is a determination process for one sequence of forward rotation. When the process of sign (a) ends, both the forward rotation flag and the reverse rotation flag become zero, and the initial state is restored. As a result, it becomes possible to cope with whether the next is forward rotation or reverse rotation.

次に、逆回転(図46の(イ)など)についての処理について説明する。   Next, processing for reverse rotation (such as (A) in FIG. 46) will be described.

ダイヤルJDが回転して次のノッチに進むと前述のようにセンサ[1][2]の信号が変化する。   When the dial JD rotates and proceeds to the next notch, the signals of the sensors [1] and [2] change as described above.

まず、センサ[2]の信号が変化し(符号(イ1))、回転検出部2202は、論理和回路2203の出力に基づきエッジを検出する(S70でYES)。エッジ検出器2201−1の出力は変化していないので、回転検出部2202は、センサ[1]の信号は変化していないと判定する(S71でNO)。   First, the signal of sensor [2] changes (symbol (A1)), and rotation detection unit 2202 detects an edge based on the output of OR circuit 2203 (YES in S70). Since the output of the edge detector 2201-1 has not changed, the rotation detector 2202 determines that the signal of the sensor [1] has not changed (NO in S71).

回転量を求める(S75)。回転量は、前回の回転量に順回転フラグを加えたものである。順回転フラグはゼロであるので回転量は変化しない。   A rotation amount is obtained (S75). The rotation amount is obtained by adding a forward rotation flag to the previous rotation amount. Since the forward rotation flag is zero, the rotation amount does not change.

逆回転フラグを求める(S76)。逆回転フラグは、前回の順回転フラグの論理を反転したもの(1と排他的論理和を求める)である。順回転フラグはゼロなので、逆回転フラグを1になる。   A reverse rotation flag is obtained (S76). The reverse rotation flag is obtained by inverting the logic of the previous forward rotation flag (to obtain an exclusive OR with 1). Since the forward rotation flag is zero, the reverse rotation flag is set to 1.

順回転フラグをゼロにする(S77)。   The forward rotation flag is set to zero (S77).

次に、センサ[1]の信号が変化し(符号(イ2))、回転検出部2202は、論理和回路2203の出力に基づきエッジを検出する(S70でYES)。そして、エッジ検出器2201−1の出力に基づきセンサ[1]の信号が変化したと判定する(S71でYES)。   Next, the signal of the sensor [1] changes (symbol (A2)), and the rotation detection unit 2202 detects an edge based on the output of the OR circuit 2203 (YES in S70). And it determines with the signal of sensor [1] having changed based on the output of edge detector 2201-1 (it is YES at S71).

回転量を求める(S72)。回転量は、前回の回転量から逆回転フラグを引いたものであるが、逆回転フラグが1なので回転量は1だけ減少する。   A rotation amount is obtained (S72). The rotation amount is obtained by subtracting the reverse rotation flag from the previous rotation amount. However, since the reverse rotation flag is 1, the rotation amount is decreased by 1.

順回転フラグを求める(S73)。順回転フラグは、前回の逆回転フラグの論理を反転したものである。逆回転フラグは1なので、順回転フラグをゼロになる。   A forward rotation flag is obtained (S73). The forward rotation flag is obtained by inverting the logic of the previous reverse rotation flag. Since the reverse rotation flag is 1, the forward rotation flag is zero.

逆回転フラグをゼロにする(S74)。   The reverse rotation flag is set to zero (S74).

センサ[2]の信号が先に変化したときは、上記処理により逆回転と判定される。   When the signal of the sensor [2] changes first, it is determined that the rotation is reverse by the above processing.

上記処理は、逆回転の1シーケンスの判定処理である。符号(イ)の処理が終了した時点で順回転フラグ、逆回転フラグの両方がゼロとなり、初期状態に戻る。これにより次が順回転、逆回転のいずれであっても対応できるようになる。   The above process is a determination process for one sequence of reverse rotation. When the process of sign (a) is completed, both the forward rotation flag and the reverse rotation flag become zero, and the initial state is restored. As a result, it becomes possible to cope with whether the next is forward rotation or reverse rotation.

ところで、上記説明では2つのセンサ[1][2]のいずれかのエッジ検出で処理を開始していた(図42の論理和回路2203、図45のS70)。これに対し、図47に示すように2つのセンサ[1]と[2]それぞれについて判断を行うやり方も考えられる。   By the way, in the above description, the processing is started by detecting the edge of one of the two sensors [1] [2] (OR circuit 2203 in FIG. 42, S70 in FIG. 45). On the other hand, as shown in FIG. 47, a method of making a determination for each of the two sensors [1] and [2] is also conceivable.

しかし、図47のやり方には処理負荷が高くなるという問題が生じる。実際の処理において複数のサンプリング期間で検知可能な回転量(エッジ検出の回数)はそれ程多くなく、しかも、遊技機に対する実際の操作を考えるとジョグダイヤルは回転より停止時の方が頻度が高い。この実情を考慮すると、図45のように、停止状態を先に判定し、処理から除外させる(図45のS71乃至S77の処理を行わないようにする)ことの方が、図47の処理よりも、処理負荷を低くできる。   However, the method of FIG. 47 has a problem that the processing load increases. In actual processing, the amount of rotation (the number of times of edge detection) that can be detected in a plurality of sampling periods is not so much, and considering the actual operation on the gaming machine, the jog dial is more frequently stopped when it is stopped. Considering this situation, as shown in FIG. 45, it is better to determine the stop state first and exclude it from the processing (the processing of S71 to S77 of FIG. 45 is not performed) than the processing of FIG. However, the processing load can be reduced.

なお、実際にはほとんど発生しないが、センサ[1]とセンサ[2]で同時にエッジを検出することを考える(サンプリング処理を行っているので、ノッチの間隔がサンプリング周期を超えるような高速回転のときには同時検出があり得る)。このケースにおいて、図45の処理では、必ずセンサ[1]側の処理(S72乃至S74)を行うことになり、順回転となる(符号2203に論理和回路を用いている場合)。しかし、センサ[1]とセンサ[2]の同時エッジ検出は順回転とは限らないから、図45の処理によれば誤処理の可能性を否定できない。なお、符号2203に排他的論理和回路を用いている場合は同時エッジ検出でS72〜S74、S75〜S77いずれの処理も行わないから上記のような問題は生じないが、後述の回転監視用のパラメータの初期化(S102、S103)を行わないから、誤動作を完全に防止できないおそれがある。   Although it does not occur in practice, consider detecting edges simultaneously at sensor [1] and sensor [2] (since sampling processing is performed, high-speed rotation is performed so that the notch interval exceeds the sampling period. Sometimes there can be simultaneous detection). In this case, in the process of FIG. 45, the process on the sensor [1] side (S72 to S74) is always performed, and the forward rotation is performed (when an OR circuit is used for reference numeral 2203). However, since simultaneous edge detection of sensor [1] and sensor [2] is not necessarily forward rotation, the possibility of erroneous processing cannot be denied according to the processing of FIG. Note that when an exclusive OR circuit is used for the reference numeral 2203, the above-mentioned problem does not occur because the processing of S72 to S74 and S75 to S77 is not performed in the simultaneous edge detection. Since parameter initialization (S102, S103) is not performed, there is a possibility that malfunctions cannot be completely prevented.

上記問題を解決した処理フローチャートを図49及び図50に示す。これらの処理フローチャートは、図41に示した複数ビット(32ビット)についての処理を示す。   49 and 50 show processing flowcharts for solving the above problem. These processing flowcharts show processing for a plurality of bits (32 bits) shown in FIG.

S90:各センサのエッジを検出する。
上述のようにエッジ検出器2201−1、2201−2により、図41(c)のようなエッジ検出のデータを生成する。図41(c)のデータは、センサ[1]とセンサ[2]それぞれについて生成される。
S90: The edge of each sensor is detected.
As described above, the edge detectors 2201-1 and 201-2 generate edge detection data as shown in FIG. The data shown in FIG. 41C is generated for each of the sensor [1] and the sensor [2].

S91:両センサの重複エッジと排他エッジを求める。
センサ[1]のエッジデータとセンサ[2]のエッジデータの各ビットについて論理積を求め、これを重複エッジデータとする。重複エッジデータは、上記同時検出が生じたことを示すものである。
S91: Find overlapping edges and exclusive edges of both sensors.
A logical product is obtained for each bit of the edge data of the sensor [1] and the edge data of the sensor [2], and this is used as overlapping edge data. The overlapping edge data indicates that the simultaneous detection has occurred.

同様に、センサ[1]のエッジデータとセンサ[2]のエッジデータの各ビットについて排他的論理和を求め、これを排他エッジデータとする。排他エッジデータは、センサ[1]とセンサ[2]のいずれかでエッジ検出があったことを示すものである。上記同時検出が生じていたとしても演算結果はゼロになるので、センサ[1]のエッジデータとセンサ[2]のエッジデータが、いずれも、非検出と同時検出だけであれば排他エッジデータは全てゼロになる。   Similarly, an exclusive OR is obtained for each bit of the edge data of the sensor [1] and the edge data of the sensor [2], and this is used as exclusive edge data. The exclusive edge data indicates that edge detection has occurred in either sensor [1] or sensor [2]. Even if the above simultaneous detection occurs, the calculation result is zero, so if the edge data of sensor [1] and the edge data of sensor [2] are both non-detection and simultaneous detection only, the exclusive edge data is All become zero.

S92:排他エッジデータが全てゼロかどうか判定する。
排他エッジデータが全てゼロであれば(YES)、センサ[1]とセンサ[2]いずれも非検出(又は同時検出)であるから処理する必要はないので処理を終了する。
S92: It is determined whether the exclusive edge data is all zero.
If the exclusive edge data is all zero (YES), the sensor [1] and the sensor [2] are not detected (or detected simultaneously), so there is no need to process them, and the process ends.

そうでなければ(NO)、S93以降の処理を実行する。なお、これ以降の処理は複数のビット(32ビット)のMSB(最も古いデータ1ビット)について処理する。S104乃至S106でビットシフトすることによりMSB側から順番に処理を行っているので、S93以降の処理は図44、図45に示すような時間軸に沿った処理となる。   Otherwise (NO), the processing after S93 is executed. The subsequent processing is performed for a plurality of bits (32 bits) MSB (the oldest data 1 bit). Since the processing is sequentially performed from the MSB side by performing bit shift in S104 to S106, the processing after S93 is processing along the time axis as shown in FIGS.

ジョグダイヤルは必要な場合のみ操作されるものであり、エッジが検出されないことが比較的多いから、S92の処理を最初に行うことにより処理負荷を減らすことができる。   Since the jog dial is operated only when necessary and edges are not detected in many cases, the processing load can be reduced by performing the processing of S92 first.

なお、==は等号を示す。図48、図49においては=(代入)と区別して==という記号を用いている。   In addition, == shows an equal sign. 48 and 49, the symbol == is used to distinguish from = (substitution).

S93:重複エッジデータがセットされているかどうか判定する。
重複エッジデータのMSBがセット(=1)であれば(YES)、回転量の計算は行わない。しかし、エッジが重複しているときは回転方向を誤認する可能性が高く、あるいは誤動作である可能性が高いから、同条件が発生した場合は、回転監視用のパラメータを全て初期化する(S102,S103)。なお、MSB=1はマイナスの値を示すから、S93では、重複エッジ<0であるかどうかを判断している(S94、S95も同じ)。
S93: It is determined whether duplicate edge data is set.
If the MSB of the overlapping edge data is set (= 1) (YES), the rotation amount is not calculated. However, if the edges overlap, there is a high possibility that the rotation direction will be misidentified, or there is a high possibility of a malfunction, so if the same condition occurs, all the parameters for rotation monitoring are initialized (S102). , S103). Since MSB = 1 indicates a negative value, in S93, it is determined whether or not overlapping edge <0 (S94 and S95 are the same).

同時にエッジ検出が発生する状況は想定外の事象ではあるが、高速回転時には発生し得る。このような状況下では遊技者自体が回転量を把握していないと想定されるから、回転量の計算を行わないとしてもこのことによる多少の回転誤差は問題にならないと思われる。   The situation where edge detection occurs at the same time is an unexpected event, but can occur during high-speed rotation. Under such circumstances, it is assumed that the player itself does not grasp the amount of rotation, so even if the amount of rotation is not calculated, some rotation error due to this does not seem to be a problem.

なお、図面では、重複エッジデータがセットされているかどうかを、重複エッジデータの符号がマイナスであることで判定している。あるビットが1/0いずれであるかを判定するには予め特定のデータ(当該ビットのみ1で他は0のデータ)を用意し、これを比較対象のデータと演算することで行うが、データのMSBが1/0いずれかであるかはそれをレジスタに入れた状態で所定のフラグ(符号)をチェックすることで、より簡単に行える。そこで、S93、S94、S95ではデータの符号を判定することでMSBが1/0いずれであるかを判定している。1がマイナス、0がプラスを意味するからS93、S94、S95ではデータが1であるときにYESとなる。   In the drawing, whether or not overlapping edge data is set is determined by the sign of overlapping edge data being negative. In order to determine whether a certain bit is 1/0, specific data (only the relevant bit is 1 and the others are 0) is prepared in advance, and this is calculated by calculating the data to be compared. Whether the MSB is 1/0 can be more easily checked by checking a predetermined flag (sign) in a state where the MSB is put in a register. Therefore, in S93, S94, and S95, the MSB is determined to be 1/0 by determining the sign of the data. Since 1 means minus and 0 means plus, S93, S94, and S95 are YES when the data is 1.

S94:排他エッジデータがセットされているかどうか判定する。
排他エッジデータのMSBがセットされていなければ(=0、NO)、回転量の計算は行わない。
この処理は、図14のS70に対応する。
S94: It is determined whether exclusive edge data is set.
If the MSB of the exclusive edge data is not set (= 0, NO), the rotation amount is not calculated.
This process corresponds to S70 in FIG.

S95:センサ[1]で検出しているかどうか判定する。
センサ[1]のMSBのセット/リセット(1/0)に応じて処理が振り分けられる。
この処理は、図14のS71に対応する。
S95: It is determined whether it is detected by the sensor [1].
Processing is distributed according to the MSB set / reset (1/0) of the sensor [1].
This process corresponds to S71 in FIG.

S96乃至S101は、図14のS72乃至S77に対応するので、それらの説明は省略する。これらの処理により1ビットごとに回転量が求められる。次のビットの処理を行うためにS104乃至S106によりビットシフトを行う。   S96 to S101 correspond to S72 to S77 in FIG. With these processes, the rotation amount is obtained for each bit. In order to process the next bit, bit shift is performed in S104 to S106.

S104:排他エッジデータを1ビットだけMSB側へシフトして、次のデータを処理できるようにする。LSB側へはゼロを入れるようにする。
なお、<<=は左側(MSB)へのビットシフトを示し、数字はシフト量を示す。
S104: The exclusive edge data is shifted to the MSB side by 1 bit so that the next data can be processed. Zero is inserted in the LSB side.
<< = indicates a bit shift to the left side (MSB), and a number indicates a shift amount.

S105:センサ[1]のデータを1ビットだけMSB側へシフトして、次のデータを処理できるようにする。LSB側へはゼロを入れるようにする。 S105: The data of sensor [1] is shifted to the MSB side by 1 bit so that the next data can be processed. Zero is inserted in the LSB side.

S106:重複エッジデータを1ビットだけMSB側へシフトして、次のデータを処理できるようにする。LSB側へはゼロを入れるようにする。 S106: The overlapping edge data is shifted by 1 bit to the MSB side so that the next data can be processed. Zero is inserted in the LSB side.

S107:排他エッジデータが全てゼロかどうか判定する。
排他エッジデータが全てゼロであれば(YES)、これ以降についてはセンサ[1]とセンサ[2]いずれも非検出(又は同時検出)であるから処理する必要はないので、回転量を求める処理(S108)を行ってから本件処理を終了する。
S107: It is determined whether the exclusive edge data is all zero.
If the exclusive edge data is all zero (YES), the sensor [1] and the sensor [2] are not detected (or detected simultaneously) from this point onwards, so there is no need to process them. After performing (S108), the present process is terminated.

全てゼロではないとき(NO)処理すべきエッジデータが残っているので、S93に戻り処理を繰り返す。   If all of them are not zero (NO), there remains edge data to be processed, so the process returns to S93 to repeat the processing.

S107によれば処理対象(1であるビット)がなくなった時点で処理を終了できるので、ビット数(32ビット)だけ処理を繰り返すことを、常に行う必要がない。これにより処理負荷を軽減することができる。   According to S107, the processing can be terminated when there is no processing target (1 bit), and therefore it is not always necessary to repeat the processing by the number of bits (32 bits). As a result, the processing load can be reduced.

本実施の形態によれば、ジョグダイヤルの回転量(順回転量、逆回転量)の算出処理の前に、2つのセンサの出力の論理和(又は排他的論理和)に基づき回転量の算出処理を行うかどうか判定し、2つのセンサいずれについてもエッジが存在せず、回転量の算出処理の必要のないときはジョグダイヤルの回転量算出処理を直ちに抜けるようにしている。このため、ジョグダイヤルの回転方向及び角度の検知処理において、条件分岐命令の実行頻度を下げることができる。非操作の時間が多いジョグダイヤルの処理についてそのほとんどにおいて最初の条件分岐で処理を終了するようにできる。これにより、CPUの処理負荷を軽減することができる。   According to the present embodiment, the rotation amount calculation process based on the logical sum (or exclusive OR) of the outputs of the two sensors before the calculation process of the jog dial rotation amount (forward rotation amount, reverse rotation amount). If there is no edge in any of the two sensors and there is no need for the rotation amount calculation process, the jog dial rotation amount calculation process is immediately exited. For this reason, the execution frequency of the conditional branch instruction can be lowered in the process of detecting the rotation direction and angle of the jog dial. Most of the jog dial processes with a lot of non-operation time can be terminated at the first conditional branch. Thereby, the processing load on the CPU can be reduced.

また、順回転フラグ、逆回転フラグ、回転量の3つのパラメータを用いて回転検出し、回転量を求めるようにした。ノイズ等によりこれら3つのパラメータが同時に不正な値となる可能性は少ないから、3つのパラメータを用いることにより、ノイズによる誤検知を防止することができる。   In addition, rotation is detected by using three parameters, a forward rotation flag, a reverse rotation flag, and a rotation amount, and the rotation amount is obtained. Since there is little possibility that these three parameters become illegal values simultaneously due to noise or the like, erroneous detection due to noise can be prevented by using the three parameters.

ジョグダイヤルのセンサの監視は、回転情報を正確に認識するために高速でサンプリングを行うが、ジョグダイヤル自体は常に回転する(回転し続ける)デバイスではなく、各センサの信号変化はサンプリング間隔と比較して圧倒的に少ない。本実施の形態では、上記処理を行うことで、通常時(無回転時)の制御負荷を極力押さえ込むことができる。   The monitoring of the jog dial sensor performs sampling at high speed in order to accurately recognize the rotation information, but the jog dial itself is not a device that always rotates (continuously rotates), and the signal change of each sensor is compared with the sampling interval. Overwhelmingly few. In the present embodiment, by performing the above-described processing, it is possible to suppress the control load during normal time (no rotation) as much as possible.

また、センサ反応時の対応に於いても、条件分岐を極力削減しており、負荷軽減を図れる。   In response to sensor response, conditional branching is reduced as much as possible to reduce the load.

他にも、各信号を個別に判定した場合、センサのサンプリング間隔や信号誤検知によって同時にセンサ信号が変化すると、誤った回転検知を行ってしまう問題がある。本実施の形態では排他的論理和を用いることで、一方のセンサ[1]を有効として処理を行うようにしているので、特別な処理を行わずに前記問題を回避することが可能である。例えば、電波などの影響によって、同時にエッジが変化したとしても誤検知が生じない。また、センサが誤検知したときのリカバリ処理の軽量化を図れる。   In addition, when each signal is individually determined, there is a problem that erroneous rotation detection is performed if the sensor signal is changed simultaneously due to the sampling interval of the sensor or signal misdetection. In the present embodiment, the exclusive OR is used to perform the process with one sensor [1] being valid, so that the above problem can be avoided without performing a special process. For example, no false detection occurs even if the edge changes simultaneously due to the influence of radio waves or the like. Further, it is possible to reduce the weight of the recovery process when the sensor is erroneously detected.

<Vフレーム遅延サポート>
図10を参照して既に説明を加えたように、液晶表示装置に画像を表示する際に、描画データを保存してからその表示を実行するまでには、2つのVフレームに相当する時間を要する。このため、液晶表示装置の表示と音響(液晶制御基板200とスピーカ基板201)で同期させつつ行う演出については、それらの動作を一致させる必要がある(役物についての同期については前述した)。図10に示したように、液晶表示装置LCDに画像を表示する際には2フレーム(66.6ms)程度の遅延が生じる。このため、液晶表示の画面と音響について同期を取るためには、前記遅延に応じて処理を遅延させることが必要である。
<V frame delay support>
As already described with reference to FIG. 10, when an image is displayed on the liquid crystal display device, a time corresponding to two V frames is required after the drawing data is saved until the display is executed. Cost. For this reason, it is necessary to match the operations of the effects performed while synchronizing the display of the liquid crystal display device and the sound (the liquid crystal control board 200 and the speaker board 201) (synchronization of the accessory has been described above). As shown in FIG. 10, a delay of about 2 frames (66.6 ms) occurs when an image is displayed on the liquid crystal display device LCD. For this reason, in order to synchronize the screen and sound of the liquid crystal display, it is necessary to delay the processing according to the delay.

音響を発生するためのサウンドコマンドの書き込み(転送)は、図50に示すようにコマンドバッファ(前述の送信データレジスタ2102に相当)を介して行われる。サブ基板20のCPUが特定の音響を発生させるためのコマンドをコマンドバッファに書き込み、所定のタイミングでコマンドバッファからコマンドを読み出してスピーカ基板201(あるいはサブ基板200)の図示しない音響発生器(IC)へ送る。コマンドの転送は所定間隔(システム側のメインタスク処理に要する時間16.6ms)ごとに行われる。音響再生までに必要なコマンド数によって発音するまでの時間は変化するが、上述のように液晶表示装置の処理と比較すると1〜2Vフレーム程度先行する可能性がある。   Writing (transfer) of a sound command for generating sound is performed via a command buffer (corresponding to the transmission data register 2102 described above) as shown in FIG. A command for causing the CPU of the sub-board 20 to generate a specific sound is written in the command buffer, and the command is read from the command buffer at a predetermined timing, and the sound generator (IC) (not shown) of the speaker board 201 (or the sub-board 200) is shown. Send to. Command transfer is performed at predetermined intervals (time required for main task processing on the system side is 16.6 ms). Although the time until sound generation varies depending on the number of commands required until sound reproduction, there is a possibility that it is about 1 to 2 V frames ahead of the processing of the liquid crystal display device as described above.

コマンドバッファの登録のやり方として、排他式単一コマンド登録方式(図50のエ)と排他式一括コマンド登録方式(図50のオ)がある。   As a command buffer registration method, there are an exclusive single command registration method (D in FIG. 50) and an exclusive batch command registration method (e in FIG. 50).

「排他式」とは、コマンドバッファのオーバーフロー時の対応において、書き込みとして準備されたコマンドは、コマンドバッファに記録されないことを示す。「一括コマンド登録」については、音響発生器(IC)に登録したいコマンドを複数一括して登録することを示す。この際、登録途中にコマンドバッファでオーバーフローが発生した場合は、その発生寸前までのデータを登録する。一括登録の場合は登録済みのデータ数を呼び出し元に返すため、次回記録時は登録済みのデータを除いて設定することができる。   “Exclusive expression” indicates that a command prepared for writing is not recorded in the command buffer in response to an overflow of the command buffer. “Batch command registration” indicates that a plurality of commands to be registered in the sound generator (IC) are registered at once. At this time, if an overflow occurs in the command buffer during registration, data up to the point of occurrence is registered. In the case of batch registration, since the number of registered data is returned to the caller, it can be set excluding registered data at the next recording.

コマンドバッファに登録されている音響発生器(IC)へのコマンドは、基本的に無条件で音響発生器(IC)へ設定される。   A command to the sound generator (IC) registered in the command buffer is basically set unconditionally to the sound generator (IC).

音響発生器(IC)の異常を検出しリセットを行った場合は、コマンドバッファに登録されているデータを復帰前に全て初期化する。これは、初期化動作中はコマンドバッファからの出力を禁止するため、残データが蓄積されることになり、復帰時に一部の音が再生されるなどの不具合に繋がる可能性があるためである。   When an abnormality of the sound generator (IC) is detected and reset, all data registered in the command buffer are initialized before returning. This is because the output from the command buffer is prohibited during the initialization operation, so that the remaining data is accumulated and there is a possibility that a part of the sound is reproduced at the time of return. .

液晶表示の画面と音響について同期を取るために、前述の画像側の遅延に応じて音響処理を遅延させるようにするが、この遅延方式として、遅延量が固定である自動遅延型と、遅延量が可変である指定遅延型の2種類がある。図51は、これらの動作説明図である。   In order to synchronize the liquid crystal display screen and sound, the sound processing is delayed according to the above-mentioned delay on the image side. As this delay method, an automatic delay type in which the delay amount is fixed, and a delay amount There are two types of designated delay types in which the variable is variable. FIG. 51 is an explanatory diagram of these operations.

図51の自動遅延型は2Vフレーム遅延させるものであり、1乃至9のコマンドはそれぞれ2つ右隣のフレームにて取り出されている。   The automatic delay type in FIG. 51 delays 2V frames, and each of the commands 1 to 9 is taken out in the frame on the right by two.

図51の指定遅延型は、コマンドの1と2、6と7、8と9について遅延が指定されていないので、それらコマンドは同じフレームにて取り出されているが、3、4と5は遅延指定が行われているので、それぞれ2つ右隣のフレームにて取り出されている。   In the designated delay type of FIG. 51, since no delay is designated for commands 1 and 2, 6 and 7, and 8 and 9, those commands are extracted in the same frame, but 3, 4 and 5 are delayed. Since the designation has been made, each frame is taken out by two adjacent frames.

このように、コマンド設定(バッファ)書き込みに対して、自動/指定遅延型読み込みにてデータ取り出すことができる。図51では、自動/指定遅延型のサンプルとして最短読み出しタイミングのものを記載している。「遅延指定」は指定遅延型についてのみ有効である(遅延量は2Vフレーム遅延)。   In this way, data can be extracted by automatic / designated delay type reading for command setting (buffer) writing. In FIG. 51, the automatic / designated delay type sample with the shortest read timing is shown. “Delay designation” is valid only for the designated delay type (the delay amount is 2 V frame delay).

上記の自動/指定遅延型は混在使用できないので、どちらか一方を採用する。図51の例では2フレーム遅延を例として取り上げているが、フレーム遅延数は何フレームでも設定可能である。またnフレーム遅延時に変化するメモリ使用量は、n×4バイト(n個のアドレス記憶領域のみ)でるため、遅延数が増加してもメモリへの負担は少ない。   Since the above automatic / designated delay type cannot be used together, either one is adopted. In the example of FIG. 51, a two-frame delay is taken as an example, but any number of frame delays can be set. Further, since the memory usage that changes when n frames are delayed is n × 4 bytes (only n address storage areas), the burden on the memory is small even if the number of delays increases.

液晶表示の画面と音響について同期を取るための遅延は、自動/指定遅延型の選択と、遅延フレーム数(n)を決定すれば、遅延を意識せずにコマンドバッファにコマンドを登録することで自動的に発動する(指定遅延型の場合は登録前に遅延指定を行う必要がある)。   The delay to synchronize the LCD screen and sound can be determined by selecting the automatic / designated delay type and registering the command in the command buffer without being aware of the delay if the number of delay frames (n) is determined. Triggered automatically (if specified delay type, it is necessary to specify delay before registration).

次に、図51の遅延を実現するための処理について説明する。   Next, processing for realizing the delay of FIG. 51 will be described.

まず、自動遅延型の処理について、図52乃至図54を参照して説明を加える。
図52は、コマンドバッファに登録すべきコマンドを記憶しているコマンド記憶部(図7のデータレジスタ2101に相当)の記憶内容を示している。アドレス100乃至108に9つのコマンドCMD1乃至CMD9を記憶している(これは例示であり、もっと多くのコマンドを記憶することもできる)。
First, automatic delay processing will be described with reference to FIGS.
FIG. 52 shows the stored contents of a command storage unit (corresponding to the data register 2101 in FIG. 7) that stores commands to be registered in the command buffer. Nine commands CMD1 to CMD9 are stored at addresses 100 to 108 (this is an example, and more commands can be stored).

図53は、コマンドバッファ(図7の送信データレジスタ2102に相当)の構造を示している。コマンドバッファは先入れ先出しバッファ(FIFO)であり、W1に書き込まれたデータが、W2、W3と順番に移っていき、W3にあるコマンドが送信される(図7の送信シフトレジスタ2103に送られる)。データの移るタイミングはVフレームの切り替わりである。   FIG. 53 shows the structure of the command buffer (corresponding to the transmission data register 2102 in FIG. 7). The command buffer is a first-in first-out buffer (FIFO), and the data written in W1 moves in order of W2 and W3, and the command in W3 is transmitted (sent to the transmission shift register 2103 in FIG. 7). Data transfer timing is V frame switching.

図54は、図51の自動遅延型のコマンド1、2(CMD1、CMD2)の遅延の様子を示す。   FIG. 54 shows how the automatic delay commands 1 and 2 (CMD1, CMD2) in FIG. 51 are delayed.

図54(a)は、図51の1Vフレーム目でCMD1、CMD2がコマンドバッファのW1に書き込まれた状態を示す。   FIG. 54A shows a state in which CMD1 and CMD2 are written in the command buffer W1 in the 1V frame of FIG.

図54(b)は、図51の2Vフレーム目でCMD1、CMD2がW2に移動した状態を示す。   FIG. 54B shows a state in which CMD1 and CMD2 have moved to W2 in the 2V frame of FIG.

図54(c)は、図51の3Vフレーム目でCMD1、CMD2がW3に移動し、送信されることを示す。   FIG. 54 (c) shows that CMD1 and CMD2 move to W3 and are transmitted in the 3V frame of FIG.

以上のように、コマンドは自動的に2フレーム遅延して送信される。遅延の数はコマンドバッファの段数(W1乃至W3)に関係する。段数をひとつ増やして4つにすれば3フレーム遅延するようになり、段数をひとつ減らすと2フレーム遅延するようになる。   As described above, the command is automatically transmitted with a delay of two frames. The number of delays is related to the number of command buffer stages (W1 to W3). If the number of stages is increased by 1 to 4, the delay is 3 frames, and if the number of stages is decreased by 1, the delay is 2 frames.

次に、指定遅延型の処理について、図55及び図56を参照して説明を加える。   Next, the specified delay type processing will be described with reference to FIGS. 55 and 56. FIG.

指定遅延型では、図53の多段バッファにコマンドを書き込む代わりに、コマンド記憶部のアドレスを指定して読み出すようにしている。図55は、そのための読み出しテーブル(コマンドバッファに相当)の例を示す。同テーブルは上から順に(W1のW5の順番で)取り出され、これにしたがってコマンドが読み出される。同テーブルに記憶されているものはコマンド記憶部のアドレスである。W1は「101」であるが、これは101より若いアドレスのコマンドで未だ読み出されていないものを読み出すことを指示するものである。したがって、CMD1とCMD2が読み出される。同様に、W2「102」によりCMD3が読み出される。   In the designated delay type, instead of writing a command to the multistage buffer of FIG. 53, the address of the command storage unit is designated and read. FIG. 55 shows an example of a read table (corresponding to a command buffer) for that purpose. The table is taken out from the top (in the order of W1 to W5), and the command is read out accordingly. What is stored in the table is the address of the command storage unit. W1 is “101”, which indicates that a command having an address lower than 101 has not been read yet. Therefore, CMD1 and CMD2 are read out. Similarly, CMD3 is read by W2 “102”.

読み出しテーブルのW1乃至W5のどのデータ(アドレス)を取り出すかは、キュー(queue)で指定する。キューは、読み出しテーブルの例えばW1を取り出した後、自動的にW2に移るが、そのタイミングは遅延指定に従う。すなわち、遅延指定=0フレームであれば直ちに読み出しテーブルの次のデータに移動するが、遅延指定=1フレーム、2フレームであれば、それぞれ1フレーム、2フレーム後に読み出しテーブルの次のデータに移動する。   Which data (address) of W1 to W5 in the read table is to be taken out is designated by a queue. The queue automatically moves to W2 after taking out, for example, W1 from the read table, but the timing follows the delay designation. That is, if delay designation = 0 frame, the data immediately moves to the next data in the read table, but if delay designation = 1 frame, 2 frames, the data moves to the next data in the read table after 1 frame and 2 frames respectively. .

キューを用いた読み出しテーブルからのデータ取得と、コマンド送信について図56を参照して説明を加える。   Data acquisition from the read table using a queue and command transmission will be described with reference to FIG.

図56(a)は、コマンド送信を開始するために、読み出しテーブルの最初のデータW1にキューが位置している状態を示す。W1のアドレス=101であるので、自動遅延型の場合と同じように、図52のCMD1とCMD2が読み出される。そして、直ちに送信される。これは、図51の指定遅延型において、1Vフレーム目でCMD1、CMD2が設定されるとともに、当該フレームでCMD1、CMD2が送信されることに相当する。   FIG. 56A shows a state where a queue is located at the first data W1 of the read table in order to start command transmission. Since W1 address = 101, CMD1 and CMD2 in FIG. 52 are read out as in the case of the automatic delay type. And it is transmitted immediately. This is equivalent to setting CMD1 and CMD2 in the 1V frame and transmitting CMD1 and CMD2 in the frame in the designated delay type of FIG.

図56(b)は、図51の2Vフレーム目で2フレームの指定遅延を受け、この指定遅延のフレームである4Vフレーム目において、次のデータW2にキューが位置している状態を示す。これによりCMD3が読み出され、4Vフレーム目で送信される。   FIG. 56B shows a state in which a specified delay of 2 frames is received at the 2V frame in FIG. 51, and a queue is located at the next data W2 at the 4V frame that is the frame of the specified delay. As a result, CMD3 is read out and transmitted in the 4V frame.

図56(c)は、図51の3Vフレーム目で2フレームの指定遅延を受け、この指定遅延のフレームである5Vフレーム目において、次のデータW3にキューが位置している状態を示す。これによりCMD4乃至CMD6が読み出され、5Vフレーム目で送信される。次のW4については指定遅延がないので、キューは直ちにW4に移動し、CMD7が読み出され、送信される。図51の例ではCMD7は5Vフレーム目で送信されている。   FIG. 56 (c) shows a state in which a specified delay of 2 frames is received at the 3V frame in FIG. 51, and the queue is located at the next data W3 at the 5V frame which is the frame of this specified delay. As a result, CMD4 to CMD6 are read and transmitted in the 5V frame. Since there is no designated delay for the next W4, the queue immediately moves to W4, and CMD7 is read and transmitted. In the example of FIG. 51, CMD7 is transmitted in the 5V frame.

図56(d)は、次のW5については指定遅延がないので、キューは直ちにW5に移動し、CMD8及びCMD9が読み出され、送信される。図51の例ではCMD8及びCMD9は6Vフレーム目で送信されている。   In FIG. 56D, since there is no designated delay for the next W5, the queue immediately moves to W5, and CMD8 and CMD9 are read and transmitted. In the example of FIG. 51, CMD8 and CMD9 are transmitted in the 6V frame.

以上のように、指定遅延型においてコマンドは指定されたタイミングで送信される。   As described above, the command is transmitted at the designated timing in the designated delay type.

図57は、指定遅延型の送信制御部のブロック図を示す。   FIG. 57 is a block diagram of a designated delay type transmission control unit.

2300は、図52に示すようなアドレスごとにコマンドが記憶されているコマンド記憶部である。   A command storage unit 2300 stores commands for each address as shown in FIG.

2301は、コマンドの登録要求に応じてコマンドを読み出すとともに、遅延指定に従って読み出すタイミングを設定する読出制御部である。読出制御部2301は、図55のようなテーブルを内部に持ち、コマンド読出部2302に対してどのコマンドを読み出すかをアドレスで指定するものである。また、読出制御部2301は、その指定(キュー)を出力するタイミングを遅延指定に従って設定する。   Reference numeral 2301 denotes a read control unit that reads a command in response to a command registration request and sets a read timing in accordance with a delay designation. The reading control unit 2301 has a table as shown in FIG. 55, and designates which command is read to the command reading unit 2302 by an address. Also, the read control unit 2301 sets the timing for outputting the designation (queue) according to the delay designation.

2302は、読出制御部2301からの指示に基づきコマンドを読み出して送信部(図7の送信用シフトレジスタ2103)に渡すものである。読出制御部2301の動作については、図56を参照して既に説明した。   2302 reads a command based on an instruction from the read control unit 2301 and passes the command to the transmission unit (transmission shift register 2103 in FIG. 7). The operation of the read control unit 2301 has already been described with reference to FIG.

この本実施の形態によれば、先入れ先出しバッファにコマンド(音声データ)を書き込むのではなく、コマンドが格納されているアドレスを書き込み、これによる制御を、キューを用いて実現している。バッファを用いないので遅延量を任意に指定することができ、柔軟な制御を実現できる。   According to the present embodiment, the command (audio data) is not written to the first-in first-out buffer, but the address where the command is stored is written, and control by this is realized using the queue. Since no buffer is used, the amount of delay can be arbitrarily specified, and flexible control can be realized.

<電断処理>
ところで、処理部であるCPUは電源断において、予め定められた電源断予告信号の入力を契機として電源断退避処理を実行する。この処理は、電源断でもデータが失われないメモリに保存されているデータのチェックサムを求める処理を含むものである。
<Power interruption processing>
By the way, the CPU which is the processing unit executes the power-off saving process in response to the input of a predetermined power-off notice signal when the power is turned off. This process includes a process for obtaining a checksum of data stored in a memory that does not lose data even when the power is turned off.

CPUは、電源投入後のリセット信号の入力によりプログラム実行番地を所定番地とし、各種初期設定と共に、電源断でもデータが失われないメモリに保存されているデータを読みだして通常使用するワークメモリ上に展開するといった初期化処理を行う。上記電源断退避処理と初期化処理の2つの動作により、電源オフ前の状態のバックアップとこれに基づく電源オン後の復帰が実現される。つまり、遊技機の電源を投入すると電源断時の状態に戻るのである。   The CPU sets the program execution address to a predetermined address by inputting a reset signal after turning on the power, reads the data stored in the memory that does not lose data even when the power is turned off, along with various initial settings, on the work memory normally used Initialization processing such as expanding to The two operations of the power-off saving process and the initialization process realize a backup of the state before the power is turned off and a return after the power is turned on based on the backup. In other words, when the gaming machine is turned on, it returns to the power-off state.

図58は、サブ基板20と電源部の関係を示すブロック図である。なお、メイン基板10についても同様である。   FIG. 58 is a block diagram showing the relationship between the sub-board 20 and the power supply unit. The same applies to the main board 10.

PSは、交流電源(例えばAC24V)を受けて直流電源を生成する電源部である。   The PS is a power supply unit that receives an AC power supply (for example, AC 24 V) and generates a DC power supply.

サブ基板20で実行される遊技に係る処理は、ROMに予め記憶されたプログラムに従ってCPUが動作することで実行される。CPUは、処理を行う際に各種データを第1メモリM1に記憶させ、必要に応じて読み出し、処理を行い、必要に応じて再度記憶する、といった処理を行う。また、第2メモリM2は、バックアップ電源BAKによりバッテリバックアップを受けているので、電源断の間でもその記憶内容は保持されている。バックアップ電源BAKは、例えば、充電可能な二次電池である。   Processing related to the game executed on the sub-board 20 is executed by the CPU operating in accordance with a program stored in advance in the ROM. When performing the processing, the CPU stores various data in the first memory M1, reads as necessary, performs processing, and stores it again as necessary. Further, since the second memory M2 receives a battery backup from the backup power supply BAK, the stored contents are retained even during power-off. The backup power supply BAK is, for example, a rechargeable secondary battery.

第1メモリM1は、アクセス速度が第2メモリM2よりも速いが、電源断時にデータのバックアップが行われていないメモリ(ワークメモリ)である。第2メモリM2は、バックアップが可能なメモリ(バックアップ用メモリ)である。   The first memory M1 is a memory (work memory) whose access speed is faster than that of the second memory M2, but data is not backed up when the power is turned off. The second memory M2 is a backupable memory (backup memory).

通常の処理(電源断時の処理以外の処理)では、基本的に第1メモリM1が使用される。   In normal processing (processing other than power-off processing), the first memory M1 is basically used.

予め定められたタイミングで、第1メモリM1のデータのうち予め定められたものが第2メモリM2へ転送される。この例を以下に列挙する。   At a predetermined timing, a predetermined one of the data in the first memory M1 is transferred to the second memory M2. Examples of this are listed below.

・公知の設定処理中は第1メモリM1にデータを保存し、その設定が確定したときに第1メモリM1から第2メモリM2へデータを転送する。 During the known setting process, data is stored in the first memory M1, and when the setting is confirmed, the data is transferred from the first memory M1 to the second memory M2.

・サブ基板20がメイン基板10から所定のコマンドを受信したときに、これに対応する特定のデータを第1メモリM1から第2メモリM2へ転送する。 When the sub board 20 receives a predetermined command from the main board 10, specific data corresponding thereto is transferred from the first memory M 1 to the second memory M 2.

・電源投入時に予め定められたデータを第1メモリM1から第2メモリM2へ転送する。 Transfer predetermined data from the first memory M1 to the second memory M2 when the power is turned on.

なお、第2メモリM2には、他にも、バックアップフラグ、RAMチェックサム、不正行為に関するフラグ(不正リセットフラグなど)が記憶されることもある。   In addition, the second memory M2 may store a backup flag, a RAM checksum, and a flag relating to an illegal act (such as an illegal reset flag).

電源スイッチPSWがオンからオフにされると、電源部PSから電源断予告信号が出力される。この信号はCPUに対して、例えば割り込みをかけるものである。   When the power switch PSW is turned off from on, a power-off notice signal is output from the power supply unit PS. This signal gives an interrupt to the CPU, for example.

電源スイッチPSWがオンからオフにされても電源電圧はすぐには低下せず、電源スイッチPSWのオフからしばらく時間が経ってから電源電圧がゼロになる。したがって、CPUは電源断信号を受けてから電圧低下により動作を停止するまでの間に、一定の処理を行うことができる。   Even if the power switch PSW is turned off from the on state, the power source voltage does not drop immediately, and after a while after the power switch PSW is turned off, the power source voltage becomes zero. Therefore, the CPU can perform certain processing after receiving the power-off signal and before stopping the operation due to the voltage drop.

例えば、電源オンのとき電源断予告信号はHレベルであるが、それがHレベルからLレベルに変わると電源断を意味する。AC入力をオフにすると直流電圧がオフになるが、電源部や各回路に設けられているコンデンサ等の部品のために即時に電圧がゼロになることはない。例えば、電源電圧が一定値以下になると(例えばDC24V出力が18Vまで低下すると)、電源断予告信号がLレベルに変わる(それからDC5Vがオフになるまでにはさらに時間がかかる)。   For example, when the power is turned on, the power-off notice signal is at the H level, but when it changes from the H level to the L level, it means that the power is cut off. When the AC input is turned off, the DC voltage is turned off, but the voltage does not immediately become zero due to components such as capacitors provided in the power supply unit and each circuit. For example, when the power supply voltage falls below a certain value (for example, when the DC24V output decreases to 18V), the power-off notice signal changes to L level (and it takes more time before DC5V is turned off).

電源断予告信号を発生する回路として、電圧比較器(コンパレータ)を用いることができる。所望の電圧(例えば18V)の電池を用意しておき、この電圧とDC24Vの電源電圧を比較することで電源断予告信号を発生させることができる。この種の回路は公知であるので、詳しく説明しない。電源電圧を監視するための市販の専用ICもあるので、それを用いることもできる。   A voltage comparator (comparator) can be used as a circuit for generating a power-off notice signal. A battery with a desired voltage (for example, 18V) is prepared, and a power-off notice signal can be generated by comparing this voltage with the power supply voltage of DC24V. This type of circuit is well known and will not be described in detail. There is a commercially available dedicated IC for monitoring the power supply voltage, and it can be used.

あるいは、電源スイッチPSWと連動するスイッチ(あるいは接点)を用いて電源断予告信号を発生するようにしてもよい。   Or you may make it generate | occur | produce a power-off notice signal using the switch (or contact) linked with the power switch PSW.

遊技機は、図示しないが、電源投入を検知する電源投入検知部を備える。これは、例えば電源スイッチのオンを検知する装置(電源スイッチと連動するスイッチあるいは接点)である。電源断予告信号と同様に電圧比較器(コンパレータ)を用いて電源投入を検知することもできる。あるいは、電源電圧を監視するための市販の専用ICを使用してもよい。   Although not shown, the gaming machine includes a power-on detection unit that detects power-on. This is, for example, a device that detects whether a power switch is turned on (a switch or a contact that works in conjunction with the power switch). Similarly to the power-off notice signal, it is possible to detect power-on using a voltage comparator (comparator). Alternatively, a commercially available dedicated IC for monitoring the power supply voltage may be used.

<電断発生時の複数の処理の優先順位の変更>
以下の説明では、電源断を「電断」と記し、電源断退避処理を「電断処理」と記すことにする。
<Changing the priority of multiple processes when a power interruption occurs>
In the following description, the power interruption is referred to as “power interruption”, and the power interruption saving process is referred to as “power interruption process”.

ところで、最近のサブ基板20ではひとつのCPUが同時に複数の処理を実行するマルチプロセス方式が採用されるようになっている。複数の処理が同時に実行されているときの電断処理は、ひとつの処理の電断処理とは異なり、全部の処理が終了するのを待たなければならない。しかし、上述のように電断処理(バックアップ)を行える時間は限られているから、全部の処理の終了を待っていると電断処理が間に合わなくなることもある。電断処理を優先するために、実行されている処理を強制的に処理することもありえるが、すると打ち切られた処理が不完全となり、不具合の原因になりかねない。このため、マルチプロセス方式を採用しているサブ基板20においては、従来の遊技機とは異なる電断処理を行う必要がある。   By the way, the recent sub-board 20 adopts a multi-process method in which one CPU executes a plurality of processes at the same time. The power interruption process when a plurality of processes are executed simultaneously is different from the power interruption process of one process, and must wait for the completion of all processes. However, since the time for performing the power interruption process (backup) is limited as described above, the power interruption process may not be in time when waiting for the end of all the processes. In order to prioritize the power interruption process, the process being executed may be forcibly processed. However, the aborted process may become incomplete and may cause a problem. For this reason, in the sub board | substrate 20 which employ | adopts a multi-process system, it is necessary to perform the electrical disconnection process different from the conventional game machine.

マルチプロセス方式における電断処理の原理について、図59乃至図61を参照しつつ説明を加える。   The principle of the power interruption process in the multi-process method will be described with reference to FIGS.

例えば、優先度の高い順に処理A、処理B、・・・、処理Zとあり、その中で処理B、処理Cがバックアップ対象データへのアクセスを行うとする(図59)。   For example, there are processing A, processing B,..., Processing Z in descending order of priority, and it is assumed that processing B and processing C access the backup target data (FIG. 59).

ここで、処理B、処理Cにおいてバックアップ対象データへのアクセス中に電断が発生した場合、早急に処理を終了させて電断処理へ移行する必要があるが、アクセス終了前に処理B、処理Cより優先度の高い処理Aが割り込んだ場合、電断処理移行に遅延が発生する。   Here, when a power interruption occurs during access to the backup target data in the processes B and C, it is necessary to immediately terminate the process and shift to a power interruption process. When process A having a higher priority than C interrupts, a delay occurs in the transition to the power interruption process.

そこで、電断発生時にバックアップ対象データへのアクセスを行わない処理を一番低い優先度に変更する。例えば、処理Bと処理C以外の処理A、・・・、処理Zの優先度を低くする(図60)。優先度を低くするとは、バックアップ対象データへアクセスしている処理Bと処理Cの優先度のうちで低い方の優先度よりも、処理A、・・・、処理Zの優先度を下げるということであるが、簡単には最低の優先度(処理Zの優先度)に設定するようにしてもよい。また、処理A、・・・、処理Zが電断発生以降まったく必要のないものであれば、それら処理を休止状態にしても構わない(これも優先度を低くすることに含まれる)。これにより、処理Bと処理Cというバックアップ対象データへアクセスを行う処理が、当該アクセスを行わない処理A、・・・、処理Zによって中断されることがなくなる。   Therefore, the processing that does not access the backup target data when a power interruption occurs is changed to the lowest priority. For example, the priority of process A,..., Process Z other than process B and process C is lowered (FIG. 60). Lowering the priority means lowering the priority of process A,..., Process Z over the lower priority of process B and process C accessing the backup target data. However, the lowest priority (priority of processing Z) may be set easily. In addition, if the processes A,..., And the processes Z are not necessary at all after the occurrence of power interruption, the processes may be put into a dormant state (this is also included in lowering the priority). As a result, the processes B and C that access the backup target data are not interrupted by the processes A,...

バックアップ対象データへのアクセスを行う処理(処理Bと処理C)を監視し、アクセス中でない、もしくはアクセスが終了した時点で一番低い優先度に変更、もしくは休止状態にする。例えば、アクセスが終了した処理Bを休止状態にする(図61)。これによりバックアップ対象データへのアクセスが再度発生することがなくなり、電断処理への移行に際して遅延が発生することがなくなる。   The process (process B and process C) for accessing the data to be backed up is monitored, changed to the lowest priority when the access is not being performed or when the access is completed, or the hibernation state is set. For example, the process B that has been accessed is put into a dormant state (FIG. 61). As a result, access to the backup target data does not occur again, and no delay occurs when shifting to the power interruption process.

そして、アクセス中の処理が無くなった時点(処理Cのアクセスが終了した時点)で電断処理へと移行する。   Then, when there is no processing being accessed (when the access of process C is completed), the process proceeds to the power interruption process.

なお、アクセス中の電断を確実に禁止するために電断禁止フラグをセットするようにしてもよい。電断禁止フラグは、CPUが電断処理を開始する際に参照されるフラグであり、これがセットされているときは電断処理が開始されることがない(例えば、所定時間待機し、その後再びフラグをチェックすることが繰り返される)。電断禁止フラグは、例えば電源断予告信号によりセットされ、バックアップ対象データへのアクセスの可能性がなくなったときにリセットされる(例えば、図63のS115でYESとなったときにリセットされる)。   Note that a power interruption prohibition flag may be set in order to reliably prohibit power interruption during access. The power interruption prohibition flag is a flag that is referred to when the CPU starts power interruption processing. When this flag is set, the power interruption processing is not started (for example, after waiting for a predetermined time, and then again) Checking the flag is repeated). The power interruption prohibition flag is set by, for example, a power interruption notice signal, and is reset when there is no possibility of access to the backup target data (for example, it is reset when YES in S115 in FIG. 63). .

図62は、上記処理を行うための遊技機のブロック図(電断処理関係の部分のみを示す)である。同図の各ユニットはCPUが所定のプログラムを実行することで実現される機能ユニットである(ICなどのハードウエアであるバックアップ対象メモリを除く)。例えば、処理A、・・・、処理Zは複数の処理部(CPU)を意味するのではなく、ひとつのCPUで実現されるマルチプロセス処理のひとつひとつを機能的に表現したものである。なお、これらユニットの一部又は全部をハードウエアで構成することもできる。   FIG. 62 is a block diagram of the gaming machine for performing the above processing (only the portion related to the power interruption processing is shown). Each unit in the figure is a functional unit realized by the CPU executing a predetermined program (except for a backup target memory which is hardware such as an IC). For example, processing A,..., Processing Z does not mean a plurality of processing units (CPUs) but functionally expresses each of the multi-process processing realized by one CPU. Note that some or all of these units may be configured by hardware.

2400は、遊技に係るデータ(当選判定・入賞判定に関するフラグ)及び/又は前記演出に係るデータ(演出に関するフラグなど)を記憶するメモリである。このメモリ2400の内容がバックアップ対象となるので、「バックアップ対象メモリ2400」と表記している。他のデータを記憶するメモリ(ROM、RAM)が存在するが、それらについての表示は省略する。   Reference numeral 2400 denotes a memory that stores data related to games (flags related to winning determination / winning determination) and / or data related to the effects (flags related to effects, etc.). Since the contents of the memory 2400 are to be backed up, they are described as “backup target memory 2400”. There are memories (ROM, RAM) for storing other data, but the display thereof is omitted.

2401は、電断の際に、バックアップ対象メモリ2400のデータ(各種フラグなど)についてバックアップを行う電断処理部である。電断処理部2401の処理内容は公知であるので、その説明は省略する。   Reference numeral 2401 denotes a power interruption processing unit that backs up data (such as various flags) in the backup target memory 2400 when power is interrupted. Since the processing content of the power interruption processing unit 2401 is known, the description thereof is omitted.

2402は、複数の処理A、・・・、処理Zについての優先度を変更する優先度変更部2402aと、複数の処理A、・・・、処理Zの実行状態を監視する処理実行状態監視部2402bとを含み、複数の処理のうちの予め定められた処理A、・・・、処理Z(図59乃至図61の例では処理Bと処理C)の実行が終了した後に、電断処理部2401にバックアップを開始させる電断前置処理部である。   2402 includes a priority changing unit 2402a that changes priorities of a plurality of processes A,..., And a process Z, and a process execution state monitoring unit that monitors execution states of the plurality of processes A,. 2402b, and after the execution of a predetermined process A, ..., process Z (process B and process C in the example of FIGS. 59 to 61) of the plurality of processes is completed, 2401 is a power interruption preprocessing unit that starts backup.

2403は、電源部PSからの予め定められた信号(電断予告信号)に基づき電断前置処理部2402に処理を開始させる電断処理起動部である。   Reference numeral 2403 denotes a power interruption processing activation unit that causes the power interruption front processing unit 2402 to start processing based on a predetermined signal (power interruption notice signal) from the power supply unit PS.

電断前置処理部2402の処理実行状態監視部2402bは、電断処理起動部2403からの信号に基づき複数の処理A、・・・、処理Zの実行状態を調べ、これら複数の処理を、バックアップの対象となっているデータにアクセスしている処理(以下「第1処理」、図59乃至図61の処理Bと処理C)と、当該データにアクセスしていない処理(以下「第2処理」、処理Bと処理C以外の処理)とに区別する。   The process execution state monitoring unit 2402b of the power interruption preprocessing unit 2402 examines the execution states of the plurality of processes A,..., Z based on the signal from the power interruption process activation unit 2403, and performs the plurality of processes. A process accessing the data to be backed up (hereinafter “first process”, processes B and C in FIGS. 59 to 61) and a process not accessing the data (hereinafter “second process”). ", Processing B and processing other than processing C).

優先度変更部2402aにより、第2処理の優先度を第1処理の優先度よりも低く設定する(「低く」の意義については前述した)。   The priority changing unit 2402a sets the priority of the second process to be lower than the priority of the first process (the meaning of “low” has been described above).

処理実行状態監視部2402bは、第1処理を監視してその実行が終了したかどうか調べ、終了したときに電断処理部2410にバックアップを行わせる。第1処理が複数の処理を含むとき(図59乃至図61の処理Bと処理C)、第1処理の一部の処理(処理B)が終了したときに当該一部の処理の優先度を、残りの第1処理(処理C)の優先度よりも低くし、第1処理の全部の実行が終了したときに、電断処理部2401にバックアップを行わせる。   The process execution state monitoring unit 2402b monitors the first process to check whether or not the execution has been completed, and causes the power interruption processing unit 2410 to perform backup when the process is completed. When the first process includes a plurality of processes (process B and process C in FIGS. 59 to 61), when a part of the first process (process B) is completed, the priority of the part of the process is set. The priority is set lower than the priority of the remaining first process (process C), and when the entire execution of the first process is completed, the power interruption processing unit 2401 performs backup.

優先度変更部2402aは、図64に示すようなマルチプロセス処理に係る複数の処理A、・・・、処理Zそれぞれについて予め定められた優先度を保持する優先度テーブルを含む。第2処理の優先度を第1処理の優先度よりも低く設定するときに、例えば、予め定められた優先度のうちで最も低いものに設定する(処理Zの26よりも低い値=27)。こうすることで、もし処理Zが第1処理の場合にはこれが優先されるようにできる。図64において、数値の小さいものほど優先度が高いとする。優先度=1の処理は最も優先して実行される。   The priority changing unit 2402a includes a priority table that holds a predetermined priority for each of a plurality of processes A,... When the priority of the second process is set lower than the priority of the first process, for example, it is set to the lowest one of the predetermined priorities (value lower than 26 of process Z = 27). . In this way, if the process Z is the first process, this can be prioritized. In FIG. 64, it is assumed that the smaller the numerical value, the higher the priority. Processing with priority = 1 is executed with the highest priority.

図63は、図62の装置の処理フローチャートを示す。この処理は、電断処理起動部2403により起動される。   FIG. 63 shows a processing flowchart of the apparatus shown in FIG. This process is activated by the power interruption process activation unit 2403.

S110:処理実行状態監視部2402bが、バックアップ対象メモリ2400にアクセスを行っている処理(第1処理)と、アクセスを行っていない処理(第2処理)とを区別して認識する。 S110: The process execution state monitoring unit 2402b recognizes a process that accesses the backup target memory 2400 (first process) and a process that does not access (second process).

図59乃至図61の例では、第1処理=処理B、処理C、第2処理=処理A、処理Zなど、である。バックアップ対象メモリ2400にアクセス中の処理B、処理Cは、電断予告信号が発生したとしても直ちに処理を打ち切ることができない。処理を打ち切るとバックアップすべきデータ(フラグ)が正しく生成されない。   59 to 61, the first process = process B, process C, the second process = process A, process Z, and the like. The processes B and C that are accessing the backup target memory 2400 cannot be immediately terminated even if the power interruption notice signal is generated. If the process is terminated, the data (flag) to be backed up is not generated correctly.

S111:処理実行状態監視部2402bの監視結果に基づき、優先度変更部2402aが第2処理の優先度を最も低くする。 S111: Based on the monitoring result of the process execution state monitoring unit 2402b, the priority changing unit 2402a makes the priority of the second process the lowest.

優先度変更部2402aは、予め図64(a)に示すような優先度テーブルを備えている。これを、同図(b)のように、第2処理(処理B、処理C以外の処理)の優先度を低く(この例では最低の27)設定する。こうすることで、図60に示すように、処理B、処理C以外の処理の実行を抑制できる。   The priority changing unit 2402a includes a priority table as shown in FIG. 64 (a) in advance. As shown in FIG. 6B, the priority of the second process (processes other than process B and process C) is set low (27 in this example). By doing so, as shown in FIG. 60, execution of processes other than process B and process C can be suppressed.

S112:処理実行状態監視部2402bが、第1処理によるアクセス状況を監視する。 S112: The process execution status monitoring unit 2402b monitors the access status of the first process.

S113:第1処理のいずれかによるバックアップ対象メモリ2400へのアクセスが終了したら(YES)、S114に進む。 S113: When access to the backup target memory 2400 by any of the first processes is completed (YES), the process proceeds to S114.

S114:アクセスを終了した第1処理について、優先度変更部2402aが優先度を最も低くする。 S114: The priority changing unit 2402a sets the priority to the lowest for the first process for which access has been completed.

図64(c)の例では、処理Bの優先度=27としている。図61に示すように、処理Bについてこれ以降の処理の実行を抑制できる。   In the example of FIG. 64C, the priority of process B is 27. As shown in FIG. 61, execution of subsequent processing for processing B can be suppressed.

S115:全ての第1処理(処理B、処理C)について処理が終了したら(YES)、電断処理を開始し(S116)、残っている第1処理があれば、S113乃至S115を繰り返す。 S115: When all the first processes (process B, process C) are completed (YES), the power interruption process is started (S116), and if there is a remaining first process, S113 to S115 are repeated.

従来の遊技機において、電断発生時、バックアップ対象となるデータの処理中であれば、処理終了まで電断処理を遅延させるようにしていた。これに対し、複数の処理が同時に動作するマルチプロセス環境下において従来と同様の処理を行うようにすると、バックアップ対象となるデータを扱わないが、より優先度が高い処理が割り込むことがあり、これが遅延時間の増大を招き、安定した電断処理を行うことができなくなる。これに対し、本実施の形態によれば、遅延時間の増大を極力押さえ、安定した電断処理を行うことができるようになる。   In a conventional gaming machine, when a power interruption occurs, if data to be backed up is being processed, the power interruption process is delayed until the end of the process. On the other hand, if the same processing as before is performed in a multi-process environment in which multiple processes operate simultaneously, the data to be backed up will not be handled, but processing with higher priority may be interrupted. The delay time increases, and stable power interruption processing cannot be performed. On the other hand, according to the present embodiment, an increase in the delay time can be suppressed as much as possible, and a stable power interruption process can be performed.

すなわち、本実施の形態によれば、電断発生を検知すると、バックアップ対象となるデータにアクセスしない処理を低い優先度もしくは休止状態へ変更するとともに、バックアップ対象となるデータにアクセスする処理についても監視を行い、データヘのアクセスを行っていない安全なタイミングにおいて当該処理を低い優先度もしくは休止状態へ変更する。これによりバックアップ対象となるデータに関する処理を速やかに終了させ、当該データを電断処理へ遅延なく渡すことができ、安定した電断処理が実現できる。なお、安全なタイミングとは、バックアップすべきデータを正しく生成でき、当該データを電断処理へ渡しても支障のない時点のことである。安全なタイミング以外で処理を打ち切ると生成されたデータに矛盾が生じるなど不具合が生じるおそれがある。これにより、バックアップにかかる時間を最小限に抑え、安定した電断処理を行うことができる。   That is, according to the present embodiment, when the occurrence of a power interruption is detected, the process that does not access the data to be backed up is changed to a low priority or hibernation state, and the process to access the data to be backed up is also monitored. And the processing is changed to a low priority or a dormant state at a safe timing when data is not accessed. As a result, the processing related to the data to be backed up can be promptly terminated, and the data can be passed to the power interruption process without delay, and a stable power interruption process can be realized. The safe timing is a time when data to be backed up can be correctly generated and there is no problem even if the data is passed to the power interruption process. If the processing is terminated at a timing other than safe timing, there is a possibility that a problem such as inconsistency occurs in the generated data. Thereby, the time required for backup can be minimized, and stable power interruption processing can be performed.

<電断処理中の電圧回復時における処理の中断リセット(瞬断対策)>
マルチプロセス処理において、その並列処理を実現するために所定間隔(例えば512μsごとに)タイマ割り込みを行っており各処理(プロセス)はタイマを契機に起動される。この点は電断退避処理も同様である。
<Process interruption reset when voltage is restored during power interruption (measures for instantaneous interruption)>
In multi-process processing, timer interruption is performed at predetermined intervals (for example, every 512 μs) in order to realize the parallel processing, and each processing (process) is started with a timer. This also applies to the power interruption saving process.

マルチプロセス処理における電断退避処理の動作は概ね次のようになる。電源断予告信号(あるいは電源電圧低下を示す信号)により特定の割り込み(NMI)が発生し、これに対応する処理により電源断フラグ(電断フラグ)がセットされる。タイマ割り込みにより電断退避処理が起動され、上記のような所定の処理が行われる。そして、前記電断退避処理を完了した後、CPUは待機状態(無限ループ状態)になりそこで電源が完全にオフになることで動作を停止する。   The operation of the power interruption saving process in the multi-process process is generally as follows. A specific interrupt (NMI) is generated by a power-off notice signal (or a signal indicating a drop in power supply voltage), and a power-off flag (power-off flag) is set by processing corresponding to this. The interruption interruption process is activated by the timer interrupt, and the predetermined process as described above is performed. Then, after completing the power interruption saving process, the CPU enters a standby state (infinite loop state), where the power is completely turned off to stop the operation.

電断退避処理において、例えば、ノイズなどの原因により電源電圧が一時的に低下し電源断予告信号が発生したものの、その後電源電圧が復帰したような場合(これは瞬断と呼ばれる)についても対応できる必要がある。電断退避処理を完了した後、CPUは待機状態にあり、そこから復帰できなくなることを避ける必要がある。   In the power interruption saving process, for example, the power supply voltage is temporarily lowered due to noise or the like and a power interruption notice signal is generated, but the power supply voltage is restored after that (this is called instantaneous interruption) It needs to be possible. After completing the power interruption saving process, the CPU is in a standby state, and it is necessary to avoid the situation where it cannot be recovered from there.

なお、マルチプロセス処理でない従来の遊技機では、電源断予告信号に基づく割り込みにより電源断退避処理を行っており、電源が復帰した際には同様の割り込み処理で復帰することができる。これに対し、マルチプロセス処理においてタイマ割り込みにより各処理が起動されるので、瞬断に対する特別な対策が必要である。   Note that in conventional gaming machines that are not multi-process processing, power-off saving processing is performed by interruption based on a power-off notice signal, and when power is restored, it can be restored by similar interruption processing. On the other hand, since each process is started by a timer interrupt in the multi-process process, a special measure against an instantaneous interruption is necessary.

また、マルチプロセス処理において、電源断退避処理の後に、電源断退避処理直前の処理に戻すためには複雑な手順を必要とし、実際上そのような処理は困難である。   Further, in the multi-process process, a complicated procedure is required to return to the process immediately before the power-off save process after the power-off save process, and such a process is actually difficult.

図65は、マルチプロセス処理下においていわゆる瞬断が発生したときでも遊技機を動作状態に復帰させるための装置のブロック図を示す。   FIG. 65 shows a block diagram of an apparatus for returning a gaming machine to an operating state even when a so-called instantaneous interruption occurs under multi-process processing.

なお、電断処理部2401、2402は、図62の電断処理部2401と電断前置処理部2402に相当する。図面を見やすくするために図65において2401と2402をひとつのブロックとして示している。「電断前置処理部」の表記は省略しているが、図65の装置の処理において電断処理部2401と電断前置処理部2402を一体として扱って支障はない。電断処理起動部2403は、図62に示されたものと同じものである。   The power interruption processing units 2401 and 2402 correspond to the power interruption processing unit 2401 and the power interruption preprocessing unit 2402 in FIG. In FIG. 65, 2401 and 2402 are shown as one block for easy viewing of the drawing. Although the notation of “electricity cutting pretreatment unit” is omitted, there is no problem in handling the electric power interruption processing unit 2401 and the electric interruption pretreatment unit 2402 as a unit in the processing of the apparatus of FIG. The power interruption processing activation unit 2403 is the same as that shown in FIG.

2500は、電断処理起動部2403によりセット/リセットされる電断フラグ記憶部である。電断フラグは、例えば電源電圧が低下したときセットされ、電源電圧が復帰したときリセットされる。あるいは、電源スイッチがオフになったときセットされ、電源スイッチがオンになったときリセットされる。   2500 is a power interruption flag storage unit set / reset by the power interruption processing activation unit 2403. The power interruption flag is set, for example, when the power supply voltage is lowered, and is reset when the power supply voltage is restored. Alternatively, it is set when the power switch is turned off and reset when the power switch is turned on.

2501は、所定間隔(例えば512μsごとに)で複数の処理の実行の契機となる割り込み信号を出力する割り込みタイマーである。割り込みタイマー2500により起動される処理は複数あるが、簡単のため同図では電断処理部2401、2402のみを示している。   An interrupt timer 2501 outputs an interrupt signal that triggers execution of a plurality of processes at a predetermined interval (for example, every 512 μs). Although there are a plurality of processes activated by the interrupt timer 2500, only the power interruption processing units 2401 and 2402 are shown in FIG.

2502は、予め定められた動作が行われていないときにリセット信号を出力するウォッチドッグタイマーである。   Reference numeral 2502 denotes a watchdog timer that outputs a reset signal when a predetermined operation is not performed.

ウォッチドッグタイマー (watchdog timer) は、コンピュータの異常動作(ハングアップ、フリーズなど)を検知する装置である。プログラムがハングアップなどの不正な状態に陥ってしまい規則的なウォッチドッグ操作が行なわれなかった(タイムアウト)場合に、例外処理が実行される。例外処理は、ハングアップしたシステムを正常動作に戻すことを目的としてシステムをリセットする場合が多いが、電源切断によりシステムを強制停止させるものや電源を切断した後に再投入するものもある。   The watchdog timer is a device that detects abnormal computer operations (hangup, freeze, etc.). Exception handling is executed when a regular watchdog operation is not performed (timeout) due to an illegal state such as a hang-up. In exception handling, the system is often reset for the purpose of returning the hung-up system to normal operation, but there are also cases in which the system is forcibly stopped by turning off the power supply and that the system is turned on again after the power supply is turned off.

例えば、CPUは動作中に常にカウント動作を行っており、ウォッチドッグ操作は当該カウンタを一定周期でクリアする(リセットする)処理である。何らかの理由でカウンタがリセットされず所定値に達したとき(オーバーフローなど)、リセット処理(例外処理)が行われるようになっている。   For example, the CPU always performs a counting operation during the operation, and the watchdog operation is a process of clearing (resetting) the counter at a certain period. When the counter is not reset for some reason and reaches a predetermined value (overflow or the like), reset processing (exception processing) is performed.

2503は、前記カウンタをリセットするウォッチドッグタイマクリア部である。   Reference numeral 2503 denotes a watchdog timer clear unit that resets the counter.

電断処理部2401,2402は、割り込みタイマー2501の出力に基づき電断フラグを調べ、これがセットされているときに、バックアップを行うとともに、バックアップを完了した後に、電断フラグを調べ、電断フラグがセットされているときはウォッチドッグタイマー2502をリセットし、電断フラグがセットされていないときはリセットを行わない。   The power interruption processing units 2401 and 2402 check the power interruption flag based on the output of the interrupt timer 2501, perform backup when the flag is set, and check the power interruption flag after completing the backup, When is set, the watchdog timer 2502 is reset, and when the power interruption flag is not set, reset is not performed.

図66は、図65の装置のフローチャートである。この図は瞬断対策処理の部分のみを示している。
図67及び図68は、図65の装置の動作説明図(タイミングチャート)である。
FIG. 66 is a flowchart of the apparatus shown in FIG. This figure shows only the instantaneous interruption countermeasure processing portion.
67 and 68 are operation explanatory diagrams (timing charts) of the apparatus of FIG.

以下、図66乃至図68を参照して、図65の装置の動作について説明を加える。   The operation of the apparatus shown in FIG. 65 will be described below with reference to FIGS. 66 to 68.

図67(a)は、瞬断がなく正常に電源断が行われるケースを示す。   FIG. 67 (a) shows a case where the power supply is normally cut off without instantaneous interruption.

電源スイッチオフにより電圧が低下すると、時刻t1において電断処理起動部2403により電断フラグがセットされる。   When the voltage drops due to the power switch being turned off, the power interruption process starting unit 2403 sets the power interruption flag at time t1.

割り込みタイマー2501により時刻t2において電断処理部2401,2402が起動され、電断処理が開始される。この処理は時刻t3で完了する。その後、動作停止まで待機状態となる。   The power interruption processing units 2401 and 2402 are activated by the interrupt timer 2501 at time t2, and the power interruption processing is started. This process is completed at time t3. Then, it will be in a standby state until operation stops.

すなわち、電断フラグを調べる(図66のS121)。図67(a)では電圧が低下し続けているから電断フラグはセットされたままである(NO)。ウォッチドッグタイマー2502がクリアされる(S122)。このためウォッチドッグタイマー2502によるリセットは行われない。   That is, the power interruption flag is checked (S121 in FIG. 66). In FIG. 67 (a), since the voltage continues to drop, the power interruption flag remains set (NO). The watchdog timer 2502 is cleared (S122). For this reason, the reset by the watchdog timer 2502 is not performed.

S121でNO、S122の処理か繰り返されているうちに、時刻t4で電圧が十分に低下してCPUの動作が停止する。   While the processes of NO and S122 are repeated in S121, the voltage is sufficiently lowered at time t4 and the operation of the CPU is stopped.

図67(b)は、ごく短い瞬断(例えば割り込みタイマーの周期よりも短い)が生じたケースを示す。   FIG. 67B shows a case where a very short interruption (for example, shorter than the interrupt timer period) has occurred.

ノイズ等により時刻t5で電圧が低下したが、すぐに時刻t6で電圧が復帰している。時刻t5で電断フラグがセットされるが、時刻t6でリセットされている。時刻t5からt6の間でタイマー割り込みが発生していないので電断処理部2401、2402は起動しない。   Although the voltage dropped at time t5 due to noise or the like, the voltage immediately recovered at time t6. The power interruption flag is set at time t5, but is reset at time t6. Since no timer interrupt has occurred between time t5 and t6, the power interruption processing units 2401 and 2402 are not activated.

図68は、電断処理部2401、2402が起動する程度に長い瞬断が生じたケースを示す。同図(a)は電断処理を完了するために要する時間よりも瞬断が長いケースであり、同図(b)はそれよりも短いケースを示す。   FIG. 68 shows a case where a momentary interruption that is long enough to activate the power interruption processing units 2401 and 2402 occurs. FIG. 4A shows a case where the instantaneous interruption is longer than the time required to complete the power interruption process, and FIG. 4B shows a case where the instantaneous interruption is shorter.

図68(a)において、何らかの原因により電圧が低下すると、時刻t1において電断処理起動部2403により電断フラグがセットされる。   In FIG. 68 (a), when the voltage drops for some reason, the power interruption processing activation unit 2403 sets the power interruption flag at time t1.

割り込みタイマー2501により時刻t2において電断処理部2401,2402が起動され、電断処理が開始される。この処理は時刻t3で完了する。その後、S121のNO、S122による待機状態となる。   The power interruption processing units 2401 and 2402 are activated by the interrupt timer 2501 at time t2, and the power interruption processing is started. This process is completed at time t3. Then, it will be in the standby state by NO of S121 and S122.

何らかの理由により電圧が復帰すると、時刻t1でセットされた電断フラグが、時刻t7でリセットされている。これを受けて、時刻8以降においてS121でYESとなり、無限ループとなる。S122によるウォッチドッグタイマーのリセットは行われない。   When the voltage is restored for some reason, the power interruption flag set at time t1 is reset at time t7. In response, after time 8, YES in S121, an infinite loop is entered. The watchdog timer is not reset in S122.

このため時刻t9においてウォッチドッグリセットが行われ、CPUは再起動され、通常処理を行うようになる。   Therefore, a watchdog reset is performed at time t9, the CPU is restarted, and normal processing is performed.

図68(b)においても同様に、電断フラグが時刻t7’でリセットされ、時刻t8’以降においてS121でYESとなり、無限ループとなる。S122によるウォッチドッグタイマーのリセットは行われないから、時刻t9’においてウォッチドッグリセットが行われ、CPUは再起動され、通常処理を行うようになる。   Similarly in FIG. 68 (b), the power interruption flag is reset at time t7 ', and after time t8', YES is obtained in S121 and an infinite loop is entered. Since the watchdog timer is not reset in S122, the watchdog reset is performed at time t9 ', and the CPU is restarted to perform normal processing.

以上のように、本実施の形態によれば、電断処理部が、バックアップを完了した後に電断フラグを調べ、当該電断フラグがセットされているときはウォッチドッグタイマーをリセットし、当該電断フラグがセットされていないときはリセットしないので、瞬断によりバックアップを行ったときでも電源復帰後に自動的にリセットを行うことができる。したがって、遊技機のハングアップ、フリーズを避けることができ、遊技機の手動の電源オンオフという面倒な作業を行わなくて済む。   As described above, according to the present embodiment, the power interruption processing unit checks the power interruption flag after completing the backup, and resets the watchdog timer when the power interruption flag is set. Since the reset is not performed when the disconnection flag is not set, the reset can be automatically performed after the power is restored even when the backup is performed by an instantaneous disconnection. Therefore, hang-up and freezing of the gaming machine can be avoided, and the troublesome work of manually turning on / off the gaming machine can be eliminated.

本実施の形態によれば、マルチプロセス処理下においていわゆる瞬断が発生したときでも遊技機を動作状態に復帰させることができる。   According to this embodiment, even when a so-called instantaneous interruption occurs under multi-process processing, the gaming machine can be returned to the operating state.

図69及び図70は比較例である。これらはウォッチドッグタイマーとウォッチドッグタイマクリア部を備えていない。   69 and 70 are comparative examples. These do not have a watchdog timer and a watchdog timer clear section.

この比較例では、電断処理(バックアップ)までは同じであるが、その後待機状態(無限ループ状態)となる。何らかの理由により電圧が復帰すると、電断フラグが、時刻t7でリセットされるが、無限ループ状態になっていてリセットされない。このためハングアップ、フリーズが生じてしまう。   In this comparative example, the process up to the power interruption process (backup) is the same, but then the standby state (infinite loop state) is entered. When the voltage is restored for some reason, the power interruption flag is reset at time t7, but is in an infinite loop state and is not reset. This causes hang-up and freeze.

<電断発生時における処理の抑制>
他の実施形態について説明を加える。
図71は、この本実施の形態に係るブロック図を示す。同図は、図62に対応するものであり、同一又は相当部分については同一符号を付し、その説明は省略する。
<Suppression of processing when power interruption occurs>
Another embodiment will be described.
FIG. 71 shows a block diagram according to the present embodiment. This figure corresponds to FIG. 62, and the same or corresponding parts are denoted by the same reference numerals, and the description thereof is omitted.

処理実行状態監視部2042が監視対象としているのは、外部のデバイスと通信を行う処理(以下「通信処理」)である。図71においては便宜上、処理Aと処理Bが該当するものとする。外部のデバイスとは、液晶制御基板200、スピーカ基板201、LED基板、可動体制御部60などである。   The process execution state monitoring unit 2042 is a process to be monitored (hereinafter, “communication process”) for communicating with an external device. In FIG. 71, processing A and processing B correspond to each other for convenience. The external devices are the liquid crystal control board 200, the speaker board 201, the LED board, the movable body control unit 60, and the like.

前記通信処理は、サブ基板20から周辺基板(デバイス)へ信号を送り制御するとともに、当該周辺基板からそのステータス情報を受信するといった処理を行う。電断発生時、バックアップ対象となる処理が通信中あるいは通信を開始しようとしていた場合には、通信内容を取りこぼすおそれがあり、このためデータのバックアップを正常に行うことができず、電断退避処理が不完全になるおそれがある。これでは電源再投入後の動作に瑕疵が生じてしまう。そこで、以下に説明する装置構成・処理手順により、通信中あるいは通信を開始しようとしている処理についても電断退避処理を適切に行い、電源再投入後の動作を正常に行えるようにする。   In the communication process, a signal is sent from the sub-board 20 to the peripheral board (device) and controlled, and status information is received from the peripheral board. If a process to be backed up is in communication or is about to start communication when a power outage occurs, there is a risk of losing the communication content, so data backup cannot be performed normally and power outage is saved. Processing may be incomplete. This causes a wrinkle in the operation after the power is turned on again. In view of the above, by the apparatus configuration and processing procedure described below, a power interruption saving process is appropriately performed even for a process that is in communication or about to start communication so that the operation after the power is turned on again can be performed normally.

2402cは、通信処理について予め定められたタイムラグを設定するタイムラグ設定部である。タイムラグとは、通信処理が通信を開始しようとしてから実際に通信を開始するまでに要する時間である。図71の例では、処理A、処理Bが通信を開始しようとして通信プロトコルを開始してから電断抑制フラグをセットするまでの時間である。タイムラグをセットすることにより、通信開始直後に電断退避処理を行い、通信データの取りこぼしを防止できる。   Reference numeral 2402c denotes a time lag setting unit that sets a predetermined time lag for communication processing. The time lag is the time required for the communication process to start communication after attempting to start communication. In the example of FIG. 71, it is the time from the start of the communication protocol when the process A and the process B start communication to the time when the power interruption suppression flag is set. By setting the time lag, it is possible to perform a power interruption saving process immediately after the start of communication, and prevent communication data from being lost.

2402dは、通信処理についてのバックアップを行う時間が不足したことを示すタイムアウトエラーフラグを記憶するタイムアウトエラーフラグ記憶部である。   A time-out error flag storage unit 2402d stores a time-out error flag indicating that the time for performing backup for communication processing is insufficient.

電源断信号を受けてから電圧低下により動作を停止するまでの間にCPUが行う処理は次のものである。
(処理1)現在実行中の処理を中止するか、又は、その処理の終了を待つ。
(処理2)通常の処理に代えて、電源断退避処理を実行する。
The processing performed by the CPU after receiving the power-off signal and before stopping the operation due to the voltage drop is as follows.
(Processing 1) The processing currently being executed is stopped or the end of the processing is awaited.
(Process 2) A power-off saving process is executed instead of the normal process.

(処理1)と(処理2)の合計時間は、「電源断信号を受けてから電圧低下により動作を停止するまでの時間」よりも短くなければならない。   The total time of (Process 1) and (Process 2) must be shorter than “the time from when the power-off signal is received until the operation is stopped due to the voltage drop”.

タイムアウトエラーフラグは、(処理1)が長くなりすぎたため、(処理1)と(処理2)の合計時間は、「電源断信号を受けてから電圧低下により動作を停止するまでの時間」よりも長くなったこと、このためバックアップが不完全である可能性を示すものである。タイムアウトエラーフラグに関する処理については後述する。   The time-out error flag is that (Process 1) is too long, so the total time of (Process 1) and (Process 2) is longer than the “time from when the power is cut off until the operation is stopped due to voltage drop”. This indicates that the backup may be incomplete. Processing related to the timeout error flag will be described later.

2600a、2600bは、通信処理を行っているので電断処理を禁止(抑制)するための電断抑制フラグを記憶する電断抑制フラグ記憶部である。処理A、処理Bが通信を開始した後に電断抑制フラグはセットされる。通信処理の開始から電断抑制フラグのセットまでには若干の時間遅延があるが、これは前記タイムラグよりも短い。言い換えれば、前記タイムラグは前記時間遅延の最大値以上になるように設定されている。   Reference numerals 2600a and 2600b denote power interruption suppression flag storage units for storing a power interruption suppression flag for prohibiting (suppressing) the power interruption process since the communication process is performed. The power interruption suppression flag is set after the processes A and B start communication. There is a slight time delay from the start of the communication process to the setting of the power interruption suppression flag, which is shorter than the time lag. In other words, the time lag is set to be equal to or greater than the maximum value of the time delay.

図72は、図71の装置のフローチャートである。この図は通信処理対策の部分のみを示している。
図73乃至図75は、図72の装置の動作説明図(タイミングチャート)である。
72 is a flowchart of the apparatus shown in FIG. This figure shows only the communication processing countermeasure part.
73 to 75 are operation explanatory diagrams (timing charts) of the apparatus of FIG.

以下、図72乃至図75を参照して、図72の装置の動作について説明を加える。   The operation of the apparatus shown in FIG. 72 will be described below with reference to FIGS. 72 to 75.

図73は、電断処理起動部2403の出力に基づき電断フラグがセットされた時点において、通信が行われていなかったケース(電断抑制フラグがセットされていなかったケース)を示す。   FIG. 73 shows a case where communication was not performed (a case where the power interruption suppression flag was not set) when the power interruption flag was set based on the output of the power interruption processing activation unit 2403.

電源スイッチオフにより電圧が低下すると、時刻t1において電断処理起動部2403により電断フラグがセットされる。   When the voltage drops due to the power switch being turned off, the power interruption process starting unit 2403 sets the power interruption flag at time t1.

タイムラグ設定部2402cにおりタイムラグが設定され(図72のS130)、予め定められた時間経過後(S131でNO)、時刻t2において電断処理部2401が起動され、電断処理が開始される(S132でNO、S116)。この処理は時刻t3で完了する。その後、動作停止まで待機状態となる。なお、電断処理S116については前述の説明を参照されたい。   The time lag is set in the time lag setting unit 2402c (S130 in FIG. 72), and after a predetermined time has elapsed (NO in S131), the power interruption processing unit 2401 is activated at time t2 and the power interruption process is started ( NO in S132, S116). This process is completed at time t3. Then, it will be in a standby state until operation stops. For the power interruption process S116, refer to the above description.

図74は、電断処理起動部2403の出力に基づき電断フラグがセットされた時点において、通信が行われていたケース(電断抑制フラグがセットされていたケース)であって、電断抑制時間が長すぎてタイムアウトが生じ、タイムアウトエラーフラグが設定されたケースを示す。   FIG. 74 shows a case in which communication is performed at the time when the power interruption flag is set based on the output of the power interruption processing activation unit 2403 (case where the power interruption suppression flag is set), and the power interruption suppression is performed. Indicates a case where the timeout error flag is set due to the time being too long.

図74では、上述の(処理1)が長くなりすぎたため、(処理1)と(処理2)の合計時間が「電源断信号を受けてから電圧低下により動作を停止するまでの時間」よりも長くなり、このためバックアップが不完全になされる可能性がある。   In FIG. 74, since the above-mentioned (Process 1) is too long, the total time of (Process 1) and (Process 2) is longer than the “time from when the power-off signal is received until the operation is stopped due to a voltage drop”. Longer, which can result in incomplete backups.

電源スイッチオフにより電圧が低下すると、時刻t1において電断処理起動部2403により電断フラグがセットされる。同時に、電断前置処理部2402は、図示しないカウンタにより計時を開始する。   When the voltage drops due to the power switch being turned off, the power interruption process starting unit 2403 sets the power interruption flag at time t1. At the same time, the power interruption preprocessing unit 2402 starts measuring time with a counter (not shown).

タイムラグ設定部2402cにおりタイムラグが設定され(図72のS130)、予め定められた時間経過後(S131でNO)、時刻t2において電断フラグを調べる。電断フラグがセットされているので(S132でYES)、電断処理部2401を起動する代わりにタイムアウト計測(S133)及びタイムアウト発生の判定(S134)を行う。タイムアウト発生まで、S132,S133,S134の処理が繰り返される。   The time lag is set in the time lag setting unit 2402c (S130 in FIG. 72), and after a predetermined time has elapsed (NO in S131), the power interruption flag is checked at time t2. Since the power interruption flag is set (YES in S132), instead of activating the power interruption processing unit 2401, timeout measurement (S133) and determination of occurrence of timeout (S134) are performed. Until the timeout occurs, the processes of S132, S133, and S134 are repeated.

予め定められた時間ΔTが経過した時刻t10になると、タイムアウトとなり(S134でYES)、タイムアウトエラーフラグがセットされる(S135)。時間ΔTは、上述の(処理1)と(処理2)の合計時間が「電源断信号を受けてから電圧低下により動作を停止するまでの時間」と等しいか、若干短くなるように設定される。例えば、ΔT≦(電源断信号を受けてから電圧低下により動作を停止するまでの時間)−(電断処理に要する時間)である。   At time t10 when a predetermined time ΔT has elapsed, a timeout occurs (YES in S134), and a timeout error flag is set (S135). The time ΔT is set so that the total time of the above (Process 1) and (Process 2) is equal to or slightly shorter than “the time from when the power-off signal is received until the operation is stopped due to the voltage drop”. . For example, ΔT ≦ (the time from when the power-off signal is received until the operation is stopped due to the voltage drop) − (the time required for the power-off process).

タイムアウトエラーフラグのセット後に電断処理が開始される(S116)。この処理は時刻t3で完了する。その後、動作停止まで待機状態となる。   The power interruption process is started after the timeout error flag is set (S116). This process is completed at time t3. Then, it will be in a standby state until operation stops.

図74のケースでは、通信中にもかかわらず電断処理が開始されている。したがって、当該通信処理に係る通信内容を取りこぼすおそれがある。タイムアウトエラーフラグはこのことを警告するものである。なお、電断処理自体は正常に行われるので電源再投入後の復帰動作には問題はない。ただ当該通信処理については途中であった通信を再度最初から行うようにすることが望ましい。   In the case of FIG. 74, the power interruption process is started even during communication. Therefore, there is a risk of missing the communication content related to the communication processing. The timeout error flag warns about this. Since the power interruption process is normally performed, there is no problem in the return operation after the power is turned on again. However, it is desirable that the communication that was in the middle of the communication process is performed again from the beginning.

図75は、電断処理起動部2403の出力に基づき電断フラグがセットされた時点において、通信が行われていたケース(電断抑制フラグがセットされていたケース)であって、タイムアウトは生じず、タイムアウトエラーフラグが設定されないケースを示す。したがって、バックアップの不完全は生じない。   FIG. 75 shows a case in which communication was performed at the time when the power interruption flag was set based on the output of the power interruption processing activation unit 2403 (a case where the power interruption suppression flag was set), and a timeout occurred. In this case, the timeout error flag is not set. Therefore, incomplete backup does not occur.

電源スイッチオフにより電圧が低下すると、時刻t1において電断処理起動部2403により電断フラグがセットされる。同時に、電断前置処理部2402は、図示しないカウンタにより計時を開始する。   When the voltage drops due to the power switch being turned off, the power interruption process starting unit 2403 sets the power interruption flag at time t1. At the same time, the power interruption preprocessing unit 2402 starts measuring time with a counter (not shown).

タイムラグ設定部2402cにおりタイムラグが設定され(図72のS130)、予め定められた時間経過後(S131でNO)、時刻t2において電断フラグを調べる。電断フラグがセットされているので(S132でYES)、電断処理部2401を起動する代わりにタイムアウト計測(S133)及びタイムアウト発生の判定(S134)を行う。S132,S133,S134の処理が繰り返される。   The time lag is set in the time lag setting unit 2402c (S130 in FIG. 72), and after a predetermined time has elapsed (NO in S131), the power interruption flag is checked at time t2. Since the power interruption flag is set (YES in S132), instead of activating the power interruption processing unit 2401, timeout measurement (S133) and determination of occurrence of timeout (S134) are performed. The processes of S132, S133, and S134 are repeated.

予め定められた時間ΔTが経過する前の時刻t20において電断抑制フラグがリセットされると(S132でNO)、電断処理が開始される(S116)。この処理は時刻t21で完了する。その後、動作停止まで待機状態となる。   When the power interruption suppression flag is reset at time t20 before the predetermined time ΔT elapses (NO in S132), the power interruption process is started (S116). This process is completed at time t21. Then, it will be in a standby state until operation stops.

図74のケースでは、通信処理に係る通信内容を取りこぼすおそれはない。したがって、電源再投入後の復帰動作には何ら問題はない。   In the case of FIG. 74, there is no possibility of missing the communication contents related to the communication processing. Therefore, there is no problem in the return operation after the power is turned on again.

本実施の形態によれば、電断フラグがセットされてから所定のタイムラグを経過した後に電断処理を行うので、通信に係るデータを取りこぼすことがない。通信処理を行っている間も電断処理を行わないので、やはり通信に係るデータを取りこぼすことがない。   According to the present embodiment, since the power interruption process is performed after a predetermined time lag has elapsed since the power interruption flag was set, data related to communication is not missed. Since the power interruption process is not performed during the communication process, data related to the communication is not lost.

また、通信処理を行っている間に電断処理が間に合わなくなるときは、電断処理を優先して行うことによりバックアップに不具合を生じさせないようにできる。そのことを示すタイムアウトエラーフラグにより、当該通信処理に関しては再起動時に何らかの手当て(リセット、通信を最初からやり直すなど)を施すことによりその影響を軽減することができる。   Further, when the power interruption process is not in time during the communication process, it is possible to prevent the backup from causing a problem by giving priority to the power interruption process. With the timeout error flag indicating that, the influence of the communication processing can be reduced by performing some measures (reset, communication restart from the beginning, etc.) at the time of restart.

以上のように、本実施の形態によれば、通信中あるいは通信を開始しようとしている処理についても電源断退避処理を適切に行うことができ、電源再投入後の動作を正常に行えるようにできる。   As described above, according to the present embodiment, it is possible to appropriately perform the power-off saving process even for a process that is in communication or about to start communication, so that the operation after power-on can be normally performed. .

なお、以上の本実施の形態は適宜組み合わせることが可能である。図62、図65、図71の装置を全て組み合わせること、あるいはそれらの一部を組み合わせることが可能である。   Note that the above embodiment can be combined as appropriate. It is possible to combine all of the devices shown in FIGS. 62, 65, and 71, or some of them.

<複数ポインタを用いた電断復帰時の再通知>
本実施の形態に係る遊技機が用いており、ひとつのCPUが同時に複数の処理を実行するマルチプロセス方式においては、複数の処理(以下「タスク」)の間でコマンド、データのやり取りが行われている。このタスク間の通信を行うために「メールボックス」というものが用いられている。メールボックスとは、メモリ上に確保されたメッセージパケット(以下「メッセージ」)を受け渡すことによりタスク間の通信を行うものである。
<Re-notification at power failure recovery using multiple pointers>
In the multi-process method used by the gaming machine according to the present embodiment and one CPU executing a plurality of processes at the same time, commands and data are exchanged between a plurality of processes (hereinafter referred to as “tasks”). ing. A “mailbox” is used for communication between the tasks. A mailbox performs communication between tasks by passing a message packet (hereinafter referred to as “message”) secured in a memory.

タスク間の通信は、オペレーティングシステム(OS)のカーネルを介して、ユーザーとユーザー(処理と処理)の間で行われる。カーネルとはOSの中核となる部分であり、システムのリソースを管理し、ハードウエアとソフトウエアのコンポーネントのやり取りを行うものである。   Communication between tasks is performed between a user and a user (processing and processing) via an operating system (OS) kernel. The kernel is a core part of the OS, manages system resources, and exchanges hardware and software components.

図76はメッセージの構造を示す。メッセージMESは、次のメッセージとのリンク情報(カーネル管理部分)QHと、メッセージ本体MBとを含む。メッセージ本体MBは送信元ID、本文を含む。メッセージ本体の送信IDは、メッセージの種類を示すものであり、例えばコマンド=0、データ=1のように予め定められている。メッセージ本体の本文はユーザーが管理するものであり、コマンドやデータの内容をなす。本文は送信元によって型やサイズが異なる。   FIG. 76 shows the structure of a message. The message MES includes link information (kernel management part) QH with the next message and a message body MB. The message body MB includes a transmission source ID and a text. The transmission ID of the message body indicates the type of message, and is determined in advance, for example, command = 0 and data = 1. The body of the message body is managed by the user and includes the contents of commands and data. The body type and size vary depending on the sender.

図77は、タスク間の通信手順の説明図である。メッセージの送受信の流れは次のようになっている。   FIG. 77 is an explanatory diagram of a communication procedure between tasks. The flow of message transmission / reception is as follows.

(1)送信タスク(ユーザー層)が、所定のメッセージを図示しないメッセージバッファ(メモリ)に書き込む。図77の例では3つのメッセージM1、M2、M3が用意され、メッセージバッファに書き込まれる。メッセージM1、M2、M3のメッセージバッファにおけるアドレスはそれぞれ0x1000、0x1004、0x1008である。コマンドの構築及び書き込み処理はタイマー割り込みにより実行される。 (1) A transmission task (user layer) writes a predetermined message in a message buffer (memory) (not shown). In the example of FIG. 77, three messages M1, M2, and M3 are prepared and written to the message buffer. The addresses of the messages M1, M2, and M3 in the message buffer are 0x1000, 0x1004, and 0x1008, respectively. Command construction and write processing are executed by timer interruption.

(2)送信タスク処理でメッセージバッファのアドレスをカーネルに送信する。同図の例では、M1、M2、M3の順番で送信する。ここで送信されるのはキューヘッダQHのみであり、メッセージ本体MBは送信されない。 (2) The message buffer address is sent to the kernel in the send task process. In the example of the figure, transmission is performed in the order of M1, M2, and M3. Only the queue header QH is transmitted here, and the message body MB is not transmitted.

(3)受信タスク処理でカーネルがメッセージバッファのアドレスを受信タスク(ユーザー層)へ送信する。受信順序が送信順序と同じになるように、M1、M2、M3の順番で送信する。これはキューヘッダQHにより制御され、図に示すようにメッセージM1のキューヘッダにより次のメッセージM2が指定され、メッセージM2のキューヘッダにより次のメッセージM3が指定される。 (3) In the reception task process, the kernel transmits the message buffer address to the reception task (user layer). Transmission is performed in the order of M1, M2, and M3 so that the reception order is the same as the transmission order. This is controlled by the queue header QH, and the next message M2 is designated by the queue header of the message M1, and the next message M3 is designated by the queue header of the message M2, as shown in FIG.

(4)受信タスクは、カーネルから受信したアドレスに従い、メッセージバッファからメッセージ本体MBを読み出し、解析を行う。例えば、アドレス=0x1000に基づきメッセージM1のメッセージ本文を読み出す。メッセージ送信元ID=0であればメッセージ本体MBがコマンドであるとしてこれを解析し、メッセージ送信元ID=1であればメッセージ本体MBがデータであるとして、先に読み出されたコマンドのパラメータであるとして、両者を併せて解析する。図77では例えば、メッセージM1はコマンドであり、M2とM3はデータである。 (4) The reception task reads the message body MB from the message buffer according to the address received from the kernel, and performs analysis. For example, the message body of the message M1 is read based on the address = 0x1000. If the message transmission source ID = 0, the message body MB is analyzed as a command, and if the message transmission source ID = 1, the message body MB is determined to be data, and the parameters of the command read out earlier are used. If there is, analyze both together. In FIG. 77, for example, the message M1 is a command, and M2 and M3 are data.

上記手順を具体例に基づき詳しく説明する。   The above procedure will be described in detail based on a specific example.

図78に示すように、メッセージバッファMBUFに8個のメッセージM1乃至M8が書き込まれるものとする。書き込みを行うための割り込み処理において、カーネルと直接送受信することはOSの仕様上不可能となっている。このため上記(1)の処理でカーネルヘのアドレス送信を行えず、(2)を(1)から分離している。   As shown in FIG. 78, eight messages M1 to M8 are written in the message buffer MBUF. In the interrupt process for performing writing, direct transmission / reception with the kernel is impossible due to the specification of the OS. For this reason, the address transmission to the kernel cannot be performed in the process (1), and (2) is separated from (1).

メッセージバッファMBUFを介してメッセージ送信を行うために、本実施の形態では次の3つのポインタを使用している。   In the present embodiment, the following three pointers are used to transmit a message via the message buffer MBUF.

・WRITEポインタ
メッセージバッファMBUF書き込み用のポインタである。タイマー割り込みでメッセージ本体の書き込みが完了したときに更新される。更新により、上記(2)を送信完了していない先頭のメッセージを指し示す。具体的には図78の0x1000などの先頭アドレスを示す。
WRITE pointer This is a pointer for writing the message buffer MBUF. It is updated when message body writing is completed by timer interruption. By updating, the above-mentioned (2) is pointed to the first message that has not been transmitted. Specifically, it indicates a head address such as 0x1000 in FIG.

・SENDポインタ
カーネルヘのアドレス送信用のポインタである。送信タスクでカーネルにメッセージバッファMBUFのアドレスの送信を完了したときに更新される。更新により、上記(3)を完了していない先頭のメッセージを指し示す。
SEND pointer This is a pointer for address transmission to the kernel. Updated when the sending task completes sending the address of the message buffer MBUF to the kernel. By updating, the first message that does not complete the above (3) is indicated.

・READポインタ
メッセージバッファMBUFのポインタである。受信タスクでカーネルから受信したアドレスに基づきメッセージバッファMBUFからメッセージ本体MBを読みだしたときに更新される。更新により、上記(4)を完了していない先頭のメッセージを指し示す。
READ pointer This is a pointer of the message buffer MBUF. It is updated when the message body MB is read from the message buffer MBUF based on the address received from the kernel by the reception task. By updating, the first message that does not complete the above (4) is indicated.

図79は、通常時(電断のないとき)の送受信処理を示すタイミングチャートである。符号T101乃至T106はそれぞれ、最初のタイマー割り込み(1)(○1)による処理完了時点、最初の送信1の完了時点、最初の受信1の完了時点(この時点で少なくともメッセージバッファMBUFからのメッセージM1とM2の読み出しは完了しているが、その解析は継続している)、タイマー割り込み(4)(○4)による処理完了時点、送信2の完了時点、受信2の完了時点を示す。タイマ割り込み、送信タスク、受信タスクの間を結ぶ矢印は、優先順位に従った処理の移行を示す。   FIG. 79 is a timing chart showing transmission / reception processing at normal time (when there is no power interruption). Reference numerals T101 to T106 respectively denote a processing completion point by the first timer interrupt (1) (○ 1), a completion point of the first transmission 1, a completion point of the first reception 1 (at this time, at least the message M1 from the message buffer MBUF And M2 are read, but the analysis is continuing), the processing completion time by the timer interrupt (4) ((4), the transmission 2 completion time, and the reception 2 completion time. An arrow connecting the timer interrupt, the transmission task, and the reception task indicates a process transition according to the priority order.

図80は、図79の符号T101乃至T106のタイミングにおける3つのポインタの状態を示す。なお、図80の符号T100は、図79に示されていない初期状態を示す。ポインタの状態とは、当該ポインタがどのメッセージを指し示しているかについての情報であり、具体的にはメッセージバッファMBUFのアドレスである。言い換えれば、ポインタの内容はアドレスのデータである。   FIG. 80 shows the states of the three pointers at timings T101 to T106 in FIG. 80 indicates an initial state not shown in FIG. 79. The pointer state is information about which message the pointer points to, and specifically, the address of the message buffer MBUF. In other words, the contents of the pointer are address data.

図79及び図80を参照して、通常時(電断のないとき)の送受信処理を説明する。   With reference to FIG. 79 and FIG. 80, the transmission / reception processing at the normal time (when there is no power interruption) will be described.

T100:初期状態
3つのポインタ全部が最初のアドレスを示している。この状態ではWRITEポインタがメッセージバッファMBUFにあるのでメッセージM1は書き込まれていない。
T100: Initial state All three pointers indicate the first address. In this state, since the WRITE pointer is in the message buffer MBUF, the message M1 is not written.

T101:タイマー割り込み
タイマー割り込みによりメインコマンドがメッセージバッファMBUFに登録される。この例では2つのメッセージM1とM2が書き込まれる。この完了時点でWRITEポインタはM2の次の0x1008を指している。残りのポインタは0x1000を指している。
T101: Timer interrupt A main command is registered in the message buffer MBUF by a timer interrupt. In this example, two messages M1 and M2 are written. At this completion, the WRITE pointer points to the next 0x1008 of M2. The remaining pointer points to 0x1000.

T102:送信タスク
送信タスクによりメッセージM1とM2のキューヘッダQHに渡される。これにともないSENDポインタがWRITEポインタと同じ位置に移動する。なお、図79に示すように処理の優先順位は、タイマー割り込み>送信タスク>受信タスクであるので、タイマー割り込み中は送信タスクが中断する(受信タスクも同様)。また、送信タスク完了後に受信タスクが開始される。
T102: Transmission task Passed to the queue headers QH of the messages M1 and M2 by the transmission task. Along with this, the SEND pointer moves to the same position as the WRITE pointer. As shown in FIG. 79, the priority of processing is timer interruption> transmission task> reception task, and therefore the transmission task is interrupted during the timer interruption (the reception task is the same). The reception task is started after the transmission task is completed.

T103:受信タスク
受信タスクはカーネルからメッセージM1とM2のアドレスの情報を受け、これに基づきメッセージバッファMBUFからメッセージM1とM2を読み出す。そしてこれらを解析する。これにともないREADポインタはM2の次の0x1008を指している。
T103: Reception task The reception task receives the information of the addresses of the messages M1 and M2 from the kernel, and reads the messages M1 and M2 from the message buffer MBUF based on the information. These are then analyzed. Accordingly, the READ pointer points to 0x1008 next to M2.

T104:タイマー割り込み
タイマー割り込みによりメッセージM3が書き込まれる。この完了時点でWRITEポインタはM3の次の0x100Cを指している。残りのポインタは0x1008を指すようになる。
T104: Timer interrupt Message M3 is written by a timer interrupt. At this completion, the WRITE pointer points to the next 0x100C of M3. The remaining pointers will point to 0x1008.

T105:送信タスク
送信タスクによりメッセージM3のキューヘッダQHに渡される。これにともないSENDポインタがWRITEポインタと同じ位置に移動する。
T105: Transmission task Passed to the queue header QH of the message M3 by the transmission task. Along with this, the SEND pointer moves to the same position as the WRITE pointer.

T106:受信タスク
受信タスクはカーネルからメッセージM3のアドレスの情報を受け、これに基づきメッセージバッファMBUFからメッセージM3を読み出す。そしてこれらを解析する。これにともないREADポインタはM2の次の0x100Cを指すようになる。
T106: Reception task The reception task receives the address information of the message M3 from the kernel, and reads the message M3 from the message buffer MBUF based on this information. These are then analyzed. Accordingly, the READ pointer points to 0x100C next to M2.

以上説明した手順によりひとつのタスクから他のタスクへコマンドが送信される。   A command is transmitted from one task to another by the procedure described above.

もし電断対策を考慮しないのであれば、WRITE、READポインタだけあればよく、SENDポインタは不要である。WRITEポインタとREADポインタが不一致であるときに、READポインタをWRITEポインタに一致させるようにカーネルへキューヘッダQHを渡すとともに、受信タスクでメッセージを読み出せばよい。しかし、電断の際にコマンドの取りこぼしを発生させないようにするためには、SENDポインタが必要である。   If power failure countermeasures are not taken into consideration, only the WRITE and READ pointers are required, and the SEND pointer is unnecessary. When the WRITE pointer and the READ pointer do not match, the queue header QH is passed to the kernel so that the READ pointer matches the WRITE pointer, and the message is read by the receiving task. However, a SEND pointer is necessary in order to prevent a command from being missed in the event of a power interruption.

コマンドが電断で消滅してしまうと遊技者に不利益を与える可能性があるため、電断処理において手当する必要がある。しかし、上述のバックアップによればメモリの内容は退避させることができるものの、カーネルが保持していた「次のメッセージとのリンク情報」であるキューヘッダQHは失われる。電源再投入時においてキューヘッダQHはカーネルにより自動的に初期化されてしまう。すなわち、未読み出しコマンドがある状態で電断が生じると、一部のコマンドが読み出せなくなる。例えば、図79のT102で電断が発生したとすると、カーネルにおけるメッセージM1とM2のキューヘッダQHは失われるので、電源再投入後の受信タスクでメッセージM1とM2はスキップされ、これらを読み出すことができなくなる。   If the command disappears due to power interruption, there is a possibility that it may be disadvantageous to the player, so it is necessary to deal with power interruption processing. However, although the contents of the memory can be saved by the above-described backup, the queue header QH which is “link information with the next message” held by the kernel is lost. When the power is turned on again, the queue header QH is automatically initialized by the kernel. That is, if a power interruption occurs in a state where there are unread commands, some commands cannot be read. For example, if a power failure occurs at T102 in FIG. 79, the queue header QH of the messages M1 and M2 in the kernel is lost, so the messages M1 and M2 are skipped and read out in the receiving task after the power is turned on again. Can not be.

本実施の形態では、SENDポインタを用いることにより、上記のようなコマンド喪失を避けることができる。   In this embodiment, by using the SEND pointer, it is possible to avoid the command loss as described above.

図81は、本実施の形態に係るメッセージ送受信部のブロック図である。   FIG. 81 is a block diagram of a message transmission / reception unit according to the present embodiment.

2700は、送信側の処理である送信タスクである。   Reference numeral 2700 denotes a transmission task which is processing on the transmission side.

2701は、受信側の処理である受信タスクである。   Reference numeral 2701 denotes a reception task which is processing on the reception side.

2702は、送信タスク2700から受信タスク2701へのコマンドの伝達に係る処理を行うカーネルである。   Reference numeral 2702 denotes a kernel that performs processing related to transmission of a command from the transmission task 2700 to the reception task 2701.

送信タスク2700、受信タスク2701、カーネル2702は、CPUにより実現される機能である。   The transmission task 2700, the reception task 2701, and the kernel 2702 are functions realized by the CPU.

2703は、上記WRITE、SEND、READポインタを記憶するポインタ(レジスタ、メモリ)である。   Reference numeral 2703 denotes a pointer (register, memory) for storing the WRITE, SEND, and READ pointers.

2704は、電断の際に、メモリ(例えば図62のメモリ2400)の少なくとも一部のデータについてバックアップを行う電断処理部である。   Reference numeral 2704 denotes a power interruption processing unit that backs up at least a part of data in a memory (for example, the memory 2400 in FIG. 62) when power is interrupted.

2705は、電源投入の際に、バックアップされたデータに基づき予め定められた復帰処理を行う復帰処理部である。   Reference numeral 2705 denotes a return processing unit that performs a predetermined return process based on the backed up data when the power is turned on.

2706は、バックアップデータを保持するバックアップ(メモリ)である。これは図58のM2に相当する。   Reference numeral 2706 denotes a backup (memory) that holds backup data. This corresponds to M2 in FIG.

MBUFは、メッセージを記憶するメッセージバッファである。この記憶内容については既に説明した。   MBUF is a message buffer that stores messages. This stored content has already been described.

図82は、本実施の形態に係る電断処理のフローチャートである(ポインタのバックアップ部分のみ示す)。   FIG. 82 is a flowchart of the power interruption process according to the present embodiment (only the pointer backup portion is shown).

図83は、本実施の形態に係る復帰処理のフローチャートである(ポインタの復帰処理部分のみ示す)。   FIG. 83 is a flowchart of the return process according to the present embodiment (only the pointer return process part is shown).

図84は、電断のあるときの送受信処理を示すタイミングチャートである。符号T111乃至T116はそれぞれ、最初のタイマー割り込み(1)(○1)による処理完了時点、最初の送信1の完了時点(=電断の直前)、電断の直後(復帰処理後)、タイマー割り込み(3)(○3)による処理完了時点、送信2の完了時点、受信2の完了時点を示す。   FIG. 84 is a timing chart showing a transmission / reception process when there is a power interruption. Symbols T111 to T116 respectively indicate the time when the first timer interrupt (1) (◯ 1) is completed, the time when the first transmission 1 is completed (= immediately before power interruption), the time immediately after power interruption (after return processing), and the timer interrupt. (3) Indicates the time point when the processing according to (33) is completed, the time point when transmission 2 is completed, and the time point when reception 2 is completed.

図85は、図84の符号T111乃至T116のタイミングにおける3つのポインタの状態を示す。なお、図85の符号T110は、図84に示されていない初期状態を示す。   FIG. 85 shows the states of the three pointers at timings T111 to T116 in FIG. 85 indicates an initial state that is not shown in FIG.

図81乃至図85を参照して、電断のあるときの送受信処理を説明する。   With reference to FIG. 81 to FIG. 85, transmission / reception processing when there is a power interruption will be described.

T110:初期状態
3つのポインタ全部が最初のアドレスを示している。この状態ではWRITEポインタがメッセージバッファMBUFにあるのでメッセージM1は書き込まれていない。
T110: Initial state All three pointers indicate the first address. In this state, since the WRITE pointer is in the message buffer MBUF, the message M1 is not written.

T111:タイマー割り込み
送信タスク2700が、WRITEポインタに従いメッセージバッファMBUFにメッセージを書き込むとともに、ポインタ2703のWRITEポインタを動かす。図84では、タイマー割り込みによりメインコマンドがメッセージバッファMBUFに登録される。この例では2つのメッセージM1とM2が書き込まれる。この完了時点でWRITEポインタはM2の次の0x1008を指している。残りのポインタは0x1000を指している。
T111: Timer interrupt The transmission task 2700 writes a message in the message buffer MBUF according to the WRITE pointer and moves the WRITE pointer of the pointer 2703. In FIG. 84, the main command is registered in the message buffer MBUF by the timer interruption. In this example, two messages M1 and M2 are written. At this completion, the WRITE pointer points to the next 0x1008 of M2. The remaining pointer points to 0x1000.

T112:送信タスク
送信タスクによりメッセージM1とM2のキューヘッダQHがカーネル2702に渡される。これにともないSENDポインタがWRITEポインタと同じ位置に移動する。
この時点あるいはこの直後に電断が発生し、上述の電断処理により3つのポインタWRITE、SEND、READがバックアップされる(図82のS140)。
T112: Transmission task The queue header QH of the messages M1 and M2 is passed to the kernel 2702 by the transmission task. Along with this, the SEND pointer moves to the same position as the WRITE pointer.
At this time or immediately after that, a power interruption occurs, and the three pointers WRITE, SEND, and READ are backed up by the power interruption process described above (S140 in FIG. 82).

T113:復帰処理
電源が再投入されたとき、メッセージのキューヘッダQHは復帰時にカーネルにより自動的に初期化される。このため、上述のように未読み出しコマンド(図84の例ではM1とM2)があるときに電断した場合は、何らかの手当を行わない限り受信タスクにてそれらコマンドを読み出せなくなる。そこで復帰処理部2705が図83の処理を行う。
T113: Return processing When the power is turned on again, the queue header QH of the message is automatically initialized by the kernel at the time of return. For this reason, if there is an unread command (M1 and M2 in the example of FIG. 84) as described above, the received task cannot read these commands unless some measure is taken. Therefore, the return processing unit 2705 performs the process of FIG.

S150:WRITEポインタとREADポインタが一致しているかどうか確認する。
一致していれば(S150でYES)、カーネルにてキューヘッダQHは失われていないから図83の処理を抜け、他の復帰処理を行う。
一致していなければ(S150でNO)、S151の処理を行う。
S150: Check whether the WRITE pointer and the READ pointer match.
If they match (YES in S150), the queue header QH has not been lost in the kernel, so the process of FIG. 83 is skipped and another return process is performed.
If they do not match (NO in S150), the process of S151 is performed.

S151:SENDポインタをREADポインタの位置まで戻す。
不一致の場合はメッセージバッファMBUFに未読み出しコマンドがあると判断し、SENDポインタをREADポインタの位置まで戻す。
S151: Return the SEND pointer to the position of the READ pointer.
If they do not match, it is determined that there is an unread command in the message buffer MBUF, and the SEND pointer is returned to the position of the READ pointer.

S152:カーネルにてキューヘッダQHが失われていたコマンドM1、M2を送信タスクから受信タスクへ再送信する。
この時点でREADポインタとSENDポインタは先頭の0x1000を指している。
S152: The commands M1 and M2 in which the queue header QH has been lost in the kernel are retransmitted from the transmission task to the reception task.
At this point, the READ pointer and the SEND pointer point to the leading 0x1000.

T114:タイマー割り込み
タイマー割り込みによりメッセージM3が書き込まれる。この完了時点でWRITEポインタはM3の次の0x100Cを指している。残りのポインタは0x1000を指したままである。
T114: Timer interrupt Message M3 is written by the timer interrupt. At this completion, the WRITE pointer points to the next 0x100C of M3. The remaining pointers still point to 0x1000.

T115:送信タスク
送信タスクによりメッセージM1、M2、M3のキューヘッダQHがカーネルに渡される。これにともないSENDポインタがWRITEポインタと同じ位置に移動する。
T115: Transmission task The queue header QH of the messages M1, M2, and M3 is passed to the kernel by the transmission task. Along with this, the SEND pointer moves to the same position as the WRITE pointer.

T116:受信タスク
受信タスク2701が、READポインタに従いメッセージバッファMBUFからメッセージを読み出すとともに、ポインタ2703のREADポインタを動かす。受信タスクはカーネルからメッセージM1、M2、M3のアドレスの情報を受け、これに基づきメッセージバッファMBUFからメッセージM1、M2、M3を読み出す。そしてこれらを解析する。これにともないREADポインタはM2の次の0x100Cを指すようになる。
T116: Reception task The reception task 2701 reads the message from the message buffer MBUF according to the READ pointer and moves the READ pointer of the pointer 2703. The reception task receives the address information of the messages M1, M2, and M3 from the kernel, and reads the messages M1, M2, and M3 from the message buffer MBUF based on the information. These are then analyzed. Accordingly, the READ pointer points to 0x100C next to M2.

本実施の形態によれば、コマンドの書き込みを示すWRITEポインタ及びコマンドの読み出しを示すREADポインタとともに、送信タスクから受信タスクへのメッセージ伝達を仲介するカーネルへの送信依頼(キューヘッダ)を示すSENDポインタを使用し、電断の際にこれら3つのポインタをバックアップし、電断復帰時においてSENDポインタをREADポインタの位置に戻すことにより、電断によりカーネルにおいて失われた送信依頼を復活させることができる。したがって、電断復帰時のカーネルの自動初期化により、次のメッセージとのリンク情報であるキューヘッダが消滅しても、未読み出しコマンドのバッファアドレスを再送信するので、コマンドを取りこぼすことがなくなる。   According to the present embodiment, a SEND pointer indicating a transmission request (queue header) to the kernel that mediates message transmission from the transmission task to the reception task, together with a WRITE pointer indicating command writing and a READ pointer indicating command reading. Can be used to back up these three pointers in the event of a power failure, and return the SEND pointer to the position of the READ pointer when power is restored. . Therefore, even if the queue header, which is link information with the next message, disappears due to automatic initialization of the kernel when power is restored, the buffer address of the unread command is retransmitted, so the command is not missed. .

本発明は、以上の実施の形態に限定されることなく、特許請求の範囲に記載された発明の範囲内で、種々の変更が可能であり、それらも本発明の範囲内に包含されるものであることは言うまでもない。   The present invention is not limited to the above embodiments, and various modifications can be made within the scope of the invention described in the claims, and these are also included in the scope of the present invention. Needless to say.

2700 送信タスク
2701 受信タスク
2702 カーネル
2703 ポインタ(メモリ)
2704 電断処理部
2705 復帰処理部
2706 バックアップ(メモリ)
MBUF メッセージバッファ
2700 Send task 2701 Receive task 2702 Kernel 2703 Pointer (memory)
2704 Power interruption processing unit 2705 Return processing unit 2706 Backup (memory)
MBUF message buffer

Claims (1)

遊技に係る処理を行うメイン基板と、前記メイン基板から予め定められたコマンドを受けて遊技に係る演出処理を行うサブ基板と、前記メイン基板及び前記サブ基板へ電力を供給する電源部とを備える遊技機において、
前記遊技に係る処理及び/又は前記演出処理に関する複数の処理を同時に実行するマルチプロセス処理を行うCPUと、
前記遊技に係るデータ及び/又は前記演出に係るデータを記憶するメモリと、
電断の際に、前記メモリの少なくとも一部のデータについてバックアップを行う電断処理部と、
電源投入の際に、バックアップされた前記データに基づき予め定められた復帰処理を行う復帰処理部とを備え、
前記CPUは、前記複数の処理の相互間の通信(以下、送信側の処理を「送信タスク」、受信側の処理を「受信タスク」と記す)及び送信タスクから受信タスクへのコマンドの伝達に係る処理(以下、前記CPUの動作により実現され、この伝達に係る処理の動作主体となる手段を「カーネル」と記す)を行うとともに、前記伝達の内容としてのメッセージを保持するメッセージバッファに対する書き込みポインタ、送信ポインタ、読み出しポインタに係る制御処理を行い、
前記書き込みポインタは、前記送信タスクにおいて前記メッセージを書き込むべき前記メッセージバッファの位置を示すものであり、前記メッセージが書き込まれたときには次に書き込むべき位置まで移動し、
前記送信ポインタは、前記カーネルへ送るべき前記メッセージについての前記メッセージバッファの位置を示すものであり、前記カーネルへの送信が行われたときには次に送るべき前記メッセージについての前記メッセージバッファの位置まで移動し、
前記受信ポインタは、前記受信タスクにおいて前記メッセージを読み出すべき位置を示すものであり、前記メッセージが読み出されたときには次に読み出すべき位置まで移動し、
前記電断処理部は、前記書き込みポインタ、前記送信ポインタ及び前記読み出しポインタをバックアップし、
前記復帰処理部は、電源が投入されたとき、バックアップされた前記書き込みポインタ、前記送信ポインタ及び前記読み出しポインタを読み出し、前記書き込みポインタと前記送信ポインタが一致しないとき、前記送信ポインタを前記読み出しポインタの位置まで戻し、
前記送信タスクは、前記送信ポインタから前記書き込みポインタまでの前記メッセージについて前記カーネルへ前記メッセージバッファの位置を送り、
前記カーネルは、前記送信タスクから受けた前記メッセージバッファの位置を前記受信タスクへ送り、
前記受信タスクは前記カーネルからの前記メッセージバッファの位置に基づき前記メッセージを読み出して解析する、ことを特徴とする遊技機。
A main board that performs processing related to a game; a sub board that receives a predetermined command from the main board and performs an effect process related to gaming; and a power supply unit that supplies power to the main board and the sub board. In gaming machines,
A CPU for performing a multi-process process that simultaneously executes a plurality of processes related to the game and / or the effect process;
A memory for storing data relating to the game and / or data relating to the effect;
In the event of a power interruption, a power interruption processing unit that backs up at least part of the data in the memory;
A recovery processing unit that performs a predetermined recovery process based on the backed up data when the power is turned on,
The CPU communicates between the plurality of processes (hereinafter, a process on the transmission side is referred to as a “transmission task” and a process on the reception side is referred to as a “reception task”) and a command is transmitted from the transmission task to the reception task. A write pointer to a message buffer that performs such processing (hereinafter referred to as “kernel”, which is realized by the operation of the CPU and is the main operating unit of the processing related to transmission), and holds a message as the content of the transmission , Perform control processing related to the send pointer and read pointer,
The write pointer indicates a position of the message buffer to which the message is to be written in the transmission task, and when the message is written, moves to a position to be written next;
The send pointer indicates the position of the message buffer for the message to be sent to the kernel, and when sending to the kernel, moves to the position of the message buffer for the message to be sent next And
The reception pointer indicates a position where the message should be read in the reception task, and when the message is read, moves to a position where the message should be read next,
The power interruption processing unit backs up the write pointer, the transmission pointer, and the read pointer,
When the power is turned on, the return processing unit reads the backup write pointer, the transmission pointer, and the read pointer, and when the write pointer does not match the transmission pointer, the return processing unit reads the transmission pointer. Back to position
The send task sends the message buffer location to the kernel for the message from the send pointer to the write pointer;
The kernel sends the position of the message buffer received from the sending task to the receiving task;
The gaming machine, wherein the receiving task reads and analyzes the message based on the position of the message buffer from the kernel.
JP2012184679A 2012-08-24 2012-08-24 Game machine Expired - Fee Related JP5994092B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012184679A JP5994092B2 (en) 2012-08-24 2012-08-24 Game machine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012184679A JP5994092B2 (en) 2012-08-24 2012-08-24 Game machine

Publications (2)

Publication Number Publication Date
JP2014039769A true JP2014039769A (en) 2014-03-06
JP5994092B2 JP5994092B2 (en) 2016-09-21

Family

ID=50392578

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012184679A Expired - Fee Related JP5994092B2 (en) 2012-08-24 2012-08-24 Game machine

Country Status (1)

Country Link
JP (1) JP5994092B2 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001293232A (en) * 2000-04-11 2001-10-23 Fuji Shoji:Kk Pinball game machine
JP2005261784A (en) * 2004-03-19 2005-09-29 Sankyo Kk Slot machine

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001293232A (en) * 2000-04-11 2001-10-23 Fuji Shoji:Kk Pinball game machine
JP2005261784A (en) * 2004-03-19 2005-09-29 Sankyo Kk Slot machine

Also Published As

Publication number Publication date
JP5994092B2 (en) 2016-09-21

Similar Documents

Publication Publication Date Title
JP5953550B2 (en) Game machine
JP6059913B2 (en) Game machine
JP6035558B2 (en) Game machine
JP6035534B2 (en) Game machine
JP2012120662A (en) Game board
JP6019454B2 (en) Game machine
JP6067282B2 (en) Game machine
JP2017104579A (en) Game machine
JP6150274B2 (en) Game machine
JP2017064486A (en) Game machine
JP6059914B2 (en) Game machine
JP6078262B2 (en) Game machine
JP6078261B2 (en) Game machine
JP5953552B2 (en) Game machine
JP6349521B2 (en) Game machine
JP6371983B2 (en) Game machine
JP6307677B2 (en) Game machine
JP6307185B2 (en) Game machine
JP5994092B2 (en) Game machine
JP5953551B2 (en) Game machine
JP6019354B2 (en) Game machine
JP6176600B2 (en) Game machine
JP6349522B2 (en) Game machine
JP2013090935A (en) Game machine
JP6131417B2 (en) Game machine

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20150602

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20160422

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160426

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160607

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20160720

R150 Certificate of patent or registration of utility model

Ref document number: 5994092

Country of ref document: JP

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

LAPS Cancellation because of no payment of annual fees