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 

copyImage help!

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



Joined: 25 Dec 2005
Posts: 6
Location: PSPain

PostPosted: Mon Dec 26, 2005 11:17 pm    Post subject: copyImage help! Reply with quote

I have this weird problem: when I copyImage a background bitmap into the screen, I get some 'garbage' in the bottom-most lines, in the form of spureous-looking black or colour-inverting horizontal lines, with varying length. They appear and disappear during the first frames of animation and then stand still. I suspect it has anything to do with an incorrect configuration of the different buffers and/or data structures that fill the VRAM (draw buffer, depth buffer, etc...), as though they overlapped at some point, but I don't think it's the case. I don't know what goes on when swapBuffers is called, though. I don't even know the size of the VRAM!

The really weird thing is that sometimes it doesn't happen, or a texture is garbaged instead of the background!

My RGBA8888 480x272 image is held on a int buffer with size [512*272] 16-byte aligned

I call
sceGuCopyImage(GU_PSM_8888,0,0,480,272,512,pixeldata,0,0,512,(void*)(0x04000000+(u32)framebuffer));

on every frame, framebuffer = sceGuSwapBuffers()

Can anybody tell or suggest what is the problem?
_________________
void printSignature(void) {

printf("Brought to you by Kazlivsjy\n");

}
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Brunni



Joined: 08 Oct 2005
Posts: 186

PostPosted: Tue Dec 27, 2005 5:04 am    Post subject: Reply with quote

You just need to flush the cache before drawing an image that was modified with the CPU. Call sceKernelDcacheWritebackInvalidateAll();
_________________
Sorry for my bad english
Oldschool library for PSP - PC version released
Back to top
View user's profile Send private message
kazlivsjy



Joined: 25 Dec 2005
Posts: 6
Location: PSPain

PostPosted: Tue Dec 27, 2005 10:03 pm    Post subject: Reply with quote

Yeah, thanks, man!
_________________
void printSignature(void) {

printf("Brought to you by Kazlivsjy\n");

}
Back to top
View user's profile Send private message Send e-mail Visit poster's website
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