diff --git a/res/fx.conf b/res/fx.conf index 34baa5f1b..bf8c5e8d7 100644 --- a/res/fx.conf +++ b/res/fx.conf @@ -1 +1 @@ -RIPPLE STARWHITE SOFT.DIAGONAL STAGGERWHITE.UD RADIAL STAGGER.LR SOFT.UD BIT.FIZZLE MEETINTHEMIDDLE CRYSTAL DIAGONAL R.BY.PIXEL SUNRISE SOFT.L SUNSET CORNER.CIRCLE DIAGONAL2 RIPPLE2 RADIAL2 SPLIT.UD.INTRO HALF.FIZZLE RADIAL3 DIAGONAL3 BAR.DISSOLVE FOURSPIRAL SOFT.R IRIS CASCADE AND CHECKERBOARD LR.BY.PIXEL RADIAL4 STAGGERWHITE.LR SOFT.UD.OUT ONESQUARE FIZZLE STAR DIAMOND TWOPASS.LR HALF.MOSAIC RADIAL5 ARROW 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 +RIPPLE STARWHITE SOFT.DIAGONAL STAGGERWHITE.UD RADIAL STAGGER.LR SOFT.UD BIT.FIZZLE MEETINTHEMIDDLE CRYSTAL DIAGONAL R.BY.PIXEL SUNRISE SOFT.L SUNSET CORNER.CIRCLE DIAGONAL2 RIPPLE2 RADIAL2 SPLIT.UD.INTRO HALF.FIZZLE RADIAL3 DIAGONAL3 BAR.DISSOLVE FOURSPIRAL SOFT.R IRIS CASCADE AND CHECKERBOARD LR.BY.PIXEL RADIAL4 STAGGERWHITE.LR SOFT.UD.OUT ONESQUARE FIZZLE STAR DIAMOND TWOPASS.LR HALF.MOSAIC RADIAL5 ARROW FOURSQUARE DIAGONAL4 STAGGER.UD INTERLOCK.LR SOFT.UD.IN BLOCK.MOSAIC INTERLOCK.UD BLOCK.FIZZLE SPIRAL ARROW.WHITE [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.arrow.white.a b/src/fx/fx.hgr.arrow.white.a new file mode 100644 index 000000000..9d7df5868 --- /dev/null +++ b/src/fx/fx.hgr.arrow.white.a @@ -0,0 +1,175 @@ +;license:MIT +;(c) 2019 by 4am +; +!cpu 6502 +!to "build/FX/ARROW.WHITE",plain +*=$6000 + +y = $fc +row = $fd +col = $fe +counter = $ff + + !source "src/fx/macros.a" + + +INIT_MASKS sourcemasks1, copymasks1 + +INIT_MASKS sourcemasks4, copymasks4 + + lda #(40+12+1) + sta counter + + lda #39 + sta col +ColLoop + lda #11 + sta row + ldy col + sty y +RowLoop + ; check if this column is visible + ldy y + +IS_Y_OFFSCREEN + +LBCS Skip1 + + ; do top half of arrow (part 1 of 2) + lda row + asl + asl + asl + +HGR_CALC + + ldx #7 +- lda ($26),y + and sourcemasks1,x + sta $00 + lda #$FF + and copymasks1,x + ora $00 + sta ($26),y + clc + +HGR_INC_WITHIN_BLOCK + dex + bpl - + + ; do bottom half of arrow (opposing row, same col) + lda #23 + sec + sbc row + asl + asl + asl + +HGR_CALC + + ldx #7 +- lda ($26),y + and sourcemasks4,x + sta $00 + lda #$FF + and copymasks4,x + ora $00 + sta ($26),y + clc + +HGR_INC_WITHIN_BLOCK + dex + bpl - + +Skip1 + ; now check if *this* column is visible + iny + sty y + +IS_Y_OFFSCREEN + +LBCS Skip2 + + ; do top half of arrow (part 2 of 2) + lda row + asl + asl + asl + +HGR_CALC + + ldx #7 +- lda #$FF + and sourcemasks1,x + sta $00 + lda ($3c),y + and copymasks1,x + ora $00 + sta ($26),y + clc + +HGR_INC_WITHIN_BLOCK + dex + bpl - + + ; do bottom half of arrow (opposing row, same col) + lda #23 + sec + sbc row + asl + asl + asl + +HGR_CALC + + ldx #7 +- lda #$FF + and sourcemasks4,x + sta $00 + lda ($3c),y + and copymasks4,x + ora $00 + sta ($26),y + clc + +HGR_INC_WITHIN_BLOCK + dex + bpl - + +Skip2 + ; now check if *this* column is visible + iny + +IS_Y_OFFSCREEN + bcs NextRow + + ; do top half copy + lda row + jsr HGRBlockCopy + + ; do bottom half copy + lda #23 + sec + sbc row + jsr HGRBlockCopy + +NextRow + dec row + +LBPL RowLoop + lda $c000 + bmi @exit + dec col + dec counter + +LBNE ColLoop +@exit rts + +sourcemasks1 + !byte 0,0,0,0,0,0,0,0 ; SMC +sourcemasks4 + !byte 0,0,0,0,0,0,0,0 ; SMC +copymasks1 + !byte %11111111 + !byte %11111110 + !byte %11111100 + !byte %11111000 + !byte %11110000 + !byte %11100000 + !byte %11000000 + !byte %10000000 +copymasks4 + !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" diff --git a/src/macros.a b/src/macros.a index 2a960c27f..5f8dc29c5 100644 --- a/src/macros.a +++ b/src/macros.a @@ -57,18 +57,24 @@ sty .ptr+1 } -!macro LBPL .target { +!macro LBPL .target { bmi + jmp .target + } -!macro LBNE .target { +!macro LBNE .target { beq + jmp .target + } +!macro LBCS .target { + bcc + + jmp .target ++ +} + ; use BIT to swallow the following 1-byte opcode !macro HIDE_NEXT_BYTE { !byte $24