| View previous topic :: View next topic |
| Author |
Message |
jojojoris
Joined: 30 Mar 2008 Posts: 261
|
Posted: Tue Mar 03, 2009 12:31 am Post subject: resources pack |
|
|
Hi everyone,
I want to make a game but i don't want all the resource files (sprites/sounds/etc) directly accessible from the MS. Is it posible to put all the files together in a single password protected zip package? (Of course this is possible) But my real question is: How can i read/load the files from the package?
Can someone make a small example which draws a picture stored in a zip file on the screen?
If you know another compression format with password protection or is isier to use, tell me. _________________
| Code: | int main(){
SetupCallbacks();
makeNiceGame();
sceKernelExitGame();
} |
|
|
| Back to top |
|
 |
coolkehon
Joined: 20 Oct 2008 Posts: 355
|
Posted: Tue Mar 03, 2009 1:22 am Post subject: |
|
|
i can help you there i made(unreleased but will be) a port of minzip for the psp that lets you read zip files or write or add files too them and they can be password protected
edit: site moved
my forums are here for my ports and libraries
http://kehon.izfree.com/phpBB3/viewforum.php?f=7&sid=86dc7cf1694f5362387e20d678368958 i posted it there so i could keep track of it[/url]
edit:
i believe i put a sample in the zip and also to get the .h files with images i used bin2c i use oslib so it should be easy i think the sample uploads it let me know if it doesnt
Last edited by coolkehon on Thu Mar 05, 2009 3:09 am; edited 1 time in total |
|
| Back to top |
|
 |
Torch

Joined: 28 May 2008 Posts: 842
|
Posted: Tue Mar 03, 2009 3:18 am Post subject: |
|
|
Someone could easily find out the zip password and thats the end of your protection. Plus you'll have the additional overhead of decompressing stuff. You'll need to have some kind of per-user downloader or whatever to encrypt them differently for each PSP without the plaintext files ever being available at any point. That can be cracked to, but no one would go that far for homebrew. You'd best leave it in plain sight so people can do what they want with it. Just keep going with your official releases and let people do whatever crap they want. Thats the whole ideology of homebrew.
Another thing you can do is simply encrypt the files themselves with RSA or any other public key system. Thats uncrackable, without having to modify your executable the key in your executable. They will be able to decrypt your resources if they get the key, but they cant load custom resources into your application. |
|
| Back to top |
|
 |
jojojoris
Joined: 30 Mar 2008 Posts: 261
|
Posted: Tue Mar 03, 2009 3:30 am Post subject: |
|
|
| Torch wrote: | Someone could easily find out the zip password and thats the end of your protection. Plus you'll have the additional overhead of decompressing stuff. You'll need to have some kind of per-user downloader or whatever to encrypt them differently for each PSP without the plaintext files ever being available at any point. That can be cracked to, but no one would go that far for homebrew. You'd best leave it in plain sight so people can do what they want with it. Just keep going with your official releases and let people do whatever crap they want. Thats the whole ideology of homebrew.
Another thing you can do is simply encrypt the files themselves with RSA or any other public key system. Thats uncrackable, without having to modify your executable the key in your executable. They will be able to decrypt your resources if they get the key, but they cant load custom resources into your application. |
Yes but i want to know it it is possible to use a zip package to load resources. maybe using zziplib or some standard SDK lib. _________________
| Code: | int main(){
SetupCallbacks();
makeNiceGame();
sceKernelExitGame();
} |
|
|
| Back to top |
|
 |
Torch

Joined: 28 May 2008 Posts: 842
|
Posted: Tue Mar 03, 2009 3:34 am Post subject: |
|
|
| I don't have experience with zip archives, but you can gzip each one individually and you can directly fopen them and read from them without any additional code using libz. They will be decompressed automatically as you read. Also they will be compressed automatically if you write. |
|
| Back to top |
|
 |
coolkehon
Joined: 20 Oct 2008 Posts: 355
|
Posted: Tue Mar 03, 2009 3:41 am Post subject: |
|
|
| has anyone check that library i ported it works pretty good its a little confusing was to me at first but not hard at all its very easy just look at the main website oh and my website will be migrated soon somewhere else because the current one keeps going down or having msql issues just refresh it for a while and it comes up |
|
| Back to top |
|
 |
jojojoris
Joined: 30 Mar 2008 Posts: 261
|
Posted: Tue Mar 03, 2009 7:23 am Post subject: |
|
|
Is it possible to load a file direct into the memory without writing it first to the memorystick?
@coolkehon I don't see why your library should be better. http://zziplib.sourceforge.net/ it looks like this one can do the same trick. _________________
| Code: | int main(){
SetupCallbacks();
makeNiceGame();
sceKernelExitGame();
} |
|
|
| Back to top |
|
 |
J.F.
Joined: 22 Feb 2004 Posts: 2906
|
Posted: Tue Mar 03, 2009 4:21 pm Post subject: |
|
|
| There are threads on putting files into the EBOOT. Search for them. Combine that with the compression/encryption and you have what you're looking for. |
|
| Back to top |
|
 |
Torch

Joined: 28 May 2008 Posts: 842
|
Posted: Tue Mar 03, 2009 6:27 pm Post subject: |
|
|
| Why would you need to write it. If you have a compressed file just store it in memory as you decompress. |
|
| Back to top |
|
 |
coolkehon
Joined: 20 Oct 2008 Posts: 355
|
Posted: Wed Mar 04, 2009 12:36 am Post subject: |
|
|
| simply because the zziplib cannot write files to zip at least not the psp version |
|
| Back to top |
|
 |
Torch

Joined: 28 May 2008 Posts: 842
|
Posted: Wed Mar 04, 2009 1:29 am Post subject: |
|
|
| coolkehon wrote: | | simply because the zziplib cannot write files to zip at least not the psp version |
You asked whether you could (decompress i assume) straight into memory without writing the decompressed file to memory stick. I don't see why thats not possible. |
|
| Back to top |
|
 |
jojojoris
Joined: 30 Mar 2008 Posts: 261
|
Posted: Wed Mar 04, 2009 5:23 am Post subject: |
|
|
Yes i want to decompress a file direct to the memory.
But i don't know how to do it. Can someone make an example which loads a picture from a zip file and display it on the screen? _________________
| Code: | int main(){
SetupCallbacks();
makeNiceGame();
sceKernelExitGame();
} |
|
|
| Back to top |
|
 |
Torch

Joined: 28 May 2008 Posts: 842
|
Posted: Wed Mar 04, 2009 5:27 am Post subject: |
|
|
zzlib also provides an fopen command and can directly read from a zip.
Simply open zipfile/file.dat and read from it normally. |
|
| Back to top |
|
 |
Dariusc123456
Joined: 12 Aug 2008 Posts: 394
|
Posted: Wed Mar 04, 2009 9:49 am Post subject: |
|
|
| Search around for a program called PBPCat. |
|
| Back to top |
|
 |
|