ZX Spectrum tape loading - Sinclair

This is a discussion on ZX Spectrum tape loading - Sinclair ; Hello, When a spectrum loads a program off a tape it "listens" to the sound from the tape and converts that to one and zeros. According to Wikipedia: A "zero" is represented by a ~244 žs pulse followed by a ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: ZX Spectrum tape loading

  1. ZX Spectrum tape loading

    Hello,

    When a spectrum loads a program off a tape it "listens" to the sound
    from the tape and converts that to one and zeros.

    According to Wikipedia: A "zero" is represented by a ~244 žs pulse
    followed by a gap of the same duration (855 clock ticks each at 3.5
    MHz) for a total ~489 žs;[11] "one" is twice as long, totaling ~977
    žs.

    What I'd like to know is, what is the frequency of the sound that
    makes up the "pulse" and is this frequency important??

    Thanks

    gareth

  2. Re: ZX Spectrum tape loading

    gareth wrote:

    > Hello,
    >
    > When a spectrum loads a program off a tape it "listens" to the sound
    > from the tape and converts that to one and zeros.
    >
    > According to Wikipedia: A "zero" is represented by a ~244 žs pulse
    > followed by a gap of the same duration (855 clock ticks each at 3.5
    > MHz) for a total ~489 žs;[11] "one" is twice as long, totaling ~977
    > žs.
    >
    > What I'd like to know is, what is the frequency of the sound that
    > makes up the "pulse" and is this frequency important??


    Errm...let's see...

    a zero is represented by a pulse ~244x10^-6 secs long followed by a gap of
    the same duration, and is thus a single square wave cycle of ~489x10^-6
    secs. Therefore in 1 second there will be 1/(489x10^-6) ~= 2040 cycles per
    second, a frequency of ~2040Hz.

    A zero is represented by a square wave cycle of twice the duration of
    ~977x10^-6 seconds, giving 1/(977x10^-6) ~= 1020Hz (hardly surprising as
    twice the wave length -> half the frequency).

    So are these important?

    Considering the hardware of the time, the computer manufacturer had very
    little, if any, control over the tape player used, and in particular the
    speed at which the tape actually ran - you often would hear tape "wobble" as
    the speed of the tape fluctuated, causing the played back recorded sound to
    rise and fall in pitch. Thus there had to be tolerances build in.

    I would suspect that the tape reading routines something would be designed
    something like wait for the rising edge of the square wave pulse to arrive
    and then sit in a counting loop until the falling edge of the pulse arrived.
    Then the size of the count was checked against a range of values for 0 and
    1, and if within a range declared to be a 1 or 0. If outside the range, the
    loading routine would throw up an error.

    The comment that the pulse and gap for a zero were 855 ticks of a 3.5MHz
    Z80A processor, suggests that the counting loop knew how many clock ticks it
    took to go round and so converted a loop count into clock ticks which would
    then be compared with 855[1] for a zero. If the value was approximately the
    same, then a zero would be declared to have arrived. Otherwise, a similar
    check against 1710 would find a one. The counting loop would have a timeout
    so that if no pulse was received the system didn't "crash" waiting for ever,
    but returned with an error.

    [1] the conversion is more likely to be how many loops 855 clock ticks would
    represent and then the loop count compared with this.


  3. Re: ZX Spectrum tape loading

    On 2007-12-07, Robert Newson wrote:
    > I would suspect that the tape reading routines something would be designed
    > something like wait for the rising edge of the square wave pulse to arrive


    The tape loading routines look for an edge, the routine doesn't actually
    care about the polarity of the edge.

    The Complete Spectrum ROM Disassembly explains it well with the comments
    against the actual ROM code. You can get this from World of Spectrum:

    ftp://ftp.worldofspectrum.org/pub/si...ssemblyThe.txt

    --
    From the sunny Isle of Man.
    Yes, the Reply-To email address is valid.

  4. Re: ZX Spectrum tape loading

    Dylan Smith wrote:

    > From the sunny Isle of Man.


    Is that a different one to the rainy Isle of Man where I spent a
    fortnight with my parents in 1979? To this day, I don't know why the
    place didn't sink.

    --
    Duncan Snowden.

  5. Re: ZX Spectrum tape loading

    On Mon, 10 Dec 2007 15:49:54 +0000, Duncan Snowden wrote:

    > Is that a different one to the rainy Isle of Man where I spent a
    > fortnight with my parents in 1979? To this day, I don't know why the
    > place didn't sink.


    Hi Duncan Snowden!

    (what a lovely name, when I imagine...)


    will it?



    Kind regards,

    Daniel Mandic

  6. Re: ZX Spectrum tape loading

    On 2007-12-10, Duncan Snowden wrote:
    > Dylan Smith wrote:
    >
    > > From the sunny Isle of Man.

    >
    > Is that a different one to the rainy Isle of Man where I spent a
    > fortnight with my parents in 1979? To this day, I don't know why the
    > place didn't sink.


    Well, it's not raining now.

    --
    From the sunny Isle of Man.
    Yes, the Reply-To email address is valid.

+ Reply to Thread