Skip to content

Commit

Permalink
added 6.00 and 6.10 pops support
Browse files Browse the repository at this point in the history
  • Loading branch information
hrimfaxi committed Jun 25, 2011
1 parent 08ead9e commit f67ba5f
Show file tree
Hide file tree
Showing 6 changed files with 147 additions and 34 deletions.
6 changes: 6 additions & 0 deletions popsloader/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ all:
@cp -f core/popscore.prx dist
@cp -rf modules dist
make $(EXTRA_OPTIONS) clean -C popcorn
make $(EXTRA_OPTIONS) CONFIG_600=1 -C popcorn
@cp -f popcorn/popcorn.prx dist/modules/600/
make $(EXTRA_OPTIONS) clean -C popcorn
make $(EXTRA_OPTIONS) CONFIG_610=1 -C popcorn
@cp -f popcorn/popcorn.prx dist/modules/610/
make $(EXTRA_OPTIONS) clean -C popcorn
make $(EXTRA_OPTIONS) CONFIG_620=1 -C popcorn
@cp -f popcorn/popcorn.prx dist/modules/620/
make $(EXTRA_OPTIONS) clean -C popcorn
Expand Down
6 changes: 5 additions & 1 deletion popsloader/core/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ static inline const char *get_module_prefix(void)
sprintf(buf, "%s%s%s/", is_ef0() ? "ef" : "ms", MODULE_PATH, "635");
} else if(pops_fw_version == FW_620) {
sprintf(buf, "%s%s%s/", is_ef0() ? "ef" : "ms", MODULE_PATH, "620");
} else if(pops_fw_version == FW_610) {
sprintf(buf, "%s%s%s/", is_ef0() ? "ef" : "ms", MODULE_PATH, "610");
} else if(pops_fw_version == FW_600) {
sprintf(buf, "%s%s%s/", is_ef0() ? "ef" : "ms", MODULE_PATH, "600");
} else if(pops_fw_version == FW_500) {
sprintf(buf, "%s%s%s/", is_ef0() ? "ef" : "ms", MODULE_PATH, "500");
} else {
Expand All @@ -127,7 +131,7 @@ static SceUID _sceKernelLoadModule(const char *path, int flags, SceKernelLMOptio
if(pops_fw_version == FW_635 || pops_fw_version == FW_639) {
sprintf(newpath, "%spops_%02dg.prx", get_module_prefix(), (int)(psp_model + 1));
path = newpath;
} else if(pops_fw_version == FW_620) {
} else if(pops_fw_version == FW_620 || pops_fw_version == FW_610 || pops_fw_version == FW_600) {
if(psp_model == PSP_GO || psp_model == PSP_4000) {
sprintf(newpath, "%spops_%02dg.prx", get_module_prefix(), (int)(psp_model + 1));
} else {
Expand Down
41 changes: 10 additions & 31 deletions popsloader/core/resolve_nid.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,40 +35,19 @@ u32 nid_fix_size = 0;

void setup_nid_resolver(void)
{
if(pops_fw_version == FW_639 && psp_fw_version == FW_620) {
nid_fix_size = nid_fix_635_to_620_size;
nid_fix = nid_fix_635_to_620;
}

if(pops_fw_version == FW_635 && psp_fw_version == FW_620) {
nid_fix_size = nid_fix_635_to_620_size;
nid_fix = nid_fix_635_to_620;
}

#if 0
if(pops_fw_version == FW_635 && psp_fw_version == FW_639) {
nid_fix_size = nid_fix_635_to_639_size;
nid_fix = nid_fix_635_to_639;
}
#endif

if(pops_fw_version == FW_620 && psp_fw_version == FW_639) {
nid_fix_size = nid_fix_620_to_635_size;
nid_fix = nid_fix_620_to_635;
}

if(pops_fw_version == FW_620 && psp_fw_version == FW_635) {
nid_fix_size = nid_fix_620_to_635_size;
nid_fix = nid_fix_620_to_635;
if(psp_fw_version == FW_620) {
if(pops_fw_version == FW_635 || pops_fw_version == FW_639) {
nid_fix_size = nid_fix_635_to_620_size;
nid_fix = nid_fix_635_to_620;
}
}

// try built in NID resolver first
#if 0
if(pops_fw_version == FW_500 && psp_fw_version == FW_639) {
nid_fix_size = nid_fix_500_to_635_size;
nid_fix = nid_fix_500_to_635;
if(psp_fw_version == FW_635 || psp_fw_version == FW_639) {
if(pops_fw_version == FW_600 || pops_fw_version == FW_610 || pops_fw_version == FW_620) {
nid_fix_size = nid_fix_620_to_635_size;
nid_fix = nid_fix_620_to_635;
}
}
#endif
}

resolver_config* get_nid_resolver(const char *libname)
Expand Down
2 changes: 2 additions & 0 deletions popsloader/loader/ui.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ int menu_ctrl(struct Menu *menu)
}

struct MenuItem main_menu_items[] = {
{ "6.00 pops", FW_600, },
{ "6.10 pops", FW_610, },
{ "6.20 pops", FW_620, },
{ "6.35 pops", FW_635, },
{ "6.39 pops", FW_639, },
Expand Down
10 changes: 10 additions & 0 deletions popsloader/popcorn/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@ CFLAGS += -DCONFIG_620=1
PSP_FW_VERSION = 620
endif

ifeq ($(CONFIG_610), 1)
CFLAGS += -DCONFIG_610=1
PSP_FW_VERSION = 610
endif

ifeq ($(CONFIG_600), 1)
CFLAGS += -DCONFIG_600=1
PSP_FW_VERSION = 600
endif

ifeq ($(CONFIG_635), 1)
CFLAGS += -DCONFIG_635=1
PSP_FW_VERSION = 635
Expand Down
116 changes: 114 additions & 2 deletions popsloader/popcorn/popcorn_patch_offset.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
#include <pspsdk.h>
#include "popcorn_patch_offset.h"

#if !defined(CONFIG_635) && !defined(CONFIG_620) && !defined(CONFIG_639) && !defined(CONFIG_500)
#error You have to define CONFIG_620 or CONFIG_635 or CONFIG_639 or CONFIG_500
#if !defined(CONFIG_635) && !defined(CONFIG_620) && !defined(CONFIG_639) && !defined(CONFIG_610) && !defined(CONFIG_600) && !defined(CONFIG_500)
#error You have to define one of CONFIG_FW_VERSION
#endif

#ifdef CONFIG_639
Expand Down Expand Up @@ -172,6 +172,106 @@ PatchOffset g_620_offsets = {
};
#endif

#ifdef CONFIG_610
PatchOffset g_610_offsets = {
.fw_version = FW_610,
.popsman_patch = {
.get_rif_path = 0x00000190,
.get_rif_path_call1 = 0x0000239C,
.get_rif_path_call2 = 0x0000291C,
.sceNpDrmGetVersionKeyCall = 0x000025C8,
.scePspNpDrm_driver_9A34AC9F_Call = 0x00002A88,
.scePopsManLoadModuleCheck = 0x00001A48,
},
.pops_patch = {
.decomp = {
{ 0x000CC83C, 0x0000D6B8 }, // 01G
{ 0x000CC83C, 0x0000D6B8 }, // 02G
{ 0x000CC83C, 0x0000D6B8 }, // 03G
{ 0x000CC88C, 0x0000D6FC }, // 04G
{ 0x000CE4E8, 0x0000DE08 }, // 05G
{ 0xDEADBEEF, 0xDEADBEEF }, // unused
{ 0xDEADBEEF, 0xDEADBEEF }, // unused
{ 0xDEADBEEF, 0xDEADBEEF }, // unused
{ 0xDEADBEEF, 0xDEADBEEF }, // unused
},
.ICON0SizeOffset = {
0x0002E454, // 01G
0x0002E454, // 02G
0x0002E454, // 03G
0x0002E49C, // 04G
0x0002FF50, // 05G
0xDEADBEEF, // unused
0xDEADBEEF, // unused
0xDEADBEEF, // unused
0xDEADBEEF, // unused
},
.manualNameCheck = {
0x0001C418, // 01G
0x0001C418, // 02G
0x0001C418, // 03G
0x0001C460, // 04G
0x0001CCC4, // 05G
0xDEADBEEF, // unused
0xDEADBEEF, // unused
0xDEADBEEF, // unused
0xDEADBEEF, // unused
},
.sceMeAudio_67CD7972_NID = 0xF43E573A,
},
};
#endif

#ifdef CONFIG_600
PatchOffset g_600_offsets = {
.fw_version = FW_600,
.popsman_patch = {
.get_rif_path = 0x00000190,
.get_rif_path_call1 = 0x0000239C,
.get_rif_path_call2 = 0x0000291C,
.sceNpDrmGetVersionKeyCall = 0x000025C8,
.scePspNpDrm_driver_9A34AC9F_Call = 0x00002A88,
.scePopsManLoadModuleCheck = 0x00001A48,
},
.pops_patch = {
.decomp = {
{ 0x000CC82C, 0x0000D6B8 }, // 01G
{ 0x000CC82C, 0x0000D6B8 }, // 02G
{ 0x000CC82C, 0x0000D6B8 }, // 03G
{ 0x000CC87C, 0x0000D6FC }, // 04G
{ 0x000CE4E8, 0x0000DE08 }, // 05G
{ 0xDEADBEEF, 0xDEADBEEF }, // unused
{ 0xDEADBEEF, 0xDEADBEEF }, // unused
{ 0xDEADBEEF, 0xDEADBEEF }, // unused
{ 0xDEADBEEF, 0xDEADBEEF }, // unused
},
.ICON0SizeOffset = {
0x0002E440, // 01G
0x0002E440, // 02G
0x0002E440, // 03G
0x0002E488, // 04G
0x0002FF50, // 05G
0xDEADBEEF, // unused
0xDEADBEEF, // unused
0xDEADBEEF, // unused
0xDEADBEEF, // unused
},
.manualNameCheck = {
0x0001C404, // 01G
0x0001C404, // 02G
0x0001C404, // 03G
0x0001C44C, // 04G
0x0001CCC4, // 05G
0xDEADBEEF, // unused
0xDEADBEEF, // unused
0xDEADBEEF, // unused
0xDEADBEEF, // unused
},
.sceMeAudio_67CD7972_NID = 0xF43E573A,
},
};
#endif

#ifdef CONFIG_500
PatchOffset g_500_offsets = {
.fw_version = FW_500,
Expand Down Expand Up @@ -244,6 +344,18 @@ void setup_patch_offset_table(u32 fw_version)
}
#endif

#ifdef CONFIG_610
if(fw_version == g_610_offsets.fw_version) {
g_offs = &g_610_offsets;
}
#endif

#ifdef CONFIG_600
if(fw_version == g_600_offsets.fw_version) {
g_offs = &g_600_offsets;
}
#endif

#ifdef CONFIG_500
if(fw_version == g_500_offsets.fw_version) {
g_offs = &g_500_offsets;
Expand Down

0 comments on commit f67ba5f

Please sign in to comment.