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 

New Function: sceGzipDecompress?

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



Joined: 29 May 2005
Posts: 15

PostPosted: Wed Jul 13, 2005 4:46 am    Post subject: New Function: sceGzipDecompress? Reply with quote

Ok so i was poking around in that new extracted 1.50 firmware file with a hex editor and i found something very interesting:

Code:
000F8AB4: 00000000736365477A69704465636F6D70726573732072657475726E7320307825780A00 = ...sceGzipDecompress returns 0x%x..


I dont know if the function sceGzipDecompress has ever been found before but it wasnt in that big function list so yea...

Thanks,

d0
Back to top
View user's profile Send private message
mrbrown



Joined: 17 Jan 2004
Posts: 1536

PostPosted: Wed Jul 13, 2005 4:55 am    Post subject: Reply with quote

http://pspdev.ofcode.com/api.php?type=2&id=101
Back to top
View user's profile Send private message
dzer0



Joined: 29 May 2005
Posts: 15

PostPosted: Wed Jul 13, 2005 5:02 am    Post subject: Reply with quote

ahh ok sorry bout that :) but i wonder what the kernel needs to decompress anyway?
Back to top
View user's profile Send private message
Shine



Joined: 03 Dec 2004
Posts: 728
Location: Germany

PostPosted: Wed Jul 13, 2005 5:17 am    Post subject: Reply with quote

dzer0 wrote:
ahh ok sorry bout that :) but i wonder what the kernel needs to decompress anyway?


PNG and maybe the update process have zlib compressed data. Would be interesting to use the zlib functions for homebrew, too.
Back to top
View user's profile Send private message
rasmus



Joined: 21 Jul 2004
Posts: 17
Location: Göteborg, Sweden

PostPosted: Wed Jul 13, 2005 8:41 pm    Post subject: Reply with quote

It is used in LoadExecAction right before rebooting. I _think_ it unpacks a fresh kernel image.

(LoadExecAction is the meat of the LoadExecBody worker thread started by sceKernelLoadExecThread, which does the work of the well known sceKernelLoadExec :)
Back to top
View user's profile Send private message
TyRaNiD



Joined: 18 Jan 2004
Posts: 918

PostPosted: Thu Jul 14, 2005 2:21 am    Post subject: Reply with quote

Well while you don't see it most prx files are gzip compressed inside, you can actually extract some of the compressed versions of some of the kernel modules by throwing them in sceKernelCheckPspConfig. There are other place it is used no doubt.

Strangely enough though the only modules which directly import the function are releated to the ME boot strap so it is really just there for fun :)
Back to top
View user's profile Send private message
skippy911



Joined: 06 May 2005
Posts: 46

PostPosted: Thu Jul 14, 2005 7:43 am    Post subject: Reply with quote

I have been working on the compression libs for the psp and will post something tonight of what i have gotten done :) DUnno how useful it is but at least a few more functions will have been defined with parameters.
Back to top
View user's profile Send private message
mrbrown



Joined: 17 Jan 2004
Posts: 1536

PostPosted: Thu Jul 14, 2005 8:34 am    Post subject: Reply with quote

skippy911 wrote:
I have been working on the compression libs for the psp and will post something tonight of what i have gotten done :) DUnno how useful it is but at least a few more functions will have been defined with parameters.


Just so folks are aware, zlib is in the psp Subversion repo.
Back to top
View user's profile Send private message
skippy911



Joined: 06 May 2005
Posts: 46

PostPosted: Thu Jul 14, 2005 1:03 pm    Post subject: Reply with quote

uchar out[100*100];
uchar in[100*100];
int output;

output = sceGzipDecompress(out, 10000, in, 0);

Basically it works just like regular opening of a gzip file so you have an array of data which is held in the out array. I dont have a working example but this should work just fine. I based the function params off of zlib example i found for vb. Enjoy :D

Oh yah the 10,000 is just the 100*100
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