Skip to content

Commit

Permalink
Add simple PSP fuseID dumper
Browse files Browse the repository at this point in the history
zlib eboot.pbp
  • Loading branch information
bucanero committed Feb 16, 2024
1 parent fd51c9f commit b697ab6
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 146 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ file(GLOB res_files RELATIVE
data/*.png
data/*.jpg
data/*.s3m
data/*.bin
)
add_resources(apollo_res ${res_files})

Expand Down
Binary file added data/fuse_dumper_eboot.bin
Binary file not shown.
Binary file added data/sgkeydumper_plugin.bin
Binary file not shown.
141 changes: 0 additions & 141 deletions include/plugin.h

This file was deleted.

2 changes: 1 addition & 1 deletion source/saves.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

#define MAX_MOUNT_POINT_LENGTH 16

int sqlite_init();
int sqlite_init(void);

static char pfs_mount_point[MAX_MOUNT_POINT_LENGTH];
static const int known_pfs_ids[] = { 0x6E, 0x12E, 0x12F, 0x3ED };
Expand Down
37 changes: 35 additions & 2 deletions source/settings.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,22 @@
#include <psp2/vshbridge.h>
#include <psp2/kernel/openpsid.h>
#include <libxml/parser.h>
#include <zlib.h>

#include "types.h"
#include "menu.h"
#include "saves.h"
#include "common.h"
#include "plugin.h"

// PSP FuseID dumper EBOOT.PBP (zlib)
extern const uint8_t _binary_data_fuse_dumper_eboot_bin_start;
extern const uint8_t _binary_data_fuse_dumper_eboot_bin_size;
// PSP SGKeyDumper.prx plugin
extern const uint8_t _binary_data_sgkeydumper_plugin_bin_start;
extern const uint8_t _binary_data_sgkeydumper_plugin_bin_size;

#define FUSEID_EBOOT_PBP_SIZE 130068
#define FUSEID_EBOOT_PBP_PATH "ux0:pspemu/PSP/GAME/FUSEID/EBOOT.PBP"
#define GAME_PLUGIN_PATH "ux0:pspemu/seplugins/game.txt"
#define SGKEY_DUMP_PLUGIN_PATH "ux0:pspemu/seplugins/SGKeyDumper.prx"
#define SGKEY_DUMP_PLUGIN_TEXT "ms0:/seplugins/SGKeyDumper.prx"
Expand Down Expand Up @@ -387,7 +396,7 @@ int install_sgkey_plugin(int install)
size_t size;

mkdirs(SGKEY_DUMP_PLUGIN_PATH);
if (write_buffer(SGKEY_DUMP_PLUGIN_PATH, sgk_plugin, size_sgk_plugin) < 0)
if (write_buffer(SGKEY_DUMP_PLUGIN_PATH, &_binary_data_sgkeydumper_plugin_bin_start, (int) &_binary_data_sgkeydumper_plugin_bin_size) < 0)
return 0;

if (read_buffer(GAME_PLUGIN_PATH, (uint8_t**) &data, &size) < 0)
Expand Down Expand Up @@ -446,3 +455,27 @@ int install_sgkey_plugin(int install)

return 0;
}

int install_fuseid_dumper(void)
{
uint8_t* fuseid_dumper;
uLong eboot_len = FUSEID_EBOOT_PBP_SIZE;

if (mkdirs(FUSEID_EBOOT_PBP_PATH) != SUCCESS)
return 0;

fuseid_dumper = (uint8_t*)malloc(eboot_len);
if (!fuseid_dumper)
return 0;

uncompress(fuseid_dumper, &eboot_len, &_binary_data_fuse_dumper_eboot_bin_start, (int) &_binary_data_fuse_dumper_eboot_bin_size);
if (write_buffer(FUSEID_EBOOT_PBP_PATH, fuseid_dumper, eboot_len) < 0)
{
LOG("Error! Can't create EBOOT.PBP");
free(fuseid_dumper);
return 0;
}

free(fuseid_dumper);
return 1;
}
4 changes: 2 additions & 2 deletions source/sqlite3.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ static int vita_xDelete(sqlite3_vfs *vfs, const char *name, int syncDir)
return SQLITE_OK;
}

int sqlite_init()
int sqlite_init(void)
{
int rc;

Expand Down Expand Up @@ -167,7 +167,7 @@ int sqlite_init()
return SQLITE_OK;
}

int sqlite_exit()
int sqlite_exit(void)
{
int rc = SQLITE_OK;
free(rw_methods);
Expand Down

0 comments on commit b697ab6

Please sign in to comment.