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 »

Just thought I'd add my two bobs worth.

Never had a ROM go bad in over thirty years of collecting/using and as for de soldering I have regularly de soldered and re soldered ULAs direct to the board over the years using nothing more than a solder sucker and a good iron with NO ill effects snapped pins lifted pads etc.
The 81 board seems a lot more robust than the spectrum board so have faith in your abilities and go for it.
I would add that I'm probably the least technically minded on the forum so you should find it easy. :D
???????????????????????????PIINKEY$?????RND????????????????????????????????????????????????????????PI????????
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:You should measure if there comes out a signal on MREQ or M1 or RD.
MREQ and M1 are always high. RD is always low. And of course, WR is high (since RD is low).
There must be any periodic signal even if the PROM content is wrong. The Z80 does always read an instruction from time to time.
It could get stuck because of an illegal instruction...
There are a few exceptions from this rule:

HALT (pin 18) - must be high (stuck low with no further NMI and disabled interrupts)
Held high by the CPU, yes. Checked.
WAIT (pin 24) - must be high (could be stuck in WAIT with a killed transistor)
It's high, most of the time. It's a TV line sync signal, as I see it (about 62µs for the period, measured from an analog oscilloscope, i.e. approximately one TV line period), with around 5µs low (horizontal retrace, as I infer it) at each period. Same thing for the NM pin.
BUSREQ (pin 25) - must be high, not used at all
Checked. Same for BUSACK (logical).
RESET (pin 26) must be high of course
Why do you think the first thing I did was to replace C5 ?... :lol:
But yes, it's high, as long as I don't press the reset button.

Before you ask for them, here are the other signals to/from the CPU:
RFSH: kept high always
IORQ: kept high always
INT: kept low, always (!)... This could be the issue, but from the schematics I got, INT is tied to A6, so I assume it's involved in the video signal generation (in SLOW mode) and that it is therefore "normal" for a ZX-81...
So there is another possible source of failure I had just a few month ago when repairing my ZX80CORE. This had a clock at pin 6 (measured) but a stuck address bus while all other signals are okay. It seems it was stuck inside a read cylce of an instruction.
It just can't be the case, here... For a start, pin 6 is behind a low impedance source (a transistor) and the oscilloscope probe (used in 1/10 mode) impedance is 10 MOhms and only a few pF...
Then, there's the fact that the ULA is generating a white screen image (and yes, I also checked the output at pin 16 of the ULA and got a nice TV signal on the oscilloscope), which it could not do without a resonator oscillating at the right frequency...

My guess is still that the problem comes from the PROM... But I'd happily be proven wrong !
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:Hello Dinosaur, welcome to our forum :D
Thanks ! :D
One of my ZX81 Issue 1 boards - view of the Mostek MK36809N-5 ROM
Most of my ZX81's (issue 1 and issue 3 boards) use "ROM"s. I am presuming that they are the mask "programmed" type, rather than the windowless PROM type.
Yes, these are either "mask" ROMs or "fuses" OTP ROMs and are unlikely to ever get faulty (short of electrostatic discharges or short-circuiting of their pins).
If you want to save both the chip and the board, carefully use an electric paint stripping hot air gun to melt the solder on the bottom (non-component) side.
I got a hot air (de)soldering iron... I'm not a newbie in electronics (38 years of experience as a hobbyist). However, my experience is that most printed circuit boards will not resist too well to such de-soldering. In the case of the ZX-81, the fact that it is "tropicalized" with varnish on the bottom side means that the said varnish will most probably get carbonized by the hot air flow: 250°C minimum is required, to melt the solder, and with the fact that the ZX-81 board got its components soldered in vias (this is really a bad thing to do, if you want to make the board repair-resilent... but we all know that Sinclair's design has always been extremely cheap, in all accounts...), the necessary delay before the solder will melt on the component side will make it quite dangerous and risky an operation for both the printed circuit and the IC health...
So far I have found ZX81's bought from ebay either worked okay (apart from the normal membrane failure), needed some dry joints resoldering (mainly the jack sockets), a new Z80 CPU (one) or a replacement ULA (one). Not had a ROM fault yet on a ZX81. ZX Spectrum's appear to have more ROM faults, but then, I am only going on a limited number of reports from the WoS forum.
Interesting to know that you did encounter a dead Z80A... Could be my case too, although why it would have died would be a real mystery to me (it was working fine when I switched it off 30 years ago, and does not contain any time-sensitive part such as a micro-program 'ROM' like modern CPUs have... It was all hard wired logic back then...).
Last edited by dinosaur on Sat Aug 15, 2015 3:09 pm, edited 2 times in total.
User avatar
1024MAK
Posts: 5532
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 »

Based on what you have posted, if the Z80 is socketed, I would swap it for a known working CPU.

I have a thought. I will post more after I checked something...

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...
User avatar
1024MAK
Posts: 5532
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 »

Ahh, the two issue one boards that I have de soldered chips from had no protection lacquer.

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 »

1024MAK wrote:Based on what you have posted, if the Z80 is socketed, I would swap it for a known working CPU.
The only socketed component on the issue 3 board is the ULA... I guess Sinclair did consider that only that chip was likely to fail (it's heating up at almost 60°C under "normal" conditions, unlike all other ICs).
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 - you are a hard nut and don't want to believe in the capabilities of other users here. So your decision.
One last attempt:

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.
There are only undocumented instructions.

Every combination of bytes will form a valid instruction as you can see in the well prepared document from Sean Young.
http://www.z80.info/zip/z80-documented.pdf
See chapter 9 - instructions sorted by opcode.

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. 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. So the question would be as well what did you use to replace C5.

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.

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. You think that you probe tip can not harm this transistor in any way but I thought this from the LS05 (which is an open collector output with a simple transistor similar to TR2) either. Or do you think it was fun to destroy the CPU by cutting its pins one after each other ? May god protect me from this sacrilege. :?

So did you ever had a bad/broken piece of silicon in your hand and how did you see this from outside ?
Do you think a simple transistor can never fail ? 8-)

You can replace the CPU first or the transistor - your decision.
Last edited by PokeMon on Sat Aug 15, 2015 3:13 pm, edited 1 time in total.
Moggy
Posts: 3497
Joined: Wed Jun 18, 2008 2:00 pm

Re: Trying to restart a 33 years old ZX81

Post by Moggy »

dinosaur wrote:
1024MAK wrote:Hello Dinosaur, welcome to our forum :D
Thanks ! :D
(it was working fine when I switched it off 30 years ago, and does not contain any time-sensitive part such as a micro-program 'ROM' like modern CPUs have... It was all hard wired logic back then...).
I thought the z80 was micro programmed and the 6502 hard wired?..

http://people.cs.clemson.edu/~mark/uprog.html


Relevant passage.

"Several early microprocessors were hardwired, but some amount of microprogramming soon became a common control unit design feature. For example, among the major eight-bit microprocessors produced in the 1974 to 1976 time frame, the MC6800 was hardwired while the Intel 8080 and Zilog Z80 were microprogrammed [Anc86]. An interesting comparison between 1978-era 16-bit microprocessors is the hardwired Z8000 [Shi79] and the microcoded Intel 8086 [McK79]. The 8086 used a control store of 504 entries, each containing a rather generic 21-bit microinstruction. Extra decoding logic was used to tailor the microinstruction to the particular byte-wide or word-wide operation. In 1978 the microprogramming of the Motorola 68000 was described [Anc86,Str78,Tre88]. This design contained a sophisticated two-level scheme. Each 17-bit microinstruction could contain either a 10-bit microinstruction jump address or a 9-bit "nanoinstruction" address. The nanoinstructions were separately stored 68-bit words, and they identified the microoperations to be performed in a given clock cycle. Additional decoding logic was used along with the nanoinstruction contents to drive the 196 control signals. "


I have to concur with karl(pokemon) you seem a tad arrogant/dismissive in your replies.
What he and Mark don't know about Sinclair machines isn't worth knowing about, their knowledge and advice is priceless in my opinion so as a final solution, as the 81 is only a four chip wonder just replace the bloody lot and then there is no sodding doubt about it!
???????????????????????????PIINKEY$?????RND????????????????????????????????????????????????????????PI????????
User avatar
1024MAK
Posts: 5532
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 »

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...

Oh, and yes, all the Ferranti "high" speed ULA's in Sinclair computers run hot.

Mark

Edited for typo (okay two repeated words :oops: )
Last edited by 1024MAK on Sat Aug 15, 2015 3:58 pm, edited 1 time in total.
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...
User avatar
1024MAK
Posts: 5532
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 »

ZX81 issue 1 - 01 - top of PCB after old RAM desoldered 560.jpg
Issue 1 - Top of PCB after old RAM desoldered
(295.24 KiB) Downloaded 461 times
ZX81 issue 1 - 02 - bottom of PCB after old RAM desoldered 560.jpg
Issue 1 - Bottom of PCB after old RAM desoldered
(327.17 KiB) Downloaded 461 times
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.

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