From e23a9aa7b9a23c0ddc8eea26fdf52237c97123db Mon Sep 17 00:00:00 2001 From: 4am Date: Fri, 18 Oct 2019 11:50:47 -0400 Subject: [PATCH] some wipes --- res/fx.conf | 2 +- src/fx/fx.hgr.diagonal3.a | 96 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 97 insertions(+), 1 deletion(-) create mode 100644 src/fx/fx.hgr.diagonal3.a diff --git a/res/fx.conf b/res/fx.conf index 26bd74f8e..7da5c92f4 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 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 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/fx.hgr.diagonal3.a b/src/fx/fx.hgr.diagonal3.a new file mode 100644 index 000000000..4cb8eac5b --- /dev/null +++ b/src/fx/fx.hgr.diagonal3.a @@ -0,0 +1,96 @@ +;license:MIT +;(c) 2019 by 4am +; +!cpu 6502 +!to "build/FX/DIAGONAL3",plain +*=$6000 + +row = $fd +col = $fe +tmp = $ff + + lda #$FF ; -1 + sta col +@colloop + lda #0 + sta row + ldy col +@rowloop + tya + bmi + + cpy #40 + bcs + + lda row + jsr HGRBlockCopy ++ iny + bmi + + cpy #40 + bcs + + lda row + jsr HGRDiagonalBlockCopyWithGuards ++ dey + dey + inc row + lda row + cmp #24 + bcc @rowloop + lda #64 + jsr WaitForKeyWithTimeout + bmi @exit + inc col + lda col + cmp #64 + bcc @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 ; copymasks EOR #$FF + !byte %01111111 + !byte %01111110 + !byte %01111100 + !byte %01111000 + !byte %01110000 + !byte %01100000 + !byte %01000000 + !byte %00000000 +copymasks + !byte %10000000 + !byte %10000001 + !byte %10000011 + !byte %10000111 + !byte %10001111 + !byte %10011111 + !byte %10111111 + !byte %11111111 + + !source "src/wait.a" + !source "src/fx/fx.hgr.common.a"