* Update cellGcmSys

* Update cellStorage

* Update cellSubdisplay

* Update sceNpTrophy
- Use error_code as return type
- Add few checks

* Update cellKey2char

* Update cellKb:
- Use error_code as return type
- Replace UNIMPLEMENTED_FUNC by .todo

* Update cellNetCtl

* Update cellSpudll

* Update cellSysutilAp

* Update cellUserInfo

* Stub sys_mempool_allocate_block (bad idea)
This commit is contained in:
scribam 2017-05-15 13:30:14 +02:00 committed by Ivan
parent c26607de08
commit 299f627321
21 changed files with 575 additions and 219 deletions

View file

@ -3,6 +3,7 @@
#include "Emu/System.h"
#include "Emu/Cell/PPUModule.h"
#include "cellGame.h"
#include "cellSysutil.h"
#include "cellNetCtl.h"
@ -10,6 +11,64 @@
logs::channel cellNetCtl("cellNetCtl", logs::level::notice);
template<>
void fmt_class_string<CellNetCtlError>::format(std::string& out, u64 arg)
{
format_enum(out, arg, [](auto error)
{
switch (error)
{
STR_CASE(CELL_NET_CTL_ERROR_NOT_INITIALIZED);
STR_CASE(CELL_NET_CTL_ERROR_NOT_TERMINATED);
STR_CASE(CELL_NET_CTL_ERROR_HANDLER_MAX);
STR_CASE(CELL_NET_CTL_ERROR_ID_NOT_FOUND);
STR_CASE(CELL_NET_CTL_ERROR_INVALID_ID);
STR_CASE(CELL_NET_CTL_ERROR_INVALID_CODE);
STR_CASE(CELL_NET_CTL_ERROR_INVALID_ADDR);
STR_CASE(CELL_NET_CTL_ERROR_NOT_CONNECTED);
STR_CASE(CELL_NET_CTL_ERROR_NOT_AVAIL);
STR_CASE(CELL_NET_CTL_ERROR_INVALID_TYPE);
STR_CASE(CELL_NET_CTL_ERROR_INVALID_SIZE);
STR_CASE(CELL_NET_CTL_ERROR_NET_DISABLED);
STR_CASE(CELL_NET_CTL_ERROR_NET_NOT_CONNECTED);
STR_CASE(CELL_NET_CTL_ERROR_NP_NO_ACCOUNT);
STR_CASE(CELL_NET_CTL_ERROR_NP_RESERVED1);
STR_CASE(CELL_NET_CTL_ERROR_NP_RESERVED2);
STR_CASE(CELL_NET_CTL_ERROR_NET_CABLE_NOT_CONNECTED);
STR_CASE(CELL_NET_CTL_ERROR_DIALOG_CANCELED);
STR_CASE(CELL_NET_CTL_ERROR_DIALOG_ABORTED);
STR_CASE(CELL_NET_CTL_ERROR_WLAN_DEAUTHED);
STR_CASE(CELL_NET_CTL_ERROR_WLAN_KEYINFO_EXCHNAGE_TIMEOUT);
STR_CASE(CELL_NET_CTL_ERROR_WLAN_ASSOC_FAILED);
STR_CASE(CELL_NET_CTL_ERROR_WLAN_AP_DISAPPEARED);
STR_CASE(CELL_NET_CTL_ERROR_PPPOE_SESSION_INIT);
STR_CASE(CELL_NET_CTL_ERROR_PPPOE_SESSION_NO_PADO);
STR_CASE(CELL_NET_CTL_ERROR_PPPOE_SESSION_NO_PADS);
STR_CASE(CELL_NET_CTL_ERROR_PPPOE_SESSION_GET_PADT);
STR_CASE(CELL_NET_CTL_ERROR_PPPOE_SESSION_SERVICE_NAME);
STR_CASE(CELL_NET_CTL_ERROR_PPPOE_SESSION_AC_SYSTEM);
STR_CASE(CELL_NET_CTL_ERROR_PPPOE_SESSION_GENERIC);
STR_CASE(CELL_NET_CTL_ERROR_PPPOE_STATUS_AUTH);
STR_CASE(CELL_NET_CTL_ERROR_PPPOE_STATUS_NETWORK);
STR_CASE(CELL_NET_CTL_ERROR_PPPOE_STATUS_TERMINATE);
STR_CASE(CELL_NET_CTL_ERROR_DHCP_LEASE_TIME);
STR_CASE(CELL_GAMEUPDATE_ERROR_NOT_INITIALIZED);
STR_CASE(CELL_GAMEUPDATE_ERROR_ALREADY_INITIALIZED);
STR_CASE(CELL_GAMEUPDATE_ERROR_INVALID_ADDR);
STR_CASE(CELL_GAMEUPDATE_ERROR_INVALID_SIZE);
STR_CASE(CELL_GAMEUPDATE_ERROR_INVALID_MEMORY_CONTAINER);
STR_CASE(CELL_GAMEUPDATE_ERROR_INSUFFICIENT_MEMORY_CONTAINER);
STR_CASE(CELL_GAMEUPDATE_ERROR_BUSY);
STR_CASE(CELL_GAMEUPDATE_ERROR_NOT_START);
STR_CASE(CELL_GAMEUPDATE_ERROR_LOAD_FAILED);
}
return unknown;
});
}
cfg::map_entry<s32> g_cfg_net_status(cfg::root.net, "Connection status",
{
{ "Disconnected", CELL_NET_CTL_STATE_Disconnected },
@ -20,21 +79,21 @@ cfg::map_entry<s32> g_cfg_net_status(cfg::root.net, "Connection status",
cfg::string_entry g_cfg_net_ip_address(cfg::root.net, "IP address", "192.168.1.1");
s32 cellNetCtlInit()
error_code cellNetCtlInit()
{
cellNetCtl.warning("cellNetCtlInit()");
return CELL_OK;
}
s32 cellNetCtlTerm()
error_code cellNetCtlTerm()
{
cellNetCtl.warning("cellNetCtlTerm()");
return CELL_OK;
}
s32 cellNetCtlGetState(vm::ptr<u32> state)
error_code cellNetCtlGetState(vm::ptr<u32> state)
{
cellNetCtl.trace("cellNetCtlGetState(state=*0x%x)", state);
@ -42,21 +101,21 @@ s32 cellNetCtlGetState(vm::ptr<u32> state)
return CELL_OK;
}
s32 cellNetCtlAddHandler(vm::ptr<cellNetCtlHandler> handler, vm::ptr<void> arg, vm::ptr<s32> hid)
error_code cellNetCtlAddHandler(vm::ptr<cellNetCtlHandler> handler, vm::ptr<void> arg, vm::ptr<s32> hid)
{
cellNetCtl.todo("cellNetCtlAddHandler(handler=*0x%x, arg=*0x%x, hid=*0x%x)", handler, arg, hid);
return CELL_OK;
}
s32 cellNetCtlDelHandler(s32 hid)
error_code cellNetCtlDelHandler(s32 hid)
{
cellNetCtl.todo("cellNetCtlDelHandler(hid=0x%x)", hid);
return CELL_OK;
}
s32 cellNetCtlGetInfo(s32 code, vm::ptr<CellNetCtlInfo> info)
error_code cellNetCtlGetInfo(s32 code, vm::ptr<CellNetCtlInfo> info)
{
cellNetCtl.todo("cellNetCtlGetInfo(code=0x%x (%s), info=*0x%x)", code, InfoCodeToName(code), info);
@ -95,7 +154,7 @@ s32 cellNetCtlGetInfo(s32 code, vm::ptr<CellNetCtlInfo> info)
return CELL_OK;
}
s32 cellNetCtlNetStartDialogLoadAsync(vm::ptr<CellNetCtlNetStartDialogParam> param)
error_code cellNetCtlNetStartDialogLoadAsync(vm::ptr<CellNetCtlNetStartDialogParam> param)
{
cellNetCtl.error("cellNetCtlNetStartDialogLoadAsync(param=*0x%x)", param);
@ -107,14 +166,14 @@ s32 cellNetCtlNetStartDialogLoadAsync(vm::ptr<CellNetCtlNetStartDialogParam> par
return CELL_OK;
}
s32 cellNetCtlNetStartDialogAbortAsync()
error_code cellNetCtlNetStartDialogAbortAsync()
{
cellNetCtl.error("cellNetCtlNetStartDialogAbortAsync()");
return CELL_OK;
}
s32 cellNetCtlNetStartDialogUnloadAsync(vm::ptr<CellNetCtlNetStartDialogResult> result)
error_code cellNetCtlNetStartDialogUnloadAsync(vm::ptr<CellNetCtlNetStartDialogResult> result)
{
cellNetCtl.warning("cellNetCtlNetStartDialogUnloadAsync(result=*0x%x)", result);
@ -124,7 +183,7 @@ s32 cellNetCtlNetStartDialogUnloadAsync(vm::ptr<CellNetCtlNetStartDialogResult>
return CELL_OK;
}
s32 cellNetCtlGetNatInfo(vm::ptr<CellNetCtlNatInfo> natInfo)
error_code cellNetCtlGetNatInfo(vm::ptr<CellNetCtlNatInfo> natInfo)
{
cellNetCtl.todo("cellNetCtlGetNatInfo(natInfo=*0x%x)", natInfo);
@ -137,50 +196,58 @@ s32 cellNetCtlGetNatInfo(vm::ptr<CellNetCtlNatInfo> natInfo)
return CELL_OK;
}
s32 cellGameUpdateInit()
error_code cellGameUpdateInit()
{
fmt::throw_exception("Unimplemented" HERE);
cellNetCtl.todo("cellGameUpdateInit()");
return CELL_OK;
}
s32 cellGameUpdateTerm()
error_code cellGameUpdateTerm()
{
fmt::throw_exception("Unimplemented" HERE);
cellNetCtl.todo("cellGameUpdateTerm()");
return CELL_OK;
}
s32 cellGameUpdateCheckStartAsync()
error_code cellGameUpdateCheckStartAsync(vm::cptr<CellGameUpdateParam> param, vm::ptr<CellGameUpdateCallback> cb_func, vm::ptr<void> userdata)
{
fmt::throw_exception("Unimplemented" HERE);
cellNetCtl.todo("cellGameUpdateCheckStartAsync(param=*0x%x, cb_func=*0x%x, userdata=*0x%x)", param, cb_func, userdata);
return CELL_OK;
}
s32 cellGameUpdateCheckFinishAsync()
error_code cellGameUpdateCheckFinishAsync(vm::ptr<CellGameUpdateCallback> cb_func, vm::ptr<void> userdata)
{
fmt::throw_exception("Unimplemented" HERE);
cellNetCtl.todo("cellGameUpdateCheckFinishAsync(cb_func=*0x%x, userdata=*0x%x)", cb_func, userdata);
return CELL_OK;
}
s32 cellGameUpdateCheckStartWithoutDialogAsync()
error_code cellGameUpdateCheckStartWithoutDialogAsync(vm::ptr<CellGameUpdateCallback> cb_func, vm::ptr<void> userdata)
{
fmt::throw_exception("Unimplemented" HERE);
cellNetCtl.todo("cellGameUpdateCheckStartWithoutDialogAsync(cb_func=*0x%x, userdata=*0x%x)", cb_func, userdata);
return CELL_OK;
}
s32 cellGameUpdateCheckAbort()
error_code cellGameUpdateCheckAbort()
{
fmt::throw_exception("Unimplemented" HERE);
cellNetCtl.todo("cellGameUpdateCheckAbort()");
return CELL_OK;
}
s32 cellGameUpdateCheckStartAsyncEx()
error_code cellGameUpdateCheckStartAsyncEx(vm::cptr<CellGameUpdateParam> param, vm::ptr<CellGameUpdateCallbackEx> cb_func, vm::ptr<void> userdata)
{
fmt::throw_exception("Unimplemented" HERE);
cellNetCtl.todo("cellGameUpdateCheckStartAsyncEx(param=*0x%x, cb_func=*0x%x, userdata=*0x%x)", param, cb_func, userdata);
return CELL_OK;
}
s32 cellGameUpdateCheckFinishAsyncEx()
error_code cellGameUpdateCheckFinishAsyncEx(vm::ptr<CellGameUpdateCallbackEx> cb_func, vm::ptr<void> userdata)
{
fmt::throw_exception("Unimplemented" HERE);
cellNetCtl.todo("cellGameUpdateCheckFinishAsyncEx(cb_func=*0x%x, userdata=*0x%x)", cb_func, userdata);
return CELL_OK;
}
s32 cellGameUpdateCheckStartWithoutDialogAsyncEx()
error_code cellGameUpdateCheckStartWithoutDialogAsyncEx(vm::ptr<CellGameUpdateCallbackEx> cb_func, vm::ptr<void> userdata)
{
fmt::throw_exception("Unimplemented" HERE);
cellNetCtl.todo("cellGameUpdateCheckStartWithoutDialogAsyncEx(cb_func=*0x%x, userdata=*0x%x)", cb_func, userdata);
return CELL_OK;
}