Linux - Example batch file for running DOS in Qemu

by shian ⌂, Sunday, August 30, 2020, 16:39 (30 days ago) @ shian
edited by shian, Monday, August 31, 2020, 08:58

I'm using this batch file to run "fdos12.img" on Linux, but you can adapt it for Windows as well (DOS.BAT):

# File name: dos.sh
#
# I'm Using qemu-system-x86_64 --version:
# QEMU emulator version 4.2.0 (On Linux Debian 1:4.2-3ubuntu6.4)
# ==============================================================
#
# When you start qemu:
# --------------------
# Press control-alt-f to toggle full screen mode
# Press control-alt-g to (toggle) grab the keyboard & mouse into DOS
# Press control-alt-0 or control-alt-minus or control-alt-plus to zoom best-fit/out/in
#
# To share files with a FAT-16 or FAT-32 (DOS) formatted USB stick, append
# also the following command (change "/dev/sdb" if needed to your USB stick path):
# --------------------------------------------------------------------------------
#
#    -drive file="/dev/sdb",format=raw,if=ide,media=disk
#
# Note that you should run qemu as root to access the USB drive, i.e.:
# sudo qemu-system-x86_64 ...

qemu-system-x86_64 -drive file="fdos12.img",format=raw,if=ide,media=disk -boot order=c -m 1024 -k en-us -rtc base=localtime -soundhw sb16,adlib,pcspk -vga std -no-quit -name "FreeDOS 1.2"


Short description:

-drive is a disk to add to DOS.
-boot tells qemu which disk to boot from (in order).
-m is memory to use (1024 = 1GB since Euphoria 3 is running in protected mode it's useful).
-k is keyboard (English-US is the standard keyboard)
-rtc is the clock
-soundhw is sound hardware to emulate (sb16,adlib,pcspk are common for many DOS programs).
-vga is type of screen (standard VGA)
-no-quit disable the option to close the qemu window by clicking the [x] on title bar
-name will appear at the title bar of qemu

Note: if using USB stick, then make sure that the USB stick is not mounted in Linux, and do NOT remove it until you exit Qemu.

Tags:
DOS, FreeDOS, qemu


Complete thread:

 RSS Feed of thread

powered by my little forum