Path: utzoo!attcan!uunet!lll-winken!ames!xanth!ukma!mailrus!caen.engin.umich.edu!sol.engin.umich.edu!billkatt From: billkatt@sol.engin.umich.edu (Steve Bollinger) Newsgroups: comp.sys.mac.programmer Subject: Re: Fast image changes Message-ID: <41153b20.a590@mag.engin.umich.edu> Date: 25 Jan 89 22:30:00 GMT References: <243@usage.csd.unsw.oz> <1453@ditsyda.oz> <2350@ilium.cs.swarthmore.edu> Sender: netnews@caen.engin.umich.edu Reply-To: billkatt@caen.engin.umich.edu (Steve Bollinger) Organization: Computer Aided Engineering Network (CAEN), University of Michigan Lines: 38 Sender: Followup-To: In article <2350@ilium.cs.swarthmore.edu> jackiw@ilium.UUCP (Nick Jackiw) writes: >In article <1453@ditsyda.oz> vincent@ditsyda.oz (David A. Vincent) writes: >> in article <243@usage.csd.unsw.oz>, grants@usage.csd.unsw.oz (Grant Sayer) says: >> > I am trying to draw two images one on an offscreen pixelmap and then >> [...] >> >code which swaps the images, basically a copybits operation, into the VBL >> >task queue seem a viable solution. If this is the casethen is it true >> >> This seems viable provided that the copybits can be completed during >> the VBL period. >> > >Much easier is just to coordinate your copyBits with the VBL interval. >You can do this in Pascal by waiting for the system timer to tick, something >which happens as a system-VBL task. > > var x:longint; > > Delay(1,X); {Wait for next VBL interval} > Copybits(...); {Here we go, do it fast!} Except... He said that he was using a pixelmap (pixMap), and those are under color quickdraw. The VBL is fake on the Mac II and won't help reduce flicker. You need to look in inside Mac V 5 at chapter 29 for the correct way to sync to the REAL VBL on a Mac II. And also you don't need to complete the operation before the verticla blanking interval is over, you just need to keep ahead of the scan line. +----------------------+----------------------------------------------------+ | Steve Bollinger | Internet: billkatt@caen.engin.umich.edu | | 4297 Sulgrave Dr. +------+---------------------------------------------+ | Swartz Creek, Mi. 48473 | "My employer doesn't take my opinion any | +-----------------------------+ more seriously than you do." | | "You remember the IIe, it +---------------------------------------------+ | was the machine Apple made before they decided people didn't need | | machines with big screens, color, or slots." | | - Harry Anderson (from NBC's Night Court) | +---------------------------------------------------------------------------+