Trying to restart a 33 years old ZX81 [SOLVED]

Discussions about Sinclair ZX80 and ZX81 Hardware
Moggy
Posts: 3497
Joined: Wed Jun 18, 2008 2:00 pm

Re: Trying to restart a 33 years old ZX81

Post by Moggy »

Nice work there Mark.

As I posted earlier these boards are hardy enough if some care is taken and in the absence of sockets I've soldered ULA's CPU's etc with no bother whatsoever and I certainly do not possess the skills you guys have, timidity can be a bad thing sometimes. :D
???????????????????????????PIINKEY$?????RND????????????????????????????????????????????????????????PI????????
User avatar
1024MAK
Posts: 5533
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...
Contact:

Re: Trying to restart a 33 years old ZX81

Post by 1024MAK »

I wrote:Oh, and yes, all the Ferranti "high" speed ULA's in Sinclair computers run hot.
Link to WoS thread about ZX Spectrum temperatures, scroll down and you will see the various Spectrum ULAs run at between 59°C and 78°C!

Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Amp

:!: Standby alert :!:
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Spring approaching...
dinosaur
Posts: 44
Joined: Fri Aug 14, 2015 4:39 pm

Re: Trying to restart a 33 years old ZX81

Post by dinosaur »

PokeMon wrote:Well - you are a hard nut and don't want to believe in the capabilities of other users here. So your decision.
I only believe in *facts*, and facts are more stubborn than you or me... :lol:
One last attempt:

RD is always low means that the clock is no more present.
Fact is that the clock is going fine and strong (4.3V peak-peak, 3.25MHz, stable, not quite square wave but close enough), and even when I use my second scope channel to measure both the clock (which is then present, you cannot deny such a fact, unless you don't believe in what you see on a scope screen) and RD, the latter still stays either low or high (it depends and varies from one restart to the other, but high seems to occur more frequently than low).
.../... You can replace the CPU first or the transistor - your decision.
Since I am not as stubborn as you seem to imply, and since even with facts at hand, I'm ready to experiment and learn more from this experimenting, I did replace the ZTX313 transistor (since I didn't have this reference in my components stock, I used a 2N2369A which I found to be an excellent switching transistor in many projects I designed and made). Guess what ?... Same thing... Same clock signal, same results... Z80A all dead-like...
There are no illegal instructions for the Z80 - it is a very simple cpu.
True, but it could probably accidentally end up "locked-up" if signals are not what they should be on its buses during a read cycle... I can't be totally affirmative (I'm more a 68k specialist), but it's at least plausible.
There is a quite more possible source of failure in the reset circuit which is very simple and due to the R/C combination there will be executed several resets in a fast order - you may check this with a logic analyzer very well.
I don't have a logic analyzer, sorry... A bit too expensive for me. :cry:
The CPU executes the first code then the next reset comes (due to missing schmitt trigger characteristics) and so on. This could in fact keep the CPU in a very strange state as internal flip flops are not set or better say reset correctly.
Yes, I'm perfectly aware of this kind of issues, for having encountered them countless times.
So the question would be as well what did you use to replace C5.
Surprise !... I used a solid tantalum capacitor (1µF 35V)... Since the original capacitor was so large and the pads were so far apart, I soldered the new one on the under side, right next to the reset pin. I also made several attempts to run the bare ZX-81 board (just connected to a 9V regulated power supply and to a TV set) after having desoldered the wires I added 30 years ago for the reset button I added to the box; this was just in case the reset pin would have caught noise via the wires... But no... Same result.
After having some very strange reset problems with the ZXmore I decided to use a tantalum capacitor which is in my experience quite better than some cheap electrolytic capacitors.
Yes, they have a much lower ESR than electrolytic capacitors for low capacitance values (47µF and below). Albeit you can also find very good (but certainly not cheap) electrolytic capacitors nowadays.
So there is not guarantee that the clock for the Z80 is stable as it is derived from the ULA which halfs the 6.5 MHz clock used for video display. This clock is amplified with a transistor TR2(ZXT313) which should be replaced just for test purposes.
Done that. See above. No joy...
.../... So did you ever had a bad/broken piece of silicon in your hand and how did you see this from outside ?
ROFLOL... I had dozens of them !... Believe me, in 38 years of practice as a hobbyist, and while I had my share of smoking ICs, exploding transistors, roasting resistors and popping electrolytic capacitors, there were as well all those components that failed sneakily and in perfect silence... :twisted:
Do you think a simple transistor can never fail ? 8-)
Of course they can, but usually only while the power is applied (of course, a MOSFET can also fail because of an electrostatic discharge, but not a bipolar transistor such as the ZTXs used in the ZX-81), not while "sleeping" in a corner of a room for 30 years... :P
dinosaur
Posts: 44
Joined: Fri Aug 14, 2015 4:39 pm

Re: Trying to restart a 33 years old ZX81

Post by dinosaur »

Moggy wrote:I thought the z80 was micro programmed and the 6502 hard wired?..

http://people.cs.clemson.edu/~mark/uprog.html
Apparently, yes, it got some microcode, although I doubt very much it is contained in anything else than a mask-type ROM, unlike what happens in modern CPUs for which you can update the microcode (note however, that CPUs such as Intel's seem to be using a internal RAM for microcode updates, because those need to be re-uploaded to the CPU at each reset; they are usually uploaded by the BIOS and/or by the OS istelf).
That's why I used "as a micro-program 'ROM'" (i.e. using quotes around ROM, because it's not true ROM, but rather Flash/EEPROM).
I have to concur with karl(pokemon) you seem a tad arrogant/dismissive in your replies. .../...
Geez, folks ! :shock:
Stop taking things personally !!! I just stated *facts*... Facts can't be denied. I was in no way being "dismissive", but just asserting those facts.
dinosaur
Posts: 44
Joined: Fri Aug 14, 2015 4:39 pm

Re: Trying to restart a 33 years old ZX81

Post by dinosaur »

1024MAK wrote:Just stepping away from possible clock/reset or Z80 problems for a moment.

Checking the schematic, RP1 (10k) acts as a pull up on the data bus.

R28 is the /ROMCS resistor. [/ROMCS is normally generated by the ULA on pin 13, it then goes via R28 to the "ROM". The whole point of the signal being present on the edge-connector, is so external devices can disable the Sinclair "ROM" by forcing it high].

So if you disable the "ROM" by holding it's /CS pin (20) high, either on the pin, the edge-connector (pin 23B) or the ROM side of R28 (680 ohms), the Z80 should just read RST 38H, then attempt to push the PC to the stack in memory. Jump to 0038H and loop around again...
Now, that's a clever experiment ! :D

I did it (soldering the lead of R28 leading to the ROM pin 20 (CS) to the +5V... The result is that it doesn't change a thing to what I saw previously: the Z80A still seems dead (just one level change, as far as my analog scope can allow me to see, at startup, then flat RD/An/Dn signals...). It looks like the ROM is not the culprit, after all.. It might well be the CPU !
dinosaur
Posts: 44
Joined: Fri Aug 14, 2015 4:39 pm

Re: Trying to restart a 33 years old ZX81

Post by dinosaur »

1024MAK wrote:Both RAM chips were removed using a hot air gun with no problems. Yes, these were small 2114 SRAM chips, so easier to do. The holes are mostly clear, because after using the hot air method, I cleaned up the "spiky" solder with a solder pump. As you can see, no PCB lacquer to worry about on that issue 1 PCB. And despite the large amount of solder, no damage to the board.
Good to know that the board is resilient enough... I'll probably give it a try (not much for me to loose anyway, since the ZX-81 is not working at all for now)...
User avatar
RetroTechie
Posts: 379
Joined: Tue Nov 01, 2011 12:16 am
Location: Hengelo, NL
Contact:

Re: Trying to restart a 33 years old ZX81

Post by RetroTechie »

Have a look at this circuit: Z80 tester

I'd think a ZX81 board is 'simple' enough that one could re-wire a few things and use it as above circuit.
For starters, I'd remove the ULA so it doesn't interfere (or perhaps you could re-wire some of the ULA's pins such that it forces a NOP code on every memory read? :?: ).
Next, disable the ROM by tying /ROMCS signal to +5V (at ROM / edge connector side). Same with /RAMCS.
Then somehow make sure that any Z80 opcode fetch produces "NOP" (all data lines "0"). With the ROM and RAM disabled, it might be okay to hard-wire those Z80 data lines to ground (!).
Also you might -temporarily- remove the /INT<->A6 connection, and wire /NMI to +5V, such that no interrupts of any kind occur.
With clock signal present and /RESET working, you should then see the Z80 address lines behave as a binary counter.

More testing ideas:

Check function of TR1 / what goes on at Z80 /NMI pin.

From some Z80 documentation:
Q: Is there a method for testing hardware without removing the Z80 CPU from the socket?
A: Two methods are available:
1. Use BUSREQ to tri-state all control signals and then use external hardware to simulate the logic;
2. Remove power and ground from the CPU, all signals should go to a high-impedance.
Read: only 2 cut pins needed to piggy-back a working Z80 for testing, rather than unsoldering the entire IC. Note that this may not be guaranteed to work if the Z80 is broken (but worth a try anyway ;) ).

Personally I find the easiest way to repair a ZX81, is to unsolder the main IC's, place sockets, and swap parts with a working ZX81 (both ways: IC in unknown condition into a working ZX81, and known-working IC into the ZX81 under repair). That is, after checking power supply, clock signal(s) and /RESET function. Usually not many swaps are needed to discover what's at fault... (and broken ULA is most often the problem, I suppose).
Of course this requires a 2nd ZX81, one that works too. Do you happen to have a 2nd, working ZX81? And/or spare parts?

Last but not least: what TV are you using? I suppose not the same one as when the ZX81 was boxed up? :lol: Happen to have a CRT around? What version ULA?

Another thing to try would be to plug in known-working RAM pack.
PokeMon wrote:RD is always low means that the clock is no more present.
There are no illegal instructions for the Z80 - it is a very simple cpu.
Or it could just be a dead Z80, in which case it could be doing all sorts of weird things. As others have said, looks like this may be the case here.
dinosaur
Posts: 44
Joined: Fri Aug 14, 2015 4:39 pm

Re: Trying to restart a 33 years old ZX81

Post by dinosaur »

RetroTechie wrote:Have a look at this circuit: Z80 tester

I'd think a ZX81 board is 'simple' enough that one could re-wire a few things and use it as above circuit.
The devil being in the details, things are never as simple as one might think at first... :twisted:
For starters, I'd remove the ULA so it doesn't interfere (or perhaps you could re-wire some of the ULA's pins such that it forces a NOP code on every memory read? :?: ).
The ULA is also responsible for the Z80A clock generation, so you can't "just remove it"... It also drives the ROM and RAM CS lines...
Next, disable the ROM by tying /ROMCS signal to +5V (at ROM / edge connector side).
Done: see my post above.
Same with /RAMCS.
Good idea ! Will do...
Then somehow make sure that any Z80 opcode fetch produces "NOP" (all data lines "0"). With the ROM and RAM disabled, it might be okay to hard-wire those Z80 data lines to ground (!).
Isn't the ULA also outputting to the Dn lines ?... If yes, can't do while the ULA is present, and must therefore remove it, and thus somehow feed an 3.25MHz clock to the board... See, it becomes rather complicated all of a sudden... :P
Also you might -temporarily- remove the /INT<->A6 connection, and wire /NMI to +5V, such that no interrupts of any kind occur.
It would involve desoldering the Z80A and bending pins before putting it back on a socket... Again, not that simple.
.../... Personally I find the easiest way to repair a ZX81, is to unsolder the main IC's, place sockets, and swap parts with a working ZX81 (both ways: IC in unknown condition into a working ZX81, and known-working IC into the ZX81 under repair). That is, after checking power supply, clock signal(s) and /RESET function. Usually not many swaps are needed to discover what's at fault... (and broken ULA is most often the problem, I suppose).
Yes, that's the way to go, I think...
Of course this requires a 2nd ZX81, one that works too. Do you happen to have a 2nd, working ZX81? And/or spare parts?
Nope. I'll have to find one on Ebay or something...
Last but not least: what TV are you using? I suppose not the same one as when the ZX81 was boxed up? :lol: Happen to have a CRT around?
No need for a CRT and indeed, the TV I used 30 years ago has long been dismantled for the components, after its CRT died. I'm using a modern flat screen TV with PAL/SECAM compatible tuner... It was bought before we went "tout TNT" (numerical broadcast, not sure what it is called in English) in France.
What version ULA?
I didn't know there were several versions... :o
Mine is labelled:
FERRANTI
ULA 2C210E
8249
Another thing to try would be to plug in known-working RAM pack.
Got the RAM pack unplugged, since I can't know if it is still working fine...
User avatar
PokeMon
Posts: 2264
Joined: Sat Sep 17, 2011 6:48 pm

Re: Trying to restart a 33 years old ZX81

Post by PokeMon »

Well in that case I just say good luck. 8-)
User avatar
1024MAK
Posts: 5533
Joined: Mon Sep 26, 2011 10:56 am
Location: Looking forward to summer in Somerset, UK...
Contact:

Re: Trying to restart a 33 years old ZX81

Post by 1024MAK »

Some Info on the different versions here.

Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Amp

:!: Standby alert :!:
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :!:
Spring approaching...
Post Reply