Path: chuka.playstation.co.uk!news From: James Russell Newsgroups: scee.yaroze.programming.2d_graphics Subject: Re: Lost time Date: Fri, 15 Jan 1999 19:13:35 +0000 Organization: Sony Computer Entertainment Europe Lines: 33 Message-ID: <369F935F.FDD2FBCF@scee.sony.co.uk> References: <77nqn4$hoo3@chuka.playstation.co.uk> NNTP-Posting-Host: mailgate.scee.sony.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.5 [en] (Win95; I) X-Accept-Language: en Alex Herbert wrote: > > Unless VSync(0) actually waits to see a VBlank AND a top of > frame, in which case if VSync(0) is called during the virtical blank it will > drop a frame. VSync waits for the start of the vertical blank (when the scanline hits the bottom of the TV screen), and exits when the beam hits the top of the screen. If you call it during the vertical blank, it just waits until the scanline reaches the top. > Conversly I have noticed that in interlaced modes I get significantly less > HSyncs before I have to call VSync(0) (without dropping frames) than I do in > non-interlaced modes. I'm assuming that the two issues are related. I checked the library source, but I can't give a definite answer because we don't have access to the hardware spec of the GPU (which is what VSync accesses). The function which does all the waiting during the vblank will only kick in if a particular bit is set in the GPU status register. If you're experiments are correct and you DO get more CPU time in non-interlaced mode, then I can only assume that the mystery bit is the 'interlaced mode on/off' bit, and the waiting is only performed in interlaced mode. However, I have tried this technique on my own non-interlaced code, using more accurate checks (don't ask), and I did get a speed up. In any case, you haven't got anything to lose by using the VSyncCallback method. Cheers, James -- == James_Russell@scee.sony.co.uk +44 (171) 447-1626 == Developer Support Engineer - Sony Computer Entertainment Europe Who were the Beta Testers for Preparations A through G???