Path: chuka.playstation.co.uk!news From: developer support Newsgroups: scee.yaroze.programming.2d_graphics Subject: Re: CLUT troubles! Date: Fri, 01 Aug 1997 11:43:56 +0000 Organization: PlayStation Net Yaroze (SCEE) Lines: 56 Message-ID: <33E1CBFC.42D@interactive.sony.com> References: <33E1AB7A.1DEE@dial.pipex.com> NNTP-Posting-Host: 194.203.13.9 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 2.01 (Macintosh; I; PPC) Chris Chadwick wrote: > > Can anyone *please* explain what's happening here: > > I have a simple 8-bit (256-colour) TIM displayed as a > sprite. I want to copy new CLUT entries into the > 256-colour CLUT associated to the sprite by using > MoveImage(), which works when I change CLUT entries > 0-15 (inclusive), but I can't seem to over-write > entries 16-255. The same is true if, for example, > I use ClearImage() to over-write each CLUT entry > in turn by pressing a joypad button: I'm able to > change entries 0-15 but anything else is ignored. We've not come across this, and have to trouble changing all the CLUT values. Only thing I can think of is that you haven't called DrawSync after the MoveImage. If you want the CLUT to take effect immediately the DrawSync is crucial. > > I've printed all the relevant variables as I go and > all seems fine. I've even used a 'test' TIM which > simply shows blocks of all 256 colours in the CLUT - > using the above example, as I keep pressing the button > each colour changes as I'd expect until it gets to > CLUT entry 16 then, nothing! > > Another oddity I discovered is that if I place the > CLUT with a tpage X offset other than 0 (i.e. not > aligned with the left-hand edge of the tpage) then > simply displaying the sprite causes all colours to be > 'shifted' in the displayed image by however many the > CLUT tpage X offset is e.g. If I have my CLUT at > frame buffer address X=1, Y=480 (instead of X=0, Y=480) > then pixels in the image that should be displayed using > CLUT entry 1 are displayed with the colour of CLUT > entry 0 etc. Again, I've displayed all settings and all > is reported as normal: the GsSPRITE member .cx is shown > as 1 but appears to be using 0!? :( > The CLUT has to be aligned to a 16 pixel boundary > I wasn't aware CLUT's have to be aligned with tpages, > certainly, Tim Tool allows them to be positioned anywhere! > > I hope I've explained the problems cleary enough. > Any help would be *much* appreciated! > > Thanks in advance, > > Chris If you can post the code we'll have a look at the CLUT changing bit. Stuart