Path: chuka.playstation.co.uk!news From: James Chow Newsgroups: scee.yaroze.beginners Subject: Questions about VSync. Date: Sun, 03 May 1998 16:08:01 +0100 Organization: PlayStation Net Yaroze (SCEE) Lines: 46 Message-ID: <354C8851.709D2E83@chowfam.demon.co.uk> NNTP-Posting-Host: chowfam.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=x-user-defined Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.04 [en] (Win95; I) I realise the most relevant way to obtain an timer function is to use VSync(). Initially I was using VSync(-1) to get some sort of indication of the length of time passed. Unfortunately this increments in steps of 1/50sec for PAL and 1/60sec for NTSC, which are slightly too big. This means using the number of hsyncs which can be gotten from by VSync(0 or 1). Unfortunately, this is the thing which I am confused about. I get the indication (from the docs) that each horizontal line drawn represents a hsync. And all the hsyncs on the screen represent a vsync. Yes? OK. So if I set the graphics system to 256 lines in PAL, does this mean I should get 256 hsyncs per vsync? If not, why not? If this is correct, then why does it say in the User Guide (paper version, page 38) that PAL gives 312 hsyncs per vsync and 262 hsyncs per vsync for NTSC? And just to confuse me even more, we only have 311 hsyncs per vsync (v1.1 electronic p37). Now what has happened to the other number? Or do PAL and NTSC outputs give the same number of hsyncs per vsync? Another thing, that bothers me is this. while (1) { //do work cnt = VSync(0); //swap buffers, etc } VSync(0) blocks until vertical synchronisation and returns the number of hsyncs since VSync(0) was last called. So why does this code give a variable number depending on the amount of work done? An illustration of this would be by using the Check prog. With 1 ball, cnt is 14, and increases when the number of balls increases. But the number of lines (and therefore hsyncs) that need to be drawn remain the same. Argh! Help! -- jc