2015-07-24 18:31:16 +02:00
|
|
|
#include "stdafx.h"
|
|
|
|
|
#include "Emu/Memory/Memory.h"
|
|
|
|
|
#include "Emu/SysCalls/Modules.h"
|
|
|
|
|
|
|
|
|
|
#include "sceNp.h"
|
2015-07-26 11:15:15 +02:00
|
|
|
#include "sceNpUtil.h"
|
2015-07-24 18:31:16 +02:00
|
|
|
|
|
|
|
|
extern Module sceNpUtil;
|
|
|
|
|
|
2015-07-26 11:15:15 +02:00
|
|
|
std::unique_ptr<SceNpUtilInternal> g_sceNpUtil;
|
2015-07-24 18:31:16 +02:00
|
|
|
|
|
|
|
|
s32 sceNpUtilCmpNpId()
|
|
|
|
|
{
|
|
|
|
|
UNIMPLEMENTED_FUNC(sceNpUtil);
|
|
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
s32 sceNpUtilCmpNpIdInOrder()
|
|
|
|
|
{
|
|
|
|
|
UNIMPLEMENTED_FUNC(sceNpUtil);
|
|
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
s32 sceNpUtilBandwidthTestInitStart(u32 prio, size_t stack)
|
|
|
|
|
{
|
|
|
|
|
UNIMPLEMENTED_FUNC(sceNpUtil);
|
|
|
|
|
|
2015-07-26 11:15:15 +02:00
|
|
|
if (g_sceNpUtil->m_bSceNpUtilBandwidthTestInitialized)
|
|
|
|
|
{
|
2015-07-24 18:31:16 +02:00
|
|
|
return SCE_NP_ERROR_ALREADY_INITIALIZED;
|
2015-07-26 11:15:15 +02:00
|
|
|
}
|
2015-07-24 18:31:16 +02:00
|
|
|
|
2015-07-26 11:15:15 +02:00
|
|
|
g_sceNpUtil->m_bSceNpUtilBandwidthTestInitialized = true;
|
2015-07-24 18:31:16 +02:00
|
|
|
|
|
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
s32 sceNpUtilBandwidthTestGetStatus()
|
|
|
|
|
{
|
|
|
|
|
UNIMPLEMENTED_FUNC(sceNpUtil);
|
|
|
|
|
|
2015-07-26 11:15:15 +02:00
|
|
|
if (!g_sceNpUtil->m_bSceNpUtilBandwidthTestInitialized)
|
|
|
|
|
{
|
2015-07-24 18:31:16 +02:00
|
|
|
return SCE_NP_ERROR_NOT_INITIALIZED;
|
2015-07-26 11:15:15 +02:00
|
|
|
}
|
2015-07-24 18:31:16 +02:00
|
|
|
|
|
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
s32 sceNpUtilBandwidthTestShutdown()
|
|
|
|
|
{
|
|
|
|
|
UNIMPLEMENTED_FUNC(sceNpUtil);
|
|
|
|
|
|
2015-07-26 11:15:15 +02:00
|
|
|
if (!g_sceNpUtil->m_bSceNpUtilBandwidthTestInitialized)
|
|
|
|
|
{
|
2015-07-24 18:31:16 +02:00
|
|
|
return SCE_NP_ERROR_NOT_INITIALIZED;
|
2015-07-26 11:15:15 +02:00
|
|
|
}
|
2015-07-24 18:31:16 +02:00
|
|
|
|
2015-07-26 11:15:15 +02:00
|
|
|
g_sceNpUtil->m_bSceNpUtilBandwidthTestInitialized = false;
|
2015-07-24 18:31:16 +02:00
|
|
|
|
|
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
s32 sceNpUtilBandwidthTestAbort()
|
|
|
|
|
{
|
|
|
|
|
UNIMPLEMENTED_FUNC(sceNpUtil);
|
|
|
|
|
|
2015-07-26 11:15:15 +02:00
|
|
|
if (!g_sceNpUtil->m_bSceNpUtilBandwidthTestInitialized)
|
|
|
|
|
{
|
2015-07-24 18:31:16 +02:00
|
|
|
return SCE_NP_ERROR_NOT_INITIALIZED;
|
2015-07-26 11:15:15 +02:00
|
|
|
}
|
2015-07-24 18:31:16 +02:00
|
|
|
|
|
|
|
|
return CELL_OK;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Module sceNpUtil("sceNpUtil", []()
|
|
|
|
|
{
|
2015-07-26 11:15:15 +02:00
|
|
|
g_sceNpUtil = std::make_unique<SceNpUtilInternal>();
|
2015-07-24 18:31:16 +02:00
|
|
|
|
|
|
|
|
REG_FUNC(sceNpUtil, sceNpUtilBandwidthTestInitStart);
|
|
|
|
|
REG_FUNC(sceNpUtil, sceNpUtilBandwidthTestShutdown);
|
|
|
|
|
REG_FUNC(sceNpUtil, sceNpUtilCmpNpId);
|
|
|
|
|
REG_FUNC(sceNpUtil, sceNpUtilCmpNpIdInOrder);
|
|
|
|
|
REG_FUNC(sceNpUtil, sceNpUtilBandwidthTestGetStatus);
|
|
|
|
|
REG_FUNC(sceNpUtil, sceNpUtilBandwidthTestAbort);
|
|
|
|
|
});
|