decrypt_self() function

Fixed SPU self decryption
Fixed PSV debug self load
This commit is contained in:
Nekotekina 2017-02-11 21:06:57 +03:00
parent be5f780977
commit e8bfce4ebd
9 changed files with 81 additions and 118 deletions

View file

@ -2,6 +2,7 @@
#include "Utilities/Config.h"
#include "Utilities/AutoPause.h"
#include "Crypto/sha1.h"
#include "Crypto/unself.h"
#include "Loader/ELF.h"
#include "Emu/System.h"
#include "Emu/IdManager.h"
@ -1120,7 +1121,7 @@ void ppu_load_exec(const ppu_exec_object& elf)
if (g_cfg_load_liblv2)
{
const ppu_prx_object obj = fs::file(lle_dir + "/liblv2.sprx");
const ppu_prx_object obj = decrypt_self(fs::file(lle_dir + "/liblv2.sprx"));
if (obj == elf_error::ok)
{
@ -1135,7 +1136,7 @@ void ppu_load_exec(const ppu_exec_object& elf)
{
for (const auto& name : g_cfg_load_libs.get_set())
{
const ppu_prx_object obj = fs::file(lle_dir + '/' + name);
const ppu_prx_object obj = decrypt_self(fs::file(lle_dir + '/' + name));
if (obj == elf_error::ok)
{