Allow to enable/disable memory checks even on release mode through the flag, return error for invalid addresses on SvcMap*Memory svcs, do not return error on SvcQueryMemory (instead, return reserved for the end of the address space), other minor tweaks
This commit is contained in:
parent
553f6c2976
commit
3777fb44cf
15 changed files with 516 additions and 263 deletions
|
@ -1,18 +1,12 @@
|
|||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.IO;
|
||||
|
||||
namespace Ryujinx.Core.Loaders.Executables
|
||||
{
|
||||
class Nro : IExecutable
|
||||
{
|
||||
private byte[] m_Text;
|
||||
private byte[] m_RO;
|
||||
private byte[] m_Data;
|
||||
|
||||
public ReadOnlyCollection<byte> Text => Array.AsReadOnly(m_Text);
|
||||
public ReadOnlyCollection<byte> RO => Array.AsReadOnly(m_RO);
|
||||
public ReadOnlyCollection<byte> Data => Array.AsReadOnly(m_Data);
|
||||
public byte[] Text { get; private set; }
|
||||
public byte[] RO { get; private set; }
|
||||
public byte[] Data { get; private set; }
|
||||
|
||||
public int Mod0Offset { get; private set; }
|
||||
public int TextOffset { get; private set; }
|
||||
|
@ -54,9 +48,9 @@ namespace Ryujinx.Core.Loaders.Executables
|
|||
return Reader.ReadBytes(Size);
|
||||
}
|
||||
|
||||
m_Text = Read(TextOffset, TextSize);
|
||||
m_RO = Read(ROOffset, ROSize);
|
||||
m_Data = Read(DataOffset, DataSize);
|
||||
Text = Read(TextOffset, TextSize);
|
||||
RO = Read(ROOffset, ROSize);
|
||||
Data = Read(DataOffset, DataSize);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue