Skip to content

Commit

Permalink
minor update
Browse files Browse the repository at this point in the history
  • Loading branch information
aldostools committed Feb 18, 2024
1 parent a4bec90 commit 4ddfef9
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 33 deletions.
16 changes: 8 additions & 8 deletions _Projects_/prepISO/include/exfat.h
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand All @@ -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;
}
Expand Down Expand Up @@ -142,23 +142,23 @@ 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';
snprintf(output, 255, "/dev_hdd0/tmp/wmtmp/%s.key", filename);

convert_dkey_to_key(disckey, dkey);
SaveFile(output, (char *)disckey, 0x10);
}
}
}

//--- is ISO?
Expand Down
2 changes: 1 addition & 1 deletion _Projects_/prepISO/include/ntfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ struct statvfs {
unsigned long f_fsid;
unsigned long f_flag;
unsigned long f_namemax;
};
};

#endif

Expand Down
10 changes: 4 additions & 6 deletions _Projects_/prepISO/include/scsi.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ enum DvdBookType
BOOKTYPE_DVDPRW = 9,
BOOKTYPE_DVDPR,
BOOKTYPE_DVDPRWDL = 13,
BOOKTYPE_DVDPRDL
BOOKTYPE_DVDPRDL
};

typedef struct _ScsiCmdTestUnitReady
Expand All @@ -75,7 +75,7 @@ typedef struct _ScsiCmdTestUnitReady
uint8_t control;
} __attribute__((packed)) ScsiCmdTestUnitReady;

enum
enum
{
FORMAT_TOC,
FORMAT_SESSION_INFO,
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -271,5 +271,3 @@ typedef struct _ScsiRead2064
} __attribute__((packed)) ScsiRead2064;

#endif /* __SCSI_H__ */


12 changes: 6 additions & 6 deletions _Projects_/prepISO/source/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
{
Expand Down
4 changes: 4 additions & 0 deletions _Projects_/ps3netsrv/include/VIsoFile.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@

#include <sys/types.h>

#if defined(__APPLE__)
#define off64_t off_t
#endif

#include "AbstractFile.h"
#include "File.h"
#include "compat.h"
Expand Down
30 changes: 18 additions & 12 deletions _Projects_/tools/PS3 Patches.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand Down

0 comments on commit 4ddfef9

Please sign in to comment.