HvCpuContext.cs
1 using ARMeilleure.Memory; 2 using System.Runtime.Versioning; 3 4 namespace Ryujinx.Cpu.AppleHv 5 { 6 [SupportedOSPlatform("macos")] 7 class HvCpuContext : ICpuContext 8 { 9 private readonly ITickSource _tickSource; 10 private readonly HvMemoryManager _memoryManager; 11 12 public HvCpuContext(ITickSource tickSource, IMemoryManager memory, bool for64Bit) 13 { 14 _tickSource = tickSource; 15 _memoryManager = (HvMemoryManager)memory; 16 } 17 18 /// <inheritdoc/> 19 public IExecutionContext CreateExecutionContext(ExceptionCallbacks exceptionCallbacks) 20 { 21 return new HvExecutionContext(_tickSource, exceptionCallbacks); 22 } 23 24 /// <inheritdoc/> 25 public void Execute(IExecutionContext context, ulong address) 26 { 27 ((HvExecutionContext)context).Execute(_memoryManager, address); 28 } 29 30 /// <inheritdoc/> 31 public void InvalidateCacheRegion(ulong address, ulong size) 32 { 33 } 34 35 public IDiskCacheLoadState LoadDiskCache(string titleIdText, string displayVersion, bool enabled) 36 { 37 return new DummyDiskCacheLoadState(); 38 } 39 40 public void PrepareCodeRange(ulong address, ulong size) 41 { 42 } 43 44 public void Dispose() 45 { 46 } 47 } 48 }