Re: nibtools, GCR, G64

From: silverdr_at_wfmh.org.pl
Date: Thu, 30 May 2013 22:21:24 +0200
Message-Id: <28C38501-A6DE-495A-8B6C-08C6E316C7F5@wfmh.org.pl>
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
Received on 2013-05-30 21:01:12

Archive generated by hypermail 2.2.0.