mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-10 08:51:28 +12:00
Notification for encrypted SPU modules
This commit is contained in:
parent
5e954f4f76
commit
ed0918d097
2 changed files with 31 additions and 5 deletions
|
@ -15,11 +15,17 @@
|
|||
#include "Emu/SysCalls/lv2/sys_mmapper.h"
|
||||
#include "Emu/SysCalls/lv2/sys_lwcond.h"
|
||||
#include "Loader/ELF.h"
|
||||
#include "Crypto/unself.h"
|
||||
#include "Emu/Cell/RawSPUThread.h"
|
||||
#include "sysPrxForUser.h"
|
||||
|
||||
Module *sysPrxForUser = nullptr;
|
||||
|
||||
void sys_initialize_tls()
|
||||
{
|
||||
sysPrxForUser->Log("sys_initialize_tls()");
|
||||
}
|
||||
|
||||
int _sys_heap_create_heap(const u32 heap_addr, const u32 align, const u32 size)
|
||||
{
|
||||
sysPrxForUser->Warning("_sys_heap_create_heap(heap_addr=0x%x, align=0x%x, size=0x%x)", heap_addr, align, size);
|
||||
|
@ -49,11 +55,6 @@ u32 _sys_heap_memalign(u32 heap_id, u32 align, u32 size)
|
|||
return (u32)Memory.Alloc(size, align);
|
||||
}
|
||||
|
||||
void sys_initialize_tls()
|
||||
{
|
||||
sysPrxForUser->Log("sys_initialize_tls()");
|
||||
}
|
||||
|
||||
s64 _sys_process_atexitspawn()
|
||||
{
|
||||
sysPrxForUser->Log("_sys_process_atexitspawn()");
|
||||
|
@ -117,6 +118,18 @@ int sys_raw_spu_load(s32 id, vm::ptr<const char> path, vm::ptr<be_t<u32>> entry)
|
|||
return CELL_ENOENT;
|
||||
}
|
||||
|
||||
SceHeader hdr;
|
||||
hdr.Load(f);
|
||||
|
||||
if (hdr.CheckMagic())
|
||||
{
|
||||
sysPrxForUser->Error("sys_raw_spu_load error: '%s' is encrypted! Decrypt SELF and try again.", path.get_ptr());
|
||||
Emu.Pause();
|
||||
return CELL_ENOENT;
|
||||
}
|
||||
|
||||
f.Seek(0);
|
||||
|
||||
ELFLoader l(f);
|
||||
l.LoadInfo();
|
||||
l.LoadData(RAW_SPU_BASE_ADDR + RAW_SPU_OFFSET * id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue