anchor.diff:    end;
   
     // Extended with custom Read/Write commands which accept various types without asking for their length
  -  TKMemoryStreamBinary = class(TKMemoryStream)
  +  TKMSaveStreamBinary = class(TKSaveStream)
     public
       // Assert savegame sections
       procedure CheckMarker(const aTitle: string); override;
  
positive.code:   inherited Write(Pointer(Value)^, I * SizeOf(WideChar));
  end;
  
  function TKMemoryStreamBinary.Write(const Buffer; Count: Longint): Longint;
  begin
    Result := inherited Write(Buffer, Count);
  end;
  
  procedure TKMemoryStreamBinary.Read(out Value: TKMDirection);   begin inherited Read(Value, SizeOf(Value)); end;
  procedure TKMemoryStreamBinary.Read(out Value: TKMPoint);       begin inherited Read(Value, SizeOf(Value)); end;
  procedure TKMemoryStreamBinary.Read(out Value: TKMPointW);      begin inherited Read(Value, SizeOf(Value)); end;
  procedure TKMemoryStreamBinary.Read(out Value: TKMPointF);      begin inherited Read(Value, SizeOf(Value)); end;
  procedure TKMemoryStreamBinary.Read(out Value: TKMPointDir);    begin inherited Read(Value, SizeOf(Value)); end;
  procedure TKMemoryStreamBinary.Read(out Value: TKMRangeInt);    begin inherited Read(Value, SizeOf(Value)); end;
  procedure TKMemoryStreamBinary.Read(out Value: TKMRangeSingle); begin inherited Read(Value, SizeOf(Value)); end;
  procedure TKMemoryStreamBinary.Read(out Value: TKMRect);        begin inherited Read(Value, SizeOf(Value)); end;
  procedure TKMemoryStreamBinary.Read(out Value: Single);         begin inherited Read(Value, SizeOf(Value)); end;
  procedure TKMemoryStreamBinary.Read(out Value: Extended);       begin inherited Read(Value, SizeOf(Value)); end;
  procedure TKMemoryStreamBinary.Read(out Value: Integer);        begin inherited Read(Value, SizeOf(Value)); end;
  procedure TKMemoryStreamBinary.Read(out Value: Cardinal);       begin inherited Read(Value, SizeOf(Value)); end;
  procedure TKMemoryStreamBinary.Read(out Value: Byte);           begin inherited Read(Value, SizeOf(Value)); end;
  procedure TKMemoryStreamBinary.Read(out Value: Boolean);        begin inherited Read(Value, SizeOf(Value)); end;
  procedure TKMemoryStreamBinary.Read(out Value: Word);           begin inherited Read(Value, SizeOf(Value)); end;
  procedure TKMemoryStreamBinary.Read(out Value: ShortInt);       begin inherited Read(Value, SizeOf(Value)); end;
  procedure TKMemoryStreamBinary.Read(out Value: SmallInt);       begin inherited Read(Value, SizeOf(Value)); end;
  procedure TKMemoryStreamBinary.Read(out Value: TDateTime);      begin inherited Read(Value, SizeOf(Value)); end;
  
  
  procedure TKMemoryStreamBinary.Write(const Value: TKMDirection);   begin inherited Write(Value, SizeOf(Value)); end;
  procedure TKMemoryStreamBinary.Write(const Value: TKMPoint);       begin inherited Write(Value, SizeOf(Value)); end;
  procedure TKMemoryStreamBinary.Write(const Value: TKMPointW);      begin inherited Write(Value, SizeOf(Value)); end;
  procedure TKMemoryStreamBinary.Write(const Value: TKMPointF);      begin inherited Write(Value, SizeOf(Value)); end;
  procedure TKMemoryStreamBinary.Write(const Value: TKMPointDir);    begin inherited Write(Value, SizeOf(Value)); end;
  procedure TKMemoryStreamBinary.Write(const Value: TKMRangeInt);    begin inherited Write(Value, SizeOf(Value)); end;
  procedure TKMemoryStreamBinary.Write(const Value: TKMRangeSingle); begin inherited Write(Value, SizeOf(Value)); end;
  procedure TKMemoryStreamBinary.Write(const Value: TKMRect);        begin inherited Write(Value, SizeOf(Value)); end;
  procedure TKMemoryStreamBinary.Write(const Value: Single);         begin inherited Write(Value, SizeOf(Value)); end;
  procedure TKMemoryStreamBinary.Write(const Value: Extended);       begin inherited Write(Value, SizeOf(Value)); end;
  procedure TKMemoryStreamBinary.Write(const Value: Integer);        begin inherited Write(Value, SizeOf(Value)); end;
  procedure TKMemoryStreamBinary.Write(const Value: Cardinal);       begin inherited Write(Value, SizeOf(Value)); end;
  procedure TKMemoryStreamBinary.Write(const Value: Byte);           begin inherited Write(Value, SizeOf(Value)); end;
  procedure TKMemoryStreamBinary.Write(const Value: Boolean);        begin inherited Write(Value, SizeOf(Value)); end;
  procedure TKMemoryStreamBinary.Write(const Value: Word);           begin inherited Write(Value, SizeOf(Value)); end;
  procedure TKMemoryStreamBinary.Write(const Value: ShortInt);       begin inherited Write(Value, SizeOf(Value)); end;
  procedure TKMemoryStreamBinary.Write(const Value: SmallInt);       begin inherited Write(Value, SizeOf(Value)); end;
  procedure TKMemoryStreamBinary.Write(const Value: TDateTime);      begin inherited Write(Value, SizeOf(Value)); end;
  
  
  { TKMSaveStreamText }
  procedure TKMemoryStreamText.WriteText(aString: string);
  var
    I: Word;
    bytes: TBytes;
  
negative.code:     Read(Pointer(Value)^, I);
  end;
  
  procedure TKMSaveStreamBinary.WriteA(const Value: AnsiString);
  var I: Word;
  begin
    I := Length(Value);
  