mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-08-13 11:39:47 +00:00
SysCall improvements
This commit is contained in:
parent
0acd37a328
commit
909b512493
5 changed files with 34 additions and 8 deletions
|
@ -109,8 +109,8 @@ s32 cellGameBootCheck(vm::ptr<u32> type, vm::ptr<u32> attributes, vm::ptr<CellGa
|
||||||
|
|
||||||
if (!psf)
|
if (!psf)
|
||||||
{
|
{
|
||||||
// According to testing (in debug mode) cellGameBootCheck doesn't return an error code, when PARAM.SFO doesn't exsist.
|
// 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)");
|
cellGame.Error("cellGameBootCheck(): Cannot read PARAM.SFO.");
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string category = psf.GetString("CATEGORY");
|
std::string category = psf.GetString("CATEGORY");
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
#include "Emu/System.h"
|
#include "Emu/System.h"
|
||||||
#include "Emu/SysCalls/Modules.h"
|
#include "Emu/SysCalls/Modules.h"
|
||||||
|
|
||||||
|
#include "rpcs3/Ini.h"
|
||||||
#include "cellSysutil.h"
|
#include "cellSysutil.h"
|
||||||
#include "cellNetCtl.h"
|
#include "cellNetCtl.h"
|
||||||
|
|
||||||
|
@ -48,7 +49,15 @@ int cellNetCtlGetState(vm::ptr<u32> state)
|
||||||
{
|
{
|
||||||
cellNetCtl.Warning("cellNetCtlGetState(state_addr=0x%x)", state.addr());
|
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;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -180,9 +180,12 @@ int sceNpDrmExecuteGamePurchase()
|
||||||
return CELL_OK;
|
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;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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());
|
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);
|
const std::string data((const char*)buf.get_ptr(), len);
|
||||||
|
|
||||||
|
|
|
@ -146,6 +146,7 @@ public:
|
||||||
|
|
||||||
// HLE/Miscs
|
// HLE/Miscs
|
||||||
IniEntry<u8> HLELogLvl;
|
IniEntry<u8> HLELogLvl;
|
||||||
|
IniEntry<bool> Connected;
|
||||||
IniEntry<bool> HLELogging;
|
IniEntry<bool> HLELogging;
|
||||||
IniEntry<bool> RSXLogging;
|
IniEntry<bool> RSXLogging;
|
||||||
IniEntry<bool> HLEHookStFunc;
|
IniEntry<bool> HLEHookStFunc;
|
||||||
|
@ -153,11 +154,11 @@ public:
|
||||||
IniEntry<bool> HLEExitOnStop;
|
IniEntry<bool> HLEExitOnStop;
|
||||||
IniEntry<bool> HLEAlwaysStart;
|
IniEntry<bool> HLEAlwaysStart;
|
||||||
|
|
||||||
//Auto Pause
|
// Auto Pause
|
||||||
IniEntry<bool> DBGAutoPauseSystemCall;
|
IniEntry<bool> DBGAutoPauseSystemCall;
|
||||||
IniEntry<bool> DBGAutoPauseFunctionCall;
|
IniEntry<bool> DBGAutoPauseFunctionCall;
|
||||||
|
|
||||||
//Customed EmulationDir
|
// Custom EmulationDir
|
||||||
IniEntry<std::string> SysEmulationDirPath;
|
IniEntry<std::string> SysEmulationDirPath;
|
||||||
IniEntry<bool> SysEmulationDirPathEnable;
|
IniEntry<bool> SysEmulationDirPathEnable;
|
||||||
|
|
||||||
|
@ -228,6 +229,7 @@ public:
|
||||||
// HLE/Misc
|
// HLE/Misc
|
||||||
HLELogging.Init("HLE_HLELogging", path);
|
HLELogging.Init("HLE_HLELogging", path);
|
||||||
RSXLogging.Init("RSX_Logging", path);
|
RSXLogging.Init("RSX_Logging", path);
|
||||||
|
Connected.Init("NET_Connected", path);
|
||||||
HLEHookStFunc.Init("HLE_HLEHookStFunc", path);
|
HLEHookStFunc.Init("HLE_HLEHookStFunc", path);
|
||||||
HLESaveTTY.Init("HLE_HLESaveTTY", path);
|
HLESaveTTY.Init("HLE_HLESaveTTY", path);
|
||||||
HLEExitOnStop.Init("HLE_HLEExitOnStop", path);
|
HLEExitOnStop.Init("HLE_HLEExitOnStop", path);
|
||||||
|
@ -305,6 +307,7 @@ public:
|
||||||
// HLE/Miscs
|
// HLE/Miscs
|
||||||
HLELogging.Load(false);
|
HLELogging.Load(false);
|
||||||
RSXLogging.Load(false);
|
RSXLogging.Load(false);
|
||||||
|
Connected.Load(true);
|
||||||
HLEHookStFunc.Load(false);
|
HLEHookStFunc.Load(false);
|
||||||
HLESaveTTY.Load(false);
|
HLESaveTTY.Load(false);
|
||||||
HLEExitOnStop.Load(false);
|
HLEExitOnStop.Load(false);
|
||||||
|
@ -382,6 +385,7 @@ public:
|
||||||
// HLE/Miscs
|
// HLE/Miscs
|
||||||
HLELogging.Save();
|
HLELogging.Save();
|
||||||
RSXLogging.Save();
|
RSXLogging.Save();
|
||||||
|
Connected.Save();
|
||||||
HLEHookStFunc.Save();
|
HLEHookStFunc.Save();
|
||||||
HLESaveTTY.Save();
|
HLESaveTTY.Save();
|
||||||
HLEExitOnStop.Save();
|
HLEExitOnStop.Save();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue