Emulating CP/M with MYZ80 and DOSBox

Introduction

MYZ80 is widely considered the best Z80 emulator for DOS. It emulates a complete virtual Z80-based system, allowing you to run many flavors of CP/M. Here we will look at how to install DOSBox on a Linux system, and then install and configure MYZ80 in DOSBox.

DOSBox

As DOSBox is probably also available in your distro's repositories, it is dead simple to install. For Debian-based distros, simply run:

$> sudo apt-get install dosbox

After entering your system password, DOSBox will install. Once installation is complete, we'll configure DOSBox's COM1 serial port and set up a C: drive.

$> mkdir -p ~/dosbox/c
$> nano ~/.dosbox/dosbox-0.74.conf

In dosbox-0.74.conf locate the section labeled [serial], and this line:

serial1=dummy

This next step assumes you have installed tty0tty installed and running, supplying virtual comports at /dev/tnt* (for example, as in the tutorial Setting Up a Virtual Modem on Linux). If you intend to use a physical comport, or another virtual comport, adjust this line.

seria1=directserial realport:/dev/tnt0

Then move to the bottom of the configuration file, and in the [autoexec] section add this line:

mount c ~/dosbox/c

Now the contents of ~/dosbox/c will appear as the DOS C: drive in DOSBox.

Save and exit, and DOSBox is good to go.

MYZ80

Finally we'll install MYZ80 inside DOSBox.

$> mkdir -p ~/dosbox/c/myz80
$> cd ~/dosbox/c/myz80
$> wget classiccmp.org/cpmarchives/cpm/Software/Humongous/Emulatrs/MyZ80/myz80124\ \(Jan\ 7\).zip
$> unzip myz80124\ \(Jan\ 7\).zip
$> rm myz80124\ \(Jan\ 7\).zip
$> cp a.dsk a.bkp

Finalizing

And now to test everything. First launch DOSBox.

$> dosbox

You should see a DOSBox window open and in a second or so, land at a Z:\> prompt. To launch MYZ80, change to C:\MYZ80 and run MYZ80:

You will have to progress through several screensful of info, and then you will find yourself at CP/M's A0> prompt.

                            Good Luck!
                            ----------

     The MYZ80GO.COM program is  a simple  program which  displays
     HELLO.TXT to  you.  Unless  you want  to see  HELLO.TXT every
     time you start up  MYZ80 you  should erase  MYZ80GO.COM (with
     the CP/M command "ERA MYZ80GO.COM").  But because the  system
     will still attempt to run MYZ80GO.COM at every start you  can
     rename  another  program  to  MYZ80GO.COM  and  have  it  run
     instead.   At  any  time  you  can  use  the   command  "TYPE
     HELLO.TXT" to see this document again.

     One final thing...  there are two online menus  called up  by
     pressing the control+break keys  and the  control+shift+break
     keys. Try them now!

     Enjoy MYZ80!

              - Simeon -

                   [Press a key to return to CP/M]
A0>

Congratulations! You're good to go! To exit MYZ80 back to DOS, type exit. There's a brief tutorial on using CP/M here.