diff --git a/src/fx/fx.hgr.fizzle.a b/src/fx/fx.hgr.fizzle.a index 096a1dc51..8db424b38 100644 --- a/src/fx/fx.hgr.fizzle.a +++ b/src/fx/fx.hgr.fizzle.a @@ -1,71 +1,46 @@ ;license:MIT -;(c) 2017-2018 by qkumba +;(c) 2017-2021 by qkumba/4am/John Brooks !cpu 6502 !to "build/FX.INDEXED/FIZZLE",plain *=$6000 - ;init RNG - - ldx #1 - stx @rnd1+1 + ldx #(end-start+1) ; copy LFSR code to zero page +- ldy start-2, x + sty $FE, x dex - stx @rnd2+1 - - ;iterate - -@loop - ldy @rnd1+1 - ldx @rnd2+1 - lsr @rnd2+1 - ror @rnd1+1 - bcc + - - ;feedback polynomial forms #$100D for period of 8191 - - lda @rnd1+1 - eor #$0d - sta @rnd1+1 - lda @rnd2+1 - eor #$10 - sta @rnd2+1 - - ;little hack to avoid missing offset zero - ;screen hole at $xxFF is missed instead - -+ tya - eor #$ff - sta $26 - sta $3c - txa - - ;target page 1 + bne - + jmp loop +start +!pseudopc 0 { + ;X=0 + ;Y=0 +loop txa +loop1 eor #$1B ; LFSR form 0x1B00 with period 8191 +wait dex + bne wait + tax +loop2 txa ora #$20 - sta $27 + sta