diff --git a/.gitignore b/.gitignore index c7123fa1..4fa0639d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +*.sym +*.prx *.elf *.self *.pkg diff --git a/Changelog.txt b/Changelog.txt index 837f7bad..c61ad588 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -1,3 +1,18 @@ + +v1.37 +Add : Support the firmware 4.85C. +Fix : Issue with syscall 35. It fix the function to mount JB backups with cobra or mamba, among others. +Fix FileManager : Issue to open /dev_bdvd. +Add FileManager : Symbolic links. See Notes (1). + +Notes : +(1) It use cobra/mamba syscall 35. +For example if you want to redirect app_home to dev_bdvd +_ Select app_home (square) +_ Option (triangle) then select "SymLink source" (cross) +_ Select dev_bdvd (square) +_ Option (triangle) then select "Symlink target" (cross) + v1.36 Add : Support PS3HEN. I removed every feature unsupported by the HEN (tested on HEN 2.3.1). Add : Updated widescreen db from pcsx2 github. @@ -10,17 +25,16 @@ Add : You can add a color filter on some pictures. See notes (2). Add : Settings menu is splitted in 3 level instead of 2. Add : Platform filter for UI XMB. Fix : It scan dev_cf (compact flash) instead of dev_cd. -Add : 'Yes/No' settings are remplaced by a toggle. +Add : 'Yes/No' settings are replaced by a toggle. Add : New theme icons for the toggle. Fix : Rawseciso isn't a fself anymore. It fix issue with iso from ntfs with a PS3HEN. -Fix : Issue with ps2 elf crc. It fix several issues with iso patching options like when 'disable widescreen' was unavailble. +Fix : Issue with ps2 elf crc. It fix several issues with iso patching options like when 'disable widescreen' was unavailable. Fix : Pnach wasn't properly translated to .CONFIG, wrong endianness in replacement opcode. Fix : To avoid issues with some characters, the name of game settings files use title_id instead of title. Remove : I removed "Shortcut pkg" option because it's broken. I'll fix it later. Add FileManager : More informations of devices : capacity, file system, name, label, writable. -ADd FileManager : Several predefined root display is available. Also, you can custumize your own display in settings. -Add FileManager : Specifics options are available if you select several files with the same extention. For example, you can extract 3 pkg in a row. -Add FileManager : Make shortcut PKG. +ADd FileManager : Several predefined root display is available. Also, you can customize your own display in settings. +Add FileManager : Specifics options are available if you select several files with the same extension. For example, you can extract 3 pkg in a row. Add FileManager : New theme icons used for the closebox, the dockbox and the cursor. Add FileManager : Support UTF8 filename and also their content with the TXTviewer. Add offsetfinder : It generate every files to update managunz to a new firmware. Type 'make update'. @@ -30,20 +44,22 @@ Notes : For Flow3D, it's stored in 2MB slots, there is less slots. The dimention of the game pictures is limited. We can calculate its size = Width * Height * Pitch -I use ARGB texture -> the pitch is 4. -The picture size must repect : -- Width*Height < 0x20000 = (512*1024) /4 -- Flow3D Width*Height < 0x80000 = (2*1024*1024) /4 +I use ARGB texture, the pitch is 4. +The picture size must respect : +Width x Height < 0x20000 = (512 x 1024) /4 +And in Flow3D : +Width x Height < 0x80000 = (2 x 1024 x 1024) /4 + To not have any memory issue, I suggest you to use the following dimensions: -ICON0 320*176 = 0x0DC00 -COVER PS1 250*250 = 0x0F424 -COVER PS2 250*350 = 0x155CC -COVER PS3 260*300 = 0x130B0 -COVER PSP 200*340 = 0x109A0 -COVER3D PS1 450*450 + 450*600 = 0x735B4 -COVER3D PS2 850*570 = 0x76494 -COVER3D PS3 950*525 = 0x79C3E -COVER3D PSP 800*640 = 0x7D000 +ICON0 320 x 176 +COVER PS1 250 x 250 +COVER PS2 250 x 350 +COVER PS3 260 x 300 +COVER PSP 200 x 340 +COVER3D PS1 450 x 450 + 450 x 600 +COVER3D PS2 850 x 570 +COVER3D PS3 950 x 525 +COVER3D PSP 800 x 640 (2) You can choose the color filter with (R1) in settings. It's available for BG, BGS, SIDEBAR, BOXBODY, BOXHEAD and NOTIF pictures. @@ -51,6 +67,7 @@ You can add these colors in colorset.ini file too. They are named COLOR_BG, COLOR_BGS, COLOR_SIDEBAR, COLOR_BOXBODY, COLOR_BOXHEAD and COLOR_NOTIF. If you don't write a colors in colorset.ini it will be disabled. + v1.35 Add : Support 4.84C & 4.84D Fix : fixed Mamba payloads for D-REX not properly loading modules hashes diff --git a/MGZ/data/mamba_485C.lz.bin b/MGZ/data/mamba_485C.lz.bin new file mode 100644 index 00000000..6d33d100 Binary files /dev/null and b/MGZ/data/mamba_485C.lz.bin differ diff --git a/MGZ/data/mamba_loader_485C.bin b/MGZ/data/mamba_loader_485C.bin new file mode 100644 index 00000000..c8d64605 Binary files /dev/null and b/MGZ/data/mamba_loader_485C.bin differ diff --git a/MGZ/data/payload_sky_485C.bin b/MGZ/data/payload_sky_485C.bin new file mode 100644 index 00000000..55ea8a9c Binary files /dev/null and b/MGZ/data/payload_sky_485C.bin differ diff --git a/MGZ/data/ps2gxemu_stage1_485C.bin b/MGZ/data/ps2gxemu_stage1_485C.bin new file mode 100644 index 00000000..a758dde4 Binary files /dev/null and b/MGZ/data/ps2gxemu_stage1_485C.bin differ diff --git a/MGZ/data/ps2gxemu_stage2_485C.bin b/MGZ/data/ps2gxemu_stage2_485C.bin new file mode 100644 index 00000000..9c846d9d Binary files /dev/null and b/MGZ/data/ps2gxemu_stage2_485C.bin differ diff --git a/MGZ/data/ps2hwemu_stage1_485C.bin b/MGZ/data/ps2hwemu_stage1_485C.bin new file mode 100644 index 00000000..c41e2109 Binary files /dev/null and b/MGZ/data/ps2hwemu_stage1_485C.bin differ diff --git a/MGZ/data/ps2hwemu_stage2_485C.bin b/MGZ/data/ps2hwemu_stage2_485C.bin new file mode 100644 index 00000000..8d125544 Binary files /dev/null and b/MGZ/data/ps2hwemu_stage2_485C.bin differ diff --git a/MGZ/data/ps2netemu_stage2_485C.bin b/MGZ/data/ps2netemu_stage2_485C.bin new file mode 100644 index 00000000..839c078f Binary files /dev/null and b/MGZ/data/ps2netemu_stage2_485C.bin differ diff --git a/MGZ/data/umount_485C.bin b/MGZ/data/umount_485C.bin new file mode 100644 index 00000000..6e3f2218 Binary files /dev/null and b/MGZ/data/umount_485C.bin differ diff --git a/MGZ/source/common.h b/MGZ/source/common.h index f9d73d9c..b3ed427d 100644 --- a/MGZ/source/common.h +++ b/MGZ/source/common.h @@ -655,4 +655,22 @@ #define OFFSET_1_IDPS_484D 0x8000000000409A30ULL #define OFFSET_2_IDPS_484D 0x800000000049CAF4ULL +#define SYSCALL_TABLE_485C 0x8000000000363BE0ULL +#define HV_START_OFFSET_485C 0x370F28 +#define OFFSET_FIX_485C 0x05658C +#define OFFSET_2_FIX_485C 0x05A6E4 +#define OFFSET_FIX_2B17_485C 0x2275F4 +#define OFFSET_FIX_LIC_485C 0x056230 +#define OFFSET_FIX_3C_485C 0x267150 +#define OPEN_HOOK_485C 0x8000000000297638ULL +#define BASE_ADDR_485C 0x80000000002D8AF0ULL +#define LV2MOUNTADDR_485C 0x8000000000479FC0ULL +#define LV2MOUNTADDR_ESIZE_485C 0x118 +#define LV2MOUNTADDR_CSIZE_485C 0x108 +#define FW_DATE_OFFSET_485C 0x80000000002FCB68ULL +#define FW_DATE_1_485C 0x323031392F30372FULL +#define FW_DATE_2_485C 0x32332032313A3035ULL +#define OFFSET_1_IDPS_485C 0x80000000003E2E30ULL +#define OFFSET_2_IDPS_485C 0x8000000000474AF4ULL + #endif /* __COMMON_H__ */ diff --git a/MGZ/source/data.h b/MGZ/source/data.h index 5fbfc2d4..5a35e198 100644 --- a/MGZ/source/data.h +++ b/MGZ/source/data.h @@ -183,5 +183,10 @@ #include "mamba_484D_lz_bin.h" #include "mamba_loader_484D_bin.h" +#include "payload_sky_485C_bin.h" +#include "umount_485C_bin.h" +#include "mamba_485C_lz_bin.h" +#include "mamba_loader_485C_bin.h" + #endif /* __DATA_H__ */ diff --git a/MGZ/source/fw.c b/MGZ/source/fw.c index 30d6aaa9..6ab54541 100644 --- a/MGZ/source/fw.c +++ b/MGZ/source/fw.c @@ -1150,6 +1150,37 @@ u8 init_fw() MAMBA_LOADER_SIZE = mamba_loader_484D_bin_size; MAMBA_LOADER = (u64 *) mamba_loader_484D_bin; + } else + if(( lv2peek(FW_DATE_OFFSET_485C )==FW_DATE_1_485C) && + ( lv2peek(FW_DATE_OFFSET_485C + 8)==FW_DATE_2_485C) ) + { + + firmware = 0x485C; + + OFFSET_2_FIX = OFFSET_2_FIX_485C; + LV2MOUNTADDR_ESIZE = LV2MOUNTADDR_ESIZE_485C; + LV2MOUNTADDR_CSIZE = LV2MOUNTADDR_CSIZE_485C; + OFFSET_FIX = OFFSET_FIX_485C; + HV_START_OFFSET = HV_START_OFFSET_485C; + OFFSET_FIX_2B17 = OFFSET_FIX_2B17_485C; + OFFSET_FIX_LIC = OFFSET_FIX_LIC_485C; + OFFSET_FIX_3C = OFFSET_FIX_3C_485C; + SYSCALL_TABLE = SYSCALL_TABLE_485C; + LV2MOUNTADDR = LV2MOUNTADDR_485C; + OPEN_HOOK = OPEN_HOOK_485C; + BASE_ADDR = BASE_ADDR_485C; + OFFSET_1_IDPS = OFFSET_1_IDPS_485C; + OFFSET_2_IDPS = OFFSET_2_IDPS_485C; + + PAYLOAD_SKY_SIZE = payload_sky_485C_bin_size; + PAYLOAD_SKY = (u64) payload_sky_485C_bin; + UMOUNT_SIZE = umount_485C_bin_size; + UMOUNT = (u64) umount_485C_bin; + MAMBA_SIZE = mamba_485C_lz_bin_size; + MAMBA = (u64) mamba_485C_lz_bin; + MAMBA_LOADER_SIZE = mamba_loader_485C_bin_size; + MAMBA_LOADER = (u64 *) mamba_loader_485C_bin; + } else {return FAILED;} NEW_POKE_SYSCALL_ADDR = lv2peek( lv2peek(SYSCALL_TABLE + NEW_POKE_SYSCALL*8) ) + 0ULL; diff --git a/MGZ/source/main.c b/MGZ/source/main.c index 4e1975fe..49fe21df 100644 --- a/MGZ/source/main.c +++ b/MGZ/source/main.c @@ -380,6 +380,7 @@ static int8_t FAV_game_number = -1; //*************** Current Informations ************* static char GamPath[512]={0}; +static char GamID[20]={0}; static u8 Game_stuff = YES; static u8 PEEKnPOKE; static u8 cobra = NO; @@ -830,6 +831,7 @@ static u32 XMB_MMTHM_XMB_offset; imgData XMB_MMTHM_XMB2; static u32 XMB_MMTHM_XMB2_offset; + // ****************** FILE MANAGER *************** #define FM_FORMAT_INIT 0 @@ -901,7 +903,7 @@ static u32 *window_scroll_P=NULL; // increment position static float *window_scroll_size=NULL; static float *window_scroll_y=NULL; -#define OPTION_MAX 16 +#define OPTION_MAX 32 static char **option_sel=NULL; static char **option_item=NULL; @@ -1902,6 +1904,12 @@ static char *STR_EDIT_IDPS=NULL; #define STR_EDIT_IDPS_DEFAULT "Edit IDPS" static char *STR_FILTER_NOGAME=NULL; #define STR_FILTER_NOGAME_DEFAULT "No games found. Adjust your filter." +static char *STR_SYMLINK_SRC=NULL; +#define STR_SYMLINK_SRC_DEFAULT "SymLink source" +static char *STR_SYMLINK_TARGET=NULL; +#define STR_SYMLINK_TARGET_DEFAULT "SymLink target" +static char *STR_LOAD_MAMBA=NULL; +#define STR_LOAD_MAMBA_DEFAULT "Load mamba" //*********************************************************** // Functions @@ -2677,6 +2685,17 @@ u8 exist(char *path) return YES; } +u8 can_opendir(char *path) +{ + DIR *d=NULL; + d = opendir(path); + if(d==NULL) return NO; + closedir(d); + + return YES; +} + + char *GetExtention(char *path) { int n = strlen(path); @@ -5905,6 +5924,9 @@ void update_lang() LANG(STR_FM_CB_FILL, "STR_FM_CB_FILL", STR_FM_CB_FILL_DEFAULT); LANG(STR_EDIT_IDPS, "STR_EDIT_IDPS", STR_EDIT_IDPS_DEFAULT); LANG(STR_FILTER_NOGAME, "STR_FILTER_NOGAME", STR_FILTER_NOGAME_DEFAULT); + LANG(STR_SYMLINK_SRC, "STR_SYMLINK_SRC", STR_SYMLINK_SRC_DEFAULT); + LANG(STR_SYMLINK_TARGET, "STR_SYMLINK_TARGET", STR_SYMLINK_TARGET_DEFAULT); + LANG(STR_LOAD_MAMBA, "STR_LOAD_MAMBA", STR_LOAD_MAMBA_DEFAULT); FREE(flang); lang_code_loaded = lang_code; @@ -9476,7 +9498,7 @@ int sys_fs_chown(char *path, s32 uid, s32 gid) s64 sys_fs_disk_free(char *path, u64 *total_free, u64 *avail_free) { - lv2syscall3(835, (u64) path, (u64) total_free, (u64) avail_free); + lv2syscall3(840, (u64) path, (u64) total_free, (u64) avail_free); return_to_user_prog(int); } @@ -16717,27 +16739,24 @@ static char *build_blank_iso(char *title_id) void mount_fake_BR() { - int ret; unsigned int real_disctype; cobra_get_disc_type(&real_disctype, NULL, NULL); if (real_disctype == DISC_TYPE_NONE) { - print_load("mount Fake BR"); + print_load("Mount Fake BR"); char *files[1]; - char *blank_iso = build_blank_iso("TEST00000"); + char *blank_iso = build_blank_iso(GamID); if (blank_iso) { files[0] = blank_iso; - ret = cobra_mount_ps3_disc_image(files, 1); + cobra_mount_ps3_disc_image(files, 1); free(blank_iso); - if (ret == 0) - { - cobra_send_fake_disc_insert_event(); - } + usleep(25000); + cobra_send_fake_disc_insert_event(); } } } @@ -16823,6 +16842,18 @@ u8 ISOtype(char *isoPath) } +u8 is_folder(u8 ext) +{ + if( ext == _DIRECTORY + || ext == _JB_PS3 + || ext == _JB_PS2 + || ext == _JB_PS1 + || ext == _JB_PSP + ) return YES; + + return NO; +} + u8 can_read(u8 ext) { if( ext == _TXT @@ -16859,7 +16890,7 @@ u8 get_ext(char *file) f=fopen(temp, "rb"); if(f!=NULL) { fgets(temp, 128, f); - strtok(temp, " ="); + if( strstr(temp, " =") != NULL) strtok(temp, " ="); fclose(f); if(!strcmp(temp, "BOOT2")) return _JB_PS2; else if(!strcmp(temp, "BOOT")) return _JB_PS1; @@ -17009,6 +17040,59 @@ void HEN_game_settings() use_ex_plug=NO; } +//******************************************************* +// MAP PATHS +//******************************************************* + + +int MAX_TABLE_ENTRIES=-1; +int TABLE_ENTRIES=-1; +char **OLD_PATH=NULL; +char **NEW_PATH=NULL; +char *FM_OLD_PATH=NULL; + +int get_map_path(unsigned int num, char *path, char *new_path) +{ + lv2syscall4(8, SYSCALL8_OPCODE_HEN_REV, (uint64_t)num, (uint64_t)path, (uint64_t)new_path); + return_to_user_prog(int); +} + +void init_MAP_PATHS_LIST() +{ + MAX_TABLE_ENTRIES = get_map_path(0xFFFF, NULL, NULL); + + if( MAX_TABLE_ENTRIES < 0 ) return; + + OLD_PATH = (char **) malloc(MAX_TABLE_ENTRIES * sizeof(char *)); + NEW_PATH = (char **) malloc(MAX_TABLE_ENTRIES * sizeof(char *)); + + int i; + for(i=0; i < MAX_TABLE_ENTRIES; i++) { + OLD_PATH[i] = (char *) malloc(512); + NEW_PATH[i] = (char *) malloc(512); + } + +} + +void clear_MAP_PATHS_LIST() +{ + int i; + for(i=0; i < MAX_TABLE_ENTRIES; i++) { + memset(OLD_PATH[i], 0, 512); + memset(NEW_PATH[i], 0, 512); + } +} + +void get_map_paths() +{ + clear_MAP_PATHS_LIST(); + + int i; + for(i=0; i < MAX_TABLE_ENTRIES; i++) { + get_map_path(i, OLD_PATH[i], NEW_PATH[i]); + } +} + //******************************************************* //Iris Mount Game //******************************************************* @@ -17260,7 +17344,7 @@ void iris_Mount() { int ret; - if(cobra) { + if(cobra || mamba) { if(prim_USB == YES) SetPrimaryUSB(); mount_fake_BR(); } @@ -17277,8 +17361,8 @@ void iris_Mount() if( ret != 0) print_load("Error %d: failed to patch bdmirroir", ret); sleep(1); - sprintf(temp_buffer, "%s/DISC_PS3.SFB", GamPath); - add_sys8_path_table("/dev_bdvd/DISC_PS3.SFB", temp_buffer); + sprintf(temp_buffer, "%s/PS3_DISC.SFB", GamPath); + add_sys8_path_table("/dev_bdvd/PS3_DISC.SFB", temp_buffer); add_sys8_bdvd(NULL, NULL); @@ -17461,7 +17545,7 @@ void mm_Mount() { int ret; - if(cobra) { + if(cobra || mamba) { if(prim_USB == YES) SetPrimaryUSB(); mount_fake_BR(); } @@ -17480,8 +17564,8 @@ void mm_Mount() if( ret != 0) print_load("Error %d: patch_bdmirror failed", ret); sleep(1); - sprintf(temp, "%s/DISC_PS3.SFB", GamPath); - add_to_map("/dev_bdvd/DISC_PS3.SFB", temp); + sprintf(temp, "%s/PS3_DISC.SFB", GamPath); + add_to_map("/dev_bdvd/PS3_DISC.SFB", temp); } else if(emu == BDEMU) { @@ -17558,15 +17642,38 @@ void mm_Mount() //Cobra Mount //******************************************************* +u8 have_syscall35() +{ + u64 syscall_not_impl = lv2peek(SYSCALL_TABLE); + + u64 sc35 = lv2peek(SYSCALL_TABLE + (8*35)); + + if( sc35 == syscall_not_impl ) return NO; + + return YES; +} + s32 sys_map_path(char *oldpath, char *newpath) { lv2syscall2(35, (uint64_t)oldpath, (uint64_t)newpath); return_to_user_prog(s32); } +void snake_map(char *oldpath, char* newpath) +{ + //char *old_path[1]={NULL}; + //char *new_path[1]={NULL}; + + //old_path[0]=oldpath; + //new_path[0]=newpath; + + //sys_map_paths(old_path, new_path, 1); + sys_map_path(oldpath, newpath); +} + int sys_get_version(u32 *version) { - lv2syscall2(8, SYSCALL8_OPCODE_GET_VERSION, (u64)version); + lv2syscall2(8, SYSCALL8_OPCODE_GET_VERSION, (uint64_t)version); return_to_user_prog(int); } @@ -17799,18 +17906,18 @@ void cobra_Mount() if( ret != 0) print_load("Error %d: patch_bdmirror failed", ret); sleep(1); - sprintf(temp, "%s/DISC_PS3.SFB", GamPath); - {sys_map_path("/dev_bdvd/DISC_PS3.SFB", temp);} + sprintf(temp, "%s/PS3_DISC.SFB", GamPath); + {sys_map_path("/dev_bdvd/PS3_DISC.SFB", temp);} } else if(emu == BDEMU) { char *libfs_path = get_libfs_path(); if(path_info(libfs_path) == _FILE) {sys_map_path("/dev_flash/sys/external/libfs.sprx", libfs_path);} if(libfs_path) free(libfs_path); - cobra_map_game(GamPath, (char*)"TEST00000", &i); + cobra_map_game(GamPath, (char*) GamID, &i); } else if(emu == NONE) { - cobra_map_game(GamPath, (char*)"TEST00000", &i); + cobra_map_game(GamPath, (char*) GamID, &i); } if(mount_app_home == YES) { @@ -17984,18 +18091,6 @@ u8 install_mamba() return YES; } -void mamba_map(char *oldpath, char* newpath) -{ - //char *old_path[1]={NULL}; - //char *new_path[1]={NULL}; - - //old_path[0]=oldpath; - //new_path[0]=newpath; - - //sys_map_paths(old_path, new_path, 1); - sys_map_path(oldpath, newpath); -} - void mamba_MountISO(int EMU) { uint8_t *plugin_args = malloc(0x20000); @@ -18126,7 +18221,7 @@ void mamba_Mount() mamba = install_mamba(); char temp[128]; - + if(ext_game_data==YES) { int i; @@ -18135,7 +18230,7 @@ void mamba_Mount() if(strstr(temp, "/dev_usb")) { strcat(temp, "/GAMEI"); if(path_info(temp)==_NOT_EXIST) mkdir(temp, 0777); - {mamba_map("/dev_hdd0/game", temp);} + {snake_map("/dev_hdd0/game", temp);} } } } @@ -18145,12 +18240,12 @@ void mamba_Mount() mamba_MountISO(EMU_PS3); if(mount_app_home == YES) { - {mamba_map("/app_home", "/dev_bdvd");} + {snake_map("/app_home", "/dev_bdvd");} if(use_ex_plug==YES) { if(patch_exp_plug() == SUCCESS) { sprintf(temp, "/dev_hdd0/game/%s/USRDIR/sys/patched_explore_plugin_%X.sprx", ManaGunZ_id, firmware); - if(path_info(temp) != _NOT_EXIST) {mamba_map("/dev_flash/vsh/module/explore_plugin.sprx", temp);} + if(path_info(temp) != _NOT_EXIST) {snake_map("/dev_flash/vsh/module/explore_plugin.sprx", temp);} } else print_load("Error : cannot patch explore_plugin.sprx"); } } @@ -18161,38 +18256,40 @@ void mamba_Mount() if(prim_USB == YES) SetPrimaryUSB(); + mount_fake_BR(); + if(emu == BDMIRROR) { print_load("Patching BD-Mirror"); ret = patch_bdmirror(); if( ret != 0) print_load("Error %d: patch_bdmirror failed", ret); sleep(1); - sprintf(temp, "%s/DISC_PS3.SFB", GamPath); - {mamba_map("/dev_bdvd/DISC_PS3.SFB", temp);} + sprintf(temp, "%s/PS3_DISC.SFB", GamPath); + {snake_map("/dev_bdvd/PS3_DISC.SFB", temp);} } else if(emu == BDEMU) { char *libfs_path = get_libfs_path(); - if(path_info(libfs_path) == _FILE) {mamba_map("/dev_flash/sys/external/libfs.sprx", libfs_path);} + if(path_info(libfs_path) == _FILE) {snake_map("/dev_flash/sys/external/libfs.sprx", libfs_path);} if(libfs_path) free(libfs_path); - {mamba_map("/dev_bdvd", GamPath);} + {snake_map("/dev_bdvd", GamPath);} } else if(emu == NONE) { - {mamba_map("/dev_bdvd", GamPath);} + {snake_map("/dev_bdvd", GamPath);} } if(mount_app_home == YES) { if(emu == BDMIRROR) { - {mamba_map("/app_home", "/dev_bdvd");} + {snake_map("/app_home", "/dev_bdvd");} } else { - {mamba_map("/app_home", GamPath);} + {snake_map("/app_home", GamPath);} } if(use_ex_plug==YES) { if(patch_exp_plug() == SUCCESS) { sprintf(temp, "/dev_hdd0/game/%s/USRDIR/sys/patched_explore_plugin_%X.sprx", ManaGunZ_id, firmware); - if((path_info(temp) == _FILE) ) {mamba_map("/dev_flash/vsh/module/explore_plugin.sprx", temp);} + if((path_info(temp) == _FILE) ) {snake_map("/dev_flash/vsh/module/explore_plugin.sprx", temp);} } else print_load("Error : cannot patch explore_plugin.sprx"); } } @@ -18208,7 +18305,11 @@ u8 MountGame(char *GamePath) return FAILED; } - strcpy(GamPath, GamePath); + memset(GamPath, 0, 512); + memset(GamID, 0, 20); + + strcpy(GamPath, GamePath); + Get_ID(GamPath, platform, GamID); iso = is_iso(GamePath); @@ -20167,17 +20268,24 @@ int init_ManaGunZ() else if(mamba) { umount_iso(); usleep(4000); - {mamba_map((char*)"/dev_bdvd", NULL);} - {mamba_map((char*)"//dev_bdvd", NULL);} - {mamba_map((char*)"/app_home", NULL);} - {mamba_map((char*)"//app_home", NULL);} - {mamba_map("/dev_flash/sys/external/libfs.sprx", NULL);} - {mamba_map("/dev_flash/vsh/module/explore_plugin.sprx", NULL);} + {snake_map((char*)"/dev_bdvd", NULL);} + {snake_map((char*)"//dev_bdvd", NULL);} + {snake_map((char*)"/app_home", NULL);} + {snake_map((char*)"//app_home", NULL);} + {snake_map("/dev_flash/sys/external/libfs.sprx", NULL);} + {snake_map("/dev_flash/vsh/module/explore_plugin.sprx", NULL);} } sys_fs_umount("/dev_bdvd"); sys_fs_umount("/dev_ps2disk"); + sys_fs_mount("CELL_FS_IOS:PATA0_BDVD_DRIVE", "CELL_FS_ISO9660", "/dev_bdvd", 1); + // usleep(1000); + // for(n=0; n<10;n++) { + // if(path_info("/dev_bdvd") != _NOT_EXIST) break; + // sys_fs_mount("CELL_FS_IOS:PATA0_BDVD_DRIVE", "CELL_FS_ISO9660", "/dev_bdvd", 1); + // usleep(1000); + // } /* if(cobra) { @@ -21394,8 +21502,8 @@ void Draw_window() if( fm_CustomIcons == NO) { u8 ext = window_content_Type[n][window_scroll_P[n]+i]; - - if(ext == _DIRECTORY) { + + if( is_folder(ext) ) { DrawIcon_Directory(window_x[n]+BORDER+2, window_y[n]+TOP_H+COL_H+LINE_H*i, window_z[n]); } else { DrawIcon_File(window_x[n]+BORDER+2, window_y[n]+TOP_H+COL_H+LINE_H*i, window_z[n], WHITE); @@ -21412,7 +21520,14 @@ void Draw_window() DrawIcon(window_x[n]+BORDER+2, window_y[n]+TOP_H+COL_H+LINE_H*i, window_z[n], USB, WHITE, DevicesInfo[j].ReadOnly); } else if( strncmp(window_content_Name[n][window_scroll_P[n]+i], "dev_bdvd", 8)==0) { - DrawIcon(window_x[n]+BORDER+2, window_y[n]+TOP_H+COL_H+LINE_H*i, window_z[n], DISC_PS3, WHITE, DevicesInfo[j].ReadOnly); + if( window_content_Type[n][window_scroll_P[n]+i] == _JB_PS3) { + DrawIcon(window_x[n]+BORDER+2, window_y[n]+TOP_H+COL_H+LINE_H*i, window_z[n], DISC_PS3, WHITE, DevicesInfo[j].ReadOnly); + } else + if( window_content_Type[n][window_scroll_P[n]+i] == _JB_PS1) { + DrawIcon(window_x[n]+BORDER+2, window_y[n]+TOP_H+COL_H+LINE_H*i, window_z[n], DISC_PS1, WHITE, DevicesInfo[j].ReadOnly); + } else { + DrawIcon(window_x[n]+BORDER+2, window_y[n]+TOP_H+COL_H+LINE_H*i, window_z[n], DISC, WHITE, DevicesInfo[j].ReadOnly); + } } else if( strncmp(window_content_Name[n][window_scroll_P[n]+i], "dev_ps2disk", 11)==0) { DrawIcon(window_x[n]+BORDER+2, window_y[n]+TOP_H+COL_H+LINE_H*i, window_z[n], DISC_PS2, WHITE, DevicesInfo[j].ReadOnly); @@ -21430,7 +21545,7 @@ void Draw_window() DrawIcon(window_x[n]+BORDER+2, window_y[n]+TOP_H+COL_H+LINE_H*i, window_z[n], FLASH, WHITE, DevicesInfo[j].ReadOnly); } else if( strncmp(window_content_Name[n][window_scroll_P[n]+i], "app_home", 8)==0) { - if( window_content_Type[n][window_scroll_P[n]+i] == _ISO_PS3) { + if( window_content_Type[n][window_scroll_P[n]+i] == _JB_PS3) { DrawIcon(window_x[n]+BORDER+2, window_y[n]+TOP_H+COL_H+LINE_H*i, window_z[n], DISC_PS3, WHITE, DevicesInfo[j].ReadOnly); } else { DrawIcon(window_x[n]+BORDER+2, window_y[n]+TOP_H+COL_H+LINE_H*i, window_z[n], APP_HOME, WHITE, DevicesInfo[j].ReadOnly); @@ -21467,7 +21582,7 @@ void Draw_window() 0, BLACK); - if(window_content_Type[n][window_scroll_P[n]+i] != _DIRECTORY && strcmp(window_path[n], "/") != 0) { + if( is_folder(window_content_Type[n][window_scroll_P[n]+i]) == NO && strcmp(window_path[n], "/") != 0) { char *size_str = get_unit(window_content_Size[n][window_scroll_P[n]+i]); float size_str_w = WidthFromStr(size_str); DrawString(window_x[n]+window_w[n]-BORDER-SCROLL_W-size_str_w - 5 , window_y[n]+TOP_H+COL_H+LINE_H*i, size_str); @@ -21477,7 +21592,7 @@ void Draw_window() u8 ext = window_content_Type[n][window_scroll_P[n]+i]; - if(ext == _DIRECTORY) { + if( is_folder(ext) ) { DrawIcon_Directory(window_x[n]+BORDER+2, window_y[n]+TOP_H+COL_H+LINE_H*i, window_z[n]); } else if(ext == _PNG || ext == _JPG) { @@ -21918,29 +22033,35 @@ void sort(int window_id) for (i = 0; i<=window_content_N[window_id]; i++) { if(strcmp(window_content_Name[window_id][i], "..") == 0) continue; - if(window_content_Type[window_id][i] == _DIRECTORY) Folder_N++; + if( is_folder(window_content_Type[window_id][i]) ) Folder_N++; else File_N++; } char **list_Dir = (char **) malloc( (Folder_N+2) * sizeof(char*) ); u8 *list_Dir_sel = (u8 *) malloc( (Folder_N+2) * sizeof(u8) ); + u8 *list_Dir_type = (u8 *) malloc( (Folder_N+2) * sizeof(u8) ); + char **list_Fil = (char **) malloc( (File_N+2) * sizeof(char*) ); u64 *list_Fil_siz = (u64 *) malloc( (File_N+2) * sizeof(u64) ); - u8 *list_Fil_sel = (u8 *) malloc( (File_N+2) * sizeof(u8) ); + u8 *list_Fil_sel = (u8 *) malloc( (File_N+2) * sizeof(u8) ); + u8 *list_Fil_type = (u8 *) malloc( (File_N+2) * sizeof(u8) ); + Folder_N = -1; File_N = -1; for (i = 0; i<=window_content_N[window_id]; i++) { if(strcmp(window_content_Name[window_id][i], "..") == 0) continue; - if(window_content_Type[window_id][i] == _DIRECTORY) { + if( is_folder(window_content_Type[window_id][i]) ) { Folder_N++; list_Dir[Folder_N] = strcpy_malloc(window_content_Name[window_id][i]); list_Dir_sel[Folder_N] = window_content_Selected[window_id][i]; + list_Dir_type[Folder_N] = window_content_Type[window_id][i]; } else { File_N++; list_Fil[File_N] = strcpy_malloc(window_content_Name[window_id][i]); list_Fil_sel[File_N] = window_content_Selected[window_id][i]; list_Fil_siz[File_N] = window_content_Size[window_id][i]; + list_Fil_type[File_N] = window_content_Type[window_id][i]; } } @@ -21972,6 +22093,10 @@ void sort(int window_id) t = list_Dir_sel[min]; list_Dir_sel[min] = list_Dir_sel[i]; list_Dir_sel[i] = t; + + t = list_Dir_type[min]; + list_Dir_type[min] = list_Dir_type[i]; + list_Dir_type[i] = t; } for (i = 0; id_type & DT_DIR) { window_content_Type[window_id][window_content_N[window_id]] = _DIRECTORY; if(strcmp(window_path[window_id], "/") == 0) { @@ -22220,12 +22353,34 @@ void RefreshWindow(window_id) window_content_Type[window_id][window_content_N[window_id]] = get_ext(temp); } } - } else { + } else + if(dir->d_type & DT_REG) { if(strcmp(window_path[window_id], "/") != 0) { sprintf(temp, "%s/%s", window_path[window_id], dir->d_name); - window_content_Size[window_id][window_content_N[window_id]] = get_size(temp, NO); + window_content_Size[window_id][window_content_N[window_id]] = get_size(temp, NO); } window_content_Type[window_id][window_content_N[window_id]] = get_ext(dir->d_name); + } + else { + if(strcmp(window_path[window_id], "/") == 0) { + sprintf(temp, "/%s", dir->d_name); + if( can_opendir(temp) ) { + window_content_Type[window_id][window_content_N[window_id]] = get_ext(temp); + if( is_folder(window_content_Type[window_id][window_content_N[window_id]]) == NO) { + window_content_Type[window_id][window_content_N[window_id]] = _DIRECTORY; + } + } else { + window_content_Type[window_id][window_content_N[window_id]] = _FILE; + } + } else { + sprintf(temp, "%s/%s", window_path[window_id], dir->d_name); + if( can_opendir(temp) ) { + window_content_Type[window_id][window_content_N[window_id]] = _DIRECTORY; + } else { + window_content_Size[window_id][window_content_N[window_id]] = get_size(temp, NO); + window_content_Type[window_id][window_content_N[window_id]] = get_ext(dir->d_name); + } + } } window_content_Name[window_id][window_content_N[window_id]] = strcpy_malloc(dir->d_name); } @@ -23173,9 +23328,23 @@ void Option(char *item) } else if(strcmp(item, "Test") == 0) { start_loading(); - print_load("Sleep 10"); sleep(10); + sleep(10); end_loading(); } else + if(strcmp(item, STR_SYMLINK_SRC) == 0) { + FREE(FM_OLD_PATH); + FM_OLD_PATH = strcpy_malloc(option_sel[0]); + for(i=0; i 0) { @@ -36351,6 +36555,11 @@ void Draw_MAIN() SetFontZ(10); + if( game_number < 0 ) { + Game_stuff = NO; + DrawFormatString(50, 40, "%s", STR_NOGAME); + return; + } if(position < 0) { Game_stuff = NO; DrawFormatString(50, 40, "%s", STR_FILTER_NOGAME); @@ -36484,6 +36693,8 @@ int main(void) } } + //init_MAP_PATHS_LIST(); + #ifdef FILEMANAGER #ifndef RPCS3 @@ -36605,40 +36816,6 @@ int main(void) LoopBreak=1; while(LoopBreak) { - while(game_number < 0) { - cls(); - - Draw_BGS(); - Draw_MemMonitor(); - - AutoRefresh_GAMELIST(); - - FontSize(20); - FontColor(RED); - DrawString(50, 40, STR_NOGAME); - - float x=INPUT_X; - float y=INPUT_Y; - FontColor(COLOR_1); - SetFontZ(0); - - x=DrawButton(x, y, STR_EXIT , BUTTON_CIRCLE); - x=DrawButton(x, y, STR_FILEMANAGER, BUTTON_SELECT); - - tiny3d_Flip(); - ScreenShot(); - ps3pad_read(); - - if(NewPad(BUTTON_SELECT)) Draw_FileExplorer(); - - if(NewPad(BUTTON_CIRCLE)) { - sysModuleUnload(SYSMODULE_PNGDEC); - sysModuleUnload(SYSMODULE_JPGDEC); - ioPadEnd(); - return 0; - } - } - scene = SCENE_MAIN; cls(); diff --git a/MGZ/source/ps2crc.h b/MGZ/source/ps2crc.h index ac950f56..59377f8c 100644 --- a/MGZ/source/ps2crc.h +++ b/MGZ/source/ps2crc.h @@ -44,6 +44,7 @@ #define CRC32HWEMU_483C 0x46E2023C #define CRC32HWEMU_484C 0x163D378B #define CRC32HWEMU_484D 0x36557E04 +#define CRC32HWEMU_485C 0xCB43BF29 #define CRC32GXEMU_421C 0xE031E18E #define CRC32GXEMU_421D 0x513B3FD1 @@ -86,6 +87,7 @@ #define CRC32GXEMU_483C 0x9C1D118B #define CRC32GXEMU_484C 0x9C1D118B #define CRC32GXEMU_484D 0x0B47F5DA +#define CRC32GXEMU_485C 0x9C1D118B #define CRC32NETEMU_421C 0x6CCC9066 #define CRC32NETEMU_421D 0x4EBC5CFC @@ -128,5 +130,6 @@ #define CRC32NETEMU_483C 0x93E0EB0B #define CRC32NETEMU_484C 0x93E0EB0B #define CRC32NETEMU_484D 0x8D7C6589 +#define CRC32NETEMU_485C 0x93E0EB0B #endif /* __PS2CRC_H__ */ diff --git a/MGZ/source/ps2data.h b/MGZ/source/ps2data.h index fd664247..6186f8ec 100644 --- a/MGZ/source/ps2data.h +++ b/MGZ/source/ps2data.h @@ -249,5 +249,11 @@ #include "ps2gxemu_stage2_484D_bin.h" #include "ps2netemu_stage2_484D_bin.h" +#include "ps2hwemu_stage1_485C_bin.h" +#include "ps2hwemu_stage2_485C_bin.h" +#include "ps2gxemu_stage1_485C_bin.h" +#include "ps2gxemu_stage2_485C_bin.h" +#include "ps2netemu_stage2_485C_bin.h" + #endif /* __PS2DATA_H__ */ diff --git a/MGZ/source/ps2vers.c b/MGZ/source/ps2vers.c index 083cea8f..e5f488b9 100644 --- a/MGZ/source/ps2vers.c +++ b/MGZ/source/ps2vers.c @@ -252,6 +252,12 @@ u8 get_hwemu(u32 crc, u8 **stage1, u32 *stage1_size, u8 **stage2, u32 *stage2_si *stage1 = (uint8_t *) ps2hwemu_stage1_484D_bin; *stage2_size = (uint32_t) ps2hwemu_stage2_484D_bin_size; *stage2 = (uint8_t *) ps2hwemu_stage2_484D_bin; + } else + if(crc == CRC32HWEMU_485C) { + *stage1_size = (uint32_t) ps2hwemu_stage1_485C_bin_size; + *stage1 = (uint8_t *) ps2hwemu_stage1_485C_bin; + *stage2_size = (uint32_t) ps2hwemu_stage2_485C_bin_size; + *stage2 = (uint8_t *) ps2hwemu_stage2_485C_bin; } else return FAILED; return SUCCESS; @@ -505,6 +511,12 @@ u8 get_gxemu(u32 crc, u8 **stage1, u32 *stage1_size, u8 **stage2, u32 *stage2_si *stage1 = (uint8_t *) ps2gxemu_stage1_484D_bin; *stage2_size = (uint32_t) ps2gxemu_stage2_484D_bin_size; *stage2 = (uint8_t *) ps2gxemu_stage2_484D_bin; + } else + if(crc == CRC32GXEMU_485C) { + *stage1_size = (uint32_t) ps2gxemu_stage1_485C_bin_size; + *stage1 = (uint8_t *) ps2gxemu_stage1_485C_bin; + *stage2_size = (uint32_t) ps2gxemu_stage2_485C_bin_size; + *stage2 = (uint8_t *) ps2gxemu_stage2_485C_bin; } else return FAILED; return SUCCESS; @@ -677,6 +689,10 @@ u8 get_netemu(u32 crc, u8 **stage2, u32 *stage2_size) if(crc == CRC32NETEMU_484D) { *stage2_size = (uint32_t) ps2netemu_stage2_484D_bin_size; *stage2 = (uint8_t *) ps2netemu_stage2_484D_bin; + } else + if(crc == CRC32NETEMU_485C) { + *stage2_size = (uint32_t) ps2netemu_stage2_485C_bin_size; + *stage2 = (uint8_t *) ps2netemu_stage2_485C_bin; } else return FAILED; return SUCCESS; diff --git a/Makefile b/Makefile index c8dea982..1ab2618d 100644 --- a/Makefile +++ b/Makefile @@ -34,7 +34,7 @@ PKGFILES1 := $(CURDIR)/pkgfiles PKGFILES2 := $(CURDIR)/pkgfiles2 SFOXML := sfo.xml -VERSION := 1.36 +VERSION := 1.37 ifeq ($(FILEMANAGER), 1) PKGFILES := $(PKGFILES2) diff --git a/OffsetFinder/main.c b/OffsetFinder/main.c index 1924d79c..5056de50 100644 --- a/OffsetFinder/main.c +++ b/OffsetFinder/main.c @@ -1155,8 +1155,10 @@ int SearchOffsets() FILE *common; FILE *SKY; FILE *symbols; - FILE *IDPSet; - FILE *ERK; + FILE *IDPSET_firmware_h; + FILE *IDPSET_firmware_c; + FILE *IDPSET_symbols_h; + FILE *IDPSET_data_h; FILE *fw; FILE *data; FILE *fwc; @@ -1167,11 +1169,15 @@ int SearchOffsets() DIR *d; struct dirent* ent = NULL; + IDPSET_firmware_h = fopen("IDPSET_firmware.h", "w"); + IDPSET_data_h = fopen("IDPSET_data.h", "w"); + IDPSET_symbols_h = fopen("IDPSET_symbols.h", "w"); + IDPSET_firmware_c = fopen("IDPSET_firmware.c", "w"); + SKY = fopen("firmware_symbols.h", "w"); common = fopen("common.h", "w"); symbols = fopen("symbols.h", "w"); - IDPSet = fopen("firmware.h", "w"); - ERK = fopen("erk_symbols.h", "w"); + fw = fopen("FIRMWARES", "w"); fwc = fopen("fw.c", "w"); data = fopen("data.h","w"); @@ -1203,13 +1209,52 @@ int SearchOffsets() fputs("#define umd_mutex_offset (0x64480+0x38C)\n\n", symbols); - fputs("#ifndef __FIRMWARE_H__\n", IDPSet); - fputs("#define __FIRMWARE_H__\n\n", IDPSet); - fputs("#ifndef __SYMBOLS_H__\n", ERK); - fputs("#define __SYMBOLS_H__\n\n", ERK); - fputs("#define KERNEL_BASE 0x8000000000000000\n\n", ERK); + fputs("#ifndef __SYMBOLS_H__\n", IDPSET_symbols_h); + fputs("#define __SYMBOLS_H__\n\n", IDPSET_symbols_h); + fputs("#define KERNEL_BASE 0x8000000000000000\n\n", IDPSET_symbols_h); + + fputs("#ifndef __DATA_H__\n", IDPSET_data_h); + fputs("#define __DATA_H__\n\n", IDPSET_data_h); + + fputs("#ifndef __FIRMWARE_H__\n", IDPSET_firmware_h); + fputs("#define __FIRMWARE_H__\n", IDPSET_firmware_h); + fputs("\n\ +#include \n\ +#include \"data.h\"\n\ +\n\ +int init_IDPSet();\n", IDPSET_firmware_h); + fputs("\n\ +#include \n\ +#include \"firmware.h\"\n\ +\n\ +#define SUCCESS 1\n\ +#define FAILED 0\n\ +\n\ +extern u8 rebug;\n\ +extern u64 *payload;\n\ +extern size_t payload_size;\n\ +extern u32 firmware;\n\ +extern u64 TOC_OFFSET;\n\ +extern u64 HV_START_OFFSET;\n\ +extern u64 HTAB_OFFSET;\n\ +extern u64 SYSCALL_TABLE_OFFSET;\n\ +extern u64 MMAP_OFFSET1;\n\ +extern u64 MMAP_OFFSET2;\n\ +extern u64 SPE_OFFSET;\n\ +extern u64 OFFSET_1_IDPS;\n\ +extern u64 OFFSET_2_IDPS;\n\ +\n\ +extern int fw_is_rebug();\n\ +extern u64 lv2peek(u64 addr);\n\ +\n\ +int init_IDPSet()\n\ +{\n\ +\n\ + OFFSET_1_IDPS = 0;\n\ + OFFSET_2_IDPS = 0;\n", IDPSET_firmware_c); + fputs("\n\ #include \"fw.h\"\n\ \n\ @@ -1266,10 +1311,36 @@ u8 init_fw()\n\ sprintf(temp, "#include \"mamba_%s_lz_bin.h\"\n", ent->d_name); fputs(temp, data); sprintf(temp, "#include \"mamba_loader_%s_bin.h\"\n\n", ent->d_name); fputs(temp, data); + sprintf(temp, "#include \"payload_%s_bin.h\"\n", ent->d_name); fputs(temp, IDPSET_data_h); + + sprintf(temp, "flash/%s/dev_flash/rebug", ent->d_name); u8 ps2payloads = 1; if( exist(temp) ) ps2payloads = 0; + + sprintf(temp, "\n\ + if(( lv2peek(FW_DATE_OFFSET_%s )==FW_DATE_1_%s) &&\n\ + ( lv2peek(FW_DATE_OFFSET_%s + 8)==FW_DATE_2_%s) )\n\ + {\n\ + firmware = 0x%s;\n\ + \n\ + TOC_OFFSET = TOC_OFFSET_%s;\n\ + HV_START_OFFSET = HV_START_OFFSET_%s;\n\ + HTAB_OFFSET = HTAB_OFFSET_%s;\n\ + SYSCALL_TABLE_OFFSET = SYSCALL_TABLE_%s;\n\ + MMAP_OFFSET1 = MMAP_OFFSET1_%s;\n\ + MMAP_OFFSET2 = MMAP_OFFSET2_%s;\n\ + SPE_OFFSET = SPE_OFFSET_%s;\n\ + OFFSET_1_IDPS = OFFSET_1_IDPS_%s;\n\ + OFFSET_2_IDPS = OFFSET_2_IDPS_%s;\n\ + \n\ + payload_size = payload_%s_bin_size;\n\ + payload = (u64 *) payload_%s_bin;\n\ + } else", ent->d_name, ent->d_name, ent->d_name, ent->d_name, ent->d_name, ent->d_name, ent->d_name, ent->d_name, + ent->d_name, ent->d_name, ent->d_name, ent->d_name, ent->d_name, ent->d_name, ent->d_name, ent->d_name); + + fputs(temp, IDPSET_firmware_c); sprintf(temp, "\n\ if(( lv2peek(FW_DATE_OFFSET_%s )==FW_DATE_1_%s) &&\n\ @@ -1582,7 +1653,7 @@ u8 init_fw()\n\ u8 prx_get_module_list_symbol_flag[] = {0xF8, 0x21, 0xFF, 0x51, 0x7C, 0x08, 0x02, 0xA6, 0xFB, 0x01, 0x00, 0x70, 0xFB, 0x21, 0x00, 0x78, 0xFB, 0x41, 0x00, 0x80, 0xFB, 0x61, 0x00, 0x88, 0xFB, 0x81, 0x00, 0x90, 0xFB, 0xA1, 0x00, 0x98, 0x7C, 0xF9, 0x3B, 0x78, 0x7D, 0x18, 0x43, 0x78, 0x7C, 0xDA, 0x33, 0x78, 0x7C, 0x7D, 0x1B, 0x78}; u8 extend_kstack_symbol_flag[] = {0x7C, 0x08, 0x02, 0xA6, 0xFB, 0x81, 0x00, 0x70, 0xF8, 0x01, 0x00, 0xA0, 0xFB, 0xA1, 0x00, 0x78, 0x7C, 0x7D, 0x1B, 0x78}; u8 get_pseudo_random_number_symbol_flag[] = {0x7C, 0x85, 0x23, 0x78, 0x7C, 0x04, 0x03, 0x78, 0x48, 0x00, 0x04, 0x04, 0x48, 0x00, 0x01, 0xE4, 0xF8, 0x21, 0xFF, 0x71, 0x7C, 0x08, 0x02, 0xA6, 0xFB, 0x81, 0x00, 0x70, 0xFB, 0xC1, 0x00, 0x80}; - u8 syscall_call_offset_flag[] = {0x4E, 0x80, 0x00, 0x21, 0x38, 0x21, 0x00, 0x70, 0xF8, 0x21, 0xFF, 0xB1, 0xF8, 0x61, 0x00, 0x08, 0xF8, 0x81, 0x00, 0x10, 0xF8, 0xA1, 0x00, 0x18, 0xF8, 0xC1, 0x00, 0x20, 0xF8, 0xE1, 0x00, 0x28}; + u8 syscall_call_offset_flag[] = {0xFF, 0xFF, 0xFF, 0xFF, 0x38, 0x21, 0x00, 0x70, 0xF8, 0x21, 0xFF, 0xB1, 0xF8, 0x61, 0x00, 0x08, 0xF8, 0x81, 0x00, 0x10, 0xF8, 0xA1, 0x00, 0x18, 0xF8, 0xC1, 0x00, 0x20, 0xF8, 0xE1, 0x00, 0x28}; u8 read_bdvd0_symbol_flag[] = {0x7C, 0x08, 0x02, 0xA6, 0xFB, 0x01, 0x01, 0x10, 0x7C, 0x78, 0x1B, 0x78, 0xF8, 0x01, 0x01, 0x60, 0xF9, 0xC1, 0x00, 0xC0, 0xFB, 0xC1, 0x01, 0x40, 0x7C, 0x8E, 0x23, 0x78}; u8 read_bdvd1_symbol_flag[] = {0x7C, 0x08, 0x02, 0xA6, 0xFB, 0x81, 0x00, 0xB0, 0xF8, 0x01, 0x00, 0xE0, 0xEB, 0x83, 0x00, 0x20, 0x7C, 0xA0, 0x2B, 0x78, 0xFA, 0xE1, 0x00, 0x88, 0x2F, 0xBC, 0x00, 0x00}; u8 read_bdvd2_symbol_flag[] = {0x7C, 0x08, 0x02, 0xA6, 0xFB, 0xE1, 0x00, 0xA8, 0xF8, 0x01, 0x00, 0xC0, 0x7C, 0x7F, 0x1B, 0x78, 0xE8, 0x63, 0x00, 0x90, 0xFB, 0x61, 0x00, 0x88, 0xFB, 0x81, 0x00, 0x90}; @@ -2169,29 +2240,29 @@ u8 init_fw()\n\ char str[255]; - fputs("\n", IDPSet); - sprintf(str, "#define HTAB_OFFSET_%lld%c 0x%06llX\n", FIRMWARE, D, HTAB_OFFSET); fputs(str, IDPSet); - sprintf(str, "#define MMAP_OFFSET1_%lld%c 0x%06llX\n", FIRMWARE, D, MMAP_OFFSET1); fputs(str, IDPSet); - sprintf(str, "#define MMAP_OFFSET2_%lld%c 0x%06llX\n", FIRMWARE, D, MMAP_OFFSET2); fputs(str, IDPSet); - sprintf(str, "#define SPE_OFFSET_%lld%c 0x%06llX\n", FIRMWARE, D, SPE_OFFSET); fputs(str, IDPSet); - sprintf(str, "#define HV_START_OFFSET_%lld%c 0x%06llX\n", FIRMWARE, D, HV_START_OFFSET); fputs(str, IDPSet); - sprintf(str, "#define TOC_OFFSET_%lld%c 0x%llXULL\n", FIRMWARE, D, 0x8000000000000000ULL + TOC); fputs(str, IDPSet); - sprintf(str, "#define SYSCALL_TABLE_%lld%c 0x%llXULL\n", FIRMWARE, D, SYSCALL_TABLE); fputs(str, IDPSet); - sprintf(str, "#define FW_DATE_OFFSET_%lld%c 0x%llXULL\n", FIRMWARE, D, FW_DATE_OFFSET); fputs(str, IDPSet); - sprintf(str, "#define FW_DATE_1_%lld%c 0x%llXULL\n", FIRMWARE, D, FW_DATE_1); fputs(str, IDPSet); - sprintf(str, "#define FW_DATE_2_%lld%c 0x%llXULL\n", FIRMWARE, D, FW_DATE_2); fputs(str, IDPSet); - sprintf(str, "#define OFFSET_1_IDPS_%lld%c 0x%llXULL\n", FIRMWARE, D, OFFSET_1_IDPS); fputs(str, IDPSet); - sprintf(str, "#define OFFSET_2_IDPS_%lld%c 0x%llXULL\n", FIRMWARE, D, OFFSET_2_IDPS); fputs(str, IDPSet); - - sprintf(str, "#ifdef FIRMWARE_%lld%c\n", FIRMWARE, D); fputs(str, ERK); - sprintf(str, "\t#define KERNEL_TOC 0x%06llX\n", TOC); fputs(str, ERK); - sprintf(str, "\t#define KERNEL_SYMBOL_EXTEND_KSTACK 0x%06llX\n", extend_kstack_symbol); fputs(str, ERK); - sprintf(str, "\t#define KERNEL_SYMBOL_COPY_TO_USER 0x%06llX\n", copy_to_user_symbol); fputs(str, ERK); - sprintf(str, "\t#define KERNEL_SYMBOL_MEMSET 0x%06llX\n", memset_symbol); fputs(str, ERK); - sprintf(str, "\t#define KERNEL_SYMBOL_MEMCPY 0x%06llX\n", memcpy_symbol); fputs(str, ERK); - sprintf(str, "\t#define GAMEOS_LPAR_BASE_PTR 0x%llXULL\n", LPAR); fputs(str, ERK); - sprintf(str, "\t#define GAMEOS_LPAR_SIZE_PTR 0x%llXULL\n", LPAR+8); fputs(str, ERK); - fputs("#endif\n\n", ERK); + fputs("\n", IDPSET_firmware_h); + sprintf(str, "#define HTAB_OFFSET_%lld%c 0x%06llX\n", FIRMWARE, D, HTAB_OFFSET); fputs(str, IDPSET_firmware_h); + sprintf(str, "#define MMAP_OFFSET1_%lld%c 0x%06llX\n", FIRMWARE, D, MMAP_OFFSET1); fputs(str, IDPSET_firmware_h); + sprintf(str, "#define MMAP_OFFSET2_%lld%c 0x%06llX\n", FIRMWARE, D, MMAP_OFFSET2); fputs(str, IDPSET_firmware_h); + sprintf(str, "#define SPE_OFFSET_%lld%c 0x%06llX\n", FIRMWARE, D, SPE_OFFSET); fputs(str, IDPSET_firmware_h); + sprintf(str, "#define HV_START_OFFSET_%lld%c 0x%06llX\n", FIRMWARE, D, HV_START_OFFSET); fputs(str, IDPSET_firmware_h); + sprintf(str, "#define TOC_OFFSET_%lld%c 0x%llXULL\n", FIRMWARE, D, 0x8000000000000000ULL + TOC); fputs(str, IDPSET_firmware_h); + sprintf(str, "#define SYSCALL_TABLE_%lld%c 0x%llXULL\n", FIRMWARE, D, SYSCALL_TABLE); fputs(str, IDPSET_firmware_h); + sprintf(str, "#define FW_DATE_OFFSET_%lld%c 0x%llXULL\n", FIRMWARE, D, FW_DATE_OFFSET); fputs(str, IDPSET_firmware_h); + sprintf(str, "#define FW_DATE_1_%lld%c 0x%llXULL\n", FIRMWARE, D, FW_DATE_1); fputs(str, IDPSET_firmware_h); + sprintf(str, "#define FW_DATE_2_%lld%c 0x%llXULL\n", FIRMWARE, D, FW_DATE_2); fputs(str, IDPSET_firmware_h); + sprintf(str, "#define OFFSET_1_IDPS_%lld%c 0x%llXULL\n", FIRMWARE, D, OFFSET_1_IDPS); fputs(str, IDPSET_firmware_h); + sprintf(str, "#define OFFSET_2_IDPS_%lld%c 0x%llXULL\n", FIRMWARE, D, OFFSET_2_IDPS); fputs(str, IDPSET_firmware_h); + + sprintf(str, "#ifdef FIRMWARE_%lld%c\n", FIRMWARE, D); fputs(str, IDPSET_symbols_h); + sprintf(str, "\t#define KERNEL_TOC 0x%06llX\n", TOC); fputs(str, IDPSET_symbols_h); + sprintf(str, "\t#define KERNEL_SYMBOL_EXTEND_KSTACK 0x%06llX\n", extend_kstack_symbol); fputs(str, IDPSET_symbols_h); + sprintf(str, "\t#define KERNEL_SYMBOL_COPY_TO_USER 0x%06llX\n", copy_to_user_symbol); fputs(str, IDPSET_symbols_h); + sprintf(str, "\t#define KERNEL_SYMBOL_MEMSET 0x%06llX\n", memset_symbol); fputs(str, IDPSET_symbols_h); + sprintf(str, "\t#define KERNEL_SYMBOL_MEMCPY 0x%06llX\n", memcpy_symbol); fputs(str, IDPSET_symbols_h); + sprintf(str, "\t#define GAMEOS_LPAR_BASE_PTR 0x%llXULL\n", LPAR); fputs(str, IDPSET_symbols_h); + sprintf(str, "\t#define GAMEOS_LPAR_SIZE_PTR 0x%llXULL\n", LPAR+8); fputs(str, IDPSET_symbols_h); + fputs("#endif\n\n", IDPSET_symbols_h); fputs("\n", common); sprintf(str, "#define SYSCALL_TABLE_%lld%c 0x%llXULL\n", FIRMWARE, D, SYSCALL_TABLE); fputs(str, common); @@ -3467,7 +3538,7 @@ u8 init_fw()\n\ fputs("#endif\n\n", symbols); } - + fputs(" {return FAILED;}\n\ \n\ NEW_POKE_SYSCALL_ADDR = lv2peek( lv2peek(SYSCALL_TABLE + NEW_POKE_SYSCALL*8) ) + 0ULL;\n\ @@ -3476,10 +3547,50 @@ u8 init_fw()\n\ return SUCCESS;\n\ }\n", fwc); + fputs("\n\ + {\n\ + u64 n;\n\ + for(n=0x350000; n<0x4A0000; n++) {\n\ + u64 data = lv2peek(0x8000000000000000ULL + n);\n\ + \n\ + if(0x350000 < n && n <0x450000) {\n\ + if(OFFSET_1_IDPS == 0) {\n\ + if(0x0000000100800000 < data && data <0x0000000100900000)\n\ + {\n\ + OFFSET_1_IDPS = 0x8000000000000000ULL + n;\n\ + }\n\ + }\n\ + }\n\ + if(0x450000 < n && n <0x4A0000) {\n\ + if(OFFSET_2_IDPS == 0) {\n\ + if(0x0000000100800000 < data && data <0x0000000100900000)\n\ + {\n\ + OFFSET_2_IDPS = 0x8000000000000000ULL + n;\n\ + }\n\ + }\n\ + }\n\ + if(OFFSET_1_IDPS != 0)\n\ + if(OFFSET_2_IDPS != 0) break;\n\ + }\n\ + if(OFFSET_1_IDPS == 0 || OFFSET_2_IDPS == 0) return FAILED;\n\ + }\n\ + \n\ + rebug = fw_is_rebug();\n\ + \n\ + sysFSStat st;\n\ + if(sysLv2FsStat(\"/dev_hdd0/tmp\", &st) != 0) {\n\ + sysLv2FsMkdir(\"/dev_hdd0/tmp\", 0777);\n\ + }\n\ + sysLv2FsChmod(\"/dev_hdd0/tmp\", 0777);\n\ + \n\ + return SUCCESS;\n\ +}\n", IDPSET_firmware_c); + fputs("\n#endif /* __FIRMWARE_SYMBOLS_H_S__ */\n", symbols); fputs("\n#endif /* __COMMON_H__ */\n", common); - fputs("\n#endif /* __FIRMWARE_H__ */\n", IDPSet); - fputs("\n#endif /* __SYMBOLS_H__ */\n", ERK); + fputs("\n#endif /* __FIRMWARE_H__ */\n", IDPSET_firmware_h); + fputs("\n#endif /* __SYMBOLS_H__ */\n", IDPSET_symbols_h); + fputs("\n#endif /* __DATA_H__ */\n", IDPSET_data_h); fputs("\n#endif /* __DATA_H__ */\n", data); fputs("\n", fw); @@ -3487,7 +3598,10 @@ u8 init_fw()\n\ fclose(fwc); fclose(data); fclose(fw); - fclose(IDPSet); + fclose(IDPSET_symbols_h); + fclose(IDPSET_firmware_h); + fclose(IDPSET_firmware_c); + fclose(IDPSET_data_h); fclose(common); fclose(SKY); fclose(symbols); @@ -3889,8 +4003,20 @@ int main(int argc, char **argv) ExtractAll_DevFlash(); } } else + if(strcmp(argv[1], "idpset")==0) { + SearchOffsets(); + + if(exist("../../IDPSet")) { + force_rename("IDPSET_symbols.h", "../../IDPSet/payload/source/symbols.h"); + force_rename("IDPSET_firmware.h", "../../IDPSet/source/firmware.h"); + force_rename("IDPSET_firmware.c", "../../IDPSet/source/firmware.c"); + force_rename("IDPSET_data.h", "../../IDPSet/source/data.h"); + force_rename("FIRMWARES", "../../IDPSet/payload/source/FIRMWARES"); + } + + } else if(strcmp(argv[1], "test")==0) { - //.. + //... } else print_help(); printf("Done !\n"); diff --git a/payloads/FIRMWARES b/payloads/FIRMWARES index fd624dd7..c88fe741 100644 --- a/payloads/FIRMWARES +++ b/payloads/FIRMWARES @@ -1,3 +1,3 @@ -PAYLOADS :=421C 421D 430C 430D 431C 440C 441C 441D 446C 446D 450C 450D 453C 453D 455C 455D 460C 465C 465D 470C 470D 475C 475D 476C 476D 478C 478D 480C 480D 481C 481D 482C 482D 483C 484C 484D +PAYLOADS :=421C 421D 430C 430D 431C 440C 441C 441D 446C 446D 450C 450D 453C 453D 455C 455D 460C 465C 465D 470C 470D 475C 475D 476C 476D 478C 478D 480C 480D 481C 481D 482C 482D 483C 484C 484D 485C -PS2_PAYLOADS := 421C 421D 425C 425D 430C 430D 431C 431D 440C 440D 441C 441D 446C 446D 450C 450D 453C 453D 455C 455D 460C 460D 465C 465D 466C 470C 470D 475C 475D 476C 476D 478C 478D 480C 480D 481C 481D 482C 483C 484C 484D +PS2_PAYLOADS := 421C 421D 425C 425D 430C 430D 431C 431D 440C 440D 441C 441D 446C 446D 450C 450D 453C 453D 455C 455D 460C 460D 465C 465D 466C 470C 470D 475C 475D 476C 476D 478C 478D 480C 480D 481C 481D 482C 483C 484C 484D 485C diff --git a/payloads/MAMBA/lv2/include/lv2/symbols.h b/payloads/MAMBA/lv2/include/lv2/symbols.h index 4ce7916a..bf9686c0 100644 --- a/payloads/MAMBA/lv2/include/lv2/symbols.h +++ b/payloads/MAMBA/lv2/include/lv2/symbols.h @@ -8021,5 +8021,209 @@ #define cex_psp_extra_drm_patch 0x245AF0 #endif +#ifdef FIRMWARE_485C + + #define FIRMWARE_VERSION 0x485 + + #ifdef PS3M_API + #define PS3MAPI_FW_VERSION 0x485 + #define PS3MAPI_FW_TYPE "CEX MAMBA" + #define PS3MAPI_IDPS_1 0x80000000003E2E30ULL + #define PS3MAPI_IDPS_2 0x8000000000474AF4ULL + #define PS3MAPI_PSID 0x8000000000474B0CULL + #endif + + /* lv2 */ + #define TOC 0x34FBB0 + #define open_shared_kernel_object_symbol 0x12410 + #define close_kernel_object_handle_symbol 0x11A30 + #define open_kernel_object_symbol 0x12600 + #define alloc_symbol 0x64824 + #define dealloc_symbol 0x64C60 + #define copy_to_user_symbol 0xF86C + #define copy_from_user_symbol 0xFA88 + #define copy_to_process_symbol 0xF924 + #define copy_from_process_symbol 0xF734 + #define page_allocate_symbol 0x60394 + #define page_free_symbol 0x5FDF8 + #define page_export_to_proc_symbol 0x60530 + #define page_unexport_from_proc_symbol 0x5FCEC + #define kernel_ea_to_lpar_addr_symbol 0x7014C + #define map_process_memory_symbol 0x7726C + #define memcpy_symbol 0x7E92C + #define memset_symbol 0x4D66C + #define memcmp_symbol 0x4C97C + #define printf_symbol 0x2706AC + #define printfnull_symbol 0x275120 + #define sprintf_symbol 0x4EA94 + #define snprintf_symbol 0x4EA00 + #define strcpy_symbol 0x4D818 + #define strncpy_symbol 0x4D8E0 + #define strlen_symbol 0x4D840 + #define strcat_symbol 0x4D748 + #define strcmp_symbol 0x4D7C4 + #define strncmp_symbol 0x4D86C + #define strchr_symbol 0x4D780 + #define spin_lock_irqsave_ex_symbol 0x26D798 + #define spin_unlock_irqrestore_ex_symbol 0x26D76C + #define load_process_symbol 0x5004 + #define ppu_thread_create_symbol 0x13EC8 + #define ppu_thread_exit_symbol 0x13F80 + #define ppu_thread_join_symbol 0x13FD4 + #define ppu_thread_delay_symbol 0x287A4 + #define create_user_thread2_symbol 0x25080 + #define start_thread_symbol 0x23D4C + #define run_thread_symbol 0x2357C + #define register_thread_symbol 0x26794C + #define allocate_user_stack_symbol 0x268134 + #define mutex_create_symbol 0x1363C + #define mutex_destroy_symbol 0x135D4 + #define mutex_lock_symbol 0x135CC + #define mutex_unlock_symbol 0x135C4 + #define event_port_create_symbol 0x13078 + #define event_port_destroy_symbol 0x134E0 + #define event_port_connect_symbol 0x13558 + #define event_port_disconnect_symbol 0x13484 + #define event_port_send_symbol 0x13070 + #define event_queue_create_symbol 0x13380 + #define event_queue_destroy_symbol 0x13308 + #define event_queue_receive_symbol 0x1314C + #define cellFsOpen_symbol 0x297900 + #define cellFsClose_symbol 0x297768 + #define cellFsRead_symbol 0x2978A4 + #define cellFsWrite_symbol 0x297810 + #define cellFsLseek_symbol 0x296E98 + #define cellFsStat_symbol 0x29711C + #define cellFsUnlink_internal_symbol 0x19C64C + #define cellFsUtilMount_symbol 0x296C78 + #define cellFsUtilUmount_symbol 0x296C4C + #define pathdup_from_user_symbol 0x29C8E4 + #define open_path_symbol 0x297638 + #define open_fs_object_symbol 0x18A970 + #define close_fs_object_symbol 0x1898AC + #define storage_get_device_info_symbol 0x279B00 + #define storage_open_symbol 0x279510 + #define storage_close_symbol 0x279300 + #define storage_read_symbol 0x278870 + #define storage_send_device_command_symbol 0x2783FC + #define storage_map_io_memory_symbol 0x2799BC + #define storage_unmap_io_memory_symbol 0x279888 + #define storage_internal_get_device_object_symbol 0x277EB4 + #define decrypt_func_symbol 0x34970 + #define lv1_call_99_wrapper_symbol 0x4EEA8 + #define modules_verification_symbol 0x58AB8 + #define prx_load_module_symbol 0x88C04 + #define prx_start_module_symbol 0x878D0 + #define prx_stop_module_symbol 0x88CA8 + #define prx_unload_module_symbol 0x87604 + #define prx_get_module_info_symbol 0x8708C + #define prx_get_module_list_symbol 0x8710C + #define extend_kstack_symbol 0x700A4 + #define get_pseudo_random_number_symbol 0x228180 + #define syscall_table_symbol 0x363BE0 + #define syscall_call_offset 0x275C04 + #define read_bdvd0_symbol 0x1A461C + #define read_bdvd1_symbol 0x1A6248 + #define read_bdvd2_symbol 0x1B3400 + #define device_event_port_send_call 0x28206C + #define process_map_caller_call 0x4D24 + #define fsloop_open_call 0x297A98 + #define fsloop_close_call 0x297AE8 + #define fsloop_read_call 0x297B28 + #define io_rtoc_entry_1 0x25B8 + #define io_sub_rtoc_entry_1 -0x7EA0 + #define decrypt_rtoc_entry_2 -0x66A0 + #define storage_rtoc_entry_1 0x1DD8 + #define device_event_rtoc_entry_1 0x2048 + #define process_rtoc_entry_1 -0x7800 + #define patch_func2 0x59D84 + #define patch_func2_offset 0x2C + #define user_thread_prio_patch 0x203FC + #define user_thread_prio_patch2 0x20408 + #define shutdown_patch_offset 0xAAB8 + #define shutdown_copy_params_call 0xAACC + + /* hash */ + #define EXPLORE_PLUGIN_HASH 0xACF4AF2B000EC482 + #define EXPLORE_CATEGORY_GAME_HASH 0x9CB378E600056AE5 + #define GAME_EXT_PLUGIN_HASH 0xE274AF7B0001E594 + #define LIBFS_EXTERNAL_HASH 0x5BC7BCE800006477 + #define PSP_EMULATOR_HASH 0x7BE641F500023794 + #define PEMUCORELIB_HASH 0xF349A563000C0D66 + #define EMULATOR_API_HASH 0xA9F5B37A0001BB45 + #define EMULATOR_DRM_HASH 0xA324DC4A00005399 + #define EMULATOR_DRM_DATA_HASH 0x75C390860001B75F + #define LIBSYSUTIL_SAVEDATA_PSP_HASH 0x57BBC3B800003212 + + /* lv1 */ + #define vsh_pos_in_ram 0x910000 + + /* vsh */ + #define ps2tonet_patch 0xC4E34 + #define ps2tonet_size_patch 0xC4E28 + #define vmode_patch_offset 0x4431DC + #define psp_drm_patch1 0x242FC0 + #define psp_drm_patch2 0x243A60 + #define psp_drm_patch3 0x24369C + #define psp_drm_patch4 0x243EA8 + #define psp_drm_patchA 0x2430DC + #define psp_drm_patchB 0x24397C + #define psp_drm_patchC 0x242B14 + #define psp_drm_patchD 0x2430C4 + #define psp_drm_patchE 0x2430C8 + #define psp_drm_patchF 0x243A94 + #define psp_extra_drm_patch 0x245AF0 + + /* explore_plugin */ + #define ps2_nonbw_offset 0xDD9B4 + + /* explore_category_game */ + #define ps2_nonbw_offset2 0x68324 + + /* game_ext_plugin */ + #define ps2_nonbw_offset3 0x17000 + + /* psp_emulator */ + #define psp_set_psp_mode_offset 0x1C18 + + /* emulator_api */ + #define psp_read 0x102D8 + #define psp_read_header 0x1125C + #define psp_drm_patch5 0x11080 + #define psp_drm_patch6 0x110B0 + #define psp_drm_patch7 0x110C8 + #define psp_drm_patch8 0x110CC + #define psp_drm_patch9 0x1120C + #define psp_drm_patch11 0x11210 + #define psp_drm_patch12 0x11220 + #define psp_product_id_patch1 0x11320 + #define psp_product_id_patch3 0x115F8 + + /* pemucorelib */ + #define psp_eboot_dec_patch 0x5E6BC + #define psp_prx_patch 0x577D8 + #define psp_savedata_bind_patch1 0x7A4BC + #define psp_savedata_bind_patch2 0x7A514 + #define psp_savedata_bind_patch3 0x7A030 + #define psp_extra_savedata_patch 0x87540 + #define psp_prometheus_patch 0x12EA28 + #define prx_patch_call_lr 0x5892C + + /* emulator_drm */ + #define psp_drm_tag_overwrite 0x4C68 + #define psp_drm_key_overwrite (0x27600 - 0xBE80) + + /* libsysutil_savedata_psp */ + #define psp_savedata_patch1 0x46CC + #define psp_savedata_patch2 0x46A4 + #define psp_savedata_patch3 0x4504 + #define psp_savedata_patch4 0x453C + #define psp_savedata_patch5 0x4550 + #define psp_savedata_patch6 0x46B8 + + /* libfs */ + #define aio_copy_root_offset 0xD658 +#endif + #endif /* __FIRMWARE_SYMBOLS_H_S__ */ diff --git a/payloads/PS2_EMU/ps2emu/include/ps2emu/symbols.h b/payloads/PS2_EMU/ps2emu/include/ps2emu/symbols.h index ba8a81b4..34130600 100644 --- a/payloads/PS2_EMU/ps2emu/include/ps2emu/symbols.h +++ b/payloads/PS2_EMU/ps2emu/include/ps2emu/symbols.h @@ -1115,6 +1115,33 @@ #define stage2_addr 0x021f0000 #endif /* FIRMWARE */ + #ifdef FIRMWARE_485C + #define TOC 0x4EB8C0 + #define DISC_SIZE_OFFSET 0x25714 + #define DISC_TYPE_OFFSET 0x25310 + #define cdvd_send_atapi_command_symbol 0x22138 + #define ufs_open_symbol 0x4E0A8 + #define ufs_close_symbol 0x4E834 + #define ufs_read_symbol 0x4DB78 + #define ufs_write_symbol 0x4DC6C + #define ufs_fstat_symbol 0x4EB38 + #define zeroalloc_symbol 0xFDFEC + #define malloc_symbol 0xFDF04 + #define free_symbol 0xFE044 + #define memcpy_symbol 0xDFAC + #define memset_symbol 0xD488 + #define strcpy_symbol 0xED04 + #define strcat_symbol 0xEED0 + #define strlen_symbol 0xECD8 + #define vuart_read_symbol 0x1E42C + #define vuart_write_symbol 0x1E37C + #define ps2_disc_auth_symbol 0x206B0 + #define ps2_disc_auth_caller_symbol 0x512F8 + #define overwritten_symbol 0x23D6C + #define stage1_addr overwritten_symbol + #define stage2_addr 0x021f0000 + #endif /* FIRMWARE */ + #endif /* PS2HWEMU */ #ifdef PS2GXEMU @@ -2230,6 +2257,33 @@ #define stage2_addr 0x2BBAB28 #endif /* FIRMWARE */ + #ifdef FIRMWARE_485C + #define TOC 0x678548 + #define cdvd_read_symbol 0x8E4AC + #define cdvd_send_atapi_command_symbol 0x8DA80 + #define cdvd_send_device_command_symbol 0x8D994 + #define ufs_open_symbol 0x24EBB0 + #define ufs_close_symbol 0x24F358 + #define ufs_read_symbol 0x24E8C0 + #define ufs_write_symbol 0x24EA38 + #define ufs_fstat_symbol 0x24E700 + #define zeroalloc_symbol 0x1E48EC + #define malloc_symbol 0x1E488C + #define free_symbol 0x1E4938 + #define memcpy_symbol 0x514BC + #define memset_symbol 0x51528 + #define strcpy_symbol 0x51600 + #define strcat_symbol 0x51634 + #define strlen_symbol 0x515C8 + #define vuart_read_symbol 0x49544 + #define vuart_write_symbol 0x494A4 + #define ps2_disc_auth_symbol 0x900FC + #define ps2_disc_auth_caller_symbol 0x24F95C + #define overwritten_symbol 0x8CAD8 + #define stage1_addr overwritten_symbol + #define stage2_addr 0x2BBAB28 + #endif /* FIRMWARE */ + #endif /* PS2GXEMU */ #ifdef PS2NETEMU @@ -2892,6 +2946,22 @@ #define decrypt_symbol cdvd_read_symbol #endif /* FIRMWARE */ + #ifdef FIRMWARE_485C + #define TOC 0x751280 + #define cdvd_read_symbol 0x1377C4 + #define ufs_open_symbol 0x1ECC5C + #define ufs_close_symbol 0x1ECB10 + #define ufs_read_symbol 0x1ED5CC + #define ufs_write_symbol 0x1ED458 + #define ufs_fstat_symbol 0x1EC760 + #define memcpy_symbol 0x118A90 + #define memset_symbol 0x118A3C + #define strcpy_symbol 0x1188DC + #define strcat_symbol 0x118914 + #define strlen_symbol 0x1188A4 + #define decrypt_symbol cdvd_read_symbol + #endif /* FIRMWARE */ + #endif /* PS2NETEMU */ diff --git a/payloads/SKY/firmware_symbols.h b/payloads/SKY/firmware_symbols.h index 1369f43b..bb719446 100644 --- a/payloads/SKY/firmware_symbols.h +++ b/payloads/SKY/firmware_symbols.h @@ -258,3 +258,10 @@ #define memcpy 0x82A08 #define memset 0x51014 #endif + +#ifdef CFW_485C +#define alloc 0x64824 +#define memory_patch_func 0x297660 +#define memcpy 0x7E92C +#define memset 0x4D66C +#endif diff --git a/pkgfiles/USRDIR/sys/data/keys b/pkgfiles/USRDIR/sys/data/keys index 626dbda4..617f193b 100644 --- a/pkgfiles/USRDIR/sys/data/keys +++ b/pkgfiles/USRDIR/sys/data/keys @@ -5098,3 +5098,155 @@ riv=FD40664E2EBBA01BF359B0DCDF543DA4 pub=36C1ACE6DD5CCC0006FDF3424750FAC515FC5CFA2C93EC53C6EC2BC421708D154E91F2E7EA54A893 priv=0010818ED8A666051C6198662C3D6DDE2CA4901DDC ctype=09 + + +[spp] +type=SPP +revision=00 +version=0004008500000000 +erk=D2961BBFFEDAEE269B061454D6ACF262CD71BC6F5320180F0A04A07583CCF7C5 +riv=6D308B59BC9054B12C833359D31BAE77 +pub=0CDD0D1541A6B0DFD12E951578536CA60C93853B88FCE17592DC8D134B08A94AF8BB08667E2D70A5 +priv=0001608EF3BACAFFB8C3A5958A24F758325B62B08C +ctype=07 + + +[metldr] +type=SELF +revision=00 +self_type=LDR +version=0004008500000000 +erk=C0CEFE84C227F75BD07A7EB846509F93B238E770DACB9FF4A388F812482BE21B +riv=47EE7454E4774CC9B8960C7B59F4C14D +pub=C2D4AAF319355019AF99D44E2B58CA29252C89123D11D6218F40B138CAB29B7101F3AEB72A975019 +priv=00C5B2BFA1A413DD16F26D31C0F2ED4720DCFB0670 +ctype=20 + + +[rvk] +type=RVK +revision=02 +version=0004008500000000 +erk=695984B7EE2EC2F77FCC3120150DCE7E4480D84480DDD8C5940AEB6F79E63D17 +riv=A8BA3E4E63B2BB06FC0CE57E3BB8FC46 +pub=7F1950C6E497E922400586EE338B41E01C906C5A6DFD75FEB5249CFA4BEC534F5CA679670A452B2A +priv=00245E673B039D656DA206BDAE4EAEFCBF2A8D5EAF +ctype=12 + + +[isoldr] +type=SELF +revision=01 +version=0004008500000000 +self_type=ISO +erk=63565DBE98C3B1A52AADC907C47130FE57A10734E84F22592670F86ED2B0A086 +riv=953F6A99891B4739358F5363A00C08B9 +pub=26BE7B02E7D65C6C21BF4063CDB8C0092FE1679D62FA1A8CCC284A1D21885473A959992537A06612 +priv=00294411363290975BA551336D3965D88AF029A17B +ctype=15 + + +[isoldr] +type=SELF +revision=0100 +version=0004008500000000 +self_type=ISO +erk=B96EA32CB96EA32DB96EA32CB96EA32CB96EA32CB96EA32DB96EA32CB96EA32C +riv=B96EA32CB96EA32DB96EA32DB96EA32C +pub=2D7066E68C6AC3373B1346FD76FE7D18A207C811500E65D85DB57BC4A27AD78F59FD53F38F50E151 +priv=00294411363290975BA551336D3965D88AF029A17B +ctype=02 + + +[lv0ldr] +type=SELF +version=0004008500000000 +self_type=LV0 +erk=CA7A24EC38BDB45B98CCD7D363EA2AF0C326E65081E0630CB9AB2D215865878A +riv=F9205F46F6021697E670F13DFA726212 +pub=A8FD6DB24532D094EFA08CB41C9A72287D905C6B27B42BE4AB925AAF4AFFF34D41EEB54DD128700D +priv=001AD976FCDE86F5B8FF3E63EF3A7F94E861975BA3 +ctype=33 + + +[lv1ldr] +type=SELF +revision=0000 +version=0004008500000000 +self_type=LV1 +erk=10CEA04973FCCC12EC19924510822D8D4C41F657FD3D7E73F415A8D687421BCD +riv=ED8699562C6AC65204FA166257E7FCF4 +pub=085D38DBF9B757329EB862107929909D32FA1DAE60641BF4AC25319D7650597EE977F8E810FEEA96 +priv=004312C65347ACBE95CC306442FEFD0AF4C2935EB3 +ctype=14 + + +[lv2ldr] +type=SELF +revision=0000 +version=0004008500000000 +self_type=LV2 +erk=0CAF212B6FA53C0DA7E2C575ADF61DBE68F34A33433B1B891ABF5C4251406A03 +riv=9B79374722AD888EB6A35A2DF25A8B3E +pub=1034A6F98AF6625CC3E3604B59B971CA617DF337538D2179EBB22F3BDC9D0C6DA56BA7DDFD205A50 +priv=009D4CBA2BFB1A8330D3E20E59D281D476D231C73A +ctype=14 + + +[appldr] +type=SELF +revision=001D +version=0004008500000000 +self_type=APP +erk=D202174EB65A62048F3674B59EF6FE72E1872962F3E1CD658DE8D7AF71DA1F3E +riv=ACB9945914EBB7B9A31ECE320AE09F2D +pub=430322887503CF52928FAAA410FD623C7321281C8825D95F5B47EF078EFCFC44454C3AB4F00BB879 +priv=0010818ED8A666051C6198662C3D6DDE2CA4901DDC +ctype=1A + + +[appldr] +type=SELF +revision=001C np +version=0004008500000000 +self_type=NPDRM +erk=8103EA9DB790578219C4CEDF0592B43064A7D98B601B6C7BC45108C4047AA80F +riv=246F4B8328BE6A2D394EDE20479247C5 +pub=503172C9551308A87621ECEE90362D14889BFED2CF32B0B3E32A4F9FE527A41464B735E1ADBC6762 +priv=009EF86907782A318D4CC3617EBACE2480E73A46F6 +ctype=30 + + +[spkg] +type=PKG +revision=00 +version=0004008500000000 +erk=F8F99006F1C007D5D0B1909E9566E0E70B569399FC3394A811809FDB5CAE92CD +riv=59D28DB4ADDFB40B7D768BC9667C67B1 +pub=5432BDDD1F97418147AFF016EAA6100834F2CAA8C498B88965689EE44DF349B066CD43CBF4F2C5D0 +priv=00542D46E7B3DAAC8AEB81E533873AABD6D74BB710 +ctype=17 + + +[pkg] +type=PKG +revision=00 +version=0004008500000000 +erk=F8F99006F1C007D5D0B1909E9566E0E70B569399FC3394A811809FDB5CAE92CD +riv=59D28DB4ADDFB40B7D768BC9667C67B1 +pub=5432BDDD1F97418147AFF016EAA6100834F2CAA8C498B88965689EE44DF349B066CD43CBF4F2C5D0 +priv=00542D46E7B3DAAC8AEB81E533873AABD6D74BB710 +ctype=17 + + +[appldr] +type=SELF +revision=001C +version=0004008500000000 +self_type=APP +erk=CFF025375BA0079226BE01F4A31F346D79F62CFB643CA910E16CF60BD9092752 +riv=FD40664E2EBBA01BF359B0DCDF543DA4 +pub=36C1ACE6DD5CCC0006FDF3424750FAC515FC5CFA2C93EC53C6EC2BC421708D154E91F2E7EA54A893 +priv=0010818ED8A666051C6198662C3D6DDE2CA4901DDC +ctype=09 + diff --git a/pkgfiles/USRDIR/sys/loc/CN.txt b/pkgfiles/USRDIR/sys/loc/CN.txt index d78acc2c..85fc55f1 100644 --- a/pkgfiles/USRDIR/sys/loc/CN.txt +++ b/pkgfiles/USRDIR/sys/loc/CN.txt @@ -389,3 +389,6 @@ STR_FM_CUSTOM {Custom icons} STR_FM_CB_FILL {Fill} STR_EDIT_IDPS {Edit IDPS} STR_FILTER_NOGAME {No game found. Adjust your filters.} +STR_SYMLINK_SRC {SymLink source} +STR_SYMLINK_TARGET {SymLink target} +STR_LOAD_MAMBA {Load mamba} diff --git a/pkgfiles/USRDIR/sys/loc/EN.txt b/pkgfiles/USRDIR/sys/loc/EN.txt index 8f823ad8..09d89fcc 100644 --- a/pkgfiles/USRDIR/sys/loc/EN.txt +++ b/pkgfiles/USRDIR/sys/loc/EN.txt @@ -357,3 +357,6 @@ STR_FM_CUSTOM {Custom icons} STR_FM_CB_FILL {Fill} STR_EDIT_IDPS {Edit IDPS} STR_FILTER_NOGAME {No game found. Adjust your filters.} +STR_SYMLINK_SRC {SymLink source} +STR_SYMLINK_TARGET {SymLink target} +STR_LOAD_MAMBA {Load mamba} diff --git a/pkgfiles/USRDIR/sys/loc/ES.txt b/pkgfiles/USRDIR/sys/loc/ES.txt index 6860961b..206f6878 100644 --- a/pkgfiles/USRDIR/sys/loc/ES.txt +++ b/pkgfiles/USRDIR/sys/loc/ES.txt @@ -410,3 +410,6 @@ STR_FM_CUSTOM {Personalizados} STR_FM_CB_FILL {Todo el ancho} STR_EDIT_IDPS {Editar IDPS} STR_FILTER_NOGAME {No se han encontrado juegos. Comprueba tus filtros y las rutas de juegos.} +STR_SYMLINK_SRC {SymLink source} +STR_SYMLINK_TARGET {SymLink target} +STR_LOAD_MAMBA {Load mamba} diff --git a/pkgfiles/USRDIR/sys/loc/FR.txt b/pkgfiles/USRDIR/sys/loc/FR.txt index 92d07496..39fc24fa 100644 --- a/pkgfiles/USRDIR/sys/loc/FR.txt +++ b/pkgfiles/USRDIR/sys/loc/FR.txt @@ -357,3 +357,6 @@ STR_FM_CUSTOM {Icônes personalisées} STR_FM_CB_FILL {Remplir} STR_EDIT_IDPS {Modifier l'IDPS} STR_FILTER_NOGAME {Aucun jeux. Veuillez changer votre filtrage de jeux.} +STR_SYMLINK_SRC {SymLink source} +STR_SYMLINK_TARGET {SymLink target} +STR_LOAD_MAMBA {Load mamba} diff --git a/pkgfiles/USRDIR/sys/loc/HU.txt b/pkgfiles/USRDIR/sys/loc/HU.txt index 0d5fe591..8274bda9 100644 --- a/pkgfiles/USRDIR/sys/loc/HU.txt +++ b/pkgfiles/USRDIR/sys/loc/HU.txt @@ -357,3 +357,6 @@ STR_FM_CUSTOM {Custom icons} STR_FM_CB_FILL {Fill} STR_EDIT_IDPS {Edit IDPS} STR_FILTER_NOGAME {No games found. Adjust your filter.} +STR_SYMLINK_SRC {SymLink source} +STR_SYMLINK_TARGET {SymLink target} +STR_LOAD_MAMBA {Load mamba} diff --git a/pkgfiles/USRDIR/sys/loc/IT.txt b/pkgfiles/USRDIR/sys/loc/IT.txt index 4049a8b0..c00fea06 100644 --- a/pkgfiles/USRDIR/sys/loc/IT.txt +++ b/pkgfiles/USRDIR/sys/loc/IT.txt @@ -357,3 +357,6 @@ STR_FM_CUSTOM {Custom icons} STR_FM_CB_FILL {Fill} STR_EDIT_IDPS {Edit IDPS} STR_FILTER_NOGAME {No games found. Adjust your filter.} +STR_SYMLINK_SRC {SymLink source} +STR_SYMLINK_TARGET {SymLink target} +STR_LOAD_MAMBA {Load mamba} diff --git a/pkgfiles/USRDIR/sys/loc/NL.txt b/pkgfiles/USRDIR/sys/loc/NL.txt index ef7fe6b9..be4dc755 100644 --- a/pkgfiles/USRDIR/sys/loc/NL.txt +++ b/pkgfiles/USRDIR/sys/loc/NL.txt @@ -357,3 +357,6 @@ STR_FM_CUSTOM {Custom icons} STR_FM_CB_FILL {Fill} STR_EDIT_IDPS {Edit IDPS} STR_FILTER_NOGAME {No games found. Adjust your filter.} +STR_SYMLINK_SRC {SymLink source} +STR_SYMLINK_TARGET {SymLink target} +STR_LOAD_MAMBA {Load mamba} diff --git a/pkgfiles/USRDIR/sys/loc/PL.txt b/pkgfiles/USRDIR/sys/loc/PL.txt index 10dce7b2..ffc85dfe 100644 --- a/pkgfiles/USRDIR/sys/loc/PL.txt +++ b/pkgfiles/USRDIR/sys/loc/PL.txt @@ -357,3 +357,6 @@ STR_FM_CUSTOM {Niestandardowe ikony} STR_FM_CB_FILL {Wypełnienie} STR_EDIT_IDPS {Edit IDPS} STR_FILTER_NOGAME {No games found. Adjust your filter.} +STR_SYMLINK_SRC {SymLink source} +STR_SYMLINK_TARGET {SymLink target} +STR_LOAD_MAMBA {Load mamba} diff --git a/pkgfiles/USRDIR/sys/loc/RU.txt b/pkgfiles/USRDIR/sys/loc/RU.txt index 36246a97..ad72953a 100644 --- a/pkgfiles/USRDIR/sys/loc/RU.txt +++ b/pkgfiles/USRDIR/sys/loc/RU.txt @@ -357,3 +357,6 @@ STR_FM_CUSTOM {Custom icons} STR_FM_CB_FILL {Fill} STR_EDIT_IDPS {Edit IDPS} STR_FILTER_NOGAME {No games found. Adjust your filter.} +STR_SYMLINK_SRC {SymLink source} +STR_SYMLINK_TARGET {SymLink target} +STR_LOAD_MAMBA {Load mamba} diff --git a/pkgfiles/USRDIR/sys/loc/SE.txt b/pkgfiles/USRDIR/sys/loc/SE.txt index 65c43c76..d552b5b3 100644 --- a/pkgfiles/USRDIR/sys/loc/SE.txt +++ b/pkgfiles/USRDIR/sys/loc/SE.txt @@ -357,3 +357,6 @@ STR_FM_CUSTOM {Custom icons} STR_FM_CB_FILL {Fill} STR_EDIT_IDPS {Edit IDPS} STR_FILTER_NOGAME {No games found. Adjust your filter.} +STR_SYMLINK_SRC {SymLink source} +STR_SYMLINK_TARGET {SymLink target} +STR_LOAD_MAMBA {Load mamba} diff --git a/pkgfiles/USRDIR/sys/sprx_iso b/pkgfiles/USRDIR/sys/sprx_iso index ce2825c8..0b9dd83d 100644 Binary files a/pkgfiles/USRDIR/sys/sprx_iso and b/pkgfiles/USRDIR/sys/sprx_iso differ