[HN Gopher] How FreeDOS Grew Up and Became a Modern DOS (2021)
___________________________________________________________________
How FreeDOS Grew Up and Became a Modern DOS (2021)
Author : ingve
Score : 163 points
Date : 2022-01-29 16:28 UTC (6 hours ago)
(HTM) web link (www.cloudsavvyit.com)
(TXT) w3m dump (www.cloudsavvyit.com)
| FpUser wrote:
| 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.
| AtlasBarfed wrote:
| 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.
| accrual wrote:
| For #4, one can find a lot of useful DOS software between
| WinWorldPC and Archive.org.
|
| https://winworldpc.com/library/applications
|
| https://archive.org/details/softwarelibrary_msdos
| zamadatix wrote:
| 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 wrote:
| 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 wrote:
| > 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.
| WalterBright wrote:
| 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 wrote:
| 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.
| [deleted]
| WalterBright wrote:
| 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?
| andrewf wrote:
| I've used emu2 to run ancient MASM out of a Makefile. It should
| work under WSL. (Edit: it doesn't propagate exit codes afaict)
| https://github.com/dmsc/emu2
| WalterBright wrote:
| Well, in order to function in the test suite, the exit codes
| have to propagate! Arggh!
| rnd0 wrote:
| I prefer DOSBox-X to DOSBox because it's easier to run; but it
| sounds like neither one is what you want.
|
| Have you heard of or tried "MS-DOS Player"? It seems to convert
| binaries into a format that Windows can understand. I think you
| have to do it on a per-file basis so it might be more of a
| headache than it's worth; but it's out there!
|
| http://takeda-toshiya.my.coocan.jp/msdos/index.html (original
| site)
|
| https://virtuallyfun.com/wordpress/2011/02/11/ms-dos-player-...
|
| [edit]There's also winevdm which can run 16 bit windows
| binaries on 64 bit windows. It has DOS support but it's
| incomplete and it points back to MS-DOS player in it's
| readme...
|
| https://github.com/otya128/winevdm
| WalterBright wrote:
| The seem to do far more than can work for my case :-(
|
| I wonder how long it would take to write an 8086 emulator and
| just intercept the file I/O DOS calls. Would anyone else be
| interested in such a program?
| Koshkin wrote:
| 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.
| rnd0 wrote:
| It's because of the undocumented and weird calls MS put into
| windows in part to thwart DR-DOS back in the day. (see also
| https://en.wikipedia.org/wiki/AARD_code )
|
| That said, work's happened to make FreeDOS boot windows 3 at
| least under special circumstances (I'm not sure if this kernel
| made it into the current FreeDOS or not):
| https://virtuallyfun.com/wordpress/2021/07/27/freedos-runnin...
| jaclaz wrote:
| >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
| retrac wrote:
| 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 wrote:
| Thanks these are good news.
| Arkanosis wrote:
| 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.
| unnouinceput wrote:
| 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.
| AnssiH wrote:
| 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.
| hakfoo wrote:
| 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.
| alar44 wrote:
| Here you go, dossrc.zip
|
| https://archive.sundby.com/retro/DR-DOS/
| billforsternz wrote:
| 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.
| rnd0 wrote:
| >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...
|
| Just for the sake of perspective:
|
| 15 years later, you had NT 3.51 running on pentiums with NT
| 4.0 coming just around the corner and Windows 95 had already
| been out for a year.
|
| 20 years later Windows XP was released and MS held an event
| celebrating the end of MS-DOS
|
| Even ten years later, you had Windows 3.1 running on 486s and
| OS/2 2.0 was a year away from release.
|
| So the 8088 and assembly window was really, really small. And
| people were over dos by the time Windows 3.0 was released
| (1990 -nine years after the first IBM PC)
| rnd0 wrote:
| Correction; Windows 3.1 wasn't released until 1992 -eleven
| years later. So it would have been Windows 3.0 (probably in
| Standard or Enhanced mode) people were running in 1991.
| kingcharles wrote:
| Yes, pure assembler for the early versions of MS-DOS (and its
| precursors).
|
| Microsoft has open-sourced them:
|
| https://github.com/microsoft/MS-DOS
| marcodiego wrote:
| Boot time is not a good measure of performance.
| queuebert wrote:
| Not for a data center server, no, but for an appliance it
| could be.
| HeckFeck wrote:
| > 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?
| randombits0 wrote:
| Break out the soldering iron, Johnson, we have a clone to
| build!
|
| http://www.mtmscientific.com/pc-retro.html
| bitigchi wrote:
| You can open a bug report or post your findings to the mailing
| list.
| anthk wrote:
| 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.
| Teknoman117 wrote:
| 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.
| oldetimer wrote:
| 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.
| rubyist5eva wrote:
| 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.
| unixhero wrote:
| Why do IT people need to editorialize and inform the reader that
| the author experienced completely unrelated and older computer
| systems in the 80s.
| incanus77 wrote:
| What systems are completely unrelated? DOS led to Windows,
| Linux led to Linux-like commands in FreeDOS. I appreciate the
| context and, from my point of view, credibility of the author
| to bring some history into the development of modern tools.
| unnouinceput wrote:
| Linux-like commands are in Windows since like over 2 decades
| now. It's called CygWin, and I'm still using it everyday.
|
| https://en.wikipedia.org/wiki/Cygwin
| accrual wrote:
| Probably because the author is the founder of the FreeDOS
| project and wanted to provide some context for his motivation.
| teddyh wrote:
| 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!_
| Koshkin wrote:
| 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.
| slim wrote:
| dos is your grub
| progman32 wrote:
| For a while I had a grub entry with 'init=/bin/bash' for this
| purpose. Not a great idea for several reasons, but it was handy
| if my computer was off and I just needed to quickly copy a file
| onto USB or whatever.
| incanus77 wrote:
| 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.
| hgs3 wrote:
| 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...
| jmspring wrote:
| 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.
| paulryanrogers wrote:
| IIRC Archive.org uses a DOSBox port that leverages WASM.
| mandis wrote:
| Is there a blog or resource page I can refer to learn more
| about this?
| rzzzt wrote:
| Jason Scott's post from around the introduction:
| http://ascii.textfiles.com/archives/4471
|
| The framework IA uses for embedding emulators:
| https://github.com/db48x/emularity
|
| Emscripten DOSBox: https://github.com/dreamlayers/em-
| dosbox/
| taubek wrote:
| I also remember PC-DOS and Dr-DOS if I'm not mistaken. I wonder
| what has happened with them.
| einr wrote:
| PC DOS diverged from MS-DOS from version 6, went to version 7,
| and then around the turn of the millennium had a final
| commercial release called PC DOS 2000 which was essentially PC
| DOS 7 with some y2k fixes and other little modernizations. IBM
| used it embedded in other products until about 2003 after which
| it's been dead and buried.
|
| DR-DOS was bought by Novell when Digital Research went under
| and became Novell DOS, then it was sold again to Caldera (and
| later its spun-off Lineo division) where it was called Caldera
| OpenDOS for a while. It was sold off one last time to DRDOS,
| Inc. which sold it as a commercial product until at least 2011.
| I think the current status of the ownership and codebase is
| unclear.
| krylon wrote:
| 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 EUR 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.
| bityard wrote:
| 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.
| VLM wrote:
| 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.
| rgacote wrote:
| 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.
| ginko wrote:
| How can this be? How can they charge licensing for a device
| that doesn't contain any MS software?
| przemub wrote:
| They would force such a licence agreement on every OEM,
| small or large. There was a lot more dirty tricks involved
| to monopolize the market. Look up BeOS history, for
| example. The OEMs installed BeOS on a second partition, and
| they could not show it in the bootloader, because of these
| agreements.
|
| Microsoft and Bill Gates built their position on pure evil.
| bruce511 wrote:
| Microsoft was a big player, and certainly had clout, but
| the word "force" is inaccurate.
|
| To answer the grand-parent-post, they got a license per
| CPU because the retailers _agreed_ to that model.
|
| MS would argue that every cpu sold ran an MS operating
| system (legal or illegal) so licensing the CPU made it
| cheaper for legit users (ie lower price) and pirate users
| ultimately paid as well.
|
| This left other OSs out in the cold but the number of
| actual legit users installing something else was a
| rounding error.
|
| Shops could _choose_ to just sell dos or windows when the
| customer wanted it, but they paid a higher price via that
| model, so few (if any) shops went that way.
|
| MS certainly played lots of dirty tricks but OEM pricing
| is not really dirty, it's just sensible business when you
| have that sort of market dominance and your software is
| pirated so heavily.
| nix23 wrote:
| >retailers _agreed_ to that model.
|
| I fix it for you:
|
| Had to agree otherwise not a single Windows license for
| your company in your lifetime for a reasonable price
| anymore.
| [deleted]
| krylon wrote:
| Because they can. Or could anyway. I agree it's not fair.
| But money makes the world go 'round, as they say.
| 0xcde4c3db wrote:
| Because the reality is that the OEM doesn't want to track
| OS installations and Microsoft doesn't want to audit that
| tracking. With per-CPU licensing, the OEM can just say
| "here's our invoices from Intel".
| grishka wrote:
| Why was this legal?
| grishka wrote:
| 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.
| Spooky23 wrote:
| I think there's a carve out for alternate DOS environments
| due to some litigation over DR-DOS and PC-DOS. IIRC, its a
| Compaq thing that came over when HP bought them. Also, I
| don't think DOS can connect to AD.
|
| Otherwise, Microsoft's terms are basically anything that
| isn't an ATM machine, server or IoT needs a windows license.
| In enterprise agreements, you need to buy Windows licenses
| for MacOS devices too.
| abrowne wrote:
| 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!)
| lloydatkinson wrote:
| How is it possible for them to charge them for not having an OS
| at all?
| Animats wrote:
| Site has too many popups to be readable.
___________________________________________________________________
(page generated 2022-01-29 23:00 UTC)