mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-06 00:59:18 +00:00
Implement cellSubDisplayGetRequiredMemory
This commit is contained in:
parent
99a9a1e38d
commit
29c1dc2c07
@ -38,6 +38,7 @@ extern void cellRtc_init(Module *pxThis);
|
||||
extern void cellSail_init(Module *pxThis);
|
||||
extern void cellSpurs_init(Module *pxThis);
|
||||
extern void cellSpursJq_init(Module *pxThis);
|
||||
extern void cellSubdisplay_init(Module *pxThis);
|
||||
extern void cellSync_init(Module *pxThis);
|
||||
extern void cellSync2_init(Module *pxThis);
|
||||
extern void cellSysutil_init(Module *pxThis);
|
||||
@ -125,7 +126,7 @@ static const g_modules_list[] =
|
||||
{ 0x0031, "cellAvconfExt", cellAvconfExt_init, nullptr, nullptr },
|
||||
{ 0x0032, "cellUserInfo", cellUserInfo_init, nullptr, nullptr },
|
||||
{ 0x0033, "cellSysutilSavedata", nullptr, nullptr, nullptr },
|
||||
{ 0x0034, "cellSubdisplay", nullptr, nullptr, nullptr },
|
||||
{ 0x0034, "cellSubdisplay", cellSubdisplay_init, nullptr, nullptr },
|
||||
{ 0x0035, "cellSysutilRec", nullptr, nullptr, nullptr },
|
||||
{ 0x0036, "cellVideoExport", nullptr, nullptr, nullptr },
|
||||
{ 0x0037, "cellGameExec", nullptr, nullptr, nullptr },
|
||||
|
@ -1,21 +1,10 @@
|
||||
#include "stdafx.h"
|
||||
#if 0
|
||||
#include "Emu/Memory/Memory.h"
|
||||
#include "Emu/SysCalls/Modules.h"
|
||||
|
||||
void cellSubdisplay_init();
|
||||
Module cellSubdisplay(0x0034, cellSubdisplay_init);
|
||||
#include "cellSubdisplay.h"
|
||||
|
||||
// Return Codes
|
||||
enum
|
||||
{
|
||||
CELL_SUBDISPLAY_ERROR_OUT_OF_MEMORY = 0x80029851,
|
||||
CELL_SUBDISPLAY_ERROR_FATAL = 0x80029852,
|
||||
CELL_SUBDISPLAY_ERROR_NOT_FOUND = 0x80029853,
|
||||
CELL_SUBDISPLAY_ERROR_INVALID_VALUE = 0x80029854,
|
||||
CELL_SUBDISPLAY_ERROR_NOT_INITIALIZED = 0x80029855,
|
||||
CELL_SUBDISPLAY_ERROR_SET_SAMPLE = 0x80029860,
|
||||
CELL_SUBDISPLAY_ERROR_AUDIOOUT_IS_BUSY = 0x80029861,
|
||||
CELL_SUBDISPLAY_ERROR_ZERO_REGISTERED = 0x80029813,
|
||||
};
|
||||
Module *cellSubdisplay = nullptr;
|
||||
|
||||
int cellSubDisplayInit()
|
||||
{
|
||||
@ -29,10 +18,18 @@ int cellSubDisplayEnd()
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellSubDisplayGetRequiredMemory()
|
||||
int cellSubDisplayGetRequiredMemory(vm::ptr<CellSubDisplayParam> pParam)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellSubdisplay);
|
||||
return CELL_OK;
|
||||
cellSubdisplay->Warning("cellSubDisplayGetRequiredMemory(pParam_addr=0x%x)", pParam.addr());
|
||||
|
||||
if (pParam->version == CELL_SUBDISPLAY_VERSION_0002)
|
||||
{
|
||||
return CELL_SUBDISPLAY_0002_MEMORY_CONTAINER_SIZE;
|
||||
}
|
||||
else
|
||||
{
|
||||
return CELL_SUBDISPLAY_0001_MEMORY_CONTAINER_SIZE;
|
||||
}
|
||||
}
|
||||
|
||||
int cellSubDisplayStart()
|
||||
@ -77,19 +74,20 @@ int cellSubDisplayGetPeerList()
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
void cellSubdisplay_init()
|
||||
void cellSubdisplay_init(Module *pxThis)
|
||||
{
|
||||
cellSubdisplay.AddFunc(0xf9a7e8a5, cellSubDisplayInit);
|
||||
cellSubdisplay.AddFunc(0x551d80a5, cellSubDisplayEnd);
|
||||
cellSubdisplay.AddFunc(0x6595ce22, cellSubDisplayGetRequiredMemory);
|
||||
cellSubdisplay.AddFunc(0xa5bccb47, cellSubDisplayStart);
|
||||
cellSubdisplay.AddFunc(0x6d85ddb3, cellSubDisplayStop);
|
||||
cellSubdisplay = pxThis;
|
||||
|
||||
cellSubdisplay.AddFunc(0x938ac642, cellSubDisplayGetVideoBuffer);
|
||||
cellSubdisplay.AddFunc(0xaee1e0c2, cellSubDisplayAudioOutBlocking);
|
||||
cellSubdisplay.AddFunc(0x5468d6b0, cellSubDisplayAudioOutNonBlocking);
|
||||
cellSubdisplay->AddFunc(0xf9a7e8a5, cellSubDisplayInit);
|
||||
cellSubdisplay->AddFunc(0x551d80a5, cellSubDisplayEnd);
|
||||
cellSubdisplay->AddFunc(0x6595ce22, cellSubDisplayGetRequiredMemory);
|
||||
cellSubdisplay->AddFunc(0xa5bccb47, cellSubDisplayStart);
|
||||
cellSubdisplay->AddFunc(0x6d85ddb3, cellSubDisplayStop);
|
||||
|
||||
cellSubdisplay.AddFunc(0x8a264d71, cellSubDisplayGetPeerNum);
|
||||
cellSubdisplay.AddFunc(0xe2485f79, cellSubDisplayGetPeerList);
|
||||
cellSubdisplay->AddFunc(0x938ac642, cellSubDisplayGetVideoBuffer);
|
||||
cellSubdisplay->AddFunc(0xaee1e0c2, cellSubDisplayAudioOutBlocking);
|
||||
cellSubdisplay->AddFunc(0x5468d6b0, cellSubDisplayAudioOutNonBlocking);
|
||||
|
||||
cellSubdisplay->AddFunc(0x8a264d71, cellSubDisplayGetPeerNum);
|
||||
cellSubdisplay->AddFunc(0xe2485f79, cellSubDisplayGetPeerList);
|
||||
}
|
||||
#endif
|
||||
|
83
rpcs3/Emu/SysCalls/Modules/cellSubdisplay.h
Normal file
83
rpcs3/Emu/SysCalls/Modules/cellSubdisplay.h
Normal file
@ -0,0 +1,83 @@
|
||||
#pragma once
|
||||
|
||||
// Return Codes
|
||||
enum
|
||||
{
|
||||
CELL_SUBDISPLAY_ERROR_OUT_OF_MEMORY = 0x80029851,
|
||||
CELL_SUBDISPLAY_ERROR_FATAL = 0x80029852,
|
||||
CELL_SUBDISPLAY_ERROR_NOT_FOUND = 0x80029853,
|
||||
CELL_SUBDISPLAY_ERROR_INVALID_VALUE = 0x80029854,
|
||||
CELL_SUBDISPLAY_ERROR_NOT_INITIALIZED = 0x80029855,
|
||||
CELL_SUBDISPLAY_ERROR_SET_SAMPLE = 0x80029860,
|
||||
CELL_SUBDISPLAY_ERROR_AUDIOOUT_IS_BUSY = 0x80029861,
|
||||
CELL_SUBDISPLAY_ERROR_ZERO_REGISTERED = 0x80029813,
|
||||
};
|
||||
|
||||
// Different constants
|
||||
enum
|
||||
{
|
||||
CELL_SUBDISPLAY_STATUS_JOIN = 1,
|
||||
CELL_SUBDISPLAY_STATUS_LEAVE = 2,
|
||||
CELL_SUBDISPLAY_STATUS_FATALERROR = 3,
|
||||
CELL_SUBDISPLAY_VERSION_0001 = 1,
|
||||
CELL_SUBDISPLAY_VERSION_0002 = 2,
|
||||
CELL_SUBDISPLAY_MODE_REMOTEPLAY = 1,
|
||||
CELL_SUBDISPLAY_VIDEO_FORMAT_A8R8G8B8 = 1,
|
||||
CELL_SUBDISPLAY_VIDEO_FORMAT_R8G8B8A8 = 2,
|
||||
CELL_SUBDISPLAY_VIDEO_ASPECT_RATIO_16_9 = 0,
|
||||
CELL_SUBDISPLAY_VIDEO_ASPECT_RATIO_4_3 = 1,
|
||||
CELL_SUBDISPLAY_VIDEO_MODE_SETDATA = 0,
|
||||
CELL_SUBDISPLAY_VIDEO_MODE_CAPTURE = 1,
|
||||
CELL_SUBDISPLAY_AUDIO_MODE_SETDATA = 0,
|
||||
CELL_SUBDISPLAY_AUDIO_MODE_CAPTURE = 1,
|
||||
CELL_SUBDISPLAY_0001_MEMORY_CONTAINER_SIZE = 8 * 1024 * 1024,
|
||||
CELL_SUBDISPLAY_0002_MEMORY_CONTAINER_SIZE = 10 * 1024 * 1024,
|
||||
CELL_SUBDISPLAY_NICKNAME_LEN = 256,
|
||||
CELL_SUBDISPLAY_PSPID_LEN = 16,
|
||||
};
|
||||
|
||||
struct CellSubDisplayVideoParam
|
||||
{
|
||||
be_t<s32> format;
|
||||
be_t<s32> width;
|
||||
be_t<s32> height;
|
||||
be_t<s32> pitch;
|
||||
be_t<s32> aspectRatio;
|
||||
be_t<s32> videoMode;
|
||||
};
|
||||
|
||||
struct CellSubDisplayAudioParam
|
||||
{
|
||||
be_t<s32> ch;
|
||||
be_t<s32> audioMode;
|
||||
};
|
||||
|
||||
struct CellSubDisplayParam
|
||||
{
|
||||
be_t<s32> version;
|
||||
be_t<s32> mode;
|
||||
be_t<s32> nGroup;
|
||||
be_t<s32> nPeer;
|
||||
vm::ptr<CellSubDisplayVideoParam> videoParam;
|
||||
vm::ptr<CellSubDisplayAudioParam> audioParam;
|
||||
};
|
||||
|
||||
struct CellSubDisplayPSPId
|
||||
{
|
||||
char data[CELL_SUBDISPLAY_PSPID_LEN];
|
||||
};
|
||||
|
||||
struct CellSubDisplayNickname
|
||||
{
|
||||
char data[CELL_SUBDISPLAY_NICKNAME_LEN];
|
||||
};
|
||||
|
||||
struct CellSubDisplayPeerInfo
|
||||
{
|
||||
be_t<u64> sessionId;
|
||||
be_t<u32> portNo;
|
||||
CellSubDisplayPSPId pspId;
|
||||
CellSubDisplayNickname pspNickname;
|
||||
};
|
||||
|
||||
typedef void(*CellSubDisplayHandler)(s32 cbMsg, u64 cbParam, u32 *userdata);
|
@ -194,10 +194,10 @@
|
||||
<ClCompile Include="Emu\SysCalls\Modules\cellPngDec.cpp" />
|
||||
<ClCompile Include="Emu\SysCalls\Modules\cellPngEnc.cpp" />
|
||||
<ClCompile Include="Emu\SysCalls\Modules\cellPrint.cpp" />
|
||||
<ClCompile Include="Emu\SysCalls\Modules\cellSail.cpp" />
|
||||
<ClCompile Include="Emu\SysCalls\Modules\cellResc.cpp" />
|
||||
<ClCompile Include="Emu\SysCalls\Modules\cellRtc.cpp" />
|
||||
<ClCompile Include="Emu\SysCalls\Modules\cellRudp.cpp" />
|
||||
<ClCompile Include="Emu\SysCalls\Modules\cellSail.cpp" />
|
||||
<ClCompile Include="Emu\SysCalls\Modules\cellSailRec.cpp" />
|
||||
<ClCompile Include="Emu\SysCalls\Modules\cellScreenshot.cpp" />
|
||||
<ClCompile Include="Emu\SysCalls\Modules\cellSearch.cpp" />
|
||||
@ -425,11 +425,12 @@
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellPamf.h" />
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellPng.h" />
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellPngDec.h" />
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellSail.h" />
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellResc.h" />
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellRtc.h" />
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellSail.h" />
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellSpurs.h" />
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellSpursJq.h" />
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellSubdisplay.h" />
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellSync.h" />
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellSync2.h" />
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellSysutil.h" />
|
||||
|
@ -209,6 +209,9 @@
|
||||
<ClCompile Include="Emu\SysCalls\Modules\cellSpursJq.cpp">
|
||||
<Filter>Emu\SysCalls\Modules</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Emu\SysCalls\Modules\cellSubdisplay.cpp">
|
||||
<Filter>Emu\SysCalls\Modules</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Emu\SysCalls\Modules\cellSync.cpp">
|
||||
<Filter>Emu\SysCalls\Modules</Filter>
|
||||
</ClCompile>
|
||||
@ -452,9 +455,6 @@
|
||||
<ClCompile Include="Emu\SysCalls\Modules\cellSsl.cpp">
|
||||
<Filter>Emu\SysCalls\currently_unused</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Emu\SysCalls\Modules\cellSubdisplay.cpp">
|
||||
<Filter>Emu\SysCalls\currently_unused</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Emu\SysCalls\Modules\cellUsbd.cpp">
|
||||
<Filter>Emu\SysCalls\currently_unused</Filter>
|
||||
</ClCompile>
|
||||
@ -784,6 +784,9 @@
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellSpursJq.h">
|
||||
<Filter>Emu\SysCalls\Modules</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellSubdisplay.h">
|
||||
<Filter>Emu\SysCalls\Modules</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Emu\SysCalls\Modules\cellSync.h">
|
||||
<Filter>Emu\SysCalls\Modules</Filter>
|
||||
</ClInclude>
|
||||
|
Loading…
Reference in New Issue
Block a user