JP5120931B2 - Game machine - Google Patents

Game machine Download PDF

Info

Publication number
JP5120931B2
JP5120931B2 JP2007325095A JP2007325095A JP5120931B2 JP 5120931 B2 JP5120931 B2 JP 5120931B2 JP 2007325095 A JP2007325095 A JP 2007325095A JP 2007325095 A JP2007325095 A JP 2007325095A JP 5120931 B2 JP5120931 B2 JP 5120931B2
Authority
JP
Japan
Prior art keywords
ram
area
cpu
command
input
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2007325095A
Other languages
Japanese (ja)
Other versions
JP2009142565A (en
Inventor
高明 市原
文人 三宅
陽介 吉田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Daiichi Shokai Co Ltd
Original Assignee
Daiichi Shokai Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Daiichi Shokai Co Ltd filed Critical Daiichi Shokai Co Ltd
Priority to JP2007325095A priority Critical patent/JP5120931B2/en
Publication of JP2009142565A publication Critical patent/JP2009142565A/en
Application granted granted Critical
Publication of JP5120931B2 publication Critical patent/JP5120931B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Description

本発明は、スロットマシン、パチンコ機などの遊技機を制御する制御装置に関する。   The present invention relates to a control device that controls gaming machines such as slot machines and pachinko machines.

スロットマシン、パチンコ機などの遊技機の制御は、全体の進行を制御するための主制御基板、音声出力、ランプ点灯、画像表示などの演出を制御する演出制御基板などの分散制御によって行われる(特許文献1)。主制御基板、演出制御基板は、それぞれCPU、RAM、ROMなどを備えるマイクロコンピュータとして構成されている。   Control of gaming machines such as slot machines and pachinko machines is performed by distributed control of a main control board for controlling the overall progress, an effect control board for controlling effects such as sound output, lamp lighting, and image display ( Patent Document 1). The main control board and the effect control board are each configured as a microcomputer including a CPU, a RAM, a ROM, and the like.

遊技機の制御基板、特に主制御基板では、不正を防止するために種々の制約が設けられている。例えば、CPUについては、汎用のCPUではなく、遊技機特有のセキュリティ機能が設けられたCPUが用いられている。また、ROM、RAMの容量にも制約が設けられており、パチンコ機では主制御基板における制御用のプログラムが3キロバイト(KB)以内、データは3KB以内というように、プログラムサイズやデータ容量についても制約が設けられている。   In a control board of a gaming machine, particularly a main control board, various restrictions are provided to prevent fraud. For example, the CPU is not a general-purpose CPU but a CPU provided with a security function peculiar to a gaming machine. In addition, the ROM and RAM capacities are also limited. With pachinko machines, the control program on the main control board is within 3 kilobytes (KB) and the data is within 3 KB. There are restrictions.

特開2004−8483号公報Japanese Patent Laid-Open No. 2004-8483

しかし、遊技機の制御は、興趣を高めるため、年々、複雑化する傾向にある。
例えば、パチンコ機においては、従来、第1種と呼ばれる機種においては乱数を用いた電子的な抽選を行い、第2種と呼ばれる機種においては機械的な可動部を動作させ、可動部上の遊技球の動きによって当たりか否かを決める方法での抽選を行ってきた。これに対し、近年では、複合機と呼ばれる機種が登場し、上述の第1種および第2種を合わせた抽選を行うようになっている。この場合、主制御基板には、第1種および第2種の双方の抽選を行える制御プログラムを用意しておく必要がある。
However, control of gaming machines tends to become more complex year by year in order to increase interest.
For example, in a conventional pachinko machine, an electronic lottery using a random number is performed in a model called the first type, and a mechanical movable unit is operated in a model called the second type, and a game on the movable unit is performed. The lottery has been done by a method of determining whether or not to win by the movement of the ball. On the other hand, in recent years, a model called a multi-function machine has appeared, and a lottery in which the above-described first type and second type are combined is performed. In this case, the main control board needs to have a control program capable of performing both the first type and the second type lottery.

上述の傾向は、パチンコ機以外の遊技機でも同様であり、遊技機は、プログラムやデータ量の厳しい制約の下で、より複雑な制御処理を実行することを要請されている。
本発明は、こうした課題に鑑み、遊技機のプログラム容量を削減可能にすることを目的とする。
The above-mentioned tendency is the same for gaming machines other than pachinko machines, and the gaming machines are required to execute more complicated control processing under severe restrictions on programs and data amount.
In view of these problems, the present invention has an object to reduce the program capacity of a gaming machine.

本発明は、所定の遊技媒体を直接的または間接的に用いて遊技を行う遊技機を対象とする。かかる遊技機としては、例えば、スロットマシンなどの回胴式遊技機、スマートボール、パチンコ機などが挙げられる。遊技媒体とは、遊技球やメダルなど遊技中に投資、特典の対象となる媒体を言う。
遊技機は、遊技の進行を統合制御する主制御装置を有している。この他、遊技中に視聴覚的な演出を行うための演出装置と、所定の条件下で遊技媒体を遊技者に払い出す払出装置とを備えている。演出装置としては、例えば、音声出力用のスピーカ、ランプ、画像表示装置などが含まれる。遊技機には、主制御装置からの指示情報に従って演出および払出の少なくとも一部を制御する下位制御装置が備えられている。下位制御装置としては、音声出力や表示を制御する演出制御装置などが挙げられる。下位制御装置は、主制御装置とは別のハードウェアとして構成されており、後述する入出力ポートを介して主制御装置からの指示情報を受け取る。また、遊技機の種類によっては、遊技媒体の払出しを制御する払出制御装置を下位制御装置の一つとして設けても良い。
The present invention is directed to a gaming machine that plays a game using a predetermined game medium directly or indirectly. Examples of such a gaming machine include a swivel type gaming machine such as a slot machine, a smart ball, and a pachinko machine. A game medium refers to a medium such as a game ball or medal that is a target of investment or privilege during a game.
The gaming machine has a main control device that integrally controls the progress of the game. In addition, an effect device for performing an audiovisual effect during the game and a payout device for paying out game media to the player under predetermined conditions are provided. Examples of the production device include a speaker for sound output, a lamp, and an image display device. The gaming machine is provided with a low-order control device that controls at least a part of the effects and payouts according to the instruction information from the main control device. Examples of the lower control device include an effect control device that controls voice output and display. The subordinate control device is configured as hardware different from the main control device, and receives instruction information from the main control device via an input / output port described later. Further, depending on the type of gaming machine, a payout control device that controls payout of game media may be provided as one of the lower-level control devices.

本発明の遊技機における主制御装置は、CPU、ROM、RAMを備えたマイクロコンピュータとして構成されている。ROMには、CPUが遊技の統合制御のために実行する制御プログラムが格納されている。RAMは、制御に用いられる種々の情報を格納するためのメモリとして機能する。かかる情報としては、例えば、制御プログラム中の各モジュール間で処理結果等を受け渡すためのワークや、演算中にCPUが計算結果を一時的に蓄えておくためのスタックなどが含まれる。
主制御装置には、統合制御において、下位制御装置を含む外部との間で信号を入出力するための入出力ポートも設けられている。入出力ポートとは、ここでは、外部との信号線を接続する端子、その端子から入出力される信号を一時的に蓄積しておくバッファ、各信号の入出力先を切り換えるデコーダなどの総称として用いる。信号の入出力先は、メモリと同様、アドレスによって指定可能である。
The main controller in the gaming machine of the present invention is configured as a microcomputer including a CPU, a ROM, and a RAM. The ROM stores a control program that the CPU executes for integrated game control. The RAM functions as a memory for storing various information used for control. Such information includes, for example, a work for passing processing results and the like between the modules in the control program, a stack for the CPU to temporarily store the calculation results during the calculation, and the like.
The main control device is also provided with an input / output port for inputting / outputting signals to / from the outside including the lower control device in the integrated control. Here, I / O port is a generic term for a terminal that connects an external signal line, a buffer that temporarily stores signals input / output from the terminal, and a decoder that switches the input / output destination of each signal. Use. The signal input / output destination can be specified by an address as in the memory.

CPUが用いるコマンドには、メモリアクセスコマンド、入出力ポートアクセスコマンドが含まれる。メモリアクセスコマンドとは、メモリへのアクセスに使用されるコマンドであり、このコマンドには、2バイト以上のアドレス値の指定が含まれる。入出力ポートアクセスコマンドとは、外部との信号の入出力に使用されるコマンドであり、入出力先を指定するためのアドレス値はメモリアクセスコマンドよりも1バイト以上少ないコマンド体系となっている。例えば、メモリアクセスコマンドが2バイトでアドレス指定を行うコマンド体系である場合には、入出力ポートアクセスコマンドは1バイトでアドレス指定を行うコマンド体系となる。
Z80(商標)というCPUに即して説明すれば、ロード/ストアコマンドがメモリアクセスコマンドに相当し、イン/アウトコマンドが入出力ポートアクセスコマンドに相当する。ロード/ストアコマンドでは2バイトでアドレスが指定され、イン/アウトコマンドでは1バイトで指定される。
Commands used by the CPU include a memory access command and an input / output port access command. The memory access command is a command used for accessing the memory, and this command includes designation of an address value of 2 bytes or more. The input / output port access command is a command used for input / output of signals from / to the outside, and has a command system in which the address value for designating the input / output destination is one byte or less than the memory access command. For example, when the memory access command has a command system for specifying an address with 2 bytes, the input / output port access command has a command system for specifying an address with 1 byte.
In the case of Z80 (trademark) CPU, a load / store command corresponds to a memory access command, and an in / out command corresponds to an input / output port access command. The load / store command specifies an address with 2 bytes, and the in / out command specifies an address with 1 byte.

主制御装置には、更に、エリア区分判定部が備えられている。エリア区分判定部は、入出力ポートアクセスコマンドで指定されるアドレス値に基づいて、アクセス先をRAMおよび入出力ポートに切り換え、RAMおよび入出力ポートのいずれかをアクティブにするセレクタ信号を出力する機能を奏する。入出力ポートアクセスコマンドは、通常、入出力ポートを通じたデータ授受に使用されるコマンドであるが、本発明では、同コマンドで指定されるアドレス空間の一部をRAMへのアクセスに使用するのである。エリア区分判定部は、コマンドで指定されたアドレスが、RAM用または入出力ポート用のいずれに割り当てられたアドレスかを判定し、判定結果に応じてセレクタ信号を出力する。このセレクタ信号は、それぞれRAMおよび入出力ポートに入力され、各ユニットをアクセス可能な状態にさせる。
CPUからは、入出力ポートアクセスコマンドに応じて稼働すべき対象を指定する入出力ポートリクエスト信号が、エリア区分判定部に入力されている。従って、エリア区分判定部の上述の機能は、CPUがイン/アウトコマンドなど入出力ポートアクセスコマンドを出力した時に有効となる。
The main control device further includes an area division determination unit. The area classification determination unit switches the access destination to the RAM and the input / output port based on the address value specified by the input / output port access command, and outputs a selector signal that activates either the RAM or the input / output port. Play. The input / output port access command is a command that is normally used for data exchange through the input / output port. In the present invention, a part of the address space specified by the command is used for accessing the RAM. . The area classification determination unit determines whether the address specified by the command is an address assigned to the RAM or the input / output port, and outputs a selector signal according to the determination result. This selector signal is input to the RAM and the input / output port, respectively, and makes each unit accessible.
From the CPU, an input / output port request signal that designates a target to operate according to the input / output port access command is input to the area classification determination unit. Therefore, the above-described function of the area classification determination unit is effective when the CPU outputs an input / output port access command such as an in / out command.

主制御装置には、更に、メモリエリアデコード部が設けられている。メモリエリアデコード部は、メモリアクセスコマンドで指定されるアドレス値に基づいて、アクセス先となるROMおよびRAMのいずれかをアクティブにするためのメモリセレクト信号を出力する機能を奏する。CPUからは、メモリアクセスコマンドに応じて稼働すべき対象を指定するメモリリクエスト信号が、メモリエリアデコード部に入力されており、上述の機能は、CPUがメモリアクセスコマンドを出力した時に有効となる。   The main control device is further provided with a memory area decoding unit. The memory area decoding unit has a function of outputting a memory select signal for activating either the ROM or RAM to be accessed based on the address value specified by the memory access command. From the CPU, a memory request signal that designates an object to be operated in accordance with a memory access command is input to the memory area decoding unit, and the above-described function becomes effective when the CPU outputs a memory access command.

本発明の遊技機は、主制御装置のCPUは、エリア区分判定部の機能により、入出力ポートアクセスコマンドでRAMの一部の領域にアクセス可能である。アクセス先を指定するアドレスは、入出力ポートアクセスコマンドの方が、メモリアクセスコマンドよりも1バイト以上少なくて済む。従って、RAMへのアクセスが必要となる箇所で、メモリアクセスコマンドに代えて、入出力ポートアクセスコマンドを用いることにより、1カ所につき1バイト以上、プログラム容量を削減することができる。RAMへのアクセスは、プログラム全体で数多く行われる処理である。従って、本発明の遊技機では、上述の作用によって、プログラム全体の容量を有意に削減することが可能となる。以下、RAM領域のうち、入出力ポートアクセスコマンドでアクセス可能な領域を擬似RAM領域と称するものとする。
また、主制御装置には、メモリエリアデコード部も設けられているため、メモリアクセスコマンドによってもRAMへのアクセスが可能となる。擬似RAM領域は、入出力ポート用のアドレス空間の一部に過ぎないが、メモリアクセスコマンドを利用すれば、RAMの全領域にアクセス可能となる。従って、入出力ポートアクセスコマンドによるRAMへのアクセスでプログラム容量の削減を図りつつ、メモリアクセスコマンドによってRAMの領域を無駄なく活用することが可能となる。
以上より、本発明の主制御装置では、RAM領域は、メモリアクセスコマンドおよび入出力ポートアクセスコマンドの双方によってアクセス可能な擬似RAM領域と、メモリアクセスコマンドのみによってアクセス可能な領域とに分けられることになる。
In the gaming machine of the present invention, the CPU of the main control device can access a partial area of the RAM by an input / output port access command by the function of the area classification determination unit. The address for designating the access destination can be one byte or more less for the input / output port access command than for the memory access command. Therefore, by using an input / output port access command instead of a memory access command at a location where access to the RAM is required, the program capacity can be reduced by 1 byte or more per location. Access to the RAM is a process performed many times in the entire program. Therefore, in the gaming machine of the present invention, the capacity of the entire program can be significantly reduced by the above-described action. Hereinafter, of the RAM area, an area accessible by the input / output port access command is referred to as a pseudo RAM area.
In addition, since the main control device is also provided with a memory area decoding unit, it is possible to access the RAM also by a memory access command. The pseudo RAM area is only a part of the address space for the input / output port, but if the memory access command is used, the entire area of the RAM can be accessed. Therefore, it is possible to use the RAM area without waste by the memory access command while reducing the program capacity by accessing the RAM by the input / output port access command.
As described above, in the main controller of the present invention, the RAM area is divided into a pseudo RAM area accessible by both the memory access command and the input / output port access command, and an area accessible only by the memory access command. Become.

本発明において、CPUは、ROMに格納されている制御プログラムに従って実行する制御処理の一つとして、RAMクリア処理が挙げられる。これは、CPUが、RAMの2バイト以上の所定の連続領域を初期状態に設定すべきRAMクリア条件の成否を判定し、RAMクリア条件が成立する時には、連続領域に所定の初期化値を書き込むことによって初期化する処理である。連続領域はRAMの全領域とすることが好ましいが、一部の領域としてもよい。
RAMへの初期化値の書き込みには、入出力ポートアクセスコマンドでアクセス可能な領域、即ち擬似RAM領域も含めて、メモリアクセスコマンドを用いる。RAMの連続領域への同一値の書き込みは、アドレスを順次更新しながら同一値を書き込むループによって実現することができる。仮に、擬似RAM領域とその他の領域で入出力ポートアクセスコマンドとメモリアクセスコマンドを使い分けるものとすれば、擬似RAM領域への書き込みとその他の領域への書き込みは、コマンドが異なるため個別のループで処理されることになる。これに対し、擬似RAM領域にもメモリアクセスコマンドを用いるものとしておけば、連続領域全体について単一のループでRAMクリアを実現できるため、プログラムサイズを抑制することが可能となる。
ただし、上述の構成は必須ではなく、擬似RAM領域に対しては入出力ポートアクセスコマンドを用い、その他の領域に対してはメモリアクセスコマンドを用いて書き込みを行う構成を採ることも可能である。
In the present invention, the CPU clears a RAM clear process as one of the control processes executed in accordance with the control program stored in the ROM. This is because the CPU determines whether or not a RAM clear condition for setting a predetermined continuous area of 2 bytes or more in the RAM to an initial state is satisfied, and writes a predetermined initialization value in the continuous area when the RAM clear condition is satisfied. It is a process to initialize by. The continuous area is preferably the entire area of the RAM, but may be a partial area.
The initialization value is written into the RAM using a memory access command including an area accessible by the input / output port access command, that is, a pseudo RAM area. Writing the same value to the continuous area of the RAM can be realized by a loop for writing the same value while sequentially updating the address. If the I / O port access command and the memory access command are used separately in the pseudo-RAM area and other areas, the commands in the pseudo-RAM area and the other areas are processed in separate loops because the commands are different. Will be. On the other hand, if the memory access command is also used for the pseudo RAM area, the RAM can be cleared in a single loop for the entire continuous area, and thus the program size can be suppressed.
However, the above-described configuration is not essential, and it is possible to adopt a configuration in which an input / output port access command is used for the pseudo RAM area and a memory access command is used for writing to other areas.

RAMクリア処理での初期化値は、任意に設定可能である。例えば、16進数で値00Hを書き込むようにしてもよい。
また、遊技機では、遊技の進行中に抽選を行い、大当たりとなった時には、遊技媒体の払い出しを受けやすくする処理を含める時がある。この処理は、例えば、遊技の統合制御において、所定のタイミングで、所定の大当たり判定乱数に基づいて大当たりか否かを判定する抽選処理を行い、抽選処理によって大当たりと判定された場合には、その他の場合に比較して遊技媒体の払い出しを受けやすい遊技状態を実現する大当たり制御処理とを行うことによって実現される。このように抽選を行う場合には、初期化値は、大当たりとなる時の大当たり判定乱数の値を避けて設定するようにしてもよい。こうすることによって、制御プログラムの改ざんや、ノイズなどの影響によって、本来意図されていないRAM領域からのデータの読み込みが行われた場合でも、誤って大当たり判定がなされることを回避できる。
The initialization value in the RAM clear process can be arbitrarily set. For example, the value 00H may be written in hexadecimal.
In addition, in the gaming machine, there is a case where a lottery is performed while the game is in progress, and a process for making it easy to receive payout of the game medium is included when a big hit is made. For example, in the integrated control of the game, a lottery process is performed at a predetermined timing to determine whether or not the jackpot is based on a predetermined jackpot determination random number. This is realized by performing a jackpot control process that realizes a gaming state in which a game medium is more likely to be paid out than in the above case. When lottery is performed in this way, the initialization value may be set avoiding the value of the jackpot determination random number when the jackpot is reached. By doing so, it is possible to avoid making a jackpot determination by mistake even when data is read from a RAM area that is not originally intended due to tampering with the control program or noise.

RAMクリア処理は、RAMの全領域を対象として行うようにしてもよいし、一部のみを対象として行うようにしてもよい。
例えば、RAMの領域には、統合制御において使用が予定されていない未使用領域が含まれている場合には、この未使用領域は、RAMクリア処理の対象外としてもよい。こうすることで、RAMクリア処理によって初期化値の書き込み対象となる領域が少なくなる分、RAMクリア処理の負荷が軽減される利点がある。
The RAM clear process may be performed on the entire area of the RAM or only on a part thereof.
For example, when the RAM area includes an unused area that is not scheduled to be used in the integrated control, the unused area may be excluded from the RAM clear process. By doing so, there is an advantage that the load of the RAM clear process is reduced as the area to which the initialization value is written is reduced by the RAM clear process.

未使用領域をRAMクリア処理の対象外とする一例として、RAMの先頭アドレスから連続する所定範囲がワーク、即ちCPUがROMに格納されている制御プログラムに基づく制御処理を実行する際に使用する情報を格納しておくための領域に割り当てられている場合には、RAMクリア処理は、ワークを対象として行うものとしてもよい。
未使用領域を除くRAM領域は、上述のワークの他に、例えば、CPUが制御プログラムを実行する際に一時的にデータを格納しておくための可変サイズのスタックに活用される。ワークを対象としてRAMクリア処理を行う場合、更に、スタックをRAMクリアの対象に含めても良いし、除外してもよい。RAMクリアの対象から除外する態様では、RAMクリア処理の対象領域を更に減らすことができるため、RAMクリア処理の負荷を更に軽減することができる。
更に、制御処理上、許容される場合には、ワークの一部のみを初期化の対象としてもよい。例えば、特別図柄、普通図柄、特別電動役物制御、普通電動役物制御など遊技の動作を決定する主要なワークのみを初期化対象とすることが考えられる。
As an example of excluding an unused area from RAM clear processing, information used when a predetermined range continuous from the head address of the RAM executes a control process based on a control program stored in the ROM, ie, a work piece. In this case, the RAM clear process may be performed on a work.
In addition to the above-described work, the RAM area excluding the unused area is utilized for a variable-size stack for temporarily storing data when the CPU executes a control program, for example. When the RAM clear process is performed on a workpiece, the stack may be included in the RAM clear target or may be excluded. In the aspect excluded from the RAM clear target, the target area of the RAM clear process can be further reduced, so that the load of the RAM clear process can be further reduced.
Furthermore, if it is permitted in the control processing, only a part of the work may be set as the target of initialization. For example, it is conceivable that only a main work that determines a game operation such as a special symbol, a normal symbol, a special electric accessory control, or a normal electric accessory control is targeted for initialization.

CPUは、RAMクリア処理をサブルーチンで行うことも可能であるが、サブルーチンによらずに、クリア条件の成否を判定する判定処理と同一の処理内で行うことが好ましい。上述の通り、RAMクリア処理は比較的単純なループ処理で実現可能である。かかる処理をサブルーチン化すると、サブルーチンを実行するために、サブルーチン終了後の戻りアドレスをスタックに記憶させるなどの処理が必要となり、RAMクリア処理に時間を要する。判定処理と同一の処理内で行うようにすれば、こうした無駄を抑制でき、効率的にRAMをクリアすることが可能となる。   Although it is possible for the CPU to perform the RAM clearing process in a subroutine, it is preferable to perform the RAM clearing process within the same process as the determination process for determining whether or not the clear condition is satisfied without depending on the subroutine. As described above, the RAM clear process can be realized by a relatively simple loop process. When such a process is converted into a subroutine, in order to execute the subroutine, a process such as storing the return address after completion of the subroutine in the stack is required, and the RAM clear process takes time. If it is performed in the same process as the determination process, such waste can be suppressed and the RAM can be efficiently cleared.

本発明において、入出力ポートで指定されるアドレス値のうち、擬似RAM領域は種々の設定が可能であるが、先頭アドレスを含む所定範囲を割り当てることが好ましい。この時、エリア区分判定部は、先頭アドレスから所定範囲内のアドレスが指定されている時に、アクセス先をRAMと判断し、その他の場合には入出力ポートと判断することになる。
遊技機では、ワークとして使用するRAM領域を先頭アドレスから空き領域(未使用領域)を設けることなく連続して設定することによって、不正防止を図っている。このため、上述の態様では、擬似RAM領域をRAM領域の先頭アドレスから設けることによって、擬似RAM領域をワークとして無駄なく活用することが可能となる。
In the present invention, among the address values specified by the input / output port, various settings can be made in the pseudo RAM area, but it is preferable to assign a predetermined range including the head address. At this time, the area classification determination unit determines that the access destination is the RAM when an address within a predetermined range from the head address is specified, and determines the input / output port in other cases.
In gaming machines, fraud prevention is achieved by continuously setting RAM areas used as work without providing empty areas (unused areas) from the top address. For this reason, in the above-described aspect, by providing the pseudo RAM area from the start address of the RAM area, the pseudo RAM area can be used as a work without waste.

エリア区分判定部がアクセス先の判定に使用するエリア区分データは、ハードウェア的に組み込むようにしてもよいし、ソフトウェア的に設定可能な構成としてもよい。後者の例では、エリア区分判定部に、エリア区分データを記憶するためのエリア区分データ記憶部を設け、CPUが起動時に、エリア区分データをエリア区分データ記憶部に設定するようにすればよい。
エリア区分データとしては、例えば、擬似RAM領域の境界アドレスを用いることができる。例えば、境界の先頭アドレス、最終アドレスを用いてもよい。また、先頭アドレスと、擬似RAM領域の容量を用いても良い。擬似RAM領域が先頭アドレスから開始することが既知の場合には、最終アドレスまたは擬似RAM領域の容量のみをエリア区分データとして用いることもできる。
エリア区分データをソフトウェア的に設定可能としておけば、機種や処理内容に応じて、比較的容易に最適サイズで擬似RAM領域を設けることができる利点がある。
The area classification data used by the area classification determination unit to determine the access destination may be incorporated in hardware or may be configured in software. In the latter example, the area division determination unit may be provided with an area division data storage unit for storing area division data, and the CPU may set the area division data in the area division data storage unit when the CPU is activated.
As the area division data, for example, the boundary address of the pseudo RAM area can be used. For example, the boundary start address and end address may be used. Also, the start address and the capacity of the pseudo RAM area may be used. If it is known that the pseudo RAM area starts from the top address, only the final address or the capacity of the pseudo RAM area can be used as the area division data.
If the area division data can be set by software, there is an advantage that the pseudo RAM area can be provided with the optimum size relatively easily according to the model and processing contents.

本発明において、メモリエリアデコード部を設ける場合には、更に、アドレスが示す上位所定桁またはアドレス全部に基づいて、入出力ポートをアクティブにする入出力ポートセレクト信号を出力可能としてもよい。入出力ポートセレクト信号は、入出力ポートに伝達される。
こうすることによって、メモリアクセスコマンドによって入出力ポートからの信号授受が可能となる。入出力ポートの一部または全部を、メモリアクセスコマンドでアクセスするものとすれば、その分、入出力ポートアクセスコマンドによってアクセス可能となる擬似RAM領域を増やすことができる。入出力ポート全部をメモリアクセスコマンドでアクセスするものとすれば、入出力ポートアクセスコマンドによって指定可能な全アドレス空間を擬似RAM領域とすることが可能となる。この態様によれば、プログラムサイズの削減効果上、最も効果的な擬似RAM領域のサイズを、柔軟に設定することが可能となるのである。
In the present invention, when the memory area decoding unit is provided, an input / output port select signal for activating the input / output port may be output based on the upper predetermined digit indicated by the address or the entire address. The input / output port select signal is transmitted to the input / output port.
By doing so, signals can be exchanged from the input / output port by the memory access command. If a part or all of the input / output ports are accessed by the memory access command, the pseudo RAM area that can be accessed by the input / output port access command can be increased accordingly. If all the input / output ports are accessed by the memory access command, the entire address space that can be specified by the input / output port access command can be set as the pseudo RAM area. According to this aspect, it is possible to flexibly set the most effective pseudo RAM area size in terms of the program size reduction effect.

本発明において、上述の特徴は、必ずしも全てが備えられている必要はなく、適宜、一部を省略したり、組み合わせたりしても良い。上述の特徴は、主制御装置のみならず、払出制御装置に適用することも可能である。   In the present invention, the above-described features are not necessarily all provided, and some of them may be omitted or combined as appropriate. The above-described features can be applied not only to the main control device but also to the payout control device.

本発明の実施例について以下の順序で説明する。
A.装置構成:
B.主制御基板110の回路構成:
B1.ハードウェア構成:
B2.RAM116へのワークの割り当て:
C.制御処理:
C1.主制御側電源投入時処理:
C2.RAMの全領域クリア処理:
C3.主制御側タイマ割り込み処理:
C4.サブ統合側処理:
C5.払出制御基板の制御処理:
D.プログラム容量削減効果:
E.主制御基板110の変形例:
Embodiments of the present invention will be described in the following order.
A. Device configuration:
B. Circuit configuration of main control board 110:
B1. Hardware configuration:
B2. Assignment of work to RAM 116:
C. Control processing:
C1. Main control side power-on processing:
C2. Clear all RAM area:
C3. Main control timer interrupt processing:
C4. Sub-integration processing:
C5. Discharge control board control processing:
D. Program capacity reduction effect:
E. Modification of main control board 110:

A.装置構成:
実施例では、パチンコ機として構成した場合の例を示す。
実施例としてのパチンコ機は、遊技媒体に相当する遊技球を、発射し、遊技盤に設けられた入賞口に入賞させることによって、賞球の払出を受ける遊技機である。
パチンコ機が、第1種または複合機と呼ばれる機種の場合、始動入賞口と呼ばれる入賞口に遊技球が入賞すると、乱数を用いた電子的な抽選が行われる。抽選の結果、大当たりとなると、遊技盤に設けられた大入賞口が所定期間、所定回数、開閉し、賞球の払出を受けやすい有利な遊技状態(以下、「大当たり遊技」という)に移行する。
パチンコ機が、第2種または複合機の場合には、遊技球の動きによって機械的に抽選の当落を決定する機構が備えられている。この場合でも、大当たりが発生すると、機種に応じた大当たり遊技に移行する。
A. Device configuration:
In an Example, the example at the time of comprising as a pachinko machine is shown.
A pachinko machine as an embodiment is a gaming machine that receives a prize ball by firing a game ball corresponding to a game medium and winning a prize in a prize opening provided on the game board.
In the case where the pachinko machine is a type called a first type or a multi-function machine, an electronic lottery using random numbers is performed when a game ball wins a winning opening called a start winning opening. As a result of the lottery, the big winning opening provided on the game board opens and closes a predetermined number of times for a predetermined period and shifts to an advantageous gaming state (hereinafter referred to as a “hit game”) that is easy to receive a prize ball. .
When the pachinko machine is the second type or the multi-function machine, a mechanism for mechanically determining the winning of the lottery by the movement of the game ball is provided. Even in this case, when a jackpot occurs, the game shifts to a jackpot game corresponding to the model.

図1は実施例としてのパチンコ機1の制御用ハードウェア構成を示すブロック図である。パチンコ機1は、主制御基板110、払出制御基板210、サブ制御基板310、装飾図柄制御基板350などの各制御基板の分散処理によって制御される。主制御基板110には、CPU、RAM、ROMなどを備えたワンチップマイクロコンピュータが実装されており、ROMに記録されたプログラムに従って種々の制御処理を実現する。払出制御基板210、サブ制御基板310も同様である。
本実施例では、サブ制御基板310と装飾図柄制御基板350とは別基板として構成しているが、両者を統合した基板としてもよい。この場合、サブ制御基板310の機能と装飾図柄制御基板350の機能を、複数のCPUの分散処理で実現してもよいし、単独のCPUで実現する構成としてもよい。
また、主制御基板110と払出制御基板210も別基板とせず、両者を統合した基板として構成することもできる。
FIG. 1 is a block diagram showing a control hardware configuration of a pachinko machine 1 as an embodiment. The pachinko machine 1 is controlled by distributed processing of each control board such as the main control board 110, the payout control board 210, the sub-control board 310, and the decorative design control board 350. The main control board 110 is mounted with a one-chip microcomputer equipped with a CPU, RAM, ROM and the like, and realizes various control processes according to programs recorded in the ROM. The same applies to the payout control board 210 and the sub-control board 310.
In this embodiment, the sub-control board 310 and the decorative design control board 350 are configured as separate boards, but may be a board in which both are integrated. In this case, the function of the sub control board 310 and the function of the decorative design control board 350 may be realized by distributed processing of a plurality of CPUs, or may be realized by a single CPU.
Also, the main control board 110 and the payout control board 210 are not separate boards, and can be configured as an integrated board.

実施例のパチンコ機1では、種々の不正を防止するため、主制御基板110への外部からの入力が制限されている。主制御基板110とサブ制御基板310とは単方向のパラレル電気信号で接続されており、主制御基板110と払出制御基板210とは、制御処理の必要上、双方向シリアル電気信号で接続されている。
払出制御基板210、サブ制御基板310は、それぞれ主制御基板110からのコマンドに応じて動作する。装飾図柄制御基板350は、サブ制御基板310からのコマンドに応じて動作する。
In the pachinko machine 1 of the embodiment, input from the outside to the main control board 110 is restricted in order to prevent various frauds. The main control board 110 and the sub control board 310 are connected by a unidirectional parallel electric signal, and the main control board 110 and the payout control board 210 are connected by a bi-directional serial electric signal for the necessity of control processing. Yes.
The payout control board 210 and the sub control board 310 operate in response to commands from the main control board 110, respectively. The decorative design control board 350 operates in response to a command from the sub control board 310.

パチンコ機1には、主制御基板110が直接に制御する機構もある。図中には、主制御基板110が制御する装置の一例として、大当たり遊技において、大入賞口を駆動するための大入賞口ソレノイド43、および特別図柄表示装置41を例示した。特別図柄表示装置41とは、遊技中に主制御基板110が行った抽選の結果を、所定数のLEDの点灯状態で表示する装置である。
図示しないが、主制御基板110は、この他にも、普通図柄表示装置、特別図柄保留ランプ、普通図柄保留ランプ、大当り種類表示ランプ、状態表示ランプなどの表示を制御することができる。
The pachinko machine 1 also has a mechanism that is directly controlled by the main control board 110. In the figure, as an example of devices controlled by the main control board 110, in the jackpot game, the big winning opening solenoid 43 for driving the big winning opening and the special symbol display device 41 are illustrated. The special symbol display device 41 is a device that displays the result of the lottery performed by the main control board 110 during the game in a lighting state of a predetermined number of LEDs.
Although not shown, the main control board 110 can also control the display of a normal symbol display device, a special symbol hold lamp, a normal symbol hold lamp, a jackpot type display lamp, a status display lamp, and the like.

また、主制御基板110には、遊技中の動作を制御するため、種々のセンサからの検出信号が入力される。図中には一例として入賞検出器42からの入力を例示した。入賞検出器42とは、始動入賞口への入賞を検出するためのセンサである。主制御基板110は、入賞検出器42からの信号に応じて、先に説明した抽選を行い、大当り遊技を実行することができる。主制御基板110には、他にも種々の入力がなされているが、ここでは説明を省略する。   Further, detection signals from various sensors are input to the main control board 110 in order to control the operation during the game. In the figure, the input from the winning detector 42 is illustrated as an example. The winning detector 42 is a sensor for detecting a winning at the start winning opening. The main control board 110 can perform the jackpot game by performing the lottery described above in accordance with the signal from the winning detector 42. Various other inputs are made to the main control board 110, but the description is omitted here.

遊技時におけるその他の制御は、払出制御基板210、サブ制御基板310を介して行われる。
払出制御基板210は、遊技中の遊技球の発射および払い出しを次の手順で制御する。
遊技球の発射は、直接的には発射制御基板47によって制御される。即ち、遊技者が、遊技機正面に備えられた発射用のハンドルを操作すると、発射制御基板47は操作に応じて発射モータ49を制御し、遊技球を発射する。遊技球の発射は、タッチ検出部48によって、ハンドルに遊技者が触れていることが検出されている状況下でのみ行われる。払出制御基板210は、発射制御基板47に対して、発射可否の制御信号を送出することで、間接的に球の発射を制御する。
Other controls during the game are performed via the payout control board 210 and the sub-control board 310.
The payout control board 210 controls the launch and payout of the game ball being played in the following procedure.
The launch of the game ball is directly controlled by the launch control board 47. That is, when the player operates a launching handle provided on the front of the gaming machine, the launch control board 47 controls the launch motor 49 according to the operation to launch a game ball. The game ball is fired only under a situation where the touch detection unit 48 detects that the player is touching the handle. The payout control board 210 indirectly controls the launch of the sphere by sending a launch control signal to the launch control board 47.

遊技中に入賞した旨のコマンドを主制御基板110から受信すると、払出制御基板210は、賞球払出装置20内の払出モータ21を制御し、払出球検出器22によって球数をカウントしながら規定数の球を払い出す。払出モータ21の動作は、モータ駆動センサ23によって監視されており、球ガミ、球切れなどの異常が検出された場合、払出制御基板210は、表示部4aにエラーコードを表示する。エラー表示された時には、遊技場の係員が異常を除去した後、操作スイッチ4bを操作することで復旧させることができる。   When a command indicating that a prize has been won during the game is received from the main control board 110, the payout control board 210 controls the payout motor 21 in the prize ball payout device 20, and defines the number of balls by the payout ball detector 22. Pay out a number of balls. The operation of the payout motor 21 is monitored by the motor drive sensor 23. When an abnormality such as a ball bit or a ball break is detected, the payout control board 210 displays an error code on the display unit 4a. When an error is displayed, it can be recovered by operating the operation switch 4b after the attendant at the game hall has removed the abnormality.

サブ制御基板310は、遊技中における音声、表示、ランプ点灯などの演出を制御する。サブ制御基板310は、これらの制御を実行するためのCPU、RAM、ROMを備えたマイクロコンピュータとして構成されている。これらの演出は、通常時、入賞時、大当たり時など、遊技中のステータスに応じて変化する。主制御基板110から、各ステータスに応じた演出用のコマンドが送信されると、サブ制御基板310は、各コマンドに対応したプログラムを起動して、主制御基板110から指示された演出を実現する。
音声およびランプ点灯はサブ制御基板310が直接制御するが、LCD16の表示については、装飾図柄制御基板350を介して制御する。
The sub control board 310 controls effects such as voice, display, and lamp lighting during the game. The sub-control board 310 is configured as a microcomputer including a CPU, RAM, and ROM for executing these controls. These effects vary according to the status during the game, such as during normal times, when winning a prize, or when winning a big hit. When an effect command corresponding to each status is transmitted from the main control board 110, the sub-control board 310 activates a program corresponding to each command to realize the effect instructed from the main control board 110. .
Sound and lamp lighting are directly controlled by the sub-control board 310, but the display on the LCD 16 is controlled via the decorative design control board 350.

サブ制御基板310の制御対象となるランプには、遊技盤面に設けられたパネル装飾ランプ12と、枠に設けられた枠装飾ランプ31がある。サブ制御基板310は、ランプ中継基板32、34を介して、パネル装飾ランプ12および枠装飾ランプ31と接続されており、各ランプを個別に点滅させることができる。
図示を省略したが、スピーカ29を制御するため、サブ制御基板310には、音源ICおよびアンプが備えられている。CPUが、スピーカ29から出力する音声を決めて音声出力コマンドを出力すると、音源ICが予め用意された音源データから指定されたものを再生し、アンプで増幅してスピーカ29から出力する。
The lamps to be controlled by the sub-control board 310 include the panel decoration lamp 12 provided on the game board surface and the frame decoration lamp 31 provided on the frame. The sub-control board 310 is connected to the panel decoration lamp 12 and the frame decoration lamp 31 via the lamp relay boards 32 and 34, and can blink each lamp individually.
Although not shown, the sub-control board 310 includes a sound source IC and an amplifier in order to control the speaker 29. When the CPU determines the sound to be output from the speaker 29 and outputs a sound output command, the sound source IC reproduces the specified sound source data prepared in advance, amplifies it with an amplifier, and outputs it from the speaker 29.

また、サブ制御基板310は、遊技中の演出の他、エラー時、不正行為その他の異常が生じた時には、警報音を出力したり、ランプを警告用に点灯したりして、異常発生を報知する。主制御基板110のRAMの内容を消去するためのRAMクリアスイッチが操作された時にも、同様に報知音が出力される。
警報音には、例えば、遊技中の効果音とは明らかに異なるブザー音を用いることができる。警告用のランプ点灯としては、例えば、遊技盤の周囲全体を赤く点滅させるなど、遊技中とは明らかに異なる態様での点灯・点滅をさせることができる。
In addition to the effects during the game, the sub-control board 310 outputs an alarm sound or turns on a lamp for warning when an error, an illegal act or other abnormality occurs, and notifies the occurrence of the abnormality. To do. A notification sound is similarly output when a RAM clear switch for erasing the contents of the RAM of the main control board 110 is operated.
As the alarm sound, for example, a buzzer sound that is clearly different from the sound effect during the game can be used. As the warning lamp lighting, for example, lighting and blinking can be performed in a mode clearly different from that during the game, for example, the entire periphery of the game board blinks red.

B.主制御基板110の回路構成:
B1.ハードウェア構成:
図2は主制御基板110の回路構成を示す説明図である。先に説明した通り、主制御基板110には、CPU111、RAM116、ROM114を備えるワンチップマイクロコンピュータが実装されている。図中には、CPU111が、RAM116、ROM114にアクセスするための回路、および外部入出力(I/O)を行うための回路を示した。
本実施例では、CPU111には、セキュリティ機能が備えられている。セキュリティ機能としては、例えば、内蔵されたROMが正規の認証を受けたROMであるかを判定する機能、予め定められたエリア以外へのアクセスが行われた場合に、内部的にリセットを発生させる機能、CPUの外部に設けられた端子から、内蔵のIDコードや、ROMに格納されたデータ等を読み出すことができる機能などが挙げられる。
また、遊技機の規格上、プログラム容量は3KB以下、データ容量は3KB以下という厳しい制限下で動作するよう構成されている。
本実施例の回路は、CPU111がRAM116にアクセスするために、ロード/ストアコマンドと呼ばれる通常のメモリ領域へのアクセス用のコマンドの他、イン/アウトコマンドというI/Oにアクセスするためのコマンドも使用可能な構成となっている。以下では、まず回路構成について概要を示した後、その動作について説明する。
B. Circuit configuration of main control board 110:
B1. Hardware configuration:
FIG. 2 is an explanatory diagram showing a circuit configuration of the main control board 110. As described above, on the main control board 110, a one-chip microcomputer including a CPU 111, a RAM 116, and a ROM 114 is mounted. In the figure, a circuit for the CPU 111 to access the RAM 116 and the ROM 114 and a circuit for performing external input / output (I / O) are shown.
In the present embodiment, the CPU 111 is provided with a security function. Security functions include, for example, a function for determining whether a built-in ROM is a genuinely certified ROM, or a reset is generated internally when access is made to areas other than a predetermined area. A function, a function that can read out a built-in ID code, data stored in a ROM, or the like from a terminal provided outside the CPU can be given.
Further, according to the gaming machine standard, the program capacity is 3 KB or less and the data capacity is 3 KB or less.
In the circuit of this embodiment, in order for the CPU 111 to access the RAM 116, in addition to a command for accessing a normal memory area called a load / store command, a command for accessing an I / O called an in / out command is also provided. The configuration is usable. In the following, first, the outline of the circuit configuration will be shown, and then the operation will be described.

CPU111からは、バスバッファ112を介して図示する種々の信号が出力される。アドレスA15〜A0は16ビットの信号である。A15〜A8を上位アドレス、A7〜A0を下位アドレスと呼ぶこともある。データバスは、D7〜D0の8ビットである。RD/WRは読み書きの制御信号(以下、「リード・ライト」と呼ぶこともある)である。IOREQは、I/Oへのアクセスの際にアクティブとなる1ビットの信号であり、MREQはメモリへのアクセスの際にアクティブとなる1ビットの信号である。   The CPU 111 outputs various signals shown in the figure via the bus buffer 112. Addresses A15 to A0 are 16-bit signals. A15 to A8 may be referred to as an upper address, and A7 to A0 may be referred to as a lower address. The data bus has 8 bits D7 to D0. RD / WR is a read / write control signal (hereinafter also referred to as “read / write”). IOREQ is a 1-bit signal that becomes active when an I / O is accessed, and MREQ is a 1-bit signal that becomes active when a memory is accessed.

メモリエリアデコーダ113は、メモリへのアクセスを中継する回路である。メモリエリアデコーダ113からは、ROM114へのアクセスを可能とするためのチップセレクタ信号MCS2、RAM116へのアクセスを可能とするためのチップセレクタ信号MCS1が出力される。チップセレクタ信号MCS1は、選択部115を介してRAM116に入力される。   The memory area decoder 113 is a circuit that relays access to the memory. From the memory area decoder 113, a chip selector signal MCS2 for enabling access to the ROM 114 and a chip selector signal MCS1 for enabling access to the RAM 116 are output. The chip selector signal MCS1 is input to the RAM 116 via the selection unit 115.

エリア区分判定部120は、イン/アウトコマンドによって、RAM116へのアクセスを可能とするための回路である。エリア区分判定部120内には、イン/アウトコマンドがI/Oへのアクセスを意味しているのか、RAM116へのアクセスを意味しているのかを区分するための基準となるエリア区分データ121が格納されている。このデータは、予め固定値をハードウェア的に組み込んでおくようにしてもよいが、本実施例では、ROM114に記憶された基準値を読み込んで、起動時に設定するものとした。
エリア区分判定部120からは、I/Oデコーダ122をアクティブにするためのIOエリア識別信号、およびRAM116へのチップセレクタ信号MCS0が出力される。
The area classification determination unit 120 is a circuit for enabling access to the RAM 116 by in / out commands. In the area classification determination unit 120, area classification data 121 serving as a reference for classifying whether the in / out command means access to the I / O or the access to the RAM 116 is stored. Stored. For this data, a fixed value may be incorporated in advance by hardware, but in this embodiment, the reference value stored in the ROM 114 is read and set at the time of activation.
From the area division determination unit 120, an IO area identification signal for activating the I / O decoder 122 and a chip selector signal MCS0 to the RAM 116 are output.

チップセレクタ信号MCS0は、選択部115を介してRAM116に入力される。RAM116は、メモリエリアデコーダ113からのチップセレクタ信号MCS1、およびエリア区分判定部120からのチップセレクタ信号MCS0のいずれかがアクティブとなっていれば、アクセス可能である。従って、選択部115は、例えば、オアゲートによって構成することができる。   The chip selector signal MCS0 is input to the RAM 116 via the selection unit 115. The RAM 116 can be accessed if any one of the chip selector signal MCS1 from the memory area decoder 113 and the chip selector signal MCS0 from the area division determination unit 120 is active. Therefore, the selection unit 115 can be configured by an OR gate, for example.

IOデコーダ122は、IOエリア識別信号がアクティブとなっている時に稼働する。IOデコーダ122は、下位アドレスA7〜A0の値に応じて、アクセス先となるべきIOを指定するためのチップセレクタ信号IOCS1、IOCS2等を出力する。チップセレクタ信号は、下位アドレスA7〜A0のアドレス空間に相当する本数、出力可能である。   The IO decoder 122 operates when the IO area identification signal is active. The IO decoder 122 outputs chip selector signals IOCS1, IOCS2, and the like for designating the IO to be accessed according to the values of the lower addresses A7 to A0. The number of chip selector signals corresponding to the address space of the lower addresses A7 to A0 can be output.

図中には、I/Oポートの一つとして備えられているシリアルポートの構成を示した。チップセレクタ信号IOCS1、IOCS2は、パラレル入出力ポート123内に設けられた受信バッファ123r、送信バッファ123sに対応している。受信バッファ123r、送信バッファ123sの容量は、任意に設定可能であるが、本実施例では、データの入出力が可能なサイズとして32バイトの容量を確保した。これらのバッファは、いわゆるFIFO(First In First Out1)型である。
受信バッファ123rは、シリアル入出力制御部124内に構成されたSP(シリアル/パラレル)変換部124sに接続され、送信バッファ123sは、PS(パラレル/シリアル)変換部124pに接続されている。外部からシリアル入力する際には、データは、SP変換部124sによって8ビットのパラレルデータに変換され、受信バッファ123rに蓄積される。CPU111は、インコマンドによって、受信バッファ123rのデータを読み取ればよい。また、外部にシリアル出力する際には、CPU111は、アウトコマンドによって送信バッファ123sにデータを格納すればよい。このデータは8ビットのパラレルデータとしてPS変換部124pに伝達され、シリアルデータに変換されて、出力される。
In the figure, the configuration of a serial port provided as one of the I / O ports is shown. The chip selector signals IOCS1 and IOCS2 correspond to the reception buffer 123r and the transmission buffer 123s provided in the parallel input / output port 123. The capacities of the reception buffer 123r and the transmission buffer 123s can be arbitrarily set, but in this embodiment, a capacity of 32 bytes is secured as a data input / output size. These buffers are of the so-called FIFO (First In First Out 1) type.
The reception buffer 123r is connected to an SP (serial / parallel) conversion unit 124s configured in the serial input / output control unit 124, and the transmission buffer 123s is connected to a PS (parallel / serial) conversion unit 124p. When serially inputting from the outside, the data is converted into 8-bit parallel data by the SP conversion unit 124s and stored in the reception buffer 123r. The CPU 111 may read the data in the reception buffer 123r by an in command. Further, when serially outputting to the outside, the CPU 111 may store data in the transmission buffer 123s by an out command. This data is transmitted as 8-bit parallel data to the PS converter 124p, converted into serial data, and output.

図3は主制御基板110の動作を示す説明図である。先に説明した通り、本実施例では、CPU111は、RAM116に対して、ロード/ストアコマンドと、イン/アウトコマンドの双方を用いてアクセスすることが可能である。図3では、かかるアクセスを実現するため、ロードコマンド、インコマンドを例にとって、CPU111、メモリエリアデコーダ113、エリア区分判定部120、IOデコーダ122の機能をそれぞれ示した。   FIG. 3 is an explanatory diagram showing the operation of the main control board 110. As described above, in this embodiment, the CPU 111 can access the RAM 116 by using both a load / store command and an in / out command. In FIG. 3, the functions of the CPU 111, the memory area decoder 113, the area division determination unit 120, and the I / O decoder 122 are shown by taking a load command and an in command as examples to realize such access.

CPU111が、LD(ロード)命令を出力したとする(処理S1)。メモリエリアに直接アクセス可能とするため、LD命令では、アドレスA15〜A0の全てをコマンド内で指定する必要がある。従って、図中に示す通り、このコマンドは、「LD、下位アドレス、上位アドレス」という3バイトで構成される。LDコマンド出力と併せて、MREQおよびRD信号がアクティブとなるが、図の煩雑化回避のため、図示を省略した。   It is assumed that the CPU 111 outputs an LD (load) instruction (processing S1). In order to allow direct access to the memory area, it is necessary to specify all addresses A15 to A0 in the command in the LD instruction. Therefore, as shown in the figure, this command is composed of 3 bytes “LD, lower address, upper address”. Along with the LD command output, the MREQ and RD signals become active, but the illustration is omitted to avoid complication of the figure.

メモリエリアデコーダ113は、アドレスに基づき、アクセス先が、ROM114かRAM116かを判定する(処理S2)。
ROM114へのアクセスが指定されている場合には、ROM114に対応するチップセレクタ信号MCS2をアクティブにする。この結果、ROM114内において、A12〜A0で指定された領域に格納されているデータが読み出される。
RAM116へのアクセスが指定されている場合には、RAM116に対応するチップセレクタ信号MCS1をアクティブにする。この結果、RAM116内において、下位アドレスで指定された領域に格納されているデータが読み出される。この場合、CPU111は、RAM116のメモリ領域(アドレス00H〜FFH)のうち任意の領域にアクセス可能である。RAM116のメモリ領域は設定により512バイトおよび256バイトに切り換えることが可能であるが、本実施例では、256バイトと設定されている場合を例にとって説明する。
Based on the address, the memory area decoder 113 determines whether the access destination is the ROM 114 or the RAM 116 (processing S2).
When access to the ROM 114 is designated, the chip selector signal MCS2 corresponding to the ROM 114 is activated. As a result, the data stored in the area designated by A12 to A0 in the ROM 114 is read.
When access to the RAM 116 is designated, the chip selector signal MCS1 corresponding to the RAM 116 is activated. As a result, the data stored in the area designated by the lower address in the RAM 116 is read. In this case, the CPU 111 can access any area of the memory area (address 00H to FFH) of the RAM 116. The memory area of the RAM 116 can be switched between 512 bytes and 256 bytes depending on the setting. In this embodiment, a case where 256 bytes are set will be described as an example.

次に、IN命令を出力したとする(処理S3)。IN命令では、アクセス可能なIOが下位アドレスで指定される256カ所に制限されているため、コマンドは図示する通り、「IN、下位アドレス」の2バイトで構成される。
エリア区分判定部120は、エリア区分データに基づいて、アクセス先が、RAMかIOかを判別する(処理S4)。
例えば、図中のRAM116内のハッチングの領域(00H〜**H)(以下、この領域を「擬似RAM領域」と呼ぶこともある)がIN命令でもアクセス可能な領域として設定されているとする。エリア区分判定部120は、下位アドレスA7〜A0が、「00H〜**H」に含まれる場合には、アクセス先は擬似RAM領域であると判断し、その他の場合にはIOであると判断する。
Next, it is assumed that an IN command is output (processing S3). In the IN instruction, the accessible IO is limited to 256 places designated by the lower address, so the command is composed of 2 bytes of “IN, lower address” as shown in the figure.
The area classification determination unit 120 determines whether the access destination is RAM or IO based on the area classification data (processing S4).
For example, a hatched area (00H to ** H) in the RAM 116 in the figure (hereinafter, this area may be referred to as a “pseudo RAM area”) is set as an area that can be accessed by an IN instruction. . The area classification determination unit 120 determines that the access destination is a pseudo-RAM area when the lower addresses A7 to A0 are included in “00H to ** H”, and determines that the access destination is an IO in other cases. To do.

アクセス先がRAM116と判断される場合には、エリア区分判定部120は、チップセレクタ信号MCS0をアクティブにする。この結果、RAM116内において、下位アドレスで指定された領域に格納されているデータが読み出される。
アクセス先がIOであると判断される場合には、エリア区分判定部120は、IOエリア識別信号をアクティブにする。この結果、IOデコーダ122が稼働し、下位アドレスA7〜A0に基づいてIO選択し、対応するチップセレクタ信号IOCS1、IOCS2等をアクティブにする(処理S5)。
When it is determined that the access destination is the RAM 116, the area division determination unit 120 activates the chip selector signal MCS0. As a result, the data stored in the area designated by the lower address in the RAM 116 is read.
When it is determined that the access destination is the IO, the area division determination unit 120 activates the IO area identification signal. As a result, the IO decoder 122 is activated, makes an IO selection based on the lower addresses A7 to A0, and activates the corresponding chip selector signals IOCS1, IOCS2 and the like (processing S5).

本実施例では、このように、RAM116内に設けられた擬似RAM領域には、ロード/ストアコマンド、イン/アウトコマンドの双方でアクセスすることが可能である。擬似RAM領域は、任意に設定可能である。IOへのアクセスに必要なアドレス空間を除き、全てを擬似RAM領域に割り当てても良い。擬似RAMは、上述の通り、イン/アウトコマンドでアクセスできる分、アクセス1回につき1バイトずつプログラム容量を削減することができる。
擬似RAM領域へのアクセスには、下位アドレスA7〜A0をそのまま利用することができる点で、擬似RAM領域は、RAM116の先頭アドレスから設定することが好ましい。
In this embodiment, the pseudo RAM area provided in the RAM 116 can be accessed by both the load / store command and the in / out command. The pseudo RAM area can be arbitrarily set. All may be allocated to the pseudo-RAM area except for the address space required for accessing the IO. As described above, the pseudo RAM can reduce the program capacity by 1 byte for each access because of the access by the in / out command.
The pseudo RAM area is preferably set from the top address of the RAM 116 in that the lower addresses A7 to A0 can be used as they are for accessing the pseudo RAM area.

B2.RAM116へのワークの割り当て:
図4はRAM116へのワークの割り当て方法を示す説明図である。ワークとは、CPU111が種々の制御処理を実行する際に、制御処理間で受け渡すべき情報や、制御処理を繰り返し実行する際に次回まで保持しておくべき情報などを格納しておくべき領域を言う。本実施例では、ワークを構成する各変数は、RAM116の所定のアドレスに格納されるものとしたが、格納先のアドレスが不定のワークを設けても良い。
遊技機では、不正防止を図るため、ワークとして使用するRAM領域を先頭アドレスから空き領域を設けることなく連続して設定することが要求されている。
B2. Assignment of work to RAM 116:
FIG. 4 is an explanatory diagram showing a method for assigning work to the RAM 116. The work is an area for storing information to be transferred between control processes when the CPU 111 executes various control processes, information to be held until the next time when the control processes are repeatedly executed, and the like. Say. In this embodiment, each variable constituting the work is stored at a predetermined address in the RAM 116. However, a work having an indefinite storage destination address may be provided.
In gaming machines, in order to prevent fraud, it is required to continuously set a RAM area used as a work without providing an empty area from the top address.

RAM116は、ワークの他、スタックとしても活用される。スタックには、CPU111が制御プログラムを実行する上で一時的に記憶すべき種々の情報を記憶する。記憶すべき情報としては、例えば、使用中のレジスタの内容、サブルーチンを終了して本ルーチンに復帰するときの本ルーチンの復帰アドレスなど、制御処理を進める上で一時的に記憶する種々の情報の格納アドレスなどが挙げられる。
スタックへのデータの格納状態は、スタックポインタで管理される。スタックポインタは、上述のデータをスタックに順次、格納・読み出し可能とするために、スタック中での最新の情報の格納場所を表している。本実施例では、スタックにデータが格納される度に、スタックポインタのアドレスを「−1」ずつ変化させ、データが読み出される度に、スタックポインタのアドレスを「+1」ずつ変化させる方法を採った。
The RAM 116 is used not only as a work but also as a stack. Various information that should be temporarily stored when the CPU 111 executes the control program is stored in the stack. As information to be stored, for example, the contents of the register being used, and the return address of this routine when the subroutine is terminated and returned to this routine, various information to be temporarily stored when the control process proceeds. Examples include storage addresses.
The storage state of data on the stack is managed by the stack pointer. The stack pointer represents the storage location of the latest information in the stack so that the above-described data can be sequentially stored and read from the stack. In this embodiment, the stack pointer address is changed by “−1” every time data is stored in the stack, and the stack pointer address is changed by “+1” every time data is read. .

ワークを先頭アドレスから連続した領域に設けるという条件を満たす限り、ワークおよびスタックは、RAM116内の任意の領域に設定可能である。図4(a)は、一例として本実施例での設定例を示した。
RAM領域の下位アドレスを、先頭アドレス00H〜終端アドレスFFHとする。図4(a)の例では、擬似RAM116Aを先頭アドレス00Hから任意のアドレスzzHの範囲に設定した。また、ワーク116Wは先頭アドレス00Hから連続した領域に設定した。図中には、ワーク116Wのサイズが、擬似RAM116Aの領域を超えている例を示した。
擬似RAM領域を十分に確保可能であれば、ワークへのアクセス時に入出力ポートアクセスコマンドを利用することによるプログラム削減効果を十分に得るために、擬似RAM116Aをワーク116Wと同等以上とすることが好ましい。
As long as the condition that the work is provided in a continuous area from the start address is satisfied, the work and the stack can be set in any area in the RAM 116. FIG. 4A shows an example of setting in this embodiment as an example.
The lower address of the RAM area is defined as a start address 00H to an end address FFH. In the example of FIG. 4A, the pseudo RAM 116A is set in a range from the start address 00H to an arbitrary address zzH. The work 116W is set in a continuous area from the start address 00H. In the drawing, an example is shown in which the size of the workpiece 116W exceeds the area of the pseudo RAM 116A.
If a sufficient pseudo RAM area can be secured, the pseudo RAM 116A is preferably equal to or greater than the work 116W in order to obtain a sufficient program reduction effect by using the input / output port access command when accessing the work. .

一方、スタック116Sは、RAM116の終端アドレスFFHからアドレスが小さくなる方向に設ける。つまり、スタックポインタには初期値としてRAM116の終端アドレスFFHを入力しておく。こうすることによって、データが格納されるたびに、スタックポインタが「−1」ずつ変化するから、図示するように、アドレスが小さくなる側に向けてデータが順次積み重ねられていく。図中に示したスタック116Sのサイズは予め決められている訳ではなく、スタックに積み重ねられるデータ量によって変動する。   On the other hand, the stack 116S is provided in a direction in which the address becomes smaller than the end address FFH of the RAM 116. That is, the end address FFH of the RAM 116 is input as an initial value to the stack pointer. By doing so, each time data is stored, the stack pointer changes by “−1”. Therefore, as shown in the figure, the data is sequentially stacked toward the side where the address becomes smaller. The size of the stack 116S shown in the figure is not predetermined and varies depending on the amount of data stacked in the stack.

図4(a)の例では、ワーク116WをRAM116の先頭アドレスから使用し、スタック116SをRAM116の終端アドレスから使用する。こうすることによって、スタック116Sのサイズが変化した場合でも、ワーク116Wと干渉することを回避できる。従って、ワーク116Wおよびスタック116Sで消費され得るメモリ容量に比較してRAM116の容量が十分に大きい場合には、制御プログラムの開発者は、スタック116Sとの干渉を懸念することなく、ワーク116Wを設けることができる。この時、RAM116の領域は、ワーク116W、スタック116S、およびいずれにも使用されない未使用領域の3種類に区分されることになる。もっとも、上述の通り、スタック116Sは、動的に変動する領域である。   In the example of FIG. 4A, the work 116W is used from the start address of the RAM 116, and the stack 116S is used from the end address of the RAM 116. By doing so, it is possible to avoid interference with the workpiece 116W even when the size of the stack 116S changes. Therefore, when the capacity of the RAM 116 is sufficiently larger than the memory capacity that can be consumed by the work 116W and the stack 116S, the developer of the control program provides the work 116W without worrying about interference with the stack 116S. be able to. At this time, the area of the RAM 116 is divided into three types: a work 116W, a stack 116S, and an unused area that is not used for any of them. However, as described above, the stack 116S is a dynamically changing region.

また、擬似RAM領域はスタック116Sを避けて設けてある。一般にはスタック116Sへのアクセスは、イン/アウトコマンドという入出力ポートアクセスコマンドは利用できず、スタックコマンド、つまりプッシュ(PUSH)/ポップ(POP)コマンドが利用される。スタックコマンドは、メモリにアクセスするためのコマンドではあるが、アクセスすべきアドレスはCPUが内部的に管理・指定するものであり、コマンドで個別のアドレスを指定することはできない点で、本明細書に言うメモリアクセスとは別種のコマンドである。従って、擬似RAM領域をスタック116Sに割り当てたとしても、入出力ポートアクセスコマンドを活用することによるプログラムサイズ削減効果を得ることはできない。本実施例では、スタック116Sを避けて擬似RAM領域を設けることにより、上述の削減効果を無駄なく得ることが可能となっている。   The pseudo RAM area is provided avoiding the stack 116S. In general, an input / output port access command called an in / out command cannot be used to access the stack 116S, and a stack command, that is, a push (PUSH) / pop (POP) command is used. The stack command is a command for accessing the memory, but the address to be accessed is internally managed and specified by the CPU, and it is not possible to specify an individual address with the command. This is a different type of command from memory access. Therefore, even if the pseudo RAM area is allocated to the stack 116S, the program size reduction effect by using the input / output port access command cannot be obtained. In this embodiment, by providing the pseudo RAM area while avoiding the stack 116S, the above-described reduction effect can be obtained without waste.

更に、本実施例では先頭アドレスを含む連続領域を擬似RAM領域に割り当てることによって、上述の削減効果を十分に得ることが可能である。
図4(b)に、比較例として擬似RAM領域を先頭アドレスからずらしたアドレス「xxH」〜「yyH」に設けた場合を示した。このように設けた場合でも、ワーク116WはRAM116の先頭アドレスから連続した領域に設ける必要がある。図4(b)では、先頭アドレス「00H」〜「xxH」に配置されるワークへのアクセスにはメモリアクセスコマンドが利用される。擬似RAM領域によるプログラムサイズ削減効果が得られるのは、アドレス「xxH」以降に配置される一部のワークに対してのみである。擬似RAM領域とワーク116Wのサイズによっては、図4(b)に示すように、擬似RAM領域の終端がワーク116Wよりはみ出す可能性があり、このはみ出した部分については、プログラム削減効果を得ることができなくなる。
これに対し、図4(a)のように先頭アドレスから擬似RAM領域を配置すれば、ワーク116Wと擬似RAM領域のサイズの関係に依らず、プログラム削減効果を十分に得ることが可能となる。
もっとも、図4(a)の設定が必須という訳ではなく、プログラム削減効果を重視しない場合には、図4(b)のように擬似RAM領域を設定しても差し支えない。
Furthermore, in the present embodiment, the above-described reduction effect can be sufficiently obtained by assigning a continuous area including the head address to the pseudo RAM area.
FIG. 4B shows a case where the pseudo RAM area is provided at addresses “xxH” to “yyH” shifted from the top address as a comparative example. Even in such a case, the work 116W needs to be provided in a continuous area from the head address of the RAM 116. In FIG. 4B, a memory access command is used to access a work placed at the top addresses “00H” to “xxH”. The effect of reducing the program size by the pseudo RAM area can be obtained only for a part of work placed after the address “xxH”. Depending on the size of the pseudo-RAM area and the work 116W, as shown in FIG. 4B, the end of the pseudo-RAM area may protrude from the work 116W, and a program reduction effect can be obtained for the protruding portion. become unable.
On the other hand, if the pseudo RAM area is arranged from the head address as shown in FIG. 4A, the program reduction effect can be sufficiently obtained regardless of the relationship between the size of the work 116W and the pseudo RAM area.
However, the setting of FIG. 4A is not essential, and if the program reduction effect is not important, the pseudo RAM area may be set as shown in FIG. 4B.

図4(c)は、スタック116Sを終端アドレスからずらした場合の例である。図の例では、アドレス「wwH」よりもアドレスが小さくなる側にスタック116Sを設けた例を示した。スタック116Sは、このように終端アドレスからずらして設けても良い。もっとも、ワーク116Wおよびスタック116Sで使用し得るサイズをそれぞれ考慮して、相互に干渉しない範囲で設けることが望ましい。また、このように終端アドレスからずらしてスタック116Sを設ける場合でも、擬似RAM領域はスタック116Sを避けて設けることが好ましい。   FIG. 4C shows an example in which the stack 116S is shifted from the end address. In the example shown in the figure, the stack 116S is provided on the side where the address is smaller than the address “wwwH”. The stack 116S may thus be provided shifted from the end address. However, in consideration of the sizes that can be used for the workpiece 116W and the stack 116S, it is desirable that the workpiece 116W and the stack 116S are provided in a range that does not interfere with each other. Further, even when the stack 116S is provided by being shifted from the end address as described above, it is preferable that the pseudo RAM area is provided avoiding the stack 116S.

ワーク116Wとスタック116Sとの間の未使用領域の一部はワーク116Wとスタック116Sの隔離領域と位置づけても良い。先に説明した通り、スタック116Sは変動する領域である。従って、RAM116の容量によっては、スタック116Sがワーク116Wを浸食するおそれもある。そこで、ワーク116Wとスタック116Sとの間に隔離領域を設けておけば、かかる浸食を防ぐことが可能となる。
かかる作用を奏するため、隔離領域は、一切、データ書き込みが不能な領域としておけばよい。例えば、メモリエリアデコーダ113およびエリア区分判定部120において、隔離領域に対応するアドレスについては、チップセレクタ信号を出力しないように構成する方法を採ることができる。
A part of the unused area between the work 116W and the stack 116S may be positioned as an isolation area of the work 116W and the stack 116S. As described above, the stack 116S is a fluctuating region. Therefore, depending on the capacity of the RAM 116, the stack 116S may erode the workpiece 116W. Therefore, if an isolation region is provided between the workpiece 116W and the stack 116S, such erosion can be prevented.
In order to achieve such an effect, the isolation region may be any region where data cannot be written. For example, the memory area decoder 113 and the area division determination unit 120 can adopt a method in which a chip selector signal is not output for an address corresponding to an isolated region.

以上の説明では、スタックポインタがデータ格納時に「−1」ずつされる場合を例示した。スタックの利用態様としては、データ格納時にスタックポインタが「+1」ずつされる構成を採ることも可能である。この場合、図4(a)に示したのとは逆に、終端アドレス側に向けて、データが積み重ねられることになる。
かかる場合には、図4(c)に示すように、終端アドレスからずらした位置にスタック116Sを設定することが好ましい。この場合でも、擬似RAM領域とスタック116Sおよびワーク116Wとは重ならないように配置することが好ましいから、スタック116Sは、擬似RAM領域の終端アドレスおよびワーク116Wの終端アドレスの大きい方よりも、アドレスが大きい側に配置することが好ましい。
In the above description, the case where the stack pointer is incremented by “−1” at the time of data storage is illustrated. As a usage mode of the stack, it is possible to adopt a configuration in which the stack pointer is incremented by “+1” when data is stored. In this case, contrary to that shown in FIG. 4A, data is stacked toward the end address side.
In such a case, it is preferable to set the stack 116S at a position shifted from the end address, as shown in FIG. Even in this case, it is preferable to arrange the pseudo RAM area so that the stack 116S and the work 116W do not overlap. Therefore, the stack 116S has an address larger than the larger one of the end address of the pseudo RAM area and the end address of the work 116W. It is preferable to arrange on the larger side.

C.制御処理:
C1.主制御側電源投入時処理:
図5および図6は主制御側電源投入時処理の一例を示すフローチャートである。主制御基板110のCPU111が電源投入による復電をトリガとして開始・実行する処理である。「復電」は、電源を遮断した状態から電源を投入した状態、停電又は瞬停からその後の電力の復旧した状態も含む。
C. Control processing:
C1. Main control side power-on processing:
5 and 6 are flowcharts showing an example of main control side power-on processing. This is a process that is started and executed by the CPU 111 of the main control board 110 triggered by power recovery upon power-on. “Restoration” includes a state in which the power is turned on after the power is shut off, and a state in which power is restored after a power failure or a momentary power failure.

処理が開始されると、CPU111は、割り込みのモード、スタックポインタの初期値、および、エリア区分判定部120(図2参照)にエリア区分データを設定する(ステップS10)。スタックポインタには、図4で示した通り、RAM116の終端アドレスが設定される。
エリア区分データは、先に説明した通り、擬似RAM領域を規定するためのデータである。本実施例では、予めROM114に擬似RAM領域の境界となる値、即ち図3の例では、アドレス「**H」を記憶させておき、上記ステップS10の処理でこれを読み出して、エリア区分判定部120に設定するものとした。このデータはブート時に設定することもできる。ブート時に設定されている場合には、ステップS10の処理では、エリア区分データの設定を省略することもできる。
When the process is started, the CPU 111 sets the interrupt mode, the initial value of the stack pointer, and the area division data in the area division determination unit 120 (see FIG. 2) (step S10). As shown in FIG. 4, the end address of the RAM 116 is set in the stack pointer.
As described above, the area division data is data for defining the pseudo RAM area. In this embodiment, the value that becomes the boundary of the pseudo RAM area is stored in the ROM 114 in advance, that is, in the example of FIG. 3, the address “** H” is stored, and this is read out in the process of step S10 to determine the area classification. Set to the unit 120. This data can also be set at boot time. If it is set at the time of booting, the setting of the area division data can be omitted in the process of step S10.

次に、CPU111は停電クリア信号をロウとする(ステップS12)。停電クリア信号をロウにすることにより、電源投入時に主制御基板に設けられた停電監視回路からの停電予告信号をラッチするためのDタイプフリップフロップのラッチ機能を一時的に停止すると共に、それ以前に検知(ラッチ)した停電予告信号をクリアする。ラッチ機能を一時的に停止することにより、停電予告信号が常時監視可能な状態に切り替えることができる。   Next, the CPU 111 sets the power failure clear signal to low (step S12). By making the power failure clear signal low, the latch function of the D-type flip-flop for latching the power failure warning signal from the power failure monitoring circuit provided on the main control board when the power is turned on is temporarily stopped. Clear the power failure warning signal detected (latched). By temporarily stopping the latch function, it is possible to switch to a state where the power failure warning signal can be constantly monitored.

CPU111は、ウェイトタイマ処理1によって所定の待ち時間を経た後(ステップS14)、停電予告信号の状態を確認し、停電予告信号が停電を示す状態(停電予告信号がロウのとき)となっているか否かを判定する(ステップS16)。停電を示す状態となっている場合には、ウェイトタイマ処理1による待ち時間(ステップS14)を経てから、再度停電予告信号の状態を確認する。
このように、所定の待機時間を経た後に停電予告信号を確認するのは、停電予告信号が、停電又は瞬停によってパチンコ機1への供給電圧が所定の停電予告電圧より低くなった時に出力されるため、電源投入時に遊技機への供給電圧が所定電圧に達するまでは、一定の時間を要するためである。これにより、供給電圧が不安定な状態で、主制御基板の遊技機の制御に関する処理(ループ処理、タイマ割込処理)を実行しないようにすることが可能となる。
The CPU 111 checks the state of the power failure warning signal after waiting a predetermined waiting time by the wait timer process 1 (step S14), and whether the power failure warning signal indicates a power failure (when the power failure warning signal is low). It is determined whether or not (step S16). When it is in a state indicating a power failure, the state of the power failure warning signal is confirmed again after waiting for the wait timer process 1 (step S14).
In this way, the power failure warning signal is confirmed after a predetermined standby time, when the power failure warning signal is output when the supply voltage to the pachinko machine 1 becomes lower than the predetermined power failure warning voltage due to a power failure or a momentary power failure. Therefore, a certain time is required until the supply voltage to the gaming machine reaches a predetermined voltage when the power is turned on. As a result, it is possible to prevent the processing related to the control of the gaming machine on the main control board (loop processing, timer interrupt processing) from being executed in a state where the supply voltage is unstable.

停電予告信号が検出されず(ステップS16)、電源電圧に異常がないと判断されたときには、CPU111は停電クリア信号をハイ(出力を停止)にし(ステップS18)、停電監視回路から出力される停電予告信号を常時監視可能な状態からラッチ可能な状態に切り替える。以後、供給電圧が停電予告電圧を下回ったときに、ラッチされた停電予告信号が出力されるようになる。   When the power failure warning signal is not detected (step S16) and it is determined that there is no abnormality in the power supply voltage, the CPU 111 sets the power failure clear signal to high (output is stopped) (step S18) and the power failure output from the power failure monitoring circuit. The notice signal is switched from a constantly monitorable state to a latchable state. Thereafter, when the supply voltage falls below the power failure warning voltage, the latched power failure warning signal is output.

CPU111はRAMクリアスイッチが操作されている時は(ステップS20)。RAMクリア報知フラグRCLに値1をセットし(ステップS22)、操作されていないときには値00Hをセットする(ステップS24)。RAMクリアスイッチが操作されると、後述の通り、主制御基板110のRAM116上の確率変動、未払い出し賞球等の遊技に関する遊技情報が消去されることになる。   The CPU 111 operates when the RAM clear switch is operated (step S20). A value 1 is set to the RAM clear notification flag RCL (step S22), and a value 00H is set when not operated (step S24). When the RAM clear switch is operated, as will be described later, game information related to games such as probability fluctuations and unpaid prize balls on the RAM 116 of the main control board 110 is erased.

次にCPU111はウェイトタイマ処理2で(ステップS26)、装飾図柄制御基板350の起動を待つ。但し、主制御基板110は装飾図柄制御基板350から起動完了の通知を受信することはできないため、所定時間経過した時点で起動が完了したものとみなして次の処理を実行することになる。本実施例では、待機時間として2秒が設定されている。   Next, the CPU 111 waits for activation of the decorative symbol control board 350 in the wait timer process 2 (step S26). However, since the main control board 110 cannot receive a notification of activation completion from the decorative symbol control board 350, it is assumed that the activation is completed when a predetermined time has elapsed, and the next process is executed. In this embodiment, 2 seconds is set as the standby time.

本実施例では、先に説明した通り、上述のウェイトタイマ処理2を行う前に、RAMクリアスイッチの操作有無を判定している(ステップS20)。RAMクリアを行う場合には、遊技場の係員は、通常、RAMクリアスイッチを押下した状態で電源を投入する。従って、ウェイトタイマ処理2を行う前に、RAMクリアスイッチの操作有無を判断しておくことにより、遊技場の係員が電源投入後、比較的短時間でRAMクリアスイッチの押下をやめてしまった場合でも、誤りなくRAMクリアスイッチの操作の検出が可能となる利点がある。
本実施例においても、ウェイトタイマ処理2の後にRAMクリアスイッチの操作の有無を検出する方法を採ることも可能である。ただし、この場合には、RAMクリアスイッチの操作が検出される前に、遊技場の係員が押下を中断してしまうおそれがあり、遊技場の係員はRAMクリアを行ったつもりでいても、結果としてRAMクリア処理が行われないまま遊技機の制御処理が開始されるおそれもある。ウェイトタイマ処理2の前にRAMクリアスイッチの操作を検出することによって、こうした弊害を回避することができる。
In this embodiment, as described above, before performing the above-described wait timer process 2, it is determined whether or not the RAM clear switch is operated (step S20). When the RAM is cleared, a game attendant usually turns on the power with the RAM clear switch pressed. Therefore, even if the staff of the game hall stops pressing the RAM clear switch in a relatively short time after turning on the power by determining whether or not the RAM clear switch is operated before performing the wait timer process 2. There is an advantage that the operation of the RAM clear switch can be detected without error.
Also in the present embodiment, it is possible to adopt a method of detecting whether or not the RAM clear switch is operated after the wait timer process 2. However, in this case, there is a possibility that the game attendant may interrupt the press before the operation of the RAM clear switch is detected, and even if the game attendant intends to clear the RAM, the result As a result, the gaming machine control process may start without the RAM clear process being performed. Such an adverse effect can be avoided by detecting the operation of the RAM clear switch before the wait timer process 2.

上述の通り早期にRAMクリアスイッチの操作を確認する場合には、仮に、電源投入に対してRAMクリアスイッチの操作が遅れた場合には、RAMクリアスイッチが操作される前に、ステップS20の検出処理が完了してしまい、RAMクリアが正しく行われなくなるおそれもある。
かかる弊害を回避するため、ウェイトタイマ処理2(ステップS26)が完了した後に、再度、RAMクリアスイッチの操作を検出するようにしてもよい。例えば、後述するステップS28とS30の間に検出処理を設ける方法が考えられる。こうすることによって、RAMクリアスイッチの操作が電源投入から若干、遅れて行われた場合でも、RAMクリアを行うことが可能となる。
RAMクリアスイッチの操作の検出タイミングは、このように種々の設定が可能である。本実施例のように、ウェイトタイマ処理2の前でのみ検出するようにしてもよい。また、ウェイトタイマ処理2の後にのみ行うようにしてもよいし、ウェイト処理2を挟む前後で行うようにしてもよい。
また、ウェイトタイマ処理2の期間中、RAMクリアスイッチを継続的に監視し、RAMクリアスイッチの操作が検出された場合には、所定のフラグをオンにするなどの方法で検出結果を示すようにしてもよい。この場合、RAMクリアスイッチの操作が検出されたか否かに関わらず、ウェイトタイマ処理2で規定された待ち時間が確保されるよう、プログラムを構成しておくことが好ましい。
As described above, when the operation of the RAM clear switch is confirmed early, if the operation of the RAM clear switch is delayed with respect to power-on, the detection of step S20 is performed before the RAM clear switch is operated. Processing may be completed and RAM clearing may not be performed correctly.
In order to avoid such an adverse effect, the operation of the RAM clear switch may be detected again after the wait timer process 2 (step S26) is completed. For example, a method of providing a detection process between steps S28 and S30, which will be described later, can be considered. This makes it possible to clear the RAM even when the operation of the RAM clear switch is performed slightly after the power is turned on.
Various detection timings for the operation of the RAM clear switch can be set as described above. As in this embodiment, the detection may be performed only before the wait timer process 2. Further, it may be performed only after the wait timer process 2 or may be performed before and after the wait process 2 is sandwiched.
Further, during the wait timer process 2, the RAM clear switch is continuously monitored, and when an operation of the RAM clear switch is detected, the detection result is indicated by a method such as turning on a predetermined flag. May be. In this case, it is preferable to configure the program so that the waiting time defined by the wait timer process 2 is ensured regardless of whether or not the operation of the RAM clear switch is detected.

ウェイトタイマ処理2(図5のステップS26)が終わった後の処理について、引き続き説明する。
CPU111は、RAMクリア報知フラグRCLが値0である時(図6のステップS28)、即ちRAMクリアスイッチが操作されていない時には、RAM116に記憶されている遊技情報のチェックサムを算出する(ステップS30)。そして、チェックサムの値が前回の電源断時に予め算出されバックアップされていたチェックサムの値と一致しているか否かを判定する(ステップS32)。本実施例では、電源断時におけるチェックサムの算出と、電源投入時におけるチェックサムの算出(ステップS30)とは共通のサブルーチンで行うものとした。こうすることにより、チェックサムの算出自体の差異によるエラーの発生を回避できるからである。
チェックサムが一致しているときには、バックアップフラグBKが値1であるか否かを判定する(ステップS34)。バックアップフラグBKは、前回の電源断時に、遊技情報、チェックサムの値などが正常にバックアップされていることを表すフラグである。
バックアップフラグBKが値1であるときには、CPU111はバックアップフラグBKに値0をセットし、RAM116にROM114から読み出した復電時の設定を行う(ステップS36)。また、電源投入時コマンド作成処理、つまりバックアップされていた遊技情報に応じた各種コマンドをRAM116の所定記憶領域に記憶させる処理を行う(ステップS38)。
The process after the end of the wait timer process 2 (step S26 in FIG. 5) will be described.
When the RAM clear notification flag RCL is 0 (step S28 in FIG. 6), that is, when the RAM clear switch is not operated, the CPU 111 calculates the checksum of the game information stored in the RAM 116 (step S30). ). Then, it is determined whether or not the checksum value matches the checksum value that was previously calculated and backed up at the previous power-off (step S32). In this embodiment, the calculation of the checksum when the power is turned off and the calculation of the checksum when the power is turned on (step S30) are performed by a common subroutine. This is because it is possible to avoid the occurrence of an error due to the difference in the checksum calculation itself.
If the checksums match, it is determined whether the backup flag BK is 1 (step S34). The backup flag BK is a flag indicating that the game information, the checksum value, and the like have been normally backed up at the previous power-off.
When the backup flag BK has the value 1, the CPU 111 sets the backup flag BK to the value 0, and performs the power recovery setting read from the ROM 114 in the RAM 116 (step S36). Further, a power-on command creation process, that is, a process for storing various commands corresponding to the backed-up game information in a predetermined storage area of the RAM 116 (step S38).

上述の通り、本実施例では、チェックサムによってバックアップ情報が正常か否かを検査するとともに、バックアップフラグBKに基づいて主制御側電源断時処理が正常に終了された否かを検査している。本実施例では、この2重チェックによってバックアップ情報が不正行為により記憶されたものであるか否かを検査しているのである。   As described above, in this embodiment, whether or not the backup information is normal is checked based on the checksum, and whether or not the main control side power-off process is normally completed based on the backup flag BK. . In this embodiment, whether or not the backup information is stored by an illegal act is inspected by this double check.

一方、RAMクリア報知フラグRCLが値1のとき(ステップS28)、つまりRAMクリアスイッチが操作されているときには、後述する通りRAM116を初期化する処理を行う。チェックサムの値が一致していないとき、またはバックアップフラグBKが値0であるときも同様である(ステップS32、S34)。バックアップが正常に行われていないと判断されるからである。
RAM116の初期化として、CPU111は、RAMの全領域クリア処理、つまり、RAM116の全領域に値00Hを書き込むことによって、RAM116をクリアする処理を行う(ステップS40)。この処理によって、大当たり判定用乱数や初期値更新型のカウンタ等の値は初期値0にセットされる。RAMの全領域クリア処理の処理方法は後述する。
On the other hand, when the RAM clear notification flag RCL is 1 (step S28), that is, when the RAM clear switch is operated, the RAM 116 is initialized as described later. The same applies when the checksum values do not match or when the backup flag BK is 0 (steps S32 and S34). This is because it is determined that the backup is not performed normally.
As initialization of the RAM 116, the CPU 111 performs a process for clearing the RAM 116 by writing the value 00H to the entire area of the RAM 116, that is, by clearing the RAM 116 (Step S40). By this process, values such as the jackpot determination random number and the initial value update type counter are set to the initial value 0. A processing method of the RAM all area clearing process will be described later.

RAMの全領域とは、RAMの使用可能な全領域を意味する。本実施例では、RAMに物理的に備えられた全領域を使用するか、その半分を使用するかを、設定によって切換可能とした。後者の場合には、使用可能に設定された領域が、RAMクリア処理の対象としての「全領域」に該当する。   The total area of the RAM means the total area of the RAM that can be used. In the present embodiment, whether to use the entire area physically provided in the RAM or to use half of the area can be switched by setting. In the latter case, the area set to be usable corresponds to “all areas” as a target of the RAM clear process.

次に、CPU111はROM114から読み出した初期情報をRAM116にセットする(ステップS42)。
そして、CPU111はRAMクリア報知を行う(ステップS44)。RAMクリア報知とは、RAMクリアが行われたことを報知する音声出力を指示するRAMクリア報知コマンドをサブ制御基板310に出力する処理である。
Next, the CPU 111 sets initial information read from the ROM 114 in the RAM 116 (step S42).
Then, the CPU 111 performs a RAM clear notification (step S44). The RAM clear notification is a process of outputting a RAM clear notification command to the sub-control board 310 for instructing voice output to notify that the RAM is cleared.

以上の処理を完了すると、CPU111は割り込み初期設定を行い(ステップS46)、タイマ割り込み処理の割り込み周期を設定する。本実施形態では割り込み周期は4msとした。
CPU111が割り込み許可設定を行うと(ステップS48)、上述の割り込み周期でタイマ割り込み処理が繰り返し行われるようになる。
When the above process is completed, the CPU 111 performs an interrupt initial setting (step S46) and sets an interrupt cycle for the timer interrupt process. In this embodiment, the interrupt cycle is 4 ms.
When the CPU 111 performs the interrupt permission setting (step S48), the timer interrupt process is repeatedly performed in the above-described interrupt cycle.

次にCPU111は主制御側メイン処理を実行する。
この処理は、ウォッチドッグタイマ初期化レジスタ(以下、単に「WCL」と称する場合もある)に予め設定された値Aをセットする(ステップS50)。これはウォッチドックタイマを初期化するために必要な処理の一つである。本実施例では、この値Aの他、後述する主制御タイマ割り込み処理において、値B、値Cが順次、設定された時に、ウォッチドックタイマが初期化されるように構成されている。
図示する通り、主制御側メイン処理はループを構成しているため、この処理が正常に繰り返されるとともに、主制御タイマ割り込み処理が周期的に行われる限り、WCLには、値A、B、Cが順に設定され、ウォッチドッグタイマは常に初期化され続ける。これに対し、CPU111の処理に異常が生じると、WCLの初期化が規定通りに正しく行われなくなるため、CPU111にリセットがかかり、CPU111は電源投入時の処理(ステップS10)から再度実行することになる。
Next, the CPU 111 executes main control side main processing.
In this process, a preset value A is set in a watchdog timer initialization register (hereinafter also simply referred to as “WCL”) (step S50). This is one of the processes necessary to initialize the watchdog timer. In this embodiment, in addition to this value A, the watchdog timer is initialized when the value B and the value C are sequentially set in the main control timer interrupt processing described later.
As shown in the figure, since the main process on the main control side constitutes a loop, this process is normally repeated, and as long as the main control timer interrupt process is periodically performed, WCL includes values A, B, and C. Are set in order, and the watchdog timer is always initialized. On the other hand, if an abnormality occurs in the processing of the CPU 111, the initialization of the WCL will not be performed correctly as specified, so the CPU 111 is reset, and the CPU 111 executes again from the power-on processing (step S10). Become.

WCLに値Aを設定した後、停電予告信号の入力がないときには(ステップS52)、CPU111は非当落乱数更新処理を行う(ステップS54)。非当落乱数とは、遊技中に用いられる乱数のうち抽選の当落判定にかかわらない乱数である。かかる乱数としては、例えば、抽選時に行われる変動表示のパターンを選択するための乱数が挙げられる。
CPU111は、主制御側メイン処理として、以上で説明したステップS50〜ステップS54を繰り返し行う。
After the value A is set in WCL, when no power failure warning signal is input (step S52), the CPU 111 performs a non-winning random number update process (step S54). A non-winning random number is a random number that is not involved in the lottery winning determination among random numbers used during a game. An example of such a random number is a random number for selecting a variable display pattern to be performed at the time of lottery.
The CPU 111 repeatedly performs steps S50 to S54 described above as the main process on the main control side.

一方、停電予告信号が入力されている場合(ステップS52)、CPU111は主制御側電源断時処理を行う。停電予告信号は、パチンコ遊技機1の電源が遮断されることにより、基準電圧が停電予告電圧より低くなった時に、主制御基板が発する信号である。   On the other hand, when the power failure warning signal is input (step S52), the CPU 111 performs a main control side power-off process. The power failure notice signal is a signal generated by the main control board when the reference voltage becomes lower than the power failure notice voltage when the power of the pachinko gaming machine 1 is cut off.

主制御側電源断時処理では、CPU111はまず割り込み禁止設定を行う(ステップS56)。RAM116のチェックサム算出中に、主制御側タイマ割り込み処理が行われてRAM116への書き込みがなされることを防ぐためである。
CPU111は、次に停電クリア信号を出力する(ステップS58)。また、遊技盤面に設置された種々のソレノイドやランプ等に出力している駆動信号を停止する。
そして、RAM116の遊技情報に基づいてチェックサムを算出し(ステップS60)、バックアップフラグBKに値1をセットする(ステップS62)。これによりバックアップ情報の記憶が完了する。
In the main control side power-off process, the CPU 111 first performs an interrupt prohibition setting (step S56). This is to prevent the main control side timer interrupt processing from being performed and writing to the RAM 116 during the checksum calculation of the RAM 116.
Next, the CPU 111 outputs a power failure clear signal (step S58). Also, the drive signals output to various solenoids and lamps installed on the game board surface are stopped.
Then, a checksum is calculated based on the game information in the RAM 116 (step S60), and a value 1 is set in the backup flag BK (step S62). This completes the storage of the backup information.

本実施例では、主制御側電源断時処理時には、以下に示す理由により、レジスタをバックアップする必要はない。つまり、実施例では、主制御側ループ処理のステップS52で、停電予告信号の状態を確認し、この信号が停電となる状態を示している場合に主制御側電源断時処理へ分岐している。停電となる状態とは、例えば、停電時にハイ、非停電時にロウとなる停電予告信号を用いる場合には、停電予告信号がハイとなることを意味する。このように、実施例では、予め決められた条件で、主制御側電源断時処理に移行するため、移行に際して、ループ処理や割込処理が中断されることがない。従って、実施例では、主制御側電源断時処理内でレジスタの内容をRAM116に退避する必要がないのである。本実施例の方法によれば、電源投入時に、スタックエリアの情報については、正しいか否かを判断する必要がないため、CPU111の処理負荷が軽減される利点がある。   In the present embodiment, it is not necessary to back up the register for the following reason at the time of main control side power-off processing. In other words, in the embodiment, in step S52 of the main control side loop process, the state of the power failure warning signal is confirmed, and if this signal indicates a state of power failure, the process branches to the main control side power interruption process. . The state where a power failure occurs means, for example, that a power failure notification signal becomes high when a power failure notification signal that is high during a power failure and low when there is no power failure is used. As described above, in the embodiment, since the process shifts to the main control side power-off process under a predetermined condition, the loop process and the interrupt process are not interrupted during the shift. Therefore, in the embodiment, it is not necessary to save the contents of the register in the RAM 116 in the main control side power-off process. According to the method of the present embodiment, it is not necessary to determine whether the stack area information is correct or not when the power is turned on.

本実施例の態様に対し、停電予告信号が停電となる状態を示している場合に、ノン・マスカブル・インタラプト信号をCPU111に入力し、不定期で主制御側電源断時処理を開始できるように構成してもよい。この場合には、主制御側電源断時処理を開始するタイミングに応じてレジスタの内容が変化する。従って、主制御側電源断時処理では、レジスタの内容をRAM116にバックアップしておくことが好ましい。また、チェックサムは、このバックアップした値も含めて求めることが好ましい。   In contrast to the aspect of this embodiment, when the power failure warning signal indicates a state where a power failure occurs, a non-maskable interrupt signal is input to the CPU 111 so that the main control side power-off process can be started irregularly. It may be configured. In this case, the contents of the register change according to the timing at which the main control side power-off process is started. Therefore, it is preferable to back up the contents of the register in the RAM 116 in the main control side power-off process. The checksum is preferably obtained including the backed up value.

その後、ウォッチドックタイマの初期化を行って(ステップS64)、無限ループに入ると、電源が遮断されることによりCPU111の動作は停止する。但し、電源が遮断されない場合には、無限ループ内で、ウォッチドックタイマが初期化されなくなるため、所定時間経過後にCPU111にリセットがかかり、CPU111は主制御側電源投入時処理(ステップS10)から再び行う。   Thereafter, the watchdog timer is initialized (step S64), and when the infinite loop is entered, the operation of the CPU 111 stops due to the power being cut off. However, if the power is not shut off, the watchdog timer will not be initialized in the infinite loop, so the CPU 111 is reset after a predetermined time has elapsed, and the CPU 111 starts again from the main control side power-on process (step S10). Do.

本実施例では、主制御側電源投入時処理および主制御側電源断時処理の双方でチェックサムを算出している(ステップS30、S60)。チェックサムは、サブルーチンを用いることなく、それぞれ主制御側電源投入時処理および主制御側電源断時処理内に直接組み込んでもよいが、双方で共通に用いられるサブルーチンとしておくことが好ましい。こうすることにより、プログラム容量を低減することができる。
チェックサムは、種々の方法で算出可能である。また、精度向上を図るため、異なる2種類以上の演算方法を併用するようにしてもよい。例えば、加算、減算を交互に繰り返す方法を採ることができる。別の態様として、加算方式でチェックサムを算出し、結果が一致していた場合には、減算方式など別の方法で算出して、再度、確認するようにしてもよい。
In this embodiment, the checksum is calculated in both the main control side power-on process and the main control side power-off process (steps S30 and S60). The checksum may be directly incorporated into the main control side power-on process and the main control side power-off process without using a subroutine, but is preferably a subroutine commonly used by both. By doing so, the program capacity can be reduced.
The checksum can be calculated by various methods. In order to improve accuracy, two or more different calculation methods may be used in combination. For example, a method of alternately repeating addition and subtraction can be employed. As another aspect, when the checksum is calculated by the addition method and the results match, it may be calculated by another method such as a subtraction method and checked again.

チェックサムの算出には、RAM116の任意の情報を用いることが可能であるが、ワーク内の2バイト以上の情報を含めることが好ましい。こうすることにより、最も重要な情報を用いて整合性を確認することができる。
また、主制御側電源断時処理の実行タイミングが一定ではなく、ノン・マスカブル・インタラプトによって不定期に実行される場合のように、主制御側電源断時処理の実行時にレジスタの情報もRAM116のスタックに退避しておく場合には、ワークとスタックエリア用の双方の情報を利用してチェックサムを算出することが好ましい。例えば、ワークの情報と、スタックエリアの情報を用いて、それぞれチェックサムを算出してもよいし、双方の情報を混在させてチェックサムを算出してもよい。
Arbitrary information in the RAM 116 can be used to calculate the checksum, but it is preferable to include information of 2 bytes or more in the work. In this way, consistency can be confirmed using the most important information.
Also, the execution timing of the main control-side power-off process is not constant, and the register information is also stored in the RAM 116 when the main-control-side power-off process is executed, as in the case where the main control side power-off process is executed irregularly. In the case of saving to the stack, it is preferable to calculate the checksum using both the information for the work and the stack area. For example, the checksum may be calculated using the workpiece information and the stack area information, or the checksum may be calculated by mixing both pieces of information.

また、本実施例では、RAM116の内容はバッテリによって保持されるため、チェックサムを算出するだけでバックアップ処理を完了している(ステップS60、S62)。これに対し、RAM116内に、バックアップ用の領域を設け、ワークの全部または主要な部分の情報を併せて退避しておくようにしてもよい。こうすることで、制御上の重要な情報をより確実にバックアップすることが可能となる。
バックアップ領域には、例えば、ワーク等の情報を、ビット反転させて格納してもよい。こうすることによって、本来のワークの値と、バックアップ領域の値との排他的論理和(XOR)がFFHとなれば、これらのデータは正常であると容易に判断することが可能となる。
In this embodiment, since the contents of the RAM 116 are held by the battery, the backup process is completed only by calculating the checksum (steps S60 and S62). On the other hand, a backup area may be provided in the RAM 116, and information on all or main parts of the work may be saved together. In this way, important control information can be backed up more reliably.
In the backup area, for example, information such as a work may be stored with bit inversion. In this way, if the exclusive OR (XOR) of the original work value and the backup area value is FFH, it is possible to easily determine that these data are normal.

バックアップ領域にバックアップ情報を格納する処理は、例えば、主制御側電源断時処理内で行うことができる。また、主制御側メイン処理のループ内で行うようにしてもよい。主制御側メイン処理のループ内で行う場合には、バックアップ情報の格納時にワークの情報が変わってしまうことを避けるため、割込禁止とした上で格納を行うことが好ましい。
主制御側メイン処理のループ内でバックアップ情報の格納を行う場合、無駄な処理を抑制するため、一旦、バックアップ情報の格納が行われた後は、主制御側タイマ割り込み処理が行われるまで、情報の格納を省略するようにしてもよい。同様の効果を、比較的簡易な制御処理で実現するため、主制御側メイン処理のループ内での情報の格納に代えて、主制御側タイマ割り込み処理が行われた後、主制御側メイン処理に復帰する直前にバックアップ情報を格納するようにしてもよい。こうすれば、主制御側タイマ割り込み処理が行われる度に、バックアップ情報を更新することが可能となる。
The process of storing the backup information in the backup area can be performed, for example, in the main control side power-off process. Further, it may be performed in a loop of the main process on the main control side. When performing in the loop of the main process on the main control side, it is preferable to store after prohibiting interrupts in order to avoid changing the work information when storing the backup information.
When storing backup information in the loop of the main process on the main control side, in order to suppress unnecessary processing, information is stored until the main control timer interrupt process is performed after the backup information has been stored. May be omitted. In order to realize the same effect with a relatively simple control process, the main control side main process is performed after the main control side timer interrupt process is performed instead of storing the information in the main control side main process loop. The backup information may be stored immediately before returning to step 1. In this way, it is possible to update the backup information every time the main control timer interruption process is performed.

また、バックアップ領域を複数、設け、バックアップ情報の格納を行うたびに、これらの領域を順次、使い分けるようにしてもよい。こうすることにより、過去の複数時点でのバックアップ情報を格納することが可能となる利点がある。   Further, a plurality of backup areas may be provided, and these areas may be used separately each time backup information is stored. By doing so, there is an advantage that backup information at a plurality of past points in time can be stored.

RAM内のバックアップ領域に退避されたワークの情報は、その後、主制御側電源投入時処理が実行された時に、次の方法で活用することができる。説明の便宜上、ここではCPU111が制御処理において参照するワークをメインワークと称し、バックアップ領域に退避されたワークをサブワークと称するものとする。
電源投入時には、CPUはメインワークの内容、サブワークの内容が正常か否かを、それぞれチェックサムによって確認する(図6のステップS30、S32)。メインワークの内容が正常な場合には、そのまま制御処理を続ければよい。メインワークが誤っており、サブワークが正しい場合には、サブワークの内容をメインワークに上書きして制御処理を続ける。メインワークおよびサブワークの双方が誤っている場合には、RAMクリアを行う(図6のステップS40)。
こうすることによって、サブワークの情報を制御処理に有効活用することが可能となる。
サブワークの情報をメインワークに上書きした場合、サブワークの情報はそのまま放置してもよい。CPU111は、制御処理においてサブワークの情報を直接参照することはないからである。ただし、ノイズ等の影響で、CPU111が、サブワークに記憶されている情報を誤って参照してしまい処理に悪影響を受けるおそれが、ないとは言えないため、サブワークは初期化しておいた方が好ましい。
The work information saved in the backup area in the RAM can be used in the following manner when the main control side power-on process is executed. For convenience of explanation, the work referred to by the CPU 111 in the control process is referred to as a main work, and the work saved in the backup area is referred to as a sub work.
When the power is turned on, the CPU confirms whether or not the contents of the main work and the contents of the sub work are normal by checksums (steps S30 and S32 in FIG. 6). If the contents of the main work are normal, the control process can be continued as it is. If the main work is wrong and the sub work is correct, the control process is continued by overwriting the contents of the sub work on the main work. If both the main work and the sub work are wrong, the RAM is cleared (step S40 in FIG. 6).
By doing so, it becomes possible to effectively utilize the sub-work information for the control processing.
When the sub work information is overwritten on the main work, the sub work information may be left as it is. This is because the CPU 111 does not directly refer to the subwork information in the control process. However, it cannot be said that there is a possibility that the CPU 111 erroneously refers to the information stored in the subwork due to noise or the like, and the processing is adversely affected. Is preferred.

C2.RAMの全領域クリア処理:
図7はRAMの全領域クリア処理のフローチャートである。主電源側電源投入時処理(図5、図6)のステップS40の処理内容に相当する。
説明の便宜上、図7ではRAMの全領域クリア処理が一つのサブルーチンであるかのように記載しているが、本実施例では、サブルーチンではなく、図6のステップS40内で、これらの処理を実行する形を取っている。この処理は、図示する通り、比較的単純な処理であるため、サブルーチン化した場合、サブルーチンの実行時に、サブルーチン終了後の戻りアドレスをスタックに記憶させるなどの処理が必要となり、RAMの全領域クリア処理に時間を要するからである。サブルーチンによらずに、ステップS40内で行うようにすれば、こうした無駄を抑制でき、効率的にRAM116をクリアすることが可能となる。
もっとも、本実施例は、RAMクリア処理をサブルーチンで実行することを排除するものではない。RAMクリア処理をサブルーチンで実行する場合には、上述の通り、サブルーチン終了後の戻りアドレスをスタックに記憶されるとともに、この値を保持するため、スタックを除く領域についてのみ初期化値を書き込むものとする必要がある。
C2. Clear all RAM area:
FIG. 7 is a flowchart of the RAM all area clear process. This corresponds to the processing content of step S40 in the main power supply side power-on processing (FIGS. 5 and 6).
For convenience of explanation, FIG. 7 shows that the RAM clearing process is a single subroutine, but in this embodiment, these processes are not performed in the subroutine but in step S40 in FIG. It takes the form to execute. Since this process is a relatively simple process as shown in the figure, when a subroutine is created, a process such as storing the return address after completion of the subroutine in the stack is required when the subroutine is executed, and the entire RAM area is cleared. This is because processing takes time. If it is performed within step S40 without using a subroutine, such waste can be suppressed and the RAM 116 can be efficiently cleared.
However, the present embodiment does not exclude executing the RAM clear process by a subroutine. When the RAM clear process is executed in a subroutine, as described above, the return address after the end of the subroutine is stored in the stack, and in order to hold this value, the initialization value is written only in the area other than the stack. There is a need to.

RAMの全領域クリア処理では、CPU111は、まず、擬似RAM領域をクリアする処理を行う。図の右側に、RAM116の領域との関係を示した。ハッチングを付した部分(アドレス00H〜**H)が擬似RAM領域116Aとする。CPU111は、アドレスを00H〜**Hで変化させながら、アウト(OUT)命令を繰り返し実行して、この領域に初期化値として00Hを順次、書き込むのである。   In the RAM all area clear process, the CPU 111 first performs a process of clearing the pseudo RAM area. The relationship with the area of the RAM 116 is shown on the right side of the figure. The hatched portion (address 00H to ** H) is a pseudo RAM area 116A. The CPU 111 repeatedly executes an out (OUT) instruction while changing the address from 00H to ** H, and sequentially writes 00H as an initialization value in this area.

上述の処理は、次の手順で行われる。CPU111は、まず書き込み先のアドレス(以下、「クリアアドレス」という)としてRAM116の先頭アドレス00Hを設定する(ステップS41a)。また、ループ回数として、擬似RAM領域の終端アドレスに1を加えた「**H+1」を設定する(ステップS41b)。「**H」でなく「**H+1」とするのは、アドレス**Hまで、書き込みが行われるようにするためである。   The above process is performed in the following procedure. The CPU 111 first sets the head address 00H of the RAM 116 as a write destination address (hereinafter referred to as “clear address”) (step S41a). Further, “** H + 1” obtained by adding 1 to the end address of the pseudo RAM area is set as the number of loops (step S41b). The reason that “** H + 1” is used instead of “** H” is to allow writing to address ** H.

次に、CPU111は、クリアアドレスにアウト(OUT)命令で初期化値00Hを書き込む(ステップS41c)。この書き込みが終わると、CPU111は、クリアアドレスを1だけ加算することによって、書き込むべきアドレスを一つ進め(ステップS41d)、ループ回数を1ずつ減らす(ステップS41e)。以上の処理を、ループ回数が0となるまで(ステップS41f)、繰り返し実行することにより、CPU111は擬似RAM領域の全アドレスに初期化値00Hを書き込むことができる。   Next, the CPU 111 writes the initialization value 00H to the clear address with an out (OUT) instruction (step S41c). When this writing is completed, the CPU 111 increments the address to be written by 1 by adding 1 to the clear address (step S41d), and decreases the number of loops by 1 (step S41e). The CPU 111 can write the initialization value 00H to all addresses in the pseudo RAM area by repeatedly executing the above processing until the number of loops becomes zero (step S41f).

擬似RAM領域のクリアを終えると、CPU111は、擬似RAM領域を除く領域(右側の図の白抜きの領域)に対して、メモリアクセスコマンドであるストア(ST)命令を用いて初期化値00Hを書き込む。
上述の処理は、次の手順で行われる。CPU111は、クリアアドレスとして擬似RAM領域の終端アドレスの次のアドレスである「**H+1」を設定する(ステップS41g)。また、ループ回数として、RAM領域の終端アドレスと擬似RAM領域の終端アドレスとの差である「FFH−**H」を設定する(ステップS41h)。
When the pseudo RAM area is cleared, the CPU 111 sets the initialization value 00H to the area excluding the pseudo RAM area (the white area in the right figure) using a store (ST) instruction that is a memory access command. Write.
The above process is performed in the following procedure. The CPU 111 sets “** H + 1”, which is the address next to the end address of the pseudo RAM area, as the clear address (step S41g). Further, “FFH − ** H”, which is the difference between the end address of the RAM area and the end address of the pseudo RAM area, is set as the number of loops (step S41h).

次に、CPU111は、クリアアドレスにストア(ST)命令で初期化値00Hを書き込む(ステップS41i)。この書き込みが終わると、CPU111は、クリアアドレスを1だけ加算することによって、書き込むべきアドレスを一つ進め(ステップS41j)、ループ回数を1ずつ減らす(ステップS41k)。以上の処理を、ループ回数が0となるまで(ステップS41m)、繰り返し実行することにより、CPU111は擬似RAM領域以外の全アドレスに初期化値00Hを書き込むことができる。   Next, the CPU 111 writes the initialization value 00H to the clear address with a store (ST) instruction (step S41i). When this writing is completed, the CPU 111 increments the address to be written by 1 by adding 1 to the clear address (step S41j), and decreases the number of loops by 1 (step S41k). By repeatedly executing the above processing until the number of loops becomes 0 (step S41m), the CPU 111 can write the initialization value 00H to all addresses other than the pseudo RAM area.

図8はRAMの全領域クリア処理の変形例である。この処理では、メモリアクセス命令であるストア(ST)命令のみを用いて初期化値の書き込みを行う。先に説明した通り(図2)、本実施例では、擬似RAM領域は、入出力ポートアクセスコマンドと、メモリアクセスコマンドの双方によってアクセス可能に構成されている。従って、全領域クリア処理では、擬似RAM領域も含めて、全領域にストア(ST)命令を用いて00Hを書き込むことも可能である。
この書き込みの状態を図の右側に模式的に示した。RAM116には、図7の例と同様、擬似RAM領域116Aが設けられている。但し、変形例では、先頭アドレス00Hから終端アドレスFFHまで、一貫してメモリアクセスコマンドを用いて書き込みを行うのである。メモリアクセスコマンドを用いるという意味で、全領域を白抜きで示した。
FIG. 8 shows a modification of the RAM all area clear process. In this process, the initialization value is written using only the store (ST) instruction which is a memory access instruction. As described above (FIG. 2), in this embodiment, the pseudo RAM area is configured to be accessible by both the input / output port access command and the memory access command. Therefore, in the all area clear process, 00H can be written to all areas including the pseudo RAM area by using a store (ST) instruction.
This writing state is schematically shown on the right side of the figure. In the RAM 116, a pseudo RAM area 116A is provided as in the example of FIG. However, in the modification, writing is performed consistently from the start address 00H to the end address FFH using a memory access command. The whole area is shown in white in the sense that a memory access command is used.

上述の処理は、次の手順で行われる。CPU111は、クリアアドレスとしてRAM116の先頭アドレスである「00H」を設定する(ステップS41p)。また、ループ回数としてRAM116の終端アドレスに1を加えた「FFH+1」を設定する(ステップS41q)。   The above process is performed in the following procedure. The CPU 111 sets “00H”, which is the head address of the RAM 116, as a clear address (step S41p). Further, “FFH + 1”, which is obtained by adding 1 to the end address of the RAM 116, is set as the loop count (step S41q).

次に、CPU111は、クリアアドレスにストア(ST)命令で初期化値00Hを書き込む(ステップS41r)。この書き込みが終わると、CPU111は、クリアアドレスを1だけ加算することによって、書き込むべきアドレスを一つ進め(ステップS41s)、ループ回数を1ずつ減らす(ステップS41t)。以上の処理を、ループ回数が0となるまで(ステップS41u)、繰り返し実行することにより、CPU111は擬似RAM領域以外の全アドレスに初期化値00Hを書き込むことができる。   Next, the CPU 111 writes the initialization value 00H to the clear address with a store (ST) instruction (step S41r). When this writing is completed, the CPU 111 increments the address to be written by 1 by adding 1 to the clear address (step S41s), and decreases the number of loops by 1 (step S41t). By repeatedly executing the above processing until the number of loops becomes 0 (step S41u), the CPU 111 can write the initialization value 00H to all addresses other than the pseudo RAM area.

変形例の処理では、全領域にストア(ST)命令を用いることにより、全領域クリア処理に要するプログラムサイズを抑制することができる利点がある。図7では、アウト命令による書き込みを行うための処理(ステップS41a〜S41f)と、ストア命令での書き込みを行うための処理(ステップS41g〜S41m)の2段階での処理が必要となるのに対し、図8では、ストア命令での書き込みを行うための処理のみで済むからである。つまり、変形例の処理では、図7におけるステップS41g〜S41mに相当する処理のみでクリア処理を行うことが可能となっている。
もっとも、変形例(図8)では、ストア命令で書き込みを行う範囲が図7よりも広がっている。しかし、これはクリアアドレスおよびループ回数の設定値が変わるだけのことであり、書き込み処理自体のプログラムサイズは増加しない。従って、コマンド単体のバイト長は、ストア命令の方がアウト命令よりも長いにも関わらず、全体にストア命令を用いた方が、全領域クリア処理の全体のプログラムサイズを減少させることが可能となるのである。
The process of the modification has an advantage that the program size required for the all area clear process can be suppressed by using the store (ST) instruction for the entire area. In FIG. 7, processing in two stages, that is, processing for writing by the out command (steps S41a to S41f) and processing for writing by the store command (steps S41g to S41m) is required. This is because, in FIG. 8, only the processing for writing with the store instruction is required. That is, in the process of the modified example, the clear process can be performed only by the process corresponding to steps S41g to S41m in FIG.
However, in the modified example (FIG. 8), the range in which writing is performed with the store instruction is wider than in FIG. However, this only changes the set values of the clear address and the number of loops, and does not increase the program size of the writing process itself. Therefore, although the byte length of a single command is longer for a store instruction than for an out instruction, using the store instruction as a whole can reduce the overall program size of all area clear processing. It becomes.

上述の例では、RAM領域の先頭から順に初期化値を書き込む例を示したが、RAMクリア処理は、RAM領域の終端アドレスFFHから00Hに向けて、順に初期化値を書き込む方法で行っても良い。   In the above example, the initialization value is written in order from the beginning of the RAM area. However, the RAM clear processing may be performed by the method of writing the initialization value in order from the RAM area end address FFH to 00H. good.

RAMクリア処理は、RAMの全領域を対象として行うようにしてもよいし、一部のみを対象として行うようにしてもよい。こうすることで、RAMクリア処理によって初期化値の書き込み対象となる領域が少なくなる分、RAMクリア処理の負荷が軽減される利点がある。
例えば、図4で説明したように未使用領域や隔離領域が含まれている場合には、これらの領域は、RAMクリア処理の対象外としてもよい。
また、RAMクリア処理は、ワーク(図4参照)を対象として行うことが好ましいが、この際、スタックをRAMクリアの対象に含めても良いし、除外してもよい。
制御処理上、許容される場合には、ワークの一部のみを初期化の対象としてもよい。例えば、特別図柄、普通図柄、特別電動役物制御、普通電動役物制御など遊技の動作を決定する主要なワークのみを初期化対象とすることが考えられる。
The RAM clear process may be performed on the entire area of the RAM or only on a part thereof. By doing so, there is an advantage that the load of the RAM clear process is reduced as the area to which the initialization value is written is reduced by the RAM clear process.
For example, as described with reference to FIG. 4, when an unused area or an isolated area is included, these areas may be excluded from the RAM clear process.
The RAM clear process is preferably performed on a work (see FIG. 4), but at this time, the stack may be included in the RAM clear target or may be excluded.
If allowed in the control process, only a part of the workpiece may be the target of initialization. For example, it is conceivable that only a main work that determines a game operation such as a special symbol, a normal symbol, a special electric accessory control, or a normal electric accessory control is targeted for initialization.

更に、RAMクリア処理の対象領域は、必ずしもチェックサムの算出に用いた領域と対応している必要もない。例えば、ワークの一部または全部を用いてチェックサムを算出する場合であっても、チェックサムによってRAMクリア処理が必要と判断された時には、RAM全体についてRAMクリア処理を行うようにしてもよい。   Further, the target area for the RAM clear process does not necessarily need to correspond to the area used for the checksum calculation. For example, even when the checksum is calculated using a part or all of the work, the RAM clear process may be performed on the entire RAM when it is determined that the checksum requires the RAM clear process.

C3.主制御側タイマ割り込み処理:
図9は主制御側タイマ割り込み処理のフローチャートである。主制御基板110のCPU111によって、所定の割り込み周期(本実施形態では、4ms)ごとに繰り返し行われる処理である。
処理を開始すると、CPU111は、レジスタを退避してから(ステップS70)ウォッチドックタイマクリアレジスタWCLに値Bをセットし(ステップS72)、割り込みフラグをクリアする(ステップS74)。レジスタの退避は、擬似RAM以外の領域に行う。本実施例では、スタックに退避するものとした。
以下、CPU111は、図示する各処理を順次、実行する。これらの処理の実行順序は、図示した順序に限らない。
C3. Main control timer interrupt processing:
FIG. 9 is a flowchart of the main control timer interruption process. This process is repeatedly performed by the CPU 111 of the main control board 110 every predetermined interrupt period (4 ms in this embodiment).
When the process is started, the CPU 111 saves the register (step S70), sets the value B in the watchdog timer clear register WCL (step S72), and clears the interrupt flag (step S74). The register is saved in an area other than the pseudo RAM. In this embodiment, the information is saved on the stack.
Hereinafter, the CPU 111 sequentially executes each process shown in the figure. The execution order of these processes is not limited to the illustrated order.

スイッチ入力処理(ステップS76)はパチンコ機の各種スイッチの信号を入力する処理である。入力する信号としては、普通入賞口、始動入賞口、大入賞口に入球した遊技球の検出信号、賞球の払出コマンドの受信時に払出制御基板210が出力するACK信号、などが挙げられる。   The switch input process (step S76) is a process for inputting signals of various switches of the pachinko machine. Examples of the input signal include a detection signal for a game ball that has entered a normal winning opening, a starting winning opening, a large winning opening, and an ACK signal that is output by the payout control board 210 when a prize payout command is received.

タイマ減算処理(ステップS78)は、種々の時間管理に利用されるタイマ値を減算する処理である。初期値が設定されたタイマ値が、この減算処理によって4msずつ減算され、値0になることで、初期値に相当する時間の経過を検出することができる。タイマ値は、管理対象となる時間ごとに設けられている。管理対象となる時間としては、例えば、変動表示パターンに従って特別図柄表示装置41が点灯する時間、普通図柄変動表示パターンに従って普通図柄表示器が点灯する時間、払出制御基板210からのACK信号を入力するまでの所要時間などが挙げられる。   The timer subtraction process (step S78) is a process of subtracting timer values used for various time management. The timer value to which the initial value is set is subtracted by 4 ms by this subtraction process and becomes 0, so that the passage of time corresponding to the initial value can be detected. A timer value is provided for each time to be managed. As the time to be managed, for example, the time when the special symbol display device 41 is lit according to the variation display pattern, the time when the normal symbol display is lit according to the normal symbol variation display pattern, and the ACK signal from the payout control board 210 are input. The time required until.

当落乱数更新処理(ステップS80)は、遊技中に抽選等に利用される種々の乱数値を更新する処理である。本実施例では、抽選等の度に乱数を発生させる方法ではなく、ステップS76の処理によって、種々の乱数値を値1ずつカウントアップする方法をとっている。このように乱数を規則的に変化させたとしても、入賞口への入球など、各乱数を使うことになるイベントが不規則に発生するため、十分、抽選用の乱数として機能するのである。カウントアップに加えて、乱数が一巡したときには、乱数の初期値を切り換える処理も併用している。
ここで更新される乱数としては、例えば、大当たりの判定に使用される大当たり判定用の乱数などが挙げられる。また普通図柄に関しては、普通図柄の当たり判定に使用される普通図柄当り判定用乱数などが挙げられる。
The winning random number update process (step S80) is a process for updating various random number values used for lottery and the like during the game. In the present embodiment, not a method of generating a random number every time a lottery or the like is performed, but a method of counting up various random values by a value of 1 by the process of step S76. Even if the random number is regularly changed in this way, events that use each random number, such as a ball entering a winning opening, occur irregularly, and thus sufficiently function as a random number for lottery. In addition to the count-up, when the random number makes a round, a process of switching the initial value of the random number is also used.
The random numbers updated here include, for example, jackpot determination random numbers used for jackpot determination. As for the normal symbol, a random number for determining a normal symbol used for determining whether or not to hit the normal symbol is used.

賞球制御処理(ステップS82)は、払出制御基板210へのコマンド送出処理である。例えば、遊技球が入賞した時には、遊技球を払い出す旨を払出制御基板210に指示する賞球コマンドを作成し、払出制御基板210に送信する。また、払出制御基板210からACK信号が所定時間内に入力されないときには、払出制御基板210との接続状態を確認するためのセルフチェックコマンドなどを作成し、払出制御基板210に送信する。   The prize ball control process (step S82) is a command transmission process to the payout control board 210. For example, when a game ball wins, a prize ball command for instructing the payout control board 210 to pay out the game ball is created and transmitted to the payout control board 210. When an ACK signal is not input from the payout control board 210 within a predetermined time, a self-check command or the like for confirming the connection state with the payout control board 210 is created and transmitted to the payout control board 210.

枠コマンド受信処理(ステップS84)は、パチンコ機の枠側に取り付けられている払出制御基板210から送信されるコマンドを主制御基板110で受信する処理である。払出制御基板210のコマンドには、例えば賞球ユニットが球がみを起こして遊技球を払い出せないなどの異常を表す状態コマンドが挙げられる。   The frame command reception process (step S84) is a process in which the main control board 110 receives a command transmitted from the payout control board 210 attached to the frame side of the pachinko machine. Examples of the command on the payout control board 210 include a status command that indicates an abnormality such that the winning ball unit does not pay out a game ball due to a stagnation of the ball.

不正行為検出処理(ステップS86)は、入賞口への入賞に関する異常状態を確認し報知する処理である。例えば、大当たり遊技状態でないときに大入賞口に遊技球が入球したのを検知した場合には、CPU111は異常と判断して入賞異常報知コマンドを作成し、サブ制御基板310に出力する。   The cheating detection process (step S86) is a process for confirming and notifying an abnormal state related to winning a prize opening. For example, when it is detected that a game ball has entered the big winning opening when it is not in the big hit gaming state, the CPU 111 determines that it is abnormal and creates a winning abnormality notification command and outputs it to the sub-control board 310.

特別図柄及び特別電動役物制御処理(ステップS88)では、CPU111は、まず始動入賞口への入賞検出に応じて、大当たり判定用の乱数を予め記憶されている判定値と比較して、大当たりか否かを判定する。また、判定結果に応じて、図柄用および変動表示用の乱数値に基づいて、表示すべき図柄およびその変動パターンを決定し、その演出を行わせるための遊技演出コマンドを作成する。大当たりと判定されたときは、図柄変動の停止後に遊技盤の大入賞口の開閉板を開閉動作させる駆動信号を出力する。   In the special symbol and special electric accessory control process (step S88), the CPU 111 first compares the random number for determining the jackpot with the determination value stored in advance in response to the detection of winning at the start winning opening. Determine whether or not. Further, according to the determination result, a symbol to be displayed and its variation pattern are determined based on a random number value for symbol and variation display, and a game effect command for producing the effect is created. When it is determined that the game is a big hit, a drive signal for opening / closing the open / close plate of the big winning opening of the game board is output after the symbol fluctuation is stopped.

普通図柄及び普通電動役物制御処理(ステップS90)でも同様に、CPU111は、普通図柄当り判定用乱数に基づく当たり判定、普通図柄の変動制御および当たり時において入賞口の開閉翼を開閉動作させるための開閉翼ソレノイドの駆動制御を行う。   Similarly, in the normal symbol and normal electric accessory control process (step S90), the CPU 111 opens and closes the opening / closing blades of the winning opening in the hit determination based on the normal symbol per-determination random number, the normal symbol variation control, and the hit. The drive control of the open / close blade solenoid is performed.

ポート出力処理(ステップS92)は、上述の種々の処理で説明した大入賞口や普通電動役物の開閉翼ソレノイド等の信号を、主制御I/Oポートの出力端子から出力する処理であり、サブ統合基板コマンド送信処理(ステップS94)は、上述の種々の処理で設定した演出制御用のコマンドをサブ制御基板310に出力する処理である。
本実施例では、CPU111は、上述の各処理の実行時には、それぞれ出力すべき情報およびコマンドを設定してRAM116に記憶させておき、ポート出力処理およびサブ統合基板コマンド送信処理において、RAM116から情報・コマンドを読み出して出力する方法をとっている。
The port output process (step S92) is a process of outputting signals from the main control I / O port, such as the big winning opening described in the above-described various processes and the opening / closing blade solenoid of the ordinary electric accessory, The sub integrated board command transmission process (step S94) is a process of outputting the effect control commands set in the above-described various processes to the sub control board 310.
In this embodiment, the CPU 111 sets information and commands to be output and stores them in the RAM 116 at the time of executing the above-described processes, and stores information and commands from the RAM 116 in the port output process and the sub-integrated board command transmission process. The command is read and output.

CPU111は、以上の処理を終えた後、ウォッチドックタイマ初期化レジスタWCLに値Cをセットする(ステップS96)。この処理、ステップS72の処理、および主制御側メイン処理(図5のステップS50)によって、ウォッチドックタイマ初期化レジスタWCLには、値A、値Bそして値Cが順にセットされるため、ウォッチドックタイマが初期化される。   After completing the above processing, the CPU 111 sets a value C in the watchdog timer initialization register WCL (step S96). By this process, the process at step S72, and the main process on the main control side (step S50 in FIG. 5), the value A, the value B, and the value C are sequentially set in the watchdog timer initialization register WCL. The timer is initialized.

主制御側タイマ割り込み処理が開始された時点で、CPU111は、汎用レジスタの内容をスタックに積んで退避させる。従って、以上の処理を完了すると、CPU111は、スタックに積んで退避した内容を読み出し、もとのレジスタに書き込むことによって、レジスタの復帰を行い(ステップS98)、割り込み許可の設定を行って、このルーチンを終了する。   When the main control side timer interrupt process is started, the CPU 111 loads the contents of the general-purpose registers on the stack and saves them. Therefore, when the above processing is completed, the CPU 111 reads out the contents saved on the stack and writes it to the original register, thereby restoring the register (step S98) and setting the interrupt permission. End the routine.

C4.サブ統合側処理:
サブ制御基板310は、主制御基板110からのコマンドに応じて、種々の演出制御を行う。
図示を省略するが、サブ制御基板310が実行する処理も、主制御側メイン処理(図6)と同様のループと、主制御側タイマ割り込み処理(図9)と同様の割込処理から構成される。サブ制御基板310は2ms周期で割り込み処理を実行するとともに、16ms周期で「16ms定常処理」を実行する。
この16ms定常処理では、主制御基板110からの各種コマンドを解析するコマンド解析処理、パネル装飾ランプ12、枠装飾ランプ31(図1参照)の点灯制御を行うランプ処理、演出用の音声や警報音などの出力処理、装飾図柄制御基板350を介してLCD16に演出用の画面を表示させる処理、CPUが正常に動作していることを示すウォッチドックタイマ処理、および役物の駆動パターンをスケジューラにセットする処理等を行う。
C4. Sub-integration processing:
The sub control board 310 performs various effect controls in accordance with commands from the main control board 110.
Although not shown, the processing executed by the sub-control board 310 is also composed of a loop similar to the main control side main processing (FIG. 6) and an interrupt processing similar to the main control side timer interrupt processing (FIG. 9). The The sub-control board 310 executes interrupt processing at a cycle of 2 ms and “16 ms steady processing” at a cycle of 16 ms.
In this 16 ms steady process, a command analysis process for analyzing various commands from the main control board 110, a lamp process for controlling the lighting of the panel decoration lamp 12 and the frame decoration lamp 31 (see FIG. 1), a sound for production and an alarm sound Output processing, etc., processing for displaying an effect screen on the LCD 16 via the decorative design control board 350, watchdog timer processing indicating that the CPU is operating normally, and a driving pattern of the accessory set in the scheduler The processing to do is performed.

サブ制御基板310は、16ms定常処理を繰り返し実行する他、種々の割り込み処理を行う。かかる割り込み処理としては、2msタイマ割り込み、コマンド受信割り込み処理、コマンド受信終了割り込み処理があげられる。   The sub-control board 310 performs various interrupt processes in addition to repeatedly executing the 16 ms steady process. Examples of such interrupt processing include 2 ms timer interrupt, command reception interrupt processing, and command reception end interrupt processing.

C5.払出制御基板の制御処理:
払出制御基板210は、主制御基板110からの指示に従って、遊技媒体の払い出しを制御する。
払出制御基板210が実行する制御処理は、主制御基板110と同様、ループ状のメイン処理とタイマ割込処理とから構成することも可能であるが、本実施例では、メイン処理内で払出に必要な処理を繰り返し実行するものとした。
C5. Discharge control board control processing:
The payout control board 210 controls the payout of game media in accordance with instructions from the main control board 110.
As with the main control board 110, the control process executed by the payout control board 210 can be composed of a loop-shaped main process and a timer interrupt process. In this embodiment, the payout control board 210 performs a payout process within the main process. Necessary processing was repeatedly executed.

D.プログラム容量削減効果:
実施例で説明した種々の制御処理において、主制御基板110が出力する種々のコマンドは、一旦、RAM116に蓄えられた後、所定のタイミングでRAM116から読み出されて出力される。また、制御処理で用いられる種々のフラグや、情報もRAM116上に構築されたワークを利用して管理されている。
このように、実施例の制御処理では、RAM116に頻繁にアクセスが行われる。
D. Program capacity reduction effect:
In various control processes described in the embodiments, various commands output by the main control board 110 are temporarily stored in the RAM 116, and then read out from the RAM 116 at a predetermined timing and output. Various flags and information used in the control process are also managed using a work constructed on the RAM 116.
As described above, in the control process of the embodiment, the RAM 116 is frequently accessed.

本実施例では、主制御基板110のCPU111は、それぞれRAM116に対して、ロード/ストアコマンドおよびイン/アウトコマンドの双方でアクセスすることができる。このように擬似RAMは、イン/アウトコマンドでアクセスできる分、アクセス1回につき1バイトずつプログラム容量を削減することができる。プログラム中に擬似RAMへのイン/アウトコマンドでのアクセス箇所が増えるほど、プログラム容量の削減効果は大きくなる。   In this embodiment, the CPU 111 of the main control board 110 can access the RAM 116 with both a load / store command and an in / out command. As described above, the pseudo RAM can reduce the program capacity by 1 byte for each access because the pseudo RAM can be accessed by the in / out command. As the number of access points by the in / out command to the pseudo RAM increases during the program, the effect of reducing the program capacity increases.

図10は擬似RAMの効果を示す説明図である。ある遊技機において、擬似RAMの有無でのプログラム容量の変化を比較して示した。
最上段は、擬似RAMを設けない場合である。つまり、RAMへのアクセスは、全てロード/ストアコマンドによって行われる場合を示している。この時の容量は550バイト強となっている。
2〜4段目は、擬似RAMを設けた場合である。それぞれ擬似RAMの容量を64バイト、128バイト、192バイトに変化させた場合を示した。図示する通り、プログラムの容量は、擬似RAMが64バイトの場合に10%、128バイトの場合に18%、192バイトの場合に31%削減される。
このように、本実施例によれば、イン/アウトコマンドでRAMへのアクセスを可能とする回路、つまりエリア区分判定部120を設けることによって、プログラムの容量を削減することが可能となる。RAMへのアクセスコマンド一つ当たりの削減量は1バイトに過ぎないが、頻繁に使用されるコマンドであるため、制御プログラム全体では、大きな削減効果を生むことができるのである。
FIG. 10 is an explanatory diagram showing the effect of the pseudo RAM. In a certain game machine, the change in the program capacity with and without the pseudo RAM is shown in comparison.
The uppermost stage is a case where no pseudo RAM is provided. That is, the case where all accesses to the RAM are performed by load / store commands is shown. The capacity at this time is just over 550 bytes.
The second to fourth stages are cases where a pseudo RAM is provided. A case where the pseudo RAM capacity is changed to 64 bytes, 128 bytes, and 192 bytes, respectively, is shown. As shown in the figure, the capacity of the program is reduced by 10% when the pseudo RAM is 64 bytes, 18% when the pseudo RAM is 128 bytes, and 31% when the pseudo RAM is 192 bytes.
As described above, according to the present embodiment, the capacity of the program can be reduced by providing the circuit that can access the RAM by the in / out command, that is, the area division determination unit 120. Although the amount of reduction per access command to the RAM is only 1 byte, since it is a command that is frequently used, the entire control program can produce a large reduction effect.

E.主制御基板110の変形例:
(1) パチンコ機1の制御基板の回路構成は、以下に示す通り、種々の変形例が可能である。ここでは、主制御基板110の変形例を示すが、払出制御基板210についても同様の変形例が適用可能である。
図11は主制御基板の変形例を示す説明図である。実施例では、IOにアクセスするためのアドレス空間を確保しておく必要上、擬似RAM領域は、8ビットのアドレス空間の一部にとどまる例を示した。変形例では、8ビットのアドレス空間全体を擬似RAM領域とすることができる回路例を示す。
E. Modification of main control board 110:
(1) The circuit configuration of the control board of the pachinko machine 1 can be variously modified as shown below. Here, a modification of the main control board 110 is shown, but a similar modification can be applied to the payout control board 210.
FIG. 11 is an explanatory view showing a modification of the main control board. In the embodiment, since it is necessary to secure an address space for accessing the IO, the pseudo RAM area has been shown to be part of the 8-bit address space. In the modification, a circuit example in which the entire 8-bit address space can be used as a pseudo RAM area is shown.

変形例の回路では、メモリエリアデコーダ113AおよびIOデコーダ122の構成が、実施例(図2)と相違する。その他の構成は、実施例と同じであるため説明を省略する。
メモリエリアデコーダ113Aは、アドレスに基づいてアクセス先がROM、RAM、IO領域(受信バッファ123r、送信バッファ123s)のいずれに当たるかを判断し、それぞれチップセレクタ信号MCS2、MCS1、およびMIOCS1、MIOCS2を出力する。ここでは2種類のIOを備える例を示したが、更に多くのIOを設けても良い。この場合には、メモリエリアデコーダ113Aから、各IOに対してチップセレクタ信号が接続される。
In the circuit of the modification, the configurations of the memory area decoder 113A and the IO decoder 122 are different from those of the embodiment (FIG. 2). Since other configurations are the same as those of the embodiment, description thereof is omitted.
The memory area decoder 113A determines whether the access destination corresponds to the ROM, RAM, or IO area (reception buffer 123r, transmission buffer 123s) based on the address, and outputs chip selector signals MCS2, MCS1, MIOCS1, and MIOCS2, respectively. To do. Here, an example in which two types of IOs are provided has been shown, but more IOs may be provided. In this case, a chip selector signal is connected to each IO from the memory area decoder 113A.

変形例の構成では、エリア区分判定部120は実施例と同様の機能を果たす(図2、図3参照)。つまり、イン/アウトコマンドが入力された時、指定された8ビットのアドレス値と、エリア区分データ121とを比較して、アクセス先がIOか擬似RAM領域かを判定し、IOエリア識別信号またはチップセレクタ信号MCS0を出力する。   In the configuration of the modified example, the area classification determination unit 120 performs the same function as in the embodiment (see FIGS. 2 and 3). That is, when an in / out command is input, the designated 8-bit address value is compared with the area segment data 121 to determine whether the access destination is an IO or pseudo-RAM area, and an IO area identification signal or The chip selector signal MCS0 is output.

変形例の構成によれば、実施例と同様に、8ビットのアドレス空間の一部を擬似RAM領域に割り当てることができる。この場合には、イン/アウトコマンドが入力された時に、エリア区分判定部120がアクセス先を切り換える機能を果たすことになる。   According to the configuration of the modified example, a part of the 8-bit address space can be allocated to the pseudo RAM area as in the embodiment. In this case, when the in / out command is input, the area classification determination unit 120 functions to switch the access destination.

変形例では、更に、8ビットのアドレス空間全体を擬似RAM領域に割り当てることも可能となる。エリア区分データ121に、「FFH」、つまり8ビットのアドレス空間の最大値を設定しておけば、エリア区分判定部120は無条件に擬似RAM領域へのアクセスが要求されているものと判断するようになり、アドレスバスA7〜A0によって確保し得るRAM116の擬似RAM領域全体にアクセスすることが可能となる。
この時、IOへのアクセスはロード/ストアコマンドによって確保される。メモリエリアデコーダ113Aにおいて、RAMの全領域を除く範囲にIO領域を設定しておけばよい。具体的には、アドレス空間の上位の所定ビットの差異によって、RAM116、ROM114、IO領域を規定することになる。こうしておけば、RAM116,IOのそれぞれに対して、下位8ビット分のアドレスを確保することができる。
In the modification, it is also possible to allocate the entire 8-bit address space to the pseudo RAM area. If “FFH”, that is, the maximum value of the 8-bit address space is set in the area partition data 121, the area partition determination unit 120 determines that access to the pseudo RAM area is requested unconditionally. Thus, the entire pseudo RAM area of the RAM 116 that can be secured by the address buses A7 to A0 can be accessed.
At this time, access to the IO is secured by a load / store command. In the memory area decoder 113A, the IO area may be set in a range excluding the entire area of the RAM. Specifically, the RAM 116, the ROM 114, and the IO area are defined by the difference between predetermined bits in the upper address space. In this way, it is possible to secure addresses for the lower 8 bits for each of the RAMs 116 and IO.

IOへのアクセスを行う場合、CPU111がIO領域に対応するアドレスを指定してロード/ストアコマンドを出力すると、メモリエリアデコーダ113Aはアクセス先がIOであると判断してチップセレクタ信号MIOCS1、MIOCS2のいずれかをアクティブにする。この結果、指定されたIOにアクセスすることが可能となる。   When accessing the IO, when the CPU 111 designates an address corresponding to the IO area and outputs a load / store command, the memory area decoder 113A determines that the access destination is the IO, and the chip selector signals MIOCS1 and MIOCS2 Make one active. As a result, the designated IO can be accessed.

また、メモリエリアデコーダ113Aは、アドレスA15〜A0の全空間に基づいてチップセレクタの出力が可能であるため、変形例の回路によれば、RAMおよびIOの双方にロード/ストアコマンドでアクセスすることが可能である。
また、実施例と同様、RAM116の一部が擬似RAM領域となるようエリア区分判定部120のエリア区分データ121において設定しておけば、擬似RAM領域に対しては、イン/アウトコマンドでアクセス可能となる。この時、擬似RAM領域に割り当てられなかった領域、つまり8ビットのアドレス空間の最後の方の領域は、イン/アウトコマンドでアクセス可能なIO領域となる。
このように設定することにより、RAM116およびIOそれぞれの一部について、ロード/ストアコマンドおよびイン/アウトコマンドの双方でアクセスすることが可能となる。
Further, since the memory area decoder 113A can output the chip selector based on the entire space of the addresses A15 to A0, according to the circuit of the modified example, both the RAM and the IO are accessed by a load / store command. Is possible.
Similarly to the embodiment, if the area classification data 121 of the area classification determination unit 120 is set so that a part of the RAM 116 becomes a pseudo RAM area, the pseudo RAM area can be accessed by an in / out command. It becomes. At this time, the area that is not allocated to the pseudo RAM area, that is, the last area of the 8-bit address space is an IO area that can be accessed by an in / out command.
By setting in this way, a part of each of the RAM 116 and IO can be accessed by both a load / store command and an in / out command.

このように変形例の回路によれば、RAM116およびIOの双方について、ロード/ストアコマンド、イン/アウトコマンドの双方でのアクセスが可能となる。擬似RAM領域を大きくすれば、イン/アウトコマンドでRAM116にアクセスすることができる分、プログラムの削減効果も大きくなる。しかし、一方、擬似RAM領域を大きくすることによって、IOへのアクセスにロード/ストアコマンドを使用する必要が生じると、その分、プログラムサイズが大きくなる。RAM116およびIOへのアクセス数は、プログラムの内容によって異なるから、上述の相反する効果を考慮して、プログラムサイズを最小にすることができる最適の擬似RAM領域のサイズもプログラムごとに求めることができる。   Thus, according to the circuit of the modified example, both the RAM 116 and the IO can be accessed by both the load / store command and the in / out command. If the pseudo-RAM area is increased, the program reduction effect is increased because the RAM 116 can be accessed by the in / out command. On the other hand, if the pseudo RAM area is enlarged, if a load / store command needs to be used for accessing the IO, the program size increases accordingly. Since the number of accesses to the RAM 116 and the IO differs depending on the contents of the program, the optimum pseudo RAM area size that can minimize the program size can be obtained for each program in consideration of the above-mentioned conflicting effects. .

(2) 実施例では、値00Hを初期化値として書き込むことによって、RAMクリア処理を行う例を示した。RAMクリア処理で用いる初期化値は、任意に設定可能である。00H以外の値を初期化値として用いる場合には、大当たりか否かの判定で用いられる大当たり判定乱数の値を避けて設定することが好ましい。こうすることによって、制御プログラムの改ざんや、ノイズなどの影響によって、本来意図されていないRAM領域からのデータの読み込みが行われた場合でも、誤って大当たり判定がなされることを回避できる。 (2) In the embodiment, the RAM clear process is performed by writing the value 00H as the initialization value. The initialization value used in the RAM clear process can be arbitrarily set. When a value other than 00H is used as the initialization value, it is preferable to avoid the jackpot determination random number used in the determination of whether or not the jackpot is set. By doing so, it is possible to avoid making a jackpot determination by mistake even when data is read from a RAM area that is not originally intended due to tampering with the control program or noise.

変形例の回路では、上述の通り、RAM116の全領域を擬似RAMとすることも可能である。この場合、RAMの全領域クリア処理(図7)は、全領域についてストア命令で0を書き込むようにしてもよいが、アウト命令で書き込むようにすれば更に好ましい。全領域についてアウト命令のみを用いるようにすれば、図7のステップS41a〜S41cの単一ループで書き込みを行うことができるため、プログラムサイズを抑制することができる。また、コマンド長が短いアウト命令を用いる点で、ストア命令を用いる場合に比較して、わずかではあるが、更にプログラムサイズを抑制することが可能となる。   In the circuit of the modified example, as described above, the entire area of the RAM 116 can be a pseudo RAM. In this case, in the all area clear process (FIG. 7) of the RAM, 0 may be written with the store instruction for all areas, but it is more preferable to write with the out instruction. If only the out instruction is used for the entire area, writing can be performed in a single loop of steps S41a to S41c in FIG. 7, so that the program size can be suppressed. Further, the use of an out instruction with a short command length makes it possible to further reduce the program size, although slightly, compared to the case where a store instruction is used.

以上、本発明の種々の実施例について説明したが、本発明はこれらの実施例に限定されず、その趣旨を逸脱しない範囲で種々の構成を採ることができることはいうまでもない。
実施例では、パチンコ機1への適用例を示したが、本発明はスロットマシンへの適用も可能である。
また、実施例では、主制御基板110に擬似RAM領域を設ける構成を示したが、主制御基板110に代えて、または主制御基板110と共に、この構成を払出制御基板210に適用してもよい。
As mentioned above, although the various Example of this invention was described, it cannot be overemphasized that this invention is not limited to these Examples, and can take a various structure in the range which does not deviate from the meaning.
In the embodiment, the application example to the pachinko machine 1 is shown, but the present invention can also be applied to the slot machine.
In the embodiment, a configuration in which a pseudo RAM area is provided on the main control board 110 is shown. However, this configuration may be applied to the payout control board 210 instead of the main control board 110 or together with the main control board 110. .

実施例としてのパチンコ機1の制御用ハードウェア構成を示すブロック図である。It is a block diagram which shows the hardware constitutions for control of the pachinko machine 1 as an Example. 主制御基板110の回路構成を示す説明図である。3 is an explanatory diagram showing a circuit configuration of a main control board 110. FIG. 主制御基板110の動作を示す説明図である。FIG. 6 is an explanatory diagram showing the operation of the main control board 110. RAM116へのワークの割り当て方法を示す説明図である。It is explanatory drawing which shows the allocation method of the workpiece | work to RAM116. 主制御側電源投入時処理の一例を示すフローチャート(1)である。It is a flowchart (1) which shows an example of the main control side power-on process. 主制御側電源投入時処理の一例を示すフローチャート(2)である。It is a flowchart (2) which shows an example of the process at the time of main control side power-on. RAMの全領域クリア処理のフローチャートである。It is a flowchart of a RAM all area clear process. RAMの全領域クリア処理の変形例のフローチャートである。It is a flowchart of the modification of all the area | region clear processing of RAM. 主制御側タイマ割り込み処理のフローチャートである。It is a flowchart of a main control side timer interrupt process. 擬似RAMの効果を示す説明図である。It is explanatory drawing which shows the effect of pseudo-RAM. 主制御基板の変形例を示す説明図である。It is explanatory drawing which shows the modification of a main control board.

符号の説明Explanation of symbols

1…パチンコ機
4a…表示部
4b…操作スイッチ
12…パネル装飾ランプ
16…LCD
20…賞球払出装置
21…払出モータ
22…払出球検出器
23…モータ駆動センサ
29…スピーカ
31…枠装飾ランプ
32、34…ランプ中継基板
41…特別図柄表示装置
42…入賞検出器
43…大入賞口ソレノイド
47…発射制御基板
48…タッチ検出部
49…発射モータ
110…主制御基板
111…CPU
112…バスバッファ
113、113A、113B…メモリエリアデコーダ
113d…エリア区分データ
114…ROM
115…選択部
116…RAM
116A…擬似RAM
116W…ワーク
116S…スタック
120…エリア区分判定部
121…エリア区分データ
122…IOデコーダ
123…パラレル入出力ポート
123s…送信バッファ
123r…受信バッファ
124…シリアル入出力制御部
124s…SP変換部
124p…PS変換部
210…払出制御基板
310…サブ制御基板
350…装飾図柄制御基板
DESCRIPTION OF SYMBOLS 1 ... Pachinko machine 4a ... Display part 4b ... Operation switch 12 ... Panel decoration lamp 16 ... LCD
DESCRIPTION OF SYMBOLS 20 ... Prize ball payout device 21 ... Payout motor 22 ... Payout ball detector 23 ... Motor drive sensor 29 ... Speaker 31 ... Frame decoration lamp 32, 34 ... Lamp relay board 41 ... Special symbol display device 42 ... Winning detector 43 ... Large Prize opening solenoid 47 ... Launch control board 48 ... Touch detector 49 ... Launch motor 110 ... Main control board 111 ... CPU
112 ... Bus buffers 113, 113A, 113B ... Memory area decoder 113d ... Area division data 114 ... ROM
115: Selection unit 116 ... RAM
116A ... Pseudo RAM
116W ... work 116S ... stack 120 ... area division determination unit 121 ... area division data 122 ... IO decoder 123 ... parallel input / output port 123s ... transmission buffer 123r ... reception buffer 124 ... serial input / output control unit 124s ... SP conversion unit 124p ... PS Conversion unit 210 ... Dispensing control board 310 ... Sub control board 350 ... Decorative design control board

Claims (5)

所定の遊技媒体を用いて遊技を行う遊技機であって、
前記遊技の進行を統合制御する主制御装置と、
前記遊技中に視聴覚的な演出を行うための演出装置と、
所定の条件下で、前記遊技媒体を遊技者に払い出す払出装置と、
前記主制御装置からの指示情報に従って、前記演出および払出しの少なくとも一方を制御する下位制御装置とを有し、
前記主制御装置は、
前記統合制御を実行するためのCPUと、
前記CPUが実行する制御プログラムを格納するためのメモリとしてのROMと、
前記統合制御に用いられる種々の情報を格納するためのメモリとしてのRAMと、
前記統合制御において、前記主制御装置と前記下位制御装置を含む外部との間で信号を入出力するための入出力ポートとを有し、
前記CPUは、メモリへのアクセスに使用されるコマンドであって2バイト以上のアドレス値を含むコマンド体系を有するメモリアクセスコマンドと、外部との信号の入出力に使用されるコマンドであって入出力先を指定するためのアドレス値が前記メモリアクセスコマンドよりも1バイト以上少ないコマンド体系を有する入出力ポートアクセスコマンドとを使用可能であり、
前記入出力ポートアクセスコマンドで指定されるアドレス値に基づいて、アクセス先を前記RAMおよび入出力ポートに切り換え、前記RAMおよび入出力ポートのいずれかをアクティブにするセレクタ信号を出力するエリア区分判定部と、
前記メモリアクセスコマンドで指定されるアドレス値の上位所定桁に基づいて、アクセス先となる前記ROMおよびRAMのいずれかをアクティブにするためのメモリセレクト信号を出力するメモリエリアデコード部とを有し、
前記入出力ポートアクセスコマンドに応じて稼働すべき対象を指定する入出力ポートリクエスト信号は、前記CPUから前記エリア区分判定部に入力されており、
前記メモリアクセスコマンドに応じて稼働すべき対象を指定するメモリリクエスト信号は、前記CPUから前記メモリエリアデコード部に入力されており、
前記CPUは、前記ROMに格納されている制御プログラムに従って、
前記RAMの2バイト以上の所定の連続領域を初期状態に設定すべきRAMクリア条件の成否を判定する判定処理と、
前記RAMクリア条件が成立する時には、前記入出力ポートアクセスコマンドでアクセス可能な領域を含む前記連続領域に前記メモリアクセスコマンドを用いて所定の初期化値を書き込むRAMクリア処理とを行う
遊技機。
A gaming machine that performs a game using a predetermined game medium,
A main control device for integrated control of the progress of the game;
An effect device for performing an audiovisual effect during the game,
A payout device for paying out the game medium to a player under predetermined conditions;
A subordinate control device that controls at least one of the effect and the payout according to the instruction information from the main control device;
The main controller is
A CPU for executing the integrated control;
ROM as a memory for storing a control program executed by the CPU;
RAM as a memory for storing various information used for the integrated control;
In the integrated control, having an input / output port for inputting and outputting signals between the main control device and the outside including the lower control device,
The CPU is a command used to access a memory and has a command system including an address value of 2 bytes or more, and a command used to input / output a signal to / from the outside. An input / output port access command having a command system in which an address value for designating a destination is 1 byte or less smaller than the memory access command can be used;
Based on an address value specified by the input / output port access command, an area classification determination unit that switches the access destination to the RAM and the input / output port and outputs a selector signal that activates either the RAM or the input / output port When,
A memory area decoding unit that outputs a memory select signal for activating either the ROM or the RAM to be accessed based on the upper predetermined digit of the address value specified by the memory access command;
An input / output port request signal for designating a target to be operated according to the input / output port access command is input from the CPU to the area classification determination unit,
A memory request signal for specifying a target to be operated according to the memory access command is input from the CPU to the memory area decoding unit,
The CPU is in accordance with a control program stored in the ROM.
A determination process for determining success or failure of a RAM clear condition in which a predetermined continuous area of 2 bytes or more of the RAM is to be set to an initial state;
A gaming machine that performs a RAM clear process for writing a predetermined initialization value using the memory access command in the continuous area including the area accessible by the input / output port access command when the RAM clear condition is satisfied.
請求項1記載の遊技機であって、
前記統合制御には、
所定のタイミングで、所定の大当たり判定乱数に基づいて大当たりか否かを判定する抽選処理と、
前記抽選処理によって大当たりと判定された場合には、その他の場合に比較して、前記遊技媒体の払い出しを受けやすい遊技状態を実現する大当たり制御処理とが含まれ、
前記初期化値は、前記大当たりとなる時の大当たり判定乱数の値を避けて設定された値である遊技機。
A gaming machine according to claim 1,
For the integrated control,
A lottery process for determining whether or not the jackpot is based on a predetermined jackpot determination random number at a predetermined timing;
When the lottery process is determined to be a jackpot, compared to other cases, includes a jackpot control process that realizes a gaming state that is easy to receive the game medium,
The gaming machine, wherein the initialization value is a value set avoiding the value of the jackpot determination random number when the jackpot.
請求項1または2記載の遊技機であって、
前記RAMの領域には、前記統合制御において使用が予定されていない未使用領域が含まれており、
前記未使用領域は、前記RAMクリア処理の対象外とされている遊技機。
A gaming machine according to claim 1 or 2,
The RAM area includes an unused area that is not scheduled to be used in the integrated control.
A gaming machine in which the unused area is not subject to the RAM clear process.
請求項3記載の遊技機であって、
前記RAMの先頭アドレスから連続する所定範囲は、前記CPUが前記ROMに格納されている制御プログラムに基づく制御処理を実行する際に使用する情報を格納しておくためのワークに割り当てられており、
前記RAMクリア処理は、前記ワークを対象として行われる遊技機。
A gaming machine according to claim 3,
The predetermined range continuous from the head address of the RAM is assigned to a work for storing information used when the CPU executes a control process based on a control program stored in the ROM,
The RAM clear process is a gaming machine that is performed on the work.
請求項1〜4いずれか記載の遊技機であって、
前記CPUは、前記RAMクリア処理を、サブルーチンによらずに、前記判定処理と同一の処理内で行う遊技機。
A gaming machine according to any one of claims 1 to 4,
A gaming machine in which the CPU performs the RAM clear process within the same process as the determination process, without using a subroutine.
JP2007325095A 2007-12-17 2007-12-17 Game machine Expired - Fee Related JP5120931B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007325095A JP5120931B2 (en) 2007-12-17 2007-12-17 Game machine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007325095A JP5120931B2 (en) 2007-12-17 2007-12-17 Game machine

Related Child Applications (1)

Application Number Title Priority Date Filing Date
JP2012216147A Division JP5463400B2 (en) 2012-09-28 2012-09-28 Game machine

Publications (2)

Publication Number Publication Date
JP2009142565A JP2009142565A (en) 2009-07-02
JP5120931B2 true JP5120931B2 (en) 2013-01-16

Family

ID=40913887

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007325095A Expired - Fee Related JP5120931B2 (en) 2007-12-17 2007-12-17 Game machine

Country Status (1)

Country Link
JP (1) JP5120931B2 (en)

Families Citing this family (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6055340B2 (en) * 2013-02-28 2016-12-27 京楽産業.株式会社 Game machine
JP6050147B2 (en) * 2013-02-28 2016-12-21 京楽産業.株式会社 Game machine
JP6129697B2 (en) * 2013-09-12 2017-05-17 株式会社三共 Game machine
JP6001522B2 (en) * 2013-11-05 2016-10-05 株式会社ユニバーサルエンターテインメント Game machine
JP6129723B2 (en) * 2013-11-25 2017-05-17 株式会社三共 Game machine
JP5992498B2 (en) * 2014-12-22 2016-09-14 株式会社ソフイア Game machine
JP2018161268A (en) * 2017-03-24 2018-10-18 サミー株式会社 Pachinko game machine
JP7014947B2 (en) * 2017-03-24 2022-02-02 サミー株式会社 Pachinko game machine
JP6948166B2 (en) * 2017-06-13 2021-10-13 株式会社平和 Pachinko machine
JP6813434B2 (en) * 2017-06-13 2021-01-13 株式会社平和 Game machine
JP7157428B2 (en) * 2017-10-06 2022-10-20 株式会社ソフイア game machine
JP2019076130A (en) * 2017-10-20 2019-05-23 株式会社ソフイア Game machine
JP7138543B2 (en) 2018-10-24 2022-09-16 株式会社藤商事 game machine
JP7385362B2 (en) * 2019-02-27 2023-11-22 株式会社藤商事 gaming machine
JP7385360B2 (en) * 2019-02-27 2023-11-22 株式会社藤商事 gaming machine
JP7312572B2 (en) * 2019-02-27 2023-07-21 株式会社藤商事 game machine
JP7312570B2 (en) * 2019-02-27 2023-07-21 株式会社藤商事 game machine
JP7312571B2 (en) * 2019-02-27 2023-07-21 株式会社藤商事 game machine
JP7385361B2 (en) * 2019-02-27 2023-11-22 株式会社藤商事 gaming machine
JP7312569B2 (en) * 2019-02-27 2023-07-21 株式会社藤商事 game machine
JP7312567B2 (en) * 2019-02-27 2023-07-21 株式会社藤商事 game machine
JP7312566B2 (en) * 2019-02-27 2023-07-21 株式会社藤商事 game machine

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004033480A (en) * 2002-07-03 2004-02-05 Newgin Corp Game machine
JP2004229938A (en) * 2003-01-30 2004-08-19 Sankyo Kk Game machine
JP4784927B2 (en) * 2005-08-19 2011-10-05 株式会社大一商会 Game machine

Also Published As

Publication number Publication date
JP2009142565A (en) 2009-07-02

Similar Documents

Publication Publication Date Title
JP5120932B2 (en) Game machine
JP5120931B2 (en) Game machine
JP5463400B2 (en) Game machine
JP5238952B2 (en) Game machine
JP5463401B2 (en) Game machine
JP2009165581A (en) Development support method of control program for game machine
JP5654941B2 (en) Game machine
JP6371956B1 (en) Game machine
JP5589174B2 (en) Game machine
JP7205584B2 (en) game machine
JP2012228298A (en) Game machine
JP6349528B1 (en) Game machine
JP5589173B2 (en) Game machine
JP5238951B2 (en) Game machine
JP2007319608A (en) Game machine
JP2009112437A (en) Game machine
JP7156459B2 (en) game machine
JP2015051195A (en) Pachinko game machine
JP7205583B2 (en) game machine
JP7230973B2 (en) game machine
JP7230970B2 (en) game machine
JP2010207352A (en) Game machine
JP6371955B1 (en) Game machine
JP6248313B2 (en) Amusement stand
JP2004016603A (en) Game machine

Legal Events

Date Code Title Description
A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20090324

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20101206

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120907

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

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20121018

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

Free format text: PAYMENT UNTIL: 20151102

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20151102

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 5120931

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