Re: nibtools, GCR, G64

From: Peter Rittwage <peter_at_rittwage.com>
Date: Thu, 30 May 2013 17:54:11 -0400
Message-ID: <3xrrwqgjye62vmhu7axqs0ft.1369950851476@email.android.com>
Look closer at the code- those are bit comparisons,  not byte.

silverdr@wfmh.org.pl wrote:

>
>On 2013-05-30, at 21:24, Pete Rittwage wrote:
>
>> Feel free to optimize.
>> 
>> /* this routine "fixes" non-sync-byte aligned images created from RAW
>> Kryoflux stream files */
>> 
>> [...]
>> 
>>                if((buffer[i] == 0xff) && (buffer[i+1] != 0xff) &&
>> ((buffer[i+1] & 0x80) == 0x80)) /* at least one bit left
>> over */
>
>Does this one assume also that SYNC will start with $ff? What if it starts with a different value? $07 f.e.?
>
>[...]
>>                        while(!((buffer[i+j] == 0xff) && ((buffer[i+j+1] &
>> 0x80) == 0x80))) { j++; bytes++; if(i+j>length)
>> break; }
>
>And it seems to look here also for nine bits only.
>
>-- 
>SD!
>       Message was sent through the cbm-hackers mailing list
1,jja^qiɚXX
Received on 2013-05-30 22:01:25

Archive generated by hypermail 2.2.0.