mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-02-21 00:39:53 +00:00
Few module functions added
Implemented: * cellSysutilApGetRequiredMemSize * cellGameContentErrorDialog Binded lv2 SysCall 814 to cellFsUnlink
This commit is contained in:
parent
4d98826259
commit
8adf19c904
@ -92,6 +92,17 @@ enum
|
||||
CELL_GAME_PARAMID_APP_VER = 106,
|
||||
};
|
||||
|
||||
//Error dialog types
|
||||
enum
|
||||
{
|
||||
CELL_GAME_ERRDIALOG_BROKEN_GAMEDATA = 0,
|
||||
CELL_GAME_ERRDIALOG_BROKEN_HDDGAME = 1,
|
||||
CELL_GAME_ERRDIALOG_NOSPACE = 2,
|
||||
CELL_GAME_ERRDIALOG_BROKEN_EXIT_GAMEDATA = 100,
|
||||
CELL_GAME_ERRDIALOG_BROKEN_EXIT_HDDGAME = 101,
|
||||
CELL_GAME_ERRDIALOG_NOSPACE_EXIT = 102,
|
||||
};
|
||||
|
||||
struct CellGameContentSize
|
||||
{
|
||||
be_t<s32> hddFreeSizeKB;
|
||||
@ -260,9 +271,28 @@ int cellGameGetLocalWebContentPath()
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
int cellGameContentErrorDialog()
|
||||
int cellGameContentErrorDialog(s32 type, s32 errNeedSizeKB, u32 dirName_addr)
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellGame);
|
||||
cellGame.Warning("cellGameContentErrorDialog(type=%d, errNeedSizeKB=%d, dirName_addr=0x%x)", type, errNeedSizeKB, dirName_addr);
|
||||
|
||||
if (Memory.IsGoodAddr(dirName_addr))
|
||||
return CELL_GAME_ERROR_PARAM;
|
||||
|
||||
char* dirName = (char*)Memory.VirtualToRealAddr(dirName_addr);
|
||||
std::string errorName;
|
||||
switch(type)
|
||||
{
|
||||
case CELL_GAME_ERRDIALOG_BROKEN_GAMEDATA: errorName = "Game data is corrupted (can be continued)."; break;
|
||||
case CELL_GAME_ERRDIALOG_BROKEN_HDDGAME: errorName = "HDD boot game is corrupted (can be continued)."; break;
|
||||
case CELL_GAME_ERRDIALOG_NOSPACE: errorName = "Not enough available space (can be continued)."; break;
|
||||
case CELL_GAME_ERRDIALOG_BROKEN_EXIT_GAMEDATA: errorName = "Game data is corrupted (terminate application)."; break;
|
||||
case CELL_GAME_ERRDIALOG_BROKEN_EXIT_HDDGAME: errorName = "HDD boot game is corrupted (terminate application)."; break;
|
||||
case CELL_GAME_ERRDIALOG_NOSPACE_EXIT: errorName = "Not enough available space (terminate application)."; break;
|
||||
default: return CELL_GAME_ERROR_PARAM;
|
||||
}
|
||||
|
||||
std::string errorMsg = wxString::Format("%s\nSpace needed: %d KB\nDirectory name: %s", errorName.c_str(), errNeedSizeKB, dirName);
|
||||
wxMessageBox(errorMsg, wxGetApp().GetAppName(), wxICON_ERROR | wxOK);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
@ -18,10 +18,10 @@ enum
|
||||
CELL_SYSUTIL_AP_ERROR_NETIF_CANNOT_CONNECT = 0x8002cd16,
|
||||
};
|
||||
|
||||
int cellSysutilApGetRequiredMemSize()
|
||||
s32 cellSysutilApGetRequiredMemSize()
|
||||
{
|
||||
UNIMPLEMENTED_FUNC(cellSysutilAp);
|
||||
return CELL_OK;
|
||||
cellSysutilAp.Log("cellSysutilApGetRequiredMemSize()");
|
||||
return 1024*1024; // Return 1 MB as required size
|
||||
}
|
||||
|
||||
int cellSysutilApOn()
|
||||
|
@ -248,7 +248,7 @@ static func_caller* sc_table[1024] =
|
||||
bind_func(cellFsMkdir), //811 (0x32B)
|
||||
bind_func(cellFsRename), //812 (0x32C)
|
||||
bind_func(cellFsRmdir), //813 (0x32D)
|
||||
null_func, //814 (0x32E)
|
||||
bind_func(cellFsUnlink), //814 (0x32E)
|
||||
null_func, null_func, null_func, bind_func(cellFsLseek), null_func, //819
|
||||
null_func, null_func, null_func, null_func, null_func, //824
|
||||
null_func, null_func, null_func, null_func, null_func, //829
|
||||
|
@ -286,6 +286,7 @@
|
||||
<ClCompile Include="Emu\SysCalls\Modules\cellSync.cpp" />
|
||||
<ClCompile Include="Emu\SysCalls\Modules\cellSysmodule.cpp" />
|
||||
<ClCompile Include="Emu\SysCalls\Modules\cellSysutil.cpp" />
|
||||
<ClCompile Include="Emu\SysCalls\Modules\cellSysutilAp.cpp" />
|
||||
<ClCompile Include="Emu\SysCalls\Modules\sysPrxForUser.cpp" />
|
||||
<ClCompile Include="Emu\SysCalls\Modules\sys_fs.cpp" />
|
||||
<ClCompile Include="Emu\SysCalls\Modules\sys_io.cpp" />
|
||||
|
@ -385,6 +385,9 @@
|
||||
<ClCompile Include="Emu\SysCalls\lv2\SC_Event_flag.cpp">
|
||||
<Filter>Emu\SysCalls\lv2</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Emu\SysCalls\Modules\cellSysutilAp.cpp">
|
||||
<Filter>Emu\SysCalls\Modules</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="rpcs3.rc" />
|
||||
|
Loading…
x
Reference in New Issue
Block a user