Path: chuka.playstation.co.uk!scea!wal From: wal@blarg.net (wayne a. lee) Newsgroups: scee.yaroze.beginners Subject: Re: Questions about VSync. Date: Tue, 12 May 1998 03:01:16 -0700 Organization: SCEA News Server Lines: 30 Message-ID: References: <354C8851.709D2E83@chowfam.demon.co.uk> <6ij6jd$jpr18@chuka.playstation.co.uk> <354D8AA7.17CA37C6@chowfam.demon.co.uk> <354E298F.2865CC25@netmagic.net> <354E4EA8.A92F3D10@chowfam.demon.co.uk> NNTP-Posting-Host: dnai-207-181-237-170.dialup.dnai.com Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Newsreader: Yet Another NewsWatcher 2.4.0 In article <354E4EA8.A92F3D10@chowfam.demon.co.uk>, James Chow wrote: > Will someone _just_ answer this question then. > > while (1) { > //do work > cnt = VSync(0); > //more work > } > > Why does cnt _not_ equal 312 for PAL or 262 for NTSC, through > each loop iteration? I've been playing with VSync() a lot recently, and the docs seem a bit confused. As far as I can tell from my experiments, when VSync() is called with a parameter >=0, it returns the number of hsyncs that have passed since the last *blocking call* to VSync() RETURNED; that is, the number of hsyncs that have passed since VSync() last returned when it was called with an argument of 0 or 2+. This means that you can call VSync(1) multiple times in your main loop and it will return the time in hsyncs since the "top of frame". I have a little diagram on paper, but I could ASCII-ize it, or maybe put it on my web page. -- wayne a. lee