1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-25 04:02:42 +01:00

Minor changes

* Fixed some forgotten `!` in cellFsGetFreeSize.
* Fixed VSUM2SWS opcode.
* Added cellNetCtl to the project.
* Implemented cellNetCtlGetState.
This commit is contained in:
Alexandro Sánchez Bach 2014-03-04 15:40:15 +01:00
parent bc77f27bb2
commit 8204deaae6
6 changed files with 24 additions and 6 deletions

View File

@ -525,7 +525,7 @@ bool SELFDecrypter::GetKeyFromRap(u8 *content_id, u8 *npdrm_key)
return false;
}
ConLog.Write("Loading RAP file %s", ci_str.wc_str() + wchar_t(".rap"));
ConLog.Write("Loading RAP file %s", ci_str.wc_str() + wchar_t(".rap"));
rap_file.Read(rap_key, 0x10);
rap_file.Close();

View File

@ -1889,8 +1889,6 @@ private:
}
void VSUM2SWS(u32 vd, u32 va, u32 vb)
{
CPU.VPR[vd].Clear();
for (uint n = 0; n < 2; n++)
{
s64 sum = (s64)CPU.VPR[va]._s32[n*2] + CPU.VPR[va]._s32[n*2 + 1] + CPU.VPR[vb]._s32[n*2];
@ -1908,6 +1906,8 @@ private:
else
CPU.VPR[vd]._s32[n*2] = (s32)sum;
}
CPU.VPR[vd]._s32[1] = 0;
CPU.VPR[vd]._s32[3] = 0;
}
void VSUM4SBS(u32 vd, u32 va, u32 vb)
{

View File

@ -45,6 +45,15 @@ enum
CELL_NET_CTL_ERROR_DHCP_LEASE_TIME = 0x80130504,
};
// Network connection states
enum
{
CELL_NET_CTL_STATE_Disconnected = 0,
CELL_NET_CTL_STATE_Connecting = 1,
CELL_NET_CTL_STATE_IPObtaining = 2,
CELL_NET_CTL_STATE_IPObtained = 3,
};
int cellNetCtlInit()
{
UNIMPLEMENTED_FUNC(cellNetCtl);
@ -57,9 +66,14 @@ int cellNetCtlTerm()
return CELL_OK;
}
int cellNetCtlGetState()
int cellNetCtlGetState(mem32_t state)
{
UNIMPLEMENTED_FUNC(cellNetCtl);
cellNetCtl.Log("cellNetCtlGetState(state_addr=0x%x)", state.GetAddr());
if (!state.IsGood())
return CELL_NET_CTL_ERROR_INVALID_ADDR;
state = CELL_NET_CTL_STATE_Disconnected; // TODO: Allow other states
return CELL_OK;
}

View File

@ -472,7 +472,7 @@ int cellFsGetFreeSize(u32 path_addr, mem32_t block_size, mem64_t block_count)
sys_fs.Warning("cellFsGetFreeSize(path=\"%s\", block_size_addr=0x%x, block_count_addr=0x%x)",
ps3_path.wx_str(), block_size.GetAddr(), block_count.GetAddr());
if (Memory.IsGoodAddr(path_addr) || !block_size.IsGood() || !block_count.IsGood())
if (!Memory.IsGoodAddr(path_addr) || !block_size.IsGood() || !block_count.IsGood())
return CELL_EFAULT;
if (ps3_path.empty())

View File

@ -291,6 +291,7 @@
<ClCompile Include="Emu\SysCalls\Modules\cellGcmSys.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\cellGifDec.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\cellJpgDec.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\cellNetCtl.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\cellPamf.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\cellPngDec.cpp" />
<ClCompile Include="Emu\SysCalls\Modules\cellResc.cpp" />

View File

@ -436,6 +436,9 @@
<ClCompile Include="Crypto\utils.cpp">
<Filter>Crypto</Filter>
</ClCompile>
<ClCompile Include="Emu\SysCalls\Modules\cellNetCtl.cpp">
<Filter>Emu\SysCalls\Modules</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="rpcs3.rc" />