Path: chuka.playstation.co.uk!news From: James Russell Newsgroups: scee.yaroze.programming.3d_graphics Subject: Re: GsLinkObject4 prototype error? Date: Tue, 11 Aug 1998 15:08:48 +0100 Organization: Sony Computer Entertainment Europe Lines: 28 Message-ID: <35D05070.348AE2E@scee.sony.co.uk> References: <35CF88D3.4762@manc.u-net.com> <35CFA154.5EAB@manc.u-net.com> <35D03B22.5D50@manc.u-net.com> NNTP-Posting-Host: mailgate.scee.sony.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.5b1 [en] (Win95; I) X-Accept-Language: en James Shaughnessy wrote: > > Turns out that passsing a u_long to GsLinkObject4 compiles fine > but crashes the program. It shouldn't. GsLinkObject4 definitely needs a u_long, but internally converts it to a u_long*. Instead of changing libps.h, it might be an idea to cast it properly: u_long *memaddress = (u_long *)0x80091234; GsLinkObject4((u_long)(memaddress + 3), .... That will get rid of your warnings. Because of your change to libps.h, the compiler will think that it is passing a pointer instead of an integer. I can't think of any reason why, but it might just change the code output by the compiler. (Actually, I checked - with my compiler, it doesn't, but GNU might). It's more likely that you've done something like added 3 to a u_long, which will create an unaligned address, crashing the system. Cheers, James -- == James_Russell@scee.sony.co.uk +44 (171) 447-1626 == Developer Support Engineer - Sony Computer Entertainment Europe One Chicken to bring them all and in the darkness bind them.