Skip to: Site menu | Main content


Welcome to PSP-Programming.com, a place for developers to get together.

Welcome to the forums. Here you can find other user tutorials as well as homebrew releases and the source code repository. You can also ask for help with your code here and post your own homebrew!

PSP-Programming.com Forums
February 10, 2012, 01:51:26 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

News: Check out the Code Section!
Home Help Search Shop Login Register
Digg This!
Pages: [1]
Print
Author Topic: [Release][C99] PBPCat - Flatmush  (Read 7571 times)
Flatmush
Has a normal user title
Administrator
Hero Member
*

Karma: +84/-26
Offline Offline

Posts: 1046
12906.27 points

View Inventory
Send Money to Flatmush

The Omniscient One


View Profile WWW
« on: August 06, 2007, 04:07:26 PM »

Here is my update to pbpcat, it includes more instructions with the download as well as a much improved pbpcat and improved functions for dealing with pbpPlus files. Among the improvements are that pbpcat can now add files in seperate passes, extract files, do a listing of all files contained within the pbp and some other things.

Download the new version here.

---Old Post Below---

I come bearing a release of a tool which I hope some of you will find useful. PBPCat adds extra files into an EBOOT.PBP, and basically works as an alternative to bin2o in the way that it lets you store files within the eboot and allows you to read them back from within the program.

There is a small sample included, and the packer was compiled with mingw and only comes with a windows makefile. You should use the header files included with the sample to extract files.

This is a really simple program using the PBP file description found in YAPSPDoc.

An EBOOT.PBP can have a maximum size approaching 24mb, I assume that this is because at some point in the loading process the whole pbp is loaded into memory, however as you will see in the sample the additional data is not loaded into memory until you load it.

Hopefully this will improve the way homebrew is packaged, meaning fewer files are cluttered around and making it very slightly harder for people to steal sprites, etc.

Well enough waffle, here is the program.
« Last Edit: August 07, 2007, 02:27:27 PM by flatmush » Logged

Firmware History: 2.60 -> 2.71 -> 1.50 -> 3.03oe-c

I am nerdier than 66% of all people. Are you nerdier? Click here to find out!I am 62% loser. What about you? Click here to find out!NerdTests.com User Test: The Can I Run A Business Test.

Hehe I'm a "Hero Member" because I bought posts back when they were in the shop.

Creator of FlatEditPSP, funcLib and flAstro


gibbocool
Embellished by our ignorance
News Posters
Hero Member
*

Karma: +34/-11
Offline Offline

Posts: 822
2973.87 points

View Inventory
Send Money to gibbocool

Power Overwhelming


View Profile WWW
« Reply #1 on: August 06, 2007, 09:30:29 PM »

Nice. Alternative download here:


Download
Logged

A_Nub
gibbocool rules!
C/C++ Developer
Hero Member
*

Karma: +104/-28
Offline Offline

Posts: 912
3894.18 points

View Inventory
Send Money to A_Nub

Noob am I


View Profile WWW
« Reply #2 on: August 07, 2007, 07:09:36 AM »

Alternative link (Improved)
HERE IT IZ!!!
(includes a *nix makefile) (RTFM!!)
« Last Edit: August 09, 2007, 07:12:18 AM by Ryalla » Logged

Code:
      ____________________
 /---/   ---------------   \---\
/   O   |               |   ?   \
| O   O |               | ||  O |
|   O   |_______________|   X   |
\--- (#) () oo PSP oo ()()   ---/
    \-----------------------/
[/CENTER]
InsertWittyName: That's like saying because you wank with your right hank all the time, and one day you wank with your left, that you invented left handed wanking..
mowglisanu

C/C++ Developer
Hero Member
*

Karma: +36/-11
Offline Offline

Posts: 787
0.00 points

View Inventory
Send Money to mowglisanu


View Profile
« Reply #3 on: August 07, 2007, 09:08:33 AM »

Quote from: A_Nub
Alternative link (Improved)
lol
that link doesn't work
(by the way I know that the (Improved) isn't meant for the actual link)
Logged

Check out my:
 Audio lib
 Pmf Viewer
BadBoy_
PSP Dev
C/C++ Developer
Sr. Member
*

Karma: +14/-23
Offline Offline

Posts: 290
5774.81 points

View Inventory
Send Money to BadBoy_


View Profile WWW
« Reply #4 on: August 07, 2007, 09:54:25 AM »

cut out the http://" and " at the end and it works
Logged

Flatmush
Has a normal user title
Administrator
Hero Member
*

Karma: +84/-26
Offline Offline

Posts: 1046
12906.27 points

View Inventory
Send Money to Flatmush

The Omniscient One


View Profile WWW
« Reply #5 on: August 07, 2007, 02:27:41 PM »

Updated.
Logged

Firmware History: 2.60 -> 2.71 -> 1.50 -> 3.03oe-c

I am nerdier than 66% of all people. Are you nerdier? Click here to find out!I am 62% loser. What about you? Click here to find out!NerdTests.com User Test: The Can I Run A Business Test.

Hehe I'm a "Hero Member" because I bought posts back when they were in the shop.

Creator of FlatEditPSP, funcLib and flAstro
pspjoke
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 10
721.54 points

View Inventory
Send Money to pspjoke

View Profile
« Reply #6 on: November 05, 2008, 08:52:12 AM »

hey does this not work with binary files?
im doing a test with an mp3 and it doesn't load the file correctly.

Code:
#include "pbpPlus/pbpPlus.h"
#include <pspkernel.h>
#include <pspctrl.h>
#include <pspdebug.h>
#include <pspaudio.h>
#include <pspaudiolib.h>
#include <psppower.h>
#include "mp3player.h"
#include <stdio.h>
#include <string.h>



PSP_MODULE_INFO("Mp3 Player Example", 0, 1, 1);
#define printf pspDebugScreenPrintf

// TWILIGHT ZONE! <do doo do doo>
/* Exit callback */
int exit_callback(int arg1, int arg2, void *common) {
          sceKernelExitGame();
          return 0;
}

/* Callback thread */
int CallbackThread(SceSize args, void *argp) {
          int cbid;

          cbid = sceKernelCreateCallback("Exit Callback", exit_callback, NULL);
          sceKernelRegisterExitCallback(cbid);

          sceKernelSleepThreadCB();

          return 0;
}

/* Sets up the callback thread and returns its thread id */
int SetupCallbacks(void) {
          int thid = 0;

          thid = sceKernelCreateThread("update_thread", CallbackThread, 0x11, 0xFA0, 0, 0);
          if(thid >= 0) {
                    sceKernelStartThread(thid, 0, 0);
          }

          return thid;
}
// END OF TWILIGHT ZONE! <do doo do do>
void* pbpFileContext = NULL;
int main()
{
pspDebugScreenInit();
pbpFileContext = pbpPlusOpen("./EBOOT.PBP");
     char* tempString = pbpPlusFileRead(pbpFileContext, "1.mp3");
char buffer[5*1024];
FILE* outfile = fopen("1.mp3", "w");
if(tempString) {
          pspDebugScreenSetXY(0, 2);
          pspDebugScreenPrintf(tempString);
     } else {
          pspDebugScreenPrintf("Error loading files from PBP.");
     }
strcpy(buffer,tempString);
fprintf(outfile,buffer);
printf("printing file.");
fclose(outfile);
printf("closing file");


          scePowerSetClockFrequency(333, 333, 166);


          SetupCallbacks();

          pspAudioInit();
          SceCtrlData pad;
          int i;
          MP3_Init(1);
          MP3_Load("1.mp3");
          MP3_Play();
          while(1) {
                    sceCtrlReadBufferPositive(&pad, 1);
                    if(pad.Buttons & PSP_CTRL_CROSS) {
                              break;
                    }
                     else
                     
                     if(pad.Buttons & PSP_CTRL_CIRCLE) {
                              MP3_Pause();
                              for(i=0; i<10; i++) {
                                        sceDisplayWaitVblankStart();
                              }
                    }

                    if (MP3_EndOfStream() == 1) {
                              MP3_Stop();
                    }
          }
          MP3_Stop();
          MP3_FreeTune();

          sceKernelSleepThread();

          return 0;}
         
Logged
A_Nub
gibbocool rules!
C/C++ Developer
Hero Member
*

Karma: +104/-28
Offline Offline

Posts: 912
3894.18 points

View Inventory
Send Money to A_Nub

Noob am I


View Profile WWW
« Reply #7 on: November 05, 2008, 06:30:18 PM »

It works with everything Wink just make sure you do it right
Logged

Code:
      ____________________
 /---/   ---------------   \---\
/   O   |               |   ?   \
| O   O |               | ||  O |
|   O   |_______________|   X   |
\--- (#) () oo PSP oo ()()   ---/
    \-----------------------/
[/CENTER]
InsertWittyName: That's like saying because you wank with your right hank all the time, and one day you wank with your left, that you invented left handed wanking..
pspjoke
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 10
721.54 points

View Inventory
Send Money to pspjoke

View Profile
« Reply #8 on: November 05, 2008, 06:37:19 PM »

k, ill play around with it.
Logged
Pages: [1]
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.307 seconds with 32 queries.
Sister Sites: Guitar Hero 4   BrokeniTouch.com