[stella] Random Numbers

Subject: [stella] Random Numbers
From: Erik Mooney <emooney@xxxxxxxxxxxxxxxx>
Date: Wed, 14 Feb 2001 13:26:01 -0500
On Wed, 14 Feb 2001 12:30:52 -0500, you wrote:

>On Wed, 14 Feb 2001 17:09:12 +0100, you wrote:
>>4 - Enabled the Missile to display something that, nearly but not 
>>    totally, looks different than a pistol (#1)
>>#1 Uhm, I read the german translation of 'The Restaurant At The End Of
>>The Universe' and tried to re-translate that joke. If it shows no
>>similarity to the original words at all now, it's only 50% my fault.
>The wording was a bit different - the original was "a liquid that was
>almost, but not quite, entirely unlike tea", but the joke was quite
>recognizable :)

Whoops, I did not mean to cc the list on that, so sorry to clutter up with
both that message and this one :)

Andrew Davie wrote:

>elegant).  ESPECIALLY when using a dodgy random number routine which isn't
>really nearly random at all.

>        ; Generate a pseudo-random number
>       lda rnd
>       lsr
>       lsr
>       sbc rnd
>       lsr
>       ror rnd+1
>       ror rnd
>       ror rnd
>       rts

Anyways, to make this post have some useful content, yes, that is a
horrible random number generator :)  If I read the source correctly, rnd+1
is a byte that holds a bunch of flags for the game state.  Very not
For a mathematically sound random number generator that fits well on the
2600 (although requiring 4 bytes of RAM), see my post from way back when
at http://www.biglist.com/lists/stella/archives/199703/msg00296.html .  (I
tried finding my sources for that on the web with no success.)

Archives (includes files) at http://www.biglist.com/lists/stella/archives/
Unsub & more at http://www.biglist.com/lists/stella/

Current Thread