Jump to content

Check out our Community Blogs

- - - - -

Adventures in VirtualBox

Posted by DarkLordCthulhu, 22 July 2015 · 14491 views

virtualization virtualbox ms-dos basic microsoft qbasic dosbox
I've been doing a lot with computers lately - not a lot of programming really, but a lot of messing around with my computer, as well as learning new stuff. I'm going on a sort of intellectual adventure, a learning spree, a period of intense hyperfocus on technical stuff.

One of the first things I did was I learned how to use VirtualBox, and how to use it to install a legacy operating system (i.e. MS-DOS). The first thing I learned about VirtualBox was that it's from Oracle. I honestly had no idea until now. After that I got into the more nitty-gritty stuff. It turns out VirtualBox is actually pretty cool. It gives you options for what kind of hardware you want to emulate, and it creates a virtual computer with that hardware and lets you install an operating system on that computer. There are options for what OS to install, and many of them are explicitly supported, meaning you just select that OS, and VirtualBox selects all the necessary hardware for you so you don't have to. After that, you create a (rather large) file that will serve as a binary image of the hypothetical hard drive on which the operating system is stored. There are a few options for what file format to use. They include VDI, VMDK, VHD, HDD, QED, and QCOW. Never heard of any of these before, and I still don't understand the difference between them. Anyway, I selected VDI, which was the default.

I downloaded a copy of MS-DOS 5.0 from vetusware.com, a really awesome abandonware site. It came as a RAR file, which I had to download a special program to open (since Mac OS X doesn't have any native utilities capable of working with RAR files). When I unarchived the file, I found three .IMA floppy disk images. This was another learning experience, because I had never heard of this kind of file before. Once I had the VM set up, installing MS-DOS on it was fairly easy. I "inserted" the floppies by simply selecting the floppy images in the VirtualBox control panel. Pretty soon, I had a working copy of a MS-DOS 5.0 running on my computer.

I don't know about other versions of MS-DOS, but in this version, the first thing you see when you boot up is the MS-DOS Shell, a graphical frontend from which you can start the command prompt and various other programs and utilities, and also select files in a graphical manner. MS-DOS Shell even has themes that you can select. I selected a graphical theme, which wasn't character-based at all; it was true graphics - in 4-color monochrome. This was just surreal, because months earlier I had had a dream about using an old MS-DOS machine that was graphical, and it looked just like this.

I few other things: I had some difficulty making the VM truly full-screen, like having the MS-DOS command line take up the entire screen when in full-screen mode. I like the idea that I can fool people into thinking I actually installed a 24-year-old operating system on my Macbook. (Of course, I can do that with DOSBox if I have it in full-screen mode, but I can't truthfully tell people it's MS-DOS, because it isn't.) I somewhat solved the problem by decreasing the resolution of my monitor to 800 x 600 pixels. Now it fills up probably 4/5 of the screen, as opposed to half of it like before. Another thing: I found that MS-DOS 5.0 comes with Microsoft QBASIC. I just thought that was so cool. Of course it's nothing like Commodore BASIC, so what I learned in programming my C64 isn't going to work here. I'd like to get my hands on an old Microsoft QBASIC user's manual. That would be so awesome. :biggrin:

There are some problems I haven't solved yet. For example, I haven't figured out how to make the VM capture my mouse. When I tell it to capture, the Mac OS X pointer disappears, but it doesn't get replaced by a DOS-style pointer (for example, the reverse-video block pointer that you see in MS-DOS Editor). I also haven't found a way to install all the software that I downloaded from vetusware yet. They're in the form of directories containing all the necessary files, and I need to find a way to convert these directories into floppy images, and also to extract floppy images into directories. If I can find a way to do this, I'll finally be able to use programs like Turbo Pascal and IBM Fortran, where the installer tells you to insert disks into Drive A or Drive B. I can't really do that in DOSBox, because that would involve suspending the installer somehow so I can return to the command prompt and type "mount a: whatever" to "insert" the disk, and there is no way to suspend programs in DOSBox. In VirtualBox, you can just do all that from the control panel. No need to do any mounting or inserting within DOS.

I was originally going to call this blog entry "The Intellectual Adventures of Cthuluhu - VirtualBox, MS-DOS, cryptography, and more" and make it about all the cool stuff I've been doing/learning about lately, but it seems the VirtualBox/MS-DOS part has gone on longer than I initially anticipated, so I think I'll stop here. Maybe I'll write about cryptography, Unix, networking utilities, etc. in another blog.

  • 1

MS DOS didn't have mouse support for within the OS. Some programs would support a mouse, but not the OS itself.


Out of curiosity, does VirtualBox have a default Android image? That would be a lot of fun to play with :)

    • 0