| View previous topic :: View next topic |
| Author |
Message |
dzer0
Joined: 29 May 2005 Posts: 15
|
Posted: Wed Jul 13, 2005 4:46 am Post subject: New Function: sceGzipDecompress? |
|
|
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 |
|
 |
mrbrown
Joined: 17 Jan 2004 Posts: 1536
|
|
| Back to top |
|
 |
dzer0
Joined: 29 May 2005 Posts: 15
|
Posted: Wed Jul 13, 2005 5:02 am Post subject: |
|
|
| ahh ok sorry bout that :) but i wonder what the kernel needs to decompress anyway? |
|
| Back to top |
|
 |
Shine
Joined: 03 Dec 2004 Posts: 728 Location: Germany
|
Posted: Wed Jul 13, 2005 5:17 am Post subject: |
|
|
| 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 |
|
 |
rasmus
Joined: 21 Jul 2004 Posts: 17 Location: Göteborg, Sweden
|
Posted: Wed Jul 13, 2005 8:41 pm Post subject: |
|
|
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 |
|
 |
TyRaNiD
Joined: 18 Jan 2004 Posts: 918
|
Posted: Thu Jul 14, 2005 2:21 am Post subject: |
|
|
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 |
|
 |
skippy911
Joined: 06 May 2005 Posts: 46
|
Posted: Thu Jul 14, 2005 7:43 am Post subject: |
|
|
| 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 |
|
 |
mrbrown
Joined: 17 Jan 2004 Posts: 1536
|
Posted: Thu Jul 14, 2005 8:34 am Post subject: |
|
|
| 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 |
|
 |
skippy911
Joined: 06 May 2005 Posts: 46
|
Posted: Thu Jul 14, 2005 1:03 pm Post subject: |
|
|
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 |
|
 |
|