From 33a4d55ed16081a8c9fedeef1716e35a913382f8 Mon Sep 17 00:00:00 2001 From: 4am Date: Mon, 14 Oct 2019 23:37:29 -0400 Subject: [PATCH] some wipes --- res/fx.conf | 2 +- src/fx/fx.hgr.and.a | 44 +++++++++++++++ src/fx/fx.hgr.lr.by.pixel.a | 110 ++++++++++++++++++++++++++++++++++++ 3 files changed, 155 insertions(+), 1 deletion(-) create mode 100644 src/fx/fx.hgr.and.a create mode 100644 src/fx/fx.hgr.lr.by.pixel.a diff --git a/res/fx.conf b/res/fx.conf index 8383c3128..e39d45862 100644 --- a/res/fx.conf +++ b/res/fx.conf @@ -1 +1 @@ -RIPPLE DIAGONAL STAGGERWHITE.UD STAR RADIAL FIZZLE CRYSTAL SUNRISE SUNSET CORNER.CIRCLE RIPPLE2 RADIAL2 RADIAL3 RADIAL4 RADIAL5 FOURSPIRAL IRIS SPLIT.UD.INTRO CHECKERBOARD HALF.FIZZLE BAR.DISSOLVE STAGGERWHITE.LR DIAMOND ONESQUARE TWOPASS.LR HALF.MOSAIC STAGGER.LR FOURSQUARE STAGGER.UD INTERLOCK.LR BLOCK.MOSAIC INTERLOCK.UD BLOCK.FIZZLE SPIRAL STARWHITE [eof] # # transition effects for HGR slideshows # # Each Mega-Attract Module that is an HGR slideshow (see attract.conf) # will use a single transition effect for the length of the module. # Transition effects are loaded in the order listed in this file. Each line # of this file is a filename (not including comments, like this one). The # name of the next transition effect is stored in the global prefs, so this # file should not contain duplicates. # # Transition effects are binary files loaded at $6000 and called with # hi-res page 1 showing and the next HGR graphic already loaded at $4000. # A transition effect has full use of main memory, including zero page and # text page if needed. LC RAM banks 1 and 2 are reserved for the launcher. # # Important: LC RAM bank 1 will be read/write on entry and must be read/write # on exit. If you need ROM routines, you are responsible for switching to ROM # then switching back to RAM bank 1 (read/write) before returning. # \ No newline at end of file +RIPPLE LR.BY.PIXEL DIAGONAL STAGGERWHITE.UD STAR RADIAL FIZZLE CRYSTAL SUNRISE SUNSET CORNER.CIRCLE RIPPLE2 RADIAL2 RADIAL3 RADIAL4 RADIAL5 FOURSPIRAL IRIS AND SPLIT.UD.INTRO CHECKERBOARD HALF.FIZZLE BAR.DISSOLVE STAGGERWHITE.LR DIAMOND ONESQUARE TWOPASS.LR HALF.MOSAIC STAGGER.LR FOURSQUARE STAGGER.UD INTERLOCK.LR BLOCK.MOSAIC INTERLOCK.UD BLOCK.FIZZLE SPIRAL STARWHITE [eof] # # transition effects for HGR slideshows # # Each Mega-Attract Module that is an HGR slideshow (see attract.conf) # will use a single transition effect for the length of the module. # Transition effects are loaded in the order listed in this file. Each line # of this file is a filename (not including comments, like this one). The # name of the next transition effect is stored in the global prefs, so this # file should not contain duplicates. # # Transition effects are binary files loaded at $6000 and called with # hi-res page 1 showing and the next HGR graphic already loaded at $4000. # A transition effect has full use of main memory, including zero page and # text page if needed. LC RAM banks 1 and 2 are reserved for the launcher. # # Important: LC RAM bank 1 will be read/write on entry and must be read/write # on exit. If you need ROM routines, you are responsible for switching to ROM # then switching back to RAM bank 1 (read/write) before returning. # \ No newline at end of file diff --git a/src/fx/fx.hgr.and.a b/src/fx/fx.hgr.and.a new file mode 100644 index 000000000..f01afd07c --- /dev/null +++ b/src/fx/fx.hgr.and.a @@ -0,0 +1,44 @@ +;license:MIT +;(c) 2018 by 4am +; +!cpu 6502 +!to "build/FX/AND",plain +*=$6000 + +i = $ff + + lda #$06 + sta i +@outerloop + dec i + bpl + +@exit rts ++ ldx i + lda masks,x + sta @mask + ldx #$40 + stx @src + ldx #$20 + stx @dest + ldy #0 +@innerloop +@src=*+2 + lda $FD00,y ; SMC +@mask=*+1 + and #$FD ; SMC +@dest=*+2 + sta $FD00,y ; SMC + iny + bne @innerloop + inc @src + inc @dest + dex + bne @innerloop + lda #$30 + jsr WaitForKeyWithTimeout + bmi @exit + bpl @outerloop ; always branches +masks + !byte $FF,$BF,$9F,$8F,$87,$83,$81 + !source "src/wait.a" + !source "src/fx/fx.hgr.common.a" diff --git a/src/fx/fx.hgr.lr.by.pixel.a b/src/fx/fx.hgr.lr.by.pixel.a new file mode 100644 index 000000000..77e446b46 --- /dev/null +++ b/src/fx/fx.hgr.lr.by.pixel.a @@ -0,0 +1,110 @@ +;license:MIT +;(c) 2018 by 4am +; +!cpu 6502 +!to "build/FX/LR.BY.PIXEL",plain +*=$6000 + +maskindex = $fd +row = $fe +col = $ff + +@jump + jmp @copy ; skip clear the first time + + ;clear + lda #$27 + sta col +@clearcolloop + lda #$06 + sta maskindex +@clearmaskloop + ldx maskindex + lda clearmasks,x + sta @clearmask + lda #$17 + sta row +@clearrowloop + lda row + asl + asl + asl + jsr HGRCalc + clc + ldx #$08 + ldy col +@clearblockloop + lda ($26),y +@clearmask=*+1 + and #$FD ; SMC + sta ($26),y + lda $27 + adc #4 + sta $27 + dex + bne @clearblockloop + dec row + bpl @clearrowloop + lda #8 + jsr WaitForKeyWithTimeout + bmi @exit + dec maskindex + bpl @clearmaskloop + dec col + bpl @clearcolloop + +@copy + lda #$2C ; BIT opcode + sta @jump ; don't skip clear after first time + + ; copy + lda #$00 + sta col +@colloop + lda #$06 + sta maskindex +@maskloop + ldx maskindex + lda copymasks,x + sta @mask + lda #$17 + sta row +@rowloop + lda row + asl + asl + asl + jsr HGRCalc + clc + ldx #$08 + ldy col +@blockloop + lda ($3c),y +@mask=*+1 + and #$FD ; SMC + sta ($26),y + lda $27 + adc #4 + sta $27 + eor #$60 + sta $3d + dex + bne @blockloop + dec row + bpl @rowloop + lda #8 + jsr WaitForKeyWithTimeout + bmi @exit + dec maskindex + bpl @maskloop + inc col + lda col + cmp #40 + bne @colloop +@exit rts +clearmasks + !byte $80,$81,$83,$87,$8F,$9F,$BF +copymasks + !byte $FF,$BF,$9F,$8F,$87,$83,$81 + !source "src/wait.a" + !source "src/fx/fx.hgr.common.a"