Sharp logo
Tape Problems 
written by John Edwards / SUC/UK
Source: SUC-magazine November 1993, Volume 13 Number 3, pp. 12 - 13  
Sharp Users Club - General Section - Tape Problems


Members will recall that, in Vol. 13 No. 2, on page 35, I helped Maurice to sort out a problem with SUPERTAPE 2BMKA7, by increasing the length of one of the tape delay loops that is used during the RECORDING process ( the loop counter was changed from $3A to $45 ). More recently, when I visited Weymouth again in October, Maurice greeted me with the news that he was having problems READING some of the MZ-700 tapes from Sharpsoft. This time, I suggested that we should decrease the relevant delay; the original setting, at $0D45 in S-Basic RAM, is 68 ( decimal ), so we did POKE $D45, 60. At that, all the offending tapes, except one, loaded O.K.; in order to load the last one, we had to reduce the setting even further, to 56.

The theory underlying my suggestions is not as difficult as you might think. The tape routines in all early Sharp MZ-computers work on the same principles, and these were revealed in formidable detail by an exceptionally clever member of the Sharp Users Club, Jean-Jacques Labarthe, on pp. 5 - 9 of Vol. 3 No. 3, in an article that was actually a reprint of the Manual for his BADTAPE program.

Jean-Jacques explained how, in the Sharp system, tape signals are coded into '1's and ‘0's ( with an extra 1 at the start of each 8-bit byte ); a '1' is stored as a long on/off pulse, total length 0.4 + 0.4 = 0.8mS; and a ‘0‘ is stored as a ‘short‘ on/off pulse, total length 0.2 + 0.2 = 0.4mS. When reading a tape, the routine looks for the start of each pulse, waits for 0.3mS, and then samples the level. If it is 'high‘ the pulse is read as ‘1‘, and if it is low the pulse is read as a ‘0‘:-

Sketch from John Edward - The Read Point

After sampling the signal, the routine ‘goes away' to do some homework, before returning to look for the next pulse. As you can see, if the signal was a ‘1‘ there is about 0.5mS available before the start of the next pulse; but if the signal was a ‘0‘ there is only about 0.1mS available before the start of the next pulse. In these circumstances, it is possible that, after a ‘0' pulse, the tape routine may not return in time to catch the start of the next pulse, in which case the pulse is missed, the checksum is upset, and an error results when the final checksum comparison is made.

Fortunately, the system is very flexible. There is no need to wait for 0.3mS before sampling - any time longer than 0.2mS will produce the same result. That is why I suggested that, when trying to read a problem tape, Maurice should DECREASE the length of the delay. In the case of MZ-700 RAM the original delay is 0.293mS - so by reducing the counter from 68 to 60, the delay is reduced to 0.259mS. This does not sound much , but it means that 0.141mS is available for the homework routines, instead of 0.107mS. This is an increase of about 32%. And it worked !

When SAVING tapes, the converse applies; to give the subsequent READ routine more time to do its work, I suggested INCREASING the delay which was being used to lay down the signals, so that when they were read back in, there would be more time between pulses. Again, the suggestion worked, and it ensured that tapes produced on the MZ-80B by SUPERTAPE 2BMKA7 could be read on the MZ-80A.

The above examples deal with cases in which the tape routines are in RAM and may be changed at will. On a normal MZ-80K this is not possible; but if your MZ-80K has ROM / RAM switching, you can switch the Monitor to $C000 and then copy it into RAM at $0000, and change it there. This may also be done on a normal MZ-80A.

However, in my experience, this sort of problem does not arise often; except perhaps on the MZ-700, which sometimes works with a ROM Monitor, and sometimes with a RAM Monitor. The tape routine delays are coded exactly the same in each Monitors, but they run at different speeds on account of wait states. Thus, the delay of 0.293mS in the RAM Monitor becomes 0.320mS in the ROM Monitor, and this is sufficient to give occasional problems. They do not happen often, but I think that Sharp must have been aware of the danger, as their later disk Basics for the MZ-700 ( 2Z-009E for 5.25“ disks, and 5Z-008 for Quickdisks ) have no tape routines in their RAM Monitors - they bank-switch in the ROM Monitor, and use the routines there; so if you use only Sharp disk Basics on your MZ-700, ALL tapes are read and written with the same delays. But if you use S-BASIC, or K & P DBASIC, or ZIP 700, all of which have tape routines in their RAM Monitors, problems can arise.

On the MZ-800, ALL the Basics - even the tape Basic 1Z-016 - use only the ROM Monitor tape routines. So you are less likely to meet tape problems on the MZ-800, than you are on the MZ-700.

But there is another reason for tape problems - poor quality tapes. And the problems are just as likely to be mechanical, as electrical. A poorly-made tape causes excessive wow and flutter, and this may critically reduce the time available to find the next pulse. So buy good quality ferric tapes, not ones that sound like pepper-mills; and keep your tape heads clean ! I rest my case...

Editorial comment


Thanks John ‚ I think I understand at last. As you know, I have always found that TDK C60 tapes are utterly reliable, and I always use them, though I am sure that some other brands are as good.

I don‘t think I told you that I can sometimes get round a tape problem by reading a naughty tape on another machine. I am lucky enough to have 'one of each‘ Sharp machine, and I have used this trick more than once. Recently, an ORIGINAL Sharp MZ-80A tape ( DAY BOOK from their Business Software series ) refused to load on my MZ-80A. At first I thought I had real trouble, as it was the only copy I possessed, and it has a m/c LOADER, followed by a disguised program. But on my MZ-80K it loaded O.K., and I was able to modify it and re-save it on tape, as V2 ( see MZ-80A Section, this issue ).

So if you have problems, you could, as a last resort, try ringing a friend and asking if you can use his / her machine !


Go to the top of this page      Get next page      Home     

last updated September 12, 2003
SUC / UK: John Edwards

khmweb barrierefreies webdesign Berchtesgaden