Diagnostics card help.

For experts to discuss very technical stuff and newbies to ask why the Spectrum they bought off ebay doesn't work.
rich_r
Drutt
Posts: 34
Joined: Mon Sep 11, 2023 11:57 am

Diagnostics card help.

Post by rich_r »

My Issue 6 Spectrum stopped working a few months back, and advice on here was that it was probably upper RAM to blame.

I have managed to acquire a diagnostics card from someone at work, it appears to be the one myretrostore.co.uk sell, based on the Dylan Smith design. It has eight LEDs and a couple of jumpers. I believe I can change it to Brendan Alford's 0.38 diagnostic rom, but I need a working Spectrum for that :( Unfortunately I've struggled to find any documentation for what the tests carried out are and what the LEDs indicate.

So plugging this board in, I get the following:

LED 1 flashes 4 times, with a blue border and black screen.
LED 2 flashes 4 times, with a blue border and black screen.
LED 3 flashes 4 times, the screen changes to a blue border with flashing black and white vertical stripes.
LED 4 flashes 4 fines, with a blue border and white then black then white screen.
LED 5 flashes 4 times, with a blue border and random characters on the screen, then changes to a red border with random characters.
LEDs flash 11001101 four times.
LED 6 flashes 4 times, with a red border and random characters, then changes to a black screen
LEDs flash 10101010 four times, then show that pattern solid until powered off.

Does anyone have any documentation for the tests it might be running - or any ideas on what it's telling me? I'm keen to avoid unsoldering all the upper RAM and replacing one by one until I find the fault if I can avoid it.
Crafty88
Drutt
Posts: 31
Joined: Sun Aug 30, 2020 10:15 pm

Re: Diagnostics card help.

Post by Crafty88 »

Did a quick search online and it could be the following:

The sequence starts with a battery of memory tests, which for the 48K tester, test the two banks of memory (the lower 16K and upper 32K) individually. Each sequence runs in a consistent way. First, the test number is flashed on a single LED, starting with the leftmost (LED1) for the first test. The test begins when the LED stops flashing. When a memory fault is detected, the LEDs will display a flashing alternate pattern (LED1 off, LED2 on, LED3 off, LED4 on, etc) four times. It will then alternate the LEDs first with the pattern that memory should have contained, and then the pattern it actually contained. This way, you can easily tell which chip (or chips) were faulty. All memory tests will run, even if one fails.

On the screen, assuming you're getting a picture from the Spectrum, you will see a blue border. You should see various interesting things happen in the paper area of the screen too - initially, it will be black, but you will also see black and white stripes and a patten of random pixels and random colour attributes while the tests run. If any of the memory tests fail, the border will switch from blue to red. This activity also helps you see whether the ULA is working.


Got from https://www.alioth.net/Projects/Spectrum-Diag/how.html
User avatar
1024MAK
Bugaboo
Posts: 3123
Joined: Wed Nov 15, 2017 2:52 pm
Location: Sunny Somerset in the U.K. in Europe

Re: Diagnostics card help.

Post by 1024MAK »

Here's a diagnostic board based on Dylan Smith's design running on one of my Speccys:




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.
rich_r
Drutt
Posts: 34
Joined: Mon Sep 11, 2023 11:57 am

Re: Diagnostics card help.

Post by rich_r »

Ah ha - cheers, that does seem to match the activity of the LEDs, and the link tells me what the test numbers mean.

So that implies I may have a fault when it does random fill (test 5) in lower RAM. Though I'm not getting alternating patterns (unless it's alternating between 00000000 and 11001101, which would imply that five bits are wrong. Given this Spectrum had been running fine for weeks before suddenly failing to boot, that would be seem to be a bit much).

I'll do some more testing.
User avatar
1024MAK
Bugaboo
Posts: 3123
Joined: Wed Nov 15, 2017 2:52 pm
Location: Sunny Somerset in the U.K. in Europe

Re: Diagnostics card help.

Post by 1024MAK »

Alternating is explained above and can be seen in my video...

Multiple failure may indicate it's one of the multiplexer chips is the problem.

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.
rich_r
Drutt
Posts: 34
Joined: Mon Sep 11, 2023 11:57 am

Re: Diagnostics card help.

Post by rich_r »

In your video it's clearly showing alternating between two values after a fail indication. But for mine it's just flashing one value after the four flashes. In effect I guess it's maybe writing 00000000 but getting back 11001101 (or vice versa).

I guess it's entirely possible that it is the multiplex decode circuit, which would explain why upper and lower both seem to have failed at the same time, and only the random access, because it is selecting _a_ memory address, just not necessarily the correct one.

Annoyingly this is an Issue 6 so it's got a PCF1306 chip not nice easy to obtain 74LS157s. Ah well, I might have a search to see if I can get a replacement (I see there are pin compatible modules for about £10), otherwise maybe keep an eye out for another board. Going to be a bit of a mission to desolder all those pins without causing damage :)

Many thanks - I think I'm closer to understanding why it suddenly failed and why it passes most of the RAM checks.
User avatar
1024MAK
Bugaboo
Posts: 3123
Joined: Wed Nov 15, 2017 2:52 pm
Location: Sunny Somerset in the U.K. in Europe

Re: Diagnostics card help.

Post by 1024MAK »

The 'lower' and 'upper' RAM uses different multiplexer circuitry, but of course, if it's the PCF1306...

I've not really taken much interest in working out what test patterns are being used in this version. However, common test patterns include (all in binary) 00000000, 01010101, 10101010, 11111111.

Is the EPROM / EEPROM / E²PROM / Flash ROM on your diagnostic board in a socket? If yes, an independent EPROM / EEPROM / E²PROM / Flash ROM programmer should be able to reprogram the chip with a later (better) version of diagnostic software.

Note, if it's an EPROM, the independent independent can't erase this type of chip.

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.
rich_r
Drutt
Posts: 34
Joined: Mon Sep 11, 2023 11:57 am

Re: Diagnostics card help.

Post by rich_r »

Thanks Mark. Yes, the EPROM is in a socket, but it's PLCC and I don't have anything to program it with.

However - I have desoldered the PCF1306P (turned out to be dead easy now I've bought a proper vacuum desolder gun - I have more confidence I'll be able to remove RAM chips too now. My first attempts with a manual solder sucker and iron on another Spectrum were disastrous.). So I'll pop a replacement in and see what it does then.

Am I right in thinking the ZX8401 and PCF1306P are interchangeable?
User avatar
1024MAK
Bugaboo
Posts: 3123
Joined: Wed Nov 15, 2017 2:52 pm
Location: Sunny Somerset in the U.K. in Europe

Re: Diagnostics card help.

Post by 1024MAK »

All these have the same functionality: PCF1306P, ZX8401, Amstrad part no. 40058.

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.
rich_r
Drutt
Posts: 34
Joined: Mon Sep 11, 2023 11:57 am

Re: Diagnostics card help.

Post by rich_r »

New old stock ZX8401 fitted and ... sadly the same fault is present :(

So it's passing the first four RAM tests (bit set/reset on lower and upper RAM, inversion on lower and upper RAM) but failing on test 5 and 6 - random bit setting on lower (and possibly upper) RAM.

So I guess maybe the fault may well lie in lower RAM? Unfortunately the flashing codes don't give me much of a clue as to which ic.

I've checked the voltages and am getting -5.16V, -12.14V and +5.00V at each of the 4116 chips, so that I think rules out a power supply problem.
rich_r
Drutt
Posts: 34
Joined: Mon Sep 11, 2023 11:57 am

Re: Diagnostics card help.

Post by rich_r »

Swapped the lower RAM for known good, and still get that failure at stage five :(

So I've now swapped the PCF1306P and the lower RAM. I guess the fault could be in the upper RAM but is showing up on the diagnostics card when it does the random bit test?

Might as well swap the upper RAM anyway - after that I'm not sure what's left :D
User avatar
1024MAK
Bugaboo
Posts: 3123
Joined: Wed Nov 15, 2017 2:52 pm
Location: Sunny Somerset in the U.K. in Europe

Re: Diagnostics card help.

Post by 1024MAK »

You could try disabling the ‘upper’ (or expansion) DRAM. On this forum, the topic about this is here. Note however, that this disable test assumes that the DRAM chips respect the control inputs.

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.
rich_r
Drutt
Posts: 34
Joined: Mon Sep 11, 2023 11:57 am

Re: Diagnostics card help.

Post by rich_r »

Despite managing to desolder and fit sockets for all the lower RAM with only a couple of pulled tracks, I've managed to pull several pads off desoldering the first upper RAM chip. I'll persevere though - if I can get the rest out with minimal damage I'll be able to repair those.

Sadly this is an Issue 6A board, and I've already replaced the PCF1306P so I don't think I can disable upper RAM on this Spectrum easily.

I'll carry on attempting to replace the remaining RAM and see what happens. Worst case I'll just keep my eyes out for another Issue 6A board and use this for spares.
User avatar
1024MAK
Bugaboo
Posts: 3123
Joined: Wed Nov 15, 2017 2:52 pm
Location: Sunny Somerset in the U.K. in Europe

Re: Diagnostics card help.

Post by 1024MAK »

Which 'upper' DRAM chip have you removed?

If it's the chip that handles data bit D0, D1 or D2, that's enough for the ROM memory check to fail the 'upper' RAM, the machine should then try to operate as a 16K system.

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.
dfzx
Manic Miner
Posts: 683
Joined: Mon Nov 13, 2017 6:55 pm
Location: New Forest, UK
Contact:

Re: Diagnostics card help.

Post by dfzx »

1024MAK wrote: Wed Jan 24, 2024 11:17 am If it's the chip that handles data bit D0, D1 or D2, that's enough for the ROM memory check to fail the 'upper' RAM, the machine should then try to operate as a 16K system.
Would it be adequate to clip the data pin on the upper DRAM chip which supplies, say, D0? The system would then see that bit as floating which would stop the upper RAM working and force the ROM code into 16K behaviour. If done neatly, a blob of solder across the cut pin would restore the IC to original behaviour.

Would that work if trying to force a 16K system for testing?
Derek Fountain, author of the ZX Spectrum C Programmer's Getting Started Guide and various open source games, hardware and other projects, including an IF1 and ZX Microdrive emulator.
User avatar
1024MAK
Bugaboo
Posts: 3123
Joined: Wed Nov 15, 2017 2:52 pm
Location: Sunny Somerset in the U.K. in Europe

Re: Diagnostics card help.

Post by 1024MAK »

Yes, cutting the data in (pin 2) and connecting it to 0V for the DRAM chip that provides D0 or D1 should be enough.

BTW I got a bit carried away in my earlier post, I had 0x02 in my head (as that is what the code counts down from), so it's the chips that handles data bit D0 and D1 that are relevent, NOT D2.
1024MAK wrote: Wed Jan 24, 2024 11:17 am If it's the chip that handles data bit D0 or D1 or D2 that's enough for the ROM memory check to fail the 'upper' RAM, the machine should then try to operate as a 16K system.
Although I need to point out that as I've not tried this, it's currently theory rather than established practice...

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.
rich_r
Drutt
Posts: 34
Joined: Mon Sep 11, 2023 11:57 am

Re: Diagnostics card help.

Post by rich_r »

In a fit of 'I might as well' last night, I desoldered all off the upper RAM chips, repaired the damaged tracks (four in the end) with wires underneath and fitted sockets. I now have sockets for all 16 RAM chips.

With no upper RAM fitted at all, I get the same fault - diagnostics card fails on lower ram random test (and also on upper RAM set/reset but that's to be expected when it's not got any). And if I try to boot it up, I get the same corrupted copyright logo and buzzing sound.

I think there's only the 74LS04 that handles the address select buffering left in term of ics that have anything to do with memory as I've swapped the PCF1306P and lower RAM for known good ones. Hence I guess the fault either lies in a passive component (perhaps a capacitor that's passing dc and pulling something to ground?) or it could be the Z80 itself. I have a spare Z80 so I'll swap that and see what happens.

Thanks for your patience everyone on this one :)
rich_r
Drutt
Posts: 34
Joined: Mon Sep 11, 2023 11:57 am

Re: Diagnostics card help.

Post by rich_r »

Swapped the Z80 - and now it passes all the RAM tests, and boots to the normal copyright message! :)

However, it now doesn't respond to keypresses. :(

I'm sure this Spectrum just doesn't want to live any more...
User avatar
1024MAK
Bugaboo
Posts: 3123
Joined: Wed Nov 15, 2017 2:52 pm
Location: Sunny Somerset in the U.K. in Europe

Re: Diagnostics card help.

Post by 1024MAK »

That could be the ULA at fault. Did it respond to the keyboard before?

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.
EdToo
Manic Miner
Posts: 228
Joined: Thu Nov 03, 2022 4:23 pm

Re: Diagnostics card help.

Post by EdToo »

rich_r wrote: Thu Jan 25, 2024 7:54 pm Swapped the Z80 - and now it passes all the RAM tests, and boots to the normal copyright message! :)

However, it now doesn't respond to keypresses. :(

I'm sure this Spectrum just doesn't want to live any more...
You are getting closer though.
rich_r
Drutt
Posts: 34
Joined: Mon Sep 11, 2023 11:57 am

Re: Diagnostics card help.

Post by rich_r »

1024MAK wrote: Thu Jan 25, 2024 8:11 pm That could be the ULA at fault. Did it respond to the keyboard before?

Mark
Yes, it was working fine for ages until one day it just refused to boot.

I wonder if i have a poor solder joint or break somewhere- after all, I’ve replaced virtually every ic on the board, and broken a few tracks so quite likely.
User avatar
1024MAK
Bugaboo
Posts: 3123
Joined: Wed Nov 15, 2017 2:52 pm
Location: Sunny Somerset in the U.K. in Europe

Re: Diagnostics card help.

Post by 1024MAK »

A broken track would only cause some of the keys to become unresponsive, the rest would still work.

Unless it's a control line to the ULA.

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.
rich_r
Drutt
Posts: 34
Joined: Mon Sep 11, 2023 11:57 am

Re: Diagnostics card help.

Post by rich_r »

I tried swapping the ULA with another one (admittedly I only have a -6 as a spare, and this board has a -7, but I think that it should still work). Sadly the keyboard still doesn't do anything when plugged in. However, one of the tests the diagnostics card I have does after the RAM checks is an interrupt test - and I don't think that test succeeds (no LEDs flash when it says they should). It passes all the RAM tests now though.

I will have a look at the circuit diagram and confirm I have connectivity from the ULA and Z80 pins to the keyboard connectors and to the buses etc.
rich_r
Drutt
Posts: 34
Joined: Mon Sep 11, 2023 11:57 am

Re: Diagnostics card help.

Post by rich_r »

Think I've found the problem - the INTL line from the Z80 is getting from pin 16 to the edge connector and the right hand side of R26, so my soldering there is good. However the signal is not getting from the left hand side of R26 to pin 12 of the ULA. Looking along the track I can see where I must have caught it with my soldering iron on the top side of the board whilst desoldering IC18 in the upper RAM and broken the track there. I can see a scuff in the silkscreen where the rectangle for IC18 is. No idea how I managed it (probably trying to free the solder that was on the top side of pin 1) but it does look like it was my fault.

So I'm going to get my microsurgery hat on, a big magnifying glass and a very thin bit of wire to see if I can bridge that 1mm of missing track. Failing that I'll run a long wire on the underside of the board from R26 to the ULA.

This Spectrum will live again. :) I am actually contemplating one of the brand new pcbs that I've seen for sale and transferring everything over. It's interesting that the original fault seemed to be the Z80, and not RAM as it initially appeared, but having desoldered and resoldered so much it's clear to me that the pcb is very fragile now, but everything else looks good.

Edited to add:

Success! :) I managed to solder a fine wire over the break, and now the LEDs flash on the interrupt test on the diagnostics card. And the keyboard now works. Without the ULA being able to generate an interrupt signal to the CPU, I guess that's pretty clear why it couldn't do much!

Many thanks to everyone for the encouragement to keep going with this one. I still might look into moving all the components to a new pcb, but not just yet.
User avatar
1024MAK
Bugaboo
Posts: 3123
Joined: Wed Nov 15, 2017 2:52 pm
Location: Sunny Somerset in the U.K. in Europe

Re: Diagnostics card help.

Post by 1024MAK »

Good that you now have it running :D

Well done.

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