diff --git a/res/FX.CONF b/res/FX.CONF index c6aeffb87..5825bc964 100644 --- a/res/FX.CONF +++ b/res/FX.CONF @@ -106,6 +106,7 @@ LITTLE.BOXES SPIRAL WAVY.CORNER REDLINES +CHECKERB.FIZZLE [eof] # diff --git a/src/fx/fx.hgr.checkerboard.fizzle.a b/src/fx/fx.hgr.checkerboard.fizzle.a new file mode 100644 index 000000000..09fbce80f --- /dev/null +++ b/src/fx/fx.hgr.checkerboard.fizzle.a @@ -0,0 +1,153 @@ +;license:MIT +;(c) 2020 by 4am + +!cpu 6502 +!to "build/FX/CHECKERB.FIZZLE",plain +*=$6000 + +addrs = $6100 ; [256 bytes, page-aligned] +copymasks = $6200 ; [128 bytes, should not cross page boundary] +shapemaskaddrs = $6300 ; [256 bytes, page-aligned] +hgrlo = $6400 ; [$C0 bytes, should not cross page boundary] +hgrhi = $6500 ; [$C0 bytes, should not cross page boundary] +shapemask = $8000 ; [$2000 bytes, page-aligned] + + ldx #0 ; build an HGR base address lookup table, +- txa ; except the first address is |shapemask| instead of $2000 + and #$F8 + bpl + + ora #5 ++ asl + bpl + + ora #5 ++ asl + asl + sta hgrlo,x + txa + and #7 + rol + asl hgrlo,x + rol + ora #>shapemask + sta hgrhi,x + inx + cpx #$C0 + bne - + + ldx #0 ; create shapemask table +-- lda hgrlo, x + sta $FE + lda hgrhi, x + sta $FF + txa + lsr + lsr + lsr + lsr + lsr + lsr + lda #%00000000 + bcc + + eor #%11111111 ++ ldy #$27 +- eor #%11111111 + sta ($FE), y + dey + sta ($FE), y + dey + sta ($FE), y + dey + sta ($FE), y + dey + sta ($FE), y + dey + sta ($FE), y + dey + sta ($FE), y + dey + sta ($FE), y + dey + bpl - + inx + cpx #$C0 + bne -- + + ldx #(end-start) ; copy LFSR code to zero page +- lda start-1, x + sta $0, x + dex + bne - + + clc ; create shapemaskaddrs lookup table +-- ldy #$20 + lda #>shapemask +- sta shapemaskaddrs, x + adc #1 + inx + dey + bne - + txa + bne -- + + lda #%00000011 ; create copymask lookup table +-- ldy #$20 + ora #%10000000 +- sta copymasks, x + inx + dey + bne - + asl + asl + bne -- + tax ; X=0 + clc +-- ldy #$20 ; create address lookup table + tya +- sta addrs, x + adc #1 + inx + dey + bne - + txa + bne -- + jsr $1 + lda $4000 ; last lousy byte (because LFSR never hits 0) + sta $2000 + lda #$2C ; BIT + sta