ZX Interface 1: Difference between revisions

Jump to navigation Jump to search
Line 129: Line 129:


Each of these structures is similar, apart from length, and can be examined independently. From this image, it can be seen that the ERASE line turns on just before the R/W line begins writing the sector. In this case, the Sector Header has been read, and it has been determined previously when the sector map was constructed that this sector can be written to. The ERASE is activated, and then the R/W is activated (active low ) just prior to writing data.
Each of these structures is similar, apart from length, and can be examined independently. From this image, it can be seen that the ERASE line turns on just before the R/W line begins writing the sector. In this case, the Sector Header has been read, and it has been determined previously when the sector map was constructed that this sector can be written to. The ERASE is activated, and then the R/W is activated (active low ) just prior to writing data.
=== Sector Header ===
Each sector header is 15 bytes long, and follows the same format as the Data Header which follows it, though omits the data itself, and the filename is replaced with the cartridge name. The Received File Flags (RECFLG In the Disassembly) seems to use Bit 0,1 and 2. Only Bit0 is set in the Sector Header. This identifies it as a sector marker, and so it is used to find the correct sector when writing. Reading does not pay attention to the Sector identifier file. Also, the record number field is the Sector Number field in this case.
[[File:Sector130 Header with cartridge name Microdrive.png]]
In this file, the first 12 bytes, sometimes erroneously identified as "12 bytes for identification", are actually 6 sync bytes per channel. These provide information to the Interface1, along with the preceding gap, that valid data is about to follow and establish the necessary conditions for the Interface1 software to begin reading Sector Headers and Sector Data contents.
In the above image, they are identified as 0x00,0x00,0x00,0x00,0x00,0xFF. Spurious bits prior to this sequence have been ignored in the above example, but are common in the process.
Immediately following this, bytes are read in order, from the bottom row to the top, and would form the following Sector Record.
{| class="wikitable" style="text-align: center;"
|-
| Offset || Example Byte || Significance
|-
| 00H || 0x01 || This is the RECFLG byte. Bit0 signifies a sector header.
|-
| 01H || 0x82 || Sector 0x82. Sectors count from 0xFF to 0x00. Sector 130 in decimal.
|-
| 02H ||
|-
|}


== External links ==
== External links ==
34

edits

Navigation menu