|
A digital cassette tape can store a pieces of signal low
and signal high, so we must decide that a bit 0 is, for example, 4 millisecond
of signal low store in the tape, and a bit 1 is another 4 millisecond of
signal hi.
So a 1001 binary nibble will become:
This is not a good methods for storing information, because if we have a long sequence of 00000 or 11111, we have a very long sequence of signal low or high in the tape, so we can lose synchronization of bits.
So to retrieve the correct information we must use another system: a bit
0 become a sequence of signal high, signal low that is inferior that a sequence
high, low used for bit 1:
Note:
[when I tried to read the tape by hand, I found that the sequence 1 give me a good representation of what I was reading from the tape, so I implement the Reader program with that features. The programs read correctly the data, but is due to the bit duration rate that was fortunately good however. So when I wrote this document I use the representation 1 and calculate all the timing with that method. This is wrong from what I see from the listing of Turbo and 1/2 format consideration. For all the next pages consider that the symbol ^ and ° are to be inverted, and timing may be wrong. Actually I have no time to fix it, sorry.]
When one people have decide this low level details as absolute for reading a digital tape cassette, he now must decide how to represent a piece of information: the byte.
The Commodore Group have decide to use a particular method to improve readability: coding one byte use a Manchester code and using a parity bit.
A Manchester code is often used to make the bits 1 and 0 with the same
frequencies in the files, in fact a bit 0 become a 01 encoded bits and bit
1 become 10 encoded bits. This fact has important theoretic consequences,
but on the other hand we must coding 1 bit with 2 bits.
Other this, a parity bit (coding with Manchester too) are add to the
byte to be sure to have received correctly this byte. So a byte (8 bits)
is coding with 16+2 bits, but other 2 bits are used as i describe later.
In fact to be sure that we are reading the byte, a special block bits
is add to the start of the byte, with a bit 1 after that to advise that
the byte starting here. If the bit was 0 then the file is finished.
The special block bit is not 0 or 1 but another bit that i call *.
The fact that we use 3 different bits using a digital cassette that
can store only 2 level seems to be impossible, but if we remember that
a bit is coding with a different duration of the level low-hi, there's
no problem:
At this point we must describe how a file (a group of bytes) is made.
At the begin of the file there's a synchronization region that i describe
later, after there's the header of the file.
The header contains this information:
The Commodore group have decide to store 2 copies of header that have
01/03 type of Header to be sure that there's no error reading the file.
After the header there's a new synchronization region and then there's
the two copies of the file data (as for the header).
At the end of this description, there's only to say of the checksum.
In fact the header and the file data contain a supplementary byte that
is calculated from the bytes that compose the header and the file data,
so when a file is read this information is calculated again and compared
with the checksum inside byte to be sure to have read it correctly.
Finally you are able to understand why for reading a program saved with the Commodore inside procedure you must attend a lot of time, therefore if you read the same program saved with some special turbo utility program the time is more inferior.
This table reassume these differences:
Commodore Inside | Turbo |
2 copies of program | 1 copy of program |
20 bits for one byte | 8/9 bit for one byte |
~ 1000 microsecond for bit | ~ 550 microsecond for bit |
The last difference is the quantity of tape used by the two methods (remember that one turn of the tape is make in about 3.6 seconds)
commodore 64 | Tognon Stefano Programs |