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:
11
Ryujinx/OsHle/Exceptions/GuestBrokeExecutionException.cs
Normal file
11
Ryujinx/OsHle/Exceptions/GuestBrokeExecutionException.cs
Normal 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) { }
|
||||
}
|
||||
}
|
@@ -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
|
||||
{
|
||||
|
@@ -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++)
|
||||
|
@@ -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; }
|
||||
|
@@ -1,4 +1,4 @@
|
||||
using Ryujinx.OsHle.Objects;
|
||||
using Ryujinx.OsHle.Objects.Am;
|
||||
|
||||
using static Ryujinx.OsHle.Objects.ObjHelper;
|
||||
|
||||
|
@@ -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"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user