Path: chuka.playstation.co.uk!chuka.playstation.co.uk!news From: jamesr@peace.co.nz Newsgroups: scee.yaroze.programming.libraries Subject: Timers Date: 22 Sep 1997 11:16:20 GMT Organization: PlayStation Net Yaroze (SCEE) Lines: 59 Message-ID: <605k25$5325@emeka.playstation.co.uk> Reply-To: jamesr@peace.co.nz NNTP-Posting-Host: 194.203.13.2 Originator: news@emeka From: Lewis_Evans@PLAYSTATION.SONY.COM To: news@playstation.co.uk All you need is a method for translating frameCounter times in your program to seconds in the real world. (assuming you have a frameCounter variable that's updated every pass through the main loop). Firstly detect PAL or NTSC; now you know 50 or 60 frames per second. Secondly calculate the program's own frame rate from its hsync count. (Get hsync by VSync(1); 240 scan lines for one frame of NTSC and 270 for PAL (roughly)). This tells you the frame rate divider (integer, typically 1 to 4). Now you know how long one frame takes. Eg in a PAL program with hsync count 340, frame rate divider is 2, ie running at 25 fps. Hence you can detect when N.M seconds have passed. Lewis To: Lewis Evans cc: From: news @ playstation.co.uk Subject: Timers:scee.yaroze.programming.libraries From: James Russell Newsgroups: scee.yaroze.programming.libraries Subject: Timers Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Quick and easy question: Is there any mechanism for causing an interrupt at a given time period? (Not VSyncCallback, because the time for that changes depending on whether you're using NTSC or PAL). Ta muchly, James -- ==PEACE COMPUTERS ==James.Russell@peace.co.nz - 64(9)3730400 -Fax 64(9)3730401 Bad day: When your income tax refund check bounces.