IpcPtrBuffDesc.cs 692 B

1234567891011121314151617181920212223242526
  1. using System.IO;
  2. namespace Ryujinx.HLE.OsHle.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. }