Microdrives Update

Author(s): Nazir A. Pashtoon
Publication: LISTing Newsletter
Date: February 1985
Pages: 21-22

The Dec./Jan. issue of LIST carried an article on the microdrives , and the interface called the Twistor , which is required between the TS2068 and the Sinclair Interface 1. In the haste of meeting the LIST publication deadline , I had left out some of the RST XX for the shadow ROM in the Interface 1 . These RST’s follow :

RST 28 : The 16K Home ROM error check is done . ERRNR should
         be loaded with the required error code before the RST.
RST 30 : If the Interface 1 variables are not established , a
         RST 30 will create them .
RST 38 : Interrupts on .

An update is also in order for the storage capacity of the cartridges . With two drives connected , I formatted ten blank carts. on the drive for which results were reported in the last issue. The average storage capacity came to 88.8 kB ±1 kB. Formatting the same cartridges on the other drive resulted in an average storage capacity of 98.7 kB , with the highest storage at 102 kB and the lowest at 95 kB. Both drives are new , why there is a difference I have no idea.


In the paragraphs to follow, I will detail the redesign of the Twistor , which became necessary in light of tests with other TS2068’s. Our editor thought that it may be of interest to hardware hackers to present my experimental observations , hypotheses , possible solutions in chronological order . If details like these bore you , then jump to the final solution at the end of the article. Otherwise follow the reasoning , and if you think you are reaching a different conclusion , then provide us with feedback , so we can sit and have a nice technical powwow . I am hoping to provide you with actual timing wave forms in the next issue of LIST ( no promises ).

Last month’s report on microdrives for the TS2068 equipped with EMU-1 was based on extensive testing on two computers that I have . On these two machines the Twistor worked perfectly and consistently everytime . I typed and xeroxed last month’s article , and had a demo. of the drives for the hardware hackers of our group on Dec. 16,1984. The LIST mailing started on the 17th. On the 18th I got a new TS2068 and discovered that most of the time it crashed , and some times half finished microdrive error messages will appear on the screen . I assumed that that the rigid board design of the Twistor was responsible , causing poor connections at the edge connectors . After alot of juggling with the board , I finally connected the Twistor by using a 12″ long cable and theOliger‘s expansion board . The computer started working , with some infrequent errors . The total length of the wires etc. connecting the computer and the Interface 1 came to 24″. I assumed that possibly the shadow ROM is jumping the gun and grabbing the bus too early. The capacitance of the cable is causing delays and thus solving the contention problem. In order to simulate the effect of the cable capacitance with dicrete caps., I estimated that the cable cap. can’t be more than 50-60 pF .

Later measurements showed the capacitance between the wires to be between 25-30 pF. I didnot want to load the whole bus therefore I connected 91 pF caps to the control lines (only) leading to Interface 1 . This didnot have much effect . Now reasoning that since RST08 is responsible for the turn on of the shadow ROM , i.e. when 0008 appear on the address bus that ROM is turned on , then a delay of A3 will improve things. When the 91 pF cap. was connected to A3 the computer started working consistently .

In order to isolate the problem , still thinking that the shadow ROM was jumping the gun , I put a delay in the A3 line. The delay consisted of one buffer from the CD4050 IC. The CD4050 gives a delay of 60 nS typically , up to 120 nS max. , for 5V supply . This made matters worse . Even the good computers started to work erratically . The conclusion is that the problem is inside the computer.

At the January 6 meeting I asked members to bring in their computers for testing . 7 out of 10 computers worked without the cap. on A3 . Two worked with the cap. in . One computer refused to work. I have been communicating the mods. to another TSUG , but they had absolutely no success . The same group provided me with info. on a group out West , whose micro drives would work some times. In another words, there definitely existed a problem to be looked into.

At the time the weather started to become cold. I noticed that on my bad computer , when it was cold , it would start misbehaving for the initial few minutes, and would work properly after warm up . The data sheets on memories showed that they respond faster at lower temperatures. In the mean time I did experiment with a dozen circuits like introducing one T state WAIT when the shadow ROM would turn on , to decoding circuitry using ROMCS from Int.1 and the processor’s RD, A13, A14, A15, MREQ, with the decoder feeding the the BE input of the computer . Some of the circuits even successfully switched the banks . The problem still persisted ;namely, the two good computers will work , and the bad one will either be crashing or giving the wrong messages.

I should mention that the ROMCS from Int. 1 is an output . It goes tri-state when the Spectrum ROM is active , and becomes active high when the shadow ROM is active. This is an important feedback mechanism in the Spectrum where it is connected to the CE of the Spectrum ROM.

A cardinal rule that I follow , when doing hardware work on the TS2068 , is that DO NOT IMPLEMENT ANY INSIDE MODS. on the computer . All mods. must be on the outside. The idea is, of course, to obtain a universal solution to a problem .

By watching the display of error messages on the bad computer for hours ( literally ) I found out that in a blink of an eye ( probably 1/60-th of a second ) the correct error message did appear on the screen , but then gibberish will be displayed . My conclusion was that the shadow ROM was turning on properly , but that the turn off was a problem . A study of the ROM disassembly , and the literature at hand revealed that when address 0700H was in the PC, and hence on the address bus, the shadow ROM will turn off . Since 0700H had the A8,A9,A10 bits set , I argued that a delay of these three bits would help . As such I put 91 pF caps on these three lines . Lo and behold! the problem got solved . I must mention that thus far in my experimentation not alone the printer , but any other peripheral on the Spectrum bus (behind the Int.1 ) will cause all the computers to be in a crash state . I attributed the problem to the excessive loading of the bus . But with caps on A3, A8, A9, and A10 , now for the first time the printer started working. That night the temperature was cold ( in the teens) outside . I took my bad computer , Int.1 , the emulator and put it outside for half an hour , when I turned it on it worked the first time around. I left the system on for 8 hours and it did not malfunction even once. The solution was communicated to the other TSUG the feedback was that it didnot work . It was not making sense ! I went to work to collect some timing data. While doing that , I zapped my EMU-1. Very probably static got it since every few minutes I was installing the EMU-1 in the good computer and then in the bad one . I didnot know at the time , but it was a lucky coincidence . Being desperate to continue experimentation , I successfully was able to use the Spectrum ROM as an emulator , and make it work with the drives( more on this , may be in a future issue of LIST ).

I ordered another EMU-1 and tested it with my computers. With all the suggested mods on the Twistor,all of them were continously in a crash state . In other words I was now in the same boat as the other TSUG. Consulting with the manufacturer of EMU-1 there was no code changes in the contents of the EPROM . I programmed EPROMs , again the same result. So vive la difference? A comparison of the zapped EPROM and the EPROM on the new EMU-1 revealed that originally EMU-1’s were programmed on 300 nS chips , but the new batches were programmed on 250 nS EPROMs . In other words,a time of 50 nS was making all the difference . So I set out to simulate a low speed EPROM . The following circuit was tested on the EMU-1 board by breaking the traces to the CE and OE , and inserting the CD4050 buffers to create an artificial delay .

EMU-1 board delay circuit with CD4050 buffers on the 27128 EPROM CE and OE lines
EMU-1 board delay circuit with CD4050 buffers on the 27128 EPROM CE and OE lines

The result of the experiment was that all three computers got out of the continous crash state , and would work from time to time . Note, that the simulation is not perfect , since we will need to delay all the 16 address lines also.There is not that much space on the EMU-1 board . All this information was relayed to the other TSUG . While I am writing this I got a call from them , that for the first time there computers are working with the Int-1 when they replaced the 250 nS chip with a 300 nS chip in the EMU-1.

Now I had to address the problem of the 250 nS EMU-1’s. Note that all the experiments so far were the so called open loop type . In other words when such a nice feedback signal is available from Int.1 like ROMCS , signalling the computer when it is active , it should be used. The fastest way to provide such feedback to the DOCK bank in TS2068 is a hardwire connection between the EMU-1 and the Int.1. I grant you that the same is achievable by using the BE input of the computer , as mentioned earlier , and one would be tempted to call it an elegant solution. But the penalty is the use of one or two very fast chips . Any way,I believe the solution to be universal and should work on all TS2068 computers . All my three computers work perfectly and with the printer load attached . Here are the mods. :

The mods: 100 pF caps on A3, A8, A9, A10 in the Twistor and ROMCS feedback from Interface 1 to the EMU-1
The mods: 100 pF caps on A3, A8, A9, A10 in the Twistor and ROMCS feedback from Interface 1 to the EMU-1

CONCLUSION: A):The reason some of the TS2068 computers will not work with the microdrives , even with a 300 nS EPROM in the EMU-1 is the bus contention between the Int.1, and the EPROM on the EMU-1.

B) A 300 nS EPROM on the EMU-1 if used in conjunction with the caps. on A3,A8,A9,A10 does solve the problem even in an open loop configuration.

C) Closing the feedback loop , as per diagram above, and the caps. does solve the problem even with a faster EPROM in the EMU-1 , and as such is a universal solution.

AFTERTHOUGHTS :The problem of ringing on the address lines can’t be ruled out . More measurements are required.

An experiment with a 450 nS EPROM is called for . This will reduce the cost of EMU-1’s . I will report on such an experiment in the future.

Some hardware hackers will take anissue with the dirty and fast solution of putting caps. on the suggested address lines. The value of 100 pF is also excessive , and will tell me that it is a no-no in microprocessors system design. My response is show me one microcomputer that do not use it . To witness, open up your TS2040 printer .What are all those caps doing on the address and data lines ? I very well recall desoldering them , because it will not work with another peripheral on ZX-81. The removal of the caps. did make the system work. For that matter , if you open your TS2068 , you will notice caps near the edge connector.

NAP Jan.19,1985