nibtools, GCR, G64

From: silverdr_at_wfmh.org.pl
Date: Thu, 30 May 2013 18:42:18 +0200
Message-Id: <939695ED-1ED3-4731-828D-7A298995B46F@wfmh.org.pl>
I noticed that there is a function in nibtools' gcr.c called find_sync(), which contains the following snippet

/* sync flag goes up after the 10th bit */
//if ( ((*gcr_pptr)[0] & 0x03) == 0x03 && (*gcr_pptr)[1] == 0xff)
/* but sometimes they are short a bit */
if ( ((*gcr_pptr)[0] & 0x01) == 0x01 && (*gcr_pptr)[1] == 0xff)
/* or two */
//if ( ((*gcr_pptr)[0] == 0xff) )
	break;

It is quite interesting to read the comments and see that there was some evolution on the number of bits that constitute the SYNC mark ;-)

The question is different though: the G64 doc says:

"The most reliable way to read G64 track data is to read it as  bits,  not
bytes as there is no way to be sure that all the data is byte-aligned."

yet the above code seems to look always for the first 8bits being byte-aligned. Why so? Or is is just completely unrelated to G64 and works with NIB files well?

-- 
SD!
       Message was sent through the cbm-hackers mailing list
Received on 2013-05-30 17:01:00

Archive generated by hypermail 2.2.0.