Module mt

Module mt 

Source
Expand description

Python’s random.Random(seed) for an integer seed, as far as the reference’s power_on_seed uses it: the Mersenne Twister MT19937 seeded by init_by_array over the seed’s 32-bit words, and getrandbits(k) for k <= 32 (the top k bits of one output).

Not a module of the reference: Rust has no random, and a seeded power-on must give the same RAM, VRAM, sprite table and colour table on both boards. Written from the algorithm’s published description (Matsumoto and Nishimura, 1998, and the 2002 init_by_array).

Structs§

PythonRandom