New Function: sceGzipDecompress?

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
dzer0
Posts: 15
Joined: Sun May 29, 2005 1:06 am

New Function: sceGzipDecompress?

Post by dzer0 »

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: Select all

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
mrbrown
Site Admin
Posts: 1537
Joined: Sat Jan 17, 2004 11:24 am

Post by mrbrown »

dzer0
Posts: 15
Joined: Sun May 29, 2005 1:06 am

Post by dzer0 »

ahh ok sorry bout that :) but i wonder what the kernel needs to decompress anyway?
Shine
Posts: 728
Joined: Fri Dec 03, 2004 12:10 pm
Location: Germany

Post by Shine »

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.
rasmus
Posts: 17
Joined: Wed Jul 21, 2004 9:30 am
Location: Göteborg, Sweden

Post by rasmus »

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 :)
TyRaNiD
Posts: 907
Joined: Sun Jan 18, 2004 12:23 am

Post by TyRaNiD »

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 :)
skippy911
Posts: 46
Joined: Fri May 06, 2005 10:20 am

Post by skippy911 »

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.
mrbrown
Site Admin
Posts: 1537
Joined: Sat Jan 17, 2004 11:24 am

Post by mrbrown »

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.
skippy911
Posts: 46
Joined: Fri May 06, 2005 10:20 am

Post by skippy911 »

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
Post Reply