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 

resources pack

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



Joined: 30 Mar 2008
Posts: 261

PostPosted: Tue Mar 03, 2009 12:31 am    Post subject: resources pack Reply with quote

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
View user's profile Send private message
coolkehon



Joined: 20 Oct 2008
Posts: 355

PostPosted: Tue Mar 03, 2009 1:22 am    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
Torch



Joined: 28 May 2008
Posts: 842

PostPosted: Tue Mar 03, 2009 3:18 am    Post subject: Reply with quote

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
View user's profile Send private message
jojojoris



Joined: 30 Mar 2008
Posts: 261

PostPosted: Tue Mar 03, 2009 3:30 am    Post subject: Reply with quote

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
View user's profile Send private message
Torch



Joined: 28 May 2008
Posts: 842

PostPosted: Tue Mar 03, 2009 3:34 am    Post subject: Reply with quote

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
View user's profile Send private message
coolkehon



Joined: 20 Oct 2008
Posts: 355

PostPosted: Tue Mar 03, 2009 3:41 am    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
jojojoris



Joined: 30 Mar 2008
Posts: 261

PostPosted: Tue Mar 03, 2009 7:23 am    Post subject: Reply with quote

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
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Tue Mar 03, 2009 4:21 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
Torch



Joined: 28 May 2008
Posts: 842

PostPosted: Tue Mar 03, 2009 6:27 pm    Post subject: Reply with quote

Why would you need to write it. If you have a compressed file just store it in memory as you decompress.
Back to top
View user's profile Send private message
coolkehon



Joined: 20 Oct 2008
Posts: 355

PostPosted: Wed Mar 04, 2009 12:36 am    Post subject: Reply with quote

simply because the zziplib cannot write files to zip at least not the psp version
Back to top
View user's profile Send private message MSN Messenger
Torch



Joined: 28 May 2008
Posts: 842

PostPosted: Wed Mar 04, 2009 1:29 am    Post subject: Reply with quote

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
View user's profile Send private message
jojojoris



Joined: 30 Mar 2008
Posts: 261

PostPosted: Wed Mar 04, 2009 5:23 am    Post subject: Reply with quote

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
View user's profile Send private message
Torch



Joined: 28 May 2008
Posts: 842

PostPosted: Wed Mar 04, 2009 5:27 am    Post subject: Reply with quote

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
View user's profile Send private message
Dariusc123456



Joined: 12 Aug 2008
Posts: 394

PostPosted: Wed Mar 04, 2009 9:49 am    Post subject: Reply with quote

Search around for a program called PBPCat.
Back to top
View user's profile Send private message AIM Address
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