JP2012250132A - Game machine - Google Patents

Game machine Download PDF

Info

Publication number
JP2012250132A
JP2012250132A JP2012216148A JP2012216148A JP2012250132A JP 2012250132 A JP2012250132 A JP 2012250132A JP 2012216148 A JP2012216148 A JP 2012216148A JP 2012216148 A JP2012216148 A JP 2012216148A JP 2012250132 A JP2012250132 A JP 2012250132A
Authority
JP
Japan
Prior art keywords
ram
area
address
command
cpu
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2012216148A
Other languages
Japanese (ja)
Other versions
JP2012250132A5 (en
JP5463401B2 (en
Inventor
Takaaki Ichihara
高明 市原
Fumito Miyake
文人 三宅
Yosuke Yoshida
陽介 吉田
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 JP2012216148A priority Critical patent/JP5463401B2/en
Publication of JP2012250132A publication Critical patent/JP2012250132A/en
Publication of JP2012250132A5 publication Critical patent/JP2012250132A5/ja
Application granted granted Critical
Publication of JP5463401B2 publication Critical patent/JP5463401B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Pinball Game Machines (AREA)

Abstract

PROBLEM TO BE SOLVED: To reduce program capacity for controlling a game machine.SOLUTION: In a main control board of a Pachinko machine 1, when a CPU 111 outputs in/out commands for accessing an IO, an area section determination part 120 changes an access destination to one of the IO and a RAM 116 according to an address value, and an IO identification signal or a chip selector signal MCS0 is turned active according to the result. With this configuration, one portion (pseudo RAM area) of the RAM 116 can be accessed by the in/out commands. At this time, a work and the pseudo RAM area are assigned to a continuous area including the beginning address of the RAM 116, and a stack is assigned such that data are successively stored at a side, where an address becomes small with an end address as a start point. Thus, the pseudo RAM area can be usefully utilized for accessing the work.

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 the main control board for controlling the overall progress, the payout control board for controlling the payout of game media such as medals and game balls, sound output, lamp lighting, image display This is performed by distributed control of an effect control board or the like for controlling effects such as (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. There are also restrictions on the ROM and RAM capacities. With pachinko machines, control programs are limited to 3 kilobytes (KB), data is limited to 3 KB, and so on. ing.

特開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 program executed by the CPU for integrated control of games. 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. . Therefore, the area classification determination unit determines whether the address designated 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 the RAM to be accessed based on the upper predetermined digit of the address value specified by the memory access command. From the CPU, a memory request signal designating a target to be operated according to a memory access command is input to the memory area decoding unit,
The above function is effective when the CPU outputs a memory access command.

本発明の遊技機は、主制御装置のCPUは、エリア区分判定部の機能により、入出力ポ
ートアクセスコマンドでRAMの一部の領域にアクセス可能である。アクセス先を指定す
るアドレスは、入出力ポートアクセスコマンドの方が、メモリアクセスコマンドよりも1
バイト以上少なくて済む。従って、RAMへのアクセスが必要となる箇所で、メモリアク
セスコマンドに代えて、入出力ポートアクセスコマンドを用いることにより、1カ所につ
き1バイト以上、プログラム容量を削減することができる。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 that specifies the access destination is 1 for the I / O port access command than for the memory access command.
Less than a byte. 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 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.

本発明において、RAMの先頭アドレスから連続する所定範囲は、CPUがROMに格
納されているコンピュータプログラムに基づく制御処理を実行する際に使用する情報を格
納しておくためのワークに割り当てられている。また、RAMのうちワークを除く領域に
は、CPUがコンピュータプログラムを実行する際に一時的にデータを格納しておくため
の可変サイズのスタックが、ワークと干渉しないように割り当てられている。そして、R
AMのうちエリア区分判定部を介してアクセス可能な疑似RAM領域は、スタックよりも
アドレスが小さい側に、スタックの少なくとも一部を避けるようにして設定されている。
まず、先頭アドレスを含む所定の連続領域をワークに割り当てることにより、ワークの
空き領域を悪用した不正を防止することができる。
また、ワークとの干渉を避けるようにスタックを配置した上で、スタックの少なくとも
一部を避けて疑似RAM領域を配置することにより、疑似RAM領域を効果的に使用する
ことができる利点がある。つまり、CPUは、スタックへのアクセスには、入出力ポート
アクセスコマンドは利用できず、メモリアクセスコマンドを利用するのが一般的である。
従って、疑似RAM領域をスタックに割り当てたとしても、入出力ポートアクセスコマン
ドを活用することによるプログラムサイズ削減効果を得ることはできないため、この意味
で、スタックに割り当てられた疑似RAM領域は無駄になってしまう。これに対し、スタ
ックを避けて疑似RAM領域を設けておけば、疑似RAMを無駄なくプログラム容量の削
減効果に結びつけることが可能となる。
In the present invention, a predetermined range continuous from the head address of the RAM is assigned to a work for storing information used when the CPU executes control processing based on a computer program stored in the ROM. . Further, a variable-size stack for temporarily storing data when the CPU executes a computer program is allocated to an area excluding the work in the RAM so as not to interfere with the work. And R
The pseudo RAM area that can be accessed via the area division determination unit in the AM is set on the side having a smaller address than the stack so as to avoid at least a part of the stack.
First, by assigning a predetermined continuous area including a head address to a work, it is possible to prevent fraud by exploiting an empty area of the work.
Further, there is an advantage that the pseudo RAM area can be effectively used by arranging the stack so as to avoid interference with the workpiece and arranging the pseudo RAM area while avoiding at least a part of the stack. That is, the CPU cannot use the input / output port access command for accessing the stack, but generally uses the memory access command.
Therefore, even if the pseudo RAM area is allocated to the stack, the effect of reducing the program size by using the input / output port access command cannot be obtained. In this sense, the pseudo RAM area allocated to the stack is wasted. End up. On the other hand, if the pseudo RAM area is provided avoiding the stack, the pseudo RAM can be linked to the effect of reducing the program capacity without waste.

スタックは蓄積されているデータ量に応じて変化する可変サイズの領域である。従って
、疑似RAM領域は、想定されるスタックの最大範囲を回避するよう設定しておけばよい
。疑似RAM領域は、スタックの全範囲を避けることが望ましいが、必ずしも全範囲を避
ける場合に限る必要はなく、少なくとも一部を避けていればよい。
The stack is a variable-size area that changes according to the amount of accumulated data. Therefore, the pseudo RAM area may be set so as to avoid the maximum possible stack range. Although it is desirable to avoid the entire range of the stack, it is not always necessary to avoid the entire range of the pseudo-RAM area.

スタックは、例えば、所定のアドレスを開始点として、データの蓄積に応じてアドレス
が小さくなる側に拡張するよう構成することができる。スタックの範囲は、最後のデータ
を格納した領域のアドレスを表すスタックポインタで管理されるのが通常であるが、デー
タを格納する度にスタックポインタを一つずつ減少させるよう制御すればよい。
かかる場合には、スタックはRAMの終端アドレスを開始点として設定しておくことが
好ましい。つまり、RAMの終端から始まる可変領域がスタックに割り当てられることに
なる。
こうすることにより、スタックが拡張された場合でも、ワークとの干渉をほぼ確実に回
避することができる。また、疑似RAM領域もスタックを十分に回避して設定することが
可能となる。
For example, the stack can be configured to start from a predetermined address as a starting point and expand to a side where the address becomes smaller as data is accumulated. Normally, the stack range is managed by a stack pointer indicating the address of the area where the last data is stored. However, it is sufficient to control the stack pointer to be decreased by one each time data is stored.
In such a case, the stack is preferably set with the RAM end address as the starting point. That is, a variable area starting from the end of the RAM is allocated to the stack.
By doing so, even when the stack is expanded, it is possible to almost certainly avoid interference with the workpiece. Also, the pseudo RAM area can be set by sufficiently avoiding the stack.

スタックはデータを格納する度にスタックポインタを一つずつ増加させるよう構成して
もよい。この場合には、疑似RAM領域またはワークの終端アドレスよりも大きい任意の
アドレスを開始点とすればよい。こうすることによって、疑似RAM領域およびワークと
スタックとの干渉を回避することができる。ただし、スタックが最大限に拡張した場合に
、RAM領域が不足しないよう開始点のアドレスを設定しておくことが望ましい。
The stack may be configured to increment the stack pointer by one each time data is stored. In this case, an arbitrary address larger than the pseudo RAM area or the work end address may be used as the start point. By doing so, interference between the pseudo RAM area and the work and the stack can be avoided. However, it is desirable to set the start point address so that the RAM area does not run out when the stack is expanded to the maximum extent.

本発明において、疑似RAM領域は種々の設定が可能であるが、先頭アドレスを含む所
定範囲を割り当てることが好ましい。
先に説明した通り、本発明の遊技機では、ワークとして使用するRAM領域を先頭アド
レスから空き領域(未使用領域)を設けることなく連続して設定することによって、不正
防止を図っている。このため、上述の態様では、疑似RAM領域をRAM領域の先頭アド
レスから設けることによって、疑似RAM領域をワークとして無駄なく活用することが可
能となる。
In the present invention, the pseudo RAM area can be set in various ways, but it is preferable to assign a predetermined range including the head address.
As described above, in the gaming machine of the present invention, fraud prevention is achieved by continuously setting the RAM area used as a work without providing an empty area (unused area) 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 an 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. 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 size of the pseudo RAM area for the effect of reducing the program size.

本発明において、上述の特徴は、必ずしも全てが備えられている必要はなく、適宜、一
部を省略したり、組み合わせたりしても良い。上述の特徴は、主制御装置とは別のハード
ウェアとして払出制御装置が構成されている場合には、払出制御装置に適用することも可
能である。
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 also be applied to the payout control device when the payout control device is configured as hardware different from the main control device.

実施例としてのパチンコ機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.

本発明の実施例について以下の順序で説明する。
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の分散処理で実現してもよいし、単独のC
PUで実現する構成としてもよい。
また、主制御基板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. Main control board 110
Is mounted with a one-chip microcomputer including a CPU, a RAM, a ROM, and the like, and implements various control processes in accordance with 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 a single C
It is good also as a structure implement | achieved by PU.
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 is
According to the signal from the winning detector 42, the lottery explained above can be performed and the big hit game can be executed. 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, the player
When a launching handle provided on the front of the gaming machine is operated, the launch control board 47 controls the launch motor 49 in accordance with 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 sends a control signal indicating whether or not to fire to the launch control board 47,
Indirectly controls the launch of the sphere.

遊技中に入賞した旨のコマンドを主制御基板110から受信すると、払出制御基板21
0は、賞球払出装置20内の払出モータ21を制御し、払出球検出器22によって球数を
カウントしながら規定数の球を払い出す。払出モータ21の動作は、モータ駆動センサ2
3によって監視されており、球ガミ、球切れなどの異常が検出された場合、払出制御基板
210は、表示部4aにエラーコードを表示する。エラー表示された時には、遊技場の係
員が異常を除去した後、操作スイッチ4bを操作することで復旧させることができる。
When a command indicating that a prize is won during the game is received from the main control board 110, the payout control board 21
0 controls the payout motor 21 in the prize ball payout device 20 and pays out a specified number of balls while counting the number of balls by the payout ball detector 22. The operation of the dispensing motor 21 is based on the motor drive sensor 2
3, the payout control board 210 displays an error code on the display unit 4a when an abnormality such as a ball bit or a ball break is detected. 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, in order to control the speaker 29, the sub-control board 310 includes a sound source IC.
And an amplifier is provided. 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、ROM11
4にアクセスするための回路、および外部入出力(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, the CPU 111 includes a RAM 116 and a ROM 11.
4, a circuit for accessing 4 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ビットである。R
D/WRは読み書きの制御信号(以下、「リード・ライト」と呼ぶこともある)である。
IOREQは、I/Oへのアクセスの際にアクティブとなる1ビットの信号であり、MR
EQはメモリへのアクセスの際にアクティブとなる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 are upper addresses, A7 to
A0 may be referred to as a lower address. The data bus has 8 bits D7 to D0. R
D / WR is a read / write control signal (hereinafter also referred to as “read / write”).
IOREQ is a 1-bit signal that becomes active when I / O is accessed.
EQ is a 1-bit signal that becomes active when the memory is accessed.

メモリエリアデコーダ113は、メモリへのアクセスを中継する回路である。メモリエ
リアデコーダ113からは、ROM114へのアクセスを可能とするためのチップセレク
タ信号MCS2、RAM116へのアクセスを可能とするためのチップセレクタ信号MC
S1が出力される。チップセレクタ信号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 MC for enabling access to the RAM 116.
S1 is output. The chip selector signal MCS1 is sent to the RAM 116 via the selector 115.
Is input.

エリア区分判定部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 in hardware, but in this embodiment,
The reference value stored in the ROM 114 is read and set at startup.
From the area division determination unit 120, an IO for activating the I / O decoder 122
An area identification signal and a chip selector signal MCS0 to the RAM 116 are output.

チップセレクタ信号MCS0は、選択部115を介してRAM116に入力される。R
AM116は、メモリエリアデコーダ113からのチップセレクタ信号MCS1、および
エリア区分判定部120からのチップセレクタ信号MCS0のいずれかがアクティブとな
っていれば、アクセス可能である。従って、選択部115は、例えば、オアゲートによっ
て構成することができる。
The chip selector signal MCS0 is input to the RAM 116 via the selection unit 115. R
The AM 116 can be accessed if either the chip selector signal MCS1 from the memory area decoder 113 or 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の値に応じて、アクセス先となるべきI
Oを指定するためのチップセレクタ信号IOCS1、IOCS2等を出力する。チップセ
レクタ信号は、下位アドレスA7〜A0のアドレス空間に相当する本数、出力可能である
The IO decoder 122 operates when the IO area identification signal is active.
The IO decoder 122 selects the I to be accessed according to the values of the lower addresses A7 to A0.
Chip selector signals IOCS1, IOCS2, etc. for designating O are output. 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に対応している。受信バッファ123
r、送信バッファ123sの容量は、任意に設定可能であるが、本実施例では、データの
入出力が可能なサイズとして32バイトの容量を確保した。これらのバッファは、いわゆ
るFIFO(First In First Out1)型である。
受信バッファ123rは、シリアル入出力制御部124内に構成されたSP(シリアル
/パラレル)変換部124sに接続され、送信バッファ123sは、PS(パラレル/シ
リアル)変換部124pに接続されている。外部からシリアル入力する際には、データは
、SP変換部124sによって8ビットのパラレルデータに変換され、受信バッファ12
3rに蓄積される。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. Receive buffer 123
r, the capacity of the transmission buffer 123s can be arbitrarily set, but in this embodiment, a capacity of 32 bytes is secured as a size capable of data input / output. 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 the reception buffer 12
Accumulated in 3r. 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 in order 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 LD command output, MREQ
Although the RD signal and the RD signal become active, the illustration is omitted to avoid complication of the drawing.

メモリエリアデコーダ113は、アドレスに基づき、アクセス先が、ROM114かR
AM116かを判定する(処理S2)。
ROM114へのアクセスが指定されている場合には、ROM114に対応するチップ
セレクタ信号MCS2をアクティブにする。この結果、ROM114内において、A12
〜A0で指定された領域に格納されているデータが読み出される。
RAM116へのアクセスが指定されている場合には、RAM116に対応するチップ
セレクタ信号MCS1をアクティブにする。この結果、RAM116内において、下位ア
ドレスで指定された領域に格納されているデータが読み出される。この場合、CPU11
1は、RAM116のメモリ領域(アドレス00H〜FFH)のうち任意の領域にアクセ
ス可能である。RAM116のメモリ領域は設定により512バイトおよび256バイト
に切り換えることが可能であるが、本実施例では、256バイトと設定されている場合を
例にとって説明する。
The memory area decoder 113 determines whether the access destination is the ROM 114 or R based on the address.
It is determined whether it is AM116 (process S2).
When access to the ROM 114 is designated, the chip selector signal MCS2 corresponding to the ROM 114 is activated. As a result, in the ROM 114, A12
Data stored in the area designated by ~ A0 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 11
1 can access any area of the memory area (addresses 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かI
Oかを判別する(処理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 specified by the lower address, so the command is as shown in the figure.
It consists of 2 bytes of “IN, lower address”.
The area classification determination unit 120 determines whether the access destination is RAM or I based on the area classification data.
It is determined whether it is O (process 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 indicates that the lower addresses A7 to A0 are “00H
If it is included in “˜ ** H”, it is determined that the access destination is a pseudo-RAM area, and in other cases, it is determined that the access destination is IO.

アクセス先が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 operates, and IO is selected based on the lower addresses A7 to A0, and the corresponding chip selector signals IOCS1 and IOCS2 are selected.
Etc. are activated (process 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. Excluding the address space required to access the IO,
All may be assigned to the pseudo-RAM area. 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へのワークの割り当て方法を示す説明図である。ワークとは、CP
U111が種々の制御処理を実行する際に、制御処理間で受け渡すべき情報や、制御処理
を繰り返し実行する際に次回まで保持しておくべき情報などを格納しておくべき領域を言
う。本実施例では、ワークを構成する各変数は、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. Work is CP
This refers to an area in which information that should be passed between control processes when U111 executes various control processes, information that should be held until the next time when control processes are repeatedly executed, and the like are stored. 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は、ワークの他、スタックとしても活用される。スタックには、CPU1
11が制御プログラムを実行する上で一時的に記憶すべき種々の情報を記憶する。記憶す
べき情報としては、例えば、使用中のレジスタの内容、サブルーチンを終了して本ルーチ
ンに復帰するときの本ルーチンの復帰アドレスなど、制御処理を進める上で一時的に記憶
する種々の情報の格納アドレスなどが挙げられる。
スタックへのデータの格納状態は、スタックポインタで管理される。スタックポインタ
は、上述のデータをスタックに順次、格納・読み出し可能とするために、スタック中での
最新の情報の格納場所を表している。本実施例では、スタックにデータが格納される度に
、スタックポインタのアドレスを「−1」ずつ変化させ、データが読み出される度に、ス
タックポインタのアドレスを「+1」ずつ変化させる方法を採った。
The RAM 116 is used not only as a work but also as a stack. CPU1 in the stack
11 stores various information that should be temporarily stored when the control program is executed. 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領域を十分に確保可能であれば、ワークへのアクセス時に入出力ポートアク
セスコマンドを利用することによるプログラム削減効果を十分に得るために、擬似RAM
116Aをワーク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. FIG.
In the example of (a), 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 can be used to obtain a sufficient program reduction effect by using the input / output port access command when accessing the work.
116A is preferably equal to or greater than workpiece 116W.

一方、スタック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の容量が十分に大きい場合には、制御プログラムの開発者は、スタック11
6Sとの干渉を懸念することなく、ワーク116Wを設けることができる。この時、RA
M116の領域は、ワーク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, if the capacity of the RAM 116 is sufficiently large compared to the memory capacity that can be consumed by the work 116W and the stack 116S, the developer of the control program can recognize the stack 11
The workpiece 116W can be provided without worrying about interference with 6S. At this time, RA
The area of M116 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を避けて設けてある。一般にはスタック11
6Sへのアクセスは、イン/アウトコマンドという入出力ポートアクセスコマンドは利用
できず、スタックコマンド、つまりプッシュ(PUSH)/ポップ(POP)コマンドが
利用される。スタックコマンドは、メモリにアクセスするためのコマンドではあるが、ア
クセスすべきアドレスはCPUが内部的に管理・指定するものであり、コマンドで個別の
アドレスを指定することはできない点で、本明細書に言うメモリアクセスとは別種のコマ
ンドである。従って、擬似RAM領域をスタック116Sに割り当てたとしても、入出力
ポートアクセスコマンドを活用することによるプログラムサイズ削減効果を得ることはで
きない。本実施例では、スタック116Sを避けて擬似RAM領域を設けることにより、
上述の削減効果を無駄なく得ることが可能となっている。
The pseudo RAM area is provided avoiding the stack 116S. Generally stack 11
For the access to 6S, an input / output port access command called an in / out command cannot be used, but a stack command, that is, a push (PUSH) / pop (POP) command is used. Although the stack command is a command for accessing the memory, 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 the present embodiment, by providing a pseudo RAM area avoiding the stack 116S,
It is possible to obtain the above reduction effect without waste.

更に、本実施例では先頭アドレスを含む連続領域を擬似RAM領域に割り当てることに
よって、上述の削減効果を十分に得ることが可能である。
図4(b)に、比較例として擬似RAM領域を先頭アドレスからずらしたアドレス「x
xH」〜「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 an address “x” obtained by shifting the pseudo RAM area from the top address as a comparative example.
The case where it provided in "xH"-"yyH" was shown. Even in such a case, the workpiece 116W is provided.
Needs to be provided in a continuous area from the top 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”. Pseudo RAM
Depending on the size of the area and the work 116W, as shown in FIG. 4B, the end of the pseudo RAM area may protrude from the work 116W, and the program reduction effect cannot be obtained for the protruding part. .
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, in the memory area decoder 113 and the area division determination unit 120,
For the address corresponding to the isolation region, a method of not outputting the chip selector signal can be adopted.

以上の説明では、スタックポインタがデータ格納時に「−1」ずつされる場合を例示し
た。スタックの利用態様としては、データ格納時にスタックポインタが「+1」ずつされ
る構成を採ることも可能である。この場合、図4(a)に示したのとは逆に、終端アドレ
ス側に向けて、データが積み重ねられることになる。
かかる場合には、図4(c)に示すように、終端アドレスからずらした位置にスタック
116Sを設定することが好ましい。この場合でも、擬似RAM領域とスタック116S
およびワーク116Wとは重ならないように配置することが好ましいから、スタック11
6Sは、擬似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, the pseudo RAM area and the stack 116S
In addition, the stack 11 is preferably arranged so as not to overlap the workpiece 116W.
6S is preferably arranged on the larger address side than the larger one of the end address of the pseudo RAM area and the end address of the work 116W.

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によって所定の待ち時間を経た後(ステップS
14)、停電予告信号の状態を確認し、停電予告信号が停電を示す状態(停電予告信号が
ロウのとき)となっているか否かを判定する(ステップS16)。停電を示す状態となっ
ている場合には、ウェイトタイマ処理1による待ち時間(ステップS14)を経てから、
再度停電予告信号の状態を確認する。
このように、所定の待機時間を経た後に停電予告信号を確認するのは、停電予告信号が
、停電又は瞬停によってパチンコ機1への供給電圧が所定の停電予告電圧より低くなった
時に出力されるため、電源投入時に遊技機への供給電圧が所定電圧に達するまでは、一定
の時間を要するためである。これにより、供給電圧が不安定な状態で、主制御基板の遊技
機の制御に関する処理(ループ処理、タイマ割込処理)を実行しないようにすることが可
能となる。
The CPU 111 waits for a predetermined waiting time by the wait timer process 1 (step S
14) Check the state of the power failure warning signal and determine whether or not the power failure warning signal indicates a power failure (when the power failure warning signal is low) (step S16). If it is in a state indicating a power failure, after waiting for the wait timer process 1 (step S14),
Check the power failure warning signal again.
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 (stops output) (step S18),
The power failure warning signal output from the power failure monitoring circuit 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)。RA
Mクリア報知フラグRCLに値1をセットし(ステップS22)、操作されていないとき
には値00Hをセットする(ステップS24)。RAMクリアスイッチが操作されると、
後述の通り、主制御基板110のRAM116上の確率変動、未払い出し賞球等の遊技に
関する遊技情報が消去されることになる。
The CPU 111 operates when the RAM clear switch is operated (step S20). RA
A value 1 is set to the M 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, the game information on the game such as the probability variation on the RAM 116 of the main control board 110 and unpaid prize balls is erased.

次にCPU111はウェイトタイマ処理2で(ステップS26)、装飾図柄制御基板3
50の起動を待つ。但し、主制御基板110は装飾図柄制御基板350から起動完了の通
知を受信することはできないため、所定時間経過した時点で起動が完了したものとみなし
て次の処理を実行することになる。本実施例では、待機時間として2秒が設定されている
Next, the CPU 111 performs the wait timer process 2 (step S26), and the decorative symbol control board 3
Wait for 50 to start. 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クリアスイッチを継続的に監視し、RA
Mクリアスイッチの操作が検出された場合には、所定のフラグをオンにするなどの方法で
検出結果を示すようにしてもよい。この場合、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.
Also, during the wait timer process 2, the RAM clear switch is continuously monitored and the RA
When the operation of the M clear switch is detected, the detection result may be indicated by a method such as turning on a predetermined flag. 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のステップS2
8)、即ちRAMクリアスイッチが操作されていない時には、RAM116に記憶されて
いる遊技情報のチェックサムを算出する(ステップS30)。そして、チェックサムの値
が前回の電源断時に予め算出されバックアップされていたチェックサムの値と一致してい
るか否かを判定する(ステップS32)。本実施例では、電源断時におけるチェックサム
の算出と、電源投入時におけるチェックサムの算出(ステップS30)とは共通のサブル
ーチンで行うものとした。こうすることにより、チェックサムの算出自体の差異によるエ
ラーの発生を回避できるからである。
チェックサムが一致しているときには、バックアップフラグBKが値1であるか否かを
判定する(ステップS34)。バックアップフラグBKは、前回の電源断時に、遊技情報
、チェックサムの値などが正常にバックアップされていることを表すフラグである。
バックアップフラグBKが値1であるときには、CPU111はバックアップフラグB
Kに値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 S2 in FIG. 6), the CPU 111
8) That is, when the RAM clear switch is not operated, the checksum of the game information stored in the RAM 116 is calculated (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 is 1, the CPU 111 determines that the backup flag B
The value 0 is set in K, and the power recovery setting read from the ROM 114 is performed 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, the RAM
When the clear switch is operated, the RAM 116 is initialized as will be described later. When the checksum values do not match, or the backup flag BK is 0
The same applies to the case (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 clears the entire area of the RAM, that is,
A process of clearing the RAM 116 is performed by writing the value 00H to the entire area of 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 processing is completed, the CPU 111 performs interrupt initialization (step S46).
Sets the interrupt cycle for timer interrupt processing. In this embodiment, the interrupt period is 4 ms.
It was.
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,
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 setting value A 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はまず割り込み禁止設定を行う(ステップS
56)。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 S
56). 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.
A checksum is calculated based on the game information stored in the RAM 116 (step S60).
Then, a value 1 is set to 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 example,
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. Also, in order to improve accuracy, two different
More than one type of calculation method 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,
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内のバックアップ領域に退避されたワークの情報は、その後、主制御側電源投入
時処理が実行された時に、次の方法で活用することができる。説明の便宜上、ここではC
PU111が制御処理において参照するワークをメインワークと称し、バックアップ領域
に退避されたワークをサブワークと称するものとする。
電源投入時には、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, here C
The work referred to by the PU 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. Main power supply side power-on processing (
This corresponds to the processing content of step S40 in FIGS.
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 executing the RAM clear process in a subroutine, as described above, the return address after the end of the subroutine is stored in the stack, and this value is held.
It is necessary to write the initialization value only for the area excluding the stack.

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 start 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). "** H + 1" instead of "** H"
This is because writing is performed up to the address ** H.

次に、CPU111は、クリアアドレスにアウト(OUT)命令で初期化値00Hを書
き込む(ステップS41c)。この書き込みが終わると、CPU111は、クリアアドレ
スを1だけ加算することによって、書き込むべきアドレスを一つ進め(ステップS41d
)、ループ回数を1ずつ減らす(ステップS41e)。以上の処理を、ループ回数が0と
なるまで(ステップS41f)、繰り返し実行することにより、CPU111は擬似RA
M領域の全アドレスに初期化値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 one by adding 1 to the clear address (step S41d).
) Decrease the number of loops by 1 (step S41e). By repeatedly executing the above processing until the number of loops becomes 0 (step S41f), the CPU 111 performs pseudo RA.
The initialization value 00H can be written to all addresses in the M area.

擬似RAM領域のクリアを終えると、CPU111は、擬似RAM領域を除く領域(右
側の図の白抜きの領域)に対して、メモリアクセスコマンドであるストア(ST)命令を
用いて初期化値00Hを書き込む。
上述の処理は、次の手順で行われる。CPU111は、クリアアドレスとして擬似RA
M領域の終端アドレスの次のアドレスである「**H+1」を設定する(ステップS41
g)。また、ループ回数として、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 uses a pseudo RA as a clear address.
“** H + 1” which is the next address of the end address of the M area is set (step S41).
g). 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 one by adding 1 to the clear address (step S41j).
The number of loops is decreased by 1 (step S41k). By repeatedly executing the above processing until the number of loops becomes zero (step S41m), the CPU 111 performs pseudo-RAM.
The initialization value 00H can be written to all addresses other than the 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 explained earlier (
In FIG. 2), in the present embodiment, the pseudo RAM area is configured to be accessible by both an input / output port access command and a 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は、クリアアドレスとしてRAM1
16の先頭アドレスである「00H」を設定する(ステップS41p)。また、ループ回
数としてRAM116の終端アドレスに1を加えた「FFH+1」を設定する(ステップ
S41q)。
The above process is performed in the following procedure. The CPU 111 uses the RAM 1 as a clear address.
“00H”, which is the start address of 16, is set (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 one by adding 1 to the clear address (step S41s).
The number of loops is decreased by 1 (step S41t). By repeatedly executing the above processing until the number of loops becomes zero (step S41u), the CPU 111 performs pseudo-RAM.
The initialization value 00H can be written to all addresses other than the 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.
In addition, the RAM clear process is preferably performed for a work (see FIG. 4),
At this time, the stack may be included in the RAM clearing 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 part or all of the work, when it is determined that the RAM clear processing is necessary by the checksum,
You may make it perform RAM clear process about the whole RAM.

C3.主制御側タイマ割り込み処理:
図9は主制御側タイマ割り込み処理のフローチャートである。主制御基板110のCP
U111によって、所定の割り込み周期(本実施形態では、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. CP of main control board 110
This process is repeatedly performed by U111 every predetermined interrupt cycle (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. As signals to be input, a detection signal of a game ball that has entered a normal winning opening, a starting winning opening, a large winning opening, an ACK signal that is output by the payout control board 210 when receiving a payout command for winning balls,
Etc.

タイマ減算処理(ステップ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,
Examples include the time for the special symbol display device 41 to light according to the variation display pattern, the time for the normal symbol display to light according to the normal symbol variation display pattern, and the time required to input the ACK signal from the payout control board 210.

当落乱数更新処理(ステップ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 prize opening when it is not in the jackpot gaming state, the CPU 111 determines that it is abnormal and creates a prize abnormality notification command.
Output 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
A hit determination based on a random number for normal symbol determination, a normal symbol variation control, and a drive control of the opening / closing blade solenoid for opening / closing the opening / closing blade of the winning opening at the time of winning are 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 initializes the watchdog timer initialization register WCL.
A value C is set to (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 timer interrupt process is started, the CPU 111 loads the contents of the general-purpose registers on the stack and saves them. Therefore, upon completion of the above processing, the CPU 111
The contents saved on the stack are read out and written to the original register, thereby restoring the register (step S98), setting interrupt permission, and ending this routine.

C4.サブ統合側処理:
サブ制御基板310は、主制御基板110からのコマンドに応じて、種々の演出制御を
行う。
図示を省略するが、サブ制御基板310が実行する処理も、主制御側メイン処理(図6
)と同様のループと、主制御側タイマ割り込み処理(図9)と同様の割込処理から構成さ
れる。サブ制御基板310は2ms周期で割り込み処理を実行するとともに、16ms周
期で「16ms定常処理」を実行する。
この16ms定常処理では、主制御基板110からの各種コマンドを解析するコマンド
解析処理、パネル装飾ランプ12、枠装飾ランプ31(図1参照)の点灯制御を行うラン
プ処理、演出用の音声や警報音などの出力処理、装飾図柄制御基板350を介してLCD
16に演出用の画面を表示させる処理、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 the main control side main processing (FIG. 6).
) And an interrupt process similar to the main control timer interrupt process (FIG. 9). 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 LCD through the decorative design control board 350
16 performs a process for displaying a production screen, a watchdog timer process indicating that the CPU is operating normally, a process for setting a driving pattern of the accessory in the scheduler, and the like.

サブ制御基板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 the present embodiment, the CPU 111 of the main control board 110 has a respective RAM 116.
It can be accessed with both load / store commands and in / out commands. 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%、19
2バイトの場合に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 10% when the pseudo RAM is 64 bytes, 18% when the pseudo RAM is 128 bytes, 19%
In case of 2 bytes, it is reduced by 31%.
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 has access destinations based on addresses such as ROM, RAM,
It is determined which of the IO areas (reception buffer 123r, transmission buffer 123s) corresponds to chip selector signals MCS2, MCS1, MIOCS1, and MIOCS2.
Is output. 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, as in the embodiment, a part of the 8-bit address space is pseudo-RAM.
Can be assigned to an area. 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、RO
M114、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. More specifically, the RAM 116, RO are determined by the difference between the upper bits of the address space.
M114, IO area will be defined. 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はアクセス先がI
Oであると判断してチップセレクタ信号MIOCS1、MIOCS2のいずれかをアクテ
ィブにする。この結果、指定されたIOにアクセスすることが可能となる。
When accessing the IO, if the CPU 111 designates an address corresponding to the IO area and outputs a load / store command, the memory area decoder 113A has an access destination of I / O.
It is determined that the signal is O, and one of the chip selector signals MIOCS1 and MIOCS2 is activated. 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領域のサイズもプログラムごとに求めることがで
きる。
As described above, according to the circuit of the modification example, both the RAM 116 and the IO are loaded /
Access by both a store command and an in / out command is possible. 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クリア処理で用いる初期化値は、任意に設定可能である。0
0H以外の値を初期化値として用いる場合には、大当たりか否かの判定で用いられる大当
たり判定乱数の値を避けて設定することが好ましい。こうすることによって、制御プログ
ラムの改ざんや、ノイズなどの影響によって、本来意図されていない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. 0
When a value other than 0H is used as the initialization value, it is preferable to set a value that avoids the value of the jackpot determination random number used in the determination of whether or not the jackpot. 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 command is used for the entire area, steps S41a to S41c in FIG.
Therefore, 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, the configuration in which a pseudo RAM area is provided on the main control board 110 has been described.
You may apply to.

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 (3)

所定の遊技媒体を用いて遊技を行う遊技機であって、
前記遊技の進行を統合制御する主制御装置と、
前記遊技中に視聴覚的な演出を行うための演出装置と、
所定の条件下で、前記遊技媒体を遊技者に払い出す払出装置と、
前記主制御装置からの指示情報に従って、前記演出および払出しの少なくとも一方を制御する下位制御装置とを有し、
前記主制御装置は、
前記統合制御を実行するためのCPUと、
前記CPUが実行するプログラムを格納するためのメモリとしてのROMと、
前記統合制御に用いられる種々の情報を格納するためのメモリとしてのRAMと、
前記統合制御において、前記主制御装置と前記下位制御装置を含む外部との間で信号を入出力するための入出力ポートとを有し、
前記CPUは、メモリへのアクセスに使用されるコマンドであって2バイト以上のアドレス値を含むコマンド体系を有するメモリアクセスコマンドと、外部との信号の入出力に使用されるコマンドであって入出力先を指定するためのアドレス値が前記メモリアクセスコマンドよりも1バイト以上少ないコマンド体系を有する入出力ポートアクセスコマンドとを使用可能であり、
前記入出力ポートアクセスコマンドで指定されるアドレス値に基づいて、アクセス先を前記RAMおよび入出力ポートに切り換え、前記RAMおよび入出力ポートのいずれかをアクティブにするセレクタ信号を出力するエリア区分判定部と、
前記メモリアクセスコマンドで指定されるアドレス値の上位所定桁に基づいて、アクセス先となる前記ROMおよびRAMのいずれかをアクティブにするためのメモリセレクト信号を出力するメモリエリアデコード部とを有し、
前記入出力ポートアクセスコマンドに応じて稼働すべき対象を指定する入出力ポートリクエスト信号は、前記CPUから前記エリア区分判定部に入力されており、
前記メモリアクセスコマンドに応じて稼働すべき対象を指定するメモリリクエスト信号は、前記CPUから前記メモリエリアデコード部に入力されており、
前記RAMの先頭アドレスから連続する所定範囲は、前記CPUが前記ROMに格納されているコンピュータプログラムに基づく制御処理を実行する際に使用する情報を格納しておくためのワークに割り当てられており、
前記RAMのうち前記ワークを除く領域には、前記CPUが前記コンピュータプログラムを実行する際に一時的にデータを格納しておくための可変サイズのスタックが、前記ワークと干渉しないように割り当てられており、
前記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 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 predetermined range continuous from the head address of the RAM is assigned to a work for storing information used when the CPU executes control processing based on a computer program stored in the ROM,
A variable-size stack for temporarily storing data when the CPU executes the computer program is allocated to an area excluding the work in the RAM so as not to interfere with the work. And
A gaming machine in which a pseudo-RAM area accessible through the area classification determination unit in the RAM is set on the side having an address smaller than the stack so as to avoid at least a part of the stack.
請求項1記載の遊技機であって、
前記スタックは、データを格納するたびに、アドレスが小さくなる側に領域が拡張するよう構成されており、
前記スタックは、前記RAMの終端アドレスを開始点として設定されている遊技機。
A gaming machine according to claim 1,
The stack is configured such that each time data is stored, the area expands to the side where the address becomes smaller,
A gaming machine in which the stack is set with the end address of the RAM as a starting point.
請求項1または2記載の遊技機であって、
前記疑似RAM領域は、前記RAMの先頭アドレスを含む連続領域である遊技機。
A gaming machine according to claim 1 or 2,
A gaming machine in which the pseudo-RAM area is a continuous area including a head address of the RAM.
JP2012216148A 2012-09-28 2012-09-28 Game machine Expired - Fee Related JP5463401B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012216148A JP5463401B2 (en) 2012-09-28 2012-09-28 Game machine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012216148A JP5463401B2 (en) 2012-09-28 2012-09-28 Game machine

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2007325096A Division JP5120932B2 (en) 2007-12-17 2007-12-17 Game machine

Publications (3)

Publication Number Publication Date
JP2012250132A true JP2012250132A (en) 2012-12-20
JP2012250132A5 JP2012250132A5 (en) 2013-02-28
JP5463401B2 JP5463401B2 (en) 2014-04-09

Family

ID=47523479

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012216148A Expired - Fee Related JP5463401B2 (en) 2012-09-28 2012-09-28 Game machine

Country Status (1)

Country Link
JP (1) JP5463401B2 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016047435A (en) * 2015-12-10 2016-04-07 株式会社三共 Game machine
JP2016096959A (en) * 2014-11-20 2016-05-30 株式会社三共 Game machine
JP2016209189A (en) * 2015-05-01 2016-12-15 株式会社三共 Game machine
JP2017143852A (en) * 2016-02-15 2017-08-24 株式会社三共 Game machine
JP2021102159A (en) * 2019-06-10 2021-07-15 株式会社三洋物産 Game machine

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002200234A (en) * 2001-01-09 2002-07-16 Sankyo Kk Game machine
JP2004229938A (en) * 2003-01-30 2004-08-19 Sankyo Kk Game machine
JP2007050189A (en) * 2005-08-19 2007-03-01 Daiichi Shokai Co Ltd Game machine

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002200234A (en) * 2001-01-09 2002-07-16 Sankyo Kk Game machine
JP2004229938A (en) * 2003-01-30 2004-08-19 Sankyo Kk Game machine
JP2007050189A (en) * 2005-08-19 2007-03-01 Daiichi Shokai Co Ltd Game machine

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016096959A (en) * 2014-11-20 2016-05-30 株式会社三共 Game machine
JP2016209189A (en) * 2015-05-01 2016-12-15 株式会社三共 Game machine
JP2016047435A (en) * 2015-12-10 2016-04-07 株式会社三共 Game machine
JP2017143852A (en) * 2016-02-15 2017-08-24 株式会社三共 Game machine
JP2021102159A (en) * 2019-06-10 2021-07-15 株式会社三洋物産 Game machine
JP7120377B2 (en) 2019-06-10 2022-08-17 株式会社三洋物産 game machine

Also Published As

Publication number Publication date
JP5463401B2 (en) 2014-04-09

Similar Documents

Publication Publication Date Title
JP5463400B2 (en) Game machine
JP5120932B2 (en) Game machine
JP5120931B2 (en) Game machine
JP5463401B2 (en) Game machine
JP5991760B2 (en) Pachinko machine
JP2016179292A (en) Pachinko game machine
JP6371956B1 (en) Game machine
JP2009165581A (en) Development support method of control program for game machine
JP2015084830A (en) Pachinko game machine
JP5589174B2 (en) Game machine
JP6349528B1 (en) Game machine
JP5589173B2 (en) Game machine
JP2015051195A (en) Pachinko game machine
JP6184893B2 (en) Pachinko machine
JP5975539B2 (en) Pachinko machine
JP6200770B2 (en) Pachinko machine
JP6226040B2 (en) Pachinko machine
JP6252286B2 (en) Pachinko machine
JP6200772B2 (en) Pachinko machine
JP6200769B2 (en) Pachinko machine
JP6200771B2 (en) Pachinko machine
JP6200775B2 (en) Pachinko machine
JP6200774B2 (en) Pachinko machine
JP6200773B2 (en) Pachinko machine
JP6200776B2 (en) Pachinko machine

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20121029

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20121217

RD03 Notification of appointment of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7423

Effective date: 20121217

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A821

Effective date: 20121218

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140120

R150 Certificate of patent or registration of utility model

Ref document number: 5463401

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees