Watch on YouTube:

1986 IBM 5162 XT 286 Upgrades - AdLib, XT-IDE, Networking and More! (Part 1)


The first episode of Wolfenstein 3D was released to the Software Creations BBS by id Software at 4AM on May 5th 1992. For its 30th anniversary, I thought I’d finally get around to restoring my IBM XT 286 (model number 5162) so I could enjoy the game on the very lowest spec machine it supports - just as many people (myself included) played this legendary DOS FPS back in the day!

Upgrades include an AdLib sound card, XT-IDE hard disk support and a network card.

Big thanks to RMC - The Cave for his voice acting skills in this one!


This is an IBM 5150, the very first DOS PC from 1981. In fact, this is my IBM 5150 - one of my absolute favourites in my collection - and it’s a machine I’ve covered on the channel a couple of times in the past.

That said the monitor recently blew up so look out for a repair video on that at some point. But this isn’t the PC that I want to look at in this video. You see, it’s the 5th of May 2022, and that means it’s the 30th anniversary of the release of Wolfenstein 3D today, and it’s a game I have a lot of history with - I actually played it when it was new and I was just 8 or 9 years old - and so I’ve decided that it’s about time I enjoyed it on period correct hardware once again just like I did way back in the early 90s, and the 5150 isn’t quite going to cut it.

So, enter the IBM 5162, a 6MHz 286 released in 1986. Now, the badge on the front may say XT, but this is indeed an AT class machine, in fact it’s basically an IBM 5170 in a 5150 style case, and that means that it has the 286 CPU that we need as a bare minimum to run Wolfenstein 3D - but first I need to check it still works and if it does, make some upgrades and quality of life improvements.

I must confess that I haven’t really done much with this since I got it, but I did fire it up a few years back and I know it all works fine, so I’ll save the full stripdown and refurb for the next video once I’ve proven that what I want to do will work as I’ll need to take the motherboard out for another upgrade that I have planned. More about that soon.

The 5162 came to me in an incredibly basic configuration with just the original MDA graphics card and IBM disk controller which handles the 360K 5.25” floppy drive and 20MB MFM hard drive. There are also a few gaps so I guess the seller didn’t want to part with whatever was occupying those slots which was a bit stingy considering what this thing cost but whatever, at least the RAM is maxed out at 640K - which as we know, is more than enough for anyone.

As my beloved 5153 monitor is out of action the first upgrade I’ll need to do is to add a VGA card so I can actually see what’s going on. It’s a minimum requirement for Wolfenstein 3D anyway, and my 5150 has EGA so I was planning on building this up as a VGA machine so that’s all worked out quite well.

So for starters this Trident TVGA9000C with 512K on board should be more than sufficient for the job - and as you’ve probably spotted, unlike the 5150 with its 8-bit slots, I have the luxury of 16-bit ISA slots in here and a lot more slots in general so I’m much less limited on the hardware that I can put in here.

Firing the machine up for the first time, we can see that obviously the BIOS settings have been lost, so I’ll replace the battery which is a big chunky external thing. It’s prompting me to run the SETUP utility, which I don’t have the disk for, and I don’t really have a convenient way of writing one either, although I do have a Greaseweazle on the way which should make life a lot easier in future.

Now the reason that we need that setup disk is because this early IBM BIOS doesn’t have any kind of built in user interface - there’s no pressing delete during boot or anything fancy like that. But even without the disk we can poke the relevant values into the correct places in memory using BASIC.

Yes, that’s correct, much like its predecessor, the 5162 has Microsoft BASIC built in, an interesting choice considering IBM already had their own version that shipped with their mainframes.

“Microsoft BASIC had hundreds of thousands of users around the world. How are you going to argue with that?”

OK, fair enough. Anyway, without any kind of bootable disk in the drive you’ll find yourself at said BASIC prompt - and as it happens, some incredibly helpful person has written a Windows utility that allows you to generate the required code based on the values of a few dropdowns, and actually, once you ignore the comments which of course don’t need to be typed in, you’re not looking at all that much typing at all.

So after a reboot, the machine finally knows that it has a hard drive installed and, although it makes all the right noises, sadly it doesn’t seem to want to boot. Booting from a floppy and trying to access the drive that way, I get the same noises, but again, running a DIR command on the disk just results in an error. I’d really like to check this drive out, so I’ll see what I can do with it in a future video but I’ll come up with another solution for now just to get everything up and running.

Anyway, now we know that the basics work - pardon the pun - another of my goals of this project is to have everything looking the part. I have a somewhat period correct VGA monitor - sadly they didn’t make a VGA version of their iconic 515x series of monitors and this one’s from a PS/2 system but it’s close enough - but one thing I don’t have is the correct keyboard.

You see, this originally would have shipped with either the iconic Model M, which shockingly I don’t actually own, or more appropriately, the incredibly rare AT version of the Model F that I have here. I could of course buy a Model M or use any other AT keyboard like I have been, but I thought hey - why not adapt this to work with that?

So I did some Googling and found some schematics and code for an XT to PS/2 adapter posted to the deskthority forums by a user called Engicoder back in 2015. Of course, PS/2 is electrically identical to AT, so it’s just a case of building the circuit on perfboard, programming the ATTINY microcontroller that converts the commands, and assembling it all neatly inside the keyboard.

In future I would like to modify this to make it switchable - perhaps even using a key combination - so I can use this keyboard with both machines without having to take it apart and unplug the adapter.

I did run into a few hiccups programming the ATTiny which basically just boiled down to inexperience, so if you’re attempting to put one of these together yourself and have somehow come across this video, I’ll just take a second to explain it here.

There are two parts to programming this chip - a flash part and an EPROM part, with the EPROM holding the scancode values for conversion, and the flash holding the actual executable code that does these conversions. You need to make sure that you use the correct file format - loading the .hex file in Intel Hex format into the flash part… and the .eep file, also in Intel Hex format - into the EPROM part.

Finally - and it took me far too long to work this out - you need to uncheck the CKDIV8=0 config value in the “Fuse Low Byte” section. My understanding is that this fuse determines the clock speed of the ATTiny, with the default 8MHz value being far too low for what we need - although amusingly it is still faster than the CPU in this PC.

So let’s boot this up and see if it works - and although we get a keyboard error, pressing F1 skips it and it all seems to be working great! I’m presuming the keyboard controller is expecting a specific response on first boot that the microcontroller isn’t sending, so that’s something that could definitely be looked into in future - but hey, it’s good enough for now. I’m not sure what the latency is like with this setup, but I’m guessing that’ll probably be the least of my concerns on a 6MHz machine.

Now, about that hard drive situation. My plan was to install an XT-IDE in this, which is a modern IDE interface designed for very low spec PCs. I use a variant of this in my 5150 with a CompactFlash adapter and it’s fantastic. I’ve also found a network card incredibly handy to have in that machine, so I thought this time around I’d kill 2 birds with one stone and buy a network card with a ROM socket and stick the XT-IDE chip in there.

I won’t go into the technical details of why this works, but in theory it should mean that I can now use a bog standard ISA IDE interface card to connect an IDE hard drive or, indeed in my case, an IDE to Compact Flash adapter.

But to cut a very long story short - and I’m talking literal days here - it didn’t work. The PC won’t even boot with a drive attached, and I think I finally narrowed it down to the interface card itself, but I decided to set it aside and borrow the XT-CF-Lite card from my 5150 just to get things up and running. It’s an 8 bit card so probably won’t be as fast as it could be, although to be fair it’s probably still a fair bit quicker than that MFM hard drive. It’s something I’d like to benchmark if and when I can get that working.

I decided I may as well clone the CompactFlash card with IBM PC DOS 2000 on it, which saved me a lot of time getting things up and running. I always recommend this OS for these older machines because it has all the modern features if you need them including Y2K compliance but an incredibly low memory footprint in its most basic configuration. Also being IBM, it’s entirely on brand.

Finally, one more thing that we need for that authentic 1992 Wolfenstein 3D experience is of course an AdLib sound card. Now, I don’t actually have an original, but I do have this Amstrad clone which must have come out of one of their early PCs, and it has an authentic Yamaha YM3812 onboard - also known as the legendary OPL2.

…and it’s detected by the game, so let’s get psyched!

As you can see, performance isn’t amazing - this is literally the absolute minimum system requirement for this game - and that’s something I’d like to address in the next video by upgrading the CPU which - actually, thanks to some interesting quirks of this machine, isn’t straightforward at all so should be interesting to investigate as well as telling the intriguing story all about why IBM made it so bloody difficult.

You can probably see from the captured footage that the video output is quite noisy and that’s not just a capture thing - it’s like that on an actual monitor as well. So I’ll see if I can take a look at the ripple situation with the PSU or maybe recap the graphics card if necessary.

I’d also like to get that XT-IDE and network card setup working so I can put the other one back where it rightfully belongs, and get this thing networked up so I can FTP files to and from it and connect to some bulletin boards, and maybe even get the original MFM hard drive up and running if I can.

On top of all that, a general cleanup and a bit of a service so hopefully it’ll keep chugging along for another 30+ years.

But for now I achieved my goal of playing Wolfenstein 3D on its 30th anniversary on original hardware and celebrating it in my own way. I’m sure there are plenty of fantastic videos out there today covering the history of this game and it’s certainly one that set me on a path of PC gaming and specifically first person shooters throughout the 90s and beyond.

So thankyou very much as always for watching, big thanks to my patrons and channel members whose names you see on the screen as I speak, and I’ll hopefully see you soon in part 2 where I hope to really get the best out of this PC.

Support the channel!
Become a Member:

Relevant Links:
IBM 5162 BASIC Setup Procedure:
Engicoder XT To AT Keyboard Adapter:

Further Viewing:
IBM 5150 With 7.16MHz Overclock, EGA & Ethernet - Show & Tell DOSCember:
PC-SPRINT - Overclocking The First PC With A DIY Open Source Hardware Solution From 1985! retrofair:

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