Some sceNpTrophy syscalls and few fixes

* Restored deleted functions in FuncList.cpp
* Fixed bugs in TRPLoader.
* Implemented some sceNpTrophy syscalls.
* Added sceNp headers (required for sceNpTrophy).
* Updated .gitignore to ignore trophies.

NOTE: Thanks to the new sceNpTrophy syscalls, RPCS3 can install the
trophy contents in dev_hdd0/home/00000001/trophy/. Remember this is
still on an experimental stage.
This commit is contained in:
Alexandro Sánchez Bach 2014-02-16 02:51:04 +01:00
parent 700698247a
commit 3fdb50b0ea
9 changed files with 352 additions and 16 deletions

View file

@ -9,10 +9,14 @@ bool TRPLoader::Install(std::string dest, bool show)
{
if(!trp_f.IsOpened()) return false;
if(!LoadHeader(show)) return false;
if (!dest.empty() && dest.back() != '/')
dest += '/';
for (const TRPEntry& entry : m_entries)
{
char* buffer = new char [entry.size];
Emu.GetVFS().Create(dest+entry.name);
vfsFile file(dest+entry.name, vfsWrite);
trp_f.Seek(entry.offset);
trp_f.Read(buffer, entry.size);
@ -35,7 +39,7 @@ bool TRPLoader::LoadHeader(bool show)
if (trp_f.Read(&m_header, sizeof(TRPHeader)) != sizeof(TRPHeader))
return false;
if (!m_header.CheckMagic())
if (m_header.trp_magic != 0xDCA24D00)
return false;
if (show)