Home

#######  #####    ###            #####    ###   #     #
     #  #     #  #   #          #     #    #    ##   ##
    #   #     # #     #         #          #    # # # #
   #     #####  #     #  #####   #####     #    #  #  #
  #     #     # #     #               #    #    #     #
 #      #     #  #   #          #     #    #    #     #
#######  #####    ###            #####    ###   #     #

Introduction:

z80pack is a Z80 cross development package for UNIX systems distributed with all sources under a BSD style license. Included are: The CPU emulation itself is generic and it can be used to emulate any Z80 based system, the I/O hardware abstraction is well isolated. It has been used for emulation of industrial Z80 controllers which cannot be released to the public. Instead an emulation of a virtual complete computer system capable of runnning CP/M 1, CP/M 2, CP/M 3 and MP/M 2 is included as an example for what can be done with this software. The Z80 cross assembler was used to bootstrap CP/M 2.2 on the system, for CP/M 3 and MP/M 2 the loader BIOS's were written on a UNIX host, final work then was done under CP/M 2.2 running on the emulated system.

This virtual computer system has been used to rebuild CP/M 1, CP/M 2, CP/M 3 and MP/M 2 completely from the sources. Also example implementations of CP/NET have been build, to network the virtual systems with this very early form of RPC (remote procedure calls). Additional disk images with all sources, tools and build scripts are available for download.

The system also runs the UCSD pSystem Version II.0. Disk images for a ready-to-run system as well as sources to rebuild the Z80 version are available in the download section.

Features of the virtual computer system:

For seeing the machinery in action here are some screenshots.

The whole package is written in ANSI C for POSIX compatible Open Systems. Systems on which the sources are known to compile without any changes are:

Other ports to Microsoft Windows have been done, links are in the download section.

All Digital Research CP/M material included was taken from The Unofficial CP/M Web site, the license for this material can be read there.
Other commercial CP/M material included was taken from CP/M Commercial Software Archive.
Some user written tools were taken from the Oak CP/M archive, a mirror is available here.
Various programs from the Walnut Creek CP/M CD-ROM have been used too, an online copy is available here.
The UCSD pSystem II.0 on 8" disk images is available at Bitsavers.

Quickstart to run the Digital Research OS's:

  1. Download the z80pack source archive
  2. Unpack the source archive in your home directory: tar xzvf z80pack-x.y.tgz
  3. Compile the CP/M emulation:
    1. cd ~/z80pack/cpmsim/srcsim
    2. make
    3. make clean
  4. Compile support programs, some are needed for the emulation:
    1. cd ~/z80pack/cpmsim/srccpm2
    2. make
    3. make clean
  5. MAKE BACKUPS OF THE BOOTABLE DISK IMAGES:
    1. cd ~/z80pack/cpmsim/disks/library
    2. cp * ../backups
  6. To run CP/M 2.2:
    1. cd ~/z80pack/cpmsim
    2. cpm2
    3. To leave the emulation type a:bye. This program executes a Z80 HALT instruction which terminates the emulator.
  7. To run CP/M 3:
    1. cd ~/z80pack/cpmsim
    2. cpm3
    3. To leave the emulation type a:bye. This program executes a Z80 HALT instruction which terminates the emulator.
  8. To run MP/M 2:
    1. cd ~/z80pack/cpmsim
    2. mpm
      This boots CP/M 2.2, the system tracks of the disk do not contain the mpmldr program. To boot MP/M type mpmldr which runs the loader under CP/M 2.2 and boots the MP/M 2 system from the disks.
    3. To leave the emulation type a:bye. This program executes a Z80 HALT instruction which terminates the emulation.
  9. To exchange files between the UNIX host and the CP/M disk images download and install cpmtools. The emulator uses 8" SD disk drives as the first 4 drives, which also is the default used in cpmtools version 2.5 at the time of this writing. In case it changes sometime, the disk definition is:
    	diskdef ibm-3740
    	  seclen 128
    	  tracks 77
    	  sectrk 26
    	  blocksize 1024
    	  maxdir 64
    	  skew 6
    	  boottrk 2
    	  os p2dos
    	end
    
    Caution, while the data tracks have a skew of 6 the system tracks have a skew of 1, because I never implemented skews in the UNIX putsys programs. Using the correct skew made sense with Shugart floppy disk drives from 1976. Nowadays with harddisks used in personal computers transferring 40MB/s and more the skew is only used for compatibility reasons.

    To access the 4mb harddisk image of z80pack add the following disk definition to /usr/local/share/diskdefs:

    	diskdef hd
    	  seclen 128
    	  tracks 255
    	  sectrk 128
    	  blocksize 2048
    	  maxdir 1024
    	  skew 0
    	  boottrk 0
    	  os 2.2
    	end
    
    To access the 512mb harddisk image add this disk definition to /usr/local/share/diskdefs:
    	diskdef hdb
    	  seclen 128
    	  tracks 256
    	  sectrk 16384
    	  blocksize 16384
    	  maxdir 8192
    	  skew 0
    	  boottrk 0
    	  os 2.2
    	end
    
    To access the 4mb harddisk image (drives I: and J:) from the UNIX host always use the option -f hd as in this example: cpmls -f hd disks/drivei.cpm. Do not forget to use it, specially when copying files to the disk, without this option the harddisk image will be destroyed. You did make backups of the disks, did you?

    Same with the 512mb drive P:, always use the option -f hdb to access this drive file.

  10. Start reading documentation, understanding the disk image layout under ~/z80pack/cpmsim/disks is essential.

Quickstart to run UCSD pSystem:

  1. Download the z80pack source archive
  2. Unpack the source archive in your home directory: tar xzvf z80pack-x.y.tgz
  3. Compile the CP/M emulation:
    1. cd ~/z80pack/cpmsim/srcsim
    2. make
    3. make clean
  4. Compile support programs, some are needed for the emulation:
    1. cd ~/z80pack/cpmsim/srccpm2
    2. make
    3. make clean
  5. Download the UCSD boot images
  6. Unpack the archive in ~/z80pack/cpmsim: tar xzvf ucsd.tgz
  7. MAKE BACKUPS OF THE BOOTABLE DISK IMAGES:
    1. cd ~/z80pack/cpmsim/disks/library
    2. cp * ../backups
  8. To run UCSD pSystem:
    1. cd ~/z80pack/cpmsim
    2. ucsd
    3. To leave the emulation first shutdown the UCSD pSystem from main menu with the H command, then abort cpmsim with CTRL-\
  9. To exchange files between the UNIX host and UCSD disk images download and install UCSD filesystem tools.

Downloads:

UNIX host programs
Z80 CPU simulation, Z80 cross assembler, CP/M system simulation including boot disk images with CP/M 2.2, CP/M 3 and MP/M 2 Download
UNIX tools to access CP/M disk images, highly recommended Link
UNIX tools to access UCSD pSystem disk images, highly recommended Link
Intel PL/M-80 Cross Compiler 2.0 setup for UNIX systems. Requires GNU Fortran 77 (f77) compiler Download
The Intel 8080 Macro Assembler Version 3.0 Fortran sources were recovered from an old Mainframe computer. I have ported the software to UNIX systems with GNU Fortran 77 (f77) compiler. Unfortunately Intel denied permission to redistribute the sources, so it is not available for download, sorry.
The Intel Software Simulation of the MCS-8 8080 CPU and Memory Version 2.2 sources were recovered from an old Mainframe computer. I have ported the software to UNIX systems with GNU Fortran 77 (f77). Unfortunately Intel denied permission to redistribute the sources, so it is not available for download, sorry.
Microsoft Windows host programs
Roger Ivie's Windows 2K port of z80pack Link
Disk images with Digital Research OS sources
CP/M 2.2 source disk images for Z80SIM with build scripts to build a bootable disk Download
Contents of the above disk images in a zip archive as requested Download
CP/M 2.2 source disk image with some of the official Digital Research patches applied to the sources. This download contains the harddisk image and shell script for Z80SIM to mount disks. The original source images need to be installed first to get the tool disks too. Download
All the sources from the disk image above in a zip archive Download
CP/M 3 source disk images for Z80SIM with build scripts Download
All the files from the disk images above in a zip archive Download
MP/M 2 source disk images for Z80SIM with build scripts Download
All the files from the disk images above in a zip archive Download
Bootable disk images with Digital Research CP/NET client and server
Disk images with pre-configured CP/NET 1.1 MP/M server including customized sources Download
Disk images with pre-configured CP/NET 1.1 CP/M 2.2 client including customized sources Download
Disk images with pre-configured CP/NET 1.2 MP/M server including customized sources Download
Disk images with pre-configured CP/NET 1.2 CP/M 2.2 client including customized sources Download
Bootable disk images with older Digital Research CP/M versions
Bootable disk image with the 1975 CP/M version, sources see below Download
Bootable disk image with CP/M 1.4, includes boot loader and BIOS sources Download
Zip archive with the files from above CP/M 1.4 disk image. Please note, that the files BYE.COM (leaves Z80 CP/M emulation) and CLS.COM (clear screen of ANSI terminals), were added by me and are not part of a DRI CP/M distribution. Download
Disk images with UCSD pSystem II.0
CP/M 2.2 disk image with all sources required to build a boot record for UCSD Pascal system II.0 Download
Two disk images with the UCSD Pascal II.0 Z80 system disks, ready to boot under cpmsim. The boot code build with the disk above is written to system disk 1 already. Download
8" disk images with UCSD pSystem II.0 for Z80, this disks have been used to build the system for Z80SIM Download
Other 8080/Z80 operating systems
CP/M 2.2 with ZCPR1 replacement for CCP, includes all sources and documentation Download
CP/M 2.2 with ZSDOS/ZCPR1 replacement for BDOS/CCP, inludes ZSDOS source and documentation Download
Pre-configured NZ-COM Z-System with ZSDOS/ZCPR3.4 for CP/M 2.2, includes documentation Download
QP/M, a Z80 CP/M 2.2 clone with advanced features, BIOS with clock support available here. Link
DOS+, a Z80 CP/M 2.2 clone with advanced features, BIOS with clock support available here. Link
Harddisk image with pre-installed ConIX shareware system for CP/M 2.2 Download
Disk images with CP/M application software
Disk images with more complete ISIS tools and submit script to compile PL/M programs Download
Harddisk image with Gordon Eubanks BASIC-E compiler sources, build scripts and BASIC example programs. Requires ISIS tools to build from sources, precompiled executables included. Download
Disk image with ALGOL-M compiler for CP/M written by Gary Kildalls students at Naval Postgraduate School Download
Disk image with Z80MR, a Public Domain Z80 macro assembler for CP/M Download
Disk images with figFORTH 1.1 and 1.3 for 8080 and screens with editor and 8080 assembler. The sources are a little bit modified, original sources see below. Download
Harddisk image with CP/M FORTH implementations using the filesystem as block device. A readme file in user 0 lists which FORTH systems are in the various user areas. Download
Disk image with Turbo Pascal 3.01A pre-configured for ANSI terminal emulations Download
Disk image with Q/C C compiler version 3.1a for Z80 Download
Harddisk image with Z80 Hitech-C compiler V3.09 for CP/M. The compiler is configured to be used from harddisk J: and an additional make utility for CP/M 3 with example is included also. Download
Harddisk image with Kermit 4.11 build for Z80SIM TCP/IP UART Download
Harddisk image with CP/M 3 system extensions like multiline command history.The disk includes all sources as the RSX's as well, this software requires CP/M 3. Download
Harddisk image with the CP/M help system based on help version 2.0. The help program is configured to use drive J: as default. Help files for frequently used programs are included, as well as the source for the help program. Download
Disk image with Colossal Cave adventure, version A02, 350 points Download
Disk image with Colossal Cave adventure, version B00, 550 points. Requires Z80 CPU. Download
Disk image with Colossal Cave adventure, version B01, 550 points. Identical with B00 but runs on the 8080 CPU. Download
Disk image with Colossal Cave adventure, version B03, 580 points Download
Source files with tools and examples
CP/M utilities written in PL/M-80 for the Intel PL/M-80 cross compiler Download
PASCAL examples for playing with UCSD Pascal Download
PASCAL examples for playing with Turbo Pascal Download
BASIC sources for BASIC-E compiler Download
Other sources
The 1975 CP/M sources found on CPMUG disk Vol 5. Original sources from the disk, as well as overworked versions to be used on Z80SIM. Download
8080 figFORTH 1.1 original source Download
8080 figFORTH 1.3 original source
(the block management for block size 1024 is broken, I doubt that this is an original F.I.G release)
Download

Documentation:

General documentation
Public MP/M test server Read
TODO list for future releases Read
CP/M simulator related documentation
Understanding disk images for the CP/M emulation Read
The printer device under CP/M emulation Read
The auxiliary device under CP/M emulation Read
Recompiling CP/M 2.2 from the sources Read
Recompiling CP/M 3 from the sources Read
Recompiling MP/M 2 from the sources Read
Using the ISIS environment under CP/M 2.2 Read
Using CP/NET with Z80SIM Read
Z80 simulator related documentation
Installation and Test Read
Z80 cross assembler related documentation
Installation and Test Read
Digital Research Documentation
CP/M 2.2 Operating System Manual Read
CP/NET Network Operating System Reference Manual Read
Link-80 Operator's Guide Read
Intel Documentation
PL/M-80 Language Summary Read
ISIS-II User's Guide (PDF) Read
ISIS Internals, a collection of computer magazine articles and notes about the inner workings of the ISIS system (PDF) Read
Other Documentation
UCSD Pascal System II.0 User's Manual (PDF)
Also check Bitsavers for more manuals.
Read
figFORTH release 1.1 for 8080 Assembly Source Listing (PDF) Read
figFORTH Installation Manual Read
Microshell, UNIX Features for CP/M, User's Manual Version 2.0 (PDF) Read

Support:

This is a spare time project and there is no official support. A good place to discuss technical issues or ask about help is Usenet newsgroup comp.os.cpm.

Copyright, License and all that stuff:

I often get asked: may I do ... with Z80SIM?
The answer just is: yes! Everything you can download from this Web site that says: Copyright (C) ... Udo Munk is covered by the BSD license you'll find in the directory doc of the z80pack tar archive. You can do whatever you want with this software, you don't need any other permissions from me for whatever you intend to do. That includes commercial usage of this software. This software was written for using it, so use it.
Of course disk images with Digital Research software, Intel software, UCSD software, Microsoft software, Borland software and so on and so forth are not covered by this license! This software was not written by me, so it doesn't have my Copyright, so it is re-distributed under different license terms. To the best of my knowledge all this ancient software may be re-distributed for non profit hobby usage. If you find software here owned by you, that shall not be distributed, please let me know and it will get removed from this site.

Bibliography:

I still have Z80 data sheets from Zilog, Mostek and Hitachi and I also still have my CP/M 2, CP/M 3 and MP/M manuals and a bunch of other related books. All this material was used as reference to write this software. Unfortunately all this manuals are out of print, so it won't help anyone to reference it here. Instead I'm trying to provide links to online documentations, which will help you understanding this software.
  1. Everything to know about the Z80 including original Zilog data sheets can be read here.
  2. Digital Research manuals for CP/M 1, CP/M 2, CP/M 3, MP/M 2, assemblers, linkers and compilers are archived here.

Some other UNIX Z80 emulations:

YAZE-AG - Yet Another Z80 Emulator by AG
The SIMH Altair 8800 Z80 simulator

Z80 emulation written in Java:

J80 Java Z80 Emulator

Z80 hardware and software related links:

News & Pointers: S-100, CP/M and related sites
Gaby's Homepage for CP/M and Computer History

Home