Sunday, 2 November 2025

CBM 4016 Repair Part 2

In the previous post, I had repaired a CBM 4016 board.

I had reached the stage where it was working with a PET ROM/RAM board to replace the ROMs and known working 65xx chips.

The video RAM was also replaced with a 2114 video RAM replacement board.

At that point, I would normally leave it. The board is working, the replacement parts are all working, the power consumption is down, only the 6545 is running warm, but that is an original part.

This board is a little unusual in being a factory 12" 4016 board, I don't think there would have been many of those, everything was 4032 after this point when 32K became the norm.

Let's see if I can get this working with mostly original chips.

RAM

The 16K of 4116 DRAM is all testing correctly, so nothing to do there. I would certainly not consider upgrading it to 32K by fitting eight more 4116s.

Character ROM

There isn't much to say about the character ROM. The one that was fitted looks original for the board (late 1981), that was working and all the characters looked correct, so I haven't touched it.

System ROMs

The board arrived with the original editor ROM and four of the five ROMs replaced with 2532 EPROMs.

There were also a set of replacement ROMs, which were some of the originals, and some others dated early 1980, probably from a 9" 40xx machine or maybe an early 12" 8032.

It is tempting to just make up a full set and try them out, but that can be counter productive and can lead you down all sorts of wrong paths.

The way something like the PET is wired up, all those chips are wired in parallel. The same address and data lines and the only difference being the chip select line.

We know the chip select was bad due to the 74154 failing, so all of those ROMs would have been selected at the same time, and all trying to write to the databus at the same time. You read $B000 and only the $Bxxx ROM should be selected, but all are selected and so you get the value that should be at $B000 written to the bus along with the value at $C000, $D000, $E000, $F000. Video RAM from $8000 and the RAM from $0000, $1000 etc.

The chips with the biggest drive transistors win and anything trying to drive the other way gets slowly burned out.

They run hot, and fitting heatsinks isn't the solution.I see these machine full of heatsinks and worry that it's only a temporary solution and just delays the inevitable. 

Find the bad ones and get them out.

Or if you want an easy life, take them all out and fit a PET/ROM RAM.

Testing the ROMs

When you are in a situation like that, one bad ROM can make it look like all ROMs are bad, or intermittent, and lead you down all sorts of wrong paths trying to identify the fault. I find it safer to test the ROMs in isolation.

This is how I test it, I fit a ZIF socket to one of the ROM sockets to make it easier and save wear and tear. It doesn't matter that it is the wrong socket, the PET diagnostics will still calculate the checksum.

I'll give you some examples.

This is what a good chip should show:

Only that ROM, and the other slots empty.

And another good one.

Some of the ROMs however misbehave.

This one was responding to an address in the RAM, but not to it's own address.

This one was responding to everything (sorry about the photo, I don't like to leave these running too long when I know they are in conflict).

This is the dangerous sort which will eventually take out other ROMs. The 6540 ROMs in the original PET 2001 are particularly bad at this. I would not consider trying to get a set of those running, other that for a museum piece that will rarely be powered on. For anything you actually want to use, get those ROMs out and use a PET ROM/RAM board.

You can use individual ROM replacements if you prefer, but it's easier to just replace the lot, with the bonus of the options of BASIC 1, 2 or 4 and up to 32K RAM. I'm not trying to do a hard sell, I'm a rubbish salesman, but I'd rather you didn't waste time and money doing something which is ultimately doomed to fail, having seen several people fail to keep a 2001 running with 6540s.

During the testing, it reads each chip 16 times. Normally the result should be the same each time, when there are bad ROMs, you don't always get the same result, which is shown as "Inconsistent CRC" (yes, I know it's a checksum not a CRC, I ran out of space). This chip is definitely bad, it is also appearing in the other ROM slots.

Other ROMs don't appear to respond at all.

Sometimes that is down to bad contacts, or bad sockets. I use the ZIF socket to rule the socket out, if other ROMs read OK, it's down to the particular chip.

The editor ROM was giving no response and showing signs of corrosion. I tried cleaning that, but no change.

I was surprised to find all four of the 2532 EPROMs supplied do not respond either. Nothing on the diagnostics, and the Stag programmer was not able to get any response either.

The end result was three of the supplied ROMs worked, but I was still missing two and I didn't have any spares of those, so time for EPROM replacements.

I used a (46)2532 to replace the 901465-21 ROM,which is a 4K ROM with a non-standard pinout which matches the 4K masked ROMs in the PET.

A 28C16 EEPROM replaces the 2K editor ROM, 901498-01, 50Hz 40 column editor with the normal keyboard.

And that's a full set of ROMs working (for the moment)

Would a full set of EPROMs be better? Probably

Would a PET ROM/RAM board be even better? Absolutely.

All tests passed.

I left that running for a while, and no problems were found.

65xx chips

I had been using two W65C21N and one W65C22N chips, alongside a vintage 6545.

Time to add a vintage 6502 to the mix and let it run by itself for the first time. Two were supplied. The one which was probably the original was dead, and the other was dated 1979, presumably from yet another PET. That did work, but had a patch of superglue presumably from a heatsink stubbornly stuck to it, so one from my stash of around the right vintage was selected.

Great, it's running under it's own steam.

The supplied single 6520 was bad, so I found two of those and I think the supplied 6522 was OK.

If you don't look too closely, you probably wouldn't spot the damage that was fixed last week.

Again, it's a choice of running old chips or new ones. There's no choice with the 6502 as the W65C02S is not compatible. There are later 6845 chips that can be used to replace the 6545, but they are still 30+ years old.

Video RAM

The final step to putting this all back to good was the video RAM. I had fitted two sockets for the good chip and the bad chip, so I could use the 2114 RAM replacement.

I found a similarly enigmatic 2114 in my spares, from another PET where the markings had wiped off or maybe melted off.

All done

That all seems to be working.

Ah, one last thing to do, the piezo transducer needs to be replaced (properly).

The original was missing, it seems to be in such a position that you naturally pick the board up by that point and could push it out. I've almost done that a couple of times.

I had temporarily replaced that by one of the piezos I use on the Mini PETs, but it's not ideal, so I looked for something like the original. 

I found these, the right size, just with wires, but it was easy enough to take the black wire off and shorten the red one and solder it back in the original place.

That all looks good, it fits nicely, and sounds just like it should, and finishes off a sort of restoration of this unusual CBM 4016 board.

Testing

I have left this running my old BASIC RAM test program. This is quite slow and inefficient, as it is written in BASIC, but that means it exercises all the ROMs as well as the RAM, so is quite a good soak test.

I can't load 3D Monster Maze or Tut-Tut in 16K, but Invaders is playing nicely.

I sometimes wonder about the order of events. You end up with a whole stack of bad chips, and you wonder which failed first, or was it something else like a voltage spike or static shock?

Was it trying to repair one fault that caused the others? How much run time did it have with the dead or dying 74154? That probably took out a lot of the ROMs and even the EPROMs, but was that first, or did something drag that down?


Post script

I was looking through some previous repairs and came across this 8032 board I repaired in 2017.

It is the same revision board as the 4016, with similar date codes, but with 32K and 80 column video.

That has all four MOS 40 pin chips in sockets, but the 6545 is soldered directly and is a Hitachi part. I think the 1G3 on the top row is a date, the 1 meaning 1981. The replacement that was fitted to the 4016 when it arrived was marked 4E4 (I presume 1984? G3 and E4 seem like the codes TI use for package styles, but they could also be part of the date code).

That appeared to be factory soldered. Not sure why that didn't warrant a socket? Maybe they thought it was unlikely to fail (which is very much not the case).

What is it with the MOS 40 pin chips of this era, they all have this same damage near pin 1 where it looks like the clear coat has flaked off or something?

Also note the option ROM chip with the markings painted over.

That was the protection chip for VisiCalc (or possibly some similar packages). If I remember correctly, it is a Commodore printer ROM chip, and all they do is check for certain bytes being present in the right places before launching the software. The black paint was I presume to stop people realising that.

I did get one PET which had the original printer ROM without the black paint, and another where it looks like someone sanded off part of the black paint and then covered it back over with sharpie.


Adverts

All of the PET repair parts I used are available from my Tindie store:

PET ROM/RAM:

PET Diagnostics:

PET Dual Userport Joystick:

I have also listed the LED tester I made for the userport:

Mini PET 40/80 Internal

Or if you decide you want to take the easier route, I have recently built some more Mini PET 40/80 Internal boards, that are a drop in replacement for boards like this one.

Shipping

I can still ship worldwide from my Tindie store and US orders are now tariffs paid.

Currently it looks like Royal Mail to the US is working. I pay the 10% tariffs as part of the postage to (hopefully) avoid delays and additional costs at customs. The increased US postage costs cover this.


Patreon

You can support me via Patreon, and get access to advance previews of development logs on new projects like the Mini PET II and Mini VIC and other behind the scenes updates.This also includes access to my Patreon only Discord server for even more regular updates.

Sunday, 26 October 2025

CBM 4016 Repair Part 1

A while ago I was donated a CBM 4016 board from a non-running PET. The board was no longer required, as the owner had bought a Mini PET 40/80 board to replace it, and I was very happy to offer it a new home.

It looks in reasonable condition, I think the story was the PET was bought as not working, and the new owner had gone for the Mini PET option to make things easier.

The only thing that stand out are the missing 6520 and missing piezo (the two ROM sockets on the end are for option ROMs, the are normally empty).

It even came with an extra portion of chips.

Not always the best sign, like finding a load of spare engine parts in the back of a second hand car.

That looks like some of the original ROMs, the board has 2532 EPROM replacements fitted, and no, that's not the missing 6520, it's another 6502.

It's clear some swapping has gone on here, the board should be late 1981, but the 6502s are dated 1979 and 1980, some of the spare ROMs are early 1980, and the 6545 has been replaced by a 6845 dated 1984 (I think).

Before I powered it up, I had a look at the back of the board.

Aaaarrrrgggghhhhh!

Oh dear, that doesn't look good. That's the socket for the 6545 CRTC.

I suppose I should test it out, you never know, it might work?

The 6520 is only used on the IEEE-488 port, so is not needed to boot, but that being missing is not a good sign. You can't even tell if it makes the power on beep as the piezo is also missing, I can temporarily fix that with a userport piezo.

Nothing.

No beep.

No video signals.

A quick check around found there was power, the reset signal was working and there were clocks into and out of the CPU, so that's a good start.

However, I found several lines that were floating and some contention on the data bus, as well as some completely missing signals on the address and data bus.

A closer look

I started checking around the board, and found some worrying marks around the socketed chips.

Looking closer at the 6545 socket, there are some more worrying marks around the pins.

There is track damage around all the the 40 pin chips, it seems something medieval has been used to lever the chips out.

These sockets aren't the best, there isn't much room to get in to remove the chips. The pins are also shrouded, and the contacts aren't great.

But still no reason to wreck the board trying to pry out the chips.

I don't know what happened here, I presume it would have come from the factory with 5 identical sockets and the one for the CRTC was either damaged, or believed to be faulty and replaced, inadvertently causing a lot of damage in the process.

There doesn't appear to be any other rework, so this is likely a factory 4016 board, 40 column, 16K. The empty positions in the middle are for the 80 column video, and the alternating empty spaces on the left would be the other 16K of RAM to make 32K.

The only modification is in jumper position M, it looks like it was wired closed, the cut, then soldered back, then cut again.

This controls access to the utility ROM slot for block 9000-9FFF, and makes it read/write for something connected to the expansion pin header (if I understand it correctly).

The normal state is not fitted, so I have removed that.

You can see the ROM sockets at the top of the picture have also been gnarled up, but I will leave those for the moment.

This is an intermediate board, they had used the 2001N board for a while in all the 9" monitor PETs, and had launched the very different 12" 8032 board as 80 column only, 32K only.

This board replaced both of the above. Designed to be 40 or 80 column, 16 or 32K, achieved by omitting several chips and changing many jumpers.

They later went to the "universal dynamic" board, which was still 40 or 80 column, but lost the jumper block and was fixed at 32K. Several of the pads are still there. You can see some of the traces still wiggle around between where the missing pads had been, and the silkscreen "M" is still present.

Bit of a Friday afternoon job?

Repairing the damage

I found various signals the didn't appear to be connected that should have been, and they all seemed to pass through the 6545 socket - the one that had been replaced.

I think I have to remove that before I go any further, and see what the damage is.

Oh boy, that's nasty.

How would you even do that

Why would you even do that?

Don't have nightmares folks.

At this point, this might be a spares board.

The back doesn't look too bad, most of the traces are still connected, but there are various places the through hole plating is gone or the traces don't quite make it to the pads.

But, never to be defeated, let's see what I can do.

It's not looking good, but maybe it's just the soldermask that is damaged?

I spent quite a while with a fibreglass pen and some fine sandpaper, taking off the damaged soldermask layer around the socket to see what was going on.

There were some clear breaks, and the through hole plating was missing on many of the pads, one of which (pin 40) was noticeably larger than it should be, having apparently been drilled out.

Most of the traces are intact, and I think I should be able to reconnect everything if I use a turned pin socket and solder on both sides of the board to make sure all the traces are reconnected.

To do that, I removed the two adjacent sockets, so I could get the soldering iron in to the sides of the pins.

These are really awful sockets. The pins are so thin and several on each socket were bent over to hold them in place during assembly, and just snap off when you try to bend them straight again. Those are certainly not going back in.

Oh well, in for a penny....

I also took off the top two sockets, since the sides were a bit marked up by previous gouging.

Not prefect, but I think it should do the job, I caught the socket a few times with the iron, which is a bit annoying, but it shouldn't stop anything working. The important bit was making sure there was solder connecting all the traces to the pins, on both sides and that traces were connected through the pads to the other chips.

Checking with continuity, everything seemed to be OK.

I added the other four sockets, time for a test.

I went for a PET Diagnostics at first, and a known working 6545.

Nothing.

No video.

No beep.

Probing around, I found some there were still some data bus conflicts and some problems with the chip select signals.

Continuity was now fine, the missing address and data bus signals were back on all sockets, but the IO select signal on the 6545 and other IO chips was still floating.

I traced that back to the 74154 (or in this case a M53354P), and all of it's outputs were floating.

This is a 4-16 line decoder, it takes the top four address lines and generates sixteen select lines, one for each 4K block in the address range.

Normally all outputs should be high apart from the currently selected block. Here they were all floating about 1V.

I have seen these fail like this before. Out it comes.

Let's try it in the Mini Pro.

Well I think that's pretty conclusive.

The 74154 (and the various alternatives like the M53354P) are no longer in production (at least not in DIP package - there is a SOIC 74HCT154).

I don't know if this board is a write off yet, so if I am to raid my stock of NOS parts I would like to fit a socket to I can reclaim the chip if I need to.

And there we go.

That 74154 has sat in a tube for 46 years, time to give it a test and see if it can fulfil it's dream of decoding a 4 bit signal into 16 active low outputs.

I optimistically added a full set of known working chips to go with it.

I even added a replacement piezo, in the hope I might get a sound out of it.

I did get a beep.

Yay!

And there were signals on the monitor connector. Let's wire it up to a CRT and see.

Ah, oh, well. That's progress I guess?

The diagnostics seems to be running, just a corrupt display.

I did try a PET ROM/RAM (which neatly covers up the carnage below).

That is also running, but again with the screen corruption.

Looking at the character map screen on PET diagnostics, you might spot a pattern.

I have recreated it here with a BASIC program in Vice to demonstrate my theory.

There is some text around the top and left hand side that I have omitted, but you should see the same pattern.

The background should all be the space character, so I will remove that to make things clearer.

Spotted it yet?

This is what it is meant to be showing.

Here is the BASIC program if you are interested.

You can see that what were are getting is 16 identical copies of the last line, so we should have a line that is $00-0F then $10-1F etc. up to $F0-$FF, but all we are seeing is $F0-$FF

This should ring alarm bells. The way the PET video RAM works is split into nybbles, so the upper 4 bits are handled by one path, and the lower 4 bits by another, and here the upper 4 bits are stuck high.

Here is what you would see if it was the lower 4 bits that were stuck high instead, rows of $0F, the $1F, $2F etc. up to $FF.

The obvious candidate is the video RAM chip which handles the upper nybble, but there are various other elements involved (the missing chips are for 80 column mode, which doubles up everything).

The data bus is buffered twice (?!?!) by two pairs of 74LS244 buffers, and then feeds the two video RAM chips, before being combined by a single 74LS374 latch, feeding the character ROM and finally shift register.

It is possibly the latch or character ROM is at fault, but given the clear cut nature of the failure, it is unlikely.

I did various tests with the scope and the logic analyser.

The write data was getting through both buffers, but the top four data bits were floating by the time they reached the latch chip.

As expected, it is down to a bad 2114 static RAM. I've had a few PET boards like this, where you can barely see any marking on the chips. The video RAM is UC4 and UC5, with UC5 handling the upper 4 bits.

Time for more desoldering, this board hasn't been too bad to work on for me, with these chips and sockets coming off cleanly, with the right tools and experience and I am sure a bit of luck. We've all had bad days at the desoldering office, and I guess the person removing the 6545 socket had a nightmare of a day.

I fitted two sockets and a 2114 replacement RAM module. These PETs are sometimes picky about 2114 RAM chips, so I will look at finding a matching replacement pair later.

Time to test again.

OK, so that's good, we have a clear display.

Rather surprisingly, the eight 4116 chips that make up the 16K of RAM all test fine. The upper 16K is not fitted to the board, so it is expected that would fail.

The ROM sockets are all empty, as expected. Had there been address decoding issues, you would see data being read back from the empty ROM and RAM sockets.

The character map now shows all 256 characters correctly.

Testing with PET ROM/RAM

Next step is the PET ROM/RAM board, I have set that to replace all the ROMs so I can see if everything else works before I get into sorting out a working set of ROMs.

Great, 16K detected and working.

I tried loading some programs I got "device not present error" on the IEEE-488 bus, and no response from datasette #1, but I think those are just bad connections as datasette #2 responded correctly.

I did get it to load from datasette #2, and that seems OK.

Edge Connectors

The edge connectors do look a bit tarnished.

It doesn't come across too well in the photos, but there is a line on the pads where a connector has sat attached for many years.

I had errors on all ports apart from datasette #2, so I started by cleaning them.

Normally I use some contact cleaner and a fibreglass pen, but when there is deeper corrosion like that, I take it a bit further with some fine sandpaper to get the pad back to good solder, or in some cases back to the copper. 

Then I re-tin the pads with lots of flux and fresh solder, and then take off the excess solder with the desoldering station.

Leaves nice fresh shinny pads, all around.

That fixed the errors I was having with the datasette ports, the userport.

My LED tester and a userport joystick were both testing correctly.

The IEEE-488 port on these boards is gold plated, so it was just cleaning for those and that fixed it.

At that point, I would normally leave it. The board is working, the replacement parts are all working, the power consumption is down, only the 6545 is running warm, but that is a vintage part.

This board is a little unusual in being a factory 12" 4016 board, I don't think there would have been many of those, everything was 4032 after this point when 32K became the norm.

One last test for today, I enabled the upper 16K bank on the PET ROM/RAM and tried to load 3D Monster Maze.

Because of the way I double buffered the video, I know that writes heavily to the video RAM, so is a good test, and that is working nicely.

The next step will be to put back the original chips one by one and see which of them are working.

The mask ROMs may well be toast as when the 74154 fails, they all get enabled at once and burn each other out, but that remains to be seen.

And if it is being very well behaved, I might even find a proper piezo replacement for it

I think I will save all of that for part 2.


Adverts

All of the PET repair parts I used are available from my Tindie store:

PET ROM/RAM:

PET Diagnostics:

PET Dual Userport Joystick:

I have also listed the LED tester I made for the userport:

Mini PET 40/80 Internal

Or if you decide you want to take the easier route, I have recently built some more Mini PET 40/80 Internal boards, that are a drop in replacement for boards like this one.

Shipping

I can still ship worldwide from my Tindie store and US orders are now tariffs paid.

Currently it looks like Royal Mail to the US is working. I pay the 10% tariffs as part of the postage to (hopefully) avoid delays and additional costs at customs. The increased US postage costs cover this.


Patreon

You can support me via Patreon, and get access to advance previews of development logs on new projects like the Mini PET II and Mini VIC and other behind the scenes updates.This also includes access to my Patreon only Discord server for even more regular updates.