Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!spool.mu.edu!uunet!ogicse!pdxgate!eecs!bairds From: bairds@eecs.cs.pdx.edu (Shawn L. Baird) Newsgroups: comp.sys.amiga.programmer Subject: Re: Copper SKIP does not skip WAIT!!!! Message-ID: <1798@pdxgate.UUCP> Date: 28 Feb 91 16:16:52 GMT References: Sender: news@pdxgate.UUCP Distribution: comp Lines: 61 mt87692@lehtori.tut.fi (Mikko Tsokkinen) writes: > The skip intruction causes the Copper to skip the next insruction if video >beam counters are equal to or greater than the value given in the instruction. >Now I was making my copperlist: >Copper2 dc.w $0001,$8001 ; SKIP1 next command allways Try: dc.w $0001,$ff01 This way, you aren't masking off all of the comparison bits so that there is actually something to compare with, since it only compares the bits that filter through the mask, and $8001 doesn't leave any bits to compare with. > dc.w $ffff,$fffe ; WAIT1 for frame to end > dc.w color,$0fff ; MOVE1 Change bg to white > dc.w $ffff,$fffe ; WAIT2 for frame to end >This copperlist should change the bg color to white but it doesn't skip the >WAIT1 instruction. True, because of the above. It simply never gets to the color instruction. >However this program works fine: >Copper2 dc.w $0001,$8001 ; SKIP1 next command allways > dc.w color,$0fff ; MOVE1 change bg to white > dc.w $ffff,$fffe ; WAIT1 for frame to end >This copperlist does not change the bg color. This, I find somewhat odd. It should change the background color since apparently the skip should fail. Or perhaps the skip will be dependent on condition codes set earlier or something. Again, try with $ff01, and see if you get more reasonable results. The skip instruction skips a single copper command with no prejudices. BTW: you can greatly increase the power of the skip instruction by having the instructions that you skip over do things like load a new address into the copper address pointer and then strobe to it. The copper is a very interesting piece of hardware, probably more powerful than some of the early micros itself. >CONCLUSION: SKIP INSTRUCTION SKIPS ONLY MOVE COMMANDS!!!!!!!!!!! I wouldn't jump to conclusions, as the people who designed the hardware should have a pretty good idea about how it works. The skip instruction is documented everywhere to skip a single instruction, and it doesn't make logical sense to waste time making sure it isn't a wait instruction when making it skip a wait instruction might be handy. >This information is very important to if you are ever making complex >copperlists. Another bug in HRM1.3 (or in the hardware) in two days. The references to the skip instruction in my 1.3 manual use $ff01 as their mask value. They probably know what they are doing although they make the occasionaly typo. | Shawn L. Baird | Or via US Snail: | | bairds@eecs.ee.pdx.edu | 17650 SE Cason Rd. | | ...uunet!tektronix!psueea!eecs!bairds | Gladstone, OR 97027 |