Science and technology

Running DOS on the Raspberry Pi

You could also be conversant in The FreeDOS Project. FreeDOS is a whole, free, DOS-compatible working system that you should use to play basic DOS video games, run legacy enterprise software program, or develop embedded PC functions. Any program that works on MS-DOS must also run on FreeDOS.

As the founder and mission coordinator of the FreeDOS Project, I am usually the go-to particular person when customers ask questions. And one query I appear to get rather a lot recently is: “Can you run FreeDOS on the Raspberry Pi?”

This query is not stunning. After all, Linux runs nice on the Raspberry Pi, and FreeDOS is an older working system that requires fewer assets than Linux, so why should not FreeDOS run on the Raspberry Pi.

[Enter our Raspberry Pi week giveaway for an opportunity at this arcade gaming package.]

The easy reply is that FreeDOS can’t run on a Raspberry Pi by itself due to the CPU structure. Like any DOS, FreeDOS requires an Intel x86 CPU and a BIOS to supply fundamental runtime providers. But the Raspberry Pi is a totally completely different structure. The Raspberry Pi runs an ARM CPU, which isn’t binary suitable with the Intel CPU and doesn’t embrace a BIOS. So FreeDOS can’t run on the Raspberry Pi on the “bare hardware” stage.

Fortunately, it is doable to run FreeDOS on the Raspberry Pi by means of PC emulation. Maybe that is not as cool as working FreeDOS natively, nevertheless it’s a good way to run DOS functions on the Raspberry Pi.

What about DOSBox?

Some would possibly ask, “Why not use DOSBox instead?” DOSBox is an open supply x86 emulator that runs on a wide range of methods, together with Linux. It is a good system that gives a DOS-like setting, principally aimed toward working video games. So should you simply need to run a basic DOS recreation, DOSBox can try this for you. But should you run need to run DOS functions, DOSBox is not the most effective platform. And should you ask the DOSBox boards, they’re going to inform you DOSBox is basically meant for video games.

For most customers, it is a matter of desire. It should not be a shock that I favor to put in FreeDOS to run basic DOS video games and different packages. I discover the complete DOS expertise provides me larger flexibility and management than working DOSBox. I exploit DOSBox for a couple of video games, however for many issues I favor to run a full FreeDOS as a substitute.

Installing FreeDOS on Raspberry Pi

QEMU (brief for Quick EMUlator) is an open supply digital machine software program system that may run DOS as a “guest” working system on Linux. Most in style Linux methods embrace QEMU by default. QEMU is obtainable for Raspbian, the Linux distribution I am utilizing on my Raspberry Pi. I took the QEMU screenshots on this article with my Raspberry Pi working Raspbian GNU/Linux 9 (Stretch).

Last 12 months, I wrote an article about how to run DOS programs in Linux utilizing QEMU. The steps to put in and run FreeDOS utilizing QEMU are mainly the identical on the Raspberry Pi as they have been for my GNOME-based system.

In QEMU, you want to “build” your digital system by instructing QEMU so as to add every part of the digital machine. Let’s begin by defining a digital disk picture that we’ll use to put in and run DOS. The qemu-img command allows you to create digital disk photographs. For FreeDOS, we can’t want a lot room, so I created my digital disk with 200 megabytes:

qemu-img create freedos.img 200M

Unlike PC emulator methods like VMware or VirtualBox, you want to “build” your digital system by instructing QEMU so as to add every part of the digital machine. Although this may occasionally appear laborious, it is not that tough. I used these parameters to run QEMU to put in FreeDOS on my Raspberry Pi:

qemu-system-i386 -m 16 -k en-us -rtc base=localtime -soundhw sb16,adlib -device cirrus-vga -hda freedos.img -cdrom FD12CD.iso -boot order=d

You can discover the complete description of that command line in my different article. In transient, the command line defines an Intel i386-compatible digital machine with 16 megabytes of reminiscence, a US/English keyboard, and a real-time clock based mostly on my native system time. The command line additionally defines a basic Sound Blaster 16 sound card, Adlib digital music card, and customary Cirrus Logic VGA card. The file freedos.img is outlined as the primary exhausting drive (C:) and the FD12CD.iso picture because the CD-ROM (D:) drive. QEMU is about as well from that D: CD-ROM drive.

The FreeDOS 1.2 distribution is simple to put in. Just comply with the prompts.

However, it takes perpetually to put in due to the heavy disk I/O whenever you set up the working system, and the microSD card is not precisely quick.

Your outcomes might differ relying on the microSD card you employ. I used a SanDisk Ultra 64GB microSDXC UHS-I U1A1 card. The U1 is designed to assist 1080p video recording (comparable to you would possibly use in a GoPro digicam) at minimal serial write speeds of 10MB/s. By comparability, a V60 is aimed toward cameras that do 4K video and has a minimal sequential write velocity of 60MB/s. If your Pi has a V60 microSD card or perhaps a V30 (30MB/s), you may see noticeably higher disk I/O efficiency than I did.

Running FreeDOS on Raspberry Pi

After putting in FreeDOS, chances are you’ll favor as well straight from the digital C: drive. Modify your QEMU command line to vary the boot order, utilizing -boot order=c, like this:

​qemu-system-i386 -m 16 -k en-us -rtc base=localtime -soundhw sb16,adlib -device cirrus-vga -hda freedos.img -cdrom FD12CD.iso -boot order=c​

Once you will have put in FreeDOS in QEMU on the Raspberry Pi, you should not discover any efficiency points. For instance, video games normally load maps, sprites, sounds, and different information whenever you begin every stage. While beginning a brand new stage in a recreation would possibly take some time, I did not discover any efficiency lag whereas enjoying DOS video games in FreeDOS on the Raspberry Pi.

The FreeDOS 1.2 distribution contains many video games and different functions that may curiosity you. You might must run the FDIMPLES bundle supervisor program to put in these further packages. My favourite recreation in FreeDOS 1.2 is WING, a space-shooter recreation that is very paying homage to the basic arcade recreation Galaga. (The identify WING is a recursive acronym for Wing Is Not Galaga.)

One of my favourite DOS packages is the shareware As-Easy-As spreadsheet program. It was a well-liked spreadsheet software from the 1980s and 1990s, which does the identical job Microsoft Excel and LibreOffice Calc fulfill at present or that the DOS-based Lotus 1-2-Three spreadsheet did again within the day. As-Easy-As and Lotus 1-2-Three each saved information as WKS recordsdata, which newer variations of Microsoft Excel cannot learn, however LibreOffice Calc should assist, relying on compatibility. While the unique model of As-Easy-As was shareware, TRIUS Software made the activation code for As-Easy-As 5.7 accessible at no cost.

I am additionally fairly keen on the GNU Emacs editor, and FreeDOS features a related Emacs-like textual content editor referred to as Freemacs. If you need a extra highly effective editor than the default FreeDOS Edit and want an expertise like GNU Emacs, then Freemacs is for you. You can set up Freemacs utilizing the FDIMPLES bundle supervisor within the FreeDOS 1.2 distribution.

Yes, you may run DOS on the Raspberry Pi (type of)

While you may’t run DOS on “bare hardware” on the Raspberry Pi, it is good to know that you could nonetheless run DOS on the Raspberry Pi by way of an emulator. Thanks to the QEMU PC emulator and FreeDOS, it is doable to play basic DOS video games and run different DOS packages on the Raspberry Pi. Expect a slight efficiency hit when doing any disk I/O, particularly should you’re doing one thing intensive on the disk, like writing massive quantities of information, however issues will run nice after that. Once you’ve got arrange QEMU because the digital machine emulator and put in FreeDOS, you might be all set to get pleasure from your favourite basic DOS packages on the Raspberry Pi.

Most Popular

To Top