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 

[SOLVED]how can I get PBP image offset and length

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



Joined: 18 Sep 2009
Posts: 6

PostPosted: Wed Dec 02, 2009 2:07 pm    Post subject: [SOLVED]how can I get PBP image offset and length Reply with quote

I want to get the image in PBP
but I don't know the image's offset and length

sceRead (buf , ? , ? )


Last edited by yucopowo2009 on Fri Dec 04, 2009 3:57 pm; edited 1 time in total
Back to top
View user's profile Send private message
a_noob



Joined: 17 Sep 2006
Posts: 97
Location: _start: jr 0xDEADBEEF

PostPosted: Wed Dec 02, 2009 2:43 pm    Post subject: Reply with quote

Cheers. http://hitmen.c02.at/files/yapspd/psp_doc/chap26.html#sec26.3
_________________
Code:
.øOº'ºOø.
'ºOo.oOº'
Back to top
View user's profile Send private message AIM Address MSN Messenger
Torch



Joined: 28 May 2008
Posts: 842

PostPosted: Thu Dec 03, 2009 6:49 pm    Post subject: Reply with quote

Code:
u32 header[10];

SceUID fd = sceIoOpen(eboot, PS_O_RDONLY, 0);

if (fd >= 0)
{
    if (sceIoRead(fd, header, sizeof(header)) == sizeof(header))
    {
        sceIoLseek(fd, header[3], PSP_SEEK_SET);
    }
}


It will leave you at the PNG header. Change the index in header[3] for other data according to that document.
Back to top
View user's profile Send private message
yucopowo2009



Joined: 18 Sep 2009
Posts: 6

PostPosted: Fri Dec 04, 2009 3:53 pm    Post subject: Reply with quote

a_noob wrote:
Cheers. http://hitmen.c02.at/files/yapspd/psp_doc/chap26.html#sec26.3



thanks very much
Back to top
View user's profile Send private message
yucopowo2009



Joined: 18 Sep 2009
Posts: 6

PostPosted: Fri Dec 04, 2009 3:54 pm    Post subject: Reply with quote

Torch wrote:
Code:
u32 header[10];

SceUID fd = sceIoOpen(eboot, PS_O_RDONLY, 0);

if (fd >= 0)
{
    if (sceIoRead(fd, header, sizeof(header)) == sizeof(header))
    {
        sceIoLseek(fd, header[3], PSP_SEEK_SET);
    }
}


It will leave you at the PNG header. Change the index in header[3] for other data according to that document.


oh it's cool ,thanks very much
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