IRequest.cs 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. using Ryujinx.HLE.HOS.Ipc;
  2. using Ryujinx.HLE.Logging;
  3. using System;
  4. using System.Collections.Generic;
  5. namespace Ryujinx.HLE.HOS.Services.Mm
  6. {
  7. class IRequest : IpcService
  8. {
  9. private Dictionary<int, ServiceProcessRequest> m_Commands;
  10. public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
  11. public IRequest()
  12. {
  13. m_Commands = new Dictionary<int, ServiceProcessRequest>()
  14. {
  15. { 1, InitializeOld },
  16. { 4, Initialize },
  17. { 6, SetAndWait },
  18. { 7, Get }
  19. };
  20. }
  21. // InitializeOld(u32, u32, u32)
  22. public long InitializeOld(ServiceCtx Context)
  23. {
  24. int Unknown0 = Context.RequestData.ReadInt32();
  25. int Unknown1 = Context.RequestData.ReadInt32();
  26. int Unknown2 = Context.RequestData.ReadInt32();
  27. Context.Device.Log.PrintStub(LogClass.ServiceMm, "Stubbed.");
  28. return 0;
  29. }
  30. public long Initialize(ServiceCtx Context)
  31. {
  32. Context.Device.Log.PrintStub(LogClass.ServiceMm, "Stubbed.");
  33. return 0;
  34. }
  35. public long SetAndWait(ServiceCtx Context)
  36. {
  37. Context.Device.Log.PrintStub(LogClass.ServiceMm, "Stubbed.");
  38. return 0;
  39. }
  40. public long Get(ServiceCtx Context)
  41. {
  42. Context.ResponseData.Write(0);
  43. Context.Device.Log.PrintStub(LogClass.ServiceMm, "Stubbed.");
  44. return 0;
  45. }
  46. }
  47. }