	opt c+,d+
	
; ********** labels **********

custom	= $dff000
bplcon0	= custom+$100
bplcon1	= custom+$102
bpl1pth	= custom+$0e0
bpl1ptl	= custom+$0e2
bpl2pth	= custom+$0e4
bpl2ptl	= custom+$0e6
bpl3pth	= custom+$0e8
bpl3ptl	= custom+$0ea
bpl4pth	= custom+$0ec
bpl4ptl	= custom+$0ee
bpl5pth	= custom+$0f0
bpl5ptl	= custom+$0f2
diwstrt	= custom+$08e
diwstop	= custom+$090
ddfstrt	= custom+$092
ddfstop	= custom+$094
bpl1mod	= custom+$108
bpl2mod	= custom+$10a
dmacon	= custom+$096
colstart	= custom+$180
dmabits	= %1000001100000000
bconbits	= %0101001000000000
intreqr	= custom+$01e
intreq	= custom+$09c
vposr	= custom+$004

; ****************************

	move.w #$0000,colinc
	move.w #bconbits,bplcon0
	move.w #$0000,bplcon1
	move.w #$2c81,diwstrt
	move.w #$f4c1,diwstop
	move.w #$0038,ddfstrt
	move.w #$00d0,ddfstop
	move.w #$0000,bpl1mod
	move.w #$0000,bpl2mod
	
; set up colour registers

	move.w #32,d0
	lea colstart,a1
cregloop:	move.w colinc,(a1)+
	addq.w #2,colinc
	subq.w #1,d0
	bne cregloop
	
; set up bit planes

	move.w #2000,d0
	move.l #$21000,a1
	move.l #$22000,a2
	move.l #$23000,a3
	move.l #$24000,a4
	move.l #$25000,a5
fplloop:	move.l #$55555555,(a1)+
	move.l #$33333333,(a2)+
	move.l #$0f0f0f0f,(a3)+
	move.l #$00ff00ff,(a4)+
	move.l #$ffffffff,(a5)+
	subq.w #1,d0
	bne fplloop
	
	move.w #$0002,bpl1pth
	move.w #$1000,bpl1ptl
	move.w #$0002,bpl2pth
	move.w #$2000,bpl2ptl
	move.w #$0002,bpl3pth
	move.w #$3000,bpl3ptl
	move.w #$0002,bpl4pth
	move.w #$4000,bpl4ptl
	move.w #$0002,bpl5pth
	move.w #$5000,bpl5ptl
	
; enable DMA. this should display the bitplanes

	move.w #dmabits,dmacon

	lea custom,a0	
vloop:	move.w intreqr,d0
	and.w #$0020,d0
	beq vloop
	move.w #$0020,intreq
	move.w vposr,d0
	bpl vl1
	move.l #$21000,bpl1pth
	bra vloop
	
vl1:	move.l #$22000,bpl1pth
	bra vloop
	

	even

colinc	dc.w $0000
