News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_Bryce

Endless loop...

Started by Bryce, 14:33, 23 August 14

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Bryce

Hi,
    I found some time to visit a troublesome 6128 that I'm looking at. RAM fixed, shadow key problem fixed and now concentrating on the FDC / ROM 7 problem. This is the issue at the moment. If ROM 7 is removed the CPC runs as normal and using a few pokes I can start/stop the disk motors etc, so the FDC and associated logic seems ok. However when I insert ROM 7 the CPC freezes after the ".... Locomotive Software Ltd." and never gets to the BASIC prompt. I've probed the Databus and it is in an endless loop of:

07 30 7B 6D 78 - 07 30 7B 6D 78 - 07 30 7B 6D 78 ....

Can any of the firmware experts out there tell me exactly what this loop is and what signal it is waiting for?

Bryce.

arnoldemu


c95e ed78      in      a,(c)            ; read FDC main status register
c960 87        add     a,a                ; transfer bit 7 ("data ready") to carry
c961 30fb      jr      nc,$c95e         


here it is.

but your order is this:

6d 78 07 30 7b

bit 7 seems to be inverted or stuck at 0.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Bryce

Hmmm, then it's most likely the FDC that's failed. I'll swap it.

Thanks,
Bryce.

gerald

Quote from: Bryce on 20:55, 23 August 14
Hmmm, then it's most likely the FDC that's failed. I'll swap it.
Interesting case !
Did you try swapping the amsdos ROM (or dumping it to check its content)?
If the FDC is corrupting the data bus, problems should happen earlier.

arnoldemu

Quote from: Bryce on 20:55, 23 August 14
Hmmm, then it's most likely the FDC that's failed. I'll swap it.

Thanks,
Bryce.
I think the data lines to the disc Rom need checking. I suspect the fdc is ok. Z80 appears to be seeing bad data from that Rom.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Bryce

Both the internal ROMs (0 and 7) have already been replaced. I'll check the solder joints to ROM 7. The EPROMs are definitely known good.

Bryce.

MacDeath

simple :

cls
10 goto 10
run

arnoldemu

I thought about this: if the CPU was seeing those values it would not loop. As they are they don't make sense. Why did they have bit 7 wrong? So CPU does seem to get the correct values to get to that point.
So my thoughts come back to the fdc.
When the amsdos ROM starts it sends a command to the FDC to initialise it.
This loop happens because it wants bit 7 to be a specific value. Could be the data lines to FDC, could be the FDC is not being reset correctly and could be a faulty FDC exactly as you thought.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Bryce

Ok, I also realised that I was measuring the data lines directly from the pins of ROM 7, so that's the data the ROM is seeing. Is this code in ROM 7? If so, I need to check whether my "Known good" ROM 7 has failed.

Bryce.

arnoldemu

Quote from: Bryce on 08:50, 24 August 14
Ok, I also realised that I was measuring the data lines directly from the pins of ROM 7, so that's the data the ROM is seeing. Is this code in ROM 7? If so, I need to check whether my "Known good" ROM 7 has failed.

Bryce.
Yes the code is in ROM 7.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Bryce

#10
Ok, found the code in ROM 7 (at 095E) and the EPROM is definitely good. The FDC must be holding bit 7 low?

Just checked the FDC reset sequence: It's getting a 40ms reset pulse at 50ms another 140ms reset at 100ms and a 60ms reset at 280ms. So that part of the circuitry seems to be doing what it's meant to.

Bryce.

Edit: Fed up faffing about with this one. Have to go out for a while, but when I get back I'll swap out the FDC.

Bryce

#11
Just swapped the FDC and the CPC has sprang to life. Finally all problems resolved. The board belongs to VincentGR and was the victim of an momentary over voltage (the board that is, not Vincent). The RAM, the 74LS145 (keyboard scan driver) and the 765 were all fried. Normally it's hardly worth repairing a board in this state, but it is his original from his childhood, so an exception was made. I'm still going to observe it for a few days. The CPU is getting hotter than it should, so I'll leave it running and use it for a while to see if anything else fails. I've connected a keyboard, joystick, RAM expansion and a MegaFlash just to confirm that they all work too (and they do).

Bryce.

Edit: Seems I spoke too soon :( The keyboard shadow problem is back!?! Either the 145 has failed again or the 8255 is also bad, time to go looking again.

VincentGR

Quote from: Bryce on 13:30, 24 August 14Edit: Seems I spoke too soon :( The keyboard shadow problem is back!?! Either the 145 has failed again or the 8255 is also bad, time to go looking again.

AAARrrrgghh  >:(

I have faith  ;D

Bryce

Really wierd. The 145 works when I test it on its own. When it's installed on the board it's getting 5V, GND and the 4 BCD bits are also fine, but none of the outputs ever goes to 5V. I've checked the pins on the baord and they aren't shorted to GND?? So where's the problem? Will continue looking...

Bryce.

gerald

Quote from: Bryce on 15:27, 24 August 14
Really wierd. The 145 works when I test it on its own. When it's installed on the board it's getting 5V, GND and the 4 BCD bits are also fine, but none of the outputs ever goes to 5V. I've checked the pins on the baord and they aren't shorted to GND?? So where's the problem? Will continue looking...
Have checked/replaced the AY ?
The 145 has open collector output, they will only go high if pulled up externally.
The pull up are in the AY, and will pull the 145 ouput only when pressing a key that is not in the selected line.
If the AY has its pull up damaged, the ghosting may happen.
There is also a place for a resistor network that should act as pull up just behind the AY, you may try adding it.

Bryce

The AY has already been replaced and I was also using a pull-up resistor to test the outputs. Maybe it's the AY version I'm using? Let me check if I have a different version....

Bryce.

Bryce

#16
Bloody Nora! It was the type of AY that was messing things up, so just to confirm what was recently discussed in a different thread here. Certain makes of AY can cause problems in the CPC. I now have a Microchip version installed: Works fine. The other one I had is marked "MICREL" and causes shadow keys on the first row. Possibly adding the pull-up resistors as Gerald has suggested would remove this problem?

@Vincent: Ok, this time it really does seem to be fixed completely, currently playing Sabrewolf :)

Bryce.

arnoldemu

It is always good to read about another fixed CPC. :)
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

gerald

Quote from: Bryce on 15:54, 24 August 14
Bloody Nora! It was the type of AY that was messing things up, so just to confirm what was recently discussed in a different thread here. Certain makes of AY can cause problems in the CPC. I now have a Microchip version installed: Works fine. The other one I had is marked "MICREL" and causes shadow keys on the first row.
That's interesting. I did not find any datasheet for the micrel version. Does it have internal pull up ?
Quote from: Bryce on 15:54, 24 August 14
Possibly adding the pull-up resistors as Gerald has suggested would remove this problem?
That should do the trick. I've been always wondering why Amstrad put it on the board. I've seen few board having them mounted.

Bryce

Here's the part for reference:

Bryce.



VincentGR


Bryce

@Vincent: No problem Always good to get another CPC back running. Especially one with "emotional value" to the owner.

Quote from: gerald on 17:30, 24 August 14
That's interesting. I did not find any datasheet for the micrel version. Does it have internal pull up ? That should do the trick. I've been always wondering why Amstrad put it on the board. I've seen few board having them mounted.

I have three makes of AY here: GI and Microchip parts work fine, the Micrel part doesn't (at least not without external pull-up resistors). Do you know of other makes?

Bryce.

00WReX

Quote from: Bryce on 18:00, 24 August 14
Here's the part for reference:

Bryce.


I have a lot of CPC's and none have that brand AY.

The date code on the one in the picture is 9610 ... so that particular one was never (originally) in a CPC ??

Cheers,
Shane
The CPC in Australia...
Awa - CPCWiki

Bryce

No, all CPCs had GI AYs installed, the others are parts that I extracted from Arcade machines (Bally used them extensively) or parts I bought from other sources over the years.

Bryce.

gerald

Quote from: Bryce on 09:22, 25 August 14
I have three makes of AY here: GI and Microchip parts work fine, the Micrel part doesn't (at least not without external pull-up resistors). Do you know of other makes?
I was only aware of GI and Microchip (being a GI spin-out). Never crossed a Micrel one on my way ;)
But it would be interesting to check if these have internal pull-up or not.

Powered by SMFPacks Menu Editor Mod