diff --git a/res/ss/favorites.conf b/res/ss/favorites.conf index 3a9ed080b..09412fcda 100644 --- a/res/ss/favorites.conf +++ b/res/ss/favorites.conf @@ -1 +1 @@ -# # slideshow of favorite title screens # MR.ROBOT NIBBLER SNAKE.BYTE DAVIDS.MAGIC CRAZY.MAZY SPYS.DEMISE WAVY.NAVY DIG.DUG PAPERBOY TUBEWAY PRINCEUNP LOST.TOMB MOON.PATROL DROL HERO MONTEZUMA DUNG.BEETLES SWASHBUCKLER POOYAN TAPPER GOONIES PLASMANIA PITFALL.II ALCAZAR SABOTAGE FROGGER GORGON CONAN NIGHT.MISSION DINO.EGGS FALCONS BRUCE.LEE BCS.QUEST JOUST [eof] \ No newline at end of file +# # slideshow of favorite title screens # DUNG.BEETLES MR.ROBOT NIBBLER SNAKE.BYTE DAVIDS.MAGIC CRAZY.MAZY SPYS.DEMISE WAVY.NAVY DIG.DUG PAPERBOY TUBEWAY PRINCEUNP LOST.TOMB MOON.PATROL DROL HERO MONTEZUMA SWASHBUCKLER POOYAN TAPPER GOONIES PLASMANIA PITFALL.II ALCAZAR SABOTAGE FROGGER GORGON CONAN NIGHT.MISSION DINO.EGGS FALCONS BRUCE.LEE BCS.QUEST JOUST [eof] \ No newline at end of file diff --git a/src/4cade.a b/src/4cade.a index b50a5d9a2..d2994aa66 100644 --- a/src/4cade.a +++ b/src/4cade.a @@ -212,7 +212,7 @@ HGRLoad jsr AddToPath jsr LoadFile !word gPathname - jsr DiagonalHGR;InterlockingVerticalHGR;FizzleHGR;InterlockingHorizontalHGR; + jsr SpiralHGR;DiagonalHGR;InterlockingVerticalHGR;FizzleHGR;InterlockingHorizontalHGR; jmp WaitOnScreenshot DHGRLoad @@ -325,7 +325,9 @@ kAttractModeConfFile !source "src/okvs.a" !source "src/parse.common.a" !source "src/parse.games.a" + !source "src/fx.hgr.common.a" !source "src/fx.hgr.fizzle.a" + !source "src/fx.hgr.spiral.a" !source "src/fx.hgr.diagonal.a" !source "src/fx.hgr.interlockingvertical.a" !source "src/fx.hgr.interlockinghorizontal.a" diff --git a/src/fx.hgr.common.a b/src/fx.hgr.common.a new file mode 100644 index 000000000..82ba58cae --- /dev/null +++ b/src/fx.hgr.common.a @@ -0,0 +1,68 @@ +HGRCalc +; in: A = HGR row (0x00..0xBF) +; out: A/X clobbered +; Y preserved +; ($26) points to first byte of given HGR row on hi-res page 1 +; ($3C) points to same byte on hi-res page 2 +; based on 'Woz Recodes Hi-Res Address Calculations' +; Apple Assembly Line vol. 7 issue 3 (December 1986) +; http://www.txbobsc.com/aal/1986/aal8612.html#a9 + 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 + rts + +HGRBlockCopy +; in: A = HGR row / 8 (0x00..0x17) +; Y = HGR column (0x00..0x27) +; out: all flags and registers clobbered + sty @loop+1 + asl + asl + asl + jsr HGRCalc + ldx #$08 +@loop ldy #$FD ; modified at runtime + lda ($3c),y + sta ($26),y + lda $27 + clc + adc #$04 + sta $27 + eor #$60 + sta $3d + dex + bne @loop + rts + +WaitForKeyWithTimeout +; in: A = timeout length (like standard $FCA8 wait routine) +; out: A clobbered +; X/Y preserved + sec +@wait1 pha +@wait2 sbc #1 + bne @wait2 + pla + bit $C000 + bmi @exit + sbc #1 + bne @wait1 +@exit rts diff --git a/src/fx.hgr.diagonal.a b/src/fx.hgr.diagonal.a index fd926af63..5fd3c3c86 100644 --- a/src/fx.hgr.diagonal.a +++ b/src/fx.hgr.diagonal.a @@ -4,7 +4,11 @@ DiagonalHGR lda #$17 sta $FA sta $FC -@loop jsr @block +@loop lda $FA + bpl + + lda #$00 ++ ldy $FB + jsr HGRBlockCopy dec $FB inc $FA lda $FB @@ -31,24 +35,3 @@ DiagonalHGR sta $FB bpl @loop @exit rts - -@block lda $FA - bpl + - lda #$00 -+ asl - asl - asl - jsr HGRCalc - ldx #$08 -- ldy $FB - lda ($3c),y - sta ($26),y - lda $27 - clc - adc #$04 - sta $27 - eor #$60 - sta $3d - dex - bne - - rts diff --git a/src/fx.hgr.interlockinghorizontal.a b/src/fx.hgr.interlockinghorizontal.a index 7decc3cf7..25d393680 100644 --- a/src/fx.hgr.interlockinghorizontal.a +++ b/src/fx.hgr.interlockinghorizontal.a @@ -34,7 +34,7 @@ InterlockingHorizontalHGR dey bpl @innerloop lda #$40 - jsr Wait + jsr WaitForKeyWithTimeout lda $C000 bmi @exit inc index2 diff --git a/src/fx.hgr.interlockingvertical.a b/src/fx.hgr.interlockingvertical.a index a8c7db844..c71bb6e83 100644 --- a/src/fx.hgr.interlockingvertical.a +++ b/src/fx.hgr.interlockingvertical.a @@ -1,3 +1,4 @@ +!zone { row1 = $fe row2 = $ff @@ -25,46 +26,11 @@ InterlockingVerticalHGR dey bpl - lda #$30 - jsr Wait + jsr WaitForKeyWithTimeout lda $C000 bmi @exit inc row1 dec row2 bpl @loop @exit rts - -HGRCalc - 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 - rts - -Wait - sec -@wait1 pha -@wait2 sbc #1 - bne @wait2 - pla - bit $C000 - bmi @exitwait - sbc #1 - bne @wait1 -@exitwait - rts +} diff --git a/src/fx.hgr.spiral.a b/src/fx.hgr.spiral.a new file mode 100644 index 000000000..41475e38b --- /dev/null +++ b/src/fx.hgr.spiral.a @@ -0,0 +1,69 @@ +SpiralHGR + lda #$27 + sta $FB + lda #$17 + sta $FD + lda #$00 + sta $FA + sta $FC +@outerloop + lda $FC + sta $FE + lda $FA + sta $FF + lda #$00 + sta $F9 +@loop lda $FE + ldy $FF + jsr HGRBlockCopy + lda #$1F + jsr WaitForKeyWithTimeout + bmi @exit + ldx $F9 + bne @a + inc $FF + lda $FB + cmp $FF + bcs @loop + inc $FC + inc $F9 + lda $FC + sta $FE + lda $FB + sta $FF +@a dex + bne @b + inc $FE + lda $FD + cmp $FE + bcs @loop + dec $FB + inc $F9 + lda $FD + sta $FE + lda $FB + sta $FF +@b dex + bne @c + dec $FF + lda $FF + cmp $FA + bpl @loop + lda $FD + cmp $FC + beq @exit + dec $FD + inc $F9 + lda $FD + sta $FE + lda $FA + sta $FF +@c dex + bne @loop + dec $FE + lda $FE + cmp $FC + bpl @loop + inc $FA + bne @outerloop ; always branches +@exit rts