Sets the random seed used by cpct_getRandomUniform_u8_f.
void cpct_setRandomSeedUniform_u8 (u8 seed) __z88dk_fastcall;
(1B L) seed | New seed to be set for the random number generator. |
call cpct_setRandomSeedUniform_u8_asm
This function sets the random seed that cpct_getRandomUniform_u8_f uses internally for generating pseudo-random numbers. This can be used to randomize the start of the pseudo-random sequence or to make it predictable (setting the same seed again).
Please, do read documentation from cpct_getRandomUniform_u8_f for more details about how this random generator works.
A
2 bytes
Case | microSecs (us) | CPU Cycles ----------------------------------------- Any | 7 | 28 -----------------------------------------
Random generation original code comes from Fast RND, which can be found published by z80-info. The original code is reported to be from Spectrum ROM.