HLE: Fix integer sign inconcistency accross the codebase (#2222)
* Make all title id instances unsigned * Replace address and size with ulong instead of signed types Long overdue change. Also change some logics here and there to optimize with the new memory manager. * Address Ac_K's comments * Remove uneeded cast all around * Fixes some others misalignment
This commit is contained in:
parent
c46f6879ff
commit
305f06eb71
73 changed files with 707 additions and 716 deletions
|
@ -40,7 +40,7 @@ namespace Ryujinx.HLE.HOS.Services.Ro
|
|||
_owner = null;
|
||||
}
|
||||
|
||||
private ResultCode ParseNrr(out NrrInfo nrrInfo, ServiceCtx context, long nrrAddress, long nrrSize)
|
||||
private ResultCode ParseNrr(out NrrInfo nrrInfo, ServiceCtx context, ulong nrrAddress, ulong nrrSize)
|
||||
{
|
||||
nrrInfo = null;
|
||||
|
||||
|
@ -71,12 +71,12 @@ namespace Ryujinx.HLE.HOS.Services.Ro
|
|||
{
|
||||
byte[] temp = new byte[0x20];
|
||||
|
||||
_owner.CpuMemory.Read((ulong)(nrrAddress + header.HashOffset + (i * 0x20)), temp);
|
||||
_owner.CpuMemory.Read(nrrAddress + header.HashOffset + (uint)(i * 0x20), temp);
|
||||
|
||||
hashes.Add(temp);
|
||||
}
|
||||
|
||||
nrrInfo = new NrrInfo(nrrAddress, header, hashes);
|
||||
nrrInfo = new NrrInfo((ulong)nrrAddress, header, hashes);
|
||||
|
||||
return ResultCode.Success;
|
||||
}
|
||||
|
@ -333,7 +333,7 @@ namespace Ryujinx.HLE.HOS.Services.Ro
|
|||
process.CpuMemory.Write(roStart, relocatableObject.Ro);
|
||||
process.CpuMemory.Write(dataStart, relocatableObject.Data);
|
||||
|
||||
MemoryHelper.FillWithZeros(process.CpuMemory, (long)bssStart, (int)(bssEnd - bssStart));
|
||||
MemoryHelper.FillWithZeros(process.CpuMemory, bssStart, (int)(bssEnd - bssStart));
|
||||
|
||||
KernelResult result;
|
||||
|
||||
|
@ -354,7 +354,7 @@ namespace Ryujinx.HLE.HOS.Services.Ro
|
|||
return process.MemoryManager.SetProcessMemoryPermission(dataStart, bssEnd - dataStart, KMemoryPermission.ReadAndWrite);
|
||||
}
|
||||
|
||||
private ResultCode RemoveNrrInfo(long nrrAddress)
|
||||
private ResultCode RemoveNrrInfo(ulong nrrAddress)
|
||||
{
|
||||
foreach (NrrInfo info in _nrrInfos)
|
||||
{
|
||||
|
@ -508,8 +508,8 @@ namespace Ryujinx.HLE.HOS.Services.Ro
|
|||
// pid placeholder, zero
|
||||
context.RequestData.ReadUInt64();
|
||||
|
||||
long nrrAddress = context.RequestData.ReadInt64();
|
||||
long nrrSize = context.RequestData.ReadInt64();
|
||||
ulong nrrAddress = context.RequestData.ReadUInt64();
|
||||
ulong nrrSize = context.RequestData.ReadUInt64();
|
||||
|
||||
if (result == ResultCode.Success)
|
||||
{
|
||||
|
@ -541,7 +541,7 @@ namespace Ryujinx.HLE.HOS.Services.Ro
|
|||
// pid placeholder, zero
|
||||
context.RequestData.ReadUInt64();
|
||||
|
||||
long nrrHeapAddress = context.RequestData.ReadInt64();
|
||||
ulong nrrHeapAddress = context.RequestData.ReadUInt64();
|
||||
|
||||
if (result == ResultCode.Success)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue