# FreeBSD and DOS emulation



## PaddyMac (Jan 5, 2020)

At one point in time, FreeBSD had DOS emulation included as a feature. I'm not sure exactly when that was lost. I think the doscmd port failed to compile beginning with FreeBSD 10. In any case, the loss of this functionality is really a terrible loss for FreeBSD. I know some will say that DOSBox works on FreeBSD. This is true, and it's fine if you just want to play games. Unfortunately it does lack some important features like file-locking support which is needed for any DOS software with multiuser support. And unfotunately Bhyve doesn't support DOS. If it did, that *might* be a viable option.

Personally, I'd like to run BBS software and run some old DOS door games on FreeBSD. I run FreeBSD on my server. I *could* run a Linux installation under Bhyve on FreeBSD and use DOSEmu or DOSEmu2 for DOS emulation of old door games. And I probably will end up doing that for the time being since that seems to be the only viable solution at this time. I used to run a BBS under Linux and used DOSEmu, so I could probably just migrate my setup to a Linux VM and get it up and running.

But that's not really what I *want*. I'd like a native solution. Perhaps the old doscmd functionality could be resurrected. But that's likely to be substandard since it's so old. The DOSEmu2 project ( https://github.com/stsp/dosemu2 ) is a really good prospect. It's currently Linux-focused, but from what I understand, it has been ported to MacOS X. If that has been accomplished, surely it could be accomplished for FreeBSD. The lead developer of DOSEmu2 is open to FreeBSD support but simply isn't skilled with FreeBSD development. I've tinkered with it myself, but my programming knowledge is limited. I simply don't know enough.
I'd like to ask any FreeBSD users with interest in DOS support to interact with the DOSEmu2 project. Please contribute and cooperate. Surely we can get this working on FreeBSD.


----------



## kpedersen (Jan 5, 2020)

Yes, as mentioned DOSBox is possibly the most "native" we have since you can share the native filesystem. If you need locking, possibly mount a disk image (i.e as E:\).

Other than that; we have VirtualBox which has pretty good DOS support but again not native.

Finally, you might get away with our Linux compatibility layer (i.e in a Jail) and the DOSEmu2. Yes, it is a little inelegant going through two compatibility layers but it would yield something that feels native.


----------



## SirDice (Jan 6, 2020)

PaddyMac said:


> FreeBSD had DOS emulation included as a feature.


FreeBSD never had that _feature_. Ports are third party applications, not features. Semantics, I know, but it's an important distinction. 



PaddyMac said:


> I think the doscmd port failed to compile beginning with FreeBSD 10. In any case, the loss of this functionality is really a terrible loss for FreeBSD.


Development on doscmd stopped almost 10 years ago, the project has been dead since. It's not a FreeBSD issue if the upstream project dies.


----------



## tommiie (Jan 8, 2020)

PaddyMac said:


> But that's likely to be substandard since it's so old.


Everything related to DOS is "so old."


----------



## Yampress (Jan 8, 2020)

Tray dosbox





						FreshPorts -- emulators/dosbox: Emulator of a PC with DOS
					

DOSBox is an emulator of a PC with DOS. The main focus of this project is emulating old DOS games using the local file system for files.  Currently emulated is:  o CPU:286/386 realmode/pmode o GFX:VGA/EGS/CGA/SVGA/VESA o SND:PC-Speaker/Tandy 3-Voice/Adlib/SoundBlaster o MSC:Keyboard/Mouse o...




					www.freshports.org
				




I used it under Linux and Windows 7 and it works great


----------



## SirDice (Jan 8, 2020)

Yampress said:


> Tray dosbox





PaddyMac said:


> I know some will say that DOSBox works on FreeBSD. This is true, and it's fine if you just want to play games. Unfortunately it does lack some important features like file-locking support which is needed for any DOS software with multiuser support.


----------



## rowan194 (Jan 25, 2021)

Sorry for the necrobump, but I'm also missing doscmd.

In particular, it was really nice to be able to run text applications from the FreeBSD commandline (or, in my case, on a web server)

Is there any current equivalent that is similarly integrated, which doesn't require setting up virtual HDs, BIOS ROMs etc? Something simple that runs from a CLI.


----------



## Snurg (Jan 25, 2021)

Question...
Aren't these old ports archived somewhere in the files for all those historic FreeBSD versions, so people who don't care about the unmaintained status can download and build themselves?


----------



## SirDice (Jan 25, 2021)

emulators/doscmd was removed because it was marked as BROKEN: `BROKEN: does not build (accesses field of opaque structure)`.


----------

