Watch on YouTube: https://www.youtube.com/watch?v=9NKAlRaUxyg

Upgrading The CPU - 1986 IBM 5162 PC XT 286 Restoration Part 2

Introduction

IBM’s 5162 XT-286 machine was a bit of an oddball. Released in 1986, it was comparatively low specced for its time but of course still subject to the “IBM Tax” - making it notoriously bad value for money. What’s worse is that IBM built in various measures to prevent users being able to upgrade it, so as to prevent cannibalisation of PS/2 sales.

So what were these limitations? How do we work around them? Just how fast can this thing go anyway? Find out in part 2 of my ongoing upgrade and restoration series!

Script

I’m back - finally - with my IBM 5162 restoration and upgrade! Last time I tested this rather interesting 286 system out - along with a few ideas for upgrades - and played Wolfenstein 3D on it just in time for the game’s 30th anniversary. This time around I’m going to upgrade the CPU - which is something that IBM really didn’t want people to do - and I’ll explain how and why as well as how we can work around that.

Now, as this whole thing needs cleaning and I also need to do a fair bit of soldering, I need to remove the motherboard from the case. Interestingly enough, despite looks, this isn’t actually a repurposed IBM 5150 case - there’s an old story going around that these were only released to use up excess stock of those, but the 5162 case has had things shuffled around slightly to accommodate the extra expansion slots, as well as losing a few holes like the expansion cable hole and cassette interface connector on the back.

I always love finding stuff like this - there’s a sticker on the bottom of the case showing a manufacturing date of October the 20th 1987. To put that into perspective, 12MHz 286 CPUs and indeed 386 CPUs had already been on the market for 2 years by that point, so the 5162 with its 6MHz 286 really was a low specced machine for its time.

Anyway, after a quick blast with some compressed air we can get a proper look at the motherboard itself.

So along the back edge we have the expansion slots - three of the 8-bit variety and five 16-bit, and unlike the 5170 PC AT motherboard with its weird slot 8, all of these are fully functional. And by the 286 era ISA was standardised, and these were all backwards compatible with the 8-bit pre-ISA expansion slots in that original 5150 PC from 1981.

By the keyboard and AT power connectors we have the RAM - which comes in the form of 2 30-pin SIMMs giving the first 512k, and an additional 128k in the form of DIP chips on the motherboard itself, bringing us to our total of 640k.

SIMM compatibility is severely limited and can’t be upgraded to a higher capacity or anything like that, so presumably they were used as a space saving measure. But they can be swapped like-for-like for faster chips, which we may need to do to be able to upgrade the CPU past a certain point as this motherboard uses zero wait states.

For compatibility with some older software, the motherboard RAM can be disabled by means of a jumper, which could presumably be wired to an external switch if switching it on and off regularly was a requirement.

Next to those we have the BIOS - and this is where we run into our first issue with the upgrade. You see, by the time this system was released, IBM were wise to early overclocking devices like the PC-SPRINT (which I’ve covered previously on the channel) and so they added some timing checks as part of the BIOS code which would freeze up the machine and cause it to fail to boot if the system clock had been tampered with.

So in short we’ll more than likely need to replace the BIOS.

And the reasoning behind this limitation is basically one of money - IBMs were expensive machines, and if an end user could extend the life of their system, that would seriously impact new PC sales. Also with this 5162 being a lower end machine with a lot of upgrade potential, they didn’t want people buying them and upgrading them over buying a much more expensive PC like the new PS/2 series, which was typically around double the price.

Anyway, back to the hardware. Next to the BIOS we have the AT keyboard controller and the Intel 8742 peripheral controller, and these are covered in some kind of horrible sticky residue, so lets get that cleaned up with our old friend alcohol. The 8742 has some EPROM memory onboard, so I’ll remove the original UV protective erase sticker and replace that with a nice new one.

Beyond the sea of logic chips - which aren’t particularly interesting in and of themselves although I have to say the layout of this board is a thing to behold - we have a socket for a 287 co-processor which I’ll be populating because, well, why not, and the 6MHz 286 CPU and its associated timing circuitry.

From the factory, this consisted of a 12MHz crystal oscillator - which bizarrely enough, like the CPU was actually socketed despite not being user upgradeable - and an Intel 82284 clock driver, which took the frequency from the crystal and halved it, in this case giving us our 6MHz. This one’s only good for up to 8Mhz, as is the 82288 bus controller, so I’m going to socket both of these and fit their 12MHz-capable CMOS-based counterparts, which are a drop in replacement for the original slower HMOS chips.

Desoldering as always is just a case of adding flux and some fresh solder, and then working my way around the pins using a vacuum desoldering station, and thankfully they all come out very cleanly, and after another good cleaning the new sockets go in with no problems at all. This time around I decided to try using kapton tape to hold them in place and it seemed to work pretty well.

I’ve replaced the original chips for now just to test everything is still working, and it seems that’s all booting up fine. While I have the motherboard out and the desoldering station up and running, I’m also going to remove the tantalum capacitors.

They’re mostly the same value - 10uF at 16V - apart from one labelled C66 which, for whatever reason, is 33uF. These will be coming to the end of their life after 35 years and when they fail they tend to explode and cause a dead short, which can cause other problems. So while it’s a fiddly and time consuming job I think it’s well worth doing as a preventative measure that should hopefully keep this thing ticking along for another 35 years.

As you can see, IBM used 3-legged tantalums as they made the manufacturing process far easier - putting 2 legged tants in backwards can be dangerous - but as they’re very uncommon these days I’ll be replacing them with their modern 2-legged counterparts. The centre hole is positive with the 2 outers both being connected to ground so bear that in mind if you don’t want one going pop in your face.

I don’t have the replacements yet but the board will run fine without them, so I’ll replace those later on when they finally arrive.

So now we get to the fun part - with everything socketed I can easily swap components around and see what works. So I’ll start by using CheckIt to benchmark the stock setup, which I’ll also save so I can compare later on.

By the way, I’m using a modern ATX power supply with an AT adapter cable for testing, as it should give much cleaner and more reliable power, and as it happens the original doesn’t actually boot without the load of the hard drive attached anyway. When I rebuild this I may well upgrade the internals of that original PSU, but that’s a project for a later video as I already have enough on my plate for this one, as you’ll see.

The first upgrade I want to do is to fit a 287 co-processor. To be honest there isn’t a huge amount of software that supports this, particularly on the game side of things, but there’s an empty socket so I may as well put something in there.

This lovely gold i287XL supports clock speeds of up to 12.5MHz, which should be able to handle anything I can throw at it as I’ll be installing a 12MHz CPU in this machine.

A quick CheckIt benchmark shows that it’s detected and working and while it of course it has no bearing on CPU performance, it has given us an enormous boost of nearly 10 times the performance on maths operations, generally used in early 3D stuff like CAD applications, flight simulators and the like.

So now it’s time to finally remove that old original 6MHz CPU and those 82284 and 82288 chips and swap them for something with the potential to run up to twice as fast. These are all genuine Intel parts - the CPU just pops straight into the original socket so no problems there, and of course the other two chips go into the sockets that I added earlier.

A quick benchmark at stock speed just to put it all through its paces - of course it won’t be any faster yet but it’s good to know that the new components are working OK.

So finally the stage is set - and hopefully now we can increase the speed of the system clock and therefore the CPU just by swapping out the crystals. I decided to pick up a few different options - remember the frequency is halved by that 82284 clock driver - so I have 16, 20 and 24MHz crystals here for clock speeds of 8, 10 and 12MHz respectively.

So lets swap out the original 12MHz crystal for its 16MHz counterpart and see what happens.

Well… Actually, the answer is nothing. The system now refuses to boot, and I think I have a pretty good idea why. Remember that anti-overclocking code in the BIOS I mentioned earlier?

Thankfully, with 286 motherboards being relatively basic and other manufacturers being so close to IBM’s design, it turns out the BIOSes are actually pretty universal and interchangeable, which confuses my late 90s / early 2000s PC brain but hey - it certainly seems to run just fine with this AMI BIOS installed. I’d rather not keep this longer term as although it offers a lot more functionality it’s not original, and there is a way around the speed limiting code which I’ll have a look into very soon. But for now this gets the 5162 up and running, and a benchmark shows that that 8MHz clock speed results in a very healthy 37% increase in performance!

Of course benchmarks aren’t everything, and as we know how Wolfenstein 3D ran on this machine before I thought why not capture some footage and show them side by side - and I think that’s pretty conclusive. I didn’t want to capture a huge amount as the files are quite big, but playing it through the first few levels it seems everything’s nice and stable with no obvious issues and the AdLib sound is working just fine at the higher clock speed too.

So now we’re into somewhat uncharted territory as I can’t really find much evidence of people successfully taking these machines above 8MHz.

This time I’m installing a 20MHz crystal for a clock speed of 10MHz, putting it on par with IBM’s high end 286 PS/2 machines of the era.

The machine boots just fine and the CheckIt benchmark shows a 71% improvement over the stock speed, which is a pretty huge upgrade - if it works.

Unfortunately, although the benchmark is promising, Wolfenstein 3D just freezes up right at the title screen. I did discover that removing the AdLib card allowed the game to get much further - getting halfway through level 1 each time before freezing, so that’s quite interesting.

I wasn’t sure if this might be heat related as the CPU seemed very hot to the touch, and while active cooling wasn’t really a thing on 286 machines, I thought I’d at least humour myself and probe some things and see what the situation was. As it happens, under load the CPU is peaking at the same temperature - around 55 degrees C - whether at 6MHz or 10Mhz so I decided it probably wasn’t that.

I also probed some of the RAM chips, and it was the same situation there.

So, as this machine has 150ns RAM installed, I thought I’d go hunting for something faster, and as it happens, I had a box of old 30-pin SIMMs and thought that these rather smart looking 100ns Goldstar branded sticks would fit the bill.

Trouble is, they’re 1MB sticks and the machine refuses to boot - in fact it turns out it’s very fussy when it comes to the SIMMs it will accept, but I did happen to have these rather rustic looking 120ns sticks that worked. That’s 30ns quicker than what was in there originally, so hopefully they’ll at least prove a point.

…and prove a point they certainly did! Now Wolfenstein 3D is running great at 10MHz. Success!

Well, that is until I re-added the AdLib card and… The freeze-ups were back.

So I have this theory that the extra overhead of loading the AdLib music and sound effects is pushing us into that slower bank of RAM on the motherboard itself. I tried disabling this using the jumper and the command line switch for Wolf3D to skip the memory check, but the game won’t even start - which is probably to be expected.

Out of interest, I tried the 24MHz crystal to run the CPU at 12MHz, but it won’t even boot, even with that RAM disabled.

So the situation as it stands is that we have a nice reliable 8MHz machine - an impressive 30% improvement over stock - or a somewhat reliable 10MHz machine - provided we can keep whatever we’re doing in that lower, faster 512k bank of RAM.

But… Yeah.

[I feel the need - the need for speed!]

So, I’ve ordered some 100ns SIMMs, and matching 100ns chips for the motherboard RAM as well. Unfortunately at the time of recording, they haven’t arrived, so you’ll have to join me in part 3 to see how I get on with those.

There’s also a leaked internal use only IBM BIOS for this machine that removes the speed restriction as well as adding some other improvements, so I’m going to take a look at that as well, so I’m essentially building this into the kind of supercharged 5162 machine that IBM engineers were putting together for themselves and using internally in the late 80s.

And of course, as I’m sure you’ve noticed, I’ve still got those problems with interference on the graphics side of things which weren’t solved by using a modern PSU, so there’s that as well as the tantalum caps, the overall reassembly and everything else.

But I think that’s more than enough for this part, big thanks for watching and of course big thanks to my patrons and channel members whose names you see on screen as I speak, and I’ll hopefully see you in part 3.

Support the channel!
Patreon: https://www.patreon.com/ctrlaltrees
Become a Member: https://www.youtube.com/channel/UCe7aGwKsc40TYqDJfjggeKg/join
Ko-Fi: https://ko-fi.com/ctrlaltrees

Relevant Links:
IBM 5162 RAM Information: http://minuszerodegrees.net/5162/ram/5162_ram.htm
Tantalum Capacitors: http://minuszerodegrees.net/failure/failure%20-%203lt.htm
Overclocking the IBM 5162 / BIOS Information: https://www.retrocmp.de/ibm/5162/xt286.htm

Further Viewing:
Part 1: https://youtu.be/zWkYrhrdogQ
PC-SPRINT Overclock Tool For IBM 5150 XT: https://www.youtube.com/watch?v=8oWyogPZ7Bw

If you liked this video please consider subscribing to ctrl.alt.rees on YouTube!