[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: VSDRIVE stand alone host (no pc) thread



On 10/11/2012 8:59 PM, Kevin wrote:
for reference, the position is calculated as ...

512*command[1]+131072*command[2], // bytes to move pointer

You might need to post more of your code. But keep in mind that the protocol being sent to you by my driver is slightly different than Terence's original...
http://adtpro.sourceforge.net/protocol.html#Read

Depending on how you're filling your command[] buffer, bytes 1 and 2 of the incoming request are going to be shifted by one byte, because there's the "E" envelope in front of it. You have said the checksums agree, so that might not be the issue. But I'd expect bytes 2 and 3 to be your lo/hi incoming block number, not 1 and 2. Lacking any other clues, I'm not sure where else to go - it's a simple translation from incoming block number to position in the file.