From c5ee02aa5e35a9bdac5943dc11971e9a74331d9c Mon Sep 17 00:00:00 2001 From: 4am Date: Sat, 3 Nov 2018 11:04:09 -0400 Subject: [PATCH] add fx/split.ud.intro --- Makefile | 1 + res/fx.conf | 2 +- res/fx/_FileInformation.txt | 1 + src/4cade.a | 4 +- src/fx/fx.hgr.common.a | 41 ++--------- src/fx/fx.hgr.macros.a | 34 +++++++++ src/fx/fx.hgr.split.ud.intro.a | 121 +++++++++++++++++++++++++++++++++ 7 files changed, 164 insertions(+), 40 deletions(-) create mode 100644 src/fx/fx.hgr.macros.a create mode 100644 src/fx/fx.hgr.split.ud.intro.a diff --git a/Makefile b/Makefile index 3a962cff8..a67ac00aa 100644 --- a/Makefile +++ b/Makefile @@ -45,6 +45,7 @@ asm: md $(ACME) src/fx/fx.hgr.corner.circle.a $(ACME) src/fx/fx.hgr.sunrise.a $(ACME) src/fx/fx.hgr.radial.a + $(ACME) src/fx/fx.hgr.split.ud.intro.a dsk: md asm $(CADIUS) CREATEVOLUME build/"$(DISK)" "${VOLUME}" 32766KB >>build/log diff --git a/res/fx.conf b/res/fx.conf index d314f72c8..e5670f4e6 100644 --- a/res/fx.conf +++ b/res/fx.conf @@ -1 +1 @@ -# # transition effects for HGR slideshows # RADIAL SUNRISE DIAGONAL CHECKERBOARD HALF.FIZZLE CORNER.CIRCLE BAR.DISSOLVE STAGGERWHITE.LR DIAMOND ONESQUARE TWOPASS.LR CRYSTAL HALF.MOSAIC STAGGER.LR FOURSQUARE STAGGER.UD INTERLOCK.LR BLOCK.MOSAIC IRIS FIZZLE STAGGERWHITE.UD INTERLOCK.UD BLOCK.FIZZLE SPIRAL [eof] \ No newline at end of file +# # transition effects for HGR slideshows # SPLIT.UD.INTRO RADIAL SUNRISE DIAGONAL CHECKERBOARD HALF.FIZZLE CORNER.CIRCLE BAR.DISSOLVE STAGGERWHITE.LR DIAMOND ONESQUARE TWOPASS.LR CRYSTAL HALF.MOSAIC STAGGER.LR FOURSQUARE STAGGER.UD INTERLOCK.LR BLOCK.MOSAIC IRIS FIZZLE STAGGERWHITE.UD INTERLOCK.UD BLOCK.FIZZLE SPIRAL [eof] \ No newline at end of file diff --git a/res/fx/_FileInformation.txt b/res/fx/_FileInformation.txt index f182e83bd..a2504e568 100644 --- a/res/fx/_FileInformation.txt +++ b/res/fx/_FileInformation.txt @@ -22,3 +22,4 @@ STAGGERWHITE.LR=Type(06),AuxType(6000),Access(C3) CORNER.CIRCLE=Type(06),AuxType(6000),Access(C3) SUNRISE=Type(06),AuxType(6000),Access(C3) RADIAL=Type(06),AuxType(6000),Access(C3) +SPLIT.UD.INTRO=Type(06),AuxType(6000),Access(C3) diff --git a/src/4cade.a b/src/4cade.a index c3358ad4f..c00036201 100644 --- a/src/4cade.a +++ b/src/4cade.a @@ -193,7 +193,7 @@ AttractMode jmp BlankHGR @HGRSlideshow - jsr LoadTransition +; jsr LoadTransition jsr okvs_iter !word gSlideshowStore !word HGRLoad @@ -209,7 +209,7 @@ HGRLoad ; load HGR screenshot at $4000 +LOAD_FILE kHGRScreenshotDirectory, PTR -; jsr LoadTransition + jsr LoadTransition jsr $6000 ; transition effect code was loaded here earlier jmp WaitOnScreenshot diff --git a/src/fx/fx.hgr.common.a b/src/fx/fx.hgr.common.a index d104a4550..72479834e 100644 --- a/src/fx/fx.hgr.common.a +++ b/src/fx/fx.hgr.common.a @@ -1,25 +1,4 @@ -!macro HGR_CALC { - asl - tax - and #$F0 - bpl @calc1 - ora #$05 -@calc1 bcc @calc2 - ora #$0A -@calc2 asl - asl - sta $26 - txa - and #$0E - adc #$10 - asl $26 - rol - sta $27 - eor #$60 - sta $3d - lda $26 - sta $3c -} + !source "src/fx/fx.hgr.macros.a" HGRCalc ; in: A = HGR row (0x00..0xBF) @@ -76,11 +55,7 @@ HGRBlockToWhite @loop lda #$7F sta ($26),y - lda $27 - adc #$04 - sta $27 - eor #$60 - sta $3d + +HGR_INC_WITHIN_BLOCK dex bne @loop rts @@ -102,11 +77,7 @@ HGRStaggerCopy @loop lda ($3c),y sta ($26),y - lda $27 - adc #$04 - sta $27 - eor #$60 - sta $3d + +HGR_INC_WITHIN_BLOCK dex bne @loop rts @@ -128,11 +99,7 @@ HGRStaggerToWhite @loop lda #$7F sta ($26),y - lda $27 - adc #$04 - sta $27 - eor #$60 - sta $3d + +HGR_INC_WITHIN_BLOCK dex bne @loop rts diff --git a/src/fx/fx.hgr.macros.a b/src/fx/fx.hgr.macros.a new file mode 100644 index 000000000..26f7118bb --- /dev/null +++ b/src/fx/fx.hgr.macros.a @@ -0,0 +1,34 @@ +!ifndef MACROS { +!macro HGR_CALC { + asl + tax + and #$F0 + bpl @calc1 + ora #$05 +@calc1 bcc @calc2 + ora #$0A +@calc2 asl + asl + sta $26 + txa + and #$0E + adc #$10 + asl $26 + rol + sta $27 + eor #$60 + sta $3d + lda $26 + sta $3c +} + +!macro HGR_INC_WITHIN_BLOCK { + lda $27 + adc #$04 + sta $27 + eor #$60 + sta $3d +} + +MACROS=* +} diff --git a/src/fx/fx.hgr.split.ud.intro.a b/src/fx/fx.hgr.split.ud.intro.a new file mode 100644 index 000000000..aea031264 --- /dev/null +++ b/src/fx/fx.hgr.split.ud.intro.a @@ -0,0 +1,121 @@ +!cpu 6502 +!to "build/FX/SPLIT.UD.INTRO",plain +*=$6000 + + !source "src/fx/fx.hgr.macros.a" + +col1 = $FE +col2 = $FF + + lda #$00 + sta col1 + lda #$27 + sta col2 +@introloop + lda #$17 + ldy col1 + jsr HGRHalfBlockToWhite + lda #$18 + ldy col2 + jsr HGRHalfBlockToWhite + lda #$40 + jsr WaitForKeyWithTimeout + bpl + + jmp @exit ++ + inc col1 + dec col2 + bpl @introloop + +row1 = $FE +row2 = $FF + + lda #$16 + sta row1 + lda #$19 + sta row2 + +@outerloop + lda row1 + bmi @skiptopwhite + asl + asl + jsr HGRCalc + ldx #$04 +@topwhite + ldy #$27 + lda #$7F +- sta ($26),y + dey + bpl - + +HGR_INC_WITHIN_BLOCK + dex + bne @topwhite +@skiptopwhite + inc row1 + + lda row1 + asl + asl + jsr HGRCalc + ldx #$04 +@topcopy + ldy #$27 +- lda ($3c),y + sta ($26),y + dey + bpl - + +HGR_INC_WITHIN_BLOCK + dex + bne @topcopy + + lda row2 + cmp #$30 + bcs @skipbottomwhite + lda row2 + asl + asl + jsr HGRCalc + ldx #$04 +@bottomwhite + ldy #$27 +- lda #$7F + sta ($26),y + dey + bpl - + +HGR_INC_WITHIN_BLOCK + dex + bne @bottomwhite +@skipbottomwhite + dec row2 + lda row2 + asl + asl + jsr HGRCalc + ldx #$04 +@bottomcopy + ldy #$27 +- lda ($3c),y + sta ($26),y + dey + bpl - + +HGR_INC_WITHIN_BLOCK + dex + bne @bottomcopy + + lda #$28 + jsr WaitForKeyWithTimeout + bmi @exit + + dec row1 + dec row1 + inc row2 + inc row2 + lda row1 + cmp #$FE + beq @exit + jmp @outerloop +@exit rts + + !source "src/wait.a" + !source "src/fx/fx.hgr.common.a"