Use an IBM 5170 without a battery

I got tired of my IBM 5170 PC/AT draining batteries every few months. And unlike newer PCs, operating an IBM 5170 without a battery isn’t just a matter of taking the battery out, leaving it out, and relying on the BIOS to auto configure with sensible defaults. The BIOS in the 5170 wasn’t that advanced. But if you are willing to compromise on one thing, you can use a 5170 without a battery while retaining the IBM BIOS and ROM Basic so it still feels like using an IBM.

The battery

IBM 5170 PC/AT
Making 1-2 compromises involving period correctness makes it possible to use an IBM 5170 without a battery.

I’ve talked before about making a battery pack for an IBM 5170. But I’ve found the batteries don’t last nearly as long as I would like. So I went looking for a solution, and I found one that works well for me. It might work well for you as too.

The XT IDE compromise

The compromise involves putting an IDE controller and XTIDE ROM in the 5170. This combination may be a little too modern for some tastes, because it doesn’t necessarily look vintage. But because the XT IDE ROM intercepts the boot process and auto detects the drive attached to it, a 5170 with XTIDE can boot from an IDE device even if the CMOS is completely garbled.

This means the 5170 can boot an operating system, and we can use that to our advantage.

The IBM 5170 Basic setup program

A Basic program exists to configure the 5170 BIOS using the built-in basic ROM. This program is intended to let you configure a hard drive and the other settings you need even if you don’t have a functioning floppy drive that can boot the original setup disk. You can generate that program using the process here.

For the purposes of this exercise, you’ll specify no hard drive in the CMOS, since the XTIDE is handling that.

What I did next was take that program and instead of typing it in to IBM Cassette Basic, I entered it into Microsoft Quick Basic and compiled it into an executable file.

The resulting executable isn’t the most efficient thing in the world. But it does the job. What I did was put the resulting binary in my system path, and then use a DOS boot menu to add a menu option to run it.

If you don’t want to bother with Quick Basic, you can run the file with QBASIC, included with DOS versions 5 and 6. Use the command QBASIC /RUN [filename] to run it.

The revised setup process

So now, when I go to use my 5170, when I first boot it up, I choose the option from the boot menu to configure the CMOS. Then I reboot. Now I have a functioning system, except the date and time will be incorrect. If I care about that, I can either run the DATE and TIME commands, or use MTCP’s SNTP client to set the date and time over the network, using an NE2000 network card I installed.

In a nutshell, that’s how I run my IBM 5170 without a battery. While it adds an extra step, I find it more convenient than having to change the batteries and set things up again every few months.

Alternative approaches

Another approach would be to desolder the RTC and replace it with a modern Dallas RTC replacement that is more efficient and doesn’t power as much of the system with the RTC battery. Some 5170 owners did this modification successfully.

For someone with the right tools and skills, that option is less hacky. But at this point in time, that doesn’t describe me.

And if you wanted to do something similar but with hardware a little closer in age to the 5170, you could probably use an Adaptec 1542 card along with a SCSI drive or blue SCSI to get a similar effect, with the caveat I haven’t tested that myself. I’m happy enough using an IDE interface with a compact flash card and XT-IDE ROM in an NE2000 clone card.

If you found this post informative or helpful, please share it!