mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-21 03:55:32 +00:00
Added sceNpBasicGetFriendListEntryCount and sceNpBasicGetMessageEntryCount
Fixed (?) sometimes functions being unloaded when they shouldn't. Also reverted the SPUThread hack.
This commit is contained in:
parent
df84e89d46
commit
6360ef1790
5 changed files with 62 additions and 12 deletions
|
@ -175,16 +175,16 @@ void SPUThread::ProcessCmd(u32 cmd, u32 tag, u32 lsa, u64 ea, u32 size)
|
|||
return;
|
||||
}
|
||||
|
||||
SPUThread* spu = (SPUThread*)Emu.GetCPU().GetThread(group->list[num]);
|
||||
|
||||
u32 addr = (ea & SYS_SPU_THREAD_BASE_MASK) % SYS_SPU_THREAD_OFFSET;
|
||||
if ((addr <= 0x3ffff) && (addr + size <= 0x40000))
|
||||
{
|
||||
SPUThread* spu = (SPUThread*)Emu.GetCPU().GetThread(group->list[num]);
|
||||
// LS access
|
||||
ea = spu->dmac.ls_offset + addr;
|
||||
}
|
||||
else if ((cmd & MFC_PUT_CMD) && size == 4 && (addr == SYS_SPU_THREAD_SNR1 || addr == SYS_SPU_THREAD_SNR2))
|
||||
{
|
||||
SPUThread* spu = (SPUThread*)Emu.GetCPU().GetThread(group->list[num]);
|
||||
spu->WriteSNR(SYS_SPU_THREAD_SNR2 == addr, vm::read32(dmac.ls_offset + lsa));
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -89,10 +89,11 @@ void Module::UnLoad()
|
|||
|
||||
if(m_unload_func) m_unload_func();
|
||||
|
||||
for(u32 i=0; i<m_funcs_list.size(); ++i)
|
||||
{
|
||||
Emu.GetModuleManager().UnloadFunc(m_funcs_list[i]->id);
|
||||
}
|
||||
// TODO: Re-enable this when needed
|
||||
//for(u32 i=0; i<m_funcs_list.size(); ++i)
|
||||
//{
|
||||
// Emu.GetModuleManager().UnloadFunc(m_funcs_list[i]->id);
|
||||
//}
|
||||
|
||||
SetLoaded(false);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "stdafx.h"
|
||||
#include "Emu/Memory/Memory.h"
|
||||
#include "Emu/SysCalls/Modules.h"
|
||||
|
||||
Module *cellOvis = nullptr;
|
||||
|
@ -11,9 +12,9 @@ enum
|
|||
CELL_OVIS_ERROR_ALIGN = 0x80410410,
|
||||
};
|
||||
|
||||
int cellOvisGetOverlayTableSize()
|
||||
int cellOvisGetOverlayTableSize(vm::ptr<const char> elf)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellOvis);
|
||||
cellOvis->Todo("cellOvisGetOverlayTableSize(elf_addr=0x%x)", elf.addr());
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -998,9 +998,16 @@ int sceNpCommerceGetCurrencyDecimals()
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpBasicGetFriendListEntryCount()
|
||||
int sceNpBasicGetFriendListEntryCount(u32 count)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNp);
|
||||
sceNp->Warning("sceNpBasicGetFriendListEntryCount(count=%d)", count);
|
||||
|
||||
if (!sceNpInstance.m_bSceNpInitialized)
|
||||
return SCE_NP_BASIC_ERROR_NOT_INITIALIZED;
|
||||
|
||||
// TODO: Check if there are any friends
|
||||
vm::write32(count, 0);
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
@ -1339,9 +1346,16 @@ int sceNpBasicSendMessage()
|
|||
return CELL_OK;
|
||||
}
|
||||
|
||||
int sceNpBasicGetMessageEntryCount()
|
||||
int sceNpBasicGetMessageEntryCount(u32 type, u32 count)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(sceNp);
|
||||
sceNp->Warning("sceNpBasicGetMessageEntryCount(type=%d, count=%d)", type, count);
|
||||
|
||||
if (!sceNpInstance.m_bSceNpInitialized)
|
||||
return SCE_NP_BASIC_ERROR_NOT_INITIALIZED;
|
||||
|
||||
// TODO: Check if there are messages
|
||||
vm::write32(count, 0);
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -28,6 +28,40 @@ enum
|
|||
SCE_NP_ERROR_ALREADY_USED = 0x8002aa15,
|
||||
SCE_NP_ERROR_DIFFERENT_USER = 0x8002aa16,
|
||||
SCE_NP_ERROR_ALREADY_DONE = 0x8002aa17,
|
||||
// NP Basic Utility
|
||||
SCE_NP_BASIC_ERROR_ALREADY_INITIALIZED = 0x8002a661,
|
||||
SCE_NP_BASIC_ERROR_NOT_INITIALIZED = 0x8002a662,
|
||||
SCE_NP_BASIC_ERROR_NOT_SUPPORTED = 0x8002a663,
|
||||
SCE_NP_BASIC_ERROR_OUT_OF_MEMORY = 0x8002a664,
|
||||
SCE_NP_BASIC_ERROR_INVALID_ARGUMENT = 0x8002a665,
|
||||
SCE_NP_BASIC_ERROR_BAD_ID = 0x8002a666,
|
||||
SCE_NP_BASIC_ERROR_IDS_DIFFER = 0x8002a667,
|
||||
SCE_NP_BASIC_ERROR_PARSER_FAILED = 0x8002a668,
|
||||
SCE_NP_BASIC_ERROR_TIMEOUT = 0x8002a669,
|
||||
SCE_NP_BASIC_ERROR_NO_EVENT = 0x8002a66a,
|
||||
SCE_NP_BASIC_ERROR_EXCEEDS_MAX = 0x8002a66b,
|
||||
SCE_NP_BASIC_ERROR_INSUFFICIENT = 0x8002a66c,
|
||||
SCE_NP_BASIC_ERROR_NOT_REGISTERED = 0x8002a66d,
|
||||
SCE_NP_BASIC_ERROR_DATA_LOST = 0x8002a66e,
|
||||
SCE_NP_BASIC_ERROR_BUSY = 0x8002a66f,
|
||||
SCE_NP_BASIC_ERROR_STATUS = 0x8002a670,
|
||||
SCE_NP_BASIC_ERROR_CANCEL = 0x8002a671,
|
||||
SCE_NP_BASIC_ERROR_INVALID_MEMORY_CONTAINER = 0x8002a672,
|
||||
SCE_NP_BASIC_ERROR_INVALID_DATA_ID = 0x8002a673,
|
||||
SCE_NP_BASIC_ERROR_BROKEN_DATA = 0x8002a674,
|
||||
SCE_NP_BASIC_ERROR_BLOCKLIST_ADD_FAILED = 0x8002a675,
|
||||
SCE_NP_BASIC_ERROR_BLOCKLIST_IS_FULL = 0x8002a676,
|
||||
SCE_NP_BASIC_ERROR_SEND_FAILED = 0x8002a677,
|
||||
SCE_NP_BASIC_ERROR_NOT_CONNECTED = 0x8002a678,
|
||||
SCE_NP_BASIC_ERROR_INSUFFICIENT_DISK_SPACE = 0x8002a679,
|
||||
SCE_NP_BASIC_ERROR_INTERNAL_FAILURE = 0x8002a67a,
|
||||
SCE_NP_BASIC_ERROR_DOES_NOT_EXIST = 0x8002a67b,
|
||||
SCE_NP_BASIC_ERROR_INVALID = 0x8002a67c,
|
||||
SCE_NP_BASIC_ERROR_UNKNOWN = 0x8002a6bf,
|
||||
SCE_NP_EXT_ERROR_CONTEXT_DOES_NOT_EXIST = 0x8002a6a1,
|
||||
SCE_NP_EXT_ERROR_CONTEXT_ALREADY_EXISTS = 0x8002a6a2,
|
||||
SCE_NP_EXT_ERROR_NO_CONTEXT = 0x8002a6a3,
|
||||
SCE_NP_EXT_ERROR_NO_ORIGIN = 0x8002a6a4,
|
||||
// NP Community Utility
|
||||
SCE_NP_COMMUNITY_ERROR_ALREADY_INITIALIZED = 0x8002a101,
|
||||
SCE_NP_COMMUNITY_ERROR_NOT_INITIALIZED = 0x8002a102,
|
||||
|
|
Loading…
Add table
Reference in a new issue