txgx42 / applesoft-lite

15 stars 6 forks source link

Document how to best seed the random number generator #1

Open mobluse opened 2 years ago

mobluse commented 2 years ago

In Applesoft BASIC for Apple II you seed the random number generator using: LET R=RND(-PEEK(78)-PEEK(79)*256) but this doesn't seem to work with Applesoft Lite. I think the best way to seed the random number generator in Applesoft Lite should be documented.

nippur72 commented 2 years ago

I think this feature has been dropped, the RDKEY routine in applesoft-lite doesn't update the locations 78 and 79, so it's not possible to set a random seed (in a easy way)

nippur72 commented 2 years ago

I have added this feature in my fork for the SD Card interface, see https://github.com/nippur72/applesoft-lite-sdcard