Skip to content

Commit

Permalink
added 330 support
Browse files Browse the repository at this point in the history
  • Loading branch information
hrimfaxi committed Jun 29, 2011
1 parent e430bc0 commit a58a070
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 2 deletions.
3 changes: 3 additions & 0 deletions popsloader/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ all:
@cp -f core/popscore.prx dist
@cp -rf modules dist
make $(EXTRA_OPTIONS) clean -C popcorn
make $(EXTRA_OPTIONS) CONFIG_330=1 -C popcorn
@cp -f popcorn/popcorn.prx dist/modules/330/
make $(EXTRA_OPTIONS) clean -C popcorn
make $(EXTRA_OPTIONS) CONFIG_340=1 -C popcorn
@cp -f popcorn/popcorn.prx dist/modules/340/
make $(EXTRA_OPTIONS) clean -C popcorn
Expand Down
2 changes: 2 additions & 0 deletions popsloader/core/replace_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ const char *get_module_prefix(void)
sprintf(buf, "%s%s%s/", is_ef0() ? "ef" : "ms", MODULE_PATH, "350");
} else if(pops_fw_version == FW_340) {
sprintf(buf, "%s%s%s/", is_ef0() ? "ef" : "ms", MODULE_PATH, "340");
} else if(pops_fw_version == FW_330) {
sprintf(buf, "%s%s%s/", is_ef0() ? "ef" : "ms", MODULE_PATH, "330");
} else {
printk("%s: Unknown version: 0x%08X\n", __func__, pops_fw_version);
asm("break");
Expand Down
1 change: 1 addition & 0 deletions popsloader/loader/ui.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ int menu_ctrl(struct Menu *menu)
}

struct MenuItem main_menu_items[] = {
{ "3.30 pops", FW_330, },
{ "3.40 pops", FW_340, },
{ "3.50 pops", FW_350, },
{ "3.51 pops", FW_351, },
Expand Down
2 changes: 1 addition & 1 deletion popsloader/modules/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ Here are the file list you need to run popsloader:
/vsh/module/heaparea2.prx(<=4.00)
/vsh/module/common_util.prx
/vsh/module/pafmini.prx
/vsh/module/libpspvmc.prx
/vsh/module/libpspvmc.prx(>=3.40)

Dump them with new_psardumper. Then copy them into the corrspending direcotry like 635 for 6.35 pops.
5 changes: 5 additions & 0 deletions popsloader/popcorn/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ OBJS += $(PRO_HOME)/Common/printk.o
else
endif

ifeq ($(CONFIG_330), 1)
CFLAGS += -DCONFIG_330=1
PSP_FW_VERSION = 330
endif

ifeq ($(CONFIG_340), 1)
CFLAGS += -DCONFIG_340=1
PSP_FW_VERSION = 340
Expand Down
58 changes: 57 additions & 1 deletion popsloader/popcorn/popcorn_patch_offset.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <pspsdk.h>
#include "popcorn_patch_offset.h"

#if !defined(CONFIG_635) && !defined(CONFIG_620) && !defined(CONFIG_639) && !defined(CONFIG_610) && !defined(CONFIG_600) && !defined(CONFIG_551) && !defined(CONFIG_550) && !defined(CONFIG_503) && !defined(CONFIG_501) && !defined(CONFIG_500) && !defined(CONFIG_400) && !defined(CONFIG_373) && !defined(CONFIG_371) && !defined(CONFIG_352) && !defined(CONFIG_351) && !defined(CONFIG_350) && !defined(CONFIG_340)
#if !defined(CONFIG_635) && !defined(CONFIG_620) && !defined(CONFIG_639) && !defined(CONFIG_610) && !defined(CONFIG_600) && !defined(CONFIG_551) && !defined(CONFIG_550) && !defined(CONFIG_503) && !defined(CONFIG_501) && !defined(CONFIG_500) && !defined(CONFIG_400) && !defined(CONFIG_373) && !defined(CONFIG_371) && !defined(CONFIG_352) && !defined(CONFIG_351) && !defined(CONFIG_350) && !defined(CONFIG_340) && !defined(CONFIG_330)
#error You have to define one of CONFIG_FW_VERSION
#endif

Expand Down Expand Up @@ -872,6 +872,56 @@ PatchOffset g_340_offsets = {
};
#endif

#ifdef CONFIG_330
PatchOffset g_330_offsets = {
.fw_version = FW_330,
.popsman_patch = {
.get_rif_path = 0xDEADBEEF,
.get_rif_path_call1 = 0xDEADBEEF,
.get_rif_path_call2 = 0xDEADBEEF,
.sceNpDrmGetVersionKeyCall = 0xDEADBEEF,
.scePspNpDrm_driver_9A34AC9F_Call = 0xDEADBEEF,
.scePopsManLoadModuleCheck = 0x0000003C,
},
.pops_patch = {
.decomp = {
{ 0x0002A000, 0x00013788 }, // 01G
{ 0x0002A000, 0x00013788 }, // 02G
{ 0x0002A000, 0x00013788 }, // 03G
{ 0x0002A000, 0x00013788 }, // 04G
{ 0x0002A000, 0x00013788 }, // 05G
{ 0x0002A000, 0x00013788 }, // unused
{ 0x0002A000, 0x00013788 }, // unused
{ 0x0002A000, 0x00013788 }, // unused
{ 0x0002A000, 0x00013788 }, // unused
},
.ICON0SizeOffset = {
0x0001A0D4, // 01G
0x0001A0D4, // 02G
0x0001A0D4, // 03G
0x0001A0D4, // 04G
0x0001A0D4, // 05G
0x0001A0D4, // unused
0x0001A0D4, // unused
0x0001A0D4, // unused
0x0001A0D4, // unused
},
.manualNameCheck = {
0x0001B46C, // 01G
0x0001B46C, // 02G
0x0001B46C, // 03G
0x0001B46C, // 04G
0x0001B46C, // 05G
0x0001B46C, // unused
0x0001B46C, // unused
0x0001B46C, // unused
0x0001B46C, // unused
},
.sceMeAudio_67CD7972_NID = 0xFC56480E,
},
};
#endif

PatchOffset *g_offs = NULL;

void setup_patch_offset_table(u32 fw_version)
Expand Down Expand Up @@ -977,4 +1027,10 @@ void setup_patch_offset_table(u32 fw_version)
g_offs = &g_340_offsets;
}
#endif

#ifdef CONFIG_330
if(fw_version == g_330_offsets.fw_version) {
g_offs = &g_330_offsets;
}
#endif
}

0 comments on commit a58a070

Please sign in to comment.