From e1bcdc25b5da25e21dd48da739ec76500acebcc0 Mon Sep 17 00:00:00 2001 From: 4am Date: Fri, 18 Oct 2019 12:08:09 -0400 Subject: [PATCH] some wipes --- res/fx.conf | 2 +- src/fx/diagonal4.a | 97 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 98 insertions(+), 1 deletion(-) create mode 100644 src/fx/diagonal4.a diff --git a/res/fx.conf b/res/fx.conf index 7da5c92f4..ee70c3db2 100644 --- a/res/fx.conf +++ b/res/fx.conf @@ -1 +1 @@ -RIPPLE STARWHITE DIAGONAL STAGGERWHITE.UD RADIAL STAGGER.LR SOFT.UD BIT.FIZZLE MEETINTHEMIDDLE CRYSTAL R.BY.PIXEL SUNRISE DIAGONAL2 SUNSET CORNER.CIRCLE RIPPLE2 RADIAL2 SPLIT.UD.INTRO HALF.FIZZLE RADIAL3 DIAGONAL3 BAR.DISSOLVE FOURSPIRAL IRIS CASCADE AND CHECKERBOARD LR.BY.PIXEL RADIAL4 STAGGERWHITE.LR SOFT.UD.OUT ONESQUARE FIZZLE STAR DIAMOND TWOPASS.LR HALF.MOSAIC RADIAL5 FOURSQUARE STAGGER.UD INTERLOCK.LR SOFT.UD.IN BLOCK.MOSAIC INTERLOCK.UD BLOCK.FIZZLE SPIRAL [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 STARWHITE DIAGONAL STAGGERWHITE.UD RADIAL STAGGER.LR SOFT.UD BIT.FIZZLE MEETINTHEMIDDLE CRYSTAL R.BY.PIXEL SUNRISE DIAGONAL2 SUNSET CORNER.CIRCLE RIPPLE2 RADIAL2 SPLIT.UD.INTRO HALF.FIZZLE RADIAL3 DIAGONAL3 BAR.DISSOLVE FOURSPIRAL IRIS CASCADE AND CHECKERBOARD LR.BY.PIXEL RADIAL4 STAGGERWHITE.LR SOFT.UD.OUT ONESQUARE FIZZLE STAR DIAMOND TWOPASS.LR HALF.MOSAIC RADIAL5 FOURSQUARE DIAGONAL4 STAGGER.UD INTERLOCK.LR SOFT.UD.IN BLOCK.MOSAIC INTERLOCK.UD BLOCK.FIZZLE SPIRAL [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/diagonal4.a b/src/fx/diagonal4.a new file mode 100644 index 000000000..672175e05 --- /dev/null +++ b/src/fx/diagonal4.a @@ -0,0 +1,97 @@ +;license:MIT +;(c) 2019 by 4am +; +!cpu 6502 +!to "build/FX/DIAGONAL4",plain +*=$6000 + +counter = $fc +row = $fd +col = $fe +tmp = $ff + + ldx #7 +- lda copymasks,x + eor #%11111111 + sta sourcemasks,x + dex + bpl - + lda #(40+24) + sta counter + + lda #39 + sta col +@colloop + lda #0 + sta row + ldy col +@rowloop + tya + bmi + + cpy #40 + bcs + + lda row + jsr HGRDiagonalBlockCopyWithGuards ++ iny + bmi + + cpy #40 + bcs + + lda row + jsr HGRBlockCopy ++ + inc row + lda row + cmp #24 + bcc @rowloop + lda #64 + jsr WaitForKeyWithTimeout + bmi @exit + dec col + dec counter + bne @colloop +@exit rts + +HGRDiagonalBlockCopyWithGuards +; in: A = HGR row / 8 (0x00..0x17) +; Y = HGR column (0x00..0x27) +; out: Y preserved +; A/X clobbered +; tmp clobbered + asl + asl + asl + jsr HGRCalc + clc + tya + bmi @exit + ldx #7 +@loop + lda ($26),y + and sourcemasks,x + sta tmp + lda ($3c),y + and copymasks,x + ora tmp + sta ($26),y + lda $27 + adc #$04 + sta $27 + eor #$60 + sta $3d + dex + bpl @loop +@exit rts +sourcemasks + !byte 0,0,0,0,0,0,0,0 ; SMC, will be copymasks EOR #$FF +copymasks + !byte %10000000 + !byte %11000000 + !byte %11100000 + !byte %11110000 + !byte %11111000 + !byte %11111100 + !byte %11111110 + !byte %11111111 + + !source "src/wait.a" + !source "src/fx/fx.hgr.common.a"