Re: [stella] entropy & randomness

Subject: Re: [stella] entropy & randomness
From: Mark De Smet <de-smet@xxxxxxxxxxxxxxx>
Date: Wed, 10 Oct 2001 23:28:33 -0500 (CDT)
> The _TTL Cookbook_ only goes up to 31 stages, and they suggest bits 28 and 
> 31 so that is what I will use as well on my 6502 code example.

On a side note, does anyone know of any maximal length sets(sets where
there are 2^n-1 iterations to repear) with n (much) larger?  I have a
project which uses 36, but I'd like to make it much longer for geekiness
value(to be able to say it won't repeat for the life of the universe).  My
register is 242 bits, so anything between 36 and 242 would be helpful.

> As for seeding it, I suggest this method.  It seems to work very effectively.
> Note I also initialize the 2600 at the same time by writing 000h to all 
> zeropage addresses, and I set the SP to 0ffh.

Another way to set a seed is to have a counter incrementing every frame,
and wait until the player presses reset, then take the counter value.

In simon, I wanted true randomness, so I keep that counter going through
out the game, and sampled whenever the player pressed the joystick.  
Given that I only needed a 2 bit random number, and the presumption that
the player cannot control when she presses the button to within 1/15 of a
second, it becomes a true random number based on the player response.  Of
course this method depends on needing a sufficiently small number of bits,
and that the game garuntees that the player presses the button at least
once before every time you need a new number.


Archives (includes files) at
Unsub & more at

Current Thread