Seriously weird Issue 2 issue... (RAM-related)

edited August 2014 in Hardware
Hi guys;

I have been trying to fix up my Issue 2 and have run across a bizarre issue that I haven't seen elsewhere in the forums. Hopefully one of you guys will have seen this before. Here's the narrative:

Spectrum: Issue 2, 48k
Initial problem: Yellow screen, only sees 16k.

Abbreviations in narrative:

MEMCHK = PRINT PEEK 23732 + PEEK 23733*256
UPRAM85 = POKE 32768,85 : PRINT PEEK 32768
UPRAM170 = POKE 32768,170 : PRINT PEEK 32768

Actions taken so far:

0. Single-wire composite mod - successful.
1. Replaced LM1889N - this with a bit of tweaking of VR1,2 fixed the colour issue.
2. MEMCHK returned 32767, upper RAM fault. UPRAM85 returned 93, so IC18 deemed faulty. Replaced IC18 with socketed 4164B-15.
3. MEMCHK returned 32767. UPRAM85 returned 85 so ran UPRAM170 which returned 171, so IC15 deemed faulty. Replaced IC15 with socketed 4164B-15.

Now what happens:

On power on, the Spectrum has black paper with five coloured character squares in the top left corner and for a few seconds the blue/yellow loading bars appear, together with the loading screech. Then the "black screen and red bars" RAM test appears, after which the black paper with blue/yellow loading bars appear again, together with the loading screech. After a few seconds the Spectrum either hangs to a black paper / yellow border screen or does the loading screech thing again a few times and then hangs.

Notes:

If I remover IC15 then the Spectrum goes to the copyright screen and the situtation is the same as for stage (3.) above. I have tried a second 4164B-15, but the same screechy problem occurs. I have another 5x 4164B-15, but do not want to risk them before getting a single opinion.

I have checked the continuity of the socket against the circuit diagram: all okay.

So... any ideas?! :S
Post edited by Trafferth on

Comments

  • edited August 2014
    A bit more info...

    1. The other (original) upper RAM chips are 4532-20NL3. The new ones in IC15 and IC18 are 4164B-15. I'm not sure if all the chips need to exactly match timing wise?
    2. With IC15 and/or IC18 out, the Speccy operates as a 16k model. However, the keyboard stops responding if anything is plugged into the expansion port such as a Kempston or RAM Turbo interface.
    3. After reading the Spectrum Repair Guide and knowing I have a stock of SN74LS157N, I went ahead and replaced IC25 and IC26. No effect.
    4. I haven't recapped this Spectrum yet - I'm waiting on an order of axial caps.

    -R :)

    Also in previous message I meant "before getting a second opinion", obv... ;)
  • edited August 2014
    That sounds like some lower RAM could be suspect.

    Do you get the same power on symptoms without the new upper RAM chips installed (resetting, screen corruption)?

    B
    The Spectrum Resuscitation Thread - bringing dead Spectrums back to life
    zx-diagnostics - Fixing ZX Spectrums in the 21st Century (wiki)
    Sinclair FAQ Wiki
  • edited August 2014
    Hi Balford;

    No, with the new upper RAM ICs removed everything seems okay. Spectrum operates like a 16k with no issues. I even managed to play a few games of Jetpac earlier... ;)

    The only odd behaviour is the keyboard freezing when a Kempston interface is plugged in.

    -R
  • edited August 2014
    Ah, in that case I reckon there are one or more faulty upper RAM IC's still lurking :)

    If you can, refit the 4164's, do a CLEAR 32767 if possible, then try testing every memory location using something like the following:
    10 FOR n=32768 to 65535
    20 POKE n, 85: IF PEEK n <> 85 THEN PRINT "Error at ";n;", 85 <> "; PEEK n
    30 POKE n, 170: IF PEEK n <> 170 THEN PRINT "Error at ";n;", 170 <> "; PEEK n
    40 NEXT n
    50 PRINT "Done"
    

    If you have an Interface 2 or similar, and you're potentially going to repair multiple machines, it might be worth looking into the ZXC4 cartridge, on which you can store a diagnostic program that can test this kind of thing in a completely automated manner.

    B
    The Spectrum Resuscitation Thread - bringing dead Spectrums back to life
    zx-diagnostics - Fixing ZX Spectrums in the 21st Century (wiki)
    Sinclair FAQ Wiki
  • edited August 2014
    Thanks for the suggestion, Balford.

    Sadly, the Spectrum doesn't like it if both IC15 and IC18 are populated with the 4164s. If I populate just IC15 then the RAM tests tell me IC18 is at fault and vice versa. If both are populated then the Spectrum just screeches, tries to reset and then hangs.

    I have an order coming soon for the four remaining 74x logic ICs that I haven't tried replacing yet.

    I also suppose I *could* start replacing the other upper RAM chips one by one and hoping I get lucky. I think I'll wait for the 74x chips since they're cheap and I'll then have a sizeable stock. I'd like to hold on to as many of the 4164s as possible! ;)

    Hmm....
  • edited August 2014
    Which make of 4164 did you use?

    When both replacement 4164 chips are fitted, when you power up, what colour is the border? Does it change to white?

    The reason for the weird behaviour could be because the Z80 CPU is reading an instruction, for some reason that instruction is becoming corrupted, which is causing the CPU to execute the wrong section of code in the ROM.

    Mark
  • edited August 2014
    Hi, Mark;

    I am using Samsung KM4164B-15 chips which I bought from Ian Gledhill.

    On startup, the screen is briefly white border, black paper. There are five coloured character squares in the upper left. After the "loading sounds and stripes" have appeared for a few seconds, the Spectrum tries to reset (the usual cascading red stripes on a black border) at which point it will hang. 9 times out of 10 to a black paper and white border, sometimes black paper with yellow border.
  • edited August 2014
    You could socket the upper RAM entirely, and stick all the 4164's in, then replace one by one with the old 4532's.

    First failure you find, junk that 4532 and continue with the rest. Eventually you'll have weeded out any faulty original 4532's.

    Of course it could be one of the logic IC's, but that's rare enough.

    B
    The Spectrum Resuscitation Thread - bringing dead Spectrums back to life
    zx-diagnostics - Fixing ZX Spectrums in the 21st Century (wiki)
    Sinclair FAQ Wiki
  • edited August 2014
    Looks like that might be the best idea. Of course, if it *is* one of the logic ICs then I suppose I will by that have socketed pretty much everything! At least that means I can then use this Speccy as a test bed for suspect components.
  • edited August 2014
    At least that means I can then use this Speccy as a test bed for suspect components.

    No harm having one of those, along with a diagnostic board/cartridge :)

    B
    The Spectrum Resuscitation Thread - bringing dead Spectrums back to life
    zx-diagnostics - Fixing ZX Spectrums in the 21st Century (wiki)
    Sinclair FAQ Wiki
  • edited August 2014
    It sounds like a faulty 4532-20NL3 DRAM chip to me.

    It may be that the memory check routine in the ROM is being fooled and the ROM code is setting the CPU machine stack in the normal place for a 48k RAM machine. But the faulty RAM chip is corrupting this machine stack. As a result, the CPU is being sent to execute code in the wrong place, hence the machine misbehaves and crashes.

    You could also disable the upper RAM (see here) but fit a simple switch (SPST also known as a ON/OFF type) in the middle of the wire, so that once the Spectrum has started up in 16k RAM mode, you can re-enable the upper RAM (switch in the off position). Then you can PEEK and POKE to find out what the upper RAM is actually doing.

    Mark
  • edited August 2014
    1024MAK wrote: »
    The reason for the weird behaviour could be because the Z80 CPU is reading an instruction, for some reason that instruction is becoming corrupted, which is causing the CPU to execute the wrong section of code in the ROM.
    Mark
    The fact that five coloured character squares appear in the upper left, might suggest that Screen is used in stead of ROM for dumping an FP number.
  • edited August 2014
    Okay, success!

    Replacing the upper RAM one by one eventually worked... after all upper RAM chips were replaced! :D

    Thanks everyone for the suggestions.

    Another one fixed - only the Issue One left...
  • edited August 2014
    Nice work sir :)

    B
    The Spectrum Resuscitation Thread - bringing dead Spectrums back to life
    zx-diagnostics - Fixing ZX Spectrums in the 21st Century (wiki)
    Sinclair FAQ Wiki
  • edited August 2014
    There you go, all fixed now :-)

    Mark
Sign In or Register to comment.