From 66890eda439398d1240d244e7c7cfc8636a3fcef Mon Sep 17 00:00:00 2001 From: alpine9000 Date: Thu, 24 Mar 2016 21:12:45 +1100 Subject: [PATCH] A4000 compatibility --- 023.slideshow/image.s | 4 ++-- 023.slideshow/slideshow.s | 17 +++++++++++++---- 023.slideshow/utils.s | 13 ++++++++----- 3 files changed, 23 insertions(+), 11 deletions(-) diff --git a/023.slideshow/image.s b/023.slideshow/image.s index 51820ec..6f7f9d4 100644 --- a/023.slideshow/image.s +++ b/023.slideshow/image.s @@ -57,12 +57,12 @@ SetupImage: if INTERLACE==1 ;; poke the bitplane pointers for the two copper lists. move.l #SCREEN_WIDTH_BYTES*SCREEN_BIT_DEPTH,d0 - lea copperListAlternate,a0 + lea copperListAlternateBplPtr,a0 jsr PokeBitplanePointers endif moveq.l #0,d0 - lea copperList,a0 + lea copperListBplPtr,a0 jsr PokeBitplanePointers movem.l (sp)+,d0-a6 rts diff --git a/023.slideshow/slideshow.s b/023.slideshow/slideshow.s index f4c603c..6e16c10 100644 --- a/023.slideshow/slideshow.s +++ b/023.slideshow/slideshow.s @@ -8,6 +8,8 @@ xdef bitplanes2 xdef bitplanes3 xdef Module + xdef copperListBplPtr + xdef copperListAlternateBplPtr byteMap: dc.l Entry @@ -84,16 +86,17 @@ Level3InterruptHandler: .verticalBlank: move.w #INTF_VERTB,INTREQ(a6) ; clear interrupt bit - if INTERLACE==1 btst #VPOSRLOFBIT,VPOSR(a6) beq.s .lof lea copperListAlternate,a0 move.l a0,COP1LC(a6) + move.w COPJMP1(a6),d0 bra .done .lof: lea copperList,a0 move.l a0,COP1LC(a6) + move.w COPJMP1(a6),d0 .done endif ; INTERLACE==1 @@ -134,7 +137,7 @@ Playrtn: if INTERLACE==1 copperListAlternate: - ;; bitplane pointers must be first else poking addresses will be incorrect +copperListAlternateBplPtr: dc.w BPL1PTL,0 dc.w BPL1PTH,0 dc.w BPL2PTL,0 @@ -147,11 +150,14 @@ copperListAlternate: dc.w BPL5PTH,0 dc.w BPL6PTL,0 dc.w BPL6PTH,0 + dc.w $106,$c00 ;AGA sprites, palette and dual playfield reset + dc.w $1FC,0 ;AGA sprites and burst reset + dc.l $fffffffe dc.l $fffffffe endif; INTERLACE==1 copperList: - ;; bitplane pointers must be first else poking addresses will be incorrect +copperListBplPtr: dc.w BPL1PTL,0 dc.w BPL1PTH,0 dc.w BPL2PTL,0 @@ -164,7 +170,10 @@ copperList: dc.w BPL5PTH,0 dc.w BPL6PTL,0 dc.w BPL6PTH,0 - dc.l $fffffffe + dc.w $106,$c00 ;AGA sprites, palette and dual playfield reset + dc.w $1FC,0 ;AGA sprites and burst reset + dc.l $fffffffe + dc.l $fffffffe align 4 diff --git a/023.slideshow/utils.s b/023.slideshow/utils.s index 54920d2..e907da9 100644 --- a/023.slideshow/utils.s +++ b/023.slideshow/utils.s @@ -2,14 +2,17 @@ xdef WaitRaster xdef Depack - WaitVerticalBlank: - movem.l d0-a6,-(sp) -.loop move.l $dff004,d0 + movem.l d0,-(sp) +.loop: move.l $dff004,d0 and.l #$1ff00,d0 - cmp.l #303<<8,d0 + cmp.l #303<<8,d0 ; wait for the scan line bne.b .loop - movem.l (sp)+,d0-a6 +.loop2 move.l $dff004,d0 + and.l #$1ff00,d0 + cmp.l #303<<8,d0 ; wait for the scal line to pass (A4000 is fast!) + beq.b .loop2 + movem.l (sp)+,d0 rts