Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!rpi!uupsi!sunic!news.funet.fi!funic!santra!hila.hut.fi!jmunkki From: jmunkki@hila.hut.fi (Juri Munkki) Newsgroups: comp.sys.mac.programmer Subject: Re: Video Card Driver + Sound Manager Question Message-ID: <1991Mar24.222604.4013@santra.uucp> Date: 24 Mar 91 22:26:04 GMT References: <1991Mar24.173747.867@santra.uucp> Sender: news@santra.uucp (Cnews - USENET news system) Reply-To: jmunkki@hila.hut.fi (Juri Munkki) Organization: Helsinki University of Technology, FINLAND Lines: 77 Here's what I wrote earlier today: >If I understand this correctly, it says that I can install my own video >card VBL routine that will then make a _Control call to change the clut >on the video card. I've studied things a little closer now, and it appears that doing this will eventually crash the machine. This might be because _Control is a trap that might move memory and can not be called from a vertical blanking task. On my good old Toby frame buffer card, if I call _Control from the VBLTask, the card driver appears to wait for the next vertical blanking period and returns after waiting 1/66th of a second. This is not what I was aiming for. (I tried to make the control call immediate, but that didn't help.) >Right now my 60 Hz VBL task is not called regularly, if I call SetEntries. This is probably what is happening on the 8.24. The old card probably allows interrupts while it is waiting for the vertical blanking period, since my blanking task is called regularly and things work smoothly (unless I do what I described above and make the card wait within the interrupt task). Could someone who can, check if the 24-bit video card waits while interrupts are disabled? If it does, I'm inclined to call it a bug, or at least a nasty feature. Neither card seems to support asynchronous SetEntries calls. (How do I find out if a card supports asynch SetEntries?) >I know I will need to install a video card VBL task >that changes the clut, if I use the 3D LC shutter glasses. I hope someone understood what I meant above. Maybe I should clarify a little bit, since most people are probably not familiar with stereo 3D. To display graphics in stereo, a different picture is shown to each eye. This can be accomplished with the usual red-green glasses or as in my case, with liquid crystal shutter glasses. The glasses need to be switched very quickly and in synchronization with the display device. This is easy to accomplish with a vertical blanking task. What isn't quite that easy, is that the picture on the screen also needs to be changed at every vertical blanking task. This can either be accomplished by drawing into the display buffer from the VBL task, or changing the way the display buffer is shown. Drawing at VBL time is not efficient and only works, if the machine is fast enough. Even then, it cripples the performance of the machine. The second way to change the display contents, is to change the color lookup table so that the some bits in a pixel are ignored for one eye and others are ignored for the other. The problem is that it looks like you can't change the clut at vertical blanking time. The silly thing about this is that the clut is normally supposed to be changed only at vertical blanking time and that the only reason you can't do it, is that the person who wrote the drivers for these cards didn't expect anyone to make calls from an interrupt level. I now understand the second comment in the sample driver source, which said: ; 2) If SetEntries is entered while the interrupt level is ; non-zero, it should write immediately to the CLUT hardware. My video card at home certainly doesn't seem do this. It's probably too old to know about asynchronous SetEntries. Do I just have to be content that one can not efficiently use a Mac II for stereo display and remain compatible with most video cards? I could always dig up the hardware interface to my video card from the driver code, but it would then be incompatible with everything else. Does anyone know anything more about this? Apple? Radius? Anyone? ____________________________________________________________________________ / Juri Munkki / Helsinki University of Technology / Wind / Project / / jmunkki@hut.fi / Computing Center Macintosh Support / Surf / STORM / ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~