[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Random Number Question
Toinet wrote:
If I recall correctly, I used to use the VBL softswitch to get a
pseudo random number.
I would change line 20: 20 CALL 768 where the $300 address would read
the VBL softswitch, perform several arithmetic operations with it and
the $4E..$4F zero page values.
This is only random if some nondeterministic delay occurs between
readings, like a user interaction.
The video scanner is reset simultaneously with the Apple processor,
and they are clocked from the same clock, so they will have a completely
deterministic relationship unless something intervenes.
I was hoping that the scanner was not reset at power-up, so I could
get about 7-8 bits of entropy by timing to VBL, but it doesn't work.
-michael
NadaPong: Network game demo for Apple II computers!
Home page: http://members.aol.com/MJMahon/
"The wastebasket is our most important design
tool--and it's seriously underused."