Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!wuarchive!udel!haven!mimsy!mojo!russotto From: russotto@eng.umd.edu (Matthew T. Russotto) Newsgroups: comp.sys.mac.programmer Subject: Re: Advice on icon animation wanted Message-ID: <1990Dec21.191852.2000@eng.umd.edu> Date: 21 Dec 90 19:18:52 GMT References: <1116@babcock.cerc.wvu.wvnet.edu> <1990Dec18.205338.6800@svc.portal.com> <11592@goofy.Apple.COM> Sender: news@eng.umd.edu (C-News) Organization: College of Engineering, Maryversity of Uniland, College Park Lines: 42 In article <11592@goofy.Apple.COM> rmh@apple.com (Rick Holzgrafe) writes: >In article <1990Dec18.205338.6800@svc.portal.com> daven@svc.portal.com >writes: >> Using a VBL task would probably produce the smoothest animation. However, >> there is an issue here I've always wondered about. With the non-color >> Mac's the VBL task was tied to the vertical blanking of the B&W monitor. >> With the color Mac's there is no gaurantee that this is so. I believe the >> Apple 13" color monitor refreshes it's screen at a faster rate than the >60Hz >> rate of the VBL task queue. So, could animation by means of a VBL task >could >> cause some flicker on a color monitor? > [SlotVInstall info] >"So how do I find out what slot the monitor is in?" Here I gotta go out on >a limb - I haven't tried this stuff, I've just pawed through Inside Mac >Vol. V. If I understand what I've read correctly, you use the routines in >Chapter 5 "Graphics Devices" to learn about each of the display devices >that are available. The GDevice record for each will give you the refnum >of the driver for the monitor. Now go to Chapter 23 "The Device Manager" >and use the refnum to get the AuxDCE record for the driver; this will give >you the slot number. > >Hope this helps (and I hope it's correct...) Sounds correct to me-- here's the code I use. gd = GetMainDevice(); /* or get a different device if you like */ SlotVInstall(taskptr, (*GetADCtlEntry((*gd)->gdRefNum))->dCtlSlot); AuxDCEHandle GetADCtlEntry(refnum) unsigned long refnum; { return *(*((AuxDCEHandle **)0x11c) + (refnum ^ 0xFFFFFFFF)); } (0x11c is the unit table base) -- Matthew T. Russotto russotto@eng.umd.edu russotto@wam.umd.edu .sig under construction, like the rest of this campus.