Changes

Jump to: navigation, search

Cassette data information

2,849 bytes removed, 18:31, 8 June 2017
/* Writing */
If the state of bit 5 is changed at a fixed frequency, then the graph of the state of bit 5 over time will be a square wave. However, the resulting audio written on the cassette will not be a perfect square wave because nature will attempt to convert the waveform into a sine wave.
Loading system audio waveform
 
Every loading system on the Amstrad uses a serial bit-stream. i.e. a single bit of information is read at a time.
 
This serial bit-stream is grouped into blocks of audio sound.
 
Every loading system uses a basic structure to describe each audio block in the following order:
 
|pilot|sync|data|trailer|
 
'''pilot'''
 
This is also refered to as "leader" by some documents.
 
This is constructed from a repeated waveform often with a fixed number of repetitions defined by the loading system.
 
The shape of the waveform is known by the loader program and this is used to identify the pilot waveform from other waveforms that may be present (e.g. noise).
 
The pilot is often long, so that the loader doesn't need to see the start of the pilot waveform in order to load the block.
 
The loader program will test the incoming waveform, checking it against the parameters defined for the pilot, before the waveform is accepted as the pilot waveform. (e.g. the number of repetitions must be some defined minimum value). The incoming waveform must fall within these specifications otherwise the waveform is not accepted as a pilot waveform.
 
'''sync ("synchronisation")'''
 
The sync is a waveform which is different to the pilot, and this defines the end of the pilot and the start of the data. When this sync has been detected, the loader knows that there is data following, and that the loader is always at the same point in the data stream. i.e. the loader program is synchronised to a specific point in the data waveform.
 
'''data'''
 
This is the actual data which is composed of waveforms defining "0" and "1" data bits.
 
The first element of the data may be a marker or id which may, for example, indicate the type of data in the block or the number of the block.
 
The remaining bits will define the data and zero or more checksums.
 
The whole data may consist of a single block with a single location and length (e.g. one block for a screen another for data), or multiple blocks each with their own location and length. (e.g. one block for screen and data)
 
The location and lengths of the blocks may be in the data stream itself, or they may be in a preceeding block, or may be hard-coded into the loader program.
 
'''trailer'''
 
The trailer always follows the data. Some loaders may not have a trailer. The two main purposes of the trailer are to ensure that the waveform of the last data bit in the data is constructed correctly and to provide some time in which the loader can prepare for the next block.
The exact definition of the loading systems's audio waveform is defined by the loader program.
 
samp2cdt has a number of decoder algorithms which recognises the audio waveform of various loading systems. These decoders read the waveform using a similar method to the loader program itself. These decoders have been created by examining the instructions of each loader program and the graph of the waveform in a sound recording package.
== Example of a typical loading system ==
2,541
edits