compress/encrypt prx

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

Moderators: cheriff, TyRaNiD

Post Reply
User avatar
hotter
Posts: 53
Joined: Sun Dec 07, 2008 8:49 pm

compress/encrypt prx

Post by hotter »

I have elf file and I need to compress it to prx. how to do that?
Last edited by hotter on Tue Jun 09, 2009 3:34 pm, edited 1 time in total.
Pragramming with:
Microsoft Visual C 2008 + pspsdk MINPSPW 0.8.10
jojojoris
Posts: 255
Joined: Sun Mar 30, 2008 4:06 am

Re: compress prx

Post by jojojoris »

hotter wrote:I have elf file and I need to compress it to prx. how to do that?
add

BUILD_PRX=1

to your makefile

Code: Select all

int main(){
     SetupCallbacks();
     makeNiceGame();
     sceKernelExitGame();
}
User avatar
Torch
Posts: 825
Joined: Wed May 28, 2008 2:50 am

Post by Torch »

To "compress" ie make it smaller you use psppacker.
User avatar
hotter
Posts: 53
Joined: Sun Dec 07, 2008 8:49 pm

Post by hotter »

Sry for not very clear question... I mean I want to compress and encode prx like some others do. Now when I open my prx in hex editor I see ".Elf" at the bigining and all strings are editable... so I want to make it to "~PSP". I think its the same as firmwares prx'es are compresed and encripted. maybe now I make a point? can I do that with PSPPacker?
Pragramming with:
Microsoft Visual C 2008 + pspsdk MINPSPW 0.8.10
User avatar
Torch
Posts: 825
Joined: Wed May 28, 2008 2:50 am

Post by Torch »

Yes. They are not encrypted, only gzipped.
m0skit0
Posts: 191
Joined: Tue Jun 02, 2009 8:58 pm

Post by m0skit0 »

You can't make ~PSP because they use Sony's signature for the encryption.
The Incredible Bill Gates wrote:The obvious mathematical breakthrough would be development of an easy way to factor large prime numbers.
User avatar
Torch
Posts: 825
Joined: Wed May 28, 2008 2:50 am

Post by Torch »

m0skit0 wrote:You can't make ~PSP because they use Sony's signature for the encryption.
psppacker will give ~PSP files. You can check offset 0x150 to see if it was psppacker compressed only or Sony encrypted+compressed.
User avatar
hotter
Posts: 53
Joined: Sun Dec 07, 2008 8:49 pm

Post by hotter »

Well I tryed to use it. It hidded all string variables but I searched for "~PSP" and didnt find it, so I guess it is only gzipping prx. And a sad thing that when I added to psp it didnt work, I get error that prx is unsupported type.
Pragramming with:
Microsoft Visual C 2008 + pspsdk MINPSPW 0.8.10
User avatar
Torch
Posts: 825
Joined: Wed May 28, 2008 2:50 am

Post by Torch »

First of all it SHOULD be a .prx file NOT .elf. You must build with BUILD_PRX = 1

On Windows, just drag your .prx on top of psp-packer.exe. The file will be compressed. It will have ~PSP as first 4 bytes.

Also, compressed kernel PRX only works on 3.71M33-3 and above.
Compressed user PRX only works on 4.01M33 and above.
User avatar
hotter
Posts: 53
Joined: Sun Dec 07, 2008 8:49 pm

Post by hotter »

Torch wrote:First of all it SHOULD be a .prx file NOT .elf. You must build with BUILD_PRX = 1
Yes, I did that with prx.
Torch wrote:On Windows, just drag your .prx on top of psp-packer.exe. The file will be compressed. It will have ~PSP as first 4 bytes
The file now is smaller, but the first 4 bytes is still ".elf".
Torch wrote:Also, compressed kernel PRX only works on 3.71M33-3 and above.
Compressed user PRX only works on 4.01M33 and above.
I am using PSP slim 5.00M33-6 and PSPPacker v0.2.
Pragramming with:
Microsoft Visual C 2008 + pspsdk MINPSPW 0.8.10
m0skit0
Posts: 191
Joined: Tue Jun 02, 2009 8:58 pm

Post by m0skit0 »

Of course, PRX is an ELF subtype :P
The Incredible Bill Gates wrote:The obvious mathematical breakthrough would be development of an easy way to factor large prime numbers.
User avatar
Torch
Posts: 825
Joined: Wed May 28, 2008 2:50 am

Post by Torch »

I dunno. When I compress my kernel PRX it becomes ~PSP. Haven't tried with user PRX. Maybe you have an old version? I'm using the psp-packer from 4.01M33-2 SDK.
User avatar
hotter
Posts: 53
Joined: Sun Dec 07, 2008 8:49 pm

Post by hotter »

With psp-packer from 4.01M33-2 SDK I get ~PSP file and file works fine! :)
Thx for help.
Pragramming with:
Microsoft Visual C 2008 + pspsdk MINPSPW 0.8.10
Post Reply