6 days i am trying to fix this , buth CR1 dont work. here pascal code, what its wrong?
[codefunction CRC32T(Initial: LongWord; Data: array of Byte; DataSize: LongWord): LongWord;
const
poly = $EDB88320;
var
j: Integer;
tmp1, tmp2, crc, i: LongWord;
begin
crc := Initial;
i := 0;
while i < DataSize do
begin
tmp1 := 0;
tmp2 := crc xor Data[i];
for j := 0 to 7 do
begin
if tmp2 and 1 = 1 then
tmp1 := tmp1 xor poly;
tmp2 := tmp2 shr 1;
end;
crc := (crc shr 8) xor tmp1;
Inc(i);
end;
Result := not crc;
end;