From a58a070ce24a741af6f9f6bc0a312d9e41cc6026 Mon Sep 17 00:00:00 2001 From: hrimfaxi Date: Wed, 29 Jun 2011 21:57:25 +0800 Subject: [PATCH] added 330 support --- popsloader/Makefile | 3 ++ popsloader/core/replace_module.c | 2 + popsloader/loader/ui.c | 1 + popsloader/modules/README.txt | 2 +- popsloader/popcorn/Makefile | 5 ++ popsloader/popcorn/popcorn_patch_offset.c | 58 ++++++++++++++++++++++- 6 files changed, 69 insertions(+), 2 deletions(-) diff --git a/popsloader/Makefile b/popsloader/Makefile index 56a4a04..3e332e3 100644 --- a/popsloader/Makefile +++ b/popsloader/Makefile @@ -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 diff --git a/popsloader/core/replace_module.c b/popsloader/core/replace_module.c index dc29da0..67f7475 100644 --- a/popsloader/core/replace_module.c +++ b/popsloader/core/replace_module.c @@ -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"); diff --git a/popsloader/loader/ui.c b/popsloader/loader/ui.c index eb96725..dc7099b 100644 --- a/popsloader/loader/ui.c +++ b/popsloader/loader/ui.c @@ -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, }, diff --git a/popsloader/modules/README.txt b/popsloader/modules/README.txt index 0e6fa79..ef7f388 100644 --- a/popsloader/modules/README.txt +++ b/popsloader/modules/README.txt @@ -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. diff --git a/popsloader/popcorn/Makefile b/popsloader/popcorn/Makefile index 9ee4572..20af388 100644 --- a/popsloader/popcorn/Makefile +++ b/popsloader/popcorn/Makefile @@ -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 diff --git a/popsloader/popcorn/popcorn_patch_offset.c b/popsloader/popcorn/popcorn_patch_offset.c index 8f0bd43..8de2b3c 100644 --- a/popsloader/popcorn/popcorn_patch_offset.c +++ b/popsloader/popcorn/popcorn_patch_offset.c @@ -18,7 +18,7 @@ #include #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 @@ -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) @@ -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 }