Path: chuka.playstation.co.uk!news From: Alex Herbert Newsgroups: scee.yaroze.programming.2d_graphics Subject: Re: Hi-res question Date: Wed, 27 May 1998 17:09:08 +0000 Organization: PlayStation Net Yaroze (SCEE) Lines: 63 Message-ID: <356C3AA4.4933C672@ndirect.co.uk> References: <6jmvrs$35i1@emeka.playstation.co.uk> <3561930C.CDA794B5@hinge.mistral.co.uk> <356304D9.B623E918@chowfam.demon.co.uk> Reply-To: aherbert@ndirect.co.uk NNTP-Posting-Host: dialin2-58.ndirect.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.04 [en] (Win95; I) James Chow wrote: > > > Try clearing the VRAM... > > > > > > > > What you could actually do is use a rectangle instead of a clear...: > > > > // r,g,b = char's : the colour to clear screen to > > GsBOXF my_box={0,0,GsGetActiveBuff()?0:512,640,512,r,g,b}; > > GsSortBoxFill(&my_box,WorldOt[GsGetActiveBuff()],(1< > > > That'll do it..... > > > > I believe inserting these lines after modifying GsDISPENV > is the neatest way of clearing the background. > > GsDRAWENV.isbg = 1; > GsDRAWENV.r0 = (red value); > GsDRAWENV.g0 = (green value); > GsDRAWENV.b0 = (blue value); > > But it still does not tell me why GsSortClear doesn't work! > After a bit more testing of this problem, it has something to > do with the very bottom line of the screen - definitely. > > Setting the height to 510, 511 and GsSortClear() works. But > the problem starts when trying to use the max 512 lines. > GsSortClear() fails to work. OK, so we use a workaround. > We manually clear the backgound (using above examples), > simulating GsSortClear() (nearly!). But I looked very carefully > at the screen, at the bottom line is NOT cleared, say when > I move a sprite over it. > > This is seems like the classic bug of "counting from 0", > giving a 1-off result. > Anyone? > -- > jc Hmm... this all sounds a bit familiar. I'm at work, so I don't have my Yaroze etc etc... I had a similar problem. At the start of my code I clear the VRAM. (Now which function did I use? I can't remember, but I'm sure it wasn't GsSortClear.) Now I'm not running in high res, but I was trying to clear the whole VRAM in one go. For some reason the 512th line does not clear. (I'm running 320x256 and the bottom line of the second frame was not cleared.) I haven't looked at that bit of code for some time now, but I'm sure it's a Sony bug. I'll look at my code and get back. I did find a solution, but can't remember it now. Nor can I remember if it was a good solution or a nasty cludge. Herbs