Path: utzoo!mnetor!uunet!husc6!uwvax!puff!avery From: avery@puff.cs.wisc.edu (Aaron Avery) Newsgroups: comp.sys.amiga.tech Subject: Re: Blitter code needed Message-ID: <1663@puff.cs.wisc.edu> Date: 4 May 88 19:22:24 GMT References: <15SXA00051@BAGAMCOK> Reply-To: avery@puff.WISC.EDU (Aaron Avery) Organization: U of Wisconsin CS Dept Lines: 29 I have the feeling that the main thing you're missing is the approved method of accessing the blitter directly. You need to call a few routines regarding giving you exclusive access to the blitter. You need to call OwnBlitter() and then WaitBlit() before you access any of the blitter registers. OwnBlitter() makes sure that noone else will try to access the blitter while you do, and WaitBlit() makes sure that any previous blits are done before returning. Now you stuff all of the blitter registers with the values you want (making sure that bltsize is last), and the blitter should start the operation. At some time in the future (you may want to do some parallel operations while the blitter is doing its thing), you call WaitBlit() (I guess it's optional, but I do it), then call DisownBlitter(), which relinquishes your exclusive access. If you wish to do multiple operations before the DisownBlitter(), you want to separate them by WaitBlit()'s so that you don't start stuffing the registers before it's done with the previous operation. I strongly suggest that you try to get ahold of Tom Rockiki's program 'Blitlab'. It's commonly available, but let me know if you want me to mail it to you. The program allows you to 'play' with the blitter by giving you an enlarged bitmap to operate on, access to all of the registers, and boolean expression decoding. It's a very good program to test your operations with so that you're sure that the blitter behaves as you thought it would. This program alerted me to the 'wrap-around' that the blitter performs during shifting, which I wasn't aware of. Hope all of this helps, and, by the way, those routines mentioned above are in the graphics.library, so you need to have opened it to use them. -- Aaron Avery (avery@puff.cs.wisc.edu) ({seismo,caip,allegra,harvard,rutgers,ihnp4}!uwvax!puff!avery)