View Single Post
Old 20 May 2009, 18:14   #4
Anding
Users Awaiting Email Confirmation
 
Join Date: Nov 2008
Location: Hong Kong
Posts: 56
Thanks Toni. I think that might be it. Actually it is quite easy to dispense with COPLOC2 all together, at the expense of having the cooper a bit more busy after Vp>127 'falling through' all the wait instructions intended for Vp<127. The ammended code below works fine.

By the way, the great looking copper bars in demos, are they usually done with a loop like this or just by having a big copperlist as long as the height of the screen?

Code:
; copper list
newcop1	
	dc.w	COLOR00,$0002
	dc.w	$01df,$87fe	; Mask vertical position with %111
	dc.w	COLOR00,$0004	;...vertical count from %000 to %111
	dc.w	$02df,$87fe	;...and update color each time
	dc.w	COLOR00,$0006	;...wait for horiz >=223 to be off screen
	dc.w	$03df,$87fe	
	dc.w	COLOR00,$0008
	dc.w	$04df,$87fe	
	dc.w	COLOR00,$000a
	dc.w	$05df,$87fe	; Blue bars for Vp <=127 and 256 <= Vp
	dc.w	COLOR00,$000c	
	dc.w	$06df,$87fe
	dc.w	COLOR00,$000e	
	dc.w	$07df,$87fe
	dc.w	COLOR00,$000f 
	dc.w	$7f01,$7f01	; Skip if Vp >= 127 
	dc.w	COPJMP1,$0	; Force copper pc jump to COP1LC
	dc.w	COLOR00,$00020 	; now we are in zone 128 <= Vp <=255
	dc.w	$81df,$87fe		
	dc.w	COLOR00,$00040	; Same mask but need to count from
	dc.w	$82df,$87fe	; ... %10000000 to %10000111
	dc.w	COLOR00,$00060	; ...since the MSB is always unmasked
	dc.w	$83df,$87fe	
	dc.w	COLOR00,$00080
	dc.w	$84df,$87fe		
	dc.w	COLOR00,$000a0	; Green bars for 128 <= Vp <=255
	dc.w	$85df,$87fe
	dc.w	COLOR00,$000c0	
	dc.w	$86df,$87fe
	dc.w	COLOR00,$000e0	
	dc.w	$87df,$87fe
	dc.w	COLOR00,$000f0 		
	dc.w	COPJMP1,$0	; Force copper pc jump to COP1LC	
	dc.w	$FFFF,$FFFE	; Endless wait-just in case cooper gets here
Anding is offline  
 
Page generated in 0.09289 seconds with 11 queries