forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Severe graphical errors appearing in alpha blitted parts

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
Blue



Joined: 25 Feb 2006
Posts: 5

PostPosted: Wed Mar 15, 2006 4:40 am    Post subject: Severe graphical errors appearing in alpha blitted parts Reply with quote

I've been working on a little graphical test application in C++. It is using the default GU init functions and blitting function for alpha blitting. I can post them if needed. The only main difference is that the graphical functions are running within a PRX in usermode.

The main problem is that sometimes the screen gets messed up when the application is started, the non-alpha blitted parts appear to be fine, but alpha blitted parts appear twice in the screen with severely distorted colors. With twice I mean there are actually two screens displayed. As if the onscreen and offscreen buffer are drawn to the screen side by side and scaled down (different mode maybe?). These graphical errors persist even after restarting. But if they don't appear they will never appear with that build.

I have NO clue what causes this, I've even had it appear after I have changed they layout of a cpp file (I did not change any code), and when I changed it back it disappeared. But they usually appear after adding some function that alpha-blits to the screen.

I've been trying to trace it but it seems to appear in a randomly fashion, and disappears in a randomly fashion too. Almost impossible to trace... Anyone else had a similar problem?
Back to top
View user's profile Send private message
chp



Joined: 23 Jun 2004
Posts: 313

PostPosted: Wed Mar 15, 2006 5:01 am    Post subject: Reply with quote

I have seen this happen on occasion, and I have a testcase for this I think. It was noticed in a simple application if it was started without clearing the screen first. I might perhaps start looking into that. In the meantime, see if clearing the screen once first helps. (It's a longshot, but I haven't encountered it in my own code)
_________________
GE Dominator
Back to top
View user's profile Send private message
Blue



Joined: 25 Feb 2006
Posts: 5

PostPosted: Wed Mar 15, 2006 8:29 am    Post subject: Reply with quote

Hmm, I'll look into that, thanks. I did try to initialize the pspdebugscreen first as a last resort, but that didn't do anything. It seems like the alpha blitting part is using a different screen mode than the non-alpha blitting functions when it happens. It happened to me once while working on a larger C app. But now it seems to be happening to me atleast every 5 builds. I always fear the moment after the psp loading movie has ended now...

[edit] I've added the code, to clear the screen before rendering to it, to a messed up build and it cured it. I can't say that it has 'solved' the problem yet because it would usually go away by adding an arbitrary function. But I have good hopes. I'll report back when it happens again. I surely do hope it won;t happen again, it was driving me nuts.[/edit]

[edit2]Ok, scratch that, it's back already...[/edit2]

[edit3]I've added this just before the GU init part:
Code:
sceDisplaySetMode(0, 480, 272);


And the problem has not been around for a few builds now. Nothing definite yet tho.[/edit3]
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group