When we load any game on ZX Spectrum from cassette player...
Should red stripes move smoothly for better result or they should be static for perfect result?
What is the theory?
Retrocomputing Stack Exchange is a question and answer site for vintage-computer hobbyists interested in restoring, preserving, and using the classic computer and gaming systems of yesteryear. It only takes a minute to sign up.Sign up to join this community
It doesn't make any difference. The border colour changes between red and cyan whenever the tape loading routine detects a change in level between low and high, and this happens many times over the period that a video frame is being sent to the display (from top to bottom), producing the stripes.
Static stripes would just mean that the level changes are happening at a frequency that's an exact multiple of the 50Hz screen refresh rate. As far as the tape loading routine is concerned, there's nothing significant about 50Hz, and there's enough tolerance built in to the timings that it doesn't matter whether the actual frequency is (say) 1500Hz, or 1499 or 1501.
A "perfect" result would be obtained if the stripes move at the same pace you can observe when SAVEing a program, that is, a signal with a period of exactly 2168*2 T-states, which means 807.2 Hz. (T-state information taken from https://faqwiki.zxnet.co.uk/wiki/Spectrum_tape_interface )
As the screen you see is the sampled version of what the TV is interpreting after the actual TV signal is received, your perception of how fast the stripes move may vary, using a CRT monitor, without little or no postprocessing, or a smartTV with a composite to HDMI adapter. FYR, the SAVE routine produces red/cyan stripes moving upwards at a rate of, aproximately, 6.5 stripes per second when viewed in a CRT screen (also tried in Spectaculator, and in a ZX-UNO using 48K ULA timings, with the same results). You can use this result to fine tune your tape playing speed if you see that the stripes move too much quickly in one direction or the other.
Nevertheless, the cassette loading routines have a great tolerance, and will allow variations in the speed of up to +/-15% . I've used that tolerance to push the loading routine to its limits by playing a TAP file with slighly higher frequencies for all their parameters (leader tone, sync pulse, 0 and 1 bit) so it loads a bit faster than usual.
The static nature of the bars during loading depends not only on the speed of the cassette tape, but also on the topology of the Spectrum screen, since clones have different configurations: the number of processor cycles per line and the number of lines on the screen. On branded Spectrum models there are 312 lines and a line of 448 pixels including the border. Here is a short answer about this. While the Russian 'Pentagon' Spectrum clone has 320 lines, one revision of the Scorpion-ZS 256 has 302 and 432 pixels per line including border. You can select any of these clones in Speccy emulator then the screen bars change while loading, but the program still loads.
Pentagon and Scorpion could also have a quartz crystal with a slightly different frequency after the decimal point, because these clones were often made at home, but programs still loaded. This was because (explanation in the answer behind) the ZX-Spectrum tape interface was well-designed and the subroutine for loading was written quite well and allows significant speed variation. The main loop of this procedure loads data perfectly and does it better than in protected programs and turbo loaders. Disassembled code and short description of the main entry points into these routines are here (please use a translator).
But if you're puzzled about cassette tape speed, one well-known analog geek forum says:
- For a "classic" direct-drive mechanism under 0.5%, that is 15hz deviation from a 3000Hz test tape. but you can adjust to about +- 2-3 hz if the deck allows it. The speed may also change from the beginning to the end of a cassette, depending on the quality of the transport (and the cassette of course). There the same mechanism has a tolerance of 0.3%. Lower-quality decks can easily be above 1%. People with perfect pitch can hear that. A semitone is 3.3%. Quartz-regulated direct drives have a smaller tolerance, as their control frequency is generated by a quartz crystal which is more stable. Their tolerance is under 0.4%
- IMO the question is not correctly formulated. Except for "quartz-locked" transports, there is always a speed variation between the beginning and the end of the cassette known as drift, which occurs gradually and cannot be perceived (or found boring by the listener). On lesser decks this can amount to 70 Hz, while a typical high end deck (Teac Z-6000) has drift of 30 Hz (as per SM). For this reason measuring/setting tape speed by means of a test tape (3000 Hz or 3150 Hz) is done at the middle of the tape. For best results it is then recommended to play the full length of the calibration tape and take notice of the speed at the beginning and the end. This will give the amount of drift and show if the deck is within spec. Most SM contain information about tape speed deviation and drift.
It looks like the first answer means that the speed variation can be up to 1 percent, and the second one means 70x100/3000 = 2.3 percent. Here are some calibration tapes: