HvCpuContext.cs 1.3 KB

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