From: silverdr; on Thursday, May 30, 2013; at 5:10 PM -0400 > > I mean, in the modern machine, a few KiBs here or there doesn't make > any real difference; but, for a CBM, almost 16KiB for the buffer alone > is a high price. Oh. I didn't realize that you "had gone native". ;-) How long is gcrBytes? > So far, I did this for the SYNC: > > byte0 = gcrBytes + offset; > switch (trackDataLength - offset) // We always need two 2 or 3 bytes to > get 10 consecutive bits; so, checking the last single byte doesn't make > sense unless we "wrap around" the buffer. > { > case 1: > byte1 = gcrBytes; > byte2 = gcrBytes + 1; > break; > case 2: > byte1 = gcrBytes + offset + 1; > byte2 = gcrBytes; > break; > default: > byte1 = gcrBytes + offset + 1; > byte2 = gcrBytes + offset + 2; > break; > } > > which, I believe, takes care of the wrapping, in a relatively effective > way. What about a "compromise"? Mirror the first two bytes. Then, you would need to wrap-around the search; but not the 10-bit examination. Message was sent through the cbm-hackers mailing listReceived on 2013-05-31 01:00:03
Archive generated by hypermail 2.2.0.