Stuck with repair of Spectrum+

For experts to discuss very technical stuff and newbies to ask why the Spectrum they bought off ebay doesn't work.
speccyplus
Drutt
Posts: 46
Joined: Wed Apr 15, 2020 5:41 pm

Stuck with repair of Spectrum+

Post by speccyplus »

Hi All, never owned a spectrum, just read a lot about them back in the day when I was using C64s and Ataris.

So I had a chance to pick one up for free! Looked to be in good shape, was in storage for the last 20ish years. Do no know if it was working or not, looks like it may have been opened in the past.

The keyboard large ribbon was broken at the fold, so that is shot unless I wire a connector all the way up and extend it from the motherboard.

Image

I did all the usual checks, the barrel connector re-soldered just in case. Coils looks good on the transformer, the specs from the regulator looked good, did some test on the lower ram bank.

TR4 and TR5 looked good from what I read on online doing diode test.

I then did the RF to Composite mod with 100uf cap.

So was feeling pretty lucky, and powered it on and got this:

Image

I then checked all the voltages coming in at the regulator, checked the first lower bank ram chip, got all around the specs for 0v,-5v, 5v and 12v.

I started feeling the chips with the ''finger" test and the 2nd from the left ram chipped burned my finger, I shut everything down, and felt all the other chips, nothing felt hot.

So after trying to solder suck, decided to cut the chip out, I then pulled the pins, solder sucked the holes clean and I didn't see any trace damage, so I tested with a multimeter, looked good.

Image

I powered it up again to see if I got a different screen, since I read you get different patterns for lower ram being bad and got this which implies that ram chip was bad(missing in this case):

Image

I then put a socket on.

Image

And got this screen.

Image

Checked all the continuity on the socket, power on and off, got the right voltages, etc.

With a scope I see I am getting clocks, the 3 and 14mhz on the ULA. CPU is showing activity, which I assumed anyways since I get the white border.

Not sure what changed, or what to look at next. I assume something was acting a bit flaky. The screen is in motion, flashing blocks and bars.

I did the 4164 to 4116 mod, cutting pin 1 and looping pin 8 over to pin9, installed that but no difference. I am not sure of the speed of the 4164 chips I had laying around.

I am thinking TR4/TR5 issues, but having a hard time finding what I should check for exactly, as the readings I get are close but slightly off I think.

I had a very similar looking issue on a C64 with the 7lS chip being defective, I am still reading up on the motherboard for these systems and how they work.

I cant seem to find any posts with a similar screen. Any help appreciated.
User avatar
Ast A. Moore
Rick Dangerous
Posts: 2640
Joined: Mon Nov 13, 2017 3:16 pm

Re: Stuck with repair of Spectrum+

Post by Ast A. Moore »

Hmm. Looks like your second screen is the best result you’ve gotten so far, which is curious. Just for kicks and giggles, try reseating the ULA and the CPU (if you haven’t already).

In each case it looks like the CPU can execute at least some code from the ROM, which is a good sign. I’d try disabling the upper RAM and, if that doesn’t help things, I’d remove all the upper RAM chips and retest.

Also, even though it’s pretty tedious, I’d check of all the data lines between the CPU, ROM, and RAM for continuity/shorts.
Every man should plant a tree, build a house, and write a ZX Spectrum game.

Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
speccyplus
Drutt
Posts: 46
Joined: Wed Apr 15, 2020 5:41 pm

Re: Stuck with repair of Spectrum+

Post by speccyplus »

Thanks! I did reseat the CPU and ULA a few times.

How do I disable the upper ram bank?
User avatar
Ast A. Moore
Rick Dangerous
Posts: 2640
Joined: Mon Nov 13, 2017 3:16 pm

Re: Stuck with repair of Spectrum+

Post by Ast A. Moore »

speccyplus wrote: Wed Apr 15, 2020 8:34 pm How do I disable the upper ram bank?
You pull one of the inputs (pin 5) of one of the OR gates of the 74LS32 (IC23) up to the +5V rail. That will disable the CAS signal for the upper RAM chips (well, prevent it from reach them). Note, that if one of the upper RAM ICs is permanently pulling one or more of the data lines high or low, this procedure won’t clear the fault. But it’s easy to do and reverse, so it wouldn’t harm to try.
Every man should plant a tree, build a house, and write a ZX Spectrum game.

Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
speccyplus
Drutt
Posts: 46
Joined: Wed Apr 15, 2020 5:41 pm

Re: Stuck with repair of Spectrum+

Post by speccyplus »

Cool thanks, btw this is an issue 4B board.

Looking closer at the back, I see old flux on a few places, it looks like maybe the CPU was not socketed before and a socket was added, and not done well, I am going to reflow that.

I see that IC14 may have been replaced, looks like TR1, TR2 and TR4 too. Also see IC15 as well as the mini phono jacks.
User avatar
Ast A. Moore
Rick Dangerous
Posts: 2640
Joined: Mon Nov 13, 2017 3:16 pm

Re: Stuck with repair of Spectrum+

Post by Ast A. Moore »

speccyplus wrote: Wed Apr 15, 2020 9:29 pm Cool thanks, btw this is an issue 4B board.
I know. First thing I looked at when I read your post. ;)
speccyplus wrote: Wed Apr 15, 2020 9:29 pmLooking closer at the back, I see old flux on a few places, it looks like maybe the CPU was not socketed before and a socket was added, and not done well, I am going to reflow that.

I see that IC14 may have been replaced, looks like TR1, TR2 and TR4 too. Also see IC15 as well as the mini phono jacks.
Sinclair usually didn’t socket the CPU (as far as I know). I wouldn’t worry about TR1, TR2, or IC14 for the time being, since you’re video works just fine.
Every man should plant a tree, build a house, and write a ZX Spectrum game.

Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
speccyplus
Drutt
Posts: 46
Joined: Wed Apr 15, 2020 5:41 pm

Re: Stuck with repair of Spectrum+

Post by speccyplus »

I reflowed the CPU socket, no change, then tried disabling the upper memory, no change.

Any other thoughts? Maybe still a lower ram problem? I double checked all the pins on the new socket, they all have continuity.

I guess I will check the traces for CPU/ROM/RAM next.

I can start replacing parts, but its more fun to try to find the exact problem.

Will pulling all the upper ram and still leaving the support chips for it truly not leave any issues to cause problems?
User avatar
Ast A. Moore
Rick Dangerous
Posts: 2640
Joined: Mon Nov 13, 2017 3:16 pm

Re: Stuck with repair of Spectrum+

Post by Ast A. Moore »

speccyplus wrote: Thu Apr 16, 2020 4:32 am Maybe still a lower ram problem?
Well, it’s clear that the CPU is not executing the boot code from the ROM. Try resetting the CPU by momentarily pressing the reset switch and watch the screen. Does anything change? (Note that the flashing of attributes is performed by the ULA, not the CPU, so flashing in and of itself does not indicate “life.”) What happens if you hold the reset button for a few seconds?

One of the first instructions that the CPU executes upon reset is to set the border to white, which seems to be the case, judging from all the pictures you’ve supplied us so far. If this is a hundred-percent consistent behavior, chances are the CPU can talk to the ROM fine.
speccyplus wrote: Thu Apr 16, 2020 4:32 amWill pulling all the upper ram and still leaving the support chips for it truly not leave any issues to cause problems?
It depends. IC3 and part of IC24 do the multiplexing and select between the lower and upper RAM. This is controlled by the ULA. If one of them went tits up, you’re going to see garbage on the screen as soon as the ROM boot process starts writing and reading to the RAM. So, it’s not an open and shut case.
Every man should plant a tree, build a house, and write a ZX Spectrum game.

Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
User avatar
1024MAK
Bugaboo
Posts: 3104
Joined: Wed Nov 15, 2017 2:52 pm
Location: Sunny Somerset in the U.K. in Europe

Re: Stuck with repair of Spectrum+

Post by 1024MAK »

If the +12V and -5V supply rails are okay, then TR4 and TR5 are fine.

Yes, you can remove all the upper DRAM chips (IC15 to IC22) plus the two multiplexer chips for this DRAM (IC25 and 26). Leave all the others alone. However as all these appear to be directly soldered to the board, I would do the videoing detailed below first. Then check that you disabled the upper DRAM chips correctly.

As said above, the white border indicates that the Z80 CPU is able to run the code from the ROM, but is getting stuck at some point further on.

Some “upper” RAM faults can also cause problems. Although a lot of the time, a Spectrum will fail the “upper” RAM and it will start up and operate as a 16k byte machine.

To disable the "upper" 32k of RAM, (so attempt to eliminate this as the problem) take a piece of wire and connect pin 5 on IC23 (a 74LS32) to +5V. (link).

I suggest you make a temporary solder connection with an SPST on/off switch in series. Start with the switch set to on. Then if you get to the copyright screen and BASIC works, after that, you can turn the switch off so that some simple BASIC commands can access and therefore test the upper RAM.

This is done because the ROM code tries to see how much RAM there is at start-up. After this, the BASIC ROM will ignore any RAM that is not present (or in this case, is disabled)(well, unless you reset the limits using CLEAR n). But the BASIC POKE and PEEK commands have no limits and work across the whole Z80 address range.

Double and triple check that you have the correct pin on the correct chip, or you WILL damage something. This temporary modification will disable the "upper" RAM (when the switch is ON), as the CAS signal won't reach the RAM chips.

Note that if a faulty DRAM IC is jamming one of the data lines, this won't really help.

Disabling or removing the upper DRAM won’t help if the problem is elsewhere, for example, another faulty lower DRAM chip, a cracked/broken track or via, or a poor IC/socket connection of dry solder joint.

Can you do a video of what happens after power up. This is best done with the TV left on, and with a TV that does not take any length of time before it gives you a picture. Upload the video to You Tube.

Then do the same, but this time, press and hold the reset button, then turn on the power. Then after the TV displays a screen of random coloured blocks, let go of the reset switch. Indicate when you do this so we know.

Mark
:!: Standby alert :!:
“There are four lights!”
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :dance
Looking forward to summer later in the year.
speccyplus
Drutt
Posts: 46
Joined: Wed Apr 15, 2020 5:41 pm

Re: Stuck with repair of Spectrum+

Post by speccyplus »

Thanks Mark!

I will do the video tonight, sneak peek, this is what happens if I hold the reset button and power up, this is constant and nothing changes, when I release goes back to the previous scrambled screen.

Doing the pin 5 to +5v shows no difference btw.
Image
speccyplus
Drutt
Posts: 46
Joined: Wed Apr 15, 2020 5:41 pm

Re: Stuck with repair of Spectrum+

Post by speccyplus »

Ok, I have 4 power cycles here.

You will hear beeps, that is me turning on the bench power-supply and off.

The 1st cycle is with the 74ls pin 5 to +5v as well as removing it, no discernible changes.
The 2nd cyle at 23 seconds is with the 74ls pin 5 to +5v with reset button held in, then removed the reset depression. You can see the flashing speed up. Then a beep when power is removed.
The 3rd is just regular power up with reset held, then released at about 54 seconds.
The 4th is a repeat of 3rd.

[media]https://streamable.com/t43x7q[/media]
User avatar
1024MAK
Bugaboo
Posts: 3104
Joined: Wed Nov 15, 2017 2:52 pm
Location: Sunny Somerset in the U.K. in Europe

Re: Stuck with repair of Spectrum+

Post by 1024MAK »

That does not look like a simple memory failure to me.

The change in flashing gives this away. Let me explain a little about the Speccy works. The ULA produces the video output by reading data from the ‘lower’ RAM (0x4000 / 16384 to 0x7FFF / 32767). The colours are determined by the setting of the character cell attribute data, this includes a flash setting. The ULA attribute flash rate is 1.56Hz.

All the above happens regardless of what the Z80 processor is doing. By holding the reset switch in, you were holding the Z80 in reset.

When the Z80 is allowed to run, the screen display starts changing much quicker, so for some reason the Z80 is writing what appears to be garbage data to the screen area.

I’ll have to have a think about this. Meanwhile, what test gear do you have?

Mark
:!: Standby alert :!:
“There are four lights!”
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :dance
Looking forward to summer later in the year.
speccyplus
Drutt
Posts: 46
Joined: Wed Apr 15, 2020 5:41 pm

Re: Stuck with repair of Spectrum+

Post by speccyplus »

30 Year old digital multi-meter, Rigol DS1052E that I am trying to learn how to use. I have a bench PSU that is OK, show load, output voltage, etc. Solder sucker and soldering irons.

Since I have the time with the world events, I started removing all the lower ram chips and replacing with sockets. Slow going to make sure I don't damage any traces, but replaced 4.

The CPU was replaced at some point, it has an 87 Date code on it.
speccyplus
Drutt
Posts: 46
Joined: Wed Apr 15, 2020 5:41 pm

Re: Stuck with repair of Spectrum+

Post by speccyplus »

Ok, spent a few hours this AM tracing from the CPU socket, checking continuity. All the pin sockets could close to ground exept a few, which I traced to expansion bus fingers and the M1 line.
speccyplus
Drutt
Posts: 46
Joined: Wed Apr 15, 2020 5:41 pm

Re: Stuck with repair of Spectrum+

Post by speccyplus »

Googleing around, I see my CPU was from a spectrum +2A, Z0840004PSC.

I thought I read somewhere, that sometimes this is not 100% compatible, doing swaps. Can anyone confirm?

Does anyone have a good source I can purchase a Z80 that is the correct speed and specs and the appropriate ULA chip for my board? All the folks in the UK wont ship because of COVID-19 right now.
User avatar
1024MAK
Bugaboo
Posts: 3104
Joined: Wed Nov 15, 2017 2:52 pm
Location: Sunny Somerset in the U.K. in Europe

Re: Stuck with repair of Spectrum+

Post by 1024MAK »

Any Z80 rated at 4MHz (or higher speed rating) should work. All Sinclair ZX80, ZX81, ZX Spectrum and all Amstrad produced ZX Spectrum models (including the +2A) all use a Z80 with the same specification.

Hence a Z80 from a ZX80 will work in a +2A and a Z80 from a +2A will work in a rubber key ZX Spectrum.

Zilog changed their part number system over the years. And there were various second sources. The most common is the NEC µPD780C (often marked ‘D780C-1’ for the 4MHz version) all of which work fine.

I don’t think your ULA is faulty. From what I have seen on the video, it’s correctly producing a valid video output. The problem is that the Z80 CPU is not running the correct code from the ROM.

What ROM chip is fitted? Is it in a socket (from the earlier photo it does not look like it is in a socket)? If yes, are any of the pins bent and not in the socket?

It looks like the Z80 is in a socket? If yes, are any of the pins bent and not in the socket?

Can you please post a good quality close up photo of your board, both top and underside.

Mark
Last edited by 1024MAK on Mon Apr 20, 2020 3:52 pm, edited 1 time in total.
:!: Standby alert :!:
“There are four lights!”
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :dance
Looking forward to summer later in the year.
User avatar
Ast A. Moore
Rick Dangerous
Posts: 2640
Joined: Mon Nov 13, 2017 3:16 pm

Re: Stuck with repair of Spectrum+

Post by Ast A. Moore »

speccyplus wrote: Mon Apr 20, 2020 3:00 pm I thought I read somewhere, that sometimes this is not 100% compatible, doing swaps. Can anyone confirm?
It’s a bog-standard, original NMOS 4MHz Z80. Nothing particularly incompatible about it.

The Issue 4 boards do use a couple of gates in IC24 to create a delay in the RAS line coming from the ULA and into the common select inputs of the two LS157 chips (IC3 and 4). If anything, though, I’d say they have an effect on the upper RAM, rather than the lower RAM.

I forget, have you already checked the clock on both the ULA (Pin 39) and the CPU (Pin 6)?

Do you have an EPROM programmer so you can dump and verify (and burn, if necessary) a ROM chip?
Every man should plant a tree, build a house, and write a ZX Spectrum game.

Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
HappyLittleDiodes
Drutt
Posts: 42
Joined: Mon Apr 20, 2020 9:29 am

Re: Stuck with repair of Spectrum+

Post by HappyLittleDiodes »

No theory here but a recap wouldn't hurt
speccyplus
Drutt
Posts: 46
Joined: Wed Apr 15, 2020 5:41 pm

Re: Stuck with repair of Spectrum+

Post by speccyplus »

1024MAK wrote: Mon Apr 20, 2020 3:33 pm What ROM chip is fitted? Is it in a socket (from the earlier photo it does not look like it is in a socket)? If yes, are any of the pins bent and not in the socket?
Mark
It's a GI 8435 CDA and not in a socket. I can order a socket and pull it. I also have a TL866 USB Programmer so I assume I can read it and do a checksum of the code, vs a known good one online? Where can I find this rom?
1024MAK wrote: Mon Apr 20, 2020 3:33 pm It looks like the Z80 is in a socket? If yes, are any of the pins bent and not in the socket?
Mark
No bent pins, it is in perfect.
1024MAK wrote: Mon Apr 20, 2020 3:33 pm Can you please post a good quality close up photo of your board, both top and underside.
Mark
Here you go, thanks for your help! One of the upper ram chips looks pretty crunchy. May pull those, as I plan to just socket all the ram anyways.

Image

Image
speccyplus
Drutt
Posts: 46
Joined: Wed Apr 15, 2020 5:41 pm

Re: Stuck with repair of Spectrum+

Post by speccyplus »

Ast A. Moore wrote: Mon Apr 20, 2020 3:43 pm
speccyplus wrote: Mon Apr 20, 2020 3:00 pm I thought I read somewhere, that sometimes this is not 100% compatible, doing swaps. Can anyone confirm?
It’s a bog-standard, original NMOS 4MHz Z80. Nothing particularly incompatible about it.

The Issue 4 boards do use a couple of gates in IC24 to create a delay in the RAS line coming from the ULA and into the common select inputs of the two LS157 chips (IC3 and 4). If anything, though, I’d say they have an effect on the upper RAM, rather than the lower RAM.

I forget, have you already checked the clock on both the ULA (Pin 39) and the CPU (Pin 6)?

Do you have an EPROM programmer so you can dump and verify (and burn, if necessary) a ROM chip?
I do have a TL866 USB, what chip do I need to be able to flash a new copy. I will probably pull the ROM just to dump it. Will get back to you on pin 39 and 6, I don't remember either!

Thanks for your help!
Firefox

Re: Stuck with repair of Spectrum+

Post by Firefox »

I can't quite tell reading the thread back - did you eventually replace IC12 (lower RAM IC), or is it still missing?
User avatar
1024MAK
Bugaboo
Posts: 3104
Joined: Wed Nov 15, 2017 2:52 pm
Location: Sunny Somerset in the U.K. in Europe

Re: Stuck with repair of Spectrum+

Post by 1024MAK »

Before desoldering the ROM, it’s possible to disable it (if it’s not completely dead).

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

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

If the screen RAM and the ULA are working, this will produce a distinctive diagonal pattern on the screen.

Mark
:!: Standby alert :!:
“There are four lights!”
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :dance
Looking forward to summer later in the year.
User avatar
1024MAK
Bugaboo
Posts: 3104
Joined: Wed Nov 15, 2017 2:52 pm
Location: Sunny Somerset in the U.K. in Europe

Re: Stuck with repair of Spectrum+

Post by 1024MAK »

speccyplus wrote: Mon Apr 20, 2020 7:46 pm One of the upper ram chips looks pretty crunchy. May pull those, as I plan to just socket all the ram anyways.
Yes, the soldering does not look very professional :(

The CPU has also been socketed by someone.

It is worthwhile cleaning the brown flux odd the board and visually inspecting it. You are looking for possible solder splashes, broken or cracked tracks and dry solder joints. If I’m telling granny to suck eggs, forgive me. It’s hard to tell how much experience you have.

Mark
:!: Standby alert :!:
“There are four lights!”
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :dance
Looking forward to summer later in the year.
User avatar
1024MAK
Bugaboo
Posts: 3104
Joined: Wed Nov 15, 2017 2:52 pm
Location: Sunny Somerset in the U.K. in Europe

Re: Stuck with repair of Spectrum+

Post by 1024MAK »

You can replace the ROM chip with a 27128, 27C128, 27256 or 27C256. However you will need to add a wired OR gate as per the details here. The reason being is that a EPROM only has a single chip select input, but the ROM has two chip select inputs.

You can download the “48.rom” file from this site.

If you you use a 27256 or 26C256, you can put this diagnostic ROM into the top half of the EPROM. Then wire a small switch to the highest address line (pin 27) to select between the normal ROM and the diagnostic ROM ;)

The diagnostic ROM does not need any working RAM to run basic tests. So as long as the CPU is running and the ULA is working, it can be a valuable test tool.

Mark
:!: Standby alert :!:
“There are four lights!”
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :dance
Looking forward to summer later in the year.
speccyplus
Drutt
Posts: 46
Joined: Wed Apr 15, 2020 5:41 pm

Re: Stuck with repair of Spectrum+

Post by speccyplus »

Firefox wrote: Mon Apr 20, 2020 8:02 pm I can't quite tell reading the thread back - did you eventually replace IC12 (lower RAM IC), or is it still missing?
I replaced it with a modified 4164, that was known good. I am waiting on replacement 4116s. Whenever I do tests, I do it with and without the that ram chip.
Post Reply