random seed initialization added, tweaked sequence generation

This commit is contained in:
FeralChild64 committed 2020-02-19 16:55:51 +01:00
1 parent 103325cc53
commit de605cd5ee
7 files changed
+119 -9

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
// #LAYOUT# STD * #TAKE
// #LAYOUT# * BASIC_0 #TAKE
// #LAYOUT# * * #IGNORE
//
// Random number generator routine
//
// Input:
// - .A (0 - reinitialize the seed with random value, $80 or above - create seed from FAC1)
//
// Output:
// - FAC1
//
// See also:
// - https://www.atarimagazines.com/compute/issue72/random_numbers.php
//
rnd_A:
cmp #$00
beq_16 rnd_seed_init
cmp #$80
bcc_16 rnd_generate
jmp rnd_seed_from_FAC1