Path: chuka.playstation.co.uk!news From: alex@teeth.demon.co.uk (Alex Amsel) Newsgroups: scee.yaroze.programming.2d_graphics Subject: Re: Dynamic PIXEL & CLUT Creation ? Date: Sun, 27 Apr 1997 16:51:31 GMT Organization: Into Beyond Lines: 41 Message-ID: <336382dd.2607875@news.playstation.co.uk> References: <01bc521b$8ea98440$0411e8c3@cma> Reply-To: alex@teeth.demon.co.uk NNTP-Posting-Host: teeth.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Newsreader: Forte Agent .99g/32.335 On 26 Apr 1997 08:25:04 GMT, "Chris Allmark" did quoth at me: >I'm trying to create (as a test) a single pixel in VRAM without using a TIM >file. >I have tried to write a value (1 << 5) to a VRAM location for my pixel, and >16 x (0x7FFF) for my 15 bit color values. I have then assigned my sprite to >the pixel location, and the clut (4 bit) to the CLUT. It doesn't work. > >I have assumed that the 4 bit pixel value (0001) points to the second >address in the CLUT to find out what colour it should be. What am I doing >wrong ? I'm a little confused by what you mean but I'll try and help... If writing a pixel direct to the screen buffer, remember that it must be done with LoadImage and that the values are 16 bit (1,5,5,5) and cannot refer to cluts. If trying to set up a sprite by directly writing to vram remember that if the sprite is 16 colours (4 bit) then 1 'pixel' of vram = 4 'pixels' of your sprite. i.e. Each vram pixel is 16 bits long, and in those 16 bits you have pixel 1 | pixel 2 | pixel 3 | pixel 4 For an 8 bit clut it would be 2 pixels per vram word rather than 4. Remember you must use LoadImage, and remember that as a non blocking function it returns before actually having copied the pixel. Use a DrawSync to ensure it has done so. If you have done all this then perhaps you could post the source to look over? Does the sprite work if you initialise vram from a normal time file? * Alex Amsel * Into Beyond Web Design & JAVA Programming * * http://www.intobeyond.com * WWFC Utter Rubbish 1996-7* MM - "Steve Corica is every bit as good as that Kinkladze"