## What?

CP/Mish is an open source sort-of-CP/M distribution for the 8080 and Z80 architectures (although for technical reasons currently it only works on the Z80).

It contains no actual Digital Research code. Instead, it’s a collection of third party modules which replicate it, all with proper open source licenses, integrated with a build system that should make it easy to work with.

What you get is a working CP/M 2.2 clone consisting of:

• ZSDOS as the BDOS replacement
• ZCPR1 as the CCP replacement
• open source BIOSes for the supported platforms
• various tools copying the functionality of the standard CP/M tools (some of them written by me
• a build system which provides a turnkey cross-compilation system for producing bootable disk images for any of the supported platforms
• a classic CP/M syntax assembler and linker for cross-compiling ancient source
• an emulator for testing CP/M binaries
• source for everything; no binaries are in this distribution
• bugs

Currently it supports these platforms:

If anyone wants to contribute any more BIOSes, I’d love pull requests!

## Why?

CP/M is Digital Research’s seminal desktop operating system from 1977 that for a decade dominated the personal computer market. It’s of enormous historical value and there’s a vast wealth of programs written for it. It’s even useful today: both to study (as aa superb example of sheer minimalism) but also to use; the Z80 is a common target for homebrew computers, and CP/M is the obvious operating system to run on one.

Don’t believe me? Watch this:

However, while you can get the source and binaries today, the license it’s released with is encumbered and it can’t be distributed outside (the amazing) Unofficial CP/M Web Site; so it’s useful as a reference, but you can’t distribute CP/M images with, e.g., emulators.

CP/Mish is not CP/M, but it’s enough like CP/M to run CP/M programs and do CP/M things. And, if you want the real CP/M, CP/Mish uses the standard interaces so you can just drop in a Digital Research BDOS and CCP and it’ll work.

## How?

You pretty much need a Unix — I developed it on Linux. You’ll need to install the dependencies. These are the names of the Debian packages:

• netpbm
• cpmtools
• lua5.1
• lua-posix
• ninja-build
• libz80ex-dev

You also need to install the Amsterdam Compiler Kit, which is used as the C compiler (yes, some of the tools are written in C). You’ll have to install it from source yourself as it’s not in Debian.

Once in place, just do:

make


…and it should build. You’ll end up with some .img files in the project directory which are the bootable disk images.

For information on what to do with these, look in the READMEs in the individual arch/* directories.

## Who?

There’s a lot of stuff here, and while I assembled it, I didn’t write all of it. See the licensing section below for the full list.

For the distribution work and the bits I did write — I am David Given. Feel free to send me email at dg@cowlark.com. You may also like to visit my website; there may or may not be something interesting there.

This is a big aggregation of software, all with its own licensing. It contains GPLv2-licensed code, so as a whole it must be distributed under the terms of the GPL version 2 (because complying with the GPL also complies with the license of everything else). See the COPYING.gpl2 file for more details.

Specifically:

• Everything not in arch or third_party is © 2018-2019 David Given and is distributable under the terms of the 2-clause BSD license. See the COPYING.cpmish file for more details.

• arch/nc200 and arch/kayproii were written by me and are covered by the main CP/Mish license.

• third_party/libstb contains a copy of Sean Barrett’s stb library, which is partially in the public domain and partially distributable under the Expat license. See the third_party/libstb/COPYING file for more details.

• third_party/zcpr1 contains a (modified) copy of the ZCPR1 CCP replacement, written by the CCP-GROUP, which is in the public domain. See the third_party/zcpr1/COPYING file for more details.

• third_party/zmac contains a (modified) copy of the ZMAC macro assembler, written by George Phillips, Thierry Join, Mark Rison, Russell Marks, Colin Kelley, John Providenza and Bruce Norskog (some time in 1978!) — and probably others. To the best of my knowledge this is in the public domain. See the third_party/zmac/COPYING file for more details.

• third_party/ld80 contains a (modified) copy of the LD80 macro assembler, written by (as far as I know) George Philips and Gabor Kiss. It is in the public domain.

• third_party/zsdos contains a (modified) copy of the ZSDOS CP/M BDOS clone, written by lots of people but mainly Cameron W. Cotrill and Harold F. Bower. This is available under the terms of the General Public License version 2. See the third_party/zsdos/COPYING file for more details.