News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
R

Need some help fixing CPC6128 not booting

Started by RobertM, 09:36, 11 February 14

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Bryce

Ignoring the fact that the second ones are SMD parts (so they wouldn't match the PCB anyway), they seem to be OTP (One Time Programmable) parts. I think the guy is wrongly describing them as EPROMs, they're PROMs as far as I can see. Not really what you want.

Even the cheapest and crapest of programmers can program a 27C256, I'm sure that your mates programmer will be able to, no matter what he has.

Bryce.

Edit: Oh, gerald got there before me :)

ikonsgr

Thanks a lot for answering my "stupid" questions my friends!  :)
So basically, a faulty rom it's not such a "big deal" after all....
And if i may ask, what is the cost of  a "crappy" programmer for these eeproms?
Because if they are really cheap, then i might actually get one and do the programming my self!  ;)

Bryce

For €27 you can get a Chinese Willem Clone, which will do quite a bit, but it's a bare PCB: EPROM BIOS Programmer/Programmierer PCB5.0E Neu | eBay

But I'd recommend spending a few euros more (€39) for one of the better Chinese devices such as this: TOP853 USB Universal Programmer Programmierer für EPROM FLASH MCU GAL PIC

The more expensive one has a case, but much more importantly, it auto-detects the inserted IC, so there's no endless dip switch setting involved. It can also program a few other things such as the GAL that's used in the CPC :) and PIC and AVR micro controllers.

Bryce.

ikonsgr

#103
You mean the GAL16L8 or the 40010 GAL? Although i don't know if the program needed for the 40010 is available  :)
Well for just programming 2 roms,i think it's a little "too much"....  ::)
Btw, why i need a 27c256 rom and not 27c128, since both roms of a cpc are 16kb so a 16Kx8=128kbit rom could do the job just fine, right?
Although, as i see on ebay, there is no difference in actual cost between the two, but i just wondering .

P.s. Hey Bryce, i was wondering does any of the 2 programmers you propose can be used for programming an amiga kickstart? If yes, then it might be a good solution after all!  ;)

Bryce

#104
The 16L8 is the GAL, the 40010 isn't a GAL it's a more of a custom IC. There were never programmable versions of this, it's function fixed when it's manufactured.

Not sure whether they can do Kickstarts, possibly the second one with an adapter? You'd have to ask the guys over on Amibay.

Bryce.

RobertM

Quote from: ikonsgr on 21:48, 08 May 14
Well for just programming 2 roms,i think it's a little "too much"....  ::)

Btw, why i need a 27c256 rom and not 27c128, since both roms of a cpc are 16kb so a 16Kx8=128kbit rom could do the job just fine, right?

Although, as i see on ebay, there is no difference in actual cost between the two, but i just wondering .
Hi ikonsgr,
This question didn't seem to be answered for you.

You don't need to replace both ROMS. The Firmware and BASIC are both in the same ROM and that's why you need a 27C256 and NOT a 27C128. From memory the second ROM on the board is just for the floppy and is a 27C128 but you don't need to worry about it at this time.

Also from memory the ROMs are labeled on the board as (40025) PC-3 and (40015) FDD. I expect it is the 40025 you need to change.

The 27Cxx's were the most common ROMS/EPROMS of this era so as Bryce said just about any programmer will do them. If you have a friend that has a programmer then that is the best solution. If you are going to buy a programmer then it would be better to have one that does the Gate Array as well. This may not be the end of your fault finding so I suggest you save your money at this stage and have your friend program them and use the saved money down the track so you can buy a Scope or Logic Analyzer, or better programmer.

The 27C256 and 27C128 are not interchangeable.

How did you go with the resistance testing of the two data bus bits that were different? That looked to be the best lead you had.

I have removed all RAM chips from my board and I will be socketing them today. Fingers crossed.

I have new RAM. The Z80, 6856 and de-solder tool haven't arrived yet. If the new RAM doesn't fix my CPC then I will socket the 6845 and wait for the replacement.

RobertM

Hi all,
           I tried the CPC6128 with NO RAM on the board and I can confirm that you should still see the white square on the screen even without any RAM.

I then repaired the track that I lifted and socketed RAM BANK 1.

I put new RAM in BANK 1 and tested. Now I get the BASIC screen so it looks like all is good!!!!

When the other chips arrive I will have a spare Gate Array (the large one), spare Z80, spare 6845 and four spare RAM chips (I ordered 20).

I will try the modern Z80 (10 MHz) when it arrives and let you know how that goes.

I don't know if the problem was a RAM chip or if the Via where the track lifted was fractured and caused the lifting. I didn't have any trouble with any other chips that I had removed at that stage but after the track lifted I cut the others out as a precaution and removed the pins one by one. So I can't test the RAM that was removed.


RobertM

Now I will socket BANK 2, put the RAM in it and test again. If all goes well that I can move on to my original intention.

I was going to use a micro controller to emulate the floppy with a SD card. I am not sure now that this is what I want.

The reason I was going to do it this way is that I wanted you be able to easily edit CPC files on my windows PC. I was going to have the RAW files on SD cards and get the micro controller to emulate the file system that the CPC expects. This is different to the emulators on the market as they use a file on the SD card that is an 'image' of a CPC disk.

Now I am wondering of I could just use 2.5 inch disks on the CPC. I did this once and found that I could use DOS on the PC to format CPC (3.5 inch) disks using the DOS format switches that allow you to specify cylinders head sectors. From memory the CPC uses 40 tracks, 1 head and 9 sectors per track. Where as DOS (360K) used 40 tracks, 2 heads and 8 sectors per track.


Perhaps I could just use 3.5 inch disks. CAn windows read / edit the CPC format disks???

Bryce

Quote from: RobertM on 23:37, 08 May 14
If you are going to buy a programmer then it would be better to have one that does the Gate Array as well. 

Please don't confuse the terms. There is no programmer in the world that will program a Gate Array. Gate arrays are not programmable devices. The GAL (Generic Array Logic) is a programmable device, there's a small one in the 6128 to do the bank switching and it is programmable. The Gate Array is a non-programmable 40pin custom IC (40007, 40010) found in all classic CPCs and replaced by the ASIC in Plus CPCs.

Bryce.

RobertM

Hi Bryce,
            When poking around the web looking for details on the gate array I found someone who had put some effort into reverse engineering the gate array. They had a site on git hub. Unfortunately all their work is in a foreign language.

According to them the ASIC is acually a mask programmed gate array. They even had a chip number for the non-mask programmed version. I found a programmer on ebay that will program the programmable version but the site I was looking at didn't go as far as having any VHDL or Verilog.

I ended up buying a gate array as at the price it wasn't worth even looking at a programmer.

So it seems that just as the HAL is a mask programmed version of a PAL, also the ASIC is just a mask programmed version of a more conventional programmable gate array.

If you want I will go dig up the details. It was a work in progress at the time I last looked. As I mentioned the site was in a foreign language but google translate does ok with more technical language.

gerald

Quote from: ikonsgr on 21:48, 08 May 14
Btw, why i need a 27c256 rom and not 27c128, since both roms of a cpc are 16kb so a 16Kx8=128kbit rom could do the job just fine, right?
Sytem rom is a 32k rom and contains the FW (lower 16k) and the basic (upper 16k). Just look at the schematics  ;)
Amsdos is 16k.


Bryce

Quote from: RobertM on 09:54, 09 May 14
Hi Bryce,
            When poking around the web looking for details on the gate array I found someone who had put some effort into reverse engineering the gate array. They had a site on git hub. Unfortunately all their work is in a foreign language.

According to them the ASIC is acually a mask programmed gate array. They even had a chip number for the non-mask programmed version. I found a programmer on ebay that will program the programmable version but the site I was looking at didn't go as far as having any VHDL or Verilog.

I ended up buying a gate array as at the price it wasn't worth even looking at a programmer.

So it seems that just as the HAL is a mask programmed version of a PAL, also the ASIC is just a mask programmed version of a more conventional programmable gate array.

If you want I will go dig up the details. It was a work in progress at the time I last looked. As I mentioned the site was in a foreign language but google translate does ok with more technical language.

Can you send me a link to this information, they also seem to be confusing things a bit, or maybe something was lost in the translation.

HALs and Gate Arrays are mask programmed: ie: The chip manufacturer sets the function using a mask while the silicon is being etched and before it gets put into its IC package.
Later, user programmable versions of some HALs got released called PALs, but the old Gate Arrays were never released as user programmable versions. Newer devices have been released known as CPLDs and FPGAs. These are not the same chip, but could be used to build a modern replacement.

Getting a programmer that can do CPLDs might be useful, but they usually cost quite a bit more than a simple EPROM programmer.

Bryce.

ikonsgr

Quote from: RobertM on 03:35, 09 May 14
Now I will socket BANK 2, put the RAM in it and test again. If all goes well that I can move on to my original intention.

I was going to use a micro controller to emulate the floppy with a SD card. I am not sure now that this is what I want.

The reason I was going to do it this way is that I wanted you be able to easily edit CPC files on my windows PC. I was going to have the RAW files on SD cards and get the micro controller to emulate the file system that the CPC expects. This is different to the emulators on the market as they use a file on the SD card that is an 'image' of a CPC disk.

Now I am wondering of I could just use 2.5 inch disks on the CPC. I did this once and found that I could use DOS on the PC to format CPC (3.5 inch) disks using the DOS format switches that allow you to specify cylinders head sectors. From memory the CPC uses 40 tracks, 1 head and 9 sectors per track. Where as DOS (360K) used 40 tracks, 2 heads and 8 sectors per track.


Perhaps I could just use 3.5 inch disks. CAn windows read / edit the CPC format disks???

I think that everything you need can be done directly using cpcdiskxp! The latest versions also support the use of usb floppy drive where you can make disks with much more capacity (~255Kb/side instead of 178kb),which also a cpc can directly read them!  ;)

ikonsgr

#113
Quote from: RobertM on 23:37, 08 May 14

How did you go with the resistance testing of the two data bus bits that were different? That looked to be the best lead you had.


Well since you verify that even without any ram you get a window,and also putting bank 1 you get the basic screen, while i still get nothing (note that i replace with 100% working ones, almost every "big" chip in the board: cpu,40010,PAL16L8, crt6845,74LS373, 74LS244, 8 ram chips of 1st bank) i believe 99% chance i have a faulty basic/os rom.

I suppose that the 2 different  16kb rom files can be transffered to the one 27C256 eeprom chip is not a problem with any programmer right?


P.s. about your concerns for the modern cmos z80/10Mhz,i used a modern Z80/20mhz and still worked just fine on my working cpc,so i dont thnik you will have any problems with that!

Bryce

Quote from: ikonsgr on 20:35, 09 May 14
I suppose that the 2 different  16kb rom files can be transffered to the one 27C256 eeprom chip is not a problem with any programmer right?


P.s. about your concerns for the modern cmos z80/10Mhz,i used a modern Z80/20mhz and still worked just fine on my working cpc,so i dont thnik you will have any problems with that!

Normally you just combine the two 16K files on a PC into one 32K file and burn it as normal.

Most of the modern Z80s will electrically work in a CPC, I think the only problem is that some of the undocumented commands that are/were frequently taken of advantage of, aren't present in the modern versions.

Bryce.

RobertM

Quote from: ikonsgr on 20:35, 09 May 14
Well since you verify that even without any ram you get a window,and also putting bank 1 you get the basic screen, while i still get nothing (note that i replace with 100% working ones, almost every "big" chip in the board: cpu,40010,PAL16L8, crt6845,74LS373, 74LS244, 8 ram chips of 1st bank) i believe 99% chance i have a faulty basic/os rom.

I suppose that the 2 different  16kb rom files can be transffered to the one 27C256 eeprom chip is not a problem with any programmer right?

Hi,
    What's left on the data bus that you haven't replaced is the ROM's as you mentioned and the 8255 (IC107), the 765 (IC201), 74LS273 (IC106) and IC209 to IC212 in the Floppy section. So if it's data bus a short you are looking for then these are the 9 suspects. Of course it could just be one of the control signals to these that is causing the problem as well. That is why I was wondering what the resistance tests showed?

There are 3 parts to the code and only 2 ROM chips. Amstrad originally put the Firmware and BASIC in the first ROM (27C256 - IC103 - 40025) so that is how it has to be. The third part of the code Floppy firmware(27C128 - IC204 - 40015) has it's own ROM.

To program the ROM that the CPC boots from you need to append the BASIC code (16KB) to the end of the Firmware code (16Kb) and program it into a 27C256 (32KB).

And yes almost any EPROM / Universal programmer will program a 27Cxxx as Bryce mentioned (he is a guru here and knows the CPC exceptional well).

You mentioned EEPROMS but these are EPROMS.

EPROMS have a window in the top and are erased with ultra violet light so you have to block off the window so ambient UV doesn't eventually corrupt them.

EEPROMS are (E)lectrically (E)rasable and don't have a window.

You mentioned noise when you put your hand near IC203, this IC is involved in /CS line of the 765 FDC (IC201) and any noise on the /CS line (IC201 Pin 4) will certainly case problems on the data bus.

I still think the resistance test is worth while, you have 9 IC's left to replace hoping to get the right one when the fault could actually be a short on the circuit board on one hand, on the other hand it may be a control signal and not be any of the chips you now suspect.

RobertM

PS: The /CS line of the 765 FDC (IC201 Pin 4) should read very close to 5 Volts.

ikonsgr

I've already test the pin 4 on ic 201 (the 765 controller) and it's indeed ~4.5Volt exactly like on the working cpc.
So if this means that 765 is probably ok (or at least can't cause the "no screen" symptom), could a faulty ic203  cause the "no screen at all" symptom?

In my case we have a very serious and fundamental problem: nothing onscreen!
So the most important thing to know is, if this can caused PRIMARY from a faulty fw/basic rom alone or if ANY (or all...) of the chips you mention above (I/O, FDC, buffers etc) are faulty, can cause the same symptom, even if rom is ok!
And if that's the case, could a logic map of high/low/pulsed on the pins of the above chips could reveal which one has the problem?



RobertM

Quote from: ikonsgr on 13:22, 10 May 14
I've already test the pin 4 on ic 201 (the 765 controller) and it's indeed ~4.5Volt exactly like on the working cpc.
So if this means that 765 is probably ok (or at least can't cause the "no screen" symptom), could a faulty ic203  cause the "no screen at all" symptom?

In my case we have a very serious and fundamental problem: nothing onscreen!
So the most important thing to know is, if this can caused PRIMARY from a faulty fw/basic rom alone or if ANY (or all...) of the chips you mention above (I/O, FDC, buffers etc) are faulty, can cause the same symptom, even if rom is ok!
And if that's the case, could a logic map of high/low/pulsed on the pins of the above chips could reveal which one has the problem?

For the CPC to 'work' practically every chips has to function properly. Chips don't just have one mode of 'failure', they have many different ways in which they can fail especially the larger and more complex chips. That is why the manual suggests changing the larger chips first, diagnosing a complex failure mode with a complex chips is extremely hard even with very good test equipment. There is also the reasoning that the larger chips generate more heat and are therefore more prone to failure to a limited degree.

Your diagnostic process has gone well beyond the scope of faults the manual was intended for. The manual was intended for only the most basic faults and the fault you have in not a basic one.

In my case I could tell that 'some' of the chips were at least working to some degree. To get the box on the screen the Z80 has to be able to run code from the ROM and the data / address space needs to be clean. Or in other words, I had a rough point at which the failure occurred. ie the Z80 can run code, set up the 6845 Regs, write 0's to the screen buffer and seemed to fail when it first needed to run code from RAM.

In your case we don't have a point at which it fails and it appears to failing right from the very start. This is a very difficult fault to diagnose and especialy so with such rudermentery test equipment such as a multi meter.

If I had the equipment then the first thing I would test on your board would be to check the Vcc (5 Volt) rail with a scope looking for noise. Then I would test all the pins on the CPU (as it has the buses attached) and look for anything that is abnormal. In doing these things I am not looking for the 'fault' itself but I am looking for a lead that will take me to the 'fault'.

In your case we don't yet have a lead to follow.

The changing chips is almost certain to fix it. I say almost certain because when you have changed ALL of the chips and it still doesn't work then you know it's a short or fractured via in the circuit board.

You have almost exhausted the changing chips option by way of a logical process. You're more or less at the point where the fault can be narrowed down to being caused by "any of the chips you haven't changed" and there is not really any diagnostic reason to describe it better than that because you don't have a 'lead' to follow.

So in other words, yes the ROM(s) can cause this fault but there is not really any greater reason that it is a ROM over any of the other chips. To continue the chip changing the most (and minimally) logical path is to change the larger and more complex chips first. That would be the ROM's, 6845, 8255 and 765.

If however you can find a 'lead' then you will have a logical reason to change a particular chip and a very high probability that this will fix the CPC.

If you have a logic tester you can test each pin of the CPU and compare that to the other board. If there is a difference that you can see then 'perhaps' and only 'perhaps' that might point to a lead. I say perhaps because of two reasons. 1) Your eyes can see to frequencies up to about 20Hz and that is exceptional LOW compared to the 1MHz that most of these signals will be running at. and 2) Most of the signals are going to be different and that is simply a symptom of the fault and not the cause.

I suspect that what you WILL find is much more conclusive than a 'perhaps'. I suspect you will find a data or address or control pin that is stuck HIGH or LOW and even with something as simple as a logic tester this would be blatantly obvious.

The information that is most useful from a logic tester is status of the 'pulse' indicator. ie constantly OFF, constantly ON, constantly FLASHING. If you find a pin that is very different in this regard then the next clue is the status of the other leds ie constantly RED, constantly GREEN, mostly RED, mostly GREEN, both RED and GREEN. In any case it would be better to record both results to compare ie Pulse status and Logic status.

In my case I saw all pins (on the CPU) were as expected except the /INT pin. I didn't have another CPC to compare to and if I did then the results between the two would have been quite different in several ways. The key is in what you 'Expect' to see. I could list the 'expectations' here but it would take some time for me to do. It would be far easier for you to test and post the results.

If you want to save some effort then you can look for any pin on the CPU that is Pulsing on one CPC and not on the other. I you find one then report the levels (RED / GREEN).

If none of the above then compare the levels (RED / GREEN) of any pins that are NOT pulsing.

This diagnostic process cannot find ALL of the possible faults as it is (very) limited by the fact that you are using a simple Logic Tester. However for 'some' of the possible faults, it can provide a lead that is capable of leading you to the specific fault you have.


RobertM

Here is what I would expect to see on the Z80 CPU, I haven't tested this on my CPC so it's just what I expect to see.

Your probe will have a led (red/green) that is brighter than the other. If you test pin 6 then you will see what I mean by both red and green.

The address buses should be about the same. Look for any that are different.

Also the data buses should be about the same. Look for any that are different.

If you copy and paste the text below into a text viewer that doesn't support rich text or set the font to courier then it will be aligned and easier to read.

Address bus Pins 1 to 5 and pins 30 to 40 Constant pulse both red and green

Data bus Pins 7 to 10 and pins 12 to 15 Constant pulse both red and green

Pin 6  Clock   Constant pulse both red and green
Pin 11 Vcc     No pulse red
Pin 16 /INT    Constant pulse red
Pin 17 /NMI    No pulse red
Pin 18 /HALT   No pulse red
Pin 19 /MREQ   Constant pulse mostly red
Pin 20 /IORQ   Constant pulse mostly red
Pin 21 /RD     Constant pulse mostly red
Pin 22 /WR     Constant pulse mostly red
Pin 23 /BUSACK No pulse red
Pin 24 /WAIT   No pulse red
Pin 25 /BUSREQ No pulse red
Pin 26 /RESET  No pulse red
Pin 27 /M1     Constant pulse mostly red
Pin 28 /RFSH   Constant pulse mostly red
Pin 29 GND     No pulse green

RobertM

Quote from: RobertM on 00:38, 11 May 14
The address buses should be about the same. Look for any that are different.

Also the data buses should be about the same. Look for any that are different.

To clarify the above -

You don't need to compare A0 of the working CPC with A0 of the faulty one ect.

Just compare A0 to A1 to A2 etc of the faulty one, and D0 to D1 to D2 etc of the faulty one, to each other pin. They should all be about the same.

If the CPU is running these buses will just be random 1's and 0's so what you will see is just the average state.


RobertM

Quote from: Bryce on 12:47, 09 May 14
Can you send me a link to this information, they also seem to be confusing things a bit, or maybe something was lost in the translation.

HALs and Gate Arrays are mask programmed: ie: The chip manufacturer sets the function using a mask while the silicon is being etched and before it gets put into its IC package.
Later, user programmable versions of some HALs got released called PALs, but the old Gate Arrays were never released as user programmable versions. Newer devices have been released known as CPLDs and FPGAs. These are not the same chip, but could be used to build a modern replacement.

Getting a programmer that can do CPLDs might be useful, but they usually cost quite a bit more than a simple EPROM programmer.

Bryce.
Hi Bryce,
             I haven't forgotten you. I spent about an hour yesterday looking for the rabbit hole I found that info in previously. I can find some of what I found previously but not the info that went as far as a chip number.

Most of what's out there is just repeated in many locations. There are two documents in a foreign language, one in Spanish and one in French. I can't find the Spanish one. My search ends in 'Server not found'.

I will look again today and post back.

ikonsgr

#122
RobertM, thanks a lot for all your time and effort to help me out in "reviving" my very own first amstrad cpc from 1985!

Moerover, i'm sure your detailed descriptions could help more people having "difficult" problems like myself!

For the moment, i ordered an eprom for the fw/basic rom, mainly because i have a friend of mine who can make the flashing and also because eprom costs 2$ including postage!  :D
I'm also waiting for the logic tester, as soon as i get it, i will start probing all the signals of the cpu to see if they are as you mention.
As soon as i have any news i will let you know!  ;)

RobertM

Well I am making progress with fixing this CPC. BANK 2 of the RAM is in and all is working.

Now I am trying to decide if I should use a Floppy Emulator or actual Floppy Drives.

I see cheep emulators on ebay here but I don't know if it will work. I like some of the better emulators but they're too expensive for me.

I looked through my junk box and found 2 Sony MPF920 1.44 Floppy Drives. They're new, still in plastic wrappers.

So I might just give these a go while I decide weather to make an emulator.

The connector is a hassle. I don't want to use an edge connector like the CPC has for Drive 2.

I was thinking of using the 26 pin header connector that was intended for the internal Drive (1).

I noticed there is also pads on the circuit board for a 36 pin external drive connector. The pin spacing is 0.1" from left to right but the spacing between the rows looks to be about 0.2". What connector fits this?

I did do something like this about 20 years ago and I remember shifting data back and forth from the CPC with a 3.5" Floppy Drive and an IBM clone PC. I remember using the dos format switches to select tracks/sectors but I don't remember much more than that.

Can some one point me in the direction of data about what formats the Amdos supports??? From memory the differences were PC(Amstard): Tracks: 80(40) Sectors: 8(9) Heads: 2(1). I think I was using something like the 5.25" 360K format on a 1.44MB Floppy with the hole covered to force the double density mode.

Someone mentioned a Windows utility that will format 3.5" floppies on a PC with a format that the CPC can use. The problem is that my PC main board doesn't have a floppy interface so I would have to use a USB floppy. It seems that a USB floppy can't read the CPC format, only write it. I want to edit CPC programs on the PC so that has only limited use for me.

Also is there some data on the signal format for the read data and write data to the floppy. I think it's just MFM but I don't know it's speed. I am hoping I can get enough speed out of a atMEGA or PIC micro-controller to bit bang the signals. If I can then all I need is a cheap micro-controller, a couple of buttons, a 16x2 LCD display and a SD card.

Thanks in advance to anyone willing to help.

Bryce

The cheap floppy emulator you've linked to will only support PC formats so it's useless for a CPC. The HxC works on a CPC but cost a bit more. The real PC drives you have will work, but you will need to make some modifications to change it to DS0 and so that it sends a ready signal. The connector that fits on those holes in the CPC is this one: SE 5736FR - Centronic-Buchse, 36-polig, Printmontage bei reichelt elektronik which I'm sure you can source locally too.

Bryce.

Powered by SMFPacks Menu Editor Mod