This video shows an example of pseudo-random number generation on Amstrad CPC using CPCtelera functions. Left video uses a simple linear congruential method, same as ZX Spectrum's ROM random generator. Center video uses Galois Linear-feedback Shift Register, which gives much better distribution and period with similar performance. Finally, right video shows a combination of both methods yielding really great quality 16-bit randomness with low resources (less than 50 microseconds per random number).
All these functions are included in CPCtelera. Here you are the links for the engine and source code:
Example code: https://github.com/lronaldo/cpctelera...
CPCtelera webpage: http://lronaldo.github.io/cpctelera/
CPCtelera master branch at github: https://github.com/lronaldo/cpctelera/
Good quality random number generation on Amstrad CPC mega drive novo | |
| 7 Likes | 7 Dislikes |
| 312 views views | 2.28K followers |
| Science & Technology Creative Commons Attribution licence (reuse allowed) | Upload TimePublished on 18 Oct 2015 |
No comments:
Post a Comment