Hacker News new | past | comments | ask | show | jobs | submit login
DOSBox-X: Free, cross-platform and complete DOS, Windows 3.x and 9x emulation (dosbox-x.com)
249 points by FlyMoreRockets 10 months ago | hide | past | favorite | 89 comments

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.

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.

If its an ISA card you can probably clone it yourself.

That's a hell of a lot more work than "install DOSBox".

How would you do that? Is this a thing now?

Yup, Home-Brew ISA Cards is a thing. There are people out there who have reverse engineered some to create clones, not only for ISA but for more modern buses too.

Does it have to be working to be reverse engineered?

Typically folks will go looking for these services after the device has failed :(

Seen someone recreate a Sound Blaster: https://news.ycombinator.com/item?id=25029727

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.

Love that approach!

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?

I did nearly the same but with FreeDOS, but it was a warehouse system with a IR Connection, so no emulation/cpu speed problems.

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.

Wouldn't it be easy to just rewrite the software if you leave the PLC?

That said, as long as it works...

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.

You must not be a programmer if you think it’s generally “easy” to “just rewrite the software”

For RS232 connected to a PLC I would assume it to be comparatively easy. Maybe it is not, but it is probably easier than for modern usb or network attached devices, since you can easily spy on transmitted data.

I would also assume that the PLC just gets some commands from the master.

Granted, these might be too many assumptions.

What are you going to do with just the transmitted data? That's just a tiny part of operations, when the machine is working correctly. What if something breaks? Do you know what all the possible error states are? What does the machine have to do if it gets an eg. "machine on fire" alert? Does your software even recognize the data sent by the machine, if it hasn't been sent before and correctly recognized?

Sniffing a protocol to reverse engineer stuff, is like trying to learn a new language by listening to conversations of a ground-level monitor and a crane operator.

You can download the program from a PLC that supplies the logic aside from labels and comments, if that isn't available anymore. Some PLC even supply the complete project, but that is unlikely on such an old device.

> Granted, these might be too many assumptions.


Modern USB/TCP connected PLCs just encapsulate RS-232 data into USB or TCP packets, nothing else (for backward compatibility). Also there are encapsulation and decapsulation devices which enables archaic PLCs and other industrial devices to be retrofitted to more modern systems.

Moreover, the OP noted that emulation speed was at critical importance so, the code is CPU speed sensitive. Missing specs, missing company, missing source plus time sensitivity makes this endeavor very risky if not hard.

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.

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.

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.

Yes! This is huge. I can finally play civ II without using wine, which was always a little wonky.

It’s quite remarkable Windows was compatible for so long!

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.

For a lot of those 16bit installers, WineVDM works wonders. https://github.com/otya128/winevdm It's not perfect compatibility for all 16bit programs but it does tend to work well enough at anything I've thrown at it.

At the very least, there's also the Definitive edition which plays great in Win 10. I've enjoyed playing that game again.

I just might dust off my windows-98 and visual-studio 6 CDs and write software like it's 1999.

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.

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.

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.

PCem is great but lacks serial/cross platform networking support

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.

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.

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)

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.


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.

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.

Anyone interested in this should also check out pcem, https://pcem-emulator.co.uk/ it's emulating the hardware rather than the interfaces.

Would be cool if they had emulated it in VHDL/Bluespec/Verilog, then you could run it on an FPGA.

There's work for that for the Mister system, https://github.com/MiSTer-devel/ao486_MiSTer

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.

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).

The ROMs are one Google search away, on a public Github.

Yeah, I don't doubt the ROMs can be found. It's nevertheless an additional step to take over just throwing DOSBox[-X] at the problem, though.

Still, an ambitious project.

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.

>>> 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 ;)


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.

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.

> 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.

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.

I’m tempted to install Win95/98 on it, run Borland Delphi 4 from 1998 on it, and develop a UI in fraction of the time and resources it takes on the Web.

The result will probably still run on modern Windows, too

That does not actually need DOSBox, it runs great with WINE: https://i.imgur.com/YgOw2Zc.png

Sorry for breaking HN conventions, but:

Oh My God

I'm tempted to install Turbo Pascal for a deep nostalgia trip. I grew up in a small-ish town in Appalachia, and when I ran out of math classes to take in high school I started learning to program. They had put together a little "computer lab" circa 1990 when cash was a little easier to come by for a public school, and hadn't updated them since.

It was 2004, and their intro programming course was still taught in Pascal. We hacked on a version of Turbo Pascal that might have dated to when the Soviet Union still existed, and I remember that cheery blue terminal interface fondly. It left me with an irrational life-long love of text-based interfaces.

It would be better to use NT4 or Windows 2000. Delphi had a habit of crashing hard under 9x whilst debugging and taking the OS with it. I used Delphi from 1 - 5 commercially and we never used 9x because the experience was a lot less usable. I did use maybe, Delphi 3 under Windows 98 at home, but it would never have been for anything important.

Thanks for the hint!

Lazarus is the modern alternative for Pascal coders

But I do not think it will run on Windows 98

It needs the Unicode APIs

That has crossed my mind actually, bring me back to my youth. Just seeing the screenshot of win98 on pcem gave me strong nostalgia.

I don't know why they don't provide a deb, but assuming all the build dependencies are installed, converting the rpm via Alien works fine.

Also, be aware if you are using your existing DOSBox directory: games that require installation might not work if installed via the original DOSBox.

> Also, be aware if you are using your existing DOSBox directory: games that require installation might not work if installed via the original DOSBox.

Why? I have installed them on bare metal aeons ago and only copied since then. All I had to change occasionally was sound card details.

It's probably rare, but I speak from experience (specifically with the game "Inherit the Earth: Quest for the Orb"). Installed with DOSBox, worked fine; when opened in DOSBox-X, graphics were all screwed up, and all the settings were set upon install, so I would have had to reinstall anyways. This was more than a year ago, so maybe it wouldn't happen today given how many new releases they have, but I don't feel like testing it out.

Still, great project, and I prefer it over the OG DOSBox.

It is great! But for running old Windows software, Windows 3.x/9x license is required, while no DOS is required for running DOS software.


Yes, dad.

I wonder if this FINALLY allows Discworld Noir to finally work again!

I'd never heard of Discworld Noir, but now I want nothing more!

Please ping back if you make progress in such a worthy endeavour.

3dfx emulation! Could play some of my old favorites with this!

Interesting. IIRC, at least some of those (Descent and Descent II) have source available.

GTA! :)

It was so impressive when I first installed a Voodoo 2 card and launched it to see insanely smooth graphics ╰(°▽°)╯

GTA 2 still has the best radio selection in the series.

Like KJAH and Funami FM’s Teriyaki-chan <3

That's insanely cool! I have never had a 3dfx card and only kept begging Santa with no luck when I was a kid. Finally, I can play the games which required it!

I still have my Voodoo2 card with me, with different processors on board. Albeit I have no PCI slots and VGA is not very favorable at modern resolutions.

I'm excited to play Need for Speed 2 SE & Carmageddon 2 actually.

If this let me play some games better I will be very impressed...

Some games still run poorly on DOSBox, despite it being games focused... and of course then there is Win98 games that are a pain, I wanted to play "Gangsters" but that game use a unholy mix of GDI + DirectDraw to draw UI elements and modern windows 'run' the game but freak out completely, getting confused on how to draw the UI.

I've found the Win9x support spotty at best. It hangs indefinitely when installing IE5 and the internet tools suite, for instance.

Nice. I mostly use DOSBox for my DOS games and ones that work with Windows 3.1(Civ 2, Sim City 2000, and Solitaire mostly), but it'll be nice to be able to do Window 9x stuff with 3D acceleration without having to break out the old Pentium II box.

There are already two threads on DOSBox-X posted on HN month and two month ago.[0]

[0] https://news.ycombinator.com/from?site=dosbox-x.com

Without any comments though. Given the interest here, seems like the community simply missed it, so a repost was beneficial. A month is OK amount of time to wait before posting.

My main recollection of DOS was never ending fiddling with autoexec.bat and config.sys to try and free up enough conventional memory to run some game... Does DosBox help emulate back all that nostalgic experience?

Unfortunately it gives you 632KB of conventional memory out of the box and this should be enough for everybody... But you can still load up some TSRs to recreate the experience.

What is the legal status and availability of 3.x and 9.x?

https://github.com/open-shell for classic windows look/feel

WARNING - it's much, much slower than DosBOX due to more accurate emulation. This means it won't run some games fast enough.

This looks promising.

My use case would be to use it on macOS-10.15 to run DOSsy apps, but it doesn't work: ‘The application “dosbox-x” can’t be opened’. No indication as to why exactly. The current original DOSBox does work, however. So, at least for that OS, the current verdict is: Mission failed. Maybe future releases will fix that? Why the devs put a clearly nonfunctional app up for download is beyond me.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact