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.