User Tools

Site Tools


base:16bit_xorshift_random_generator

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
base:16bit_xorshift_random_generator [2019-05-10 21:43]
vsariola
base:16bit_xorshift_random_generator [2019-08-12 15:41] (current)
ftc Standardized format of the heading
Line 1: Line 1:
-=== 16-bit "​798"​ Xorshift ===+====== 16-bit "​798"​ Xorshift ======¬†
   * original idea: [[https://​www.jstatsoft.org/​article/​view/​v008i14|George Marsaglia]]   * original idea: [[https://​www.jstatsoft.org/​article/​view/​v008i14|George Marsaglia]]
   * idea for fast 8-bit implementation:​ [[http://​www.retroprogramming.com/​2017/​07/​xorshift-pseudorandom-numbers-in-z80.html|John Metcalf]]   * idea for fast 8-bit implementation:​ [[http://​www.retroprogramming.com/​2017/​07/​xorshift-pseudorandom-numbers-in-z80.html|John Metcalf]]
Line 31: Line 32:
         STA rng_zp_high         STA rng_zp_high
         ...         ...
-        ; the RNG, you can get 8-bit random numbers in A, leaves ​X/Y unchanged+        ; the RNG. You can get 8-bit random numbers in A or 16-bit numbers¬†
 +        ; from the zero page addresses. Leaves ​X/Y unchanged.
 random ​ LDA rng_zp_high random ​ LDA rng_zp_high
         LSR         LSR
Line 49: Line 51:
  
 {{:​base:​xorshift_798_results.png?​400|}} {{:​base:​xorshift_798_results.png?​400|}}
- 
  
base/16bit_xorshift_random_generator.1557517432.txt.gz · Last modified: 2019-05-10 21:43 by vsariola