Repairing ZX Spectrum issue two
- 1024MAK
- Posts: 5316
- Joined: Mon Sep 26, 2011 10:56 am
- Location: Looking forward to summer in Somerset, UK...
Re: Repairing ZX Spectrum issue two
Well, it looks like the ULA is doing what I expect.
I’m presuming you have carefully inspected both the underside and top sides of the board, including the IC socket contacts?
My thoughts are that maybe there is a fault with one (or more) of the 4116 DRAM chips, but your machine is not displaying the typical symptoms.
But before putting the 4116 DRAM back in, I would like to do some more tests. Sorry, I have to get ready for a meeting. I’ll post details later.
Mark
I’m presuming you have carefully inspected both the underside and top sides of the board, including the IC socket contacts?
My thoughts are that maybe there is a fault with one (or more) of the 4116 DRAM chips, but your machine is not displaying the typical symptoms.
But before putting the 4116 DRAM back in, I would like to do some more tests. Sorry, I have to get ready for a meeting. I’ll post details later.
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
Autumn is here. Bye bye summer 2024...
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
Autumn is here. Bye bye summer 2024...
Re: Repairing ZX Spectrum issue two
No, I did not systematically check all the contacts. But visual inspection suggests that the board is in a good condition and that there were no repairs concerning main and DRAM chips. If you tell me more specifically what contacts to check, I will do it.
By the way, as far as I remember, when I packed computer 30+ years ago it was in a working condition.
In noticed that the output changes if I rotate 4116 DRAM chips (among themselves). On the other hand, I noticed by pure chance that the output did not change when I removed one of low DRAM chips. I guess 4116 DRAM chips are the problem, but not necessarily the only problem.
OK.
- 1024MAK
- Posts: 5316
- Joined: Mon Sep 26, 2011 10:56 am
- Location: Looking forward to summer in Somerset, UK...
Re: Repairing ZX Spectrum issue two
On IC6 (or any other convenient point) test these pins to see if the address and control signals are wiggling between valid logic levels:
The most critical pins are 3, 4 and 15.
Also the corresponding pins on the ULA: pins 1 (/CAS), 4 (/DRAMWE) and 35 (/RAS).
I was going to say that you could try refitting the 4116 DRAM chips in a different order...
Mark
Code: Select all
Pin Function
3 /Write
4 /RAS
5 A0
6 A2
7 A1
10 A5
11 A4
12 A3
13 A6
15 /CAS
Also the corresponding pins on the ULA: pins 1 (/CAS), 4 (/DRAMWE) and 35 (/RAS).
I was going to say that you could try refitting the 4116 DRAM chips in a different order...
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
Autumn is here. Bye bye summer 2024...
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
Autumn is here. Bye bye summer 2024...
Re: Repairing ZX Spectrum issue two
For longer traces, my logic analyzer has top resolution 8MHz. In the beginning I see some writing, later only reading.
Wide look: Narrow look: However I can make my logic analyzer to read very short traces at 24MHz. If each bit is read in 375ns, that is about 3 bits are read per 1us, my logic analyzer reads only 8 points pre bit read. Are those two bits page-mode reads?
Measurement:
Wide look: Narrow look: However I can make my logic analyzer to read very short traces at 24MHz. If each bit is read in 375ns, that is about 3 bits are read per 1us, my logic analyzer reads only 8 points pre bit read. Are those two bits page-mode reads?
Measurement:
- 1024MAK
- Posts: 5316
- Joined: Mon Sep 26, 2011 10:56 am
- Location: Looking forward to summer in Somerset, UK...
Re: Repairing ZX Spectrum issue two
The ULA uses page mode when reading screen data, yes.
Mark
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
Autumn is here. Bye bye summer 2024...
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
Autumn is here. Bye bye summer 2024...
- 1024MAK
- Posts: 5316
- Joined: Mon Sep 26, 2011 10:56 am
- Location: Looking forward to summer in Somerset, UK...
Re: Repairing ZX Spectrum issue two
Ultimately, the fastest way to prove that the Z80 is working and the address, control and data busses are okay is to use a diagnostic board. This is an expansion that plugs into the edge-connector. It includes a ROM that contains a program that does need any working RAM to carry out some basic diagnostic tests.
Alternatively, if we assume that it’s a problem with the 4116 DRAM, you could either replace this with different 4116 DRAM chips, use a larger capacity DRAM chip (either bend the pins of each chip, or modify the board including cutting PCB tracks), or buy a ‘lower’ RAM replacement module.
Although the most likely problem is a ‘lower’ DRAM fault, and the tests done so far do point to this, it’s still possible that something else is faulty.
There are DRAM testers on trading sites (either prebuilt or as kits of parts) that will perform a basic test on DRAM chips. Some will only test one type, while others can test a small number of types. They do have some limitations - they can’t test the response times.
Good signs so far:
The border always going to ‘white’ indicates that the Z80, the ROM, the data and most of the control and address lines are okay. Also the clock and address decoding (for the ROM) section of the ULA is okay.
The ULA is generating a stable video picture (even if the text and graphics section is a mess), so again, that means that most of the ULA is working.
However, this does not mean that all of the ULA is working. The only way to know for certain is to either swap the ULA (either fit a different one, or try this one in a known good board). Or to eliminate problems with the other components (primarily the ‘lower’ DRAM).
Another very remote, but possible problem, may be that one of the multiplexer chips has failed (IC3, IC4, both 74LS157 or 74LS257).
The 330Ω resistors on the outputs of IC3 and IC4 is the reason that it’s unlikely that these are the cause, the resistors normally allow the ULA to overrule them.
These are not normally in sockets. If you are good at desoldering, these can be eliminated by removing them. I normally don’t recommend desoldering unless essential, as it’s easy for inexperienced people to damage the PCB tracks or the plated through holes.
One other thing you could try. Refit the 4116 DRAM, then disable the ROM chip.
On the edge connector, pin 25 on the underside can be connected to +5V to tell the ROM to ignore any reads. Alternatively you can connect to the appropriate lead of resistor R33 (680Ω). Do make sure you connect to the side that goes to the ROM chip and NOT to the side that goes to the ULA pin.
In this state it should turn off its output pins. Now the Z80 will read whatever value the data bus floats to. Which, if there are no misbehaving chips fitted, should be 255 (FFh or 0xFF) due to ‘pull-up’ resistors R9 to R16.
As far as the Z80 is concerned 0xFF means RST 38h. When the Z80 executes this instruction, the current PC value plus one is pushed onto the stack, then the PC is loaded with 38h. The Z80 then fetches the instruction at this address which is again 0xFF.
The end result is that all RAM will fill up with the values that are being pushed to the stack, as the stack pointer works its way through all possible addresses before wrapping around and then doing it all again.
If the screen RAM and the ULA are working, this will produce a distinctive diagonal pattern on the screen. I did a video showing this here.
Mark
Alternatively, if we assume that it’s a problem with the 4116 DRAM, you could either replace this with different 4116 DRAM chips, use a larger capacity DRAM chip (either bend the pins of each chip, or modify the board including cutting PCB tracks), or buy a ‘lower’ RAM replacement module.
Although the most likely problem is a ‘lower’ DRAM fault, and the tests done so far do point to this, it’s still possible that something else is faulty.
There are DRAM testers on trading sites (either prebuilt or as kits of parts) that will perform a basic test on DRAM chips. Some will only test one type, while others can test a small number of types. They do have some limitations - they can’t test the response times.
Good signs so far:
The border always going to ‘white’ indicates that the Z80, the ROM, the data and most of the control and address lines are okay. Also the clock and address decoding (for the ROM) section of the ULA is okay.
The ULA is generating a stable video picture (even if the text and graphics section is a mess), so again, that means that most of the ULA is working.
However, this does not mean that all of the ULA is working. The only way to know for certain is to either swap the ULA (either fit a different one, or try this one in a known good board). Or to eliminate problems with the other components (primarily the ‘lower’ DRAM).
Another very remote, but possible problem, may be that one of the multiplexer chips has failed (IC3, IC4, both 74LS157 or 74LS257).
The 330Ω resistors on the outputs of IC3 and IC4 is the reason that it’s unlikely that these are the cause, the resistors normally allow the ULA to overrule them.
These are not normally in sockets. If you are good at desoldering, these can be eliminated by removing them. I normally don’t recommend desoldering unless essential, as it’s easy for inexperienced people to damage the PCB tracks or the plated through holes.
One other thing you could try. Refit the 4116 DRAM, then disable the ROM chip.
On the edge connector, pin 25 on the underside can be connected to +5V to tell the ROM to ignore any reads. Alternatively you can connect to the appropriate lead of resistor R33 (680Ω). Do make sure you connect to the side that goes to the ROM chip and NOT to the side that goes to the ULA pin.
In this state it should turn off its output pins. Now the Z80 will read whatever value the data bus floats to. Which, if there are no misbehaving chips fitted, should be 255 (FFh or 0xFF) due to ‘pull-up’ resistors R9 to R16.
As far as the Z80 is concerned 0xFF means RST 38h. When the Z80 executes this instruction, the current PC value plus one is pushed onto the stack, then the PC is loaded with 38h. The Z80 then fetches the instruction at this address which is again 0xFF.
The end result is that all RAM will fill up with the values that are being pushed to the stack, as the stack pointer works its way through all possible addresses before wrapping around and then doing it all again.
If the screen RAM and the ULA are working, this will produce a distinctive diagonal pattern on the screen. I did a video showing this 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
Autumn is here. Bye bye summer 2024...
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
Autumn is here. Bye bye summer 2024...
Re: Repairing ZX Spectrum issue two
OK, if I understand right, the only inexpensive step I can still do is to sort out DRAM chips and disable ROM.
The only source of DRAMs I found is AliExpress and even there only 4164s are available. Of course there are a lot of reviewers saying that the chips are used and not all are working which means that in that case I definitely need DRAM tester. I kind of anticipated that and already started building one from the elements I already have at hand (using Arduino's 5V and getting -5V with MAX660 and 12V with a step up):
Switches are used to be able to test both 4116 and 4164.
Hopefully I succeed adapting some software on net; this thread looks promising:
https://forum.defence-force.org/viewtopic.php?t=1699
Then of course I can adapt 4164 for use as 4116 by cutting pin 1 and bending and connecting pin 8 to pin 9.
Then disable ROM as you described.
If all this fails... well maybe my ZX Spectrum gets recycled into something nice...
Does this sound like a good plan?
I did not quite understand the part of the plan with multiplexers. I simply remove them or replace them? What should I see after removing them? I do have a simple desoldering gun, so this is not completely far fetched.
Since I am already ordering from AliExpress, should I also order some solid electrolytic capacitors like these
https://vi.aliexpress.com/item/1005002973596027.html
I assume that solid means polymer, therefore solving aging problem. They are suspiciously cheap, but with excellent reviews.
Do you have any indication that caps could be be culprit for at least some of my problems?
The only source of DRAMs I found is AliExpress and even there only 4164s are available. Of course there are a lot of reviewers saying that the chips are used and not all are working which means that in that case I definitely need DRAM tester. I kind of anticipated that and already started building one from the elements I already have at hand (using Arduino's 5V and getting -5V with MAX660 and 12V with a step up):
Switches are used to be able to test both 4116 and 4164.
Hopefully I succeed adapting some software on net; this thread looks promising:
https://forum.defence-force.org/viewtopic.php?t=1699
Then of course I can adapt 4164 for use as 4116 by cutting pin 1 and bending and connecting pin 8 to pin 9.
Then disable ROM as you described.
If all this fails... well maybe my ZX Spectrum gets recycled into something nice...
Does this sound like a good plan?
I did not quite understand the part of the plan with multiplexers. I simply remove them or replace them? What should I see after removing them? I do have a simple desoldering gun, so this is not completely far fetched.
Since I am already ordering from AliExpress, should I also order some solid electrolytic capacitors like these
https://vi.aliexpress.com/item/1005002973596027.html
I assume that solid means polymer, therefore solving aging problem. They are suspiciously cheap, but with excellent reviews.
Do you have any indication that caps could be be culprit for at least some of my problems?
-
- Posts: 190
- Joined: Tue Sep 05, 2023 11:56 am
Re: Repairing ZX Spectrum issue two
If you can get this ebay seller to ship to you this is the tester board I use
https://www.ebay.co.uk/itm/325662918573
https://www.ebay.co.uk/itm/325662918573
- 1024MAK
- Posts: 5316
- Joined: Mon Sep 26, 2011 10:56 am
- Location: Looking forward to summer in Somerset, UK...
Re: Repairing ZX Spectrum issue two
The diagnostic boards are based (or evolved) from this design. There is a later, more comprehensive software (firmware) for it here.
Mark
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
Autumn is here. Bye bye summer 2024...
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
Autumn is here. Bye bye summer 2024...