From 4ddfef91d9f4e8000dc76d48ae325533e2426a81 Mon Sep 17 00:00:00 2001 From: Aldo Vargas Date: Sun, 18 Feb 2024 18:40:45 -0400 Subject: [PATCH] minor update --- _Projects_/prepISO/include/exfat.h | 16 ++++++------- _Projects_/prepISO/include/ntfs.h | 2 +- _Projects_/prepISO/include/scsi.h | 10 ++++----- _Projects_/prepISO/source/main.c | 12 +++++----- _Projects_/ps3netsrv/include/VIsoFile.h | 4 ++++ _Projects_/tools/PS3 Patches.txt | 30 +++++++++++++++---------- 6 files changed, 41 insertions(+), 33 deletions(-) diff --git a/_Projects_/prepISO/include/exfat.h b/_Projects_/prepISO/include/exfat.h index 698c6d72b..9c9d27b4c 100644 --- a/_Projects_/prepISO/include/exfat.h +++ b/_Projects_/prepISO/include/exfat.h @@ -22,7 +22,7 @@ void addlog(char *msg1, char *msg2) static int s_mode; // 0 = png/jpg/sfo, 1=iso/bin/img/mdf static void convert_dkey_to_key(uint8_t disckey[0x10], char dkey[0x20]) -{ +{ for (int i = 0; i < 0x10; i++) { char byte[3]; @@ -40,11 +40,11 @@ static int readfile_exfat(char *file, char *data, u64 size) UINT re; if (!f_open(&fd, file, FA_READ)) - { + { f_read(&fd, data, size, &re); f_close(&fd); return SUCCESS; - } + } return FAILED; } @@ -142,15 +142,15 @@ static int dir_read (char *dpath) snprintf(fn, 255, "%s/%s", dpath, fno.fname); snprintf(output, 255, "/dev_hdd0/tmp/wmtmp/%s", fno.fname); - // If the key exists, copy it to "/dev_hdd0/tmp/wmtmp" to + // If the key exists, copy it to "/dev_hdd0/tmp/wmtmp" to // decrypt on-the-fly with Cobra when the ISO is mounted (By Evilnat) if(strcasestr(ext, ".key")) copy_exfat(fn, output, 0x10); - - // If the dkey exists, we convert it to disckey and copy it to "/dev_hdd0/tmp/wmtmp" + + // If the dkey exists, we convert it to disckey and copy it to "/dev_hdd0/tmp/wmtmp" // to decrypt on-the-fly with Cobra when the ISO is mounted (By Evilnat) if(strcasestr(fno.fname + flen - 5, ".dkey")) - { + { if(!readfile_exfat(fn, dkey, 0x20)) { filename[strlen(filename) - 5] = '\0'; @@ -158,7 +158,7 @@ static int dir_read (char *dpath) convert_dkey_to_key(disckey, dkey); SaveFile(output, (char *)disckey, 0x10); - } + } } //--- is ISO? diff --git a/_Projects_/prepISO/include/ntfs.h b/_Projects_/prepISO/include/ntfs.h index ad99e11c1..bb30a1750 100644 --- a/_Projects_/prepISO/include/ntfs.h +++ b/_Projects_/prepISO/include/ntfs.h @@ -238,7 +238,7 @@ struct statvfs { unsigned long f_fsid; unsigned long f_flag; unsigned long f_namemax; -}; +}; #endif diff --git a/_Projects_/prepISO/include/scsi.h b/_Projects_/prepISO/include/scsi.h index 0f394f22e..8c79b3cf5 100644 --- a/_Projects_/prepISO/include/scsi.h +++ b/_Projects_/prepISO/include/scsi.h @@ -65,7 +65,7 @@ enum DvdBookType BOOKTYPE_DVDPRW = 9, BOOKTYPE_DVDPR, BOOKTYPE_DVDPRWDL = 13, - BOOKTYPE_DVDPRDL + BOOKTYPE_DVDPRDL }; typedef struct _ScsiCmdTestUnitReady @@ -75,7 +75,7 @@ typedef struct _ScsiCmdTestUnitReady uint8_t control; } __attribute__((packed)) ScsiCmdTestUnitReady; -enum +enum { FORMAT_TOC, FORMAT_SESSION_INFO, @@ -93,7 +93,7 @@ typedef struct _ScsiCmdReadTocPmaAtip uint8_t reserved[3]; uint8_t track_session_num; uint16_t alloc_length; - uint8_t control; + uint8_t control; } __attribute__((packed)) ScsiCmdReadTocPmaAtip; typedef struct _ScsiTocResponse @@ -247,7 +247,7 @@ typedef struct _ScsiReadDiscStructureFormat0Response uint8_t end_sector[3]; uint8_t zero3; uint8_t end_sector_layer0[3]; - uint8_t reserved2; + uint8_t reserved2; } __attribute__((packed)) ScsiReadDiscStructureFormat0Response; typedef struct _ScsiRead10 @@ -271,5 +271,3 @@ typedef struct _ScsiRead2064 } __attribute__((packed)) ScsiRead2064; #endif /* __SCSI_H__ */ - - diff --git a/_Projects_/prepISO/source/main.c b/_Projects_/prepISO/source/main.c index 325f48de9..b1fe64bbd 100644 --- a/_Projects_/prepISO/source/main.c +++ b/_Projects_/prepISO/source/main.c @@ -276,16 +276,16 @@ int main(int argc, const char* argv[]) /* By Evilnat - If disckey ('.key' file) exists, copy it to "/dev_hdd0/tmp/wmtmp" to + If disckey ('.key' file) exists, copy it to "/dev_hdd0/tmp/wmtmp" to decrypt on-the-fly with Cobra when the ISO is mounted - - If dkey ('.dkey' file) exists, we will transform it to disckey and - copy it to "/dev_hdd0/tmp/wmtmp" + + If dkey ('.dkey' file) exists, we will transform it to disckey and + copy it to "/dev_hdd0/tmp/wmtmp" */ if(strcasestr(ext, ".key") || strcasestr(filename + flen - 5, ".dkey")) - { + { snprintf(output, 255, "/dev_hdd0/tmp/wmtmp/%s", dir.d_name); - sprintf(key_path, "%s/%s", full_path, filename); + sprintf(key_path, "%s/%s", full_path, filename); if(strcasestr(filename + flen - 5, ".dkey")) { diff --git a/_Projects_/ps3netsrv/include/VIsoFile.h b/_Projects_/ps3netsrv/include/VIsoFile.h index add25ed77..1d435584c 100644 --- a/_Projects_/ps3netsrv/include/VIsoFile.h +++ b/_Projects_/ps3netsrv/include/VIsoFile.h @@ -3,6 +3,10 @@ #include +#if defined(__APPLE__) +#define off64_t off_t +#endif + #include "AbstractFile.h" #include "File.h" #include "compat.h" diff --git a/_Projects_/tools/PS3 Patches.txt b/_Projects_/tools/PS3 Patches.txt index c20f97db6..033b69ee2 100644 --- a/_Projects_/tools/PS3 Patches.txt +++ b/_Projects_/tools/PS3 Patches.txt @@ -1,20 +1,26 @@ ---------------------------------------------------- -Patches to enable hidden trophy's title on XMB/INFO ---------------------------------------------------- -File: explore_plugin.sprx (4.90 CEX) -- Offset: 0x93FE0 | Patch: 0x4800005C +--------------------------------------------------------------------------- +Patches to enable hidden trophy's title on XMB/INFO (4.90 CEX and 4.84 DEX) +--------------------------------------------------------------------------- +[Files: explore_plugin.sprx / explore_category_psn.sprx] +- Enable hidden trophy's title in XMB/INGAME -> Search: 0x4099005C | Patch: 0x4800005C +- Enable hidden trophy's details in XMB/INGAME -> Search: 0x813C00487B | Patch: 0x392000017B +- Enable real trophy's icon for hidden trophies in trophy info in XMB/INGAME -> Search: 0x807E00487B | Patch: 0x386000017B + +[Files: np_trophy_plugin.sprx / np_trophy_ingame.sprx] +- Enable hidden trophy's title in trophy info in XMB/INGAME -> Search: 0x4099000C | Patch: 0x4800000C +- Enable hidden trophy's details in trophy info in XMB/INGAME -> Search: 0x4BFFFC55 | Patch: 0x38600001 +- Enable real trophy's icon for hidden trophies in trophy info in XMB/INGAME -> Search: 0x4BFFFA09 | Patch: 0x38600001 + +Old patches: -File: explore_plugin.sprx (4.84 DEX) -- Offset: 0x93FB8 | Patch: 0x4800005C +File: explore_plugin.sprx +- Offset: 0x93FE0 | Patch: 0x4800005C (4.90 CEX / XMB) +- Offset: 0x93FB8 | Patch: 0x4800005C (4.84 DEX / XMB) File: np_trophy_plugin.sprx (4.90 CEX) - Offset: 0xD968 | Patch: 0x4800000C - ------------------------------------------------------- -Patches to enable hidden trophy's title on INGAME/INFO ------------------------------------------------------- -File: explore_category_psn.sprx (4.90 CEX) +File: explore_category_psn.sprx (4.90 CEX / INGAME) - Offset: 0x570E0 | Patch: 0x4800005C File: np_trophy_ingame.sprx (4.90 CEX)