Path: chuka.playstation.co.uk!news From: Jim Newsgroups: scee.yaroze.programming.libraries Subject: Re: VSyncCallback Date: Thu, 03 Jul 1997 13:41:20 +0100 Organization: PlayStation Net Yaroze (SCEE) Lines: 20 Message-ID: <33BB9DF0.FE2EB39B@micronetics.com> References: <33BB7448.19E8E81D@cryogen.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) Alain Malek wrote: > I tried to use the VSyncCallback function. > But I couldn't share variables between the callback > routine and the main program. Are you using compiler optimisations?? I believe there is a glitch in the compiler when relating to the $gp register inside the callback. The workaround is to put you callback function and shared variables in a separate .c file. Compile that with NO optimizations. And link it with your other optimized objects. You will probably have to write a header file to declare the variables and prototypes as externs. There was a posting about a month or two ago describing exactly this from Alex Amsel. Check these out for more information. Regards JiM