private static void CompressedWriteMemory() { uint id = GetID(); uint address = GetDataUInt32(0); uint length = GetDataUInt32(4); uint size = GetDataUInt32(8); //uint uncompresscrc = GetDataUInt32(12); LZF.Decompress(new IntPtr(Address.DebuggerBuffer + HeaderSize), length, new IntPtr(address), size); Screen.Goto(15, 0); Screen.ClearRow(); Screen.Write("[CompressedWriteMemory]"); Screen.NextLine(); Screen.ClearRow(); Screen.Write("ID: "); Screen.Write(id, 10, 5); Screen.Write(" Address: "); Screen.Write(address, 16, 8); Screen.Write(" Len: "); Screen.Write(length, 10, 5); Screen.Write(" Size: "); Screen.Write(size, 10, 5); Screen.Write(" CRC: "); //Screen.Write(uncompresscrc, 16, 8); //if (uncompresscrc == computedcrc) // Screen.Write(" OK"); //else // Screen.Write(" BAD"); SendResponse(id, DebugCode.CompressedWriteMemory); }
private static void CompressedWriteMemory() { uint id = GetID(); uint address = GetUInt32(16); uint length = GetUInt32(20); uint size = GetUInt32(24); uint uncompresscrc = GetUInt32(28); LZF.Decompress(Address.DebuggerBuffer + 32, length, address, size); uint computedcrc = ComputeMemoryCRC(address, size); Screen.Goto(15, 0); Screen.ClearRow(); Screen.Write("[CompressedWriteMemory]"); Screen.NextLine(); Screen.ClearRow(); Screen.Write("ID: "); Screen.Write((uint)id, 10, 5); Screen.Write(" Address: "); Screen.Write(address, 16, 8); Screen.Write(" Len: "); Screen.Write(length, 10, 5); Screen.Write(" Size: "); Screen.Write(size, 10, 5); Screen.Write(" CRC: "); Screen.Write(uncompresscrc, 16, 8); if (uncompresscrc == computedcrc) { Screen.Write(" OK"); } else { Screen.Write(" BAD"); } SendResponse(id, DebugCode.CompressedWriteMemory); }