Jump to content



0

random generator for a7800


2 replies to this topic

#1 Heaven/TQA OFFLINE  

Heaven/TQA

    Quadrunner

  • 8,109 posts
  • Location:Baden-Württemberg, Germany

Posted Fri Nov 23, 2001 12:57 AM

hi guys,

before i search heavily the net...

do you have a working random number generator in assembler for atari 7800 which works and is flexible enough, f.e.

i need esp. one for numbers between 0-15...

my lovely atari 800 has the adress 53770 where you get a random number between 0-255...

#2 Eckhard Stolberg OFFLINE  

Eckhard Stolberg

    Dragonstomper

  • 882 posts
  • Location:Germany

Posted Fri Nov 23, 2001 7:33 AM

The random number generator in the Atari 800 is located in the POKEY, so if you'd use the Ballblazer board, you would get the same functionality. But the POKEY just provides a part of one of the LSFRs (linear shift feedback register), that is used for generating the sound output, as the random number. So if you search for LSFR on the net, you should find some information about generating pseudo random numbers.

On the Stella mailing list this has been discussed several times, including some examples for the VCS. So maybe you should have a look at the archive.

But if you just need numbers between 0 and 15, a simple counter between user interactions might be good enough depending on the game you are going to write.


Ciao, Eckhard Stolberg

#3 Heaven/TQA OFFLINE  

Heaven/TQA

    Quadrunner

  • 8,109 posts
  • Location:Baden-Württemberg, Germany

Posted Sat Nov 24, 2001 3:57 AM

thanks eckhart! found it...

so...now the engine could be started... :=)

btw. eckhard, one of your hobbies must be definitly coding on 2600 ;=) referring to stella mailing list...




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users