top | item 30127615

How FreeDOS Grew Up and Became a Modern DOS (2021)

230 points| ingve | 4 years ago |cloudsavvyit.com | reply

145 comments

order
[+] krylon|4 years ago|reply
I am a bit fuzzy on the details, but I think I recall Microsoft charging OEMs for selling devices without an OS installed. So some vendors have gotten into the habit of selling devices with FreeDOS preinstalled.

One of my laptops came with FreeDOS preinstalled, and it was about € 50,- cheaper than the version with Windows. Being a Linux person, I gladly took the discount.

I did run into a use case where FreeDOS was insufficient, though - in my last job, our automation people were maintaining an industrial plant whose SCADA software ran on DOS. I have no clue what they did, but apparently it would only run well on MS-DOS. One of our engineers suspected that timing issues regarding the serial port played a role, but in the end, we never found out. I installed MS-DOS 6.22 on two machines, and that was the end of it.

I got a kick out of it, though. Imagine installing an early 1990s OS on late 1990s hardware in ~2016.

[+] VLM|4 years ago|reply
Interrupt latency.

On dos you own the machine down to bare metal for better or worse, usually worse, but software only slows things down.

I suspect if you stuck a protocol analyzer on it you'll find one of three situations:

Someone did simplistic polling instead of a windowing protocol so increased latency makes the overall system unusably slow. 0.1 ms vs 10 ms per handshake is not noticeable to humans but if your scada sequentially polls 10000 parameters thats the difference between a poll taking 1 second or about two minutes...

The other scenario is keep alive signaling where the computer needs to assure the CNC machine that its still alive and sane every 10 ms or the controller initiates an emergency shutdown. Can't have a giant lathe or printing press running off wild not under active computer control. So windows wants to multitask and do who knows what for 50 ms, and the scada shuts down.

The final situation is they're doing something "weird" at the hardware level like signaling over the control pins instead of over the serial ports. Like toggling the RS-232 DSR pin turns on the milling machine motor for 10 ms instead of sending a serial RX/TX power command every 10 ms. Windows opinion of DSR, IIRC, is DSR means the serial port driver registered in windows and is not available to end users. Been a long time since I've had to deal with that so I might misremember.

[+] abrowne|4 years ago|reply
My understanding is that it's more a way to sell a computer for people who don't want a bundled OS, but without it really having no OS. This way the new computer will at least start up to something instead of an error message that can potentially imply storage failure.

Edit: Especially since some of these purchasers are not technically-minded Linux users, who can handle a blank disk error, but people who want to use their (ahem) specially-aquired Windows licenses.

My current home computer is an HP EliteBook I custom ordered with FreeDOS to install Linux on. (Also got the matte touchscreen!)

[+] rgacote|4 years ago|reply
Worked at an OEM and Microsoft charged a license fee for every processor out the door regardless of whether the system had DOS, Novell, or nothing at all installed.
[+] bityard|4 years ago|reply
You could be right, but my likewise fuzzy recollection was that the contract that OEMs had with MS said that every PC that was sold had to have an OS on it. Because the implication was that a PC sold without an OS was likely to have a pirated version of windows installed by an end user. The contract didn't say that it had to have a Microsoft OS because they were a little leery of anti-trust accusations at the time. Very few OEMs used the FreeDOS loophole because they would go out of business if MS decided to pull the OEM contract.
[+] grishka|4 years ago|reply
I've heard an explanation that they sell laptops with FreeDOS because in some places it's illegal to sell a preassembled computer with no OS. The expectation is that, yes, you would wipe it and install Linux, because most of the hardware in the thing doesn't even have DOS drivers.

Some OEMs don't sell laptops with DOS, but instead have a procedure where you can "return" the Windows license that came with it and get a refund.

[+] lloydatkinson|4 years ago|reply
How is it possible for them to charge them for not having an OS at all?
[+] WalterBright|4 years ago|reply
The Digital Mars C/C++ compiler still supports DOS in all memory models, including 32 bit DOS extender, and it's free:

https://www.digitalmars.com

[+] mwcampbell|4 years ago|reply
I followed the link for the X32VM DOS extender, and landed at one of those generic domain squatter pages.

Anyway, the Digital Mars C/C++ compiler looks impressive.

[+] hakfoo|4 years ago|reply
What's interesting is that it seems to still be much less performant on very small systems than "commercial DOS".

I have a kit-built machine with an 8MHz 8088-class CPU, and FreeDOS is much slower to boot than PC DOS 2000 (the final mainstream MS/PC DOS release). When I used it years ago on 486-class machines (distraction0-free laptops) the gap didn't seem so wide.

Pity DR-DOS seems to have disappeared into the ether. It was a competent choice to, and I know there was a point where you could get a source distribution for embedded purposes, so you'd expect that the next logical step would have been crowdfunding a source buyout.

[+] Teknoman117|4 years ago|reply
I'm not all that surprised by freedos booting slower actually. It tends to be significantly more feature rich than the DOSes of the day, and as a result tends to be quite heavy for the 16-bit machines.

My main wish for it would be serial console support. I have "old" industrial boards (386EX, 512K of non-expandable RAM, 8-bit bus, but made in '02). It has a BIOS and an in-ROM variant of DOS by a company called General Software. It has no built-in video hardware and uses a serial console by default.

[+] billforsternz|4 years ago|reply
Just speculating, but I think the reason for this is that MS-DOS was originally written on 4.77Mhz 8088 machines, both the OS itself and the core utilities, in assembly language. I know from my own experience that it's actually a perfectly fine platform, and you can write performant software that does simple things well. But if you take software written 15-20 years later, on much much faster 386/486/Pentium class machines in C and put it on those early boxes... Well, it's unsurprising it's not going to be performant on 8088s unless that was a specific goal that would absorb a lot of special effort.
[+] lproven|4 years ago|reply
> PC DOS 2000 (the final mainstream MS/PC DOS release).

FSVO "mainstream". IBM released PC DOS 7.1 (with full FAT32 and LBA support) as a free download as part of its Server Guide Scripting Toolkit.

It can readily be combined with the rest of PC DOS 2000 to yield a complete OS, comparable to "MS-DOS 7.1" extracted from Win98SE.

I have described how to do this on my blog:

https://liam-on-linux.livejournal.com/59703.html

> Pity DR-DOS seems to have disappeared into the ether.

It is still around, but Udo Kuhnt has, sadly, given up the Enhanced DR OpenDOS project.

The boot floppies on archiveos.org are defective. I have fixed them, and posted disk images of them on my blog, too.

https://liam-on-linux.livejournal.com/58013.html

> It was a competent choice to, and I know there was a point where you could get a

> source distribution for embedded purposes, so you'd expect that the next logical step

> would have been crowdfunding a source buyout.

Strongly agreed. :-/

[+] HeckFeck|4 years ago|reply
> I have a kit-built machine with an 8MHz 8088-class CPU

Would you mind sharing details? I am curious. Is this a modern kit made from mostly new parts that is available to purchase?

[+] anthk|4 years ago|reply
Vanilla FreeDOS loads up too much stuff. You can strip it a lot.

Google/DDG some FreeDOS distros for 8086, which are many times slimmer than the former FreeDOS.

https://svardos.osdn.io/

Have fun.

[+] marcodiego|4 years ago|reply
Boot time is not a good measure of performance.
[+] bitigchi|4 years ago|reply
You can open a bug report or post your findings to the mailing list.
[+] WalterBright|4 years ago|reply
I still use an older machine to test the Digital Mars C/C++ compiler, as current Windows will no longer run DOS executables.

So this is pretty annoying. But as far as I can tell, FreeDOS does too much, it creates a dos environment in a separate window. What I'd like is:

  dosbox app arguments...
where dosbox emulates DOS just enough to run console apps. This would enable me to test the compiler conventionally.

So, what's needed is an 8086 emulator and a minimal DOS emulator. Is there a way to use FreeDOS like that?

[+] oldetimer|4 years ago|reply
FreeDOS is impressive. Had the occasion to use it after I ran DBAN on an old computer before sending it to a recycling shop. FreeDOS was even able to run the driver needed for the non-standard CDROM. It also is small enough to boot from a 3.5" floppy. It was a real trip down memory lane when software was a lot simpler - yet felt more substantial.
[+] teddyh|4 years ago|reply
The article mentions FreeDOS 1.3 RC4, but the article was written in July 2021, and 1.3 RC5 was released a few months later, in December:

https://freedos.org/download/

Bullet points, quoted from the above page:

New FreeCOM 0.85a

New Kernel 2043 and an 8086 version with FAT32 support

Floppy Edition now uses compression and requires about half as many diskettes

The return of networking

Some new programs and games

Many many many package updates

Some updates and improvements to NLS

Improved install process, especially with the MBR

Some support to automatically set the COUNTRY.SYS information

Improved CD initialization for the boot media and installed system

… and much, much more!

[+] AtlasBarfed|4 years ago|reply
It has been a long time since I looked at FreeDOS. When in it's nascent days I tried to get it running for some old DOS Games and couldn't get it to work. It may be a lot better now.

FreeDOS's main problem is that DOSBox can run almost everything in a modern OS backdrop. DOSBox CAN run windows 3.1 as well, and I believe Windows 95. And you can drop out of it to a modern networked OS whenever you need to. Sure it's less efficient, but there's now 100x (maybe 1000x) more power in the CPU.

For FreeDOS to really achieve its goals it likely needs several things:

1) works in a VM (which it appears to do)

2) runs almost all DOS software in a VM, this involves drivers that would enable long term VM compatibility. Do VMs have a "general networking driver" and "general video driver".

3) provide utilities for networking

4) ... this is the hard one:

FreeDOS would need to curate, collect, and provide collections of old DOS software with modern-friendly installers. The challenge here is legality and copyright.

Collections of WordPerfect / etc

Collections of the compilers / interpreters (Turbo Pascal, Turbo C++)

There are ongoing significant work in preserving Games with eXoDOS, but it's noteworthy that eXoDOS and eXoWIN (the 3.X windows preservation project) don't seem to use freedos at all.

As stated, DOSBox handles most DOS software. But one of the biggest emulation/preservation blind spots right now is the Windows 3.1 --> Windows 98 non-NT kernel software that was semi-DOS and semi-not. The programs could run roughshod on the memory space and APIs, but bridged to the gigahertz era of x86 CPUs. And x86 CPUs are a bear to emulate between all the modes and ISA extensions over the years.

[+] zamadatix|4 years ago|reply
For 2) hypervisors usually have compatibility with select older devices such as the E1000 network adapter (and other older ones even) enabling older systems to interface without needing anything special for virtualization on older guests. There is also of course nothing preventing folks from continuing to add drivers for newer/more efficient virtual adapters, after all they already wrote the OS and the virtual adapters have open source implementations to base off of. Between the two of these methods drivers are pretty well covered as is.

3) is already part of the FreeDOS installer.

4) Is best left to some other project(s) both from a scope perspective as well as the legal perspective you mention. Particularly for modernizing the installers. DOS software collections are quite easy to come by, particularly with organizations like Internet Archive.

[+] rnd0|4 years ago|reply
DOSBox-X can run anything up to 98, I think; not sure about ME. It also runs across multiple operating systems (it's even in NetBSD's pkgsrc).

For number 2, "it depends"; qemu, vmware, etc all have different features. An alternative is to use something like 86Box (https://github.com/86Box/86Box/) which can present the OS with a complete DOS-era computer with video and other peripherals.

For number 3; I think there's a networking set in the freedos distribution. I have no idea how robust it is, though.

Number four -why? Unless I'm very wrong, the aim of freedos isn't to preserve the dos software landscape but to ensure that there's an ms-dos compatible operating system out there if people want to use it. Also, winworldpc has a fair amount of dos software as does archive.org as I remember.

>As stated, DOSBox handles most DOS software. But one of the biggest emulation/preservation blind spots right now is the Windows 3.1 --> Windows 98 non-NT kernel software that was semi-DOS and semi-not.

The software is largely still out there, and 86box covers the emulation. The real blind spot is the early 00's hole where computers were too complex to emulate well but things are just slightly incompatible with modern operating systems.

[+] yjftsjthsd-h|4 years ago|reply
> 2) runs almost all DOS software in a VM, this involves drivers that would enable long term VM compatibility. Do VMs have a "general networking driver" and "general video driver".

For network, you probably want VirtIO. For video, just VESA? Although honestly I don't know that that's needed; VMs can just provide emulated devices for which drivers already exist.

[+] paulryanrogers|4 years ago|reply
> FreeDOS's main problem is that DOSBox can run almost everything in a modern OS backdrop.

IMO it's a matter of perspective. I'd say FreeDOS is already a success as a modern, maintained DOS implementation. The fact that most users find DOSBox and its forks more useful doesn't diminish FD. More software isn't a problem.

[+] rubyist5eva|4 years ago|reply
Does anyone do gamedev using FreeDOS? I'd wager a low power machine running FreeDOS and running "dos-like" games would be pretty niche, kinda like a demoscene thing but building games on FreeDOS always kinda was something I wondered about.
[+] skissane|4 years ago|reply
People write games for DOS emulators (especially DOSBox). Mostly mods of existing DOS games (our son loves Commander Keen mods), but more rarely new from scratch games as well.

However, the problem with developing games/mods for an emulator such as DOSBox, is you may find they run fine in the emulator but don't work in real DOS. Some years ago, I had MS-DOS 6.22 running under VirtualBox and our son was using that to play DOS games. He wanted to play this Command Keen mod he saw on YouTube, but it kept on crashing with an "out of memory" error. Eventually we tried it on DOSBox instead, there it worked. I tried to free up memory by tinkering with CONFIG.SYS/etc, but it appears to be impossible to get that much free conventional memory with real MS-DOS, even when making fullest possible use of UMBs and the HMA. I never tried FreeDOS, but it might have the same issue.

[+] badsectoracula|4 years ago|reply
I didn't use FreeDOS to make, but there was an MS-DOS game jam a couple of years ago for which i made a 3D platformer/adventure game[0] (it might sound a bit too big for a jam since most are like 2-6 days but that jam lasted for about two months, i made the game in about five weeks spread within those months). Later ported to other platforms too (and made a few minor improvements in terms of fixing bugs and improving performance - though the game itself is basically the same as it was when the jam ended).

But it does run in FreeDOS, in fact there is a video Jim Hall (the author of the article and the FreeDOS maintainer) made where he plays a bit of the game[1]. Note that since that version both performance and some bugs have been improved/fixed (also i'm working on a new update that improves the performance even further (i've actually made a full playthrough on a 133MHz P1 laptop i have here).

The development itself was done on Windows though and i recently ported the editor to Linux[2].

I haven't done anything else since then but the engine was written to be separate from the game and i want to separate it from the source too at some point. I did consider making a game for the dungeon crawler jam last year but i wasn't very motivated as 7 days felt too little for making something interesting (IMO) and only made a small prototype for walking around [3] (that was done before the jam to ensure the engine was usable for making a game like that, but i lost interest before the jam even began :-P). Also it wasn't specifically for DOS or retro machines in general, i just thought of reusing the engine since i had it lying around and was usable enough.

[0] https://bad-sector.itch.io/post-apocalyptic-petra

[1] https://www.youtube.com/watch?v=JGxn0Bl9U4A

[2] https://i.imgur.com/xpEjHJE.png

[3] https://www.youtube.com/watch?v=L6uij0lFLQw

[+] 7thaccount|4 years ago|reply
There's a vibrant C64, ZXSpectrum, and Amiga demoscene with even commercial games shipping with physical editions complete with the little knickknacks that games had in the 80s (they usually make the games free to download as well of course). I've had fun playing some of these games too. I know there are some free pascal folks making games that target DOS, but I'm not sure how many.
[+] FpUser|4 years ago|reply
Few years ago a customer brought me some tiny PC board for embedding that had some clone of 486 for a project. I hooked up monitor and keyboard to it, installed used Free DOS and my old Borland Pascal to write software for that board. It was nostalgic fun.
[+] Koshkin|4 years ago|reply
From Wikipedia:

FreeDOS is able to run Microsoft Windows 1.0 and 2.0 releases. Windows 3.x releases, which had support for i386 processors, cannot fully be run in 386 Enhanced Mode

I wonder why that is. Well, too bad! Windows 3.11 was a fine, usable OS.

[+] retrac|4 years ago|reply
It's the virtual 8086 mode that virtualizes multiple DOS instances. Windows 3.x gets very intimate with DOS to implement this feature (maintaining multiple parallel DOS states) and FreeDOS doesn't mirror DOS precisely enough for this to work.

But a clever hacker just just patched it a few months ago. So now it works, kinda: https://sourceforge.net/p/freedos/mailman/message/37326256/

[+] jaclaz|4 years ago|reply
>I wonder why that is.

There are I believe issues with the memory manager and there is a sort of protection mechanism that actually prevents running Windows 3.1/3.11 also on newer MS DOS (aka the DOS 7.1/8.0 of Windows 98/Me, whilst the 7.0 from Windows95 should be able to run without patches), there are dedicated patches/programs for some of these (original MS) DOS versions, probably something similar is needed for freedos.

EDIT: for some reasons this post ended up after retrac's one that actually provides a solution

[+] hgs3|4 years ago|reply
The first screenshot is from Star Wars: Dark Forces. I played a lot of this game as a kid. I remember the Mac version being superior to the DOS version because it ran at double the resolution. I tried running the Mac version on SheepShaver (a MacOS emulator), but it ran too slow. The DOS version runs well and is available on Steam [1]. It uses DOSBox.

[1] https://store.steampowered.com/app/32400/STAR_WARS__Dark_For...

[+] Koshkin|4 years ago|reply
Maybe it's just me, but I like the idea of loadlin. You are given a choice between two OS, running on bare metal, without the dual-boot. You can instantly boot up into DOS to do some quick experiment or something, and then you could load Linux when/if you need it.
[+] mastax|4 years ago|reply
There were a couple years (maybe 2008-2012) where retail PC motherboards came with embedded "instant boot" OS environments that nobody actually used.
[+] incanus77|4 years ago|reply
I’m using FreeDOS on a ~1999 Pentium II as a boot alternative to FreeBSD, and on a 1989 386SX luggable as a general purpose tool.
[+] jmspring|4 years ago|reply
I’ll need to play with this. I need to also revive my vm that was running OS/2 Warp so I could play the original version of Galactic Civilizations.

I know archive.org has running classic games in the browser, but I wonder how many will run under FreeDoS.

[+] Arkanosis|4 years ago|reply
Major French computer store LDLC (and its subsidiary materiel.net) sells modern laptops with FreeDOS preinstalled (so you don't have to buy Windows). I wonder if that's something others do as well.
[+] AnssiH|4 years ago|reply
Yes, some laptop OEMs have (or have had) FreeDOS as an OS option.

Though with a quick glance at current local computer retailer catalogs I found only HP 290 G3, which is not a laptop (https://www8.hp.com/h20195/v2/GetPDF.aspx/c06636833.pdf). Found plenty of discontinued laptops (e.g. HP ProBook 430 G6: https://support.hp.com/lv-en/document/c06179691), though, so maybe it is just not as common anymore. I vaguely remember seeing FreeDOS laptops much more often 5-10 years ago.

[+] unnouinceput|4 years ago|reply
Retailers do that to have the big, red font, price cheaper than their competition. Per law they have to include everything in that price, Windows license too. No Windows license, price is cheaper. That's the sole reason retailers include FreeDOS or Linux, not because they are somehow evangelists of Windows alternatives.
[+] phendrenad2|4 years ago|reply
I wonder about the future of FreeDOS. How long will 64-bit x86 CPUs support 32-bit code? They'll probably drop support within 10 or so years (just to free up dead silicon to compete with ARM). And then the FreeDOS kernel will have to be rewritten for 64-bit, and contain a (hopefully) accurate 32-bit VM.
[+] taubek|4 years ago|reply
I also remember PC-DOS and Dr-DOS if I'm not mistaken. I wonder what has happened with them.
[+] amelius|4 years ago|reply
Does it run on Apple hardware?
[+] Animats|4 years ago|reply
Site has too many popups to be readable.