Path: chuka.playstation.co.uk!news From: "Andrew Partington" Newsgroups: scee.yaroze.freetalk.english Subject: Re: weird pixel vanishing in sprite Date: Thu, 19 Jul 2001 19:34:54 +0100 Organization: PlayStation Net Yaroze (SCEE) Lines: 92 Message-ID: <9j78mo$qcd1@www.netyaroze-europe.com> References: <01c1107c$c9da4a80$4f1be4d5@pal-s-omnibook> NNTP-Posting-Host: modem-20.amlodipine.dialup.pol.co.uk X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Hi Pal! I had some strange problems with sprites a while back that puzzled me for ages! I don't recall missing pixels but I do remember a lot of things like: - no transparency when transparency was active - sprites being displayed upside-down or back-to-front even though the scalex and scaley values were set to 4096 - refusing to zoom in/out even though the relevant bits were set in the attribute etc etc!! Nearly drove me to DirectX!! :) Eventually I recovered my sanity and figured out that my program had been overwriting the sprite structures in memory - in other words, I had something like this in memory: -------------------------- Stack -------------------------- free memory... -------------------------- My .tims -------------------------- My program -------------------------- 0x80090000 OS -------------------------- 0x00000000 I changed my siocons script and the link address of my program so I got this: -------------------------- Stack -------------------------- free memory... -------------------------- My program -------------------------- 0x800b0000 My .tims -------------------------- 0x80090000 OS -------------------------- 0x00000000 i.e. made it so that the program sat well above the .tims. I recompiled everything, reuploaded all the data and it worked fine! I've heard rumours that malloc/free are a bit buggy for psx, if you were using these (guesswork time) they may have avoided trashing the program code, but happily overwritten part of the .tim... maybe thats why it worked when I arranged it like in the second example. If that is correct (don't know if it is or not), don't link your program too high or the stack may get trashed! Hope this works for you mate! Andy pal wrote in message news:01c1107c$c9da4a80$4f1be4d5@pal-s-omnibook... > I was happily coding when I noticed that a few pixels from some of my > sprites were just missing. After a lot of checking, I still can't find out > why. It happens always with the same bitmap data, and the same pixels. > Whatever the coordinates of the sprite on the screen, and of the bitmap in > vram, the missing pixels remain the same in every instance of the sprite > drawn. > > The most intriguing fact is that if I scale up the sprite (say, 2*4096), > all the pixels are here! That means that the bitmap and clut in vram are > not damaged. > > I ran my proggy on two different TV sets just to check, no difference. > > I changed the background color (from black to dark and light grey) to > ensure it is not an illusion... > > Has anyone ever met this? This is pretty weird... Any comment welcome! > (btw, if my description is unclear, please tell me so I can try and fix it > ;) ) > > pal >