Friday, September 05, 2025

Now I have an even older one - PET 4032

It was my birthday a little while ago. To celebrate, Mrs Crashed arranged for us to go to the National Museum of Computing at Bletchley Park. But not just to visit the awesome museum. The NMOC were actually holding their 'Retro Electro Jumble Sale' and I had to be there. 

The sale itself consisted of a large room with lots of glorious (but unwanted) retro computers in various states of repair on and underneath several tables. I hadn't really gone with the intention to get anything specific but after looking at a couple of Atari ST's (a bit too new) I was drawn to the PETs that had been strategically placed under the tables. Some had a their price tags marked as being reduced from £50 - a bargain in itself - to £30 but then realised the reduction was because the motherboards had been removed.

But then Mrs Crashed found one that had its motherboard and it all looked intact. We lifted it onto a handy trolley nearby and then checked the description and cost for this specific unit. Cost £50, condition - rusty. And it also had a label on saying 'Screen garbled. OK inside.'

 

I frequently feel the same...

This was the one for me. And I also managed to grab a period correct cassette drive too, price £3.


Presenting- Rusty!


After the discounts from our entry tickets I realised I had managed to bag a CBM PET from around 1979 for less than £50. It certainly didn't matter that it wasn't working as that was the point of buying it. A project for my birthday. 😁

And then the work started..

The PET is very easy to work on thanks to the ability to lift the top of the unit up and prop it open, just like a car bonnet. Nice. A quick inspection revealed that the inside while 'OK' was rather dirty (and not nice). I also spotted the infamous 'white' sockets in use on the DRAM, ROMs and the CPU which are well known to be a source of issues with this type of computer.


Open wide...

The power supply is the slightly terrifying arrangement of mahoosive transformer and giant green capacitor on the left. I don't know if there are any magic smoke bomb Rifa capacitors involved here. If so then they are well hidden. I decided to just go for it. First switch on attempt gave a screen full of garbage, as expected:


No surprises (sounds like a great title for a song..)


This is good as it shows that the CRT is OK - white which was a surprise, I was expecting green - and the video generation circuitry is working OK. The brightness control at the back of the CRT also worked as expected.

But then, within a couple of hours, the screen was black when I turned it on. Interesting. I went around the back and tweaked the brightness of the CRT to maximum and saw a single thing line across the centre of the screen. So that meant the vertical deflection had collapsed. Awesome. 

Fortunately, with the schematics available from zimmers.net I managed to track down the fault to a 74LS107 which feeds the 'vert_drive' signal. With a new chip in place, the screen was back to being garbled, but at least it was visible (IC death count : 1).


74LS107 at H8 was dead

One thing I should point out about this unit is that it is a 4032 i.e. a slightly newer model of PET with 32kb of RAM and, obviously, a much better keyboard. The motherboard matches the schematic of the 'dynamic' system board which means it's the second(ish) type of motherboard that Commodore came up with. It doesn't have a speaker so there is no sound at all on this PET, and it doesn't have the CRTC chip which means that this machine is strictly 40 columns only.

Checking out the rear..


Motherboard with ROMs & CPU removed
(and a little bit cleaner)


Anyway, while checking the various clock signals that should be on the board, I found a dodgy looking one from pin 13 of the 74LS164 at H3 on the board, and touching it with the scope probe filled the screen with the character 'h'. I had some 74LS164s so I replaced it and that restored the expected clock signal (IC death count : 2).

And then I realised that the CPU was not outputting anything from its own clock signals. The 6502 CPU has two clocks phi1 and phi2. After ordering a couple of replacements (you can never have too many chips) I started to wish that I didn't have to wait but I didn't have any machines with a 6502. Having been a speccy guy in the 80's, most things I had were Z80 based. But then I remembered I had been given an Acorn Electron a year or so ago. And sure enough, the 6502 in the Electron was socketed. Replacing the 6502 restored phi1 and phi2 to the expected signals (IC death count : 3).


Correct clock signal from the borrowed 6502. Yay!

This was all before I even posted on the VCF forums about the issues I had which should give an idea of the body count (of dead ICs) at the end of this project.

Anyway, by this point I now had the screen displaying this:


Still garbled but different..


Changing the CPU had changed the garbage on screen and the result was a little bit more like what would be expected at a normal PET cold start. What would normally happen is that there would be a blast of garbage on the screen followed by the screen clearing and being replaced with a basic prompt. This is obviously not happening yet.

I also managed to check the DRAM by the simple method of taking a ZX Spectrum, which uses the same DRAM for the lower RAM, and desoldering all its lower RAM, soldering in sockets and swapping the PET RAM into it, one bank at a time. It seemed a good idea when I started but at least the speccy now has sockets for the lower RAM.. No faulty chips were found but, unfortunately, I had an incident where I replaced one of the DRAM chips in the PET the wrong way around. This was 'Not Good' (R) and caused an immediate burny electronic smell. It also killed the chip. (IC death count : 4) Fortunately, I had another DRAM that was a larger memory size but could be modified to fit - which I did.

But still no change. The next thing to try was the video RAM. The guys on the VCF forums had indicated that the video RAM was an almost certain failure. The two MOS 2114 SRAMs are notorious for failing (as a lot of MOS chips are) so two more modern replacements were ordered. Then I ordered another pair, but a different manufacturer, just to be sure and have some spares. 

At this point I was introduced to the idea of using the PET Tester ROM by the most awesome Daver2 over at the VCF forums. This is a small program that sits on a 2716 EPROM and so it can be swapped with the edit ROM (which is also only 2kb). It runs a very simple program at start-up, first to test the low page memory before moving on to more advanced tests including video RAM and DRAM tests. I actually had to order a 2716 as the only one I had was as dead as a doornail and no amount of UV exposure in the phone sanitiser would cure it. (Not counted in the death total as it was already dead.)

When the new EPROM arrived, I copied the PET Test ROM to it and swapped out the edit ROM. I was disappointed to see no real change. After a few hours of poking I found a 74LS244 at position C3 with an address line stuck high. This meant that no code could properly run from the test ROM and so it needed replacement. Fortunately, this was one of the chips that I have plenty of so it was no big deal to replace, other than the slight hassle of de-soldering it from the board and installing a socket (IC death count : 5).

Still no joy, and the screen just kept displaying the same pattern of garbage on screen. But then one pair of the video RAM chips arrived and so I replaced the 2114s. 


2114s - they were not socketed originally


This was a partial success (IC death count : 7). The PET Test now started with its initial check - YAY! - but instead of progressing, it sat with only the first character on screen changing rapidly, as if it was cycling through a massive list of values - BOO!. This was not right and I wondered if this was still an issue with the video RAM since the test it got stuck on was the video RAM test. Basically, it writes certain values to the video RAM and then reads them back. If they all match then the test ROM moves to the next test. But as the chips were new it seemed odd that this would be the case.


First signs of life but stuck here...

While I was probing around I accidentally slipped and shorted a couple of data pins together and suddenly saw that the test ROM had moved on to the next tests. It ended up on the DRAM tests although there was an issue with the text. According to Dave I'd basically crashed the initial test and by some miracle the code in the ROM continued. It did allow me to quickly check the keyboard - a series of numbers are displayed by the test ROM which change when keys are pressed. From this I could see that only the 'W' was a bit iffy and this also meant that the 6520 controlling the keyboard was OK (foreshadowing...).


Tests working but only because I crashed the first test....


I've got how many 'k' of RAM?
Looks like I broke it...


It also allowed me to check that the ROMs were 'OK' via their checksums. I downloaded the equivalent ROMs and put the binary file into a hex editor and calculated the checksum of those and they all matched. Nice. Of course, it's not really easy to check the Edit ROM but I did put it in one of the two spare ROM slots and the reported checksum initially matched but it was not to last - but I'm getting ahead of myself.

So, if the first test isn't getting through, this suggested a problem with the video RAM (still). With no video RAM the PET should display a fine checkerboard pattern. Well, mine did but it wasn't exactly stable..


That's not really a checkerboard, is it?


I put a switch on IC F1 (74LS108) between pins 6 and 7 (the TV_SEL) line. This effectively isolated the bus from the display meaning that the we could (in theory) track down where the noise was coming from in the display. With the switch open there was what looked like a random pattern of characters spiralling up the screen but with it closed the display was rock solid. Then followed a few days of measuring lots of signals, with the switch on and with the switch off, find another signal, measure with switch on and with switch off etc. 


This is what it should look like with no video RAM!


During all this I replaced one of the 74LS157s which I think was the one at F3. Either way, the display suddenly became much more like the expected fine checkerboard pattern but it still wasn't stable. (IC death count : 8)


Better, but not quite there..


At some point I also replaced the 74LS373 at G3. (IC death count : 9).

And then, for no apparent reason, the display became rock solid with or without the switch closed. As Dave put it, there's a metal mouse loose somewhere... The only thing I can think is that in my handling and additional cleaning of different parts of the board had I removed something I wasn't aware of causing a possible short? Either that or the Retro Computing Gods decided to give me a break?

Whatever. The display was now working. I replaced the VRAM and turned it back on and, sure enough, the PET Test ROM ran exactly as expected. 

I decided to go for broke and put the Edit ROM back in and promptly found out that it had failed completely. (IC death count : 10). 


Hmm. That's still not quite right is it.. Dead ROM


So I reprogrammed the PET Test ROM to be the Edit ROM and reinstalled it. All I got was a black screen. Hmmm. I removed the 6522 but no change. So I removed the 6520 from C6 and I saw this...:



..And nearly fell of my chair. 

But all is not right. Where's the cursor? The 6520 at C7 should give the cursor but it's missing.

I thought that the sockets for the gaggle of 40 pin chips - including the 6520s - might be causing problems and confusing things, since tapping the top of the 6522 caused some garbage on the screen. Fortunately, I had quite a few dual wipe 40 pin sockets in the box o' bits' so that was no problem.


White sockets looking a bit bendy

White sockets begone!

And that did absolutely nothing except stop the garbage on screen when I tapped the 6522. From that I have to assume that one or more of those three chips is faulty. The chips in question are the two 6520 PIAs which control various input/output stuff such as the IEEE488 interface and the keyboard, and the 6522 VIA which controls various other input/output stuff including timers and IRQ things.

I decided to go all out again and just order replacements for all three. If I'd ordered just one 6520 (say) and then found out it was the 6522 I'd have had to order and wait again, so it made sense. They aren't that expensive and the 6520s have a modern equivalent of 6821. I actually ended up with a ceramic 6522, one 6520 and one 6821.

But while I was waiting I wondered if I could use a different EPROM in place of the Edit ROM as I only had one 2716 ROM and I didn't want to have to keep reprogramming it between PET Test and the Edit ROM. The thing is that the actual ROM is pin compatible with the 2716 but I only have 27c128 or 27c256 EPROMs to play with. The 2716 is 2kb while the 27c128 is 16kb and the 27c256 is 32kb. But that's not the biggest problem. The 27c128/256 have more pins than the 2716 and I can't just cut them off.


Typical 2716 EPROM
(This one is OKI and is also dead)

So I built an adaptor board instead. 😊


First attempt!

The adaptor basically swaps a couple of pins that are different between the 2716 and 27c128/256 and either puts the extra connections to ground or ties them to 5v depending on what they are.

I have to tell you now that the first version did not work. At all.

Fortunately, Dave on the VCF forums came to the rescue and told me that I'd connected pin 21 of the ROM socket, which is a permanent 5v, to pin 22 of the 27c256 which is /OE or 'Output Enable'. Since /OE is 'active low' me tying it to 5v very effectively disabled the chip since /OE would never go low. Doh!

A quick re-wire later, where I also found another non-working connection, and I was ready to try again. And this time, it worked! More or less..


Interestingly, the keyboard came up as all 'ff' instead of '00' with the 27c256. I'd copied the PET Test ROM across the chip 16 times to ensure that it was consistent, the original PET Test only being 2kb. I'm not sure whether there may still be a slightly 'off' connection somewhere that might cause this. It also seems to cause a weird issue when the RAM test runs through. But don't let that distract us, not just yet.

Because the postman had been! Yay! In the bags were the 6522 from Devon, and a 6520 and 6821 all the way from Germany (bizarrely cheaper and quicker than ordering from the UK). 

First up, put the 6520 into location C7. And we got...

...a working PET! With a flashing cursor and everything! There was still a slight glitch on the video but Dave confirmed that the 6522 handled a signal that, if not present, would cause that. So I inserted the ceramic 6522 and tried again. Same result but without the glitch. Nice! And finally, I added the 6821 into location C6 and tried again. Same result again. This is starting to look like a working PET! It also means that both original 6520s and the 6522 are dead. (IC death count : 13).

Some little BASIC bits and bobs:

HELLORLD! as made famous by Usagi Electric

Can't have a Commodore running without the random 
maze Basic program. :)

But is it really working 100%?

Not quite. If I want to add one of the modern SD card adaptors then I need the IEEE488 port to be working. There is a BASIC program that can be entered which works by poking values into certain locations, and then peeking at the values of nearby locations. The values in these second locations would show if the IEEE488 parts were working. And this was the result:


Darnit. Bits 0 to 3 and bit 7 are faulty.

That's annoying. There are three MC3446 chips that control all the IEEE488 comms and this shows that at least two are faulty. A very nice man on the VCF forums suggested a supplier for the chips that seemed to be a good bit cheaper than eBay so I gave them a go. And after a couple of days, two MC3446s popped through the door in a jiffy bag.

By this time I'd already put the three 3446 chips into sockets so it was a piece of cake to swap the old ones out and put the new ones in. (IC death count : 15) Looking at the schematic I worked out which pair were impacted and which one was still working and swapped them over. And the result was:


Yay! No more bit errors!
(or other errors!)

But what about the cassette deck, I hear you cry? Well, that just needed a new belt, only because the old one was stretched, and thankfully had not turned to goo.


Belt up young man!

I also cleaned the read and write heads along with the capstone and pinch-roller. And it just worked, 100%. I managed to type in the IEEE program and then save it back to a cassette tape multiple times. Very simple and easy. Nice!

One last thing to do (well two actually). Clean the hideous keyboard and clean the case. I won't actually do much more to the case than that to be fair. The rust is part of the computer's history and it's not actually that bad, certainly most rust spots appear to be surface only.

But the keyboard. Oh, my, goodness. The keyboard. It's easy enough to remove, just a bunch of screws and a connector for the cable. And it's a good job because it was filthy. Absolutely hideous.


Keyboard connector on the motherboard

Connector at the keyboard end


Filthy keyboard (oversized belly for scale)

Fully dismantled and ready for a bloom' good wash

Cleaning keyboards is not a fun task. It's easy to forget how many keys are on a keyboard, even one from 1979(ish) before the general layout we know today had become established. But it must be done!


Commence rebuild!

Rebuild complete - what a difference a couple of hours
of extreme cleaning, careful drying and reassembly makes

When I managed to test the keyboard previously the only key that seemed to give any grief was the 'W' key. So I paid special attention to the circuit board and plunger at this location. Once it was re-installed in the PET the 'W' worked perfectly. Nice.


Stand by for action!

I still need to clean the case properly but I won't be doing anything with the rust as such. It's part of the history of the machine and it adds a certain 'rustic' charm (try the fish, I'm here til Thursday!).

There you go. A Commodore PET for under £50 (plus about £25 quid in new parts). There were a total of 15 chips that had died in the PET, although I think that the 6520 in C7 was working originally but died at some point during the investigation and testing. Here's a picture of most of the dead ICs:


We salute our fallen heros.


If you want to see more of the technical help given to me by the VCF guys take a look at the thread here.