Initiale hbmenu.nro support (#32)
* Initiale hbmenu.nro support Implement missing SetScreenShotPermission object. Implement missing IsCurrentProcessBeingDebugged in SVC. Add a Extension variable to Executable. Add basic support of hbmenu.nro. * Homebrew.cs correction
This commit is contained in:
parent
b2f733da78
commit
224211367f
8 changed files with 110 additions and 36 deletions
|
@ -2,6 +2,12 @@ using System.Collections.ObjectModel;
|
|||
|
||||
namespace Ryujinx.Core.Loaders.Executables
|
||||
{
|
||||
public enum Extensions
|
||||
{
|
||||
NRO,
|
||||
NSO
|
||||
}
|
||||
|
||||
public interface IExecutable
|
||||
{
|
||||
ReadOnlyCollection<byte> Text { get; }
|
||||
|
@ -13,5 +19,7 @@ namespace Ryujinx.Core.Loaders.Executables
|
|||
int ROOffset { get; }
|
||||
int DataOffset { get; }
|
||||
int BssSize { get; }
|
||||
|
||||
Extensions Extension { get; }
|
||||
}
|
||||
}
|
|
@ -20,6 +20,8 @@ namespace Ryujinx.Core.Loaders.Executables
|
|||
public int DataOffset { get; private set; }
|
||||
public int BssSize { get; private set; }
|
||||
|
||||
public Extensions Extension { get; private set; }
|
||||
|
||||
public Nro(Stream Input)
|
||||
{
|
||||
BinaryReader Reader = new BinaryReader(Input);
|
||||
|
@ -47,6 +49,8 @@ namespace Ryujinx.Core.Loaders.Executables
|
|||
this.DataOffset = DataOffset;
|
||||
this.BssSize = BssSize;
|
||||
|
||||
this.Extension = Extensions.NRO;
|
||||
|
||||
byte[] Read(long Position, int Size)
|
||||
{
|
||||
Input.Seek(Position, SeekOrigin.Begin);
|
||||
|
|
|
@ -21,6 +21,8 @@ namespace Ryujinx.Core.Loaders.Executables
|
|||
public int DataOffset { get; private set; }
|
||||
public int BssSize { get; private set; }
|
||||
|
||||
public Extensions Extension { get; private set; }
|
||||
|
||||
[Flags]
|
||||
private enum NsoFlags
|
||||
{
|
||||
|
@ -79,6 +81,8 @@ namespace Ryujinx.Core.Loaders.Executables
|
|||
this.DataOffset = DataMemOffset;
|
||||
this.BssSize = BssSize;
|
||||
|
||||
this.Extension = Extensions.NSO;
|
||||
|
||||
//Text segment
|
||||
Input.Seek(TextOffset, SeekOrigin.Begin);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue