[Coco] Tandy Color Computer 3 RND Function

pfitchjr at bellsouth.net pfitchjr at bellsouth.net
Thu Mar 26 22:46:46 EDT 2020


Re --> AM signal
I think there are a lot of 'old' smart dudes reading that and going, if only I had thought of that 35 years ago...

-----Original Message-----
From: Coco <coco-bounces at maltedmedia.com> On Behalf Of Melanie and John Mark Mobley
Sent: Thursday, March 26, 2020 10:29 PM
To: 'CoCoList for Color Computer Enthusiasts' <coco at maltedmedia.com>
Subject: Re: [Coco] Tandy Color Computer 3 RND Function

Jim Okeefe,

I think you can pick up atmospheric noise on an AM or shortwave radio.  Select a spot between stations and listen to the noise.  Take analog-to-digital samples of the noise and take the least significant bit of the samples and build a number out of the least significant bits.  Then take that number and seed your pseudo random number generator.  Then reseed your pseudo random number generator every 10 minutes or so.

On the Tandy Color Computer you can plug an AM radio (tuned to noise) in to the cassette port, and sample the data off of the cassette port.  This is a 1-bit signal.  So shift one bit at time into an accumulator until you have a 16 bit number, store this number in a float called NUMBER, and then call R=RND(-NUMBER).  This will seed the pseudo random number generator.  Or you can use the 16-bit number directly.

If you have joysticks on the joystick ports then there position is somewhat random.  The last character read from the serial port is somewhat random.  If you go out on internet and capture the temperature of 10 cities and use this data as a random number.  How long it takes to ping Google is somewhat random.  The time between two key presses is random.  The value of the stack pointer at the next timer interrupt is somewhat random.  If you have the user type in the number of players and then call R=RND(-TIMER) then that is random.

You can point a camera at a lava lamp or an fish aquarium.  And capture the least significant bits off of all the pixels and use those as random numbers.

You can use a radiation detector as a random source of data.

-John Mark Mobley



-- 
Coco mailing list
Coco at maltedmedia.com
https://pairlist5.pair.net/mailman/listinfo/coco



More information about the Coco mailing list