From 4fa2057c883d6531a82eaceccbaf36673568fac4 Mon Sep 17 00:00:00 2001 From: 4am Date: Fri, 18 Oct 2019 14:00:25 -0400 Subject: [PATCH] more diagonal wipes, upgraded diamond wipe, some refactoring --- Makefile | 2 +- res/fx.conf | 2 +- src/fx/fx.hgr.common.a | 64 +- src/fx/fx.hgr.diagonal.a | 134 ++- src/fx/fx.hgr.diagonal2.a | 57 +- src/fx/fx.hgr.diagonal3.a | 52 +- src/fx/{diagonal4.a => fx.hgr.diagonal4.a} | 49 +- src/fx/fx.hgr.diamond.a | 211 +++-- src/fx/fx.hgr.diamond.data.a | 991 --------------------- src/fx/fx.hgr.split.ud.intro.a | 2 +- src/fx/{fx.hgr.macros.a => macros.a} | 18 +- 11 files changed, 314 insertions(+), 1268 deletions(-) rename src/fx/{diagonal4.a => fx.hgr.diagonal4.a} (51%) delete mode 100644 src/fx/fx.hgr.diamond.data.a rename src/fx/{fx.hgr.macros.a => macros.a} (60%) diff --git a/Makefile b/Makefile index cc12c90c4..8edf0eeb3 100644 --- a/Makefile +++ b/Makefile @@ -60,7 +60,7 @@ asmlauncher: $(ACME) -r build/4cade.lst -DBUILDNUMBER=`git rev-list --count HEAD` -DRELBASE=`cat build/relbase.log | grep "RELBASE =" | cut -d"=" -f2 | cut -d"(" -f2 | cut -d")" -f1` src/4cade.a asmfx: - for f in src/fx/*.a; do grep "^\!to" $${f} >/dev/null && $(ACME) $${f} >> build/log; done + for f in src/fx/*.a; do grep "^\!to" $${f} >/dev/null && $(ACME) $${f} >> build/log || true; done asmprelaunch: for f in src/prelaunch/*.a; do grep "^\!to" $${f} >/dev/null && $(ACME) $${f} >> build/log; done diff --git a/res/fx.conf b/res/fx.conf index ee70c3db2..cfdcc4e00 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 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 +DIAMOND 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/fx.hgr.common.a b/src/fx/fx.hgr.common.a index 0779e42ec..f2cabbc9c 100644 --- a/src/fx/fx.hgr.common.a +++ b/src/fx/fx.hgr.common.a @@ -1,7 +1,7 @@ ;license:MIT ;(c) 2018 by 4am ; - !source "src/fx/fx.hgr.macros.a" + !source "src/fx/macros.a" HGRCalc ; in: A = HGR row (0x00..0xBF) @@ -106,3 +106,65 @@ HGRStaggerToWhite dex bne @loop rts + +SetSourceMask +; in: A/Y points to 8-byte array of bit masks used by HGRBlockCopyWithMask + +STAY SourceMaskAddr + rts + +SetCopyMask +; in: A/Y points to 8-byte array of bit masks used by HGRBlockCopyWithMask + +STAY CopyMaskAddr + rts + +BuildSourceMaskFromCopyMask +; build an 8-byte array of bit masks at (SourceMaskAddr) +; that are the inverse (EOR #$FF) of the bit masks at (CopyMaskAddr) +; +; in: must call SetSourceMask and SetCopyMask first +; out: A/Y clobbered +; $00/$01/$02/$03 clobbered +; X preserved + +LDAY CopyMaskAddr + +STAY $00 + +LDAY SourceMaskAddr + +STAY $02 + ldy #$07 +- lda ($00),y + eor #$FF + sta ($02),y + dey + bpl - + rts + +HGRBlockCopyWithMask +; in: A = HGR row / 8 (0x00..0x17) +; Y = HGR column (0x00..0x27) +; must call SetSourceMask and SetCopyMask first +; out: Y preserved +; A/X clobbered +; $00 clobbered + asl + asl + asl + +HGR_CALC + ldx #7 +HGRBlockCopyWithMasksLoop + lda ($26),y +SourceMaskAddr=*+1 + and $FDFD,x ; call SetSourceMask to set + sta $00 + lda ($3c),y +CopyMaskAddr=*+1 + and $FDFD,x ; call SetCopyMask to set + ora $00 + sta ($26),y + lda $27 + clc + adc #$04 + sta $27 + eor #$60 + sta $3d + dex + bpl HGRBlockCopyWithMasksLoop + rts diff --git a/src/fx/fx.hgr.diagonal.a b/src/fx/fx.hgr.diagonal.a index 8a0178848..9e0bea96d 100644 --- a/src/fx/fx.hgr.diagonal.a +++ b/src/fx/fx.hgr.diagonal.a @@ -5,90 +5,58 @@ !to "build/FX/DIAGONAL",plain *=$6000 -row=$FA -col=$FB -tmp=$FF +row = $fd +col = $fe +counter = $ff - jmp Start + !source "src/fx/macros.a" + + +INIT_MASKS sourcemasks, copymasks + + lda #64 ; 40 + 24 + sta counter + + lda #39 + sta col +@colloop + lda #23 + sta row + ldy col +@rowloop + tya + bmi + + cpy #40 + bcs + + lda row + jsr HGRBlockCopyWithMask ++ iny + bmi + + cpy #40 + bcs + + lda row + jsr HGRBlockCopy ++ + dec row + bpl @rowloop + lda #64 + jsr WaitForKeyWithTimeout + bmi @exit + dec col + dec counter + bne @colloop +@exit rts + +sourcemasks + !byte 0,0,0,0,0,0,0,0 ; SMC +copymasks + !byte %11111111 + !byte %11111110 + !byte %11111100 + !byte %11111000 + !byte %11110000 + !byte %11100000 + !byte %11000000 + !byte %10000000 !source "src/wait.a" !source "src/fx/fx.hgr.common.a" - -Start - lda #$27 - sta col - lda #$17 - sta row - sta $FC -@loop ldy col - lda row - bpl + - lda #$00 -+ pha - jsr HGRDiagonalBlockCopyWithGuards - pla - iny - cpy #$28 - bcs + - jsr HGRBlockCopy -+ dec col - inc row - lda row - cmp #$18 - bne @loop - lda #$40 - jsr WaitForKeyWithTimeout - bmi @exit - dec $FC - lda #$27 - sta col - lda $FC - sta row - bpl @loop - lda #$00 - sta row - sec - sbc $FC - sta $FD - lda col - sec - sbc $FD - sta col - cmp #$FE - bne @loop -@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 - +HGR_CALC - clc - tya - bmi @exit - ldx #$07 -@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 $00,$01,$03,$07,$0F,$1F,$3F,$7F -copymasks - !byte $FF,$FE,$FC,$F8,$F0,$E0,$C0,$80 diff --git a/src/fx/fx.hgr.diagonal2.a b/src/fx/fx.hgr.diagonal2.a index 1d898e139..7366d53d4 100644 --- a/src/fx/fx.hgr.diagonal2.a +++ b/src/fx/fx.hgr.diagonal2.a @@ -7,7 +7,14 @@ row = $fd col = $fe -tmp = $ff +counter = $ff + + !source "src/fx/macros.a" + + +INIT_MASKS sourcemasks, copymasks + + lda #64 ; 40 + 24 + sta counter lda #$FF ; -1 sta col @@ -27,7 +34,7 @@ tmp = $ff cpy #40 bcs + lda row - jsr HGRDiagonalBlockCopyWithGuards + jsr HGRBlockCopyWithMask + dey dey dec row @@ -36,50 +43,12 @@ tmp = $ff jsr WaitForKeyWithTimeout bmi @exit inc col - lda col - cmp #64 - bcc @colloop + 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 ; copymasks EOR #$FF - !byte %00000000 - !byte %01000000 - !byte %01100000 - !byte %01110000 - !byte %01111000 - !byte %01111100 - !byte %01111110 - !byte %01111111 +sourcemasks + !byte 0,0,0,0,0,0,0,0 ; SMC copymasks !byte %11111111 !byte %10111111 diff --git a/src/fx/fx.hgr.diagonal3.a b/src/fx/fx.hgr.diagonal3.a index 4cb8eac5b..a13221f32 100644 --- a/src/fx/fx.hgr.diagonal3.a +++ b/src/fx/fx.hgr.diagonal3.a @@ -7,7 +7,14 @@ row = $fd col = $fe -tmp = $ff +counter = $ff + + !source "src/fx/macros.a" + + +INIT_MASKS sourcemasks, copymasks + + lda #64 ; 40 + 24 + sta counter lda #$FF ; -1 sta col @@ -27,7 +34,7 @@ tmp = $ff cpy #40 bcs + lda row - jsr HGRDiagonalBlockCopyWithGuards + jsr HGRBlockCopyWithMask + dey dey inc row @@ -43,45 +50,8 @@ tmp = $ff 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 +sourcemasks + !byte 0,0,0,0,0,0,0,0 ; SMC copymasks !byte %10000000 !byte %10000001 diff --git a/src/fx/diagonal4.a b/src/fx/fx.hgr.diagonal4.a similarity index 51% rename from src/fx/diagonal4.a rename to src/fx/fx.hgr.diagonal4.a index 672175e05..d30341acb 100644 --- a/src/fx/diagonal4.a +++ b/src/fx/fx.hgr.diagonal4.a @@ -5,18 +5,15 @@ !to "build/FX/DIAGONAL4",plain *=$6000 -counter = $fc row = $fd col = $fe -tmp = $ff +counter = $ff - ldx #7 -- lda copymasks,x - eor #%11111111 - sta sourcemasks,x - dex - bpl - - lda #(40+24) + !source "src/fx/macros.a" + + +INIT_MASKS sourcemasks, copymasks + + lda #64 ; 40 + 24 sta counter lda #39 @@ -31,7 +28,7 @@ tmp = $ff cpy #40 bcs + lda row - jsr HGRDiagonalBlockCopyWithGuards + jsr HGRBlockCopyWithMask + iny bmi + cpy #40 @@ -51,38 +48,8 @@ tmp = $ff 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 + !byte 0,0,0,0,0,0,0,0 ; SMC copymasks !byte %10000000 !byte %11000000 diff --git a/src/fx/fx.hgr.diamond.a b/src/fx/fx.hgr.diamond.a index 99ee52d0b..2f96fefb0 100644 --- a/src/fx/fx.hgr.diamond.a +++ b/src/fx/fx.hgr.diamond.a @@ -1,75 +1,162 @@ ;license:MIT -;(c) 2018 by 4am +;(c) 2019 by 4am ; !cpu 6502 !to "build/FX/DIAMOND",plain *=$6000 - lda #<@coords - sta $FE - lda #>@coords - sta $FF - ldy #$00 -@loop1 - lda ($FE),y - bpl @copy - lda #$18 - jsr WaitForKeyWithTimeout - bmi @exit - bpl @next ; always branches -@copy - tax - iny - lda ($fe),y - tay - txa - jsr HGRBlockToWhite -@next - inc $FE - bne + - inc $FF -+ inc $FE - bne + - inc $FF -+ ldy #$00 - lda ($FE),y - cmp #$80 - bne @loop1 +y = $fc +row = $fd +col = $fe +counter = $ff -@loop2 - dec $FE - lda $FE - cmp #$FF - bne + - dec $FF -+ dec $FE - lda $FE - cmp #$FF - bne + - dec $FF -+ ldy #$00 - lda ($FE),y - cmp #$80 - beq @exit - lda ($FE),y - bpl @copy2 - lda #$18 - jsr WaitForKeyWithTimeout - bmi @exit - bpl @loop2 ; always branches -@copy2 - tax - iny - lda ($fe),y + !source "src/fx/macros.a" + + +INIT_MASKS sourcemasks1, copymasks1 + +INIT_MASKS sourcemasks2, copymasks2 + +INIT_MASKS sourcemasks3, copymasks3 + +INIT_MASKS sourcemasks4, copymasks4 + + lda #32 + sta counter + + lda #39 + sta col +@colloop + lda #23 + sta row + ldy col + sty y +@rowloop + ; check if this column is visible + ldy y + bpl + +- jmp @skip1 ++ cpy #40 + bcs - + ; do corner 1 + sty y + +SWITCH_TO_MASKS sourcemasks1, copymasks1 + ldy y + lda row + jsr HGRBlockCopyWithMask + sty y + ; do corner 2 (same row, opposing col) + +SWITCH_TO_MASKS sourcemasks2, copymasks2 + lda #39 + sec + sbc y tay - txa + lda row + jsr HGRBlockCopyWithMask + ; do corner 3 (opposing row, opposing col) + +SWITCH_TO_MASKS sourcemasks3, copymasks3 + lda #39 + sec + sbc y + tay + lda #23 + sec + sbc row + jsr HGRBlockCopyWithMask + ; do corner 4 (opposing row, same col) + +SWITCH_TO_MASKS sourcemasks4, copymasks4 + ldy y + lda #23 + sec + sbc row + jsr HGRBlockCopyWithMask + ; reset y for looping + ldy y +@skip1 + iny + ; now check if *this* column is visible + sty y + bpl + +- jmp @skip2 ++ cpy #40 + bcs - + ; do corner 1 + lda row jsr HGRBlockCopy - beq @loop2 ; always branches + ; do corner 2 + lda #39 + sec + sbc y + tay + lda #23 + sec + sbc row + jsr HGRBlockCopy + ; do corner 3 + lda #39 + sec + sbc y + tay + lda row + jsr HGRBlockCopy + ; do corner 4 + ldy y + lda #23 + sec + sbc row + jsr HGRBlockCopy +@skip2 + dec row + bmi + + jmp @rowloop ++ lda $c000 + bmi @exit + dec col + dec counter + beq @exit + jmp @colloop @exit rts - !byte $80,$80 -@coords - !source "src/fx/fx.hgr.diamond.data.a" - !byte $80 +sourcemasks1 + !byte 0,0,0,0,0,0,0,0 ; SMC +sourcemasks2 + !byte 0,0,0,0,0,0,0,0 ; SMC +sourcemasks3 + !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 +copymasks2 + !byte %11111111 + !byte %10111111 + !byte %10011111 + !byte %10001111 + !byte %10000111 + !byte %10000011 + !byte %10000001 + !byte %10000000 +copymasks3 + !byte %10000000 + !byte %10000001 + !byte %10000011 + !byte %10000111 + !byte %10001111 + !byte %10011111 + !byte %10111111 + !byte %11111111 +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/fx/fx.hgr.diamond.data.a b/src/fx/fx.hgr.diamond.data.a deleted file mode 100644 index acdcf983e..000000000 --- a/src/fx/fx.hgr.diamond.data.a +++ /dev/null @@ -1,991 +0,0 @@ - !byte 0,0 - !byte 0,39 - !byte 23,0 - !byte 23,39 - !byte 255,255 - !byte 0,1 - !byte 0,38 - !byte 1,0 - !byte 1,39 - !byte 22,0 - !byte 22,39 - !byte 23,1 - !byte 23,38 - !byte 255,255 - !byte 0,2 - !byte 0,37 - !byte 1,1 - !byte 1,38 - !byte 2,0 - !byte 2,39 - !byte 21,0 - !byte 21,39 - !byte 22,1 - !byte 22,38 - !byte 23,2 - !byte 23,37 - !byte 255,255 - !byte 0,3 - !byte 0,36 - !byte 1,2 - !byte 1,37 - !byte 2,1 - !byte 2,38 - !byte 3,0 - !byte 3,39 - !byte 20,0 - !byte 20,39 - !byte 21,1 - !byte 21,38 - !byte 22,2 - !byte 22,37 - !byte 23,3 - !byte 23,36 - !byte 255,255 - !byte 0,4 - !byte 0,35 - !byte 1,3 - !byte 1,36 - !byte 2,2 - !byte 2,37 - !byte 3,1 - !byte 3,38 - !byte 4,0 - !byte 4,39 - !byte 19,0 - !byte 19,39 - !byte 20,1 - !byte 20,38 - !byte 21,2 - !byte 21,37 - !byte 22,3 - !byte 22,36 - !byte 23,4 - !byte 23,35 - !byte 255,255 - !byte 0,5 - !byte 0,34 - !byte 1,4 - !byte 1,35 - !byte 2,3 - !byte 2,36 - !byte 3,2 - !byte 3,37 - !byte 4,1 - !byte 4,38 - !byte 5,0 - !byte 5,39 - !byte 18,0 - !byte 18,39 - !byte 19,1 - !byte 19,38 - !byte 20,2 - !byte 20,37 - !byte 21,3 - !byte 21,36 - !byte 22,4 - !byte 22,35 - !byte 23,5 - !byte 23,34 - !byte 255,255 - !byte 0,6 - !byte 0,33 - !byte 1,5 - !byte 1,34 - !byte 2,4 - !byte 2,35 - !byte 3,3 - !byte 3,36 - !byte 4,2 - !byte 4,37 - !byte 5,1 - !byte 5,38 - !byte 6,0 - !byte 6,39 - !byte 17,0 - !byte 17,39 - !byte 18,1 - !byte 18,38 - !byte 19,2 - !byte 19,37 - !byte 20,3 - !byte 20,36 - !byte 21,4 - !byte 21,35 - !byte 22,5 - !byte 22,34 - !byte 23,6 - !byte 23,33 - !byte 255,255 - !byte 0,7 - !byte 0,32 - !byte 1,6 - !byte 1,33 - !byte 2,5 - !byte 2,34 - !byte 3,4 - !byte 3,35 - !byte 4,3 - !byte 4,36 - !byte 5,2 - !byte 5,37 - !byte 6,1 - !byte 6,38 - !byte 7,0 - !byte 7,39 - !byte 16,0 - !byte 16,39 - !byte 17,1 - !byte 17,38 - !byte 18,2 - !byte 18,37 - !byte 19,3 - !byte 19,36 - !byte 20,4 - !byte 20,35 - !byte 21,5 - !byte 21,34 - !byte 22,6 - !byte 22,33 - !byte 23,7 - !byte 23,32 - !byte 255,255 - !byte 0,8 - !byte 0,31 - !byte 1,7 - !byte 1,32 - !byte 2,6 - !byte 2,33 - !byte 3,5 - !byte 3,34 - !byte 4,4 - !byte 4,35 - !byte 5,3 - !byte 5,36 - !byte 6,2 - !byte 6,37 - !byte 7,1 - !byte 7,38 - !byte 8,0 - !byte 8,39 - !byte 15,0 - !byte 15,39 - !byte 16,1 - !byte 16,38 - !byte 17,2 - !byte 17,37 - !byte 18,3 - !byte 18,36 - !byte 19,4 - !byte 19,35 - !byte 20,5 - !byte 20,34 - !byte 21,6 - !byte 21,33 - !byte 22,7 - !byte 22,32 - !byte 23,8 - !byte 23,31 - !byte 255,255 - !byte 0,9 - !byte 0,30 - !byte 1,8 - !byte 1,31 - !byte 2,7 - !byte 2,32 - !byte 3,6 - !byte 3,33 - !byte 4,5 - !byte 4,34 - !byte 5,4 - !byte 5,35 - !byte 6,3 - !byte 6,36 - !byte 7,2 - !byte 7,37 - !byte 8,1 - !byte 8,38 - !byte 9,0 - !byte 9,39 - !byte 14,0 - !byte 14,39 - !byte 15,1 - !byte 15,38 - !byte 16,2 - !byte 16,37 - !byte 17,3 - !byte 17,36 - !byte 18,4 - !byte 18,35 - !byte 19,5 - !byte 19,34 - !byte 20,6 - !byte 20,33 - !byte 21,7 - !byte 21,32 - !byte 22,8 - !byte 22,31 - !byte 23,9 - !byte 23,30 - !byte 255,255 - !byte 0,10 - !byte 0,29 - !byte 1,9 - !byte 1,30 - !byte 2,8 - !byte 2,31 - !byte 3,7 - !byte 3,32 - !byte 4,6 - !byte 4,33 - !byte 5,5 - !byte 5,34 - !byte 6,4 - !byte 6,35 - !byte 7,3 - !byte 7,36 - !byte 8,2 - !byte 8,37 - !byte 9,1 - !byte 9,38 - !byte 10,0 - !byte 10,39 - !byte 13,0 - !byte 13,39 - !byte 14,1 - !byte 14,38 - !byte 15,2 - !byte 15,37 - !byte 16,3 - !byte 16,36 - !byte 17,4 - !byte 17,35 - !byte 18,5 - !byte 18,34 - !byte 19,6 - !byte 19,33 - !byte 20,7 - !byte 20,32 - !byte 21,8 - !byte 21,31 - !byte 22,9 - !byte 22,30 - !byte 23,10 - !byte 23,29 - !byte 255,255 - !byte 0,11 - !byte 0,28 - !byte 1,10 - !byte 1,29 - !byte 2,9 - !byte 2,30 - !byte 3,8 - !byte 3,31 - !byte 4,7 - !byte 4,32 - !byte 5,6 - !byte 5,33 - !byte 6,5 - !byte 6,34 - !byte 7,4 - !byte 7,35 - !byte 8,3 - !byte 8,36 - !byte 9,2 - !byte 9,37 - !byte 10,1 - !byte 10,38 - !byte 11,0 - !byte 11,39 - !byte 12,0 - !byte 12,39 - !byte 13,1 - !byte 13,38 - !byte 14,2 - !byte 14,37 - !byte 15,3 - !byte 15,36 - !byte 16,4 - !byte 16,35 - !byte 17,5 - !byte 17,34 - !byte 18,6 - !byte 18,33 - !byte 19,7 - !byte 19,32 - !byte 20,8 - !byte 20,31 - !byte 21,9 - !byte 21,30 - !byte 22,10 - !byte 22,29 - !byte 23,11 - !byte 23,28 - !byte 255,255 - !byte 0,12 - !byte 0,27 - !byte 1,11 - !byte 1,28 - !byte 2,10 - !byte 2,29 - !byte 3,9 - !byte 3,30 - !byte 4,8 - !byte 4,31 - !byte 5,7 - !byte 5,32 - !byte 6,6 - !byte 6,33 - !byte 7,5 - !byte 7,34 - !byte 8,4 - !byte 8,35 - !byte 9,3 - !byte 9,36 - !byte 10,2 - !byte 10,37 - !byte 11,1 - !byte 11,38 - !byte 12,1 - !byte 12,38 - !byte 13,2 - !byte 13,37 - !byte 14,3 - !byte 14,36 - !byte 15,4 - !byte 15,35 - !byte 16,5 - !byte 16,34 - !byte 17,6 - !byte 17,33 - !byte 18,7 - !byte 18,32 - !byte 19,8 - !byte 19,31 - !byte 20,9 - !byte 20,30 - !byte 21,10 - !byte 21,29 - !byte 22,11 - !byte 22,28 - !byte 23,12 - !byte 23,27 - !byte 255,255 - !byte 0,13 - !byte 0,26 - !byte 1,12 - !byte 1,27 - !byte 2,11 - !byte 2,28 - !byte 3,10 - !byte 3,29 - !byte 4,9 - !byte 4,30 - !byte 5,8 - !byte 5,31 - !byte 6,7 - !byte 6,32 - !byte 7,6 - !byte 7,33 - !byte 8,5 - !byte 8,34 - !byte 9,4 - !byte 9,35 - !byte 10,3 - !byte 10,36 - !byte 11,2 - !byte 11,37 - !byte 12,2 - !byte 12,37 - !byte 13,3 - !byte 13,36 - !byte 14,4 - !byte 14,35 - !byte 15,5 - !byte 15,34 - !byte 16,6 - !byte 16,33 - !byte 17,7 - !byte 17,32 - !byte 18,8 - !byte 18,31 - !byte 19,9 - !byte 19,30 - !byte 20,10 - !byte 20,29 - !byte 21,11 - !byte 21,28 - !byte 22,12 - !byte 22,27 - !byte 23,13 - !byte 23,26 - !byte 255,255 - !byte 0,14 - !byte 0,25 - !byte 1,13 - !byte 1,26 - !byte 2,12 - !byte 2,27 - !byte 3,11 - !byte 3,28 - !byte 4,10 - !byte 4,29 - !byte 5,9 - !byte 5,30 - !byte 6,8 - !byte 6,31 - !byte 7,7 - !byte 7,32 - !byte 8,6 - !byte 8,33 - !byte 9,5 - !byte 9,34 - !byte 10,4 - !byte 10,35 - !byte 11,3 - !byte 11,36 - !byte 12,3 - !byte 12,36 - !byte 13,4 - !byte 13,35 - !byte 14,5 - !byte 14,34 - !byte 15,6 - !byte 15,33 - !byte 16,7 - !byte 16,32 - !byte 17,8 - !byte 17,31 - !byte 18,9 - !byte 18,30 - !byte 19,10 - !byte 19,29 - !byte 20,11 - !byte 20,28 - !byte 21,12 - !byte 21,27 - !byte 22,13 - !byte 22,26 - !byte 23,14 - !byte 23,25 - !byte 255,255 - !byte 0,15 - !byte 0,24 - !byte 1,14 - !byte 1,25 - !byte 2,13 - !byte 2,26 - !byte 3,12 - !byte 3,27 - !byte 4,11 - !byte 4,28 - !byte 5,10 - !byte 5,29 - !byte 6,9 - !byte 6,30 - !byte 7,8 - !byte 7,31 - !byte 8,7 - !byte 8,32 - !byte 9,6 - !byte 9,33 - !byte 10,5 - !byte 10,34 - !byte 11,4 - !byte 11,35 - !byte 12,4 - !byte 12,35 - !byte 13,5 - !byte 13,34 - !byte 14,6 - !byte 14,33 - !byte 15,7 - !byte 15,32 - !byte 16,8 - !byte 16,31 - !byte 17,9 - !byte 17,30 - !byte 18,10 - !byte 18,29 - !byte 19,11 - !byte 19,28 - !byte 20,12 - !byte 20,27 - !byte 21,13 - !byte 21,26 - !byte 22,14 - !byte 22,25 - !byte 23,15 - !byte 23,24 - !byte 255,255 - !byte 0,16 - !byte 0,23 - !byte 1,15 - !byte 1,24 - !byte 2,14 - !byte 2,25 - !byte 3,13 - !byte 3,26 - !byte 4,12 - !byte 4,27 - !byte 5,11 - !byte 5,28 - !byte 6,10 - !byte 6,29 - !byte 7,9 - !byte 7,30 - !byte 8,8 - !byte 8,31 - !byte 9,7 - !byte 9,32 - !byte 10,6 - !byte 10,33 - !byte 11,5 - !byte 11,34 - !byte 12,5 - !byte 12,34 - !byte 13,6 - !byte 13,33 - !byte 14,7 - !byte 14,32 - !byte 15,8 - !byte 15,31 - !byte 16,9 - !byte 16,30 - !byte 17,10 - !byte 17,29 - !byte 18,11 - !byte 18,28 - !byte 19,12 - !byte 19,27 - !byte 20,13 - !byte 20,26 - !byte 21,14 - !byte 21,25 - !byte 22,15 - !byte 22,24 - !byte 23,16 - !byte 23,23 - !byte 255,255 - !byte 0,17 - !byte 0,22 - !byte 1,16 - !byte 1,23 - !byte 2,15 - !byte 2,24 - !byte 3,14 - !byte 3,25 - !byte 4,13 - !byte 4,26 - !byte 5,12 - !byte 5,27 - !byte 6,11 - !byte 6,28 - !byte 7,10 - !byte 7,29 - !byte 8,9 - !byte 8,30 - !byte 9,8 - !byte 9,31 - !byte 10,7 - !byte 10,32 - !byte 11,6 - !byte 11,33 - !byte 12,6 - !byte 12,33 - !byte 13,7 - !byte 13,32 - !byte 14,8 - !byte 14,31 - !byte 15,9 - !byte 15,30 - !byte 16,10 - !byte 16,29 - !byte 17,11 - !byte 17,28 - !byte 18,12 - !byte 18,27 - !byte 19,13 - !byte 19,26 - !byte 20,14 - !byte 20,25 - !byte 21,15 - !byte 21,24 - !byte 22,16 - !byte 22,23 - !byte 23,17 - !byte 23,22 - !byte 255,255 - !byte 0,18 - !byte 0,21 - !byte 1,17 - !byte 1,22 - !byte 2,16 - !byte 2,23 - !byte 3,15 - !byte 3,24 - !byte 4,14 - !byte 4,25 - !byte 5,13 - !byte 5,26 - !byte 6,12 - !byte 6,27 - !byte 7,11 - !byte 7,28 - !byte 8,10 - !byte 8,29 - !byte 9,9 - !byte 9,30 - !byte 10,8 - !byte 10,31 - !byte 11,7 - !byte 11,32 - !byte 12,7 - !byte 12,32 - !byte 13,8 - !byte 13,31 - !byte 14,9 - !byte 14,30 - !byte 15,10 - !byte 15,29 - !byte 16,11 - !byte 16,28 - !byte 17,12 - !byte 17,27 - !byte 18,13 - !byte 18,26 - !byte 19,14 - !byte 19,25 - !byte 20,15 - !byte 20,24 - !byte 21,16 - !byte 21,23 - !byte 22,17 - !byte 22,22 - !byte 23,18 - !byte 23,21 - !byte 255,255 - !byte 0,19 - !byte 0,20 - !byte 1,18 - !byte 1,21 - !byte 2,17 - !byte 2,22 - !byte 3,16 - !byte 3,23 - !byte 4,15 - !byte 4,24 - !byte 5,14 - !byte 5,25 - !byte 6,13 - !byte 6,26 - !byte 7,12 - !byte 7,27 - !byte 8,11 - !byte 8,28 - !byte 9,10 - !byte 9,29 - !byte 10,9 - !byte 10,30 - !byte 11,8 - !byte 11,31 - !byte 12,8 - !byte 12,31 - !byte 13,9 - !byte 13,30 - !byte 14,10 - !byte 14,29 - !byte 15,11 - !byte 15,28 - !byte 16,12 - !byte 16,27 - !byte 17,13 - !byte 17,26 - !byte 18,14 - !byte 18,25 - !byte 19,15 - !byte 19,24 - !byte 20,16 - !byte 20,23 - !byte 21,17 - !byte 21,22 - !byte 22,18 - !byte 22,21 - !byte 23,19 - !byte 23,20 - !byte 255,255 - !byte 1,19 - !byte 1,20 - !byte 2,18 - !byte 2,21 - !byte 3,17 - !byte 3,22 - !byte 4,16 - !byte 4,23 - !byte 5,15 - !byte 5,24 - !byte 6,14 - !byte 6,25 - !byte 7,13 - !byte 7,26 - !byte 8,12 - !byte 8,27 - !byte 9,11 - !byte 9,28 - !byte 10,10 - !byte 10,29 - !byte 11,9 - !byte 11,30 - !byte 12,9 - !byte 12,30 - !byte 13,10 - !byte 13,29 - !byte 14,11 - !byte 14,28 - !byte 15,12 - !byte 15,27 - !byte 16,13 - !byte 16,26 - !byte 17,14 - !byte 17,25 - !byte 18,15 - !byte 18,24 - !byte 19,16 - !byte 19,23 - !byte 20,17 - !byte 20,22 - !byte 21,18 - !byte 21,21 - !byte 22,19 - !byte 22,20 - !byte 255,255 - !byte 2,19 - !byte 2,20 - !byte 3,18 - !byte 3,21 - !byte 4,17 - !byte 4,22 - !byte 5,16 - !byte 5,23 - !byte 6,15 - !byte 6,24 - !byte 7,14 - !byte 7,25 - !byte 8,13 - !byte 8,26 - !byte 9,12 - !byte 9,27 - !byte 10,11 - !byte 10,28 - !byte 11,10 - !byte 11,29 - !byte 12,10 - !byte 12,29 - !byte 13,11 - !byte 13,28 - !byte 14,12 - !byte 14,27 - !byte 15,13 - !byte 15,26 - !byte 16,14 - !byte 16,25 - !byte 17,15 - !byte 17,24 - !byte 18,16 - !byte 18,23 - !byte 19,17 - !byte 19,22 - !byte 20,18 - !byte 20,21 - !byte 21,19 - !byte 21,20 - !byte 255,255 - !byte 3,19 - !byte 3,20 - !byte 4,18 - !byte 4,21 - !byte 5,17 - !byte 5,22 - !byte 6,16 - !byte 6,23 - !byte 7,15 - !byte 7,24 - !byte 8,14 - !byte 8,25 - !byte 9,13 - !byte 9,26 - !byte 10,12 - !byte 10,27 - !byte 11,11 - !byte 11,28 - !byte 12,11 - !byte 12,28 - !byte 13,12 - !byte 13,27 - !byte 14,13 - !byte 14,26 - !byte 15,14 - !byte 15,25 - !byte 16,15 - !byte 16,24 - !byte 17,16 - !byte 17,23 - !byte 18,17 - !byte 18,22 - !byte 19,18 - !byte 19,21 - !byte 20,19 - !byte 20,20 - !byte 255,255 - !byte 4,19 - !byte 4,20 - !byte 5,18 - !byte 5,21 - !byte 6,17 - !byte 6,22 - !byte 7,16 - !byte 7,23 - !byte 8,15 - !byte 8,24 - !byte 9,14 - !byte 9,25 - !byte 10,13 - !byte 10,26 - !byte 11,12 - !byte 11,27 - !byte 12,12 - !byte 12,27 - !byte 13,13 - !byte 13,26 - !byte 14,14 - !byte 14,25 - !byte 15,15 - !byte 15,24 - !byte 16,16 - !byte 16,23 - !byte 17,17 - !byte 17,22 - !byte 18,18 - !byte 18,21 - !byte 19,19 - !byte 19,20 - !byte 255,255 - !byte 5,19 - !byte 5,20 - !byte 6,18 - !byte 6,21 - !byte 7,17 - !byte 7,22 - !byte 8,16 - !byte 8,23 - !byte 9,15 - !byte 9,24 - !byte 10,14 - !byte 10,25 - !byte 11,13 - !byte 11,26 - !byte 12,13 - !byte 12,26 - !byte 13,14 - !byte 13,25 - !byte 14,15 - !byte 14,24 - !byte 15,16 - !byte 15,23 - !byte 16,17 - !byte 16,22 - !byte 17,18 - !byte 17,21 - !byte 18,19 - !byte 18,20 - !byte 255,255 - !byte 6,19 - !byte 6,20 - !byte 7,18 - !byte 7,21 - !byte 8,17 - !byte 8,22 - !byte 9,16 - !byte 9,23 - !byte 10,15 - !byte 10,24 - !byte 11,14 - !byte 11,25 - !byte 12,14 - !byte 12,25 - !byte 13,15 - !byte 13,24 - !byte 14,16 - !byte 14,23 - !byte 15,17 - !byte 15,22 - !byte 16,18 - !byte 16,21 - !byte 17,19 - !byte 17,20 - !byte 255,255 - !byte 7,19 - !byte 7,20 - !byte 8,18 - !byte 8,21 - !byte 9,17 - !byte 9,22 - !byte 10,16 - !byte 10,23 - !byte 11,15 - !byte 11,24 - !byte 12,15 - !byte 12,24 - !byte 13,16 - !byte 13,23 - !byte 14,17 - !byte 14,22 - !byte 15,18 - !byte 15,21 - !byte 16,19 - !byte 16,20 - !byte 255,255 - !byte 8,19 - !byte 8,20 - !byte 9,18 - !byte 9,21 - !byte 10,17 - !byte 10,22 - !byte 11,16 - !byte 11,23 - !byte 12,16 - !byte 12,23 - !byte 13,17 - !byte 13,22 - !byte 14,18 - !byte 14,21 - !byte 15,19 - !byte 15,20 - !byte 255,255 - !byte 9,19 - !byte 9,20 - !byte 10,18 - !byte 10,21 - !byte 11,17 - !byte 11,22 - !byte 12,17 - !byte 12,22 - !byte 13,18 - !byte 13,21 - !byte 14,19 - !byte 14,20 - !byte 255,255 - !byte 10,19 - !byte 10,20 - !byte 11,18 - !byte 11,21 - !byte 12,18 - !byte 12,21 - !byte 13,19 - !byte 13,20 - !byte 255,255 - !byte 11,19 - !byte 11,20 - !byte 12,19 - !byte 12,20 - !byte 255,255 diff --git a/src/fx/fx.hgr.split.ud.intro.a b/src/fx/fx.hgr.split.ud.intro.a index 1ea022e07..3fa104b7c 100644 --- a/src/fx/fx.hgr.split.ud.intro.a +++ b/src/fx/fx.hgr.split.ud.intro.a @@ -5,7 +5,7 @@ !to "build/FX/SPLIT.UD.INTRO",plain *=$6000 - !source "src/fx/fx.hgr.macros.a" + !source "src/fx/macros.a" col1 = $FE col2 = $FF diff --git a/src/fx/fx.hgr.macros.a b/src/fx/macros.a similarity index 60% rename from src/fx/fx.hgr.macros.a rename to src/fx/macros.a index 26f7118bb..274dd06d6 100644 --- a/src/fx/fx.hgr.macros.a +++ b/src/fx/macros.a @@ -1,4 +1,6 @@ -!ifndef MACROS { +!ifndef _HGRMACROS_ { + !source "src/macros.a" + !macro HGR_CALC { asl tax @@ -30,5 +32,17 @@ sta $3d } -MACROS=* +!macro SWITCH_TO_MASKS .source, .copy { + +LDADDR .source + jsr SetSourceMask + +LDADDR .copy + jsr SetCopyMask +} + +!macro INIT_MASKS .source, .copy { + +SWITCH_TO_MASKS .source, .copy + jsr BuildSourceMaskFromCopyMask +} + +_HGRMACROS_=* }