doc:cbm:disk:image:g64
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
doc:cbm:disk:image:g64 [2020/05/31 23:39] – eek | doc:cbm:disk:image:g64 [2020/05/31 23:47] (current) – [Analysing the GCR data stream] eek | ||
---|---|---|---|
Line 215: | Line 215: | ||
a SYNC mark of 40 ' | a SYNC mark of 40 ' | ||
groups of SYNC marks quite close together, one for the sector | groups of SYNC marks quite close together, one for the sector | ||
- | one for the sector data. In the above example, there is 2 groups of " | + | one for the sector data. In the above example, there is 2 groups of '' |
- | FF FF FF". The first one is the header SYNC and the second one is the data | + | The first one is the header SYNC and the second one is the data |
SYNC. | SYNC. | ||
Line 246: | Line 246: | ||
There is some controversy over the header gap (#3). Most people assume it | There is some controversy over the header gap (#3). Most people assume it | ||
- | to be 9 bytes of 0x55 characters, but the early 1540/1541 drives used only | + | to be 9 bytes of '' |
8. This caused an write incompatability with the existing 4040 disks of the | 8. This caused an write incompatability with the existing 4040 disks of the | ||
day. In 1541 ROM revision 901225-3 this error was fixed, and now all drives | day. In 1541 ROM revision 901225-3 this error was fixed, and now all drives | ||
- | write out 9 of the 0x55 characters for the gap. The book " | + | write out 9 of the '' |
DOS" | DOS" | ||
corruption happens at a low level when writing to a disk with a header | corruption happens at a low level when writing to a disk with a header | ||
Line 270: | Line 270: | ||
FIXME | FIXME | ||
+ | |||
+ | 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. This | ||
+ | simulates the way a 1541 drive reads data as well as the head only reads | ||
+ | bits as well. The starting location of the track data is know, as well as | ||
+ | the track size so the boundaries of the track limits (start | ||
+ | obtainable. | ||
+ | |||
+ | What follows is a very simply | ||
+ | finding sync marks, header blocks and sector blocks. | ||
+ | |||
+ | - Search for SYNC (at least 10 or more 1 bits) | ||
+ | - Check for header id after SYNC (GCR '' | ||
+ | - If header, read the remaining 9 header bytes | ||
+ | - Decode header and get sector value | ||
+ | - Search for SYNC again | ||
+ | - Check for data id after SYNC (GCR '' | ||
+ | - If data, read and store with previous header. | ||
+ | - Have we finished reading the track... stop | ||
+ | - Start over | ||
+ |
doc/cbm/disk/image/g64.1590968395.txt.gz · Last modified: 2020/05/31 23:39 by eek