SysCall improvements

This commit is contained in:
Raul Tambre 2015-07-09 20:19:29 +03:00
parent 0acd37a328
commit 909b512493
5 changed files with 34 additions and 8 deletions

View file

@ -109,8 +109,8 @@ s32 cellGameBootCheck(vm::ptr<u32> type, vm::ptr<u32> attributes, vm::ptr<CellGa
if (!psf)
{
// According to testing (in debug mode) cellGameBootCheck doesn't return an error code, when PARAM.SFO doesn't exsist.
cellGame.Error("cellGameBootCheck(): Cannot read PARAM.SFO)");
// According to testing (in debug mode) cellGameBootCheck doesn't return an error code, when PARAM.SFO doesn't exist.
cellGame.Error("cellGameBootCheck(): Cannot read PARAM.SFO.");
}
std::string category = psf.GetString("CATEGORY");

View file

@ -3,6 +3,7 @@
#include "Emu/System.h"
#include "Emu/SysCalls/Modules.h"
#include "rpcs3/Ini.h"
#include "cellSysutil.h"
#include "cellNetCtl.h"
@ -48,7 +49,15 @@ int cellNetCtlGetState(vm::ptr<u32> state)
{
cellNetCtl.Warning("cellNetCtlGetState(state_addr=0x%x)", state.addr());
*state = CELL_NET_CTL_STATE_Disconnected; // TODO: Allow other states
// Do we need to allow any other connection states?
if (Ini.Connected.GetValue())
{
*state = CELL_NET_CTL_STATE_IPObtained;
}
else
{
*state = CELL_NET_CTL_STATE_Disconnected;
}
return CELL_OK;
}

View file

@ -180,9 +180,12 @@ int sceNpDrmExecuteGamePurchase()
return CELL_OK;
}
int sceNpDrmGetTimelimit(u32 drm_path_addr, vm::ptr<u64> time_remain_usec)
int sceNpDrmGetTimelimit(vm::ptr<const char> path, vm::ptr<u64> time_remain)
{
UNIMPLEMENTED_FUNC(sceNp);
sceNp.Warning("sceNpDrmGetTimelimit(path_addr=0x%x, time_remain=0x%x)", path.addr(), time_remain.addr());
*time_remain = 0x7FFFFFFFFFFFFFFFULL;
return CELL_OK;
}

View file

@ -22,7 +22,17 @@ s32 sys_tty_write(s32 ch, vm::ptr<const void> buf, u32 len, vm::ptr<u32> pwritel
{
sys_tty.Log("sys_tty_write(ch=%d, buf_addr=0x%x, len=%d, preadlen_addr=0x%x)", ch, buf.addr(), len, pwritelen.addr());
if(ch > 15 || (s32)len <= 0) return CELL_EINVAL;
if (ch > 15)
{
sys_tty.Error("sys_tty_write(): specified channel was higher than 15.");
return CELL_EINVAL;
}
if ((s32) len <= 0)
{
sys_tty.Error("sys_tty_write(): specified length was 0.");
return CELL_OK;
}
const std::string data((const char*)buf.get_ptr(), len);

View file

@ -146,6 +146,7 @@ public:
// HLE/Miscs
IniEntry<u8> HLELogLvl;
IniEntry<bool> Connected;
IniEntry<bool> HLELogging;
IniEntry<bool> RSXLogging;
IniEntry<bool> HLEHookStFunc;
@ -153,11 +154,11 @@ public:
IniEntry<bool> HLEExitOnStop;
IniEntry<bool> HLEAlwaysStart;
//Auto Pause
// Auto Pause
IniEntry<bool> DBGAutoPauseSystemCall;
IniEntry<bool> DBGAutoPauseFunctionCall;
//Customed EmulationDir
// Custom EmulationDir
IniEntry<std::string> SysEmulationDirPath;
IniEntry<bool> SysEmulationDirPathEnable;
@ -228,6 +229,7 @@ public:
// HLE/Misc
HLELogging.Init("HLE_HLELogging", path);
RSXLogging.Init("RSX_Logging", path);
Connected.Init("NET_Connected", path);
HLEHookStFunc.Init("HLE_HLEHookStFunc", path);
HLESaveTTY.Init("HLE_HLESaveTTY", path);
HLEExitOnStop.Init("HLE_HLEExitOnStop", path);
@ -305,6 +307,7 @@ public:
// HLE/Miscs
HLELogging.Load(false);
RSXLogging.Load(false);
Connected.Load(true);
HLEHookStFunc.Load(false);
HLESaveTTY.Load(false);
HLEExitOnStop.Load(false);
@ -382,6 +385,7 @@ public:
// HLE/Miscs
HLELogging.Save();
RSXLogging.Save();
Connected.Save();
HLEHookStFunc.Save();
HLESaveTTY.Save();
HLEExitOnStop.Save();