IpcPtrBuffDesc.cs 690 B

1234567891011121314151617181920212223242526
  1. using System.IO;
  2. namespace Ryujinx.HLE.HOS.Ipc
  3. {
  4. struct IpcPtrBuffDesc
  5. {
  6. public long Position { get; private set; }
  7. public int Index { get; private set; }
  8. public long Size { get; private set; }
  9. public IpcPtrBuffDesc(BinaryReader reader)
  10. {
  11. long word0 = reader.ReadUInt32();
  12. long word1 = reader.ReadUInt32();
  13. Position = word1;
  14. Position |= (word0 << 20) & 0x0f00000000;
  15. Position |= (word0 << 30) & 0x7000000000;
  16. Index = ((int)word0 >> 0) & 0x03f;
  17. Index |= ((int)word0 >> 3) & 0x1c0;
  18. Size = (ushort)(word0 >> 16);
  19. }
  20. }
  21. }