View Single Post
Old 23 April 2020, 20:43   #1
Rock'n Roll
Registered User

Rock'n Roll's Avatar
 
Join Date: Aug 2018
Location: Drübeck / Germany
Age: 46
Posts: 9
copper skip and copjmp2

I make some tests with the copper skip instruction
and a second copperlist.

This program works if a wait instruction (on the same
line) before the skip instruction in the copperlist exists.
Without this wait instruction the skip instruction doesn't work.
I found no information about this behaviour in any documents.

Is this a normal behaviour?
Is this wait instruction always necessery?


start:
;.....
move.l #cop2,$84(a5) ; pointer COP
move.l #cop1,$80(a5) ; pointer COP
move.w d0,$88(a5) ; start COP
;.....
move.w #$ff01,skip ; dynamicly change from programm
;move.w #$fffe,skip
;.....

****************************************************************************

Cop1: ; copperlist 1
dc.w $1007,$fffe
dc.w $180,$F00 ; red
;dc.w $4007,$fffe ; wait $fffe
; without this instruction it doesn't work
dc.w $4007 ; the same as before??? !!!!!!!!
skip:
dc.w $ff01 ; skip $ff01 or wait $fffe
dc.w $8a,0 ; copjmp2 start (skip the next instruction)

dc.w $180,$0F0 ; green
dc.w $6007,$fffe
dc.w $180,$00F ; blue
dc.w $ffff,$fffe

****************************************************************************

Cop2: ; copperlist 2
dc.w $8007,$fffe
dc.w $180,$000 ; black
dc.w $A007,$fffe
dc.w $180,$FFF ; white
dc.w $C007,$fffe
dc.w $180,$FF0 ; yellow
dc.w $ffff,$fffe


;remeber: the only different between wait and skip are:
;SECOND WAIT INSTRUCTION WORD (IR2)
;Bit 0 Always set to 0 - so the end is even

;SECOND SKIP INSTRUCTION WORD (IR2)
;Bit 1 Always set to 1 - so the end is odd
Rock'n Roll is offline  
 
Page generated in 0.04612 seconds with 11 queries