14

I am maintaining a large portion of legacy code, written in C. This code was initially written to be comiled against Windows 3 for Workgroups, and later a version for NT was created. This legacy application is still in use today, merrily running along on 3.11 and NT workstations from the early 90's. It works and it does what it is supposed to do, and the reason that they still live on is that the drivers for some of the custom hardware belonging to the solution are not compatible with later Windows.

There is also a different application i have maintained that for the same reasons only work on Win2k.

However, as things move on, it is getting increasingly hard to run these legacy environments. Right now i keep physical machines with the development software installed, so i can work on native hardware. But these may die at any time (they are 25 years old after all).

So my question is, seeing as it is 2016, what are my options for maintaining this archaic environement in a more stable way? Can you move a 3.11 to cloud hosting?

I tried virtualization, but due to the specialized nature of the setups, i could not get it to work with the device drivers, so i am thinking that one may need to make a full image of the OS as is and then run that in a VM to develop the software? Is such a thing possible for guest OS versions as old as Win3 and NT?

Are there any experience in keeping older platforms like these alive for development, but in a more modern, secure fashion, that i can draw from?

My goal is to get rid of the old physical machines, and move to virtualization.

  • Which VM software did you try? VMware? If not, give it a try, I have at least one piece of hardware for which I got thedrivers only working with that software, but no other VM software. – Doc Brown May 3 '16 at 10:37
  • Moreover: what will be the worst case scenario if the hardware dies tomorrow and you have no alternative so far? Will your company go bancrupt? – Doc Brown May 3 '16 at 10:38
  • I tried VMware and VirtualBox. Out of the two VirtualBox failed to load Win3 but managed to load NT4, but with no CD, resolution change or mouse support. VMWare loaded Win3 but also lacked drivers so screen was messed up. Right now i am messing with switching to emulation instead, trying out PCem. This works better but then i get no speed increase over old hardware and i lack VM stuff like sharing disks etc. – Richard Tyregrim May 3 '16 at 10:47
  • 3
    Honestly, when it gets hard to get spare parts, it is time to think about replacing the old stuff by a newer solution. At some point in time, keeping those old stuff alive becomes less economical than creating at least some parts newly. – Doc Brown May 3 '16 at 11:11
  • 1
    Where did you get drivers for the custom hardware? – JeffO May 3 '16 at 13:02
4

drivers for some of the custom hardware belonging to the solution are not compatible with later Windows

This is the crux of the matter. You can recompile your legacy C program with a newer Visual Studio, fix up all the compiler warnings and errors, and generally turn an old system into an identical one that runs on Windows 7 (or later if you must) but if the drivers do not work then the chances of it working even virtualized is slim.

Unless you can get the drivers/hardware updated or replaced,I wouldn't start to consider it.

  • Thank you for replying. I was thinking that there may be a VM or emulation option available that would resemble the actual HW used on the Win3-machines, so that i may use that to install the custom device drivers in that environment, and hook up the devices, so for all intents and purposes it looks like it's running on legacy hardware. Also, on the recompile, like i said, the code uses quite extensive amounts of low level calls to the Win API as well as some nasty poking in internal structs. So i guess that would break in Win7 desktop model, although i haven't tried to port it outright. – Richard Tyregrim May 3 '16 at 10:38
  • 2
    You ought to try a quick port attempt, simply to see how much of it is difficult to deal with - in my experience, ancient code tends to port to new Windows OSes surprisingly easily with only a few things that are truly obsoleted. – gbjbaanb May 3 '16 at 12:13
4

I think this is more of an issue about getting virtualbox or vmware to provide access to the hosts serial port than it is about virtualization OS or even the guest OS. I would start with a host system running a modern OS (win 7/8/10 or Linux distro) with a USB to serial port adapter that is based on a real rs-232 implementation, such as the prolific pl2303.

Use a modern OS as the host, install virtualbox, and create a guest VM and install whatever OS is compatible. The key is getting the RS-232 port on the guest OS passed to the guest VM. Use a null modem and terminal program to ensure the RS-232 port is working on the local host OS.

If the host is Linux there are some permissions needed in order to virtualize local hardware, and in most cases putting your login account into the vboxusers group will take care of that.

2

It's a management decision. Your management should be in a position to determine how much money they are making by supporting Windows 3.11. If they have any brains they will realise that customers who complain if you don't support them for free don't actually make you money. You can support them by telling them what the cost of supporting an old version is. Not just in terms of actual work, but also in terms of not being able to use newer technologies.

The very latest time when you should supporting a machine is when you can't buy replacements on eBay.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.