I noticed this bit of code that Eric Ball posted in another thread:
; simple 8 bit LFSR (RANDOM is a byte in Zero Page RAM) RAND LDA RANDOM BEQ XSEED LSR BCC SRAND XSEED EOR #$A9 SRAND STA RANDOM RTS... which is a nice piece of code... but I think I'm going to need something a little more random than that. Otherwise, every time you start the game, you'll get the exact same sequence of button presses, which wouldn't be very fun at all.
So what's the best way to go about this? Would it be a decent idea to start a timer when the VCS turns on, and then when the reset button is pressed, read the timer and use it to seed this LFSR? Or what if I read one of the RAM addresses before they're initialized, and use that to seed the LFSR?
--Zero













