2023-01-29 08:37:52 -03:00
|
|
|
using ARMeilleure.Memory;
|
2023-09-25 20:18:32 -03:00
|
|
|
using System.Runtime.Versioning;
|
2023-01-29 08:37:52 -03:00
|
|
|
|
|
|
|
namespace Ryujinx.Cpu.AppleHv
|
|
|
|
{
|
2023-09-25 20:18:32 -03:00
|
|
|
[SupportedOSPlatform("macos")]
|
2023-01-29 08:37:52 -03:00
|
|
|
class HvCpuContext : ICpuContext
|
|
|
|
{
|
|
|
|
private readonly ITickSource _tickSource;
|
|
|
|
private readonly HvMemoryManager _memoryManager;
|
|
|
|
|
|
|
|
public HvCpuContext(ITickSource tickSource, IMemoryManager memory, bool for64Bit)
|
|
|
|
{
|
|
|
|
_tickSource = tickSource;
|
|
|
|
_memoryManager = (HvMemoryManager)memory;
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
|
public IExecutionContext CreateExecutionContext(ExceptionCallbacks exceptionCallbacks)
|
|
|
|
{
|
|
|
|
return new HvExecutionContext(_tickSource, exceptionCallbacks);
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
|
public void Execute(IExecutionContext context, ulong address)
|
|
|
|
{
|
|
|
|
((HvExecutionContext)context).Execute(_memoryManager, address);
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <inheritdoc/>
|
|
|
|
public void InvalidateCacheRegion(ulong address, ulong size)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
public IDiskCacheLoadState LoadDiskCache(string titleIdText, string displayVersion, bool enabled)
|
|
|
|
{
|
|
|
|
return new DummyDiskCacheLoadState();
|
|
|
|
}
|
|
|
|
|
|
|
|
public void PrepareCodeRange(ulong address, ulong size)
|
|
|
|
{
|
|
|
|
}
|
2024-01-20 11:11:28 -03:00
|
|
|
|
|
|
|
public void Dispose()
|
|
|
|
{
|
|
|
|
}
|
2023-01-29 08:37:52 -03:00
|
|
|
}
|
2023-07-01 04:18:52 +02:00
|
|
|
}
|