diff --git a/009.anim_blit/anim_blit.s b/009.anim_blit/anim_blit.s index 1e6c7f3..eb002a5 100644 --- a/009.anim_blit/anim_blit.s +++ b/009.anim_blit/anim_blit.s @@ -7,21 +7,20 @@ entry: lea CUSTOM,a6 bsr init - + lea bitplanes(pc),a0 lea emoji,a1 lea emojiMask,a2 .mainLoop: + bsr waitvbl + bsr moveBlitterObject bra.s .mainLoop include "blit.s" include "init.s" - -level3InterruptHandler: - movem.l d0-a6,-(sp) - move.w #INTF_VERTB,INTREQ(a6) ; clear interrupt bit - -.moveBlitterObject: + include "utils.s" + +moveBlitterObject: lea xpos(pc),a3 lea ypos(pc),a4 add.l #1,xpos ; move the blitter object one pixel to the left @@ -35,12 +34,13 @@ level3InterruptHandler: bne.s .done move.l #0,ypos ; wrap y back to 0 .done: + rts - -.interruptComplete: - movem.l (sp)+,d0-a6 - rte - + +installPalette: + include "out/image-palette.s" + rts + xpos: dc.l 0 ypos: dc.l 0 diff --git a/009.anim_blit/bin/anim_blit.adf b/009.anim_blit/bin/anim_blit.adf index ceaa834..84cc6cd 100644 Binary files a/009.anim_blit/bin/anim_blit.adf and b/009.anim_blit/bin/anim_blit.adf differ diff --git a/009.anim_blit/blit.s b/009.anim_blit/blit.s index a5bc03b..fa79b77 100644 --- a/009.anim_blit/blit.s +++ b/009.anim_blit/blit.s @@ -51,20 +51,16 @@ blitObject64: ;; d1 = YPOS ;; d4 = XPOS_BYTES - move.l d0,d2 ; d2 = XPOS - move.l d0,d3 ; d3 = XPOS - lsr.l #3,d3 ; d3 = XPOS_BYTES - move.l d3,d4 ; d4 = XPOS_BYTES - move.l d0,d3 ; d3 = XPOS - lsr.l #4,d3 ; d3 = XPOS_WORDS - lsl.l #4,d3 ; d3 = XPOS_NEAREST_WORD - sub.l d3,d2 ; d2 = num pixels to shift - lsl.w #8,d2 ; BLIT_SOURCE_SHIFT<