JP2017194769A - Device storing information on work ram in non-volatile memory - Google Patents

Device storing information on work ram in non-volatile memory Download PDF

Info

Publication number
JP2017194769A
JP2017194769A JP2016083339A JP2016083339A JP2017194769A JP 2017194769 A JP2017194769 A JP 2017194769A JP 2016083339 A JP2016083339 A JP 2016083339A JP 2016083339 A JP2016083339 A JP 2016083339A JP 2017194769 A JP2017194769 A JP 2017194769A
Authority
JP
Japan
Prior art keywords
backup
mode
program
processor core
gaming machine
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.)
Pending
Application number
JP2016083339A
Other languages
Japanese (ja)
Inventor
勇輔 見沢
Yusuke Misawa
勇輔 見沢
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.)
LETech Co Ltd
Original Assignee
LETech 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 LETech Co Ltd filed Critical LETech Co Ltd
Priority to JP2016083339A priority Critical patent/JP2017194769A/en
Publication of JP2017194769A publication Critical patent/JP2017194769A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Pinball Game Machines (AREA)
  • Retry When Errors Occur (AREA)

Abstract

PROBLEM TO BE SOLVED: To maintain, when supply of power to a work RAM is blocked, the details of the work RAM in a minimum preliminary power supply ensuring a chip operation of performing back-up processing and a circuit device related thereto.SOLUTION: There is provided a processor for a game machine, a chip, and a device related thereto, the processor provided with a non-volatile memory and transmitting the details of the work RAM to the non-volatile memory when supply of power to the work RAM is blocked.SELECTED DRAWING: Figure 2

Description

本発明は、ワークRAMの情報を不揮発性メモリに保存する装置に関する。   The present invention relates to an apparatus for storing work RAM information in a nonvolatile memory.

従来、パチンコ機や、回胴式遊技機とも称されるパチスロ機などで用いられる遊技機用プロセッサ、チップ、基板及びそれに関する装置において、ワークRAM(メインメモリとも称される)として、揮発性のRAMが用いられてきた。   Conventionally, in a processor for a gaming machine, a chip, a substrate, and a device related thereto used in a pachinko machine or a pachislot machine also called a swivel type gaming machine, as a work RAM (also called a main memory), a volatile RAM has been used.

遊技機において、瞬間的に電源から電力が供給されない電源断が発生したときに、ワークRAMの内容が失われることなく、維持されることが望まれてきた。従来、電源断の時にワークRAMの内容を維持するために、予備電源が用いられてきた。主電源が電源断となったときに、予備電源がワークRAMに電力を供給することによって、ワークRAMの内容を維持することができた。   In a gaming machine, it has been desired that the contents of the work RAM be maintained without being lost when a power interruption occurs in which no power is instantaneously supplied from the power supply. Conventionally, a standby power supply has been used to maintain the contents of the work RAM when the power is cut off. The contents of the work RAM could be maintained by supplying power to the work RAM when the main power was cut off.

しかしながら、ワークRAMが消費する電力量が予備電源の電源容量を超えた場合、電力の供給が滞るため、ワークRAMの内容が失われることとなる。そのため、予備電源の電源容量としてスーパーキャパシタ等の容量の大きく比較的高価なものが使われていた。また、遊技機用プロセッサ、チップ、基板及びそれに関する装置において、予備電源及びそれに関する回路装置が必須である構成が必要とされていた。   However, if the amount of power consumed by the work RAM exceeds the power supply capacity of the standby power supply, the supply of power is delayed, and the contents of the work RAM are lost. For this reason, a power supply capacity of a standby power supply having a large capacity, such as a supercapacitor, has been used. In addition, in a processor for a gaming machine, a chip, a substrate, and a device related thereto, a configuration in which a standby power supply and a circuit device related thereto are essential is required.

ワークRAMへの電源供給が絶たれた際に、バックアップ処理を行うチップ動作を保証する最小限の予備電源及びそれに関する回路装置でワークRAMの内容を維持する。   When the power supply to the work RAM is cut off, the contents of the work RAM are maintained by a minimum standby power supply that guarantees the chip operation for performing the backup process and a circuit device related thereto.

本発明の実施例による遊技機用装置は、バックアップ処理部と、メインメモリとして用いられる揮発性RAMと、揮発性RAMの内容の一部又は全部をバックアップとして記憶する不揮発性メモリと、遊技機用装置のセキュリティに関する処理を少なくとも行うモードであるセキュリティモードで動作する第1のプログラムと、遊技機の抽選及び/又は演出を少なくとも行うモードであるユーザモードで動作する第2のプログラムと、を少なくとも記憶しているROMと、遊技機用装置における電源の供給が断絶されたことを検出する電断検出回路とを備え、電断検出回路が電源供給の断絶を検出したことに応じて、バックアップ処理部は、第1のプログラムの命令又は前記第2のプログラムの命令に基づいて、揮発性RAMの内容の一部又は全部を不揮発性メモリに保存し、バックアップ処理部は、遊技機用装置に電源の供給が行われると、第1のプログラムの命令に基づいて動作し、モードがセキュリティモードからユーザモードに移行した後、ユーザプログラムの命令に基づいて動作することができる。   A gaming machine apparatus according to an embodiment of the present invention includes a backup processing unit, a volatile RAM used as a main memory, a non-volatile memory that stores part or all of the contents of the volatile RAM as a backup, and a gaming machine At least a first program that operates in a security mode that is a mode that performs at least processing related to the security of the device, and a second program that operates in a user mode that is a mode that performs at least lottery and / or presentation of gaming machines are stored. And a power failure detection circuit that detects that power supply in the gaming machine device has been interrupted, and the backup processing unit detects that the power failure detection circuit has detected power supply interruption. Based on the first program instruction or the second program instruction, a part or all of the contents of the volatile RAM is nonvolatile. When the power is supplied to the gaming machine device, the backup processing unit operates based on the instruction of the first program, and after the mode shifts from the security mode to the user mode, the user program Can operate based on instructions.

遊技機用プロセッサ、チップ及びそれに関する装置において、不揮発性メモリを設け、ワークRAMへの電源供給が絶たれた際に、ワークRAMの内容を不揮発性メモリに転送する。   In a processor for a gaming machine, a chip, and a device related thereto, a nonvolatile memory is provided, and when the power supply to the work RAM is cut off, the contents of the work RAM are transferred to the nonvolatile memory.

従来の遊技機用基板を示す。The conventional board | substrate for game machines is shown. 本発明の実施例による遊技機用基板を示す。1 shows a gaming machine substrate according to an embodiment of the present invention. プロセッサコアによる、ユーザプログラムの命令に基づく、RAMの情報のバックアップの実行、及び、バックアップされた情報のRAMへのロードの実行を示すフロー図である。It is a flowchart which shows execution of backup of the information of RAM based on the instruction | indication of a user program by a processor core, and execution of loading to RAM of backed up information. プロセッサコア及び専用ロジック回路による、ユーザプログラムの命令に基づく、RAMの情報のバックアップの実行、及び、バックアップされた情報のRAMへのロードの実行を示すフロー図である。It is a flowchart which shows execution of backup of the information of RAM based on the instruction | indication of a user program by a processor core and a dedicated logic circuit, and execution of the load to RAM of backed up information. プロセッサコアによる、ブートプログラムなどのセキュリティモードで動作するプログラムの命令に基づく、RAMの情報のバックアップの実行、及び、バックアップされた情報のRAMへのロードの実行を示すフロー図である。It is a flowchart which shows execution of backup of the information of RAM based on the instruction | indication of the program which operate | moves in security modes, such as a boot program, and loading of the backed-up information to RAM by a processor core. プロセッサコア及び専用ロジック回路による、ブートプログラムなどのセキュリティモードで動作するプログラムの命令に基づく、RAMの情報のバックアップの実行、及び、バックアップされた情報のRAMへのロードの実行を示すフロー図である。It is a flowchart which shows execution of backup of the information of RAM based on the instruction | indication of the program which operate | moves in security modes, such as a boot program, and loading of the backed-up information to RAM by a processor core and a dedicated logic circuit . プロセッサコアによる、バックアップモードで動作するプログラムの命令に基づく、RAMの情報のバックアップの実行を示すフロー図である。It is a flowchart which shows execution of the backup of the information of RAM based on the command of the program which operate | moves in backup mode by a processor core. プロセッサコア及び専用ロジック回路による、バックアップモードで動作するプログラムの命令に基づく、RAMの情報のバックアップの実行を示すフロー図である。It is a flowchart which shows execution of backup of the information of RAM based on the command of the program which operate | moves in backup mode by a processor core and a dedicated logic circuit. 専用ロジック回路による、バックアップモードで動作する専用ロジックの処理シーケンスに基づく、RAMの情報のバックアップの実行を示すフロー図である。It is a flowchart which shows execution of the backup of the information of RAM based on the processing sequence of the dedicated logic which operate | moves in backup mode by a dedicated logic circuit.

従来技術
図1は、従来の遊技機用基板を示す。基板100は、チップ105及び主電源135を有する。チップ105は、プロセッサコア110、周辺回路115、ROM120、RAM125、モード制御回路127及び電源切替回路130を有する。電源切替回路130は、電断検出回路137を有する。プロセッサコア110、周辺回路115、ROM120、RAM125、モード制御回路127それぞれは、バスを介して接続されている。電源切替回路130は、RAM125に接続されている。
Prior Art FIG. 1 shows a conventional gaming machine substrate. The substrate 100 has a chip 105 and a main power supply 135. The chip 105 includes a processor core 110, a peripheral circuit 115, a ROM 120, a RAM 125, a mode control circuit 127, and a power supply switching circuit 130. The power supply switching circuit 130 includes a power interruption detection circuit 137. The processor core 110, the peripheral circuit 115, the ROM 120, the RAM 125, and the mode control circuit 127 are connected via a bus. The power supply switching circuit 130 is connected to the RAM 125.

主電源135は、電源切替回路130に接続されている。主電源135は、チップ105に電源を供給し、さらに、ダイオード140を介してキャパシタ145に接続されている。電断検出回路137は、電力の供給を主電源供給ライン160から得る。主電源135が電力の供給を中止(電源断)したとき、電断検出回路137は、主電源供給ライン160の電圧レベルを監視することによって、電源断を検出することができる。   The main power supply 135 is connected to the power supply switching circuit 130. The main power supply 135 supplies power to the chip 105 and is further connected to the capacitor 145 through the diode 140. The power interruption detection circuit 137 obtains power supply from the main power supply line 160. When the main power supply 135 stops supplying power (power is cut off), the power cut detection circuit 137 can detect the power cut by monitoring the voltage level of the main power supply line 160.

主電源135が電力を供給しているとき、キャパシタ145が帯電し、電荷が蓄えられる。これにより、キャパシタ145は、蓄えられた電荷を用いることによって、予備電源として動作する。主電源135が電力の供給を中止(電源断)し、電断検出回路137が電源断を検出したとき、電源切替回路130は、電力の供給ラインを主電源供給ライン160からバックアップ電源供給ライン165に切り替える。これにより、主電源135に電源断が発生しても、キャパシタ145からRAM125に電力が供給され、RAM125に電力が供給されることから、RAM125の内容は維持される。   When the main power supply 135 supplies power, the capacitor 145 is charged and charges are stored. Thereby, the capacitor 145 operates as a standby power supply by using the stored charge. When the main power supply 135 stops supplying power (power is cut off) and the power interruption detection circuit 137 detects power supply cut-off, the power supply switching circuit 130 changes the power supply line from the main power supply line 160 to the backup power supply line 165. Switch to. As a result, even if the main power supply 135 is disconnected, power is supplied from the capacitor 145 to the RAM 125 and power is supplied to the RAM 125, so that the contents of the RAM 125 are maintained.

一方で、予備電源であるキャパシタ145に蓄えられている電荷量には限りがある。RAM125が消費する電力量がキャパシタ145に蓄えられている電荷量に基づく電力量を超えた場合、電力の供給が滞るため、RAM125の内容が失われることとなる。   On the other hand, there is a limit to the amount of charge stored in the capacitor 145 that is a standby power supply. When the amount of power consumed by the RAM 125 exceeds the amount of power based on the amount of charge stored in the capacitor 145, the supply of power is delayed and the contents of the RAM 125 are lost.

本発明による実施例(構成及び代表実施事例)
図2は、本発明の実施例による遊技機用基板を示す。本発明の基板200は、チップ205及び主電源235を有する。チップ205は、従来技術のチップ105と同様に、プロセッサコア210、周辺回路215、ROM220、揮発性のメモリであるRAM225、電断検出回路237、ダイオード260及びキャパシタ262を有する。一実施例において、電源断検出回路237、ダイオード260及びキャパシタ262は、チップ205の外の基板又は基板外部の電源装置に配置されていてもよい。本発明のチップ205は、さらに、不揮発性メモリ230、割り込みリセット回路240、モード制御回路245、専用ロジック回路250を有する。プロセッサコア210、周辺回路215、ROM220、RAM225、電断検出回路237、不揮発性メモリ230、割り込みリセット回路240、モード制御回路245、専用ロジック回路250それぞれは、バスを介して接続されている。RAM225は、ワークRAM(メインメモリとも称される)として用いられる。ROM220は、ブートプログラム及びユーザプログラムを少なくとも記憶している。チップ205は、リセット後セキュリティモードで動作を開始し、プロセッサコア210の初期動作処理などを行うと共にチップ205のセキュリティが確立しているかをプロセッサコア210によって確認するブートプログラムを実行する。プロセッサコア210がチップ205のセキュリティが確立していることを確認すると、チップのモードはセキュリティモードからユーザモードに切り替わり、実行されるプログラムは、ブートプログラムからユーザプログラムに切り替わる。ユーザプログラムは、遊技機における抽選や、演出などを制御するプログラムである。
Examples according to the present invention (configuration and representative implementation examples)
FIG. 2 shows a gaming machine substrate according to an embodiment of the present invention. The substrate 200 of the present invention includes a chip 205 and a main power source 235. The chip 205 includes a processor core 210, a peripheral circuit 215, a ROM 220, a volatile memory RAM 225, a power interruption detection circuit 237, a diode 260, and a capacitor 262, similar to the chip 105 of the prior art. In one embodiment, the power interruption detection circuit 237, the diode 260, and the capacitor 262 may be disposed on a substrate outside the chip 205 or a power supply device outside the substrate. The chip 205 of the present invention further includes a nonvolatile memory 230, an interrupt reset circuit 240, a mode control circuit 245, and a dedicated logic circuit 250. The processor core 210, peripheral circuit 215, ROM 220, RAM 225, power interruption detection circuit 237, nonvolatile memory 230, interrupt reset circuit 240, mode control circuit 245, and dedicated logic circuit 250 are connected via a bus. The RAM 225 is used as a work RAM (also called main memory). The ROM 220 stores at least a boot program and a user program. The chip 205 starts to operate in the security mode after reset, performs an initial operation process of the processor core 210, and executes a boot program for confirming by the processor core 210 whether the security of the chip 205 is established. When the processor core 210 confirms that the security of the chip 205 is established, the mode of the chip is switched from the security mode to the user mode, and the program to be executed is switched from the boot program to the user program. The user program is a program for controlling a lottery or presentation in a gaming machine.

プロセッサコア210は、RAM225に保存されている内容を不揮発性メモリ230に転送することができる。周辺回路215は、チップ205に関連する周辺回路であり、プロセッサコア210などから命令を受信し、様々な処理を実行する。一実施例において、周辺回路215は、インタフェースであってもよく、当該インタフェースは、チップ205及び/又は基板200の周辺の回路である一又は二以上の周辺回路に命令やデータを送信し、及び/又は、一又は二以上の周辺回路から命令やデータを受信する。   The processor core 210 can transfer the content stored in the RAM 225 to the nonvolatile memory 230. The peripheral circuit 215 is a peripheral circuit related to the chip 205, and receives instructions from the processor core 210 and executes various processes. In one embodiment, the peripheral circuit 215 may be an interface that sends instructions or data to one or more peripheral circuits that are peripheral circuits of the chip 205 and / or the substrate 200, and Or, commands and data are received from one or more peripheral circuits.

電断検出回路237は、電力の供給ラインの電圧レベルを監視することによって、主電源235からの電力供給が断たれたことを検出し、電力供給が断たれたことを割込みリセット回路240に通知する。割込みリセット回路240は、通知を受けると、プロセッサコア210が割り込み処理を開始するように割り込み信号をプロセッサコア210に送信する。   The power interruption detection circuit 237 detects the power supply from the main power supply 235 by monitoring the voltage level of the power supply line, and notifies the interrupt reset circuit 240 that the power supply has been cut off. To do. When receiving the notification, the interrupt reset circuit 240 transmits an interrupt signal to the processor core 210 so that the processor core 210 starts interrupt processing.

モード制御回路245は、チップ205の動作している所定のモードを制御する回路であり、セキュリティモード、ユーザモード、バックアップモード等のチップモードを決定し、チップ205の動作を決定する。セキュリティモードは、チップ205の初期設定を行い、ユーザプログラムのセキュリティチェックを行うモードである。ユーザモードは、ユーザプログラムの実行を行うモードである。バックアップモードは、RAM225に記憶されている情報を不揮発性メモリ230にバックアップを行うモードである。詳細については後述するが、バックアップモードにおいて、バックアップに必要な回路や装置のみに電力が供給される。一実施例において、バックアップモードを用いることなく、バックアップの処理が行われてもよい。   The mode control circuit 245 is a circuit that controls a predetermined mode in which the chip 205 is operating, determines a chip mode such as a security mode, a user mode, and a backup mode, and determines the operation of the chip 205. The security mode is a mode for performing an initial setting of the chip 205 and performing a security check of the user program. The user mode is a mode for executing a user program. The backup mode is a mode in which information stored in the RAM 225 is backed up to the nonvolatile memory 230. Although details will be described later, in the backup mode, power is supplied only to circuits and devices necessary for backup. In one embodiment, the backup process may be performed without using the backup mode.

不揮発性メモリ230は、主電源235からの電力供給が断たれている間、RAM225に保存されていた内容の一部又は全部をバックアップとして保存する。専用ロジック回路250は、プロセッサコア210からの命令にしたがって起動し、RAM225に保存されている内容を、プロセッサコア210を介さず不揮発性メモリ230に転送することができる。したがって、RAM225から不揮発性メモリ230へのバックアップ処理は、プロセッサコア210又は専用ロジック回路250が行うことができる。   The nonvolatile memory 230 stores part or all of the contents stored in the RAM 225 as a backup while the power supply from the main power supply 235 is cut off. The dedicated logic circuit 250 is activated in accordance with an instruction from the processor core 210 and can transfer the content stored in the RAM 225 to the nonvolatile memory 230 without going through the processor core 210. Therefore, the backup processing from the RAM 225 to the nonvolatile memory 230 can be performed by the processor core 210 or the dedicated logic circuit 250.

したがって、本実施例における遊技機において、電断検出回路237は、主電源からの電力供給が断たれたことを電圧の低下により検出すると、検出したことを割り込みリセット回路240に通知する。割り込みリセット回路240は、プロセッサコア210に割り込み信号を送信する。プロセッサコア210は、割り込み信号を受信したことに応じて、RAM225の内容を不揮発性メモリ230にバックアップするバックアップ処理の命令を実行する。一実施例において、プロセッサコア210は、バックアップ処理の命令を専用ロジック回路250に送信し、専用ロジック回路250が命令を受信したことに応じて、当該専用ロジック回路250によってバックアップ処理を実行してもよい。これらの実施例において、当業者であれば理解されるように、プロセッサコア210がプログラムによりバックアップ処理を実行する場合、チップ205は、専用ロジック回路250を有していなくてもよい。   Therefore, in the gaming machine according to the present embodiment, when the power interruption detection circuit 237 detects that the power supply from the main power supply has been cut off due to a voltage drop, the power interruption detection circuit 237 notifies the interruption reset circuit 240 of the detection. The interrupt reset circuit 240 transmits an interrupt signal to the processor core 210. In response to receiving the interrupt signal, the processor core 210 executes a backup processing instruction for backing up the contents of the RAM 225 to the nonvolatile memory 230. In one embodiment, the processor core 210 may transmit a backup process command to the dedicated logic circuit 250, and the dedicated logic circuit 250 may execute the backup process in response to receiving the command. Good. In these embodiments, as will be understood by those skilled in the art, the chip 205 may not have the dedicated logic circuit 250 when the processor core 210 performs backup processing by a program.

他の実施例において、プロセッサコア210又は専用ロジック回路250は、RAM225の内容をバックアップするときに、バックアップ対象のデータとともに、当該データから計算される値である計算値を不揮発性メモリ230に保存してもよい。これにより、後の工程で、不揮発性メモリ230に保存されたバックアップ対象のデータを計算して得た値と不揮発性メモリ230に保存された計算値とを比較することによって、不揮発性メモリ230に保存された情報が破壊されていないことを保証することができる。計算は、サム値、ハッシュ値、ビット演算など考え得る様々な計算方式を用いることができる。   In another embodiment, when the processor core 210 or the dedicated logic circuit 250 backs up the contents of the RAM 225, the processor core 210 or the dedicated logic circuit 250 stores a calculated value that is a value calculated from the data in the nonvolatile memory 230 together with the data to be backed up. May be. Thus, in a later step, the value obtained by calculating the data to be backed up stored in the nonvolatile memory 230 is compared with the calculated value stored in the nonvolatile memory 230. It can be ensured that the stored information is not destroyed. For the calculation, various conceivable calculation methods such as a sum value, a hash value, and a bit operation can be used.

一実施例において、チップ205は、それ自体がプロセッサであってもよい。一実施例において、チップ205は、ワンチップで実現されてもよい。この場合、チップ205は、ワンチップマイコンとも呼ばれる。   In one embodiment, chip 205 may itself be a processor. In one embodiment, the chip 205 may be implemented as a single chip. In this case, the chip 205 is also called a one-chip microcomputer.

以下において、セキュリティモード又はユーザモードにおけるバックアップ処理を説明する。ここで、遊技機において、チップ205が動作するモードは、少なくとも2つ存在する。第1は、セキュリティモードであり、第2は、ユーザモードである。セキュリティモードに関し、遊技機又は基板200において、電源断の発生や、パワーオンリセット、システムリセットなどが行われると、チップ205は、チップ205の初期化を行い、セキュリティが確立できているか否かをユーザROM220のユーザプログラムの合理性をチェックし確認する。ユーザプログラムの合理性のチェックは、予めユーザプログラムなどを計算して格納してあるセキュリティコード(チェックサム、ハッシュ値等)を用いて行われるチェックであって、合理性は、ユーザプログラムなどを再計算し、再計算した値とセキュリティコードとの比較等でチェックされる。セキュリティが確立できている場合、遊技機又は基板200は、ユーザモードとなり、遊技機の制御をユーザプログラムによって開始することができる。ユーザプログラムは、遊技機の抽選や演出などの制御を行う。   Hereinafter, backup processing in the security mode or the user mode will be described. Here, in the gaming machine, there are at least two modes in which the chip 205 operates. The first is a security mode, and the second is a user mode. Regarding the security mode, when a power interruption, power-on reset, system reset, or the like is performed in the gaming machine or the board 200, the chip 205 initializes the chip 205 and determines whether security has been established. The rationality of the user program in the user ROM 220 is checked and confirmed. The rationality check of a user program is a check that is performed using a security code (checksum, hash value, etc.) that has been calculated and stored in advance. It is calculated and checked by comparing the recalculated value with the security code. When the security is established, the gaming machine or the board 200 is in the user mode, and control of the gaming machine can be started by the user program. The user program controls the lottery and production of gaming machines.

セキュリティモードとは、チップの初期化やユーザROMのセキュリティチェックを行うブートプログラムを実行するモードであり、ユーザモードとは、ユーザプログラムの実行を行うモードである。各モードではROM、RAMのプロセッサに対するマッピングアドレスが異なり動作する回路も各モードで動作条件が異なる。セキュリティモードでは、ユーザROMはデータ領域のアドレスにマッピングされデータとして扱われるが、ユーザモードでは、ユーザROMはユーザプログラムとしてプロセッサのアドレスにマッピングされ実行される。   The security mode is a mode for executing a boot program for performing chip initialization and user ROM security check, and the user mode is a mode for executing a user program. In each mode, a circuit that operates with different mapping addresses for the ROM and RAM processors has different operating conditions in each mode. In the security mode, the user ROM is mapped to an address in the data area and handled as data. In the user mode, the user ROM is mapped to a processor address as a user program and executed.

実施例1(プロセッサによるユーザプログラム制御)
図3は、プロセッサコアによる、ユーザプログラムの命令に基づく、RAMの情報のバックアップの実行、及び、バックアップされた情報のRAMへのロードの実行を示すフロー図である。まず、電断検出回路237は、主電源235が電力の供給を断ったこと(電断)を検出し、割り込みリセット回路240に検出したことを通知し、割り込みリセット回路240は、電断による割り込み信号をプロセッサコア210に送信し、プロセッサコア210は、割り込み信号を受け付ける(ステップ302)。プロセッサコア210は、バックアップ処理を実行するか否かを判定する(ステップ304)。この判定は、例えば、ユーザプログラムのユーザ定義エリアに設定された値のフラグがオン又はオフであるかを判定する。例えば、フラグがオンの場合、プロセッサコア210は、バックアップ処理を実行すると判断する。他の実施例において、ユーザプログラムの命令にバックアップ処理を実行するか否かが定義されており、プロセッサ210が、この定義を判断してもよい。上記ユーザ定義エリアは、ユーザプログラムとは別にユーザ定義やセキュリティコードを書き込むために用意されたプログラム管理エリアであっても良い。
Example 1 (User program control by processor)
FIG. 3 is a flowchart showing execution of backup of RAM information and loading of backed-up information into the RAM based on instructions of the user program by the processor core. First, the power interruption detection circuit 237 detects that the main power supply 235 has stopped supplying power (power interruption), and notifies the interrupt reset circuit 240 that the power supply has been detected. The signal is transmitted to the processor core 210, and the processor core 210 receives the interrupt signal (step 302). The processor core 210 determines whether or not to execute backup processing (step 304). In this determination, for example, it is determined whether the flag of the value set in the user definition area of the user program is on or off. For example, when the flag is on, the processor core 210 determines to execute the backup process. In another embodiment, whether or not to execute a backup process is defined in a user program instruction, and the processor 210 may determine this definition. The user definition area may be a program management area prepared for writing a user definition and a security code separately from the user program.

ステップ304において、バックアップ処理を実行すると判断された場合、プロセッサコア210は、ROMに記憶されているユーザプログラムの命令に基づいて、バックアップ処理を実行する。まず、プロセッサコア210は、RAM225の情報の一部又は全部を不揮発性メモリ230に保存する(ステップ306)。   If it is determined in step 304 that the backup process is to be executed, the processor core 210 executes the backup process based on the instruction of the user program stored in the ROM. First, the processor core 210 stores part or all of the information in the RAM 225 in the nonvolatile memory 230 (step 306).

プロセッサコア210は、RAM225の情報の一部又は全部に基づいて、計算を行い、計算値を得るとともに不揮発性メモリ230に保存する(ステップ308)。これにより、不揮発性メモリ230は、RAM225の情報の一部又は全部とともに、計算値を記憶する。計算値は、RAM225の情報の一部又は全部を足し算することによって得られるチェックサム値や、RAM225の情報の一部又は全部をハッシュ計算によって得られる値、RAM225の情報の一部又は全部のビット表現の論理演算によって得られる値などとすることができ、当業者が理解可能な他の様々な方式で得られる値であってもよい。ステップ308では、説明を理解しやすいようにする目的で、計算は、チェックサムとして記載している。プロセッサコア210は、バックアップ処理を終了し、動作を休止する(ステップ310)。一実施例において、動作の休止は、電源供給がなされないことによって、実現されてもよい。   The processor core 210 performs a calculation based on part or all of the information in the RAM 225, obtains a calculated value, and stores it in the nonvolatile memory 230 (step 308). Thereby, the nonvolatile memory 230 stores the calculated value together with a part or all of the information in the RAM 225. The calculation value includes a checksum value obtained by adding a part or all of the information in the RAM 225, a value obtained by hash calculation for a part or all of the information in the RAM 225, and a part or all of the bits in the information in the RAM 225. It can be a value obtained by a logical operation of expression, and may be a value obtained by various other methods that can be understood by those skilled in the art. In step 308, the calculation is described as a checksum for the sake of easy understanding of the explanation. The processor core 210 ends the backup process and pauses the operation (step 310). In one embodiment, the suspension of operation may be realized by not supplying power.

ここで、電断が検出されてから(ステップ302)プロセッサコア210の動作が休止するまでの間、主電源235は、電力の供給を行わない。バックアップ処理は、キャパシタ262に蓄えられた電荷を用いて行われる。したがって、キャパシタ262に蓄えられるべき電荷量は、バックアップ処理を実行するのに必要な電力量に相当する量より多くする必要がある。   Here, the main power supply 235 does not supply power until the operation of the processor core 210 stops after the power interruption is detected (step 302). The backup process is performed using the charge stored in the capacitor 262. Therefore, the amount of charge to be stored in the capacitor 262 needs to be larger than the amount corresponding to the amount of power required to execute the backup process.

ステップ304において、バックアップ処理を実行しないと判断された場合、プロセッサコア210は、バックアップ処理を実行することなく、動作を休止する(ステップ310)。   When it is determined in step 304 that the backup process is not executed, the processor core 210 pauses the operation without executing the backup process (step 310).

主電源235が電源断から復帰又は一定時間の電源断から電源投入すると、プロセッサコア210は、セキュリティモードで動作する(ステップ312)。セキュリティモードにおいて、プロセッサコア210は、ROM220に記憶されているブートプログラムの命令に基づいて、セキュリティチェックなどを行う。チップ205及び/又はモード制御回路245は、モードをセキュリティモードからユーザモードに移行する(ステップ314)。ユーザモードにおいて、プロセッサコア210は、ROM220に記憶されているユーザプログラムを読み出し、ユーザプログラムに基づいてバックアップデータのロードに係る処理を実行する。   When the main power supply 235 returns from power-off or powers on after a certain time of power-off, the processor core 210 operates in the security mode (step 312). In the security mode, the processor core 210 performs a security check or the like based on a boot program instruction stored in the ROM 220. The chip 205 and / or the mode control circuit 245 shifts the mode from the security mode to the user mode (step 314). In the user mode, the processor core 210 reads a user program stored in the ROM 220 and executes a process related to loading backup data based on the user program.

プロセッサコア210は、バックアップデータのロード処理を実行するか否かを判定する(ステップ316)。この判定は、例えば、ユーザプログラムのユーザ定義エリアに設定された値のフラグがオン又はオフであるかを判定する。例えば、フラグがオンの場合、プロセッサコア210は、バックアップデータのロード処理を実行すると判断する。他の実施例において、ユーザプログラムの命令にバックアップ処理を実行するか否かが定義されており、プロセッサ210が、この定義を判断してもよい。   The processor core 210 determines whether or not to execute backup data load processing (step 316). In this determination, for example, it is determined whether the flag of the value set in the user definition area of the user program is on or off. For example, when the flag is on, the processor core 210 determines to execute the backup data loading process. In another embodiment, whether or not to execute a backup process is defined in a user program instruction, and the processor 210 may determine this definition.

ステップ316において、バックアップデータのロード処理を実行すると判断された場合、プロセッサコア210は、ROMに記憶されているユーザプログラムの命令に基づいて、バックアップデータのロード処理を実行する。まず、プロセッサコア210は、ステップ306において不揮発性メモリ230に保存したバックアップの情報をRAM225に転送(ロード)する(ステップ318)。プロセッサコア210は、バックアップの情報に基づいて、計算を行い(ステップ320)、この計算値と不揮発性メモリ230に記憶されている計算値とを比較する(ステップ322)。   If it is determined in step 316 that the backup data load process is to be executed, the processor core 210 executes the backup data load process based on the instruction of the user program stored in the ROM. First, the processor core 210 transfers (loads) the backup information stored in the nonvolatile memory 230 in step 306 to the RAM 225 (step 318). The processor core 210 performs calculation based on the backup information (step 320), and compares this calculated value with the calculated value stored in the nonvolatile memory 230 (step 322).

比較の結果が一致する場合(ステップ322)、プロセッサ210は、不揮発性メモリ230の情報をクリアする(ステップ324)。一実施例において、フラッシュメモリの場合は上書きができないので次回書込みのためにステップ324は省略できないが、他の実施例において上書きのできる不揮発性メモリではステップ324は省略することができる。他の実施例において、ステップ324は、ステップ322以外の他のステップの前又は後に行われてもよい。さらに他の実施例において、一度読み出したバックアップメモリの内容を再利用不可とする場合(例えば、電源断のバックアップを失敗し、前回値を使用したくないなどの場合)、不揮発性メモリ230の情報をクリアする代わりに、再利用不可の情報(フラグ、コード等)を書込み後に参照する仕組みとしても良い。   If the comparison results match (step 322), the processor 210 clears the information in the nonvolatile memory 230 (step 324). In one embodiment, the flash memory cannot be overwritten, so step 324 cannot be omitted for the next writing. However, in another embodiment, step 324 can be omitted in a non-volatile memory that can be overwritten. In other embodiments, step 324 may be performed before or after other steps other than step 322. In still another embodiment, when the contents of the backup memory once read are not reusable (for example, when backup of power failure fails and the previous value is not used), information in the nonvolatile memory 230 Instead of clearing, information that cannot be reused (flag, code, etc.) may be referred to after writing.

その後、RAM225へのデータのロードが完了し(ステップ326)、遊技機の通常の動作が行われる。本実施例において、ステップ302の割り込み処理時点のRAM225の情報がバックアップされていることから、バックアップデータのロードにより、割り込み処理時点のユーザプログラムの処理の続きが実行される。   Thereafter, loading of data to the RAM 225 is completed (step 326), and the normal operation of the gaming machine is performed. In this embodiment, since the information in the RAM 225 at the time of interrupt processing in step 302 is backed up, the continuation of the processing of the user program at the time of interrupt processing is executed by loading the backup data.

比較の結果が一致しない場合(ステップ322)、プロセッサ210は、ロードデータである不揮発性メモリ230に記憶されていた情報の組(バックアップデータと計算値)が不一致であることを、遊技機を管理する遊技機場のサーバや、インターネット上のサーバなどの管理コンピュータに通知する、又は、プロセッサコア210やチップ205の動作を停止してもよい(ステップ328)。又、他の実施例として、RAM255及び不揮発性メモリ230を初期化して遊技機を再起動しても良い。   If the comparison results do not match (step 322), the processor 210 manages the gaming machine that the set of information (the backup data and the calculated value) stored in the nonvolatile memory 230 that is the load data does not match. A management computer such as a server at a game machine or a server on the Internet may be notified, or the operation of the processor core 210 and the chip 205 may be stopped (step 328). As another example, the RAM 255 and the nonvolatile memory 230 may be initialized and the gaming machine may be restarted.

ステップ316において、バックアップデータのロード処理を実行しないと判断された場合、プロセッサコア210は、バックアップデータのロード処理を実行することなく、遊技機の通常の動作が行われる。(ステップ326)。   If it is determined in step 316 that the backup data load process is not to be executed, the processor core 210 performs the normal operation of the gaming machine without executing the backup data load process. (Step 326).

プロセッサコア210は、ステップ302〜310及び316〜328をROM220に記憶されているユーザプログラムに基づいて実行する。プロセッサコア210は、ステップ312及び314を、ROM220に記憶されているブートプログラムなどのセキュリティモードで動作するプログラムに基づいて実行する。   The processor core 210 executes steps 302 to 310 and 316 to 328 based on a user program stored in the ROM 220. The processor core 210 executes steps 312 and 314 based on a program operating in a security mode such as a boot program stored in the ROM 220.

本実施例において、バックアップに関する処理は、ユーザプログラムの命令に基づいて制御され、ユーザプログラムは、ユーザによって作成されることから、ユーザが自由にバックアッププログラムを実現することができる。   In the present embodiment, processing related to backup is controlled based on a command of the user program, and the user program is created by the user, so that the user can freely implement the backup program.

本実施例において、チップ205は、専用ロジック回路250を有していなくてもよい。   In this embodiment, the chip 205 may not have the dedicated logic circuit 250.

実施例2(プロセッサ及び専用ロジック回路によるユーザプログラム制御)
図4は、プロセッサコア及び専用ロジック回路による、ユーザプログラムの命令に基づく、RAMの情報のバックアップの実行、及び、バックアップされた情報のRAMへのロードの実行を示すフロー図である。ステップ402及びステップ404の動作それぞれは、図3で示したステップ302及びステップ304と同じである。
Example 2 (User program control by processor and dedicated logic circuit)
FIG. 4 is a flowchart showing execution of backup of RAM information and loading of backed-up information into the RAM based on instructions of the user program by the processor core and the dedicated logic circuit. The operations of Step 402 and Step 404 are the same as Step 302 and Step 304 shown in FIG.

プロセッサコア210は、専用ロジック回路250に命令し、バックアップ処理を実行させる(ステップ406)。専用ロジック回路250は、RAM225の情報の一部又は全部を不揮発性メモリ230に保存する(ステップ406)。   The processor core 210 instructs the dedicated logic circuit 250 to execute backup processing (step 406). The dedicated logic circuit 250 stores part or all of the information in the RAM 225 in the nonvolatile memory 230 (step 406).

専用ロジック回路250は、RAM225の情報の一部又は全部に基づいて、図3のステップ308で示した計算と同様の計算を行い、計算値を得るとともに不揮発性メモリ230に保存する(ステップ408)。これにより、不揮発性メモリ230は、RAM225の情報の一部又は全部とともに、計算値を記憶する。専用ロジック回路250は、バックアップ処理が完了したことをプロセッサコア210に通知する(ステップ410)。通知は、例えば、専用ロジック回路250が、バックアップ処理が完了したことを示すフラグを所定のレジスタなどに設定し、プロセッサコア210は、所定のレジスタなどのフラグがオン(又はオフ)となっていることを確認することによって、及び/又は、専用ロジック250がプロセッサコア210に割込みを発生することによって、バックアップ処理が完了したことを知ることができる。プロセッサコア210は、バックアップ処理終了の通知を受けたことに応じて、バックアップ処理を終了し、動作を休止する(ステップ412)。   The dedicated logic circuit 250 performs a calculation similar to the calculation shown in step 308 of FIG. 3 based on a part or all of the information in the RAM 225, obtains a calculated value, and stores it in the nonvolatile memory 230 (step 408). . Thereby, the nonvolatile memory 230 stores the calculated value together with a part or all of the information in the RAM 225. The dedicated logic circuit 250 notifies the processor core 210 that the backup process has been completed (step 410). In the notification, for example, the dedicated logic circuit 250 sets a flag indicating that the backup processing is completed in a predetermined register or the like, and the processor core 210 has a flag such as the predetermined register turned on (or off). By confirming this, and / or when the dedicated logic 250 generates an interrupt in the processor core 210, it can be known that the backup processing is completed. The processor core 210 ends the backup process and stops the operation in response to receiving the notification of the end of the backup process (step 412).

実施例2においても実施例1と同様に、電源断におけるバックアップ処理は、キャパシタ262に蓄えられた電荷を用いて行われる。ステップ404において、バックアップ処理を実行しないと判断された場合、プロセッサコア210は、バックアップ処理を実行することなく、動作を休止する(ステップ412)。   Also in the second embodiment, as in the first embodiment, the backup process when the power is turned off is performed using the charges stored in the capacitor 262. If it is determined in step 404 that the backup process is not executed, the processor core 210 pauses the operation without executing the backup process (step 412).

主電源235が電源断から復帰又は一定時間の電源断から電源投入すると、プロセッサコア210は、図3で示したステップ312と同様にセキュリティモードにおける処理を実行する(ステップ414)。チップ205及び/又はモード制御回路245は、モードをセキュリティモードからユーザモードに移行する(ステップ416)。ユーザモードにおいて、プロセッサコア210及び専用ロジック回路250は、ROM220に記憶されているユーザプログラムを読み出し、ユーザプログラムに基づいてバックアップデータのロードに係る処理を実行する。   When the main power supply 235 returns from power-off or turns on after a certain time of power-off, the processor core 210 executes processing in the security mode in the same manner as in step 312 shown in FIG. 3 (step 414). The chip 205 and / or the mode control circuit 245 shifts the mode from the security mode to the user mode (step 416). In the user mode, the processor core 210 and the dedicated logic circuit 250 read the user program stored in the ROM 220, and execute processing related to loading backup data based on the user program.

プロセッサコア210は、図3に示したステップ316と同様に、バックアップデータのロード処理を実行するか否かを判定する(ステップ418)。   Similar to step 316 shown in FIG. 3, the processor core 210 determines whether or not to execute backup data load processing (step 418).

ステップ418において、バックアップデータのロード処理を実行すると判断された場合、プロセッサコア210及び専用ロジック回路250は、ROMに記憶されているユーザプログラムの命令に基づいて、バックアップデータのロード処理を実行する。まずは、プロセッサコア210は、専用ロジック回路250に命令し、バックアップデータのロード処理を実行させる(ステップ420)。   If it is determined in step 418 that the backup data loading process is to be executed, the processor core 210 and the dedicated logic circuit 250 execute the backup data loading process based on the instruction of the user program stored in the ROM. First, the processor core 210 instructs the dedicated logic circuit 250 to execute a backup data load process (step 420).

専用ロジック回路250は、ステップ406において不揮発性メモリ220に保存したバックアップの情報をRAM225に転送(ロード)する(ステップ420)。専用ロジック回路250は、バックアップの情報に基づいて、計算を行い(ステップ422)、この計算値と不揮発性メモリ23に記憶されている計算値とを比較する(ステップ424)。   The dedicated logic circuit 250 transfers (loads) the backup information stored in the nonvolatile memory 220 in step 406 to the RAM 225 (step 420). The dedicated logic circuit 250 performs calculation based on the backup information (step 422), and compares the calculated value with the calculated value stored in the nonvolatile memory 23 (step 424).

比較の結果が一致する場合(ステップ424)、専用ロジック回路250は、不揮発性メモリ230の情報をクリアする(ステップ426)。ステップ426は、実施例1の図3におけるステップ324と同様に、省略や実行順序の移動が可能で情報のクリア処理や情報の再利用不可の処理が行われても良い。   If the comparison results match (step 424), the dedicated logic circuit 250 clears the information in the nonvolatile memory 230 (step 426). Step 426 may be omitted or moved in the order of execution, as in step 324 in FIG. 3 of the first embodiment, and information clear processing or information non-reuse processing may be performed.

専用ロジック回路250は、バックアップデータのロード処理が完了したことをプロセッサコア210に通知する(ステップ428)。通知は、例えば、専用ロジック回路250が、バックアップデータのロード処理が完了したことを示すフラグを所定のレジスタなどに設定し、プロセッサコア210は、所定のレジスタなどのフラグがオン(又はオフ)となっていることを確認することによって、及び/又は、専用ロジック250がプロセッサコア210に割込みを発生することによって、バックアップデータのロード処理が完了したことを知ることができる。プロセッサコア210は、バックアップ処理終了の通知を受けたことに応じて、RAM225へのデータのロードが完了し(ステップ430)、遊技機の通常の動作を実行する。その後、本実施例においても、実施例1と同様に、ステップ402の割り込み処理時点のRAM225の情報がバックアップされていることから、バックアップデータのロードにより、割り込み処理時点のユーザプログラムの処理の続きが実行される。   The dedicated logic circuit 250 notifies the processor core 210 that the backup data load processing has been completed (step 428). In the notification, for example, the dedicated logic circuit 250 sets a flag indicating that the load processing of the backup data is completed in a predetermined register or the like, and the processor core 210 determines that the flag such as the predetermined register is on (or off). It is possible to know that the backup data loading process has been completed by confirming that the processing is completed and / or by causing the dedicated logic 250 to generate an interrupt to the processor core 210. In response to the notification of the end of the backup process, the processor core 210 completes loading of data into the RAM 225 (step 430) and executes the normal operation of the gaming machine. Thereafter, in this embodiment as well, as in the first embodiment, the information in the RAM 225 at the time of interrupt processing in step 402 is backed up, so that the continuation of the processing of the user program at the time of interrupt processing is continued by loading backup data. Executed.

比較の結果が一致しない場合(ステップ424)、専用ロジック回路250は、レジスタにおけるフラグや他の方式を用いて、ロードデータである不揮発性メモリ230に記憶されていた情報の組(バックアップデータと計算値)が不一致であることをプロセッサ210に通知する(ステップ432)。プロセッサ210は、通知を受けたことに応じて、データが不一致であることを、遊技機を管理する遊技機場のサーバや、インターネット上のサーバなどの管理コンピュータに通知する、又は、プロセッサコア210やチップ205の動作を停止してもよい(ステップ432)。又、他の実施例として、RAM255及び不揮発性メモリ230を初期化して遊技機を再起動しても良い。   If the comparison results do not match (step 424), the dedicated logic circuit 250 uses a flag in the register or another method to set a set of information stored in the nonvolatile memory 230 as load data (calculation with backup data). The processor 210 is notified that the values are inconsistent (step 432). In response to receiving the notification, the processor 210 notifies a management computer such as a server at the gaming machine site that manages the gaming machine or a server on the Internet that the data does not match, or the processor core 210 or The operation of the chip 205 may be stopped (step 432). As another example, the RAM 255 and the nonvolatile memory 230 may be initialized and the gaming machine may be restarted.

ステップ418において、バックアップデータのロード処理を実行しないと判断された場合、プロセッサコア210は、バックアップデータのロード処理を実行することなく、遊技機の通常の動作が行われる。(ステップ430)。   When it is determined in step 418 that the backup data loading process is not to be executed, the processor core 210 performs the normal operation of the gaming machine without executing the backup data loading process. (Step 430).

プロセッサコア210及び/又は専用ロジック回路250は、ステップ402〜412及び418〜432をROM220に記憶されているユーザプログラムに基づいて実行する。プロセッサコア210は、ステップ414及び416を、ROM220に記憶されているブートプログラムなどのセキュリティモードで動作するプログラムに基づいて実行する。   The processor core 210 and / or the dedicated logic circuit 250 executes steps 402 to 412 and 418 to 432 based on a user program stored in the ROM 220. The processor core 210 executes steps 414 and 416 based on a program operating in a security mode such as a boot program stored in the ROM 220.

本実施例は、バックアップ及びバックアップデータのロードに関する主な処理(例えば、ステップ406〜410及びステップ420〜428)の実行主体がプロセッサコア210ではなく、専用ロジック回路250である点で、実施例1と異なる。回路250は、専用のハードウエアであるから、実施例1のように全ての処理をプロセッサコア210で実現するよりも処理を高速化させることができる。また、専用ハードウエアを用いることによって、プログラムの命令を削減することができる。遊技機において、ROM220においてユーザプログラムを記憶する容量は所定の容量に限定されていることから、バックアップに関するプログラムの命令を削減することによって、遊技機の抽選や演出などのために、ROM220の容量を有効活用することができる。したがって、実施例2は、このような技術的効果を奏している。   In this embodiment, the main processing (eg, steps 406 to 410 and steps 420 to 428) related to backup and backup data loading is not the processor core 210 but the dedicated logic circuit 250. And different. Since the circuit 250 is dedicated hardware, the processing can be performed faster than when all the processing is realized by the processor core 210 as in the first embodiment. Further, by using dedicated hardware, program instructions can be reduced. In a gaming machine, the capacity for storing a user program in the ROM 220 is limited to a predetermined capacity. Therefore, the capacity of the ROM 220 can be increased for lottery and production of gaming machines by reducing the number of commands related to the backup. It can be used effectively. Therefore, Example 2 has such a technical effect.

実施例3(プロセッサによるセキュリティモードにおける制御)
図5は、プロセッサコアによる、ブートプログラムなどのセキュリティモードで動作するプログラムの命令に基づく、RAMの情報のバックアップの実行、及び、バックアップされた情報のRAMへのロードの実行を示すフロー図である。まず、実施例1の図3で示したステップ302で説明した通り、主電源235が電力の供給を断ったこと(電断)を電断検出回路237が検出したことに応じて、プロセッサコア210は、電断によるリセット信号を割り込みリセット回路240から受け付ける(ステップ502)。チップ205は、電源断を検出したことに応じて、モードをユーザモードからセキュリティモードに移行する(ステップ504)。セキュリティモードにおいて、プロセッサコア210は、ROM220に記憶されているブートプログラムを読み出し、ブートプログラムに基づいてバックアップに係る処理を実行する。
Example 3 (Control in Security Mode by Processor)
FIG. 5 is a flowchart showing execution of backup of RAM information and loading of backed-up information into RAM based on instructions of a program operating in a security mode such as a boot program by the processor core. . First, as described in step 302 shown in FIG. 3 of the first embodiment, the processor core 210 responds to the fact that the power interruption detection circuit 237 detects that the main power supply 235 has stopped supplying power (power interruption). Accepts a reset signal due to power interruption from the interrupt reset circuit 240 (step 502). The chip 205 shifts the mode from the user mode to the security mode in response to detecting the power-off (step 504). In the security mode, the processor core 210 reads the boot program stored in the ROM 220, and executes processing related to backup based on the boot program.

ステップ506、508、510、512の動作それぞれは、図3で示したステップ304、306、308、310と同じである。ただし、実施例1では、プロセッサコア210がユーザプログラムの命令に基づいてステップ304〜310を実行するのに対して、実施例3では、プロセッサコア210がブートプログラムの命令に基づいてステップ506〜512を実行する。   The operations of steps 506, 508, 510, and 512 are the same as steps 304, 306, 308, and 310 shown in FIG. However, in the first embodiment, the processor core 210 executes steps 304 to 310 based on instructions of the user program, whereas in the third embodiment, the processor core 210 executes steps 506 to 512 based on instructions of the boot program. Execute.

実施例3においても実施例1と同様に、バックアップ処理は、キャパシタ262に蓄えられた電荷を用いて行われる。   Also in the third embodiment, as in the first embodiment, the backup process is performed using the electric charge stored in the capacitor 262.

主電源235が電源断から復帰又は一定時間の電源断から電源投入すると、プロセッサコア210は、セキュリティモードで動作する(ステップ514)。セキュリティモードにおいて、プロセッサコア210は、ROM220に記憶されているブートプログラムの命令に基づいて、セキュリティチェックなどを行う。セキュリティモードにおいて、プロセッサコア210は、ブートプログラムに基づいてバックアップデータのロードに係る処理を実行する。   When the main power source 235 returns from power-off or powers on after a certain time of power-off, the processor core 210 operates in the security mode (step 514). In the security mode, the processor core 210 performs a security check or the like based on a boot program instruction stored in the ROM 220. In the security mode, the processor core 210 executes processing related to loading backup data based on the boot program.

ステップ516、518、520、522、524、526、530の動作それぞれは、図3で示したステップ316、318、320、322、324、326、328と同じである。ただし、実施例1では、プロセッサコア210がユーザプログラムの命令に基づいてステップ316〜328を実行するのに対して、実施例3では、プロセッサコア210がブートプログラムの命令に基づいてステップ516〜526及び530を実行する。   The operations of steps 516, 518, 520, 522, 524, 526, and 530 are the same as those of steps 316, 318, 320, 322, 324, 326, and 328 shown in FIG. However, in the first embodiment, the processor core 210 executes steps 316 to 328 based on the instructions of the user program, whereas in the third embodiment, the processor core 210 executes steps 516 to 526 based on the instructions of the boot program. And 530.

ステップ526において、RAMデータのロードが完了すると、チップ205及び/又はモード制御回路245は、モードをセキュリティモードからユーザモードに移行する(ステップ528)。ユーザモードに移行すると、遊技機の通常の動作が行われる。本実施例において、ステップ502のリセット処理時点のRAM225の情報がバックアップされていることから、バックアップデータのロードにより、割り込み処理時点のユーザプログラムの処理の続きが実行される。   When the loading of the RAM data is completed in step 526, the chip 205 and / or the mode control circuit 245 shifts the mode from the security mode to the user mode (step 528). When shifting to the user mode, the normal operation of the gaming machine is performed. In this embodiment, since the information in the RAM 225 at the time of reset processing in step 502 is backed up, the continuation of the processing of the user program at the time of interrupt processing is executed by loading the backup data.

本実施例は、バックアップ及びバックアップデータのロードに関する主な処理(例えば、ステップ506〜512及びステップ514〜526及び530)は、ユーザプログラムの命令ではなく、ブートプログラムの命令に基づいて実行される点で、実施例1と異なる。したがって、バックアップ及び/又はバックアップデータのロードの処理は、セキュリティモードでブートプログラムが実行することから、ユーザプログラムの開発者の負担を軽減することができる。また、複数の種類のユーザプログラムごとに、バックアップ及びバックアップデータのロードの処理を定義することなく、複数の種類のユーザプログラムに関連する1つのブートプログラムでバックアップ及びバックアップデータのロードの処理を定義することから、処理を共通化することによって、ユーザのプログラム開発の負担とユーザプログラムの容量を削減することができる。本実施例では、ユーザプログラムは、バックアップ及びバックアップデータのロードの処理を実行するか否かを定義するのみでよい。一実施例において、バックアップ及びバックアップデータのロードの処理を実行するか否かは、ブートプログラムが参照可能なユーザプログラムのユーザ定義エリアのフラグによって決定されてもよい。したがって、実施例3は、このような技術的効果を奏している。   In this embodiment, main processing (for example, steps 506 to 512 and steps 514 to 526 and 530) related to backup and backup data loading is executed based on boot program instructions, not user program instructions. This is different from the first embodiment. Accordingly, the backup program and / or the backup data loading process is executed by the boot program in the security mode, so that the burden on the developer of the user program can be reduced. Further, the backup and backup data load processing is defined by one boot program related to the plurality of types of user programs without defining the backup and backup data load processing for each of the plurality of types of user programs. Therefore, by sharing the processing, it is possible to reduce the burden of user program development and the capacity of the user program. In this embodiment, the user program only needs to define whether or not to execute the backup and backup data load processing. In one embodiment, whether or not to execute backup and backup data load processing may be determined by a flag in a user-defined area of a user program that can be referred to by a boot program. Therefore, Example 3 has such a technical effect.

実施例4(プロセッサ及び専用ロジック回路によるセキュリティモードにおける制御)
図6は、プロセッサコア及び専用ロジック回路による、ブートプログラムなどのセキュリティモードで動作するプログラムの命令に基づく、RAMの情報のバックアップの実行、及び、バックアップされた情報のRAMへのロードの実行を示すフロー図である。ステップ602、604及び606の動作それぞれは、図5で示したステップ502、504及び306と同じである。
Example 4 (control in security mode by processor and dedicated logic circuit)
FIG. 6 shows execution of backup of RAM information based on instructions of a program operating in a security mode such as a boot program and loading of backed-up information into the RAM by the processor core and the dedicated logic circuit. FIG. The operations of steps 602, 604, and 606 are the same as those of steps 502, 504, and 306 shown in FIG.

セキュリティモードにおいて、プロセッサコア210は、専用ロジック回路250に命令し、バックアップ処理を実行させる(ステップ608)。専用ロジック回路250は、RAM225の情報の一部又は全部を不揮発性メモリ230に保存する(ステップ608)。   In the security mode, the processor core 210 instructs the dedicated logic circuit 250 to execute backup processing (step 608). The dedicated logic circuit 250 stores part or all of the information in the RAM 225 in the nonvolatile memory 230 (step 608).

専用ロジック回路250は、RAM225の情報の一部又は全部に基づいて、図3のステップ308で示した計算と同様の計算を行い、計算値を得るとともに不揮発性メモリ230に保存する(ステップ610)。これにより、不揮発性メモリ230は、RAM225の情報の一部又は全部とともに、計算値を記憶する。専用ロジック回路250は、バックアップ処理が完了したことをプロセッサコア210に通知する(ステップ612)。通知は、例えば、専用ロジック回路250が、バックアップ処理が完了したことを示すフラグを所定のレジスタなどに設定し、プロセッサコア210は、所定のレジスタなどのフラグがオン(又はオフ)となっていることを確認することによって、及び/又は、専用ロジック250がプロセッサコア210に割込みを発生することによって、バックアップ処理が完了したことを知ることができる。プロセッサコア210は、バックアップ処理終了の通知を受けたことに応じて、バックアップ処理を終了し、動作を休止する(ステップ614)。   The dedicated logic circuit 250 performs a calculation similar to the calculation shown in step 308 of FIG. 3 based on a part or all of the information in the RAM 225, obtains a calculated value, and stores it in the nonvolatile memory 230 (step 610). . Thereby, the nonvolatile memory 230 stores the calculated value together with a part or all of the information in the RAM 225. The dedicated logic circuit 250 notifies the processor core 210 that the backup process has been completed (step 612). In the notification, for example, the dedicated logic circuit 250 sets a flag indicating that the backup processing is completed in a predetermined register or the like, and the processor core 210 has a flag such as the predetermined register turned on (or off). By confirming this, and / or when the dedicated logic 250 generates an interrupt in the processor core 210, it can be known that the backup processing is completed. The processor core 210 ends the backup process and stops the operation in response to receiving the notification of the end of the backup process (step 614).

実施例4においても実施例1と同様に、バックアップ処理は、キャパシタ262に蓄えられた電荷を用いて行われる。ステップ606において、バックアップ処理を実行しないと判断された場合、プロセッサコア210は、バックアップ処理を実行することなく、動作を休止する(ステップ614)。   Also in the fourth embodiment, as in the first embodiment, the backup process is performed using the electric charge stored in the capacitor 262. If it is determined in step 606 that the backup process is not to be executed, the processor core 210 pauses the operation without executing the backup process (step 614).

主電源235が電源断から復帰又は一定時間の電源断から電源投入すると、プロセッサコア210は、図3で示したステップ312と同様にセキュリティモードにおける処理を実行する(ステップ616)。セキュリティモードにおいて、プロセッサコア210及び専用ロジック回路250は、ROM220に記憶されているブートプログラムを読み出し、ブートプログラムに基づいてバックアップデータのロードに係る処理を実行する。   When the main power supply 235 returns from power-off or powers on after a certain time of power-off, the processor core 210 executes processing in the security mode in the same manner as in step 312 shown in FIG. 3 (step 616). In the security mode, the processor core 210 and the dedicated logic circuit 250 read the boot program stored in the ROM 220, and execute processing related to loading backup data based on the boot program.

プロセッサコア210は、図3に示したステップ316と同様に、バックアップデータのロード処理を実行するか否かを判定する(ステップ618)。この判定は、例えば、ユーザプログラムのユーザ定義エリアに設定された値のフラグがオン又はオフであるかを判定する。例えば、フラグがオンの場合、プロセッサコア210は、バックアップデータのロード処理を実行すると判断する。   Similar to step 316 shown in FIG. 3, the processor core 210 determines whether or not to execute backup data load processing (step 618). In this determination, for example, it is determined whether the flag of the value set in the user definition area of the user program is on or off. For example, when the flag is on, the processor core 210 determines to execute the backup data loading process.

ステップ618において、バックアップデータのロード処理を実行すると判断された場合、プロセッサコア210及び専用ロジック回路250は、ROMに記憶されているユーザプログラムの命令に基づいて、バックアップデータのロード処理を実行する。まずは、プロセッサコア210は、専用ロジック回路250に命令し、バックアップデータのロード処理を実行させる(ステップ620)。   If it is determined in step 618 that the backup data load process is to be executed, the processor core 210 and the dedicated logic circuit 250 execute the backup data load process based on the instruction of the user program stored in the ROM. First, the processor core 210 instructs the dedicated logic circuit 250 to execute a backup data load process (step 620).

専用ロジック回路250は、ステップ608において不揮発性メモリ220に保存したバックアップの情報をRAM225に転送(ロード)する(ステップ620)。専用ロジック回路250は、バックアップの情報に基づいて、計算を行い(ステップ622)、この計算値と不揮発性メモリ23に記憶されている計算値とを比較する(ステップ624)。   The dedicated logic circuit 250 transfers (loads) the backup information stored in the nonvolatile memory 220 in step 608 to the RAM 225 (step 620). The dedicated logic circuit 250 performs calculation based on the backup information (step 622), and compares this calculated value with the calculated value stored in the nonvolatile memory 23 (step 624).

比較の結果が一致する場合(ステップ624)、専用ロジック回路250は、不揮発性メモリ230の情報をクリアする(ステップ626)。ステップ626は、実施例1の図3におけるステップ324と同様に、省略や実行順序の移動が可能で情報のクリア処理や情報の再利用不可の処理が行われても良い。   If the comparison results match (step 624), the dedicated logic circuit 250 clears the information in the nonvolatile memory 230 (step 626). Step 626 may be omitted or moved in the execution order as in step 324 in FIG. 3 of the first embodiment, and information clear processing and information non-reuse processing may be performed.

専用ロジック回路250は、バックアップデータのロード処理が完了したことをプロセッサコア210に通知する(ステップ628)。通知は、例えば、専用ロジック回路250が、バックアップデータのロード処理が完了したことを示すフラグを所定のレジスタなどに設定し、プロセッサコア210は、所定のレジスタなどのフラグがオン(又はオフ)となっていることを確認することによって、及び/又は、専用ロジック250がプロセッサコア210に割込みを発生することによって、バックアップデータのロード処理が完了したことを知ることができる。プロセッサコア210は、バックアップ処理終了の通知を受けたことに応じて、RAM225へのデータのロードが完了する(ステップ630)。ステップ630において、RAMデータのロードが完了すると、チップ205及び/又はモード制御回路245は、モードをセキュリティモードからユーザモードに移行する(ステップ632)。その後、本実施例においても、実施例1と同様に、ステップ602の割り込み処理時点のRAM225の情報がバックアップされていることから、バックアップデータのロードにより、割り込み処理時点のユーザプログラムの処理の続きが実行される。   The dedicated logic circuit 250 notifies the processor core 210 that the backup data load processing has been completed (step 628). In the notification, for example, the dedicated logic circuit 250 sets a flag indicating that the load processing of the backup data is completed in a predetermined register or the like, and the processor core 210 determines that the flag such as the predetermined register is on (or off). It is possible to know that the backup data loading process has been completed by confirming that the processing is completed and / or by causing the dedicated logic 250 to generate an interrupt to the processor core 210. In response to receiving the notification of the end of the backup process, the processor core 210 completes loading of data into the RAM 225 (step 630). In step 630, when the loading of the RAM data is completed, the chip 205 and / or the mode control circuit 245 shifts the mode from the security mode to the user mode (step 632). Thereafter, in this embodiment as well, as in the first embodiment, the information in the RAM 225 at the time of the interrupt processing at step 602 is backed up. Executed.

比較の結果が一致しない場合(ステップ624)、プロセッサ210は、ロードデータである不揮発性メモリ230に記憶されていた情報の組(バックアップデータと計算値)が不一致であることを、遊技機を管理する遊技機場のサーバや、インターネット上のサーバなどの管理コンピュータに通知する、又は、プロセッサコア210やチップ205の動作を停止してもよい(ステップ634)。又、他の実施例として、RAM255及び不揮発性メモリ230を初期化して遊技機を再起動しても良い。   If the comparison result does not match (step 624), the processor 210 manages the gaming machine that the set of information (the backup data and the calculated value) stored in the nonvolatile memory 230 as the load data does not match. A management computer such as a game machine server or a server on the Internet may be notified, or the operation of the processor core 210 and the chip 205 may be stopped (step 634). As another example, the RAM 255 and the nonvolatile memory 230 may be initialized and the gaming machine may be restarted.

本実施例は、バックアップ及びバックアップデータのロードに関する主な処理(例えば、ステップ606〜612及びステップ616〜630及び634)は、ユーザプログラムの命令ではなく、セキュリティモードにおけるブートプログラムの命令に基づいて実行される点で、実施例1と異なる。したがって、本実施例は、バックアップ及びバックアップデータのロードに関する主な処理をユーザプログラムの命令ではなく、セキュリティモードにおけるブートプログラム命令に基づくようにしたときに得られる実施例3で上述した技術的効果を奏している。   In this embodiment, main processing (for example, steps 606 to 612 and steps 616 to 630 and 634) related to backup and backup data loading is executed based on the instructions of the boot program in the security mode, not the instructions of the user program. This is different from the first embodiment. Therefore, the present embodiment provides the technical effect obtained in the third embodiment obtained when the main processing related to backup and loading of backup data is based on the boot program instruction in the security mode, not on the instruction of the user program. I play.

本実施例は、バックアップ及びバックアップデータのロードに関する主な処理の一部(例えば、ステップ608〜612及びステップ620〜630及び634)の実行主体がプロセッサコア210ではなく、専用ロジック回路250である点で、実施例1と異なる。したがって、本実施例は、バックアップ及びバックアップデータのロードに関する主な処理の実行主体をプロセッサコア210ではなく、専用ロジック回路250にしたときに得られる実施例2で上述した技術的効果も奏している。   In the present embodiment, a part of main processing (for example, steps 608 to 612 and steps 620 to 630 and 634) related to backup and backup data loading is not the processor core 210 but the dedicated logic circuit 250. This is different from the first embodiment. Therefore, the present embodiment also has the technical effect described in the second embodiment obtained when the main processing execution subject relating to backup and loading of backup data is not the processor core 210 but the dedicated logic circuit 250. .

実施例5(プロセッサによるバックアップモードにおける制御)
図7は、プロセッサコアによる、バックアップモードで動作するプログラムの命令に基づく、RAMの情報のバックアップの実行を示すフロー図である。まず、実施例1の図3で示したステップ302で説明した通り、主電源235が電力の供給を断ったこと(電断)を電断検出回路237が検出したことに応じて、プロセッサコア210は、電断によるリセット信号を割り込みリセット回路240から受け付ける(ステップ702)。
Example 5 (Control in Backup Mode by Processor)
FIG. 7 is a flowchart showing execution of RAM information backup based on instructions of a program operating in the backup mode by the processor core. First, as described in step 302 shown in FIG. 3 of the first embodiment, the processor core 210 responds to the fact that the power interruption detection circuit 237 detects that the main power supply 235 has stopped supplying power (power interruption). Accepts a reset signal due to power interruption from the interrupt reset circuit 240 (step 702).

チップ205及び/又はモード制御回路245は、モードをユーザモードからバックアップモードに移行する(ステップ704)。バックアップモードにおいて、プロセッサコア210は、ROM220に記憶されているバックアッププログラムの命令に基づいて動作する。   The chip 205 and / or the mode control circuit 245 shifts the mode from the user mode to the backup mode (step 704). In the backup mode, the processor core 210 operates based on a backup program instruction stored in the ROM 220.

バックアップモードはセキュリティモード、ユーザーモードと異なるモードでバックアップに関わる回路だけを動作させる。バックアップモードで実行されるバックアッププログラムはブートプログラムの一部としてROM220に含まれても良いが、ROM220と別のROMに内蔵する構造としても良い。   The backup mode is a mode different from the security mode and the user mode, and only the circuits related to the backup are operated. The backup program executed in the backup mode may be included in the ROM 220 as a part of the boot program, but may be built in a ROM separate from the ROM 220.

電断検出回路237が電断を検出したことにより、モード制御回路245は、チップ205をバックアップモードとし、バックアップ処理で使用しない回路や装置を休止状態にする、一方で、バックアップ処理で使用する回路や装置の動作を維持する(ステップ706)。これにより、バックアップ処理で未使用の回路を休止することから、バックアップ処理における消費電力を削減することができる。バックアップ処理における未使用の回路は、一例として、電断検出回路237、周辺回路215割り込みリセット回路240、ROM220などの少なくとも一つである。言い換えると、バックアップモードでは、プロセッサ210、不揮発性メモリ230、RAM225を少なくとも休止させない。一実施例において、回路や装置の休止は、電源の供給を中止することによって実現されてもよい。   When the power interruption detection circuit 237 detects the power interruption, the mode control circuit 245 sets the chip 205 to the backup mode, and puts circuits and devices not used in the backup processing into a dormant state, while the circuit used in the backup processing. And the operation of the apparatus is maintained (step 706). As a result, unused circuits are suspended in the backup process, so that power consumption in the backup process can be reduced. As an example, the unused circuit in the backup process is at least one of the power interruption detection circuit 237, the peripheral circuit 215 interrupt reset circuit 240, the ROM 220, and the like. In other words, in the backup mode, at least the processor 210, the nonvolatile memory 230, and the RAM 225 are not paused. In one embodiment, the suspension of the circuit or device may be realized by stopping the supply of power.

プロセッサコア210は、図7に示すステップ708、710、712及び714を実行する。図7に示すステップ708、710、712及び714の動作それぞれは、図3に示したステップ304、306、308及び310の動作と同様である。ただし、図3に示したステップ304、306、308及び310は、ユーザプログラムの命令に基づいて動作したのに対し、図7に示すステップ708、710、712及び714は、バックアッププログラムの命令に基づいて動作する。   The processor core 210 executes steps 708, 710, 712 and 714 shown in FIG. The operations of steps 708, 710, 712 and 714 shown in FIG. 7 are the same as the operations of steps 304, 306, 308 and 310 shown in FIG. However, steps 304, 306, 308, and 310 shown in FIG. 3 operate based on the instructions of the user program, whereas steps 708, 710, 712, and 714 shown in FIG. 7 are based on the instructions of the backup program. Works.

実施例5においても実施例1と同様に、バックアップ処理は、キャパシタ262に蓄えられた電荷を用いて行われる。   Also in the fifth embodiment, as in the first embodiment, the backup process is performed using the electric charge stored in the capacitor 262.

実施例5におけるバックアップデータのロード処理は、実施例1又は3で示した処理と同様にすることができる。   The backup data loading process in the fifth embodiment can be the same as the process shown in the first or third embodiment.

本実施例では、バックアップ処理時に動作する回路などを削減することにより、バックアップ処理時の電力消費を抑えることから、より確実にバックアップ処理を実行することができる。また、バックアップ及び/又はバックアップデータのロードの処理は、セキュリティモードでブートプログラムが実行することから、ユーザプログラムの開発者の負担とユーザプログラム容量を軽減することができる。一実施例において、バックアップ及びバックアップデータのロードの処理を実行するか否かは、ユーザプログラムの命令又はユーザプログラムのユーザ定義エリアに設定されたフラグによって決定されてもよい。一実施例において、バックアッププログラムは、バックアップ専用のメモリ(例えば、ROM220以外のROM)に記憶されていてもよい。これにより、ROM220の容量を有効に活用することができる。したがって、実施例5は、このような技術的効果を奏している。   In this embodiment, the power consumption during the backup process is suppressed by reducing the circuits that operate during the backup process, so that the backup process can be executed more reliably. In addition, since the boot program is executed in the security mode for the backup and / or backup data loading process, the burden on the user program developer and the user program capacity can be reduced. In one embodiment, whether or not to perform backup and backup data loading processing may be determined by a user program instruction or a flag set in a user-defined area of the user program. In one embodiment, the backup program may be stored in a memory dedicated to backup (for example, a ROM other than the ROM 220). Thereby, the capacity of the ROM 220 can be used effectively. Therefore, Example 5 has such a technical effect.

本実施例において、専用ロジック回路250が用いられない場合、チップ205は、専用ロジック回路250を有していなくてもよい。   In this embodiment, when the dedicated logic circuit 250 is not used, the chip 205 may not have the dedicated logic circuit 250.

実施例6(プロセッサ及び専用ロジック回路によるバックアップモードにおける制御)
図8は、プロセッサコア及び専用ロジック回路による、バックアップモードで動作するプログラムの命令に基づく、RAMの情報のバックアップの実行を示すフロー図である。まず、実施例1の図3で示したステップ302で説明した通り、主電源235が電力の供給を断ったこと(電断)を電断検出回路237が検出したことに応じて、プロセッサコア210は、電断によるリセット信号を割り込みリセット回路240から受け付ける(ステップ802)。
Example 6 (Control in backup mode by processor and dedicated logic circuit)
FIG. 8 is a flowchart showing the execution of RAM information backup based on the instructions of the program operating in the backup mode by the processor core and the dedicated logic circuit. First, as described in step 302 shown in FIG. 3 of the first embodiment, the processor core 210 responds to the fact that the power interruption detection circuit 237 detects that the main power supply 235 has stopped supplying power (power interruption). Accepts a reset signal due to power interruption from the interrupt reset circuit 240 (step 802).

チップ205及び/又はモード制御回路245は、実施例5で示した図7のステップ704及び706で示した動作と同様に、モードをバックアップモードに移行し(ステップ804)、モード制御回路245は、バックアップ処理で使用しない回路や装置を休止状態にする、一方で、バックアップ処理で使用する回路や装置の動作を維持する(ステップ806)。バックアップモードにおいて、プロセッサコア210は、ROM220に記憶されているバックアッププログラムの命令に基づいて動作する。本実施例において、モード制御回路245は、チップ205の一部の回路や装置を休止させるが、プロセッサ210、専用ロジック回路250、不揮発性メモリ230、RAM225を少なくとも休止させない。   The chip 205 and / or the mode control circuit 245 shifts the mode to the backup mode (step 804) in the same manner as the operations shown in steps 704 and 706 of FIG. 7 shown in the fifth embodiment, and the mode control circuit 245 Circuits and devices that are not used in the backup process are put into a dormant state, while operations of circuits and devices that are used in the backup process are maintained (step 806). In the backup mode, the processor core 210 operates based on a backup program instruction stored in the ROM 220. In this embodiment, the mode control circuit 245 suspends some circuits and devices of the chip 205, but does not suspend at least the processor 210, the dedicated logic circuit 250, the nonvolatile memory 230, and the RAM 225.

プロセッサコア210は、図8に示すステップ808及び816を実行し、専用ロジック回路250は、図8に示すステップ810、812及び814を実行する。図8に示すステップ808及び816の動作それぞれは、図4に示したステップ404及び412の動作と同様であり、図8に示すステップ810、812及び814の動作それぞれは、図4に示したステップ406、408及び410の動作と同様である。ただし、図4に示したステップ404、406、408、410及び412は、ユーザプログラムの命令に基づいて動作したのに対し、図8に示すステップ808、810、812、814及び816は、バックアッププログラムの命令に基づいて動作する。   The processor core 210 executes steps 808 and 816 shown in FIG. 8, and the dedicated logic circuit 250 executes steps 810, 812 and 814 shown in FIG. The operations of steps 808 and 816 shown in FIG. 8 are the same as the operations of steps 404 and 412 shown in FIG. 4, and the operations of steps 810, 812 and 814 shown in FIG. 8 are the same as those shown in FIG. The operation is the same as that of 406, 408, and 410. However, steps 404, 406, 408, 410, and 412 shown in FIG. 4 operate based on a user program instruction, whereas steps 808, 810, 812, 814, and 816 shown in FIG. It operates based on the instruction.

実施例6においても実施例1と同様に、バックアップ処理は、キャパシタ262に蓄えられた電荷を用いて行われる。   Also in the sixth embodiment, as in the first embodiment, the backup process is performed using the electric charge stored in the capacitor 262.

バックアップデータのロード処理は、実施例2又は4で示した処理と同様にすることができる。   The backup data loading process can be the same as the process shown in the second or fourth embodiment.

本実施例では、バックアップモードにおいて動作が行われることから、実施例5と同様な技術的効果を奏している。また、バックアップの主な処理は、専用ロジック回路250によって実行されることから、処理の実行主体をプロセッサコア210ではなく、専用ロジック回路250にしたときに得られる実施例2で上述した技術的効果も奏している。   In this embodiment, since the operation is performed in the backup mode, the same technical effects as those of the fifth embodiment are obtained. Further, since the main process of backup is executed by the dedicated logic circuit 250, the technical effect described in the second embodiment obtained when the process execution subject is not the processor core 210 but the dedicated logic circuit 250. I also play.

実施例7(専用ロジック回路によるバックアップモードにおける制御)
図9は、専用ロジック回路による、バックアップモードで動作する専用ロジックの処理シーケンスに基づく、RAMの情報のバックアップの実行を示すフロー図である。まず、実施例1の図3で示したステップ302で説明した通り、主電源235が電力の供給を断ったこと(電断)を電断検出回路237が検出したことに応じて、プロセッサコア210は、電断によるリセット信号を割り込みリセット回路240から受け付けるプロセッサを休止する(ステップ902)。本実施例において、専用ロジック回路250は、事前に定義されている処理シーケンスに基づいてバックアップ処理を実行することができる。
Example 7 (Control in backup mode by dedicated logic circuit)
FIG. 9 is a flowchart showing the execution of RAM information backup based on the processing sequence of the dedicated logic operating in the backup mode by the dedicated logic circuit. First, as described in step 302 shown in FIG. 3 of the first embodiment, the processor core 210 responds to the fact that the power interruption detection circuit 237 detects that the main power supply 235 has stopped supplying power (power interruption). Suspends the processor that accepts the reset signal from the interruption reset circuit 240 (step 902). In the present embodiment, the dedicated logic circuit 250 can execute a backup process based on a predefined processing sequence.

チップ205が電源断検出信号を受信したことに応じて、モード制御回路245は、チップ205の動作モードをユーザモードからバックアップモードに移行し、バックアップ処理の命令を専用ロジック回路250が行うように制御する(ステップ904)。チップ205は、バックアップ処理で使用しない回路や装置を休止状態にする、一方で、バックアップ処理で使用する回路や装置の動作を維持する(ステップ906)。バックアップモードにおいて、専用ロジック回路250は、RAM225に記憶されているデータを不揮発性メモリ230バックアップするよう動作する。本実施例において、モード制御回路245は、チップ205の一部の回路や装置を休止させるが、専用ロジック回路250、不揮発性メモリ230、RAM225を少なくとも休止させない。   In response to the chip 205 receiving the power-off detection signal, the mode control circuit 245 shifts the operation mode of the chip 205 from the user mode to the backup mode, and controls the dedicated logic circuit 250 to execute the backup processing instruction. (Step 904). The chip 205 puts a circuit or device that is not used in the backup processing into a dormant state, while maintaining the operation of the circuit or device used in the backup processing (step 906). In the backup mode, the dedicated logic circuit 250 operates to back up the data stored in the RAM 225 to the nonvolatile memory 230. In this embodiment, the mode control circuit 245 pauses some circuits and devices of the chip 205, but does not pause at least the dedicated logic circuit 250, the nonvolatile memory 230, and the RAM 225.

専用ロジック回路250は、バックアップ処理を実行するか否かを判定する(ステップ908)。この判定は、例えば、専用ロジック回路250が所定のレジスタなどに設定された値のフラグがオン又はオフであるかを判定する。例えば、フラグがオンの場合、専用ロジック回路250は、バックアップ処理を実行すると判断する。所定のレジスタなどには電源立上げ時のブート処理においてユーザプログラムのユーザ定義エリアに設定されたフラグを予め読み込んでおくか、その都度ユーザプログラムのユーザ定義エリアに設定されたフラグをユーザROMから読み込んでも良い。   The dedicated logic circuit 250 determines whether to execute the backup process (step 908). In this determination, for example, the dedicated logic circuit 250 determines whether a flag having a value set in a predetermined register or the like is on or off. For example, when the flag is on, the dedicated logic circuit 250 determines to execute the backup process. The flag set in the user-defined area of the user program in the boot process at power-on is read in a predetermined register or the like, or the flag set in the user-defined area of the user program is read from the user ROM each time. But it ’s okay.

ステップ908において、バックアップ処理を実行すると判断された場合、専用ロジック回路250は、バックアップ処理を実行する。まず、専用ロジック回路250は、RAM225の情報の一部又は全部を不揮発性メモリ230に保存する(ステップ910)。   If it is determined in step 908 that the backup process is to be executed, the dedicated logic circuit 250 executes the backup process. First, the dedicated logic circuit 250 stores part or all of the information in the RAM 225 in the nonvolatile memory 230 (step 910).

次に専用ロジック回路250は、RAM225の情報の一部又は全部に基づいて、計算を行い、計算値を得るとともに不揮発性メモリ230に保存する(ステップ912)。これにより、不揮発性メモリ230は、RAM225の情報の一部又は全部とともに、計算値を記憶する。専用ロジック回路250は、バックアップ処理が完了したことをモード制御回路245に通知する(ステップ914)。通知は、例えば、専用ロジック回路250が、バックアップ処理が完了したことを示すフラグを所定のレジスタなどに設定し、モード制御回路245は、所定のレジスタなどのフラグがオン(又はオフ)となっていることを確認することによって、バックアップ処理が完了したことを知ることができる。モード制御回路245は、バックアップ処理を終了し、チップ205内の全ての回路や装置の動作を休止する(ステップ915)。   Next, the dedicated logic circuit 250 performs a calculation based on part or all of the information in the RAM 225 to obtain a calculated value and store it in the nonvolatile memory 230 (step 912). Thereby, the nonvolatile memory 230 stores the calculated value together with a part or all of the information in the RAM 225. The dedicated logic circuit 250 notifies the mode control circuit 245 that the backup process has been completed (step 914). In the notification, for example, the dedicated logic circuit 250 sets a flag indicating that the backup processing is completed in a predetermined register or the like, and the mode control circuit 245 turns on (or off) the flag such as the predetermined register or the like. By confirming that the backup processing is complete, it is possible to know that the backup processing has been completed. The mode control circuit 245 terminates the backup process and stops the operation of all the circuits and devices in the chip 205 (step 915).

バックアップデータのロード処理は、上述した実施例のいずれを用いてもよい。   Any of the embodiments described above may be used for the backup data loading process.

本実施例では、バックアップモードにおいて動作が行われることから、実施例5と同様な技術的効果を奏している。また、バックアップの主な処理は、専用ロジック回路250によって実行されることから、処理の実行主体をプロセッサコア210ではなく、専用ロジック回路250にしたときに得られる実施例2で上述した技術的効果を奏している。さらに、本実施例では、バックアップ処理において、プロセッサコア210を休止させることから、バックアップ処理における電力消費を実施例5及び6よりもさらに削減することができる。   In this embodiment, since the operation is performed in the backup mode, the same technical effects as those of the fifth embodiment are obtained. Further, since the main process of backup is executed by the dedicated logic circuit 250, the technical effect described in the second embodiment obtained when the process execution subject is not the processor core 210 but the dedicated logic circuit 250. I play. Furthermore, in this embodiment, the processor core 210 is suspended in the backup process, so that the power consumption in the backup process can be further reduced as compared with the fifth and sixth embodiments.

上述した実施例1ないし7において、バックアップを行うことを判定するステップ及びバックアップデータのロードを行うことを判定するステップを必ず行っていた(例えば、ステップ304,316、404、418、506、516、606、618、708、808、908)。しかしながら、当業者であれば理解されるように、バックアップを行うことを判定するステップ及びバックアップデータのロードを行うことを判定するステップの一方又は両方を実行しなくてもよい(省略することができる)。この場合、バックアップを行うことの判定及び/又はバックアップデータのロードを行うことの判定を行うことなく、バックアップ及び/又はバックアップデータのロードが実行される。   In the first to seventh embodiments described above, the step of determining to perform backup and the step of determining to load backup data are always performed (for example, steps 304, 316, 404, 418, 506, 516, 606, 618, 708, 808, 908). However, as will be appreciated by those skilled in the art, one or both of determining to perform backup and determining to load backup data may not be performed (may be omitted). ). In this case, the backup and / or backup data is loaded without determining whether to perform backup and / or determining whether to load backup data.

実施例1ないし7のまとめ
上記の通り、実施例1ないし7では、バックアップ及びバックアップデータのロードで動作する際のモード、プログラム及び実行主体が異なっていた。以下に実施例ごとのモード、プログラム及び実行主体を表に示す。

Figure 2017194769
本表において、◎は、所定のモード及びプログラムを他のモード及びプログラムに入れ替えることが不可であることを示し、○は、所定のモード及びプログラムを他のモード及びプログラムに入れ替えることが可であることを示す。 Summary of Embodiments 1 to 7 As described above, in Embodiments 1 to 7, the mode, the program, and the execution subject when operating by backup and loading of backup data are different. The table below shows the mode, program, and execution subject for each embodiment.
Figure 2017194769
In this table, ◎ indicates that the predetermined mode and program cannot be replaced with other modes and programs, and ○ indicates that the predetermined mode and program can be replaced with other modes and programs. It shows that.

従来技術では、RAM125が情報を保存するのに必要な電力量が、キャパシタ145に蓄えられている電力量を超えると、RAM125を動作させるための電力がないため、RAM125の内容は失われていた。本発明による上記各実施例において、主電源235が電源断にあるとき、RAM225の内容は、不揮発性メモリ230に保存されている。したがって、RAM225の内容を不揮発性メモリ230に半永久的に保存されることから、RAM225の内容は失われない。   In the prior art, when the amount of power required for the RAM 125 to store information exceeds the amount of power stored in the capacitor 145, the content of the RAM 125 has been lost because there is no power to operate the RAM 125. . In each of the embodiments according to the present invention, when the main power source 235 is off, the contents of the RAM 225 are stored in the nonvolatile memory 230. Accordingly, the contents of the RAM 225 are not lost because the contents of the RAM 225 are semi-permanently stored in the nonvolatile memory 230.

電源投入時において、プロセッサ210は、一定期間の電源断を検出すると、電源断から復帰するときに、不揮発性メモリ230に保存された内容をクリアしてもよい。一定期間は、内蔵のタイマなどの時間計測回路により特定することができる。また、一定期間は、例えば、12時間、24時間、2日間、5日間などとすることができる。他の実施例として、内蔵タイマ等の時間計測回路を持たない場合はチップ205の内部抵抗他によりキャパシタ262に充電された電荷の自然放電を利用し電源再投入時のキャパシタに充電された電荷が一定量でないことを電源断検出回路237などで確認し、不揮発性メモリ230に保存された内容をクリアしてもよい。   When the power is turned on, the processor 210 may clear the content stored in the nonvolatile memory 230 when the power is turned off for a certain period and when the power is turned off. The predetermined period can be specified by a time measuring circuit such as a built-in timer. Moreover, the fixed period can be set to 12 hours, 24 hours, 2 days, 5 days, or the like, for example. As another embodiment, when a time measuring circuit such as a built-in timer is not provided, the charge charged in the capacitor when the power is turned on again using the internal discharge of the chip 205 and the like. The content stored in the nonvolatile memory 230 may be cleared by confirming that the amount is not fixed by the power-off detection circuit 237 or the like.

本発明の実施例において、不揮発性メモリ230は、FlashROMや、EEPROM、不揮発性RAMなどとすることができる。   In the embodiment of the present invention, the non-volatile memory 230 may be a Flash ROM, an EEPROM, a non-volatile RAM, or the like.

本発明の実施例において、ROM220は、一つのハードウエアとして記載されているが、2以上のROMで実現されていてもよい。ROM220が2以上のROMである場合、各ROMは、ブートプログラム、ユーザプログラム及びバックアッププログラムの一又は二以上を記憶する。   In the embodiment of the present invention, the ROM 220 is described as one piece of hardware, but may be realized by two or more ROMs. When the ROM 220 is two or more ROMs, each ROM stores one or more of a boot program, a user program, and a backup program.

一実施例において、基板200は遊技機用とすることができる。一実施例において、図2に示したチップ205は、一つのチップ上で実装されていてもよい。そのような一つのチップは、マイクロコンピュータ、マイコン、ワンチップマイコン、プロセッサチップなどと称される。他の実施例において、チップ205は、それ自体でプロセッサとして提供されてもよい。遊技機において、基板200を主基板及び/又はサブ基板として用いた遊技機が構成されていてもよい。遊技機において、主基板は、主に遊技機の抽選を制御し、サブ基板は、遊技機の払出し及び/又は演出を制御する。   In one embodiment, the substrate 200 can be for gaming machines. In one embodiment, the chip 205 shown in FIG. 2 may be mounted on one chip. One such chip is referred to as a microcomputer, a microcomputer, a one-chip microcomputer, a processor chip, or the like. In other embodiments, the chip 205 may itself be provided as a processor. In the gaming machine, a gaming machine using the board 200 as a main board and / or a sub board may be configured. In the gaming machine, the main board mainly controls the lottery of the gaming machines, and the sub board controls the payout and / or effect of the gaming machine.

上記の実施例において、ハードウエアで実現するよう説明されたいくつかの要素の一部又は全ては、ソフトウエアで実現することができ、そして、ソフトウエアで実現するよう説明されたいくつかの要素の一部又は全ては、ハードウエアで実現することができることは理解されるであろう。   In the above embodiment, some or all of some elements described to be realized by hardware can be realized by software, and some elements described to be realized by software It will be understood that some or all of can be implemented in hardware.

請求項に記載の「遊技機用装置」は、明細書中の記載「チップ205」に対応する。請求項に記載の「バックアップ処理部」は、明細書中の記載「プロセッサコア210」及び/又は「専用ロジック回路250」に対応する。請求項に記載の「揮発性RAM」は、明細書中の記載「RAM225」に対応する。請求項に記載の「第1のプログラム」、「第2のプログラム」及び「第3のプログラム」は、それぞれ、明細書中の記載「ブートプログラム」、「ユーザプログラム」及び「バックアッププログラム」に対応する。   The “device for gaming machine” recited in the claims corresponds to the “chip 205” described in the specification. The “backup processing unit” described in the claims corresponds to “processor core 210” and / or “dedicated logic circuit 250” in the specification. The “volatile RAM” described in the claims corresponds to the description “RAM 225” in the specification. The “first program”, “second program”, and “third program” described in the claims correspond to the “boot program”, “user program”, and “backup program” in the specification, respectively. To do.

以上に説明した処理又は処理順序において、ある処理において、その処理ではまだ利用することができないはずのデータを利用しているなどの処理又は処理順序上の矛盾が生じない限りにおいて、処理又は処理順序を自由に変更することができる。   As long as there is no inconsistency in the processing or processing order in the processing or processing order described above, such as using data that should not be used in that processing, the processing or processing order. Can be changed freely.

以上に説明してきた各実施例に関し、各実施例の一部又は全部を組み合わせて一つの実施例として実現されてもよい。   Regarding each embodiment described above, a part or all of each embodiment may be combined and realized as one embodiment.

以上に説明してきた各実施例は、本発明を説明するための例示であり、本発明はこれらの実施例に限定されるものではない。本発明は、その要旨を逸脱しない限り、種々の形態で実施することができる。   Each Example described above is an illustration for explaining the present invention, and the present invention is not limited to these Examples. The present invention can be implemented in various forms without departing from the gist thereof.

200 基板
205 チップ
210 プロセッサコア
215 周辺回路
220 ROM
225 RAM
230 不揮発性メモリ
235 主電源
237 電断検出回路
240 割込みリセット回路
245 モード制御回路
250 専用ロジック回路
260 ダイオード
262 キャパシタ
200 substrate 205 chip 210 processor core 215 peripheral circuit 220 ROM
225 RAM
230 Non-volatile memory 235 Main power supply 237 Power interruption detection circuit 240 Interrupt reset circuit 245 Mode control circuit 250 Dedicated logic circuit 260 Diode 262 Capacitor

Claims (8)

遊技機用装置であって、
バックアップ処理部と、
メインメモリとして用いられる揮発性RAMと、
前記揮発性RAMの内容の一部又は全部をバックアップとして記憶する不揮発性メモリと、
前記遊技機用装置のセキュリティに関する処理を少なくとも行うモードであるセキュリティモードで動作する第1のプログラムと、遊技機の抽選及び/又は演出を少なくとも行うモードであるユーザモードで動作する第2のプログラムと、を少なくとも記憶しているROMと、
前記遊技機用装置における電源の供給が断絶されたことを検出する電断検出回路と、を備え、
前記電断検出回路が電源供給の断絶を検出したことに応じて、前記バックアップ処理部は、前記第1のプログラムの命令又は前記第2のプログラムの命令に基づいて、前記揮発性RAMの内容の一部又は全部を前記不揮発性メモリに保存し、
前記バックアップ処理部は、前記遊技機用装置に電源の供給が行われると、第1のプログラムの命令に基づいて動作し、モードが前記セキュリティモードから前記ユーザモードに移行した後、前記ユーザプログラムの命令に基づいて動作する、遊技機用装置。
A device for a gaming machine,
A backup processing unit;
Volatile RAM used as main memory,
A non-volatile memory that stores a part or all of the contents of the volatile RAM as a backup;
A first program that operates in a security mode that is a mode for performing at least processing related to security of the gaming machine device; and a second program that operates in a user mode that is a mode for performing at least lottery and / or presentation of gaming machines. A ROM that stores at least
An interruption detection circuit for detecting that the supply of power in the gaming machine device is interrupted,
In response to the power interruption detection circuit detecting the interruption of power supply, the backup processing unit determines the content of the volatile RAM based on the instruction of the first program or the instruction of the second program. Part or all of the data is stored in the nonvolatile memory;
When power is supplied to the gaming machine device, the backup processing unit operates based on an instruction of the first program, and after the mode shifts from the security mode to the user mode, the user program A device for a gaming machine that operates based on a command.
前記電源の供給の断絶を検出した後、前記電源の供給の復帰を検出したことに応じて、前記バックアップ処理部は、前記不揮発性メモリに保存された内容の一部又は全部を前記揮発性RAMにロード又は転送する、請求項1に記載の遊技機用装置。   In response to detecting the return of the power supply after detecting the disconnection of the power supply, the backup processing unit transfers a part or all of the content stored in the nonvolatile memory to the volatile RAM. The gaming machine device according to claim 1, wherein the gaming machine device is loaded or transferred. 前記ROMは、前記バックアップに関する処理を少なくとも行うモードであるバックアップモードで動作する第3のプログラムをさらに記憶し、
前記遊技機用装置は、前記バックアップモードにおいて、少なくとも前記電断検出回路の動作を休止させるモード制御回路をさらに備える、請求項1又は2に記載の遊技機用装置。
The ROM further stores a third program that operates in a backup mode, which is a mode for performing at least processing related to the backup,
The gaming machine device according to claim 1 or 2, further comprising a mode control circuit that pauses at least the operation of the power interruption detection circuit in the backup mode.
前記バックアップ処理部は、プロセッサコア及び/又は専用ロジック回路である、請求項1ないし3のいずれか一つに記載の遊技機用装置。   The gaming machine device according to any one of claims 1 to 3, wherein the backup processing unit is a processor core and / or a dedicated logic circuit. 請求項1ないし4のいずれか一つに記載の遊技機用装置がチップである。   The gaming machine device according to any one of claims 1 to 4 is a chip. 請求項5に記載のチップがワンチップである。   The chip according to claim 5 is a one-chip. 請求項5又は6に記載のチップを有する基板。   A substrate having the chip according to claim 5. 請求項7に記載の基板を有する遊技機。   A gaming machine having the board according to claim 7.
JP2016083339A 2016-04-19 2016-04-19 Device storing information on work ram in non-volatile memory Pending JP2017194769A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016083339A JP2017194769A (en) 2016-04-19 2016-04-19 Device storing information on work ram in non-volatile memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016083339A JP2017194769A (en) 2016-04-19 2016-04-19 Device storing information on work ram in non-volatile memory

Publications (1)

Publication Number Publication Date
JP2017194769A true JP2017194769A (en) 2017-10-26

Family

ID=60154803

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016083339A Pending JP2017194769A (en) 2016-04-19 2016-04-19 Device storing information on work ram in non-volatile memory

Country Status (1)

Country Link
JP (1) JP2017194769A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6996342B2 (en) 2018-02-28 2022-01-17 株式会社リコー Information processing equipment and information processing method
CN117251103A (en) * 2022-12-30 2023-12-19 北京忆芯科技有限公司 Memory device for low latency entry into deep low power consumption state and method therefor

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6996342B2 (en) 2018-02-28 2022-01-17 株式会社リコー Information processing equipment and information processing method
CN117251103A (en) * 2022-12-30 2023-12-19 北京忆芯科技有限公司 Memory device for low latency entry into deep low power consumption state and method therefor
CN117251103B (en) * 2022-12-30 2024-04-16 北京忆芯科技有限公司 Memory device for low latency entry into deep low power consumption state and method therefor

Similar Documents

Publication Publication Date Title
JP5575338B2 (en) Information processing apparatus, information processing method, and computer program
US8799631B2 (en) Dynamically select operating system (OS) to boot based on hardware states
TWI492867B (en) In-vehicle apparatus
US20120239920A1 (en) Approaches for updating bios
US8756474B2 (en) Method for initiating a refresh operation in a solid-state nonvolatile memory device
JP2004038529A (en) Information processor
TW201333675A (en) Report updated threshold level based on parameter
WO2015074232A1 (en) Method for migrating memory data, computer and device
TW201531097A (en) Smart TV system and turn-off and turn-on method thereof
US20150198999A1 (en) Method for switching operating systems and electronic apparatus
WO2021103745A1 (en) Method for protectively desiging boot program
CN105653405A (en) Fault processing method and system of U-boot
WO2018040969A1 (en) Method and device for improving reliability of nand flash memory
US10788872B2 (en) Server node shutdown
JP2017194769A (en) Device storing information on work ram in non-volatile memory
TWI546661B (en) Resuming a system using state information
US9652259B2 (en) Apparatus and method for managing register information in a processing system
TWI438402B (en) Navigation device for vehicle
TW201901692A (en) Flash memory device having abnormal power protection
CN114035831B (en) CPLD upgrading method, system and computer readable storage medium
US20170083305A1 (en) Performing power management during a download and execute operation
CN113721992A (en) BIOS starting method and related device of server
CN111078452A (en) BMC firmware image recovery method and device
JP6385322B2 (en) Information processing device
JP6011687B1 (en) Storage device and control method thereof