JPH04140828A - Random number generating device - Google Patents
Random number generating deviceInfo
- Publication number
- JPH04140828A JPH04140828A JP2264474A JP26447490A JPH04140828A JP H04140828 A JPH04140828 A JP H04140828A JP 2264474 A JP2264474 A JP 2264474A JP 26447490 A JP26447490 A JP 26447490A JP H04140828 A JPH04140828 A JP H04140828A
- Authority
- JP
- Japan
- Prior art keywords
- data
- random number
- latch
- number data
- adder
- 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
Links
- 239000008186 active pharmaceutical agent Substances 0.000 description 6
- 238000010586 diagram Methods 0.000 description 2
- 238000000034 method Methods 0.000 description 2
- 230000000630 rising effect Effects 0.000 description 2
- 201000004059 subependymal giant cell astrocytoma Diseases 0.000 description 2
- 239000003795 chemical substances by application Substances 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Abstract
Description
【発明の詳細な説明】
[産業上の利用分野]
本発明は乱数発生装置、特にコンピュータゲームに使用
される乱数発生装置に関する。DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a random number generator, and particularly to a random number generator used in computer games.
[従来の技術]
従来より、コンピュータゲームは一般大衆の娯楽として
楽しまれているが、近年のコンピュータゲームは、需要
者の要求に応えるためソフトウェア、ハードウェア共に
高度化、複雑化している。[Prior Art] Computer games have traditionally been enjoyed by the general public as entertainment, but in recent years, both the software and hardware of computer games have become more sophisticated and complex in order to meet the demands of consumers.
コンピュータゲームにおいては、ゲームの興趣を高める
ために、例えば敵が発生する位置や頻度をランダムに変
化させることがあり、内部で乱数を発生させてその乱数
を用いて制御するようにしている。従来は、CPUの内
部レジスタを利用して乱数を発生したり、プログラムに
より乱数を発生させたりしていた。In computer games, in order to increase the interest of the game, for example, the positions and frequency at which enemies appear may be randomly changed, and random numbers are generated internally and used for control. Conventionally, random numbers have been generated using internal registers of a CPU or by a program.
[発明が解決しようとする課題]
コンピュータゲームが一定のストーリーで組み立てられ
ている場合には、利用する乱数は数学的な意味で完全な
純乱数ではなく、再現性のある疑似乱数の方が望ましい
。しかしながら、従来の方法により発生する乱数は、特
にコンピュータゲームに適合した乱数であることを考慮
していないため、例えば、乱数の変化量が大きすぎて、
あるときにはゲーム中に敵が頻繁に発生しすぎたり、あ
るときにはゲーム中に敵がなかなか出現しなくなったり
するという問題があった。[Problem to be solved by the invention] When a computer game is constructed according to a certain story, it is preferable that the random numbers used are not completely pure random numbers in a mathematical sense, but pseudo-random numbers that have reproducibility. . However, the random numbers generated by conventional methods do not take into account that they are particularly suitable for computer games, so for example, the amount of change in the random numbers is too large.
Sometimes there were problems where enemies would appear too often during the game, and sometimes enemies would hardly appear during the game.
本発明の目的は、特にコンピュータゲームに使用するの
に適した再現性のある疑似乱数を発生することができる
乱数発生装置を提供することにある。An object of the present invention is to provide a random number generator capable of generating reproducible pseudorandom numbers particularly suitable for use in computer games.
[課題を解決するための手段]
上記目的は、発生する乱数データをラッチする第1のラ
ッチと、アドレスバス中の所定のアドレス信号と、デー
タバス中の所定のデータ信号との組合わせデータを、コ
ントロールバス中の所定のコントロール信号に同期して
ラッチする第2のラッチと、前記第1のラッチにラッチ
された乱数データと前記第2のラッチにラッチされた組
合わせデータとを加算する加算器とを有し、前記加算器
の加算結果を乱数データとして前記第1のラッチにラッ
チすることを特徴とする乱数発生装置によって達成され
る。[Means for Solving the Problems] The above object is to generate combination data of a first latch that latches generated random number data, a predetermined address signal in an address bus, and a predetermined data signal in a data bus. , a second latch that latches in synchronization with a predetermined control signal in the control bus, and an addition that adds the random number data latched in the first latch and the combination data latched in the second latch. This is achieved by a random number generating device, which has a random number generator, and latches the addition result of the adder in the first latch as random number data.
[作用]
本発明によれば、所定のアドレス信号と所定のデータ信
号との組合わせデータを加算して乱数を発生するように
しているので、特にコンピュータゲームに使用するのに
適した再現性のある疑似乱数を発生することができる。[Operation] According to the present invention, since random numbers are generated by adding the combination data of a predetermined address signal and a predetermined data signal, the reproducibility is particularly suitable for use in computer games. It is possible to generate some pseudo-random numbers.
[実施例]
本発明の一実施例による乱数発生装置を第1図及び第2
図を用いて説明する。第1図は乱数発生装置のブロック
図、第2図は乱数発生装置の動作を示すタイムチャート
である。[Example] A random number generator according to an example of the present invention is shown in FIGS.
This will be explained using figures. FIG. 1 is a block diagram of the random number generator, and FIG. 2 is a time chart showing the operation of the random number generator.
本実施例による乱数発生装置は、CPUのアドレスバス
中のアドレス信号と、データバス中のデータ信号とを組
合わせた組合わせデータを、コントロール信号に同期し
てラッチし、ラッチした組合わせデータを加算すること
により乱数を発生するようにしたものである。The random number generator according to the present embodiment latches combination data, which is a combination of an address signal in an address bus of a CPU and a data signal in a data bus, in synchronization with a control signal, and outputs the latched combination data. Random numbers are generated by adding them.
ラッチ1には、アドレスバスにより伝送されるアドレス
信号ADR3の例えば下位2ビツトのアドレス信号線と
、データバスにより伝送されるデータ信号DATAの例
えば下位3ビツトのデータ信号線とか入力されている。The latch 1 is input with, for example, an address signal line of the lower two bits of the address signal ADR3 transmitted by the address bus, and a data signal line of, for example, the lower three bits of the data signal DATA transmitted by the data bus.
ラッチ1では、アドレス信号ADR3の2ビツトを上位
2ビツトとし、データ信号DATAの3ビツトを下位3
ビツトとする5ビツトの組合わせデータとしてラッチす
る。In latch 1, the 2 bits of the address signal ADR3 are the upper 2 bits, and the 3 bits of the data signal DATA are the lower 3 bits.
It is latched as 5-bit combination data.
アドレス信号ADR8の下位2ビツトを組合わせデータ
の上位2ビツトとしたのは、アドレス信号ADR3の下
位2ビツトはこまかく変動するので組合わせデータが大
きく変動するからである。The reason why the lower two bits of the address signal ADR8 are used as the upper two bits of the combination data is because the lower two bits of the address signal ADR3 fluctuate minutely, so the combination data fluctuates greatly.
ラッチ1にはコントロールバスのうちデータストローブ
信号DSが入力されており、データストローブ信号DS
の立上がりに同期して組合わせデータをう・yチする。The data strobe signal DS of the control bus is input to the latch 1, and the data strobe signal DS
The combination data is read in synchronization with the rising edge of .
データストローブ信号DSの立上がりに同期して組合わ
せデータをラッチするようにしているのは、第2図に示
すように、データストローブ信号DSの立上がりではア
ドレス信号ADR3もデータ信号DATAも確実に出力
されているからである。The reason why the combined data is latched in synchronization with the rise of the data strobe signal DS is that, as shown in FIG. 2, both the address signal ADR3 and the data signal DATA are reliably output at the rise of the data strobe signal DS. This is because
アダー2は、ラッチ1によりラッチされた5ビツトの組
合わせデータと、後述するラッチ4によりラッチされて
いる16ビツトの乱数データとを加算する。Adder 2 adds 5-bit combination data latched by latch 1 and 16-bit random number data latched by latch 4, which will be described later.
データセレクタ3は、アダー2により加算された加算結
果(16ビツト)と、CPU(図示せず)からデータバ
スを介して送られてくる設定乱数データ(16ビツト)
とのいずれかを選択して出力する。The data selector 3 receives the addition result (16 bits) added by the adder 2 and the set random number data (16 bits) sent from the CPU (not shown) via the data bus.
Select one of these and output.
ラッチ4は、データセレクタ3から出力されたデータを
乱数データとしてラッチする。ラッチ4には、ラッチ1
と同じくコントロールバスのうちデータストローブ信号
DSが入力されており、データストローブ信号DSの立
上がりに同期して乱数データをラッチする。ラッチ4に
ラッチされた乱数データはアダー2に戻され、アダー2
で組合わせデータと加算される。The latch 4 latches the data output from the data selector 3 as random number data. Latch 4 has latch 1
Similarly, a data strobe signal DS of the control bus is input, and random number data is latched in synchronization with the rise of the data strobe signal DS. The random number data latched in latch 4 is returned to adder 2, and
is added to the combined data.
ラッチ4にラッチされた乱数データはバッファ5を介し
てデータバスに出力される。The random number data latched in the latch 4 is output to the data bus via the buffer 5.
本実施例の動作を説明する。The operation of this embodiment will be explained.
乱数データを発生する場合には、まずCPUからデータ
バスに設定乱数データを出力し、データセレクタ3はデ
ータバスを介して入力された設定乱数データを選択して
ラッチ4に出力する。When generating random number data, the CPU first outputs set random number data to the data bus, and the data selector 3 selects the set random number data input via the data bus and outputs it to the latch 4.
ラッチ4は設定乱数データをラッチし、バッファ5を介
して最初の乱数データとして出力すると共に、アダー2
にも出力する。The latch 4 latches the set random number data and outputs it as the first random number data via the buffer 5.
Also output to.
アダー2は、ラッチ4からの乱数データと、ラッチ1に
よりラッチされたアドレス信号とデータ信号の組合せデ
ータを加算して、その加算結果をデータセレクタ3に出
力する。The adder 2 adds the random number data from the latch 4 and the combination data of the address signal and data signal latched by the latch 1, and outputs the addition result to the data selector 3.
データセレクタ3は、アダー2からの加算結果を選択す
るようにして、ラッチ4に次の乱数データとしてラッチ
する。The data selector 3 selects the addition result from the adder 2 and latches it into the latch 4 as the next random number data.
以下、上述の動作を繰り返して、初期の設定乱数データ
にアドレス信号とデータ信号の組合せたランダムな組合
わせデータを順次加算した疑似乱数データを生成するこ
とができる。Thereafter, by repeating the above-described operations, pseudo-random number data can be generated by sequentially adding random combination data of an address signal and a data signal to the initial setting random number data.
このように本実施例によれば初期の16ビツトの設定デ
ータにランダムな5ビツトの組合わせデータを加算して
疑似乱数を発生するようにしているので、発生する乱数
か大きく変化することなくコンピュータゲームに利用す
るのに適している。In this way, according to this embodiment, pseudo-random numbers are generated by adding random 5-bit combination data to the initial 16-bit setting data, so that the generated random numbers can be used by the computer without significantly changing. Suitable for use in games.
また、乱数の初期値を設定することができ、しかもアド
レス信号とデータ信号を用いた組合わせデータを加算し
ているので、同一プログラムであれば同一パターンの疑
似乱数を再現して発生することができる。また、興なる
プログラムであれば異なるパターンの疑似乱数を発生さ
せることができる。In addition, the initial value of the random number can be set, and since the combined data using the address signal and data signal is added, the same program can reproduce and generate the same pattern of pseudo-random numbers. can. Furthermore, if the program is interesting, it is possible to generate pseudo-random numbers of different patterns.
本発明は上記実施例に限らず種々の変形が可能である。The present invention is not limited to the above embodiments, and various modifications are possible.
例えば、上記実施例では、アドレス信号の下位2ビツト
を上位2ビツトとし、データ信号の下位3ビツトの下位
3ビツトとして組合わせデータを構成したが、アドレス
信号及びデータ信号のビット数や組合わせ方はいがなる
ビット数及び組合わせ方でもよい。For example, in the above embodiment, the combined data is configured as the lower 2 bits of the address signal as the upper 2 bits and the lower 3 bits of the data signal as the lower 3 bits. The number of bits and the combination of bits that result in a positive result may be used.
また、上記実施例ではデータストローブ信号の立上がり
で組合せデータをラッチしたが、メモリリクエスト信号
やバスサイクル信号、IOリクエスト信号等の他のコン
トロール信号に同期してラッチするようにしてもよい。Further, in the above embodiment, the combination data is latched at the rising edge of the data strobe signal, but it may be latched in synchronization with other control signals such as a memory request signal, a bus cycle signal, an IO request signal, etc.
[発明の効果]
以上の通り1本発明によれば、特にコンピュータゲーム
に使用するのに適した再現性のある疑似乱数を発生する
ことができる6[Effects of the Invention] As described above, 1. According to the present invention, pseudorandom numbers with reproducibility particularly suitable for use in computer games can be generated6.
第1図は本発明の一実施例による乱数発生装置のブロッ
ク図、
第2図は本発明の一実施例による乱数発生装置のタイム
チャートである。
図において、
1・・・ラッチ
2・・・アダー
3・・・データセレク
4・・・ラッチ
5・・・バッファ
タ
出願人 株式会社セガ・エンターブライゼス代理人 弁
理士 北 野 好 人特
手続補正書(方式)
%式%
事件の表示
平成2年特許願第264474号
発明の名称
乱数発生装置
補正をする者
事件との関係 特許出願人
株式会社 セガ・エンタープライゼスFIG. 1 is a block diagram of a random number generator according to an embodiment of the present invention, and FIG. 2 is a time chart of a random number generator according to an embodiment of the present invention. In the figure, 1... Latch 2... Adder 3... Data select 4... Latch 5... Buffata Applicant SEGA Enterprises Co., Ltd. Agent Patent attorney Yoshi Kitano Personal special procedure amendment (Method) % formula % Display of the case 1990 Patent Application No. 264474 Name of the invention Random number generator corrector Relationship with the case Patent applicant SEGA Enterprises Co., Ltd.
Claims (1)
の所定のデータ信号との組合わせデータを、コントロー
ルバス中の所定のコントロール信号に同期してラッチす
る第2のラッチと、 前記第1のラッチにラッチされた乱数データと前記第2
のラッチにラッチされた組合わせデータとを加算する加
算器とを有し、 前記加算器の加算結果を乱数データとして前記第1のラ
ッチにラッチすることを特徴とする乱数発生装置。 2、請求項1記載の乱数発生装置において、前記データ
バスからの設定乱数データと前記加算器の加算結果とを
選択し、前記第1のラッチに出力するセレクタを有し、 前記セレクタにより前記設定乱数データを選択すること
により、発生する乱数の初期値を設定することを特徴と
する乱数発生装置。[Claims] 1. A first latch that latches generated random number data; and a first latch that latches the generated random number data; and a first latch that latches the generated random number data; a second latch that latches in synchronization with a predetermined control signal; and random number data latched in the first latch and the second latch.
an adder for adding combination data latched to a latch, and latching the addition result of the adder to the first latch as random number data. 2. The random number generator according to claim 1, further comprising a selector that selects the set random number data from the data bus and the addition result of the adder and outputs the selected random number data to the first latch, A random number generation device characterized in that an initial value of a random number to be generated is set by selecting random number data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2264474A JP2982974B2 (en) | 1990-10-02 | 1990-10-02 | Random number generator |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2264474A JP2982974B2 (en) | 1990-10-02 | 1990-10-02 | Random number generator |
Publications (2)
Publication Number | Publication Date |
---|---|
JPH04140828A true JPH04140828A (en) | 1992-05-14 |
JP2982974B2 JP2982974B2 (en) | 1999-11-29 |
Family
ID=17403728
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2264474A Expired - Fee Related JP2982974B2 (en) | 1990-10-02 | 1990-10-02 | Random number generator |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2982974B2 (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6871206B2 (en) * | 2001-11-20 | 2005-03-22 | Ip-First, Llc | Continuous multi-buffering random number generator |
US7136991B2 (en) | 2001-11-20 | 2006-11-14 | Henry G Glenn | Microprocessor including random number generator supporting operating system-independent multitasking operation |
US7139785B2 (en) | 2003-02-11 | 2006-11-21 | Ip-First, Llc | Apparatus and method for reducing sequential bit correlation in a random number generator |
US7149764B2 (en) | 2002-11-21 | 2006-12-12 | Ip-First, Llc | Random number generator bit string filter |
US7165084B2 (en) | 2002-11-20 | 2007-01-16 | Ip-First, Llc. | Microprocessor with selectivity available random number generator based on self-test result |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS5736344A (en) * | 1980-08-13 | 1982-02-27 | Nec Corp | Random number generating equipment |
JPS6240648U (en) * | 1985-08-28 | 1987-03-11 |
-
1990
- 1990-10-02 JP JP2264474A patent/JP2982974B2/en not_active Expired - Fee Related
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS5736344A (en) * | 1980-08-13 | 1982-02-27 | Nec Corp | Random number generating equipment |
JPS6240648U (en) * | 1985-08-28 | 1987-03-11 |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6871206B2 (en) * | 2001-11-20 | 2005-03-22 | Ip-First, Llc | Continuous multi-buffering random number generator |
US7136991B2 (en) | 2001-11-20 | 2006-11-14 | Henry G Glenn | Microprocessor including random number generator supporting operating system-independent multitasking operation |
US7219112B2 (en) | 2001-11-20 | 2007-05-15 | Ip-First, Llc | Microprocessor with instruction translator for translating an instruction for storing random data bytes |
US7334009B2 (en) | 2001-11-20 | 2008-02-19 | Ip-First, Llc | Microprocessor with random number generator and instruction for storing random data |
US7712105B2 (en) | 2001-11-20 | 2010-05-04 | Ip-First, Llc. | Microprocessor including random number generator supporting operating system-independent multitasking operation |
US7818358B2 (en) | 2001-11-20 | 2010-10-19 | Ip-First, Llc | Microprocessor with random number generator and instruction for storing random data |
US7849120B2 (en) | 2001-11-20 | 2010-12-07 | Ip-First, Llc | Microprocessor with random number generator and instruction for storing random data |
US8296345B2 (en) | 2001-11-20 | 2012-10-23 | Ip-First, Llc | Microprocessor with selectively available random number generator based on self-test result |
US7165084B2 (en) | 2002-11-20 | 2007-01-16 | Ip-First, Llc. | Microprocessor with selectivity available random number generator based on self-test result |
US7174355B2 (en) | 2002-11-20 | 2007-02-06 | Ip-First, Llc. | Random number generator with selectable dual random bit string engines |
US7149764B2 (en) | 2002-11-21 | 2006-12-12 | Ip-First, Llc | Random number generator bit string filter |
US7139785B2 (en) | 2003-02-11 | 2006-11-21 | Ip-First, Llc | Apparatus and method for reducing sequential bit correlation in a random number generator |
Also Published As
Publication number | Publication date |
---|---|
JP2982974B2 (en) | 1999-11-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JPH0480350B2 (en) | ||
JPH053032B2 (en) | ||
JPH04140828A (en) | Random number generating device | |
US5567900A (en) | Electronic tone generator system with CPU and DSP | |
US5614685A (en) | Digital signal processor for musical tone synthesizers and the like | |
JPH0542031B2 (en) | ||
JP2976276B2 (en) | Timing generator | |
JPH1194920A (en) | Pattern generator for semiconductor testing device | |
JP3542828B2 (en) | Test pattern generator | |
JP3531208B2 (en) | Digital signal processor | |
JPS6055589A (en) | Control system of memory | |
JP3381284B2 (en) | Parameter writing device | |
JPH07220499A (en) | Pattern generator | |
JP3119382B2 (en) | Waveform shaping circuit for semiconductor test equipment | |
JP3127492B2 (en) | Addressing arithmetic circuit | |
JPH01258130A (en) | Pseudo random number generator | |
JP2005149412A (en) | Memory shuffling device, memory shuffling method and program | |
JPH0511024A (en) | Data generating system for ic tester | |
JP3104281B2 (en) | Music generator | |
JPH09114779A (en) | Wait control system for information processor | |
JPS62259145A (en) | Generating device for algorithmic pattern | |
JP2003216416A (en) | Logical operation circuit | |
JPS5698796A (en) | High-speed memory test system | |
JPH05241795A (en) | M-series random number generation system | |
JPH0573636A (en) | Clock event generation system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
LAPS | Cancellation because of no payment of annual fees |