1
1
mirror of https://github.com/ryujinx-mirror/ryujinx.git synced 2025-09-22 15:42:03 -05:00

Add BRK instruction, fix wrong namespace on one of Am interfaces, and disable Debug/Trace logs by default

This commit is contained in:
gdkchan
2018-02-10 10:24:16 -03:00
parent 276f9f6d48
commit 9063766ed6
12 changed files with 51 additions and 16 deletions

View File

@@ -0,0 +1,11 @@
using System;
namespace Ryujinx.OsHle.Exceptions
{
public class GuestBrokeExecutionException : Exception
{
private const string ExMsg = "The guest program broke execution!";
public GuestBrokeExecutionException() : base(ExMsg) { }
}
}

View File

@@ -1,10 +1,9 @@
using Ryujinx.OsHle.Ipc;
using Ryujinx.OsHle.Objects.Am;
using System.Collections.Generic;
using static Ryujinx.OsHle.Objects.ObjHelper;
namespace Ryujinx.OsHle.Objects
namespace Ryujinx.OsHle.Objects.Am
{
class IApplicationProxy : IIpcInterface
{

View File

@@ -1,7 +1,9 @@
using ChocolArm64;
using ChocolArm64.Memory;
using ChocolArm64.State;
using Ryujinx.Loaders;
using Ryujinx.Loaders.Executables;
using Ryujinx.OsHle.Exceptions;
using Ryujinx.OsHle.Handles;
using Ryujinx.OsHle.Svc;
using System;
@@ -135,6 +137,7 @@ namespace Ryujinx.OsHle
return -1;
}
Thread.Registers.Break += BreakHandler;
Thread.Registers.SvcCall += SvcHandler.SvcCall;
Thread.Registers.ProcessId = ProcessId;
Thread.Registers.ThreadId = Ns.Os.IdGen.GenerateId();
@@ -148,6 +151,11 @@ namespace Ryujinx.OsHle
return Handle;
}
private void BreakHandler(object sender, AExceptionEventArgs e)
{
throw new GuestBrokeExecutionException();
}
private int GetFreeTlsSlot(AThread Thread)
{
for (int Index = 1; Index < TotalTlsSlots; Index++)

View File

@@ -7,7 +7,7 @@ namespace Ryujinx.OsHle
{
class ServiceCtx
{
public Switch Ns { get; private set; }
public Switch Ns { get; private set; }
public AMemory Memory { get; private set; }
public HSession Session { get; private set; }
public IpcMessage Request { get; private set; }

View File

@@ -1,4 +1,4 @@
using Ryujinx.OsHle.Objects;
using Ryujinx.OsHle.Objects.Am;
using static Ryujinx.OsHle.Objects.ObjHelper;

View File

@@ -63,7 +63,7 @@ namespace Ryujinx.OsHle.Svc
Rng = new Random();
}
public void SvcCall(object sender, SvcEventArgs e)
public void SvcCall(object sender, AExceptionEventArgs e)
{
ARegisters Registers = (ARegisters)sender;
@@ -75,7 +75,7 @@ namespace Ryujinx.OsHle.Svc
}
else
{
throw new NotImplementedException(e.Id.ToString("x3"));
throw new NotImplementedException(e.Id.ToString("x4"));
}
}
}