Readit News logoReadit News
drblah · 5 years ago
I have a fun anecdote involving DOSBox.

Back in 2012 I worked at a large manufacturing company. They had an old IBM PC running IBM DOS which controlled a vital system at the beginning of their production line. This machine had been chucking along since 1992 and now someone high up had been made aware that it could be a potential risk if this machine stopped working. It was therefore decided that this PC should be replaced/upgrade if possible.

After investigating I learned it communicated with a PLC through the RS-232 interface and ran some special sauce software from a company that stopped existing in 1995. Previous upgrade attempts involved virtualization, but that did not work since the program ran too quickly on modern hardware.

My solution was to copy everything from the old HDD to a new computer, install DOSBox and configure the serial port. The first few attempts caused some sirens and alarms to go off in the building, which was "exiting", but after fiddling with the emulation speed I managed to get it to work.

To this day, unless something drastic has changed, a billion $ company is running DOSBox in production (and I literally mean production).

Also, a side note. The old PC was still connected to a modem with a dedicated phone line. At some point it had been remotely operated through some kind of Norton remote control software. I made sure to turn off the modem and did not bring it over to the new DOSBox setup. Imagine if someone had war dialed into the machine... They could have caused a major disturbance and potentially started a fire.

walrus01 · 5 years ago
Where you got very lucky was that the plc or other weird industrial system was controlled over rs232, and not from a manufacturer proprietary 8 or 16-bit ISA interface card that comes with device drivers to load in config.sys, and requires direct memory access. Can only run on bare metal. Yes there's vendors for industrial motherboards you can buy brand new with ISA buses on them...

And that's before you deal with the rarity of an interface card that's literally impossible to purchase at any price today, so you better hope someone has saved spares.

cecja · 5 years ago
If its an ISA card you can probably clone it yourself.
slim · 5 years ago
on the same vein, in 2008 we have been contracted by a pharma distribution company to replace it's legacy ERP which worked only with DOS. To prove the new ERP is working we had to reproduce the reports from the legacy system bug for bug with the exact same numbers. On my linux workstation, I installed dosbox, a copy of their software and database, and made scripts that exported the data by printing the screen then compared the old and new reports. I did that till I got the reports right. proper TDD.
Hackbraten · 5 years ago
Love that approach!
beckyb · 5 years ago
There's some particulars in your story that sound awfully familiar- I think I might have been involved with the original installation. Was this company in New Jersey by any chance?
nix23 · 5 years ago
I did nearly the same but with FreeDOS, but it was a warehouse system with a IR Connection, so no emulation/cpu speed problems.
protomyth · 5 years ago
We had a Windows 95 machine running our boiler. I was about to go your route, but luckily, we got together the money to put in a modern control system. I was understandably a bit worried when the age of the machine was greater than many of our students. Also, dust and old hard drives are not good for the blood pressure.
raxxorrax · 5 years ago
Wouldn't it be easy to just rewrite the software if you leave the PLC?

That said, as long as it works...

drblah · 5 years ago
Sure! Almost anything would have been a better solution. However, no one knew how the system actually worked, and we were on a shoestring budget.

See, the situation was that IT management, who officially had the responsibility for the PC saw it as a risk because we in IT were unable to do anything if the system died. But the production line management, who had to pay for the upgrade, saw no reason to do it because it was "working fine!".

Sure it was working fine, and had been for almost 20 years. But WHEN it would inevitably give up the ghost they would be completely hosed.

loloquwowndueo · 5 years ago
You must not be a programmer if you think it’s generally “easy” to “just rewrite the software”
dspillett · 5 years ago
It might be easy if they had a detailed (and accurate) spec to work to, a good test environment that mimics the current production one sufficiently, and time/money for the required dev/devtest/qa cycles. It sounds like they had none of the above.
ejj28 · 5 years ago
Really excited for Windows 9x emulation, I have an elderly relative who still plays the first Age of Empires, and a few years ago when they upgraded to Windows 10 the game stopped working and they had to wait for and buy the remastered version.
snake_plissken · 5 years ago
Mechwarrior 3 is another game that needs a Windows 9x. I can never get it working in VM Player, excited to try it out on this.

Deleted Comment

wing-_-nuts · 5 years ago
Yes! This is huge. I can finally play civ II without using wine, which was always a little wonky.
schuke · 5 years ago
It’s quite remarkable Windows was compatible for so long!
Nition · 5 years ago
It's amazing really. I was playing the original Theme Hospital (1997) just yesterday on Windows 10 with no issues[1].

[1] Okay a couple of issues. It needs compatibility mode for the colours to look right. But that option is built into Windows so I don't really consider that a failure of compatibility. And the installer is 16-bit and won't run on 64-bit windows. But some years ago I made a copy of it after install and the actual installed game is 32-bit and runs fine.

beefok · 5 years ago
At the very least, there's also the Definitive edition which plays great in Win 10. I've enjoyed playing that game again.
aidenn0 · 5 years ago
I just might dust off my windows-98 and visual-studio 6 CDs and write software like it's 1999.
steerablesafe · 5 years ago
A question I don't see in the FAQ: why the fork?

Although I already see that it has a ton of features on top of the features of DOSBox, and their scopes differ quite a bit.

TonyTrapp · 5 years ago
In addition to what has already been said, DOSBox has a strong focus on games and quite often they decide to not fix something unless it directly impacts a game. Many people were not happy with this, because it would mean that trivial (and also not so trivial) fixes to make some demos, trackers or business software run were never applied. In particular they refuse any patches for the latter (probably scared of possible liablity).

Edit: Vanilla DOSBox is also unlikely to add support for more hardware (e.g. MMX or early 3D accelerators) because they don't want to maintain it and it won't be needed by most games.

sumtechguy · 5 years ago
In my head I am thinking one of these dosbox branches is also pulling it up to C++17 or something like that, and the main team has no interest in that really. The eXo project has been using about 6 different branches of dosbox depending on the game for particular features. Mostly they use the main branch but for some bits the game just does not work in all modes. Now that PCem has VHD support I could see them ditching dosbox all together (unlikely). But they will probably not use dosbox for 9x games due to size.
AnIdiotOnTheNet · 5 years ago
A while back I had to compile my own version of DOSBox because the official version doesn't call glClear() when swapping buffers. The issue tracker had a multi-year-old bug report about it, but the developers insisted that the driver was bad despite the OpenGL specifications stating quite clearly that one cannot assume a buffer hasn't been modified when using SwapBuffers and must clear it.

So it really comes as no surprise to me that there are actually many DOSBox forks.

wiz21c · 5 years ago
IIRC it's because DosBox doesn't progress much (well, TBH, they don't release much, but their svn is quite active)

DosBox-X may also be better at some timing critical stuff such as demo's.

wiz21c · 5 years ago
I confirm that DosBox-X runs Imphobia disk magazine which is doing some very accurate vsync timing (basically switching color palettes several times during the screen refresh to display 48 colours on a 16 colours EGA display)
kelchqvjpnfasjl · 5 years ago
From their repo:

DOSBox-X is a cross-platform DOS emulator based on the DOSBox project (www.dosbox.com).

Like DOSBox, it emulates a PC necessary for running many MS-DOS games and applications that simply cannot be run on modern PCs and operating systems. However, while the main focus of DOSBox is for running DOS games, DOSBox-X goes much further than this. Started as a fork of the DOSBox project, it retains compatibility with the wide base of DOS games and DOS gaming DOSBox was designed for. But it is also a platform for running DOS applications, including emulating the environments to run Windows 3.x, 9x and ME and software written for those versions of Windows.

https://github.com/joncampbell123/dosbox-x

Deleted Comment

aasasd · 5 years ago
Derailing the thread to the topic of Dosbox in general (as is tradition): on Android, ‘Magic Dosbox’ works quite nicely thanks to the feature of adding custom widgets on the screen, for keyboard or mouse keys and, in the paid version, combos. The app is freemium, but it's pretty cool and cheap so personally I'm not even bothered.

Also, Retroarch has a Dosbox core, and Retroarch with some cores works on the PS Vita handheld console, and as a result there's Dosbox on Vita. However, it's said to be quite a pain to set up for a particular game, with text configs. For jailbroken-PSP owners, Dosbox is apparently ported as a homebrew app. I'm vaguely looking forward to trying System Shock on Vita, but with my luck I'm not holding my breath.

0134340 · 5 years ago
Dosbox also runs on Xbox One via Retroarch. So in essence the Xbox can be a retro Windows gaming machine as well. PCem also has a very primitive core. If only Dosbox-X had a core we could run Windows on Xbox which is still possible, I think, using Dosbox or PCem.
simcop2387 · 5 years ago
Anyone interested in this should also check out pcem, https://pcem-emulator.co.uk/ it's emulating the hardware rather than the interfaces.
iso8859-1 · 5 years ago
Would be cool if they had emulated it in VHDL/Bluespec/Verilog, then you could run it on an FPGA.
simcop2387 · 5 years ago
There's work for that for the Mister system, https://github.com/MiSTer-devel/ao486_MiSTer
shimonabi · 5 years ago
I've been playing with PCem on Linux the last week. You must enable network with a parameter when compiling!

I can emulate Windows 98SE on a Pentium 133 MHz with my 2500U AMD Ryzen laptop. It's convenient, since you can copy your DOS games on the machine over the network.

I successfully installed the 3dfx Voodoo 2 driver and the games run just fine.

Delk · 5 years ago
Sounds interesting; I hadn't heard of PCem before. Does it always require a BIOS image from an original computer, though? Or are those just for some potential machine-specific functionality or something? The table of emulated systems lists ROM image file names, yet no ROM images are included (of course, as they're under copyright and proprietary).
shimonabi · 5 years ago
The ROMs are one Google search away, on a public Github.
mysterydip · 5 years ago
Between DOSBox (and its various forks) and PCem, it's a great time for retro gaming/app playing and development!

I wonder if the games of today will ever get the kind of aftermarket support that the DOS era has, given DRM and OS hooks and the like. It seems companies would rather games today be disposable and incompatible tomorrow so you can either buy the sequel or re-buy the game again on the next platform.

ArtWomb · 5 years ago
>>> it's a great time for retro gaming/app playing and development

It's amazing. The combination of consumer SoC boards, next gen emulation, 3D printing and AI techniques like super-resolution are generating not just archival efforts, but active development. I just love that there is a very active market for RetroPie kits ;)

https://www.experimentalpi.com/Retro-Arcade_c_12.html

jbarrs · 5 years ago
I feel like emulation will always be catching up with the latest systems, though running some modern AAA game in a virtual machine would probably need a super beefy PC (though we could probably expect that to be available by the time that becomes necessary). Hopefully then a virtual machine can satisfy the DRM.

However, I do worry about games (or, in some cases, the DRM on some games) that require the player always be online. If the game or DRM servers are taken down in the future and the developer doesn't release a patch to remove the always online requirement, the game could end up being unplayable. If it's popular enough, people may reverse-engineer third party servers, but this can present more challenges, e.g. getting SSL certificates from a CA your device trusts; on a PC you could manually trust the certificate, but on a console you likely don't have that option.

grishka · 5 years ago
Oh, modern consoles and their push for digital distribution combined with effectively unbreakable DRM. Some games are available on physical media, but some are not. Good luck preserving those that are not when those servers go down.
Narishma · 5 years ago
> It seems companies would rather games today be disposable and incompatible tomorrow so you can either buy the sequel or re-buy the game again on the next platform.

It's not like back then companies were any different.

refracture · 5 years ago
I installed Windows 95 and 98se in DOSBox-X, it's pretty neat. Unfortunately my main motivation, an old Windows game called The Divide: Enemies Within runs poorly, either with software mode or using the emulated voodoo. On vintage hardware I could run the game at 320x240 with a good frame rate on a Pentium 100 mhz, but this setup doesn't allow anything lower than 640x480. Sigh..

In anycase this is a great project, and it's nice to be able to run Windows 9x in dosbox, something standard dosbox did not do reliably.