11// Copyright (c) MOSA Project. Licensed under the New BSD License.
22
3- using Mosa . ClassLib ;
43using Mosa . Runtime ;
54using Mosa . Runtime . x86 ;
65using System ;
@@ -315,7 +314,6 @@ private static void ProcessCommand()
315314 case DebugCode . ClearMemory : ClearMemory ( ) ; return ;
316315 case DebugCode . HardJump : HardJump ( ) ; return ;
317316 case DebugCode . ExecuteUnitTest : QueueUnitTest ( ) ; return ;
318- case DebugCode . GetMemoryCRC : GetMemoryCRC ( ) ; return ;
319317 default : return ;
320318 }
321319 }
@@ -399,11 +397,10 @@ private static void CompressedWriteMemory()
399397 uint address = GetDataUInt32 ( 0 ) ;
400398 uint length = GetDataUInt32 ( 4 ) ;
401399 uint size = GetDataUInt32 ( 8 ) ;
402- uint uncompresscrc = GetDataUInt32 ( 12 ) ;
403400
404- LZF . Decompress ( new IntPtr ( Address . DebuggerBuffer + HeaderSize ) , length , new IntPtr ( address ) , size ) ;
401+ //uint uncompresscrc = GetDataUInt32(12 );
405402
406- uint computedcrc = ComputeMemoryCRC ( address , size ) ;
403+ LZF . Decompress ( new IntPtr ( Address . DebuggerBuffer + HeaderSize ) , length , new IntPtr ( address ) , size ) ;
407404
408405 Screen . Goto ( 15 , 0 ) ;
409406 Screen . ClearRow ( ) ;
@@ -419,12 +416,13 @@ private static void CompressedWriteMemory()
419416 Screen . Write ( " Size: " ) ;
420417 Screen . Write ( size , 10 , 5 ) ;
421418 Screen . Write ( " CRC: " ) ;
422- Screen . Write ( uncompresscrc , 16 , 8 ) ;
423419
424- if ( uncompresscrc == computedcrc )
425- Screen . Write ( " OK" ) ;
426- else
427- Screen . Write ( " BAD" ) ;
420+ //Screen.Write(uncompresscrc, 16, 8);
421+
422+ //if (uncompresscrc == computedcrc)
423+ // Screen.Write(" OK");
424+ //else
425+ // Screen.Write(" BAD");
428426
429427 SendResponse ( id , DebugCode . CompressedWriteMemory ) ;
430428 }
@@ -454,31 +452,6 @@ private static void ClearMemory()
454452 SendResponse ( id , DebugCode . ClearMemory ) ;
455453 }
456454
457- private static void GetMemoryCRC ( )
458- {
459- uint id = GetID ( ) ;
460- uint start = GetDataUInt32 ( 0 ) ;
461- uint length = GetDataUInt32 ( 4 ) ;
462-
463- uint crc = ComputeMemoryCRC ( start , length ) ;
464-
465- SendResponseStart ( id , DebugCode . GetMemoryCRC , 4 ) ;
466- SendInteger ( crc ) ;
467- }
468-
469- private static uint ComputeMemoryCRC ( uint start , uint length )
470- {
471- uint crc = CRC . InitialCRC ;
472-
473- for ( uint i = 0 ; i < length ; i ++ )
474- {
475- byte b = Intrinsic . Load8 ( new IntPtr ( start ) , i ) ;
476- crc = CRC . Update ( crc , b ) ;
477- }
478-
479- return crc ;
480- }
481-
482455 private static void QueueUnitTest ( )
483456 {
484457 uint id = GetID ( ) ;
0 commit comments