2013-09-28 04:36:57 +02:00
|
|
|
#include "stdafx.h"
|
2016-03-21 20:43:03 +01:00
|
|
|
#include "Emu/Cell/PPUModule.h"
|
2013-09-28 04:36:57 +02:00
|
|
|
|
2018-02-09 15:49:37 +01:00
|
|
|
|
2017-05-15 13:30:14 +02:00
|
|
|
|
2017-05-13 20:30:37 +02:00
|
|
|
logs::channel cellSysutilAp("cellSysutilAp");
|
2013-09-28 04:36:57 +02:00
|
|
|
|
|
|
|
|
// Return Codes
|
|
|
|
|
enum
|
|
|
|
|
{
|
2014-04-04 15:25:38 +02:00
|
|
|
CELL_SYSUTIL_AP_ERROR_OUT_OF_MEMORY = 0x8002cd00,
|
|
|
|
|
CELL_SYSUTIL_AP_ERROR_FATAL = 0x8002cd01,
|
|
|
|
|
CELL_SYSUTIL_AP_ERROR_INVALID_VALUE = 0x8002cd02,
|
|
|
|
|
CELL_SYSUTIL_AP_ERROR_NOT_INITIALIZED = 0x8002cd03,
|
|
|
|
|
CELL_SYSUTIL_AP_ERROR_ZERO_REGISTERED = 0x8002cd13,
|
|
|
|
|
CELL_SYSUTIL_AP_ERROR_NETIF_DISABLED = 0x8002cd14,
|
|
|
|
|
CELL_SYSUTIL_AP_ERROR_NETIF_NO_CABLE = 0x8002cd15,
|
|
|
|
|
CELL_SYSUTIL_AP_ERROR_NETIF_CANNOT_CONNECT = 0x8002cd16,
|
2013-09-28 04:36:57 +02:00
|
|
|
};
|
|
|
|
|
|
2017-05-15 13:30:14 +02:00
|
|
|
enum
|
|
|
|
|
{
|
|
|
|
|
CELL_SYSUTIL_AP_TITLE_ID_LEN = 9,
|
|
|
|
|
CELL_SYSUTIL_AP_SSID_LEN = 32,
|
|
|
|
|
CELL_SYSUTIL_AP_WPA_KEY_LEN = 64
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct CellSysutilApTitleId
|
|
|
|
|
{
|
|
|
|
|
char data[CELL_SYSUTIL_AP_TITLE_ID_LEN];
|
|
|
|
|
char padding[3];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct CellSysutilApSsid
|
|
|
|
|
{
|
|
|
|
|
char data[CELL_SYSUTIL_AP_SSID_LEN + 1];
|
|
|
|
|
char padding[3];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct CellSysutilApWpaKey
|
|
|
|
|
{
|
|
|
|
|
char data[CELL_SYSUTIL_AP_WPA_KEY_LEN + 1];
|
|
|
|
|
char padding[3];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct CellSysutilApParam
|
|
|
|
|
{
|
|
|
|
|
be_t<s32> type;
|
|
|
|
|
be_t<s32> wlanFlag;
|
|
|
|
|
CellSysutilApTitleId titleId;
|
|
|
|
|
CellSysutilApSsid ssid;
|
|
|
|
|
CellSysutilApWpaKey wpakey;
|
|
|
|
|
};
|
|
|
|
|
|
2014-02-11 03:47:25 +01:00
|
|
|
s32 cellSysutilApGetRequiredMemSize()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
2016-01-12 22:57:16 +01:00
|
|
|
cellSysutilAp.trace("cellSysutilApGetRequiredMemSize()");
|
2014-02-11 03:47:25 +01:00
|
|
|
return 1024*1024; // Return 1 MB as required size
|
2013-09-28 04:36:57 +02:00
|
|
|
}
|
|
|
|
|
|
2017-05-15 13:30:14 +02:00
|
|
|
s32 cellSysutilApOn(vm::ptr<CellSysutilApParam> pParam, u32 container)
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
2017-05-15 13:30:14 +02:00
|
|
|
cellSysutilAp.todo("cellSysutilApOn(pParam=*0x%x, container=0x%x)", pParam, container);
|
2013-09-28 04:36:57 +02:00
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2015-07-09 17:30:37 +02:00
|
|
|
s32 cellSysutilApOff()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
2017-05-15 13:30:14 +02:00
|
|
|
cellSysutilAp.todo("cellSysutilApOff()");
|
2013-09-28 04:36:57 +02:00
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
2016-03-21 20:43:03 +01:00
|
|
|
DECLARE(ppu_module_manager::cellSysutilAp)("cellSysutilAp", []()
|
2013-09-28 04:36:57 +02:00
|
|
|
{
|
2015-02-20 14:58:40 +01:00
|
|
|
REG_FUNC(cellSysutilAp, cellSysutilApGetRequiredMemSize);
|
|
|
|
|
REG_FUNC(cellSysutilAp, cellSysutilApOn);
|
|
|
|
|
REG_FUNC(cellSysutilAp, cellSysutilApOff);
|
2015-02-18 17:22:06 +01:00
|
|
|
});
|