diff --git a/rpcs3/Emu/SysCalls/Modules/cellGame.cpp b/rpcs3/Emu/SysCalls/Modules/cellGame.cpp index 886fe650f3..d89d3dbbb6 100644 --- a/rpcs3/Emu/SysCalls/Modules/cellGame.cpp +++ b/rpcs3/Emu/SysCalls/Modules/cellGame.cpp @@ -109,8 +109,8 @@ s32 cellGameBootCheck(vm::ptr type, vm::ptr attributes, vm::ptr 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; } diff --git a/rpcs3/Emu/SysCalls/Modules/sceNp.cpp b/rpcs3/Emu/SysCalls/Modules/sceNp.cpp index 45bfed97a2..8c30d2951e 100644 --- a/rpcs3/Emu/SysCalls/Modules/sceNp.cpp +++ b/rpcs3/Emu/SysCalls/Modules/sceNp.cpp @@ -180,9 +180,12 @@ int sceNpDrmExecuteGamePurchase() return CELL_OK; } -int sceNpDrmGetTimelimit(u32 drm_path_addr, vm::ptr time_remain_usec) +int sceNpDrmGetTimelimit(vm::ptr path, vm::ptr 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; } diff --git a/rpcs3/Emu/SysCalls/lv2/sys_tty.cpp b/rpcs3/Emu/SysCalls/lv2/sys_tty.cpp index 9c6125ade1..0263ac023d 100644 --- a/rpcs3/Emu/SysCalls/lv2/sys_tty.cpp +++ b/rpcs3/Emu/SysCalls/lv2/sys_tty.cpp @@ -22,7 +22,17 @@ s32 sys_tty_write(s32 ch, vm::ptr buf, u32 len, vm::ptr 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); diff --git a/rpcs3/Ini.h b/rpcs3/Ini.h index 19383577e5..3885040968 100644 --- a/rpcs3/Ini.h +++ b/rpcs3/Ini.h @@ -146,6 +146,7 @@ public: // HLE/Miscs IniEntry HLELogLvl; + IniEntry Connected; IniEntry HLELogging; IniEntry RSXLogging; IniEntry HLEHookStFunc; @@ -153,11 +154,11 @@ public: IniEntry HLEExitOnStop; IniEntry HLEAlwaysStart; - //Auto Pause + // Auto Pause IniEntry DBGAutoPauseSystemCall; IniEntry DBGAutoPauseFunctionCall; - //Customed EmulationDir + // Custom EmulationDir IniEntry SysEmulationDirPath; IniEntry 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();