Path: chuka.playstation.co.uk!news From: Jim Newsgroups: scee.yaroze.programming.gnu_compiler Subject: VSyncCallback bug Date: Thu, 31 Jul 1997 10:11:26 +0100 Organization: PlayStation Net Yaroze (SCEE) Lines: 25 Message-ID: <33E056BE.2D131340@micronetics.com> NNTP-Posting-Host: jim.micronetics.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.0b4 [en] (Win95; I) X-Priority: 3 (Normal) Hi All, I think I've finally found a solution to the VSyncCallback problem where you would not be able to access globals from within the callback its self. This is because $gp is not restored for the call back. Add this line as the very first of the callback function. __asm__ volatile ("la $28, _gp") and have extern long _gp; as a global somewhere. Besure to remove the callback before your prog exits. I would appriciate someone confirming this actually works as I only played with it a little. Cheers JiM